Release the GIL while running a gdb command or expression
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a0707f3c
TT
12019-01-25 Tom Tromey <tom@tromey.com>
2
3 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4
0747795c
TT
52019-01-25 Tom Tromey <tom@tromey.com>
6
7 * win32-low.c: Fix common/ includes.
8 * win32-i386-low.c: Fix common/ includes.
9 * tracepoint.c: Fix common/ includes.
10 * thread-db.c: Fix common/ includes.
11 * target.h: Fix common/ includes.
12 * symbol.c: Fix common/ includes.
13 * spu-low.c: Fix common/ includes.
14 * server.h: Fix common/ includes.
15 * server.c: Fix common/ includes.
16 * remote-utils.c: Fix common/ includes.
17 * regcache.h: Fix common/ includes.
18 * regcache.c: Fix common/ includes.
19 * nto-x86-low.c: Fix common/ includes.
20 * notif.h: Fix common/ includes.
21 * mem-break.h: Fix common/ includes.
22 * lynx-low.c: Fix common/ includes.
23 * lynx-i386-low.c: Fix common/ includes.
24 * linux-x86-tdesc-selftest.c: Fix common/ includes.
25 * linux-x86-low.c: Fix common/ includes.
26 * linux-low.c: Fix common/ includes.
27 * inferiors.h: Fix common/ includes.
28 * i387-fp.c: Fix common/ includes.
29 * hostio.c: Fix common/ includes.
30 * hostio-errno.c: Fix common/ includes.
31 * gdbthread.h: Fix common/ includes.
32 * gdbreplay.c: Fix common/ includes.
33 * fork-child.c: Fix common/ includes.
34 * event-loop.c: Fix common/ includes.
35 * ax.c:
36 (enum gdb_agent_op): Fix common/ includes.
37
be6d4f74
TT
382019-01-21 Tom Tromey <tom@tromey.com>
39
40 * tracepoint.c: Fix includes.
41 * remote-utils.c: Fix includes.
42 * linux-x86-low.c: Fix includes.
43
66d91b39
JB
442019-01-01 Joel Brobecker <brobecker@adacore.com>
45
46 * gdbreplay.c (gdbreplay_version): Update copyright year in
47 version message.
48 * server.c (gdbserver_version): Likewise.
49
754e3168
AH
502018-12-05 Alan Hayward <alan.hayward@arm.com>
51
52 * linux-low.c (add_lwp): Switch ordering.
53
d105de22
TT
542018-11-29 Tom Tromey <tom@tromey.com>
55
56 * win32-low.c (win32_join): Take pid, not process.
57 * target.h (struct target_ops) <join>: Change argument type.
58 (join_inferior): Change argument name.
59 * spu-low.c (spu_join): Take pid, not process.
60 * server.c (handle_detach): Preserve pid before destroying
61 process.
62 * lynx-low.c (lynx_join): Take pid, not process.
63 * linux-low.c (linux_join): Take pid, not process.
64
50138245
AH
652018-11-23 Alan Hayward <alan.hayward@arm.com>
66
67 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
68 (aarch64_cannot_fetch_register): Likewise.
69 (struct linux_target_ops): Update references.
70
64f57f3d
PFC
712018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
72
73 * linux-ppc-low.c: Include nat/linux-ptrace.h.
74
8d619c01
EBM
752018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
76
77 * configure.srv (ipa_ppc_linux_regobj): Add
78 powerpc-isa207-htm-vsx32l-ipa.o and
79 powerpc-isa207-htm-vsx64l-ipa.o.
80 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
81 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
82 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
83 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
84 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
85 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
86 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
87 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
88 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
89 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
90 (init_registers_powerpc_isa207_htm_vsx32l)
91 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
92 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
93 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
94 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
95 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
96 (ppc_store_tm_ctarregset): New functions.
97 (ppc_regsets): Add entries for HTM regsets.
98 (ppc_arch_setup): Set htm in features struct when needed. Set
99 sizes for the HTM regsets.
100 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
101 (initialize_low_arch): Call
102 init_registers_powerpc_isa207_htm_vsx32l and
103 init_registers_powerpc_isa207_htm_vsx64l.
104 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
105 PPC_TDESC_ISA207_HTM_VSX.
106 (initialize_low_tracepoint): Call
107 init_registers_powerpc_isa207_htm_vsx32l and
108 init_registers_powerpc_isa207_htm_vsx64l.
109
232bfb86
EBM
1102018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
111
112 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
113 rs6000/power-linux-pmu.xml to srv_xmlfiles.
114 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
115 (ppc_store_pmuregset): New functions.
116 (ppc_regsets): Add entries for ebb and pmu regsets.
117 (ppc_arch_setup): Set isa207 in features struct if the ebb and
118 pmu regsets are available. Set sizes for these regsets.
119
f2cf6173
EBM
1202018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
121
122 * configure.srv (ipa_ppc_linux_regobj): Add
123 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
124 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
125 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
126 rs6000/powerpc-isa207-vsx32l.xml, and
127 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
128 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
129 <PPC_TDESC_ISA207_VSX>: New enum value.
130 (init_registers_powerpc_isa207_vsx32l): Declare.
131 (init_registers_powerpc_isa207_vsx64l): Declare.
132 * linux-ppc-low.c (ppc_fill_tarregset): New function.
133 (ppc_store_tarregset): New function.
134 (ppc_regsets): Add entry for the TAR regset.
135 (ppc_arch_setup): Set isa207 in features struct when needed. Set
136 size for the TAR regsets.
137 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
138 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
139 and init_registers_powerpc_isa207_vsx64l.
140 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
141 (initialize_low_tracepoint): Call
142 init_registers_powerpc_isa207_vsx32l and
143 init_registers_powerpc_isa207_vsx64l.
144
7ca18ed6
EBM
1452018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
146 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
147
148 * configure.srv (ipa_ppc_linux_regobj): Add
149 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
150 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
151 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
152 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
153 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
154 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
155 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
156 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
157 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
158 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
159 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
160 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
161 (ppc_hwcap): Add comment.
162 (ppc_hwcap2): New global.
163 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
164 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
165 (ppc_regsets): Add entries for the DSCR and PPR regsets.
166 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
167 when needed. Set sizes for the the DSCR and PPR regsets.
168 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
169 (initialize_low_arch): Call
170 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
171 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
172 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
173 PPC_TDESC_ISA205_PPR_DSCR_VSX.
174 (initialize_low_tracepoint): Call
175 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
176 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
177
5c849b22
PFC
1782018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
179
180 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
181
8ecfd7bd
SDJ
1822018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
183 Simon Marchi <simark@simark.ca>
184
185 * acinclude.m4: Include "../selftest.m4".
186 * configure: Regenerate.
187 * configure.ac: Use "GDB_AC_SELFTEST".
188 * configure.srv: Use "$enable_unittests" instead of
189 "$development" when checking whether unit tests have been
190 enabled.
191 * server.c (captured_main): Update message informing that
192 selftests have been disabled.
193
96643e35
TT
1942018-10-04 Tom Tromey <tom@tromey.com>
195
196 * configure: Rebuild.
197
da4ae14a
TT
1982018-10-04 Tom Tromey <tom@tromey.com>
199
200 * server.c (handle_status): Rename inner "thread".
201 (process_serial_event): Declare "res" in 'm' case.
202 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
203 (iterate_over_lwps): Rename inner "thread".
204 (linux_qxfer_libraries_svr4): Rename inner "len".
205 * gdbthread.h (find_thread_in_random): Rename inner "thread".
206
7c619dbd
GB
2072018-10-01 Gary Benson <gbenson@redhat.com>
208
209 * gdb_proc_service.h: Moved common code to
210 common/gdb_proc_service.h.
211
3795e814
GB
2122018-10-01 Gary Benson <gbenson@redhat.com>
213
214 * gdb_proc_service.h: Synchronize comments and whitespace with
215 GDB's version of this file.
216
49b036f1
TT
2172018-09-25 Tom Tromey <tom@tromey.com>
218
219 * configure: Rebuild.
220 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
221
8ff03f0b
SM
2222018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
225 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
226 ($(IPA_LIB)): Sort IPA_OBJS.
227
a1cd91dc
SM
2282018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * Makefile.in: Remove references to $(ADD_DEPS).
231
752312ba
TT
2322018-09-16 Tom Tromey <tom@tromey.com>
233
234 * remote-utils.c (remote_open): Use GNU style for metasyntactic
235 variables.
236 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
237 variables.
238
f1628857
TT
2392018-09-05 Tom Tromey <tom@tromey.com>
240
241 * configure: Rebuild.
242
ad202fcc
SM
2432018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
244
245 PR build/23399
246 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
247
d3d8724a
TT
2482018-08-27 Tom Tromey <tom@tromey.com>
249
250 PR build/23087:
251 * configure: Rebuild.
252
b4f183d2
TT
2532018-08-27 Tom Tromey <tom@tromey.com>
254
255 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
256 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
257 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
258 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
259 (s390x_emit_stack_adjust): Add casts to unsigned char.
260
4e2aa472
SM
2612018-08-22 Simon Marchi <simon.marchi@ericsson.com>
262
263 PR gdb/23374
264 PR gdb/23375
265 * server.h (struct client_state) <disable_randomization>:
266 Initialize to 1.
267
cf4088a9
SM
2682018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
269
270 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
271 variable.
272 (mips_supply_ptrace_register): Likewise.
273
a0de763e
TT
2742018-07-22 Tom Tromey <tom@tromey.com>
275
276 * configure: Rebuild.
277
b0a7723d
TT
2782018-07-22 Tom Tromey <tom@tromey.com>
279
280 * win32-low.c (win32_create_inferior): Remove unused variables.
281 * gdbreplay.c (remote_open): Remove unused variable.
282 * remote-utils.c (remote_prepare): Remove unused variable.
283 * x86-tdesc.h (X86_TDESC_H): Define.
284 (amd64_expedite_regs): Define conditionally.
285 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
286 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
287 * remote-utils.c (readchar): Remove unused variable.
288
a780ef4f
PA
2892018-07-13 Pedro Alves <palves@redhat.com>
290
291 * linux-low.c (linux_kill): Change parameter to process_info
292 pointer instead of pid. Adjust.
293 * lynx-low.c (lynx_kill): Likewise.
294 * nto-low.c (nto_kill): Likewise.
295 * spu-low.c (spu_kill): Likewise.
296 * win32-low.c (win32_kill): Likewise.
297 * server.c (handle_v_kill, kill_inferior_callback)
298 (detach_or_kill_for_exit): Adjust.
299 * target.c (kill_inferior): Change parameter to process_info
300 pointer instead of pid. Adjust.
301 * target.h (struct target_ops) <kill>: Change parameter to
302 process_info pointer instead of pid. Adjust all implementations
303 and callers.
304 (kill_inferior): Likewise.
305
ef2ddb33
PA
3062018-07-13 Pedro Alves <palves@redhat.com>
307
308 * linux-low.c (linux_detach, linux_join): Change parameter to
309 process_info pointer instead of pid. Adjust.
310 * lynx-low.c (lynx_detach, lynx_join): Likewise.
311 * nto-low.c (nto_detach): Likewise.
312 * spu-low.c (spu_detach, spu_join): Likewise.
313 * win32-low.c (win32_detach, win32_join): Likewise.
314 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
315 * target.h (struct target_ops) <detach, join>: Change parameter to
316 process_info pointer instead of pid. Adjust all implementations
317 and callers.
318 (detach_inferior, join_inferior): Rename 'pid' parameter to
319 'proc'.
320
c7ab0aef
SDJ
3212018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
322 Jan Kratochvil <jan.kratochvil@redhat.com>
323 Paul Fertser <fercerpav@gmail.com>
324 Tsutomu Seki <sekiriki@gmail.com>
325
326 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
327 (OBS): Add 'common/netstuff.o'.
328 (GDBREPLAY_OBS): Likewise.
329 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
330 (remote_open): Implement support for IPv6
331 connections.
332 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
333 and 'wspiapi.h'.
334 (handle_accept_event): Accept connections from IPv6 sources.
335 (remote_prepare): Handle IPv6-style hostnames; implement
336 support for IPv6 connections.
337 (remote_open): Implement support for printing connections from
338 IPv6 sources.
339
31445d10
PA
3402018-07-11 Pedro Alves <palves@redhat.com>
341
342 PR gdb/23377
343 * mem-break.c (any_persistent_commands): Add process_info
344 parameter and use it instead of relying on the current process.
345 Change return type to bool.
346 * mem-break.h (any_persistent_commands): Add process_info
347 parameter and change return type to bool.
348 * server.c (handle_detach): Remove require_running_or_return call.
349 Look up the process_info for the process we're about to detach.
350 If not found, return back error to GDB. Adjust
351 any_persistent_commands call to pass down a process pointer.
352
cb197132
PA
3532018-07-11 Pedro Alves <palves@redhat.com>
354
355 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
356 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
357 instead of collect_register_by_name.
358 * regcache.c (regcache_raw_get_unsigned_by_name): New.
359 * regcache.h (regcache_raw_get_unsigned_by_name): New.
360
1b919490
VB
3612018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
362 Pedro Alves <palves@redhat.com>
363
364 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
365
d7e15655
TT
3662018-07-03 Tom Tromey <tom@tromey.com>
367
368 * linux-low.c: Update.
369 * lynx-low.c: Update.
370 * mem-break.c: Update.
371 * nto-low.c: Update.
372 * remote-utils.c: Update.
373 * server.c: Update.
374 * spu-low.c: Update.
375 * target.c: Update.
376 * win32-low.c: Update.
377
26a57c92
TT
3782018-07-03 Tom Tromey <tom@tromey.com>
379
380 * server.c: Update.
381
0e998d96
TT
3822018-07-03 Tom Tromey <tom@tromey.com>
383
384 * linux-low.c: Update.
385
cc6bcb54
TT
3862018-07-03 Tom Tromey <tom@tromey.com>
387
388 * target.c: Update.
389
e38504b3
TT
3902018-07-03 Tom Tromey <tom@tromey.com>
391
392 * linux-low.c: Update.
393 * linux-mips-low.c: Update.
394 * lynx-low.c: Update.
395 * nto-low.c: Update.
396 * remote-utils.c: Update.
397 * server.c: Update.
398 * spu-low.c: Update.
399 * target.c: Update.
400 * thread-db.c: Update.
401
e99b03dc
TT
4022018-07-03 Tom Tromey <tom@tromey.com>
403
404 * linux-low.c: Update.
405 * linux-mips-low.c: Update.
406 * lynx-low.c: Update.
407 * mem-break.c: Update.
408 * nto-low.c: Update.
409 * remote-utils.c: Update.
410 * server.c: Update.
411 * spu-low.c: Update.
412 * target.c: Update.
413 * tracepoint.c: Update.
414
f2907e49
TT
4152018-07-03 Tom Tromey <tom@tromey.com>
416
417 * linux-low.c: Update.
418 * linux-ppc-low.c: Update.
419 * linux-x86-low.c: Update.
420 * proc-service.c: Update.
421 * server.c: Update.
422 * spu-low.c: Update.
423 * thread-db.c: Update.
424 * win32-low.c: Update.
425
fd79271b
TT
4262018-07-03 Tom Tromey <tom@tromey.com>
427
428 * linux-low.c: Update.
429 * lynx-low.c: Update.
430 * nto-low.c: Update.
431 * remote-utils.c: Update.
432 * spu-low.c: Update.
433 * thread-db.c: Update.
434 * win32-low.c: Update.
435
c0867626
SDJ
4362018-06-29 Joel Brobecker <brobecker@adacore.com>
437
438 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
439 parameter in call to 'amd64_create_target_description'.
440
2512d7ef
JK
4412018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
442
443 * x86-tdesc.h: Remove executable permission flag.
444
d0ac1c44
SM
4452018-06-19 Simon Marchi <simon.marchi@ericsson.com>
446
447 * configure.ac: Remove AC_PREREQ, add missing quoting.
448 * configure: Re-generate.
449 * config.in: Re-generate.
450 * aclocal.m4: Re-generate.
451
c4eb05ff
SM
4522018-06-18 Simon Marchi <simon.marchi@ericsson.com>
453
454 * tracepoint.h (current_traceframe): Remove declaration.
455
02895270
AH
4562018-06-18 Alan Hayward <alan.hayward@arm.com>
457
458 * linux-aarch64-low.c (is_sve_tdesc): New function.
459 (aarch64_sve_regs_copy_to_regcache): Likewise.
460 (aarch64_sve_regs_copy_from_regcache): Likewise.
461 (aarch64_regs_info): Add SVE checks.
462 (initialize_low_arch): Initialize SVE.
463
e9902bfc
AH
4642018-06-18 Alan Hayward <alan.hayward@arm.com>
465
466 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
467
fefa175e
AH
4682018-06-11 Alan Hayward <alan.hayward@arm.com>
469
470 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
471 (initialize_low_tracepoint): Likewise
472 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
473 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
474 param.
475 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
476 checks.
477 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
478
b91ad3ff
AH
4792018-06-11 Alan Hayward <alan.hayward@arm.com>
480
481 * server.h (PBUFSIZ): Increase size
482
f868386e
AH
4832018-06-11 Alan Hayward <alan.hayward@arm.com>
484
485 * regcache.c (regcache::raw_compare): New function.
486 * regcache.h (regcache::raw_compare): New declaration.
487
9c861883
AH
4882018-06-11 Alan Hayward <alan.hayward@arm.com>
489
490 * regcache.c (new_register_cache): Use new.
491 (free_register_cache): Use delete.
492 (register_data): Use const.
493 (supply_register): Move body inside regcache.
494 (regcache::raw_supply): New override function.
495 (collect_register): Move body inside regcache.
496 (regcache::raw_collect): New override function.
497 (regcache::get_register_status): New override function.
498 * regcache.h (struct regcache): Inherit from reg_buffer_common.
499
40591844
TT
5002018-06-09 Tom Tromey <tom@tromey.com>
501
502 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
503 declare queue.
504 (event_queue): Use std::queue.
505 (gdb_event_xfree): Remove.
506 (initialize_event_loop, process_event, wait_for_event): Update.
507
6341380d
SC
5082018-06-08 Stan Cox <scox@redhat.com>
509
510 * win32-low.c (win32_create_inferior): last_ptid and last_status
511 moved to client_state.
512
03349c93
PA
5132018-06-08 Pedro Alves <palves@redhat.com>
514
515 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
516 common/common-exceptions.o, common/common-utils.o,
517 common/errors.o, common/print-utils.o and utils.o.
518 * gdbreplay.c: Include "common-defs.h" instead of the two
519 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
520 string.h or alloca.h.
521 (perror_with_name): Delete.
522 (remote_open): Use xstrdup instead of strdup.
523 (main): Rename to ...
524 (captured_main): ... this.
525 (main): New.
526
8dcc53b3
TT
5272018-06-08 Tom Tromey <tom@tromey.com>
528
529 * linux-low.c (linux_low_read_btrace): Update.
530
c12a5089
SC
5312018-06-04 Stan Cox <scox@redhat.com>
532
533 * server.h (struct client_state): New.
534 * server.c (cont_thread, general_thread, multi_process)
535 (report_fork_events, report_vfork_events, report_exec_events)
536 (report_thread_events, swbreak_feature, hwbreak_feature)
537 (vCont_supported, disable_randomization, pass_signals)
538 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
539 Moved to client_state.
540 * remote-utils.c (remote_debug, noack_mode)
541 (transport_is_reliable): Moved to client_state.
542 * tracepoint.c (current_traceframe): Moved to client_state.
543
544 Update all callers.
545 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
546 linux-low.c, remote-utils.h, target.c: Use client_state.
547
122394f1
AH
5482018-05-31 Alan Hayward <alan.hayward@arm.com>
549
550 * configure.srv: Add new c/h file.
551
95228a0d
AH
5522018-05-31 Alan Hayward <alan.hayward@arm.com>
553
554 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
555 null VQ.
556
d8dab6c3
MR
5572018-05-25 Maciej W. Rozycki <macro@mips.com>
558
559 * gdb.arch/mips-fpregset-core.exp: New test.
560 * gdb.arch/mips-fpregset-core.c: New test source.
561
81e25b7c
EK
5622018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
563
564 PR server/23198
565 * hostio.c (require_int): Do not report overflow for integers
566 between 0xfffffff and 0x7fffffff.
567
7e947ad3
MR
5682018-05-22 Maciej W. Rozycki <macro@mips.com>
569
570 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
571 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
572 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
573 functions.
574 (the_low_target): Wire them.
575
1d75a658
PFC
5762018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
577
578 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
579 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
580 mode. Call collect_register_by_name with vscr using
581 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
582 (ppc_store_vrregset): Add and set vscr_offset variable as in
583 ppc_fill_vrregset. Call supply_register_by_name with vscr using
584 vscr_offset.
585
d078308a
PFC
5862018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
587
588 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
589 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
590 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
591
7273b5fc
PFC
5922018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
593
594 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
595 (ppc_store_vsxregset): Likewise.
596 (ppc_fill_vrregset): Likewise.
597 (ppc_store_vrregset): Likewise.
598 (ppc_fill_evrregset): Likewise.
599 (ppc_store_evrregset): Likewise.
600 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
601 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
602 needed.
603
2e077f5e
PFC
6042018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
605
606 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
607 wordsize of the inferior. Call ppc_linux_target_wordsize.
608
bd64614e
PFC
6092018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
610
611 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
612 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
613 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
614 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
615 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
616 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
617 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
618 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
619 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
620 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
621 (tdesc_powerpc_e500l): Remove.
622 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
623 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
624 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
625 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
626 linux-ppc-tdesc.h.
627 (ppc_arch_setup): Remove target description matching code. Fill a
628 ppc_linux_features struct and call ppc_linux_match_description
629 with it.
630
75d74cca
MR
6312018-05-22 Maciej W. Rozycki <macro@mips.com>
632
633 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
634 width of the requested register exceeds the width of the
635 `ptrace' data type.
636 (mips_cannot_store_register): Likewise.
637
e4439e43
MR
6382018-05-21 Maciej W. Rozycki <macro@mips.com>
639
640 * linux-mips-low.c (mips_fetch_register): New function. Update
641 preceding comment.
642 (mips_store_gregset): Supply 0 rather than $restart for $zero.
643 (the_low_target): Wire `mips_fetch_register'.
644
55271bf9
JB
6452018-05-10 Joel Brobecker <brobecker@adacore.com>
646
647 * lynx-i386-low.c (LYNXOS_178): New macro.
648 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
649 the layout on LynxOS-178.
650 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
651 handle floating point registers that are not supported by
652 LynxOS-178.
653
1a34f210
TT
6542018-05-10 Tom Tromey <tom@tromey.com>
655
656 * configure: Rebuild.
657
190852c8
JB
6582018-05-10 Joel Brobecker <brobecker@adacore.com>
659
660 PR server/23158:
661 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
662 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
663 Use it to set the expedite_regs field in the given tdesc.
664 * x86-tdesc.h: New file.
665 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
666 Adjust following the addition of the new expedite_regs parameter
667 to init_target_desc.
668 * linux-tic6x-low.c (tic6x_read_description): Likewise.
669 * linux-x86-tdesc.c: #include "x86-tdesc.h".
670 (i386_linux_read_description, amd64_linux_read_description):
671 Adjust following the addition of the new expedite_regs parameter
672 to init_target_desc.
673 * lynx-i386-low.c: #include "x86-tdesc.h".
674 (lynx_i386_arch_setup): Adjust following the addition of the new
675 expedite_regs parameter to init_target_desc.
676 * nto-x86-low.c: #include "x86-tdesc.h".
677 (nto_x86_arch_setup): Adjust following the addition of the new
678 expedite_regs parameter to init_target_desc.
679 * win32-i386-low.c: #include "x86-tdesc.h".
680 (i386_arch_setup): Adjust following the addition of the new
681 expedite_regs parameter to init_target_desc.
682
7dbac825
JB
6832018-05-10 Joel Brobecker <brobecker@adacore.com>
684
685 PR server/23158:
686 * win32-low.c (win32_create_inferior): Add call to my_wait
687 setting last_status global.
688
906994d9
JB
6892018-05-10 Joel Brobecker <brobecker@adacore.com>
690
691 PR server/23158:
692 * win32-low.c (create_process): Only call gdb_tilde_expand if
693 inferior_cwd is not NULL.
694
8ee22052
AB
6952018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
696
697 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
698 registers to the cache if their values have changed.
699 (i387_xsave_to_cache): Provide default values for x87 control
700 registers when these features are available, but disabled.
701 * regcache.c (supply_register_by_name_zeroed): New function.
702 * regcache.h (supply_register_by_name_zeroed): Declare new
703 function.
704
aff689d3
TT
7052018-05-07 Tom Tromey <tom@tromey.com>
706
707 * configure: Rebuild.
708
85e26832
TT
7092018-05-04 Tom Tromey <tom@tromey.com>
710
711 * configure: Rebuild.
712
a3b60e45
JK
7132018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
714 Pedro Alves <palves@redhat.com>
715
716 * linux-aarch64-low.c (aarch64_stopped_data_address):
717 Likewise.
718
632e107b
TT
7192018-04-27 Tom Tromey <tom@tromey.com>
720
721 * configure: Rebuild.
722
458412c3
TT
7232018-04-23 Tom Tromey <tom@tromey.com>
724
725 * configure: Rebuild.
726
f31c089e
SM
7272018-04-19 Simon Marchi <simon.marchi@ericsson.com>
728
729 * Makefile.in (depcomp): Add "..".
730 (all_deps_files): New and use it.
731
b319b098
AH
7322018-04-18 Alan Hayward <alan.hayward@arm.com>
733
734 * configure.srv (aarch64*-*-linux*): Don't include xml.
735 (i[34567]86-*-cygwin*): Likewise.
736 (i[34567]86-*-linux*): Likewise.
737 (i[34567]86-*-lynxos*): Likewise.
738 (i[34567]86-*-mingw32ce*): Likewise.
739 (i[34567]86-*-mingw*): Likewise.
740 (i[34567]86-*-nto*): Likewise.
741 (tic6x-*-uclinux): Likewise.
742 (x86_64-*-linux*): Likewise.
743 (x86_64-*-mingw*): Likewise.
744 (x86_64-*-cygwin*): Likewise.
745
3b74854b
AH
7462018-04-18 Alan Hayward <alan.hayward@arm.com>
747
748 * tdesc.c: Remove xml parameter.
749
e98577a9
AH
7502018-04-18 Alan Hayward <alan.hayward@arm.com>
751
752 * server.c (get_features_xml): Remove cast.
753 * tdesc.c (void target_desc::accept): Fill in function.
754 (tdesc_get_features_xml): Remove old xml creation.
755 (print_xml_feature::visit_pre): Add xml vistor.
756 * tdesc.h (struct target_desc): Make xmltarget mutable.
757 (tdesc_get_features_xml): Remove declaration.
758
d278f585
AH
7592018-04-18 Alan Hayward <alan.hayward@arm.com>
760
761 * tdesc.c (tdesc_architecture_name): Add new function.
762 (tdesc_osabi_name): Likewise.
763 (tdesc_get_features_xml): Use new functions.
764
eee8a18d
AH
7652018-04-18 Alan Hayward <alan.hayward@arm.com>
766
767 * tdesc.c (tdesc_create_flags): Remove.
768 (tdesc_add_flag): Likewise.
769 (tdesc_named_type): Likewise.
770 (tdesc_create_union): Likewise.
771 (tdesc_create_struct): Likewise.
772 (tdesc_create_vector): Likewise.
773 (tdesc_add_bitfield): Likewise.
774 (tdesc_add_field): Likewise.
775 (tdesc_set_struct_size): Likewise.
776
82ec9bc7
AH
7772018-04-18 Alan Hayward <alan.hayward@arm.com>
778
779 * tdesc.c (~target_desc): Remove implictly deleted items.
780 (init_target_desc): Iterate all features.
781 (tdesc_get_features_xml): Use vector.
782 (tdesc_create_feature): Create feature.
783 * tdesc.h (tdesc_feature) Remove
784 (target_desc): Add features.
785
ea3e7d71
AH
7862018-04-18 Alan Hayward <alan.hayward@arm.com>
787
788 * Makefile.in: Add common/tdesc.c
789 * tdesc.c (init_target_desc): init all reg_defs from register
790 vector.
791 (tdesc_create_reg): Create tdesc_reg.
792 * tdesc.h (tdesc_feature): Add register vector.
793
17d08cd4
SM
7942018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * tdesc.h (struct target_desc) <features>: Change type to
797 std::vector<std::string>.
798 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
799 changes.
800 (tdesc_get_features_xml): Likewise.
801 (tdesc_create_feature): Likewise.
802
5cd3e386
AH
8032018-03-26 Alan Hayward <alan.hayward@arm.com>
804
805 * regcache.c (find_register_by_number): Return a ref.
806 (find_regno): Use references.
807 (register_size): Likewise.
808 (register_data): Likewise.
809 * tdesc.c (target_desc::~target_desc): Remove free calls.
810 (target_desc::operator==): Use std::vector compare.
811 (init_target_desc): Use reference.
812 (tdesc_create_reg): Use reg constructors.
813 * tdesc.h (struct target_desc): Replace pointer with object.
814
dff7492c
AH
8152018-03-23 Alan Hayward <alan.hayward@arm.com>
816
817 * regcache.c (find_register_by_number): Make static.
818 (find_regno): Use find_register_by_number
819 * regcache.h (struct reg): Remove declaration.
820
d80e5242
AH
8212018-03-23 Alan Hayward <alan.hayward@arm.com>
822
823 * tdesc.c (target_desc::~target_desc): Move to here.
824 (target_desc::operator==): Likewise.
825 * tdesc.h (target_desc::~target_desc): Move from here.
826 (target_desc::operator==): Likewise.
827
f69c5afb
AA
8282018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
829
830 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
831
ce29f843
AA
8322018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
833
834 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
835 S390_TDESC_GS.
836 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
837 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
838 and init_registers_s390_gs_linux64.
839
c49bd90b
AA
8402018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
841
842 * linux-s390-low.c (s390_fill_gs): Remove function.
843 (s390_fill_gsbc): Remove function.
844 (s390_regsets): Set fill functions for the guarded storage regsets
845 to NULL.
846
7edb9bd3
AA
8472018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
848
849 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
850 the word size. Add comment.
851 (s390_get_wordsize): New function.
852 (s390_arch_setup): No longer select a temporary tdesc to fetch the
853 pswm with it. Instead, use s390_get_wordsize to determine the
854 word size first and derive the correct tdesc from that directly.
855
39be3c7e
SM
8562018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
857
858 * Makefile.in: Include silent-rules.mk.
859 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
860 (COMPILE): Add ECHO_CXX.
861 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
862 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
863 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
864 (version-generated.c): Add ECHO_GEN.
865 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
866 (IPAGENT_COMPILE): Add ECHO_CXX.
867 (%-generated.c): Add ECHO_REGDAT.
868
3ae9ce5d
TT
8692018-03-14 Tom Tromey <tom@tromey.com>
870
871 PR cli/14977:
872 * ax.c (ax_printf): Special case for NULL.
873
e6a58aa8
SM
8742018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
875
876 * linux-low.c (linux_qxfer_libraries_svr4): Use
877 xml_escape_text_append.
878
f6e8a41e
SM
8792018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
880
881 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
882
b9671caf
SM
8832018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
884
885 * server.c (handle_general_set): Remove unnecessary xstrdup.
886
e80aaf61
SM
8872018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
888
889 * server.c (parse_debug_format_options): Adjust to
890 delim_string_to_char_ptr_vec changes.
891 * thread-db.c (thread_db_load_search): Adjust to
892 dirnames_to_char_ptr_vec changes.
893
b1223e78
MM
8942018-03-01 Markus Metzger <markus.t.metzger@intel.com>
895
896 * target.h (target_enable_btrace, target_disable_btrace)
897 (target_read_btrace, target_read_btrace_conf): Turn macro into
898 inline function. Throw error if target method is not defined.
899 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
900 check for btrace target method. Be prepared to handle exceptions
901 from btrace target methods.
902
81561546
SDJ
9032018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
904
905 * server.c (captured_main): Change order of error message printed
906 when the current working directory cannot be found.
907
25e3c82c
SDJ
9082018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
909
910 * server.c: Include "filenames.h" and "pathstuff.h".
911 (program_name): Delete variable.
912 (program_path): New anonymous class.
913 (get_exec_wrapper): Use "program_path" instead of
914 "program_name".
915 (handle_v_run): Likewise.
916 (captured_main): Likewise.
917 (process_serial_event): Likewise.
918
b4987c95
SDJ
9192018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
920
921 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
922 (OBJS): Add "pathstuff.o".
923 * server.c (current_directory): New global variable.
924 (captured_main): Initialize "current_directory".
925
f46cd62a
AH
9262018-02-26 Alan Hayward <alan.hayward@arm.com>
927
928 * tdesc.c: Use common/tdesc.h.
929 * tdesc.h: Likewise.
930
a543c5ca
AH
9312018-02-20 Alan Hayward <alan.hayward@arm.com>
932 Simon Marchi <simon.marchi@ericsson.com>
933
934 * Makefile.in: Switch order of make rules.
935
b5884fa7
AH
9362018-02-19 Alan Hayward <alan.hayward@arm.com>
937
938 * Makefile.in: Add common directory in build.
939 * configure.ac: Add common reference.
940 * configure: Regenerate.
941
de6242d3
MM
9422018-02-09 Markus Metzger <markus.t.metzger@intel.com>
943
944 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
945 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
946 * spu-low.c (spu_target_ops): Likewise.
947 * win32-low.c (win32_target_ops): Likewise.
948 * server.c (supported_btrace_packets): Report packets unconditionally.
949 * target.h (target_ops) <supports_btrace>: Remove.
950 (target_supports_btrace): Remove.
951
9ee23a85
MM
9522018-02-09 Markus Metzger <markus.t.metzger@intel.com>
953
954 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
955 (handle_btrace_disable): Change return type to void. Use exceptions
956 to report errors.
957 (handle_btrace_general_set): Catch exception and copy message to
958 return message.
959
8ce47547
TT
9602018-02-08 Tom Tromey <tom@tromey.com>
961
962 * linux-low.c (install_software_single_step_breakpoints): Use
963 make_scoped_restore.
964 * inferiors.c (make_cleanup_restore_current_thread): Remove.
965 (do_restore_current_thread_cleanup): Remove.
966 * gdbthread.h (make_cleanup_restore_current_thread): Don't
967 declare.
968
45dd3607
TT
9692018-02-08 Tom Tromey <tom@tromey.com>
970
971 * mem-break.c (set_raw_breakpoint_at): Use
972 gdb::unique_xmalloc_ptr.
973
e671cd59
PA
9742018-01-30 Pedro Alves <palves@redhat.com>
975
976 PR gdb/13211
977 * target.c (target_terminal::terminal_state): Rename to ...
978 (target_terminal::m_terminal_state): ... this.
979
a0aad537
JC
9802018-01-19 James Clarke <jrtc27@jrtc27.com>
981
982 * linux-low.c (handle_extended_wait): Surround call to
983 thread_db_notice_clone with #ifdef USE_THREAD_DB.
984
4d9b86e1
SM
9852018-01-17 Simon Marchi <simon.marchi@ericsson.com>
986
987 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
988 linux_ptrace_attach_fail_reason_string now returning an
989 std::string.
990 (linux_attach): Likewise.
991 * thread-db.c (attach_thread): Likewise.
992
f517c180
EA
9932018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
994
995 PR gdb/21559
996 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
997 checking for fs_base/gs_base fields in struct user_regs_struct.
998 * configure: Regenerate.
999
9a70f35c
YQ
10002018-01-16 Yao Qi <yao.qi@linaro.org>
1001
1002 PR gdb/18749
1003 * linux-low.c (fetch_register): Call supply_register instead of
1004 error.
1005
605fd3c6
YQ
10062018-01-08 Yao Qi <yao.qi@linaro.org>
1007 Simon Marchi <simon.marchi@ericsson.com>
1008
1009 * Makefile.in (OBS): Remove selftest.o.
1010 * configure.ac: Set srv_selftest_objs if $development is true.
1011 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1012 * configure: Re-generated.
1013 * server.c (captured_main): Wrap variable selftest_filter with
1014 GDB_SELF_TEST.
1015
2cc05030
SM
10162018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1017
1018 * server.c (parse_debug_format_options): Return std::string.
1019 (handle_monitor_command, captured_main): Adjust.
1020
e379cee6
PA
10212018-01-05 Pedro Alves <palves@redhat.com>
1022
1023 PR gdb/18653
1024 * server.c (captured_main): Pass quiet=false to
1025 save_original_signals_state.
1026
82e1e79a
JB
10272018-01-01 Joel Brobecker <brobecker@adacore.com>
1028
1029 * gdbreplay.c (gdbreplay_version): Update copyright year in
1030 version message.
1031 * server.c (gdbserver_version): Likewise.
1032
8e481c3b
TT
10332017-12-08 Tom Tromey <tom@tromey.com>
1034
1035 * ax.c (ax_printf): Update.
1036
a8806230
YQ
10372017-12-07 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1040 aarch64_linux_read_description.
1041 * linux-amd64-ipa.c (idx2mask): New array.
1042 (get_ipa_tdesc): Move idx2mask out.
1043 (initialize_low_tracepoint): Initialize target descriptions.
1044 * linux-i386-ipa.c (idx2mask): New array.
1045 (get_ipa_tdesc): Move idx2mask out.
1046 (initialize_low_tracepoint): Initialize target descriptions.
1047
d4a0e8b5
SM
10482017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1049
1050 * tdesc.c (struct tdesc_type): Change return type.
1051 (tdesc_add_flag): Change parameter type.
1052 (tdesc_add_bitfield): Likewise.
1053 (tdesc_add_field): Likewise.
1054 (tdesc_set_struct_size): Likewise.
1055
798a7429
SM
10562017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1057
1058 * regcache.c (registers_to_string): Remove unused variable.
1059
c0e15c9b
SM
10602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1061
1062 * inferiors.c (for_each_inferior_with_data): Remove.
1063 * inferiors.h (for_each_inferior_with_data): Remove.
1064 * server.c (handle_qxfer_threads_worker): Change parameter type.
1065 (handle_qxfer_threads_proper): Use for_each_thread.
1066
f0045347
SM
10672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1068
1069 * inferiors.c (for_each_inferior): Remove.
1070 (clear_inferiors): Use for_each_thread.
1071 * inferiors.h (for_each_inferior): Remove.
1072 * linux-low.c (linux_wait_for_event_filtered): Use
1073 for_each_thread.
1074 (linux_stabilize_threads): Likewise.
1075 * regcache.c (regcache_release): Likewise.
1076 * server.c (gdb_wants_all_threads_stopped): Likewise.
1077 (clear_pending_status_callback): Remove.
1078 (handle_status): Use for_each_thread.
1079 (captured_main): Likewise.
1080 * win32-low.c (child_init_thread_list): Likewise.
1081 (win32_clear_inferiors): Likewise.
1082 (fake_breakpoint_event): Likewise.
1083
9521758b
SM
10842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1085
1086 * inferiors.h (find_inferior): Remove.
1087 * inferiors.c (find_inferior): Remove.
1088
8f86d7aa
SM
10892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1090
1091 * linux-low.c (resume_status_pending_p): Update comment.
1092 (need_step_over_p): Update comment.
1093
e2b44075
SM
10942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1095
1096 * linux-low.c (proceed_one_lwp): Return void, change parameter
1097 type.
1098 (unsuspend_and_proceed_one_lwp): Likewise.
1099 (proceed_all_lwps): Use for_each_thread.
1100 (unstop_all_lwps): Likewise.
1101
c80825ff
SM
11022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1103
1104 * linux-low.c (linux_resume_one_thread): Return void, take
1105 parameter directly.
1106 (linux_resume): Use for_each_thread.
1107
df3e4dbe
SM
11082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1109
1110 * linux-low.c (send_sigstop_callback): Return void, change
1111 parameter type. Rename to...
1112 (send_sigstop): ... this.
1113 (suspend_and_send_sigstop_callback): Return void, change parameter
1114 type. Rename to...
1115 (suspend_and_send_sigstop): ... this.
1116 (stop_all_lwps): Use for_each_thread.
1117
5a6b0a41
SM
11182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1119
1120 * linux-low.c (lwp_running): Return bool, remove unused
1121 argument.
1122 (linux_stabilize_threads): Use find_thread.
1123
39a64da5
SM
11242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1125
1126 * linux-low.c (select_singlestep_lwp_callback): Remove.
1127 (count_events_callback): Remove.
1128 (select_event_lwp_callback): Remove.
1129 (select_event_lwp): Use find_thread/for_each_thread.
1130
a1385b7b
SM
11312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1132
1133 * linux-low.c (not_stopped_callback): Return bool, take filter
1134 argument directly.
1135 (linux_wait_for_event_filtered): Use find_thread.
1136 (linux_wait_1): Likewise.
1137
454296a2
SM
11382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1139
1140 * linux-low.c (same_lwp): Remove.
1141 (find_lwp_pid): Use find_thread.
1142
6b2a85da
SM
11432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1144
1145 * linux-low.c (delete_lwp_callback): Remove.
1146 (linux_mourn): Use for_each_thread.
1147
798a38e8
SM
11482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1149
1150 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1151 args parameter, don't check for pid.
1152 (linux_detach): Use for_each_thread.
1153
e4eb0dec
SM
11542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1155
1156 * linux-low.c (struct counter): Remove.
1157 (second_thread_of_pid_p): Remove.
1158 (last_thread_of_process_p): Use find_thread.
1159
83e1b6c1
SM
11602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * inferiors.c (find_inferior_in_random): Remove.
1163 * inferiors.h (find_inferior_in_random): Remove.
1164 * linux-low.c (status_pending_p_callback): Return bool, accept
1165 parameter ptid directly.
1166 (linux_wait_for_event_filtered): Use find_thread_in_random.
1167 (linux_wait_1): Likewise.
1168
8dc7b443
SM
11692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1170
1171 * inferiors.c (find_inferior_id): Remove.
1172 (find_thread_ptid): Move implemention from find_inferior_id to
1173 here.
1174 * inferiors.h (find_inferior_id): Remove.
1175 * server.c (handle_status): Use find_thread_ptid.
1176 (process_serial_event): Likewise.
1177 * thread-db.c (find_one_thread): Likewise.
1178 (thread_db_thread_handle): Likewise.
1179 * win32-low.c (thread_rec): Likewise.
1180 (child_delete_thread): Likewise.
1181 (win32_thread_alive): Likewise.
1182 (get_child_debug_event): Likewise.
1183
da25033c
SM
11842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1185
1186 * linux-mips-low.c (update_watch_registers_callback): Return
1187 void, remove pid_p parameter, don't check for pid.
1188 (mips_insert_point, mips_remove_point): Use for_each_thread.
1189
c91bb56b
SM
11902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1191
1192 * lynx.low (lynx_delete_thread_callback): Remove.
1193 (lynx_mourn): Use for_each_thread.
1194
634a3254
SM
11952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * regcache.c (regcache_invalidate_one): Remove.
1198 (regcache_invalidate_pid): use for_each_thread.
1199
41272101
TT
12002017-11-26 Tom Tromey <tom@tromey.com>
1201
1202 * linux-low.c (linux_create_inferior): Update.
1203
f5291a6f
UW
12042017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1205
1206 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1207
6654d750
AH
12082017-11-24 Alan Hayward <alan.hayward@arm.com>
1209
1210 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1211 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1212 * linux-aarch64-tdesc-selftest.c: New file.
1213 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1214
12152017-11-24 Alan Hayward <alan.hayward@arm.com>
1216
1217 * configure.srv: Add new file.
1218 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1219 * linux-aarch64-tdesc-selftest.c: New file.
1220 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1221
49bdb7ee
AH
12222017-11-24 Alan Hayward <alan.hayward@arm.com>
1223
1224 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1225 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1226 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1227
d6d7ce56
AH
12282017-11-24 Alan Hayward <alan.hayward@arm.com>
1229
1230 * configure.srv: Add new files.
1231 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1232 aarch64_linux_read_description.
1233 * linux-aarch64-low.c (aarch64_linux_read_description):
1234 Merge with aarch64_arch_setup.
1235 (aarch64_arch_setup): Call aarch64_linux_read_description.
1236 * linux-aarch64-tdesc.c: New file.
1237 * linux-aarch64-tdesc.h: New file.
1238
506fe5f4
YQ
12392017-11-24 Yao Qi <yao.qi@linaro.org>
1240
1241 * configure.srv: Set $srv_regobj for tic6x-linux.
1242 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1243 (tic6x_read_description): Move some code to tic6x_arch_setup.
1244 (tic6x_tdesc_test): New function.
1245 (initialize_low_arch): Call selftests::register_test.
1246
29f9a567
YQ
12472017-11-22 Yao Qi <yao.qi@linaro.org>
1248
1249 * remote-utils.c (prepare_resume_reply): Use memcpy.
1250
578290ec
SM
12512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1252
1253 * linux-low.c (kill_one_lwp_callback): Return void, take
1254 argument directly, don't filter on pid.
1255 (linux_kill): Use for_each_thread.
1256
eca55aec
SM
12572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1258
1259 * linux-low.c (need_step_over_p): Return bool, remove dummy
1260 argument.
1261 (linux_resume, proceed_all_lwps): Use find_thread.
1262
25c28b4d
SM
12632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1264
1265 * linux-low.c (resume_status_pending_p): Return bool, remove
1266 flag_p argument.
1267 (linux_resume): Use find_thread.
1268
5fdda392
SM
12692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1270
1271 * linux-low.c (struct thread_resume_array): Remove.
1272 (linux_set_resume_request): Return void, take arguments
1273 directly.
1274 (linux_resume): Use for_each_thread.
1275
fcb056a5
SM
12762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1277
1278 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1279 return bool, remove data argument.
1280 (linux_stabilize_threads): Use find_thread.
1281
139720c5
SM
12822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * linux-low.c (unsuspend_one_lwp): Remove.
1285 (unsuspend_all_lwps): Use for_each_thread, inline code from
1286 unsuspend_one_lwp.
1287
6d1e5673
SM
12882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1289
1290 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1291 * linux-low.c (struct iterate_over_lwps_args): Remove.
1292 (iterate_over_lwps_filter): Remove.
1293 (iterate_over_lwps): Use find_thread.
1294
bbf550d5
SM
12952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1298 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1299 code from reset_lwp_ptrace_options_callback.
1300
00192f77
SM
13012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1302
1303 * linux-arm-low.c (struct update_registers_data): Remove.
1304 (update_registers_callback): Return void, take arguments
1305 directly, don't check thread's pid.
1306 (arm_insert_point, arm_remove_point): Use for_each_thread.
1307
2bee2b6c
SM
13082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1309
1310 * win32-low.c (continue_one_thread): Return void, take argument
1311 directly.
1312 (child_continue): Use for_each_thread.
1313
0b360f19
SM
13142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1315
1316 * win32-i386-low.c (update_debug_registers_callback): Rename
1317 to ...
1318 (update_debug_registers): ... this, return void, remove pid_p arg.
1319 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1320
f27866ba
SM
13212017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1322
1323 * inferiors.h (struct process_info): Add constructor, initialize
1324 fields..
1325 <syscalls_to_catch>: Change type to std::vector<int>.
1326 * inferiors.c (add_process): Allocate process_info with new.
1327 (remove_process): Free process_info with delete.
1328 * linux-low.c (handle_extended_wait): Adjust.
1329 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1330 * server.c (handle_general_set): Adjust.
1331
e849ea89
PA
13322017-11-16 Pedro Alves <palves@redhat.com>
1333
1334 * remote-utils.c (remote_close): Block SIGIO signals instead of
1335 uninstalling the SIGIO handler.
1336
1d0aa65c
AH
13372017-11-16 Alan Hayward <alan.hayward@arm.com>
1338
1339 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1340
3491a34c
YQ
13412017-11-16 Yao Qi <yao.qi@linaro.org>
1342
1343 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1344 (tic6x_store_gregset): Likewise.
1345 (tic6x_usrregs_info): Move it up.
1346
a602f924
AH
13472017-11-15 Alan Hayward <alan.hayward@arm.com>
1348
1349 * Makefile.in: Update arch rules.
1350 * configure.srv: Explicitly mark arch/ files.
1351
5616b6c3
AS
13522017-11-13 Andreas Schwab <schwab@suse.de>
1353
1354 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1355 function.
1356 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1357
d1928160
PA
13582017-11-06 Pedro Alves <palves@redhat.com>
1359
1360 * config.in, configure: Regenerate.
1361
bac608e7
SM
13622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * target.c (struct thread_search): Remove.
1365 (thread_search_callback): Remove.
1366 (prepare_to_access_memory): Use for_each_thread instead of
1367 find_inferior. Inline code from thread_search_callback.
1368
eaddb425
SM
13692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1370
1371 * server.c (struct visit_actioned_threads_data): Remove.
1372 (visit_actioned_threads): Change prototype to take arguments
1373 directly.
1374 (resume): Use find_thread instead of find_inferior.
1375
99078d34
SM
13762017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1377
1378 * server.c (queue_stop_reply_callback): Change prototype, return
1379 void.
1380 (find_status_pending_thread_callback): Remove.
1381 (handle_status): Replace find_inferior with find_thread and
1382 for_each_thread.
1383
cc628f3d
AH
13842017-10-25 Alan Hayward <alan.hayward@arm.com>
1385
1386 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1387 with REGNO.
1388 (aarch64_store_gregset): Likewise.
1389 (aarch64_fill_fpregset): Likewise.
1390 (aarch64_store_fpregset): Likewise.
1391
4d3bb80e
SM
13922017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1393
1394 * gdbthread.h (find_thread, for_each_thread): New functions.
1395 * inferiors.c (thread_of_pid): Remove.
1396 (find_any_thread_of_pid): Use find_thread.
1397 * linux-low.c (num_lwps): Use for_each_thread.
1398
7a7cdfa0
YQ
13992017-10-17 Yao Qi <yao.qi@linaro.org>
1400
1401 * Makefile.in: Remove one rule.
1402 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1403
e675d170
YQ
14042017-10-17 Yao Qi <yao.qi@linaro.org>
1405
1406 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1407 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1408
7eb4e0f9
YQ
14092017-10-17 Yao Qi <yao.qi@linaro.org>
1410
1411 * configure.srv: Rename arm.o with arch/arm.o.
1412
60d6cfc9
YQ
14132017-10-17 Yao Qi <yao.qi@linaro.org>
1414
1415 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1416 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1417 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1418 (arch-i386.o, arch-amd64.o): Remove rules.
1419 (arch/%.o): New rule.
1420 Update POSTCOMPILE and COMPILE.pre.
1421 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1422 * configure: Re-generated.
1423 * configure.srv: Replace arch-i386.o with arch/i386.o.
1424 Replace arch-amd64.o with arch/amd64.o.
1425
5bfda255
YQ
14262017-10-16 Yao Qi <yao.qi@linaro.org>
1427
1428 * configure: Regenerated.
1429
9c80ecd6
SM
14302017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1431
1432 * inferiors.h: (struct inferior_list): Remove.
1433 (struct inferior_list_entry); Remove.
1434 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1435 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1436 get_first_inferior): Remove.
1437 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1438 find_inferior_id, find_inferior_in_random): Change signature.
1439 * inferiors.c (all_threads): Change type to
1440 std::list<thread_info *>.
1441 (get_thread): Remove macro.
1442 (find_inferior, find_inferior_id): Change signature, implement
1443 using find_thread.
1444 (find_inferior_in_random): Change signature, implement using
1445 find_thread_in_random.
1446 (for_each_inferior, for_each_inferior_with_data): Change
1447 signature, implement using for_each_thread.
1448 (add_inferior_to_list, remove_inferior): Remove.
1449 (add_thread, get_first_thread, thread_of_pid,
1450 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1451 (get_first_inferior, one_inferior_p, clear_inferior_list):
1452 Remove.
1453 (clear_inferiors, get_thread_process): Update.
1454 * gdbthread.h: Include <list>.
1455 (struct thread_info) <entry>: Remove field.
1456 <id>: New field.
1457 (all_threads): Change type to std::list<thread_info *>.
1458 (get_first_inferior): Add doc.
1459 (find_thread, for_each_thread, find_thread_in_random): New
1460 functions.
1461 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1462 * linux-arm-low.c (update_registers_callback): Update.
1463 * linux-low.c (second_thread_of_pid_p): Update.
1464 (kill_one_lwp_callback, linux_detach_lwp_callback,
1465 delete_lwp_callback, status_pending_p_callback, same_lwp,
1466 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1467 iterate_over_lwps, not_stopped_callback,
1468 resume_stopped_resumed_lwps, count_events_callback,
1469 select_singlestep_lwp_callback, select_event_lwp_callback,
1470 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1471 suspend_and_send_sigstop_callback, wait_for_sigstop,
1472 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1473 lwp_running, linux_set_resume_request, resume_status_pending_p,
1474 need_step_over_p, start_step_over, linux_resume_one_thread,
1475 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1476 reset_lwp_ptrace_options_callback): Update.
1477 * linux-mips-low.c (update_watch_registers_callback): Update.
1478 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1479 Update.
1480 (free_register_cache_thread_one): Remove.
1481 (regcache_release): Update.
1482 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1483 handle_qxfer_threads_worker): Update.
1484 (handle_query): Update, use list iterator.
1485 (visit_actioned_threads, handle_pending_status,
1486 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1487 clear_pending_status_callback, set_pending_status_callback,
1488 find_status_pending_thread_callback, handle_status,
1489 process_serial_event): Update.
1490 * target.c (thread_search_callback): Update.
1491 * thread-db.c (thread_db_get_tls_address): Update.
1492 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1493 Update.
1494 * win32-i386-low.c (update_debug_registers_callback): Update.
1495 * win32-low.c (delete_thread_info, child_delete_thread,
1496 continue_one_thread, suspend_one_thread,
1497 get_child_debug_event): Adjust.
1498
9179355e
SM
14992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1502 * inferiors.h: Include <list>.
1503 (struct process_info) <entry>: Remove field.
1504 <pid>: New field.
1505 (pid_of): Change macro to function.
1506 (ptid_of, lwpid_of): Remove macro.
1507 (all_processes): Change type to std::list<process_info *>.
1508 (ALL_PROCESSES): Remove macro.
1509 (for_each_process, find_process): New function.
1510 * inferiors.c (all_processes): Change type to
1511 std::list<process_info *>.
1512 (find_thread_process): Adjust.
1513 (add_process): Likewise.
1514 (remove_process): Likewise.
1515 (find_process_pid): Likewise.
1516 (get_first_process): Likewise.
1517 (started_inferior_callback): Remove.
1518 (have_started_inferiors_p): Adjust.
1519 (attached_inferior_callback): Remove.
1520 (have_attached_inferiors_p): Adjust.
1521 * linux-low.c (check_zombie_leaders): Likewise.
1522 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1523 (x86_linux_update_xmltarget): Adjust.
1524 * server.c (handle_query): Likewise.
1525 (gdb_reattached_process): Remove.
1526 (handle_status): Adjust.
1527 (kill_inferior_callback): Likewise.
1528 (detach_or_kill_inferior): Remove.
1529 (print_started_pid): Likewise.
1530 (print_attached_pid): Likewise.
1531 (detach_or_kill_for_exit): Update.
1532 (process_serial_event): Likewise.
1533 * linux-arm-low.c (arm_new_fork): Likewise.
1534
c9cb8905
SM
15352017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1536
1537 * dll.h: Include <list>.
1538 (struct dll_info): Add constructor.
1539 <entry>: Remove field.
1540 (all_dlls): Change type to std::list<dll_info>.
1541 * dll.c: Include <algorithm>.
1542 (get_dll): Remove macro.
1543 (all_dlls): Change type to std::list<dll_info *>.
1544 (free_one_dll): Remove.
1545 (match_dll): Likewise.
1546 (loaded_dll): Adjust.
1547 (unloaded_dll): Adjust to all_dlls type change, use
1548 std::find_if. Inline code from match_dll.
1549 (clear_dlls): Adjust to all_dlls type change.
1550 * server.c (emit_dll_description): Remove.
1551 (handle_qxfer_libraries): Adjust to all_dlls type change,
1552 integrate emit_dll_description's functionality.
1553
04ec7890
SM
15542017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * linux-low.h (struct linux_target_ops) <delete_process>: New
1557 field.
1558 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1559 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1560 (struct linux_target_ops): Add delete_process callback.
1561 * linux-arm-low.c (arm_delete_process): New.
1562 (struct linux_target_ops): Add delete_process callback.
1563 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1564 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1565 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1566 * linux-mips-low.c (mips_linux_delete_process): New.
1567 (struct linux_target_ops): Add delete_process callback.
1568 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1569 * linux-s390-low.c (struct linux_target_ops): Likewise.
1570 * linux-sh-low.c (struct linux_target_ops): Likewise.
1571 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1572 * linux-tile-low.c (struct linux_target_ops): Likewise.
1573 * linux-x86-low.c (x86_linux_delete_process): New.
1574 (struct linux_target_ops): Add delete_process callback.
1575 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1576
466eecee
SM
15772017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1578
1579 * linux-aarch64-low.c (the_low_target): Add thread delete
1580 callback.
1581 * linux-arm-low.c (arm_delete_thread): New function.
1582 (the_low_target): Add thread delete callback.
1583 * linux-bfin-low.c (the_low_target): Likewise.
1584 * linux-crisv32-low.c (the_low_target): Likewise.
1585 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1586 set.
1587 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1588 field.
1589 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1590 * linux-mips-low.c (mips_linux_delete_thread): New function.
1591 (the_low_target): Add thread delete callback.
1592 * linux-ppc-low.c (the_low_target): Likewise.
1593 * linux-s390-low.c (the_low_target): Likewise.
1594 * linux-sh-low.c (the_low_target): Likewise.
1595 * linux-tic6x-low.c (the_low_target): Likewise.
1596 * linux-tile-low.c (the_low_target): Likewise.
1597 * linux-x86-low.c (the_low_target): Likewise.
1598 * linux-xtensa-low.c (the_low_target): Likewise.
1599
b79f7801
YZ
16002017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1601
1602 * win32-low.c: Include "common-inferior.h".
1603
bc3b087d
SDJ
16042017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * inferiors.c (set_inferior_cwd): New function.
1607 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1608 (handle_query): Inform that QSetWorkingDir is supported.
1609 * win32-low.c (create_process): Pass the inferior's cwd to
1610 CreateProcess.
1611
d092c5a2
SDJ
16122017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1613
1614 * inferiors.c (current_inferior_cwd): New global variable.
1615 (get_inferior_cwd): New function.
1616 * inferiors.h (struct process_info) <cwd>: New field.
1617
7da0a886
SDJ
16182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1621 (OBS): Add gdb_tilde_expand.o.
1622
289a6840
SM
16232017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1624
1625 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1626 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1627
256642e8
PA
16282017-09-29 Pedro Alves <palves@redhat.com>
1629
1630 * ax.c (gdb_parse_agent_expr): Constify.
1631 * ax.h (gdb_parse_agent_expr): Constify.
1632 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1633 Constify.
1634 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1635 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1636 * remote-utils.h (read_ptid): Constify.
1637 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1638 (process_point_options, process_serial_event): Constify.
1639 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1640 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1641 (cmd_qtbuffer): Constify.
1642
5b9ca4d4
PA
16432017-09-29 Pedro Alves <palves@redhat.com>
1644
1645 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1646 fails.
1647
94c207e0
PA
16482017-09-29 Pedro Alves <palves@redhat.com>
1649
1650 * linux-low.c (handle_extended_wait): Pass parent thread instead
1651 of process to thread_db_notice_clone.
1652 * linux-low.h (thread_db_notice_clone): Replace parent process
1653 parameter with parent thread parameter.
1654 * thread-db.c (find_one_thread): Add comment.
1655 (thread_db_notice_clone): Replace parent process parameter with
1656 parent thread parameter. Temporarily switch to the parent thread.
1657
75352e28
SDJ
16582017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1659
1660 * gdbthread.h: Include "common-gdbthread.h".
1661 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1662 "if" when validating the ptid.
1663 * remote-utils.c: Include "gdbthread.h".
1664 (prepare_resume_reply): Use "switch_to_thread".
1665 * target.c (done_accessing_memory): Likewise.
1666
ad339634
AA
16672017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1668
1669 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1670 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1671 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1672 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1673 s390x-gs-linux64-ipa.o to ipa_obj.
1674 * linux-s390-low.c (HWCAP_S390_GS): New define.
1675 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1676 New functions.
1677 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1678 (s390_arch_setup): Check for guarded-storage support and choose
1679 appropriate tdesc.
1680 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1681 init_registers_s390x_gs_linux64.
1682 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1683 enum value.
1684 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1685 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1686
cc4d742f
SM
16872017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1688
1689 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1690
f6327dcb
KB
16912017-09-21 Kevin Buettner <kevinb@redhat.com>
1692
1693 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1694 (thread_db_thread_handle): Declare.
1695 * linux-low.c (linux_target_ops): Initialize thread_handle.
1696 * server.c (handle_qxfer_threads_worker): Add support for
1697 "handle" attribute.
1698 * target.h (struct target_ops): Add new function pointer,
1699 thread_handle.
1700 (target_thread_handle): Define.
1701 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1702 field in lwp.
1703 (thread_db_thread_handle): New function.
1704
86299109
KB
17052017-09-21 Kevin Buettner <kevinb@redhat.com>
1706
1707 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1708 * linux-low.h (thread_db_notice_clone): Declare.
1709 * thread-db.c (thread_db_notice_clone): New function.
1710
f557a88a
PA
17112017-09-21 Pedro Alves <palves@redhat.com>
1712
1713 * server.c (gdb_read_memory, handle_status, process_serial_event)
1714 (handle_serial_event, handle_target_event): Adjust to
1715 set_desired_thread prototype change.
1716 * target.c (set_desired_thread): Remove 'use_general' parameter
1717 and adjust.
1718 * target.h (set_desired_thread): Remove 'use_general' parameter.
1719
223ffa71
TT
17202017-09-20 Tom Tromey <tom@tromey.com>
1721
1722 * target.c (target_terminal::terminal_state): Define.
1723 (target_terminal::init): Rename from target_terminal_init.
1724 (target_terminal::inferior): Rename from
1725 target_terminal_inferior.
1726 (target_terminal::ours): Rename from target_terminal_ours.
1727 (target_terminal::ours_for_output, target_terminal::info): New.
1728
04fd3ba9
SM
17292017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1730
1731 * server.c (accumulate_file_name_length): Remove.
1732 (emit_dll_description): Adjust to std::string change.
1733 (handle_qxfer_libraries): Use std::string to hold document.
1734
5e187554
SM
17352017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1736
1737 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1738 return type of xml_escape_text.
1739 * server.c (emit_dll_description): Likewise.
1740
1526853e
SM
17412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1742
1743 * server.c (captured_main): Accept argument for --selftest.
1744 Update run_tests call.
1745 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1746 when registering selftests.
1747
c4dfafab
SDJ
17482017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1749
1750 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1751 instead of "VEC" for "target_desc.reg_defs".
1752 (regcache_cpy): Likewise.
1753 (registers_to_string): Likewise.
1754 (registers_from_string): Likewise.
1755 (find_regno): Likewise.
1756 (supply_regblock): Likewise.
1757 (regcache_raw_read_unsigned): Likewise.
1758 * tdesc.c (init_target_desc): Likewise.
1759 (tdesc_create_reg): Likewise.
1760 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1761 (struct target_desc) <reg_defs>: Convert to "std::vector".
1762 (target_desc): Do not initialize "reg_defs".
1763 (~target_desc): Update code to use "std::vector" instead of "VEC"
1764 for "target_desc.reg_defs".
1765 (operator==): Likewise.
1766
124aceb4
SM
17672017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1768
1769 * inferiors.h (thread_to_gdb_id): Remove.
1770 * inferiors.c (thread_to_gdb_id): Remove.
1771 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1772 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1773 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1774 Likewise.
1775 * nto-low.c (nto_fetch_registers, nto_store_registers,
1776 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1777
96cde54f
SM
17782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1779
1780 * inferiors.h (gdb_id_to_thread_id): Remove.
1781 * inferiors.c (gdb_id_to_thread_id): Remove.
1782 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1783 removal. Move pid declaration closer to where it's used.
1784
e8ca139e
SM
17852017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1786
1787 * server.c (handle_detach): New function.
1788 (process_serial_event): Move code out, call handle_detach.
1789
f8a4e119
SM
17902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * server.c (require_running): Rename to ...
1793 (require_running_or_return): ... this ...
1794 (require_running_or_break): ... and this.
1795 (handle_query, process_serial_event): Adjust.
1796
0eb0a407
SM
17972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1798
1799 * linux-low.c (linux_set_resume_request): Remove unused
1800 variables.
1801
785922a5
SM
18022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1803
1804 * server.c (first_thread_of): Remove.
1805 (process_serial_event): Replace usage of first_thread_of with
1806 find_any_thread_of_pid.
1807 * tracepoint.c (same_process_p): Remove.
1808 (gdb_agent_about_to_close): Replace usage of same_process_p with
1809 find_any_thread_of_pid.
1810 * linux-x86-low.c (same_process_callback): Remove.
1811 (x86_arch_setup_process_callback): Replace usage of
1812 same_process_callback with find_any_thread_of_pid.
1813 * thread-db.c (any_thread_of): Remove.
1814 (switch_to_process): Replace usage of any_thread_of with
1815 find_any_thread_of_pid.
1816 * inferiors.c (thread_pid_matches_callback): Remove.
1817 (find_thread_process): Adjust to use find_any_thread_of_pid.
1818
a059f00c
SDJ
18192017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1820
1821 * regcache.c (get_thread_regcache): Guard calls to "memset"
1822 with "!VEC_empty".
1823
cc397f3a
SDJ
18242017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1825
1826 * linux-low.c (handle_extended_wait): Use
1827 "allocate_target_description" instead of "XNEW".
1828 * linux-x86-low.c (initialize_low_arch): Likewise.
1829
22916b07
YQ
18302017-09-05 Yao Qi <yao.qi@linaro.org>
1831
1832 * configure.srv (srv_i386_regobj): Remove.
1833 (srv_amd64_regobj): Remove.
1834 (srv_regobj): Set it to "" for x86 non-linux targets.
1835 * linux-x86-tdesc.c (i386_linux_read_description):
1836 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1837 (init_registers_i386): Remove the declaration.
1838 (tdesc_i386): Remove the declaration.
1839 (lynx_i386_arch_setup): Call i386_create_target_description.
1840 * nto-x86-low.c: Likewise.
1841 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1842 [!__x86_64__]: include arch/i386.h.
1843 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1844
38602d55
YQ
18452017-09-05 Yao Qi <yao.qi@linaro.org>
1846
1847 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1848 i386/amd64-XXX-linux from it.
1849
44b886ff
YQ
18502017-09-05 Yao Qi <yao.qi@linaro.org>
1851
1852 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1853 false.
1854 (ipa_amd64_linux_regobj): Remove.
1855 (ipa_x32_linux_regobj): Remove.
1856
b4570e4b
YQ
18572017-09-05 Yao Qi <yao.qi@linaro.org>
1858
1859 * Makefile.in (arch-amd64.o): New rule.
1860 * configure.srv: Append arch-amd64.o.
1861 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1862 (get_ipa_tdesc): Call amd64_linux_read_description.
1863 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1864 and init_registers_amd64_XXX.
1865 * linux-x86-low.c (x86_linux_read_description): Call
1866 amd64_linux_read_description.
1867 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1868 (initialize_low_arch): Don't call init_registers_x32_XXX and
1869 init_registers_amd64_XXX.
1870 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1871 and tdesc_amd64_XXX.
1872 [__x86_64__] (amd64_tdesc_test): New function.
1873 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1874 and init_registers_amd64_XXX.
1875 * linux-x86-tdesc.c: Include arch/amd64.h.
1876 (xcr0_to_tdesc_idx): New function.
1877 (i386_linux_read_description): New function.
1878 (amd64_get_ipa_tdesc_idx): New function.
1879 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1880 (amd64_get_ipa_tdesc): Declare.
1881
d1f28ea2
YQ
18822017-09-05 Yao Qi <yao.qi@linaro.org>
1883
1884 * configure.srv (srv_i386_linux_xmlfiles): Remove
1885 i386/i386-XXX-linux.xml from it.
1886
25a93583
YQ
18872017-09-05 Yao Qi <yao.qi@linaro.org>
1888
1889 * configure.srv: Set srv_i386_linux_regobj empty if $development
1890 is false.
1891 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1892 initialize_low_tdesc.
1893 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1894 with #if initialize_low_tdesc.
1895 * linux-x86-tdesc-selftest.c: New file.
1896 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1897
5f035c07
YQ
18982017-09-05 Yao Qi <yao.qi@linaro.org>
1899
1900 * Makefile.in (arch-i386.o): New rule.
1901 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1902 (x86_64-*-linux*): Likewise.
1903 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1904 include arch/i386.h.
1905 (i386_linux_read_description): Remove code and call
1906 i386_create_target_description.
1907 * tdesc.c (allocate_target_description): New function.
1908 * tdesc.h (set_tdesc_architecture): Remove declaration.
1909 (set_tdesc_osabi): Likewise.
1910
0abe8a89
YQ
19112017-09-05 Yao Qi <yao.qi@linaro.org>
1912
1913 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1914 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1915 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1916 .xmltarget.
1917 * server.c (get_features_xml): Call tdesc_get_features_xml.
1918 * tdesc.c (set_tdesc_architecture): New function.
1919 (set_tdesc_osabi): New function.
1920 (tdesc_get_features_xml): New function.
1921 (tdesc_create_feature): Add an argument.
1922 * tdesc.h (struct target_desc) <features>: New field.
1923 <arch, osabi>: New field.
1924 (~target_desc): xfree features, arch, and osabi.
1925 (target_desc::oerator==): Don't compare .xmltarget.
1926 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1927 (set_tdesc_osabi): Likewise.
1928 (tdesc_get_features_xml): Likewise.
1929
0a188386
YQ
19302017-09-05 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-x86-tdesc.c: Include selftest.h.
1933 (i386_tdesc_test): New function.
1934 (initialize_low_tdesc): Call selftests::register_test.
1935 * tdesc.h: Include regdef.h.
1936 (target_desc): Override operator == and !=.
1937
f49ff000
YQ
19382017-09-05 Yao Qi <yao.qi@linaro.org>
1939
1940 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1941 (ipa_obj): Likewise.
1942 * linux-i386-ipa.c: Include common/x86-xstate.h
1943 (get_ipa_tdesc): Call i386_linux_read_description.
1944 (initialize_low_tracepoint): Don't call init_registers_XXX
1945 functions, call initialize_low_tdesc instead.
1946 * linux-x86-low.c (x86_linux_read_description): Call
1947 i386_linux_read_description.
1948 (initialize_low_arch): Don't call init_registers_i386_XXX
1949 functions, call initialize_low_tdesc.
1950 * linux-x86-tdesc.c: New file.
1951 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1952 (i386_get_ipa_tdesc_idx): Declare.
1953 (i386_get_ipa_tdesc): Declare.
1954 (initialize_low_tdesc): Declare.
1955
2b68ef2f
YQ
19562017-09-05 Yao Qi <yao.qi@linaro.org>
1957
1958 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1959 instead of 0.
1960
f7000548
YQ
19612017-09-05 Yao Qi <yao.qi@linaro.org>
1962
1963 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1964 * regcache.c (get_thread_regcache): Use VEC_length.
1965 (init_register_cache): Likewise.
1966 (regcache_cpy): Likewise.
1967 (registers_to_string): Iterate reg_defs via VEC_iterate.
1968 (find_regno): Likewise.
1969 (find_register_by_number): Use VEC_index.
1970 (register_size): Call find_register_by_number.
1971 (register_data): Call find_register_by_number.
1972 (supply_regblock): Use VEC_length.
1973 (regcache_raw_read_unsigned): Likewise.
1974 * tdesc.c (init_target_desc): Iterate reg_defs via
1975 VEC_iterate.
1976 (default_description): Update initializer.
1977 (copy_target_description): Don't update field num_registers.
1978 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1979 <num_registers>: Remove.
1980
50a421ac
SM
19812017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1982
1983 * Makefile.in (.SECONDARY): Define target.
1984
23fdd69e
SM
19852017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1986
1987 * linux-low.c (linux_wait_1): Adjust.
1988 * server.c (queue_stop_reply_callback): Adjust.
1989
0a2dde4a
SDJ
19902017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1991
1992 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1993 QEnvironmentUnset and QEnvironmentReset packets.
1994 (handle_query): Inform remote that QEnvironmentHexEncoded,
1995 QEnvironmentUnset and QEnvironmentReset are supported.
1996
6afd337d
SM
19972017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1998
1999 * inferiors.h (inferior_target_data): Rename to ...
2000 (thread_target_data): ... this.
2001 (inferior_regcache_data): Rename to ...
2002 (thread_regcache_data): ... this.
2003 (set_inferior_regcache_data): Rename to ...
2004 (set_thread_regcache_data): ... this.
2005 * inferiors.c (inferior_target_data): Rename to ...
2006 (thread_target_data): ... this.
2007 (inferior_regcache_data): Rename to ...
2008 (thread_regcache_data): ... this.
2009 (set_inferior_regcache_data): Rename to ...
2010 (set_thread_regcache_data): ... this.
2011 (free_one_thread): Update.
2012 * linux-low.h (get_thread_lwp): Update.
2013 * regcache.c (get_thread_regcache): Update.
2014 (regcache_invalidate_thread): Update.
2015 (free_register_cache_thread): Update.
2016 * win32-i386-low.c (update_debug_registers_callback): Update.
2017 (win32_get_current_dr): Update.
2018 * win32-low.c (thread_rec): Update.
2019 (delete_thread_info): Update.
2020 (continue_one_thread): Update.
2021 (suspend_one_thread): Update.
2022
a160cc46
SM
20232017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2024
2025 * inferiors.c (set_inferior_target_data): Remove.
2026 * inferiors.h (set_inferior_target_data): Remove.
2027
6d580b63
YQ
20282017-08-18 Yao Qi <yao.qi@linaro.org>
2029
2030 * Makefile.in (OBS): Add selftest.o.
2031 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2032 * configure, config.in: Re-generated.
2033 * server.c: Include common/sefltest.h.
2034 (captured_main): Handle option --selftest.
2035
f5a29eb0
YQ
20362017-08-09 Yao Qi <yao.qi@linaro.org>
2037
2038 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2039 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2040 i386-avx-mpx.o and i386-mmx.o.
2041 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2042 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2043 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2044 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2045 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2046 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2047 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2048 i386/amd64-avx-mpx.xml.
2049
57757c2f
YQ
20502017-08-09 Yao Qi <yao.qi@linaro.org>
2051
2052 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2053 and x32-avx-avx512.o.
2054 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2055 i386/x32-avx-avx512.xml.
2056
229d26fc
SM
20572017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2058
2059 * tracepoint.h (enum class fast_tpoint_collect_result): New
2060 enumeration.
2061 (fast_tracepoint_collecting): Change return type to
2062 fast_tpoint_collect_result.
2063 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2064 * linux-low.h: Include tracepoint.h.
2065 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2066 fast_tpoint_collect_result.
2067 * linux-low.c (handle_tracepoints): Adjust.
2068 (linux_fast_tracepoint_collecting): Change return type to
2069 fast_tpoint_collect_result.
2070 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2071 linux_wait_1, stuck_in_jump_pad_callback,
2072 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2073 proceed_one_lwp): Adjust to type change.
2074
2e1e43e1
YQ
20752017-07-10 Yao Qi <yao.qi@linaro.org>
2076
2077 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2078
adc764e7
YQ
20792017-06-29 Yao Qi <yao.qi@linaro.org>
2080
2081 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2082 Remove.
2083 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2084
a206891a
SM
20852017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2086
2087 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2088
9a6c7d9c
SDJ
20892017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2090
2091 * linux-low.c (linux_create_inferior): Adjust code to access the
2092 environment information via 'gdb_environ' class.
2093 * lynx-low.c (lynx_create_inferior): Likewise.
2094 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2095 (get_environ): Return a pointer to 'our_environ'.
2096 (captured_main): Initialize 'our_environ'.
2097 * server.h (get_environ): Adjust prototype.
2098 * spu-low.c (spu_create_inferior): Adjust code to access the
2099 environment information via 'gdb_environ' class.
2100
ae3e2ccf
SM
21012017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2102
2103 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2104 usage of "register" keyword.
2105
3e019bdc
SM
21062017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2107
2108 * configure: Re-generate.
2109
8465943a
SM
21102017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2111
2112 * configure: Re-generate.
2113
cf0dd6f0
SM
21142017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2115
2116 * Makefile.in (COMPILE.pre): Add "-x c++".
2117
9845682b
SDJ
21182017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2119
2120 * fork-child.c: Conditionally include <signal.h>.
2121
aefd8b33
SDJ
21222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2123
2124 * server.c (handle_general_set): Handle new packet
2125 "QStartupWithShell".
2126 (handle_query): Add "QStartupWithShell" to the list of supported
2127 packets.
2128 (gdbserver_usage): Add help text explaining the
2129 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2130 options.
2131 (captured_main): Recognize and act upon the presence of the new
2132 CLI options.
2133
2090129c
SDJ
21342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2135 Pedro Alves <palves@redhat.com>
2136
2137 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2138 * configure: Regenerate.
2139 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2140 "fork-inferior.o".
2141 (i[34567]86-*-lynxos*): Likewise.
2142 (spu*-*-*): Likewise.
2143 * fork-child.c: New file.
2144 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2145 and "environ.h".
2146 (linux_ptrace_fun): New function.
2147 (linux_create_inferior): Adjust function prototype to reflect
2148 change on "target.h". Adjust function code to use
2149 "fork_inferior".
2150 (linux_request_interrupt): Delete "signal_pid".
2151 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2152 (lynx_ptrace_fun): New function.
2153 (lynx_create_inferior): Adjust function prototype to reflect
2154 change on "target.h". Adjust function code to use
2155 "fork_inferior".
2156 * nto-low.c (nto_create_inferior): Adjust function prototype and
2157 code to reflect change on "target.h". Update comments.
2158 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2159 "common-terminal.h" and "environ.h".
2160 (terminal_fd): Moved to fork-child.c.
2161 (old_foreground_pgrp): Likewise.
2162 (restore_old_foreground_pgrp): Likewise.
2163 (last_status): Make it global.
2164 (last_ptid): Likewise.
2165 (our_environ): New variable.
2166 (startup_with_shell): Likewise.
2167 (program_name): Likewise.
2168 (program_argv): Rename to...
2169 (program_args): ...this.
2170 (wrapper_argv): New variable.
2171 (start_inferior): Delete function.
2172 (get_exec_wrapper): New function.
2173 (get_exec_file): Likewise.
2174 (get_environ): Likewise.
2175 (prefork_hook): Likewise.
2176 (post_fork_inferior): Likewise.
2177 (postfork_hook): Likewise.
2178 (postfork_child_hook): Likewise.
2179 (handle_v_run): Update code to deal with arguments coming from the
2180 remote host. Update calls from "start_inferior" to
2181 "create_inferior".
2182 (captured_main): Likewise. Initialize environment variable. Call
2183 "have_job_control".
2184 * server.h (post_fork_inferior): New prototype.
2185 (get_environ): Likewise.
2186 (last_status): Declare.
2187 (last_ptid): Likewise.
2188 (signal_pid): Likewise.
2189 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2190 (spu_ptrace_fun): New function.
2191 (spu_create_inferior): Adjust function prototype to reflect change
2192 on "target.h". Adjust function code to use "fork_inferior".
2193 * target.c (target_terminal_init): New function.
2194 (target_terminal_inferior): Likewise.
2195 (target_terminal_ours): Likewise.
2196 * target.h: Include <vector>.
2197 (struct target_ops) <create_inferior>: Update prototype.
2198 (create_inferior): Update macro.
2199 * utils.c (gdb_flush_out_err): New function.
2200 * win32-low.c (win32_create_inferior): Adjust function prototype
2201 and code to reflect change on "target.h".
2202
043a4934
SDJ
22032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2204
2205 * inferiors.c (switch_to_thread): New function.
2206
15652511
SDJ
22072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2208
2209 * Makefile.in (SFILE): Add "common/job-control.c".
2210 (OBS): Add "job-control.o".
2211
21ea5acd
SDJ
22122017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2213
2214 * Makefile: Remove "@host_makefile_frag@".
2215
e13cb306
PA
22162017-05-05 Pedro Alves <palves@redhat.com>
2217
2218 * configure: Regenerate.
2219
c94fee56
SDJ
22202017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2221
2222 * configure: Regenerate.
2223
a0ff9e1a
SM
22242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2225
2226 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2227 software_single_step change of return type to
2228 std::vector<CORE_ADDR>.
2229 * linux-low.c (install_software_single_step_breakpoints):
2230 Likewise.
2231 * linux-low.h (install_software_single_step_breakpoints):
2232 Likewise.
2233
be628ab8
SDJ
22342017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2235
2236 * remote-utils.c: Include "gdb_termios.h" instead of
2237 "terminal.h".
2238 * terminal.h: Delete file.
2239
7c5ded6a
SDJ
22402017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2241
2242 * server.c: Include <vector>.
2243 <program_argv, wrapper_argv>: Convert to std::vector.
2244 (start_inferior): Rewrite function to use C++.
2245 (handle_v_run): Likewise. Update code that calculates the argv
2246 based on the vRun packet; use C++.
2247 (captured_main): Likewise.
2248
436252de
SM
22492017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2250
2251 * server.c (handle_v_cont): Initialize thread_resume::thread
2252 with null_ptid.
2253
9bf2a700
PA
22542017-04-05 Pedro Alves <palves@redhat.com>
2255
2256 * configure: Regenerate.
2257
a121b7c1
PA
22582017-04-05 Pedro Alves <palves@redhat.com>
2259
2260 * gdbreplay.c (sync_error): Constify.
2261 * linux-x86-low.c (push_opcode): Constify.
2262
21c8a587
PA
22632017-04-05 Pedro Alves <palves@redhat.com>
2264
2265 * win32-low.c (get_child_debug_event)
2266 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2267 Report TARGET_WAITKIND_SPURIOUS instead.
2268
fb32b4f7
PA
22692017-04-05 Pedro Alves <palves@redhat.com>
2270
2271 * remote-utils.c (remote_prepare, remote_open): Constify.
2272 * remote-utils.h (remote_prepare, remote_open): Constify.
2273 * server.c (captured_main): Constify 'port' handling.
2274
65dd1e59
SM
22752017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2276
2277 * Makefile.in (clean): Clear .deps.
2278
8fa5b777
SM
22792017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2280
2281 * .gitignore: Remove generated files, replace with wildcard.
2282 * (clean): Replace removal of generated files with wildcard.
2283 (version.c): Replace with...
2284 (version-generated.c): ...this.
2285 (xml-builtin.c): Replace with...
2286 (xml-builtin-generated.c): ...this.
2287 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2288 (%.c: *regformats*): Replace with...
2289 (%-generated.c: *regformats*): ...this.
2290
a12e714b
MF
22912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2292
2293 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2294 (xtensa_fill_gregset): Call collect_register_by_name for
2295 threadptr register.
2296 (xtensa_store_gregset): Call supply_register_by_name for
2297 threadptr register.
2298
1a09b50a
MF
22992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2300
2301 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2302 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2303 (xtensa_store_gregset): Call supply_register for all registers in
2304 a0_regnum..a0_regnum + C0_NREGS range.
2305
1a01e7c6
SM
23062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2307
2308 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2309 (ax-ipa.o: ax.c): Remove.
2310 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2311 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2312 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2313 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2314 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2315
36bc18a8
SM
23162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2317
2318 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2319 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2320 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2321 (errors-ipa.o: ../common/errors.c): Remove.
2322 (format-ipa.o: ../common/format.c): Remove.
2323 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2324
a8ebe3d5
SM
23252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2326
2327 * Makefile.in (%-ipa.o: %.c): New rule.
2328 (tracepoint-ipa.o: tracepoint.c): Remove.
2329 (utils-ipa.o: utils.c): Remove.
2330 (remote-utils-ipa.o: remote-utils.c): Remove.
2331 (regcache-ipa.o: regcache.c): Remove.
2332 (i386-linux-ipa.o: i386-linux.c): Remove.
2333 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2334 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2335 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2336 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2337 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2338 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2339 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2340 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2341 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2342 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2343 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2344 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2345 (aarch64-ipa.o: aarch64.c): Remove.
2346 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2347 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2348 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2349 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2350 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2351 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2352 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2353 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2354 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2355 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2356 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2357 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2358 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2359 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2360 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2361 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2362 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2363 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2364 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2365 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2366 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2367 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2368 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2369 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2370 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2371 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2372 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2373 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2374 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2375 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2376 (tdesc-ipa.o: tdesc.c): Remove.
2377 (x32-linux-ipa.o: x32-linux.c): Remove.
2378 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2379 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2380
50cfacb7
SM
23812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2382
2383 * Makefile.in (%.o: ../arch/%.c): New rule.
2384 (arm.o: ../arch/arm.c): Remove.
2385 (arm-linux.o: ../arch/arm-linux.c): Remove.
2386 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2387 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2388
c5a22423
SM
23892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2390
2391 * Makefile.in (%.o: ../nat/%.c): New rule.
2392 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2393 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2394 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2395 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2396 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2397 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2398 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2399 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2400 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2401 (linux-personality.o: ../nat/linux-personality.c): Remove.
2402 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2403 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2404 (x86-linux.o: ../nat/x86-linux.c): Remove.
2405 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2406 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2407
6bda016b
SM
24082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2409
2410 * Makefile.in (%.o: ../common/%.c): New rule.
2411 (signals.o: ../common/signals.c): Remove.
2412 (print-utils.o: ../common/print-utils.c): Remove.
2413 (rsp-low.o: ../common/rsp-low.c): Remove.
2414 (common-utils.o: ../common/common-utils.c): Remove.
2415 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2416 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2417 (vec.o: ../common/vec.c): Remove.
2418 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2419 (xml-utils.o: ../common/xml-utils.c): Remove.
2420 (ptid.o: ../common/ptid.c): Remove.
2421 (buffer.o: ../common/buffer.c): Remove.
2422 (format.o: ../common/format.c): Remove.
2423 (filestuff.o: ../common/filestuff.c): Remove.
2424 (agent.o: ../common/agent.c): Remove.
2425 (errors.o: ../common/errors.c): Remove.
2426 (environ.o: ../common/environ.c): Remove.
2427 (common-debug.o: ../common/common-debug.c): Remove.
2428 (cleanups.o: ../common/cleanups.c): Remove.
2429 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2430 (fileio.o: ../common/fileio.c): Remove.
2431 (common-regcache.o: ../common/common-regcache.c): Remove.
2432 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2433 (new-op.o: ../common/new-op.c): Remove.
2434 (btrace-common.o: ../common/btrace-common.c): Remove.
2435
21122961
SM
24362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2437
2438 * Makefile.in (%.o: ../target/%.c): New rule.
2439 (waitstatus.o: ../target/waitstatus.c): Remove.
2440
c362e621
SM
24412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2442
2443 * Makefile.in
2444 (%.c: ../regformats/%.dat,
2445 (%.c: ../regformats/arm/%.dat,
2446 (%.c: ../regformats/i386/%.dat,
2447 (%.c: ../regformats/rs6000/%.dat): New rules.
2448 (aarch64.c): Remove.
2449 (reg-arm.c): Remove.
2450 (arm-with-iwmmxt.c): Remove.
2451 (arm-with-vfpv2.c): Remove.
2452 (arm-with-vfpv3.c): Remove.
2453 (arm-with-neon.c): Remove.
2454 (reg-bfin.c): Remove.
2455 (reg-cris.c): Remove.
2456 (reg-crisv32.c): Remove.
2457 (i386.c): Remove.
2458 (i386-linux.c): Remove.
2459 (i386-avx.c): Remove.
2460 (i386-avx-linux.c): Remove.
2461 (i386-avx-avx512.c): Remove.
2462 (i386-avx-avx512-linux.c): Remove.
2463 (i386-mpx.c): Remove.
2464 (i386-mpx-linux.c): Remove.
2465 (i386-avx-mpx-avx512-pku.c): Remove.
2466 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2467 (i386-avx-mpx.c): Remove.
2468 (i386-avx-mpx-linux.c): Remove.
2469 (i386-mmx.c): Remove.
2470 (i386-mmx-linux.c): Remove.
2471 (reg-ia64.c): Remove.
2472 (reg-m32r.c): Remove.
2473 (reg-m68k.c): Remove.
2474 (reg-cf.c): Remove.
2475 (mips-linux.c): Remove.
2476 (mips-dsp-linux.c): Remove.
2477 (mips64-linux.c): Remove.
2478 (mips64-dsp-linux.c): Remove.
2479 (nios2-linux.c): Remove.
2480 (powerpc-32.c): Remove.
2481 (powerpc-32l.c): Remove.
2482 (powerpc-altivec32l.c): Remove.
2483 (powerpc-cell32l.c): Remove.
2484 (powerpc-vsx32l.c): Remove.
2485 (powerpc-isa205-32l.c): Remove.
2486 (powerpc-isa205-altivec32l.c): Remove.
2487 (powerpc-isa205-vsx32l.c): Remove.
2488 (powerpc-e500l.c): Remove.
2489 (powerpc-64l.c): Remove.
2490 (powerpc-altivec64l.c): Remove.
2491 (powerpc-cell64l.c): Remove.
2492 (powerpc-vsx64l.c): Remove.
2493 (powerpc-isa205-64l.c): Remove.
2494 (powerpc-isa205-altivec64l.c): Remove.
2495 (powerpc-isa205-vsx64l.c): Remove.
2496 (s390-linux32.c): Remove.
2497 (s390-linux32v1.c): Remove.
2498 (s390-linux32v2.c): Remove.
2499 (s390-linux64.c): Remove.
2500 (s390-linux64v1.c): Remove.
2501 (s390-linux64v2.c): Remove.
2502 (s390-te-linux64.c): Remove.
2503 (s390-vx-linux64.c): Remove.
2504 (s390-tevx-linux64.c): Remove.
2505 (s390x-linux64.c): Remove.
2506 (s390x-linux64v1.c): Remove.
2507 (s390x-linux64v2.c): Remove.
2508 (s390x-te-linux64.c): Remove.
2509 (s390x-vx-linux64.c): Remove.
2510 (s390x-tevx-linux64.c): Remove.
2511 (tic6x-c64xp-linux.c): Remove.
2512 (tic6x-c64x-linux.c): Remove.
2513 (tic6x-c62x-linux.c): Remove.
2514 (reg-sh.c): Remove.
2515 (reg-sparc64.c): Remove.
2516 (reg-spu.c): Remove.
2517 (amd64.c): Remove.
2518 (amd64-linux.c): Remove.
2519 (amd64-avx.c): Remove.
2520 (amd64-avx-linux.c): Remove.
2521 (amd64-avx-avx512.c): Remove.
2522 (amd64-avx-avx512-linux.c): Remove.
2523 (amd64-mpx.c): Remove.
2524 (amd64-mpx-linux.c): Remove.
2525 (amd64-avx-mpx-avx512-pku.c): Remove.
2526 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2527 (amd64-avx-mpx.c): Remove.
2528 (amd64-avx-mpx-linux.c): Remove.
2529 (x32.c): Remove.
2530 (x32-linux.c): Remove.
2531 (x32-avx.c): Remove.
2532 (x32-avx-linux.c): Remove.
2533 (x32-avx-avx512.c): Remove.
2534 (x32-avx-avx512-linux.c): Remove.
2535 (reg-xtensa.c): Remove.
2536 (reg-tilegx.c): Remove.
2537 (reg-tilegx32.c): Remove.
2538
1672e0d9
SDJ
25392017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2540
2541 * Makefile.in (SFILES): Add "common/environ.c".
2542 (OBJS): Add "common/environ.h".
2543
239b6d10
WT
25442017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2545
2546 * configure.ac: Check if the fs_base and gs_base members of
2547 `struct user_regs_struct' exist.
2548 * config.in: Regenerated.
2549 * configure: Likewise.
2550
694b382c
AT
25512017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2552
2553 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2554 target_read_memory.
2555 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2556 (get_next_pcs_syscall_next_pc): Likewise.
2557
7dc53023
LM
25582016-12-23 Luis Machado <lgustavo@codesourcery.com>
2559
2560 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2561 * nto-x86-low.c: Likewise.
2562
ad02e4fe
SM
25632016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2564
2565 * Makefile.in: Include disable-implicit-rules.mk.
2566
dcb07cfa
PA
25672016-11-23 Pedro Alves <palves@redhat.com>
2568
2569 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2570 (debug_vprintf): Use std::chrono::steady_clock instead of
2571 gettimeofday. Use '.' instead of ':'.
2572 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2573 (get_timestamp): Use std::chrono::steady_clock instead of
2574 gettimeofday.
2575
8629c02c
SM
25762016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2577
2578 * Makefile.in: Fix whitespace formatting.
2579
b593ecca
SM
25802016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2581
2582 * Makefile.in (SFILES, OBS): Flatten list and order
2583 alphabetically.
2584
9986ba08
PA
25852016-11-23 Pedro Alves <palves@redhat.com>
2586
2587 * event-loop.c (handle_file_event): Use warning.
2588 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2589 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2590 Use warning.
2591
4eefa7bc
PA
25922016-11-23 Pedro Alves <palves@redhat.com>
2593
2594 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2595 output.
2596 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2597 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2598 debug_printf and debug_flush for debug output.
2599 * server.c (handle_general_set): Likewise.
2600 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2601 output.
2602
5443506e
SM
26032016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2604
2605 * Makefile.in (.c.o): Replace rule with ...
2606 (%.o: %.c): ... this one.
2607
3b165252
SM
26082016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2609
2610 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2611 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2612 make.
2613 * configure.ac: Remove checks for the make program.
2614 * configure: Re-generate.
2615
0bcda685
PA
26162016-10-28 Pedro Alves <palves@redhat.com>
2617
2618 * Makefile.in (CXX_DIALECT): Get from configure.
2619 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2620 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2621 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2622 * config.in: Regenerate.
2623 * configure: Regenerate.
2624
c3805894
YQ
26252016-10-27 Yao Qi <yao.qi@linaro.org>
2626
2627 * linux-low.c (linux_supports_range_stepping): Return true if
2628 can_software_single_step return true.
2629
89342618
YQ
26302016-10-27 Yao Qi <yao.qi@linaro.org>
2631
2632 * inferiors.c (find_inferior_in_random): New function.
2633 * inferiors.h (find_inferior_in_random): Declare.
2634 * linux-low.c (linux_wait_for_event_filtered): Call
2635 find_inferior_in_random instead of find_inferior.
2636
e3652c84
YQ
26372016-10-27 Yao Qi <yao.qi@linaro.org>
2638
2639 * linux-low.c (linux_wait_1): If single-step breakpoints are
2640 inserted, remove them.
2641
5a04c4cf
PA
26422016-10-26 Pedro Alves <palves@redhat.com>
2643
2644 * linux-low.c (handle_extended_wait): Link parent/child fork
2645 threads.
2646 (linux_wait_1): Unlink them.
2647 (linux_set_resume_request): Ignore resume requests for
2648 already-resumed and unhandled fork child threads.
2649 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2650 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2651 New functions.
2652 (handle_v_requests) <vCont>: Don't call require_running.
2653 * server.h (in_queued_stop_replies): New declaration.
2654
cb93dc7f
YQ
26552016-10-24 Yao Qi <yao.qi@linaro.org>
2656
2657 PR server/20733
2658 * linux-aarch64-low.c (append_insns): Cast the return value to
2659 'uint32_t *'.
2660
a1078bea
YQ
26612016-10-10 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2664
1fb77080
SDJ
26652016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2666
2667 * target.c (target_supports_multi_process): New function, moved
2668 from...
2669 * target.h (target_supports_multi_process): ... here. Remove
2670 macro.
2671
39b5a3b9
TT
26722016-10-05 Tom Tromey <tom@tromey.com>
2673
2674 PR remote/20655:
2675 * tracepoint.c (handle_tracepoint_bkpts): Check
2676 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2677
c1d0b70a
YQ
26782016-10-05 Yao Qi <yao.qi@linaro.org>
2679
2680 * configure.srv: Update the path of arm-*.xml files.
2681
0a69eedb
YQ
26822016-10-05 Terry Guo <terry.guo@arm.com>
2683 Yao Qi <yao.qi@linaro.org>
2684
2685 * Makefile.in: Adjust the path of rules.
2686 * configure.srv: Update the path of xml files.
2687 * regformats/arm-with-iwmmxt.dat: Regenerated.
2688 * regformats/arm-with-neon.dat: Likewise.
2689 * regformats/arm-with-vfpv2.dat: Likewise.
2690 * regformats/arm-with-vfpv3.dat Likewise.
2691
17e16485
YQ
26922016-09-30 Yao Qi <yao.qi@linaro.org>
2693
2694 PR gdbserver/20627
2695 * target.c (target_stop_and_wait): Don't call
2696 target_continue_no_signal, use resume_stop instead.
2697
edeeb602
YQ
26982016-09-26 Yao Qi <yao.qi@linaro.org>
2699
2700 * linux-low.c (linux_wait_1): Call debug_exit.
2701
503b1c39
PA
27022016-09-23 Pedro Alves <palves@redhat.com>
2703
2704 * Makefile.in (SFILES): Add common/new-op.c.
2705 (OBS): Add common/new-op.o.
2706 (new-op.o): New rule.
2707
74172ecf
SM
27082016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2709
2710 * .gitinore: Ignore more files.
2711
fc6cda2e
YQ
27122016-09-21 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2715 23.
2716
bc1e6c81
SDJ
27172016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2718
2719 * server.c (start_inferior): Call target_mourn_inferior instead of
2720 mourn_inferior; pass ptid_t argument to it.
2721 (resume): Likewise.
2722 (handle_target_event): Likewise.
2723 * target.c (target_mourn_inferior): New function.
2724 * target.h (mourn_inferior): Delete macro.
2725
0e00e962
AA
27262016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2727
2728 * linux-low.c (lwp_is_stepping): New function.
2729
1d8cb77d
CL
27302016-09-06 Carl Love <cel@us.ibm.com>
2731
2732 * server.c (start_inferior): Fixed comment, requested comment change
2733 didn't get updated correctly. Removed reference to ptrace () call as
2734 it is only true on Linux systems.
2735
7313bced
CL
27362016-09-06 Carl Love <cel@us.ibm.com>
2737
2738 * server.c (start_inferior): Do not call
2739 function target_post_create_inferior () if the
2740 inferior process has already exited.
2741
cf6de44d
PA
27422016-09-05 Pedro Alves <palves@redhat.com>
2743
2744 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2745 (COMPILE.pre, CC_LD): Use CXX directly.
2746 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2747 * acinclude.m4: Don't include build-with-cxx.m4.
2748 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2749 * configure: Regenerate.
2750
c1da6748
AT
27512016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2752
2753 PR gdb/19495
2754 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2755 call writing data to own_buf.
2756
f2b9e3df
SDJ
27572016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2758
2759 * target.c (mywait): Call target_wait instead of
2760 the_target->wait.
2761 (target_wait): New function.
2762
049a8570
SDJ
27632016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2764
2765 * server.c (start_inferior): New variable 'ptid'. Replace calls
2766 to the_target->resume by target_continue{,_no_signal}, depending
2767 on the case.
2768 * target.c (target_stop_and_wait): Call target_continue_no_signal
2769 instead of the_target->resume.
2770 (target_continue): New function.
2771
3aa5cfa0
AT
27722016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2773
2774 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2775
754653a7
AZ
27762016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2777
2778 PR server/20491
2779 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2780 ps_prochandle.
2781 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2782 * linux-arm-low.c (ps_get_thread_area): Likewise.
2783 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2784 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2785 * linux-mips-low.c (ps_get_thread_area): Likewise.
2786 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2787 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2788 * linux-x86-low.c (ps_get_thread_area): Likewise.
2789 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2790
ed036b40
PA
27912016-08-19 Pedro Alves <palves@redhat.com>
2792
2793 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2794
c8ef42ee
PA
27952016-08-19 Pedro Alves <palves@redhat.com>
2796
2797 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2798 comment. Use memcpy instead of casting through unsigned long.
2799
9c235a72
PA
28002016-08-19 Pedro Alves <palves@redhat.com>
2801
2802 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2803 allocating around 0x80000000.
2804
201506da
PA
28052016-08-19 Pedro Alves <palves@redhat.com>
2806
2807 PR gdb/20415
2808 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2809 (x32-avx512-linux-ipa.o): New rules.
2810 * configure.ac (x86_64-*-linux*): New x32 check.
2811 * configure.srv (ipa_x32_linux_regobj): New.
2812 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2813 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2814 descriptions.
2815 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2816 descriptions.
2817 * configure: Regenerate.
2818
f348d89a
PA
28192016-08-09 Pedro Alves <palves@redhat.com>
2820
2821 PR gdb/18653
2822 * Makefile.in (OBS): Add signals-state-save-restore.o.
2823 (signals-state-save-restore.o): New rule.
2824 * config.in: Regenerate.
2825 * configure: Regenerate.
2826 * linux-low.c: Include "signals-state-save-restore.h".
2827 (linux_create_inferior): Call
2828 restore_original_signals_state.
2829 * server.c: Include "dispositions-save-restore.h".
2830 (captured_main): Call save_original_signals_state.
2831
1baf5149
PA
28322016-08-05 Pedro Alves <palves@redhat.com>
2833
2834 * configure: Regenerate.
2835
fcd4a73d
YQ
28362016-08-04 Yao Qi <yao.qi@linaro.org>
2837
2838 * linux-low.c (regsets_fetch_inferior_registers): Check
2839 errno is ESRCH or not.
2840
979659d0
YQ
28412016-08-02 Yao Qi <yao.qi@linaro.org>
2842
2843 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2844 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2845 (thread_db_load_search): Update.
2846 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2847 td_ta_set_event and td_ta_event_getmsg.
2848
6598661d
PA
28492016-07-26 Pedro Alves <palves@redhat.com>
2850
2851 PR server/20414
2852 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2853 of unsigned long for 64-bit registers and use uint32_t instead of
2854 unsigned int for 32-bit registers.
2855
9cf12d57
PA
28562016-07-26 Pedro Alves <palves@redhat.com>
2857
2858 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2859 to 'ptrace'.
2860
305450ed
TT
28612016-07-21 Tom Tromey <tom@tromey.com>
2862
2863 * configure: Rebuild.
2864
2583da7c
YQ
28652016-07-21 Yao Qi <yao.qi@linaro.org>
2866
2867 * mem-break.c (find_gdb_breakpoint): Cast bp to
2868 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2869
21536b36
YQ
28702016-07-21 Yao Qi <yao.qi@linaro.org>
2871
2872 * server.c (handle_v_requests): Support s and S actions
2873 if target_supports_software_single_step return true.
2874
8901d193
YQ
28752016-07-21 Yao Qi <yao.qi@linaro.org>
2876
2877 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2878 is resume_step, call maybe_hw_step.
2879 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2880 and unstop them.
2881 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2882 breakpoints or not.
2883 (proceed_one_lwp): If resume request is resume_step, install
2884 reinsert breakpoints and call maybe_hw_step.
2885
0e9a339e
YQ
28862016-07-21 Yao Qi <yao.qi@linaro.org>
2887
2888 * linux-low.c (proceed_one_lwp): Declare.
2889 (linux_resume_one_thread): Remove local variable 'step'.
2890 Lift code enqueue signal. Call proceed_one_lwp instead of
2891 linux_resume_one_lwp.
2892
4281b351
YQ
28932016-07-21 Yao Qi <yao.qi@linaro.org>
2894
2895 * linux-low.c (linux_resume_one_thread): Call
2896 enqueue_pending_signal.
2897
984a2c04
YQ
28982016-07-21 Yao Qi <yao.qi@linaro.org>
2899
2900 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2901 * inferiors.c (do_restore_current_thread_cleanup): New function.
2902 (make_cleanup_restore_current_thread): Likewise.
2903 * linux-low.c (install_software_single_step_breakpoints): Call
2904 make_cleanup_restore_current_thread. Switch current_thread to
2905 thread.
2906
bec903c9
YQ
29072016-07-21 Yao Qi <yao.qi@linaro.org>
2908
2909 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2910 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2911 (clone_one_breakpoint): Likewise.
2912 (delete_reinsert_breakpoints): Change parameter to thread.
2913 Callers updated.
2914 (has_reinsert_breakpoints): Likewise.
2915 (uninsert_reinsert_breakpoints): Likewise.
2916 (reinsert_reinsert_breakpoints): Likewise.
2917 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2918 (delete_reinsert_breakpoints): Likewise.
2919 (reinsert_reinsert_breakpoints): Likewise.
2920 (uninsert_reinsert_breakpoints): Likewise.
2921 (has_reinsert_breakpoints): Likewise.
2922
63c40ec7
YQ
29232016-07-21 Yao Qi <yao.qi@linaro.org>
2924
2925 * inferiors.c (get_thread_process): Make parameter const.
2926 * inferiors.h (get_thread_process): Update declaration.
2927 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2928 Add new parameters child_thread and parent_thread. Callers
2929 updated.
2930 * mem-break.h (clone_all_breakpoints): Update declaration.
2931
9aa76cd0
YQ
29322016-07-21 Yao Qi <yao.qi@linaro.org>
2933
2934 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2935 <command_list, handler>: Remove.
2936 (struct gdb_breakpoint): New.
2937 (struct other_breakpoint): New.
2938 (struct reinsert_breakpoint): New.
2939 (is_gdb_breakpoint): New function.
2940 (any_persistent_commands): Update command_list if
2941 is_gdb_breakpoint returns true.
2942 (set_breakpoint): Create breakpoints according to their types.
2943 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2944 (set_gdb_breakpoint_1): Likewise.
2945 (set_gdb_breakpoint): Likewise.
2946 (clear_breakpoint_conditions): Change parameter type to
2947 'struct gdb_breakpoint *'.
2948 (clear_breakpoint_commands): Likewise.
2949 (clear_breakpoint_conditions_and_commands): Likewise.
2950 (add_condition_to_breakpoint): Likewise.
2951 (add_breakpoint_condition): Likewise.
2952 (add_commands_to_breakpoint): Likewise.
2953 (check_breakpoints): Check other_breakpoint.
2954 (clone_one_breakpoint): Clone breakpopint according to its type.
2955 * mem-break.h (struct gdb_breakpoint): Declare.
2956 (set_gdb_breakpoint): Update declaration.
2957 (clear_breakpoint_conditions_and_commands): Likewise.
2958 (add_breakpoint_condition): Likewise.
2959 (add_breakpoint_commands): Likewise.
2960 * server.c (process_point_options): Change parameter type to
2961 'struct gdb_breakpoint *'.
2962
811f8301
YQ
29632016-07-21 Yao Qi <yao.qi@linaro.org>
2964
2965 * mem-break.c (set_breakpoint_at): Rename it to ...
2966 (set_breakpoint_type_at): ... it.
2967 (set_breakpoint_at): Call set_breakpoint_type_at.
2968 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2969 * mem-break.h (set_breakpoint_at): Update comments.
2970
b1c51e36
CLT
29712016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2972
2973 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2974 to buf parameter.
2975 (nios2_store_gregset): Likewise.
2976
ced2dffb
PA
29772016-07-01 Pedro Alves <palves@redhat.com>
2978 Antoine Tremblay <antoine.tremblay@ericsson.com>
2979
2980 * linux-low.c: Change interface to take the target lwp_info
2981 pointer directly and return void. Handle detaching from a zombie
2982 thread.
2983 (linux_detach_lwp_callback): New function.
2984 (linux_detach): Detach from the leader thread after detaching from
2985 the clone threads.
2986
2ac09a5b
YQ
29872016-06-28 Yao Qi <yao.qi@linaro.org>
2988
2989 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2990 for variable new_offset.
2991 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2992 (aarch64_ftrace_insn_reloc_cb): Likewise.
2993 (aarch64_ftrace_insn_reloc_tb): Likewise.
2994 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2995 PRIx64 instead of PRIx32.
2996
79e7fd4f
YQ
29972016-06-28 Yao Qi <yao.qi@linaro.org>
2998
2999 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3000 (the_low_target): Install arm_get_syscall_trapinfo.
3001
061fc021
YQ
30022016-06-28 Yao Qi <yao.qi@linaro.org>
3003
3004 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3005 function.
3006 (the_low_target): Install aarch64_get_syscall_trapinfo.
3007
4cc32bec
YQ
30082016-06-28 Yao Qi <yao.qi@linaro.org>
3009
3010 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3011 Callers updated.
3012 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3013 Remove parameter sysno.
3014 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3015 sysret.
3016
782c1122
AA
30172016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3018
3019 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3020 (s390_emit_ne_goto): Likewise.
3021 (s390_emit_lt_goto): Likewise.
3022 (s390_emit_le_goto): Likewise.
3023 (s390_emit_gt_goto): Likewise.
3024 (s390_emit_ge_goto): Likewise.
3025 (s390x_emit_eq_goto): Likewise.
3026 (s390x_emit_ne_goto): Likewise.
3027 (s390x_emit_lt_goto): Likewise.
3028 (s390x_emit_le_goto): Likewise.
3029 (s390x_emit_gt_goto): Likewise.
3030 (s390x_emit_ge_goto): Likewise.
3031 (s390_emit_ops_impl): Mark variable static.
3032 (s390x_emit_ops): Likewise.
3033
2e7b624b
YQ
30342016-06-17 Yao Qi <yao.qi@linaro.org>
3035
3036 * linux-low.c (handle_extended_wait): Call
3037 uninsert_reinsert_breakpoints for the parent process. Remove
3038 reinsert breakpoints from the child process. Reinsert them to
3039 the parent process when vfork is done.
3040 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3041 (reinsert_reinsert_breakpoints): New function.
3042 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3043 (reinsert_reinsert_breakpoints): Declare.
3044
8a81c5d7
YQ
30452016-06-17 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-low.c (handle_extended_wait): If the parent is doing
3048 step-over, remove the reinsert breakpoints from the forked child.
3049
f50bf8e5
YQ
30502016-06-17 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-low.c (unsuspend_all_lwps): Declare.
3053 (linux_low_filter_event): If thread exited, call finish_step_over.
3054 If step-over is finished, unsuspend other threads.
3055
8376a3cb
YQ
30562016-06-17 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-low.c (linux_resume_one_lwp_throw): Assert
3059 has_reinsert_breakpoints returns false.
3060 * mem-break.c (delete_disabled_breakpoints): Assert
3061 bp type isn't reinsert_breakpoint.
3062
f79b145d
YQ
30632016-06-17 Yao Qi <yao.qi@linaro.org>
3064
3065 * linux-low.c (maybe_hw_step): New function.
3066 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3067 (finish_step_over): Switch current_thread to lwp temporarily,
3068 and assert has_reinsert_breakpoints returns true.
3069 (proceed_one_lwp): Call maybe_hw_step.
3070 * mem-break.c (has_reinsert_breakpoints): New function.
3071 * mem-break.h (has_reinsert_breakpoints): Declare.
3072
0ae534d2
JT
30732016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3074
3075 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3076
fcdad592
YQ
30772016-05-17 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3080 instead of find_inferior.
3081
9e784964
YQ
30822016-05-05 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3085 Initialize res to zero.
3086
cf2ebb6e
YQ
30872016-05-05 Yao Qi <yao.qi@linaro.org>
3088
3089 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3090 to uint32_t.
3091
c1aebf87
UW
30922016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3093
3094 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3095 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3096 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3097
35fd2deb 30982016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3099 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3100
3101 * tracepoint.c (write_inferior_int8): New function.
3102 (cmd_qtenable_disable): Write enable flag using
3103 write_inferior_int8.
3104
484b3c32
YQ
31052016-04-25 Yao Qi <yao.qi@linaro.org>
3106
3107 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3108 (need_step_over_p): Return zero if the LWP has pending signals
3109 can be delivered on software single step target.
3110
85ba7d86
YQ
31112016-04-25 Yao Qi <yao.qi@linaro.org>
3112
3113 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3114 return instead of error.
3115
3539aa13
YQ
31162016-04-22 Yao Qi <yao.qi@linaro.org>
3117
3118 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3119 to 23.
3120
5b061e98
YQ
31212016-04-22 Yao Qi <yao.qi@linaro.org>
3122
3123 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3124 signal when stepping over breakpoint with software single
3125 step.
3126
3451269c
PA
31272016-04-21 Pedro Alves <palves@redhat.com>
3128
3129 * linux-s390-low.c (s390_collect_ptrace_register)
3130 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3131 add casts.
3132 (s390_check_regset): Use void * instead of gdb_byte *.
3133
a2358508
PA
31342016-04-20 Pedro Alves <palves@redhat.com>
3135
3136 * configure: Renegerate.
3137
6885166d
YQ
31382016-04-20 Yao Qi <yao.qi@linaro.org>
3139
3140 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3141 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3142 number 16.
3143 (arm_store_gregset): Likewise.
3144
2b863f51
WT
31452016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3146
3147 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3148 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3149 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3150 (amd64-avx-mpx-linux.c): New rules.
3151 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3152 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3153 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3154 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3155 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3156 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3157 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3158 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3159 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3160 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3161 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3162 * linux-x86-low.c (x86_linux_read_description): Add case for
3163 X86_XSTATE_AVX_MPX_MASK.
3164 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3165 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3166 init_registers_i386_avx_mpx_linux.
3167 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3168 (initialize_low_tracepoint): Call
3169 init_registers_i386_avx_mpx_linux.
3170 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3171 (initialize_low_tracepoint): Call
3172 init_registers_amd64_avx_mpx_linux.
3173 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3174 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3175 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3176 declarations.
3177
9b30624b
PA
31782016-04-18 Pedro Alves <palves@redhat.com>
3179
3180 * configure: Regenerate.
3181
45e3745e
AT
31822016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3183
3184 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3185 (aarch64_emit_sub): Likewise.
3186
2afc13ff
PA
31872016-04-12 Pedro Alves <palves@redhat.com>
3188
3189 * utils.c (prepare_to_throw_exception): Delete.
3190
6e774b13
SM
31912016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3192
3193 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3194
4dca19f8
MK
31952016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3196
3197 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3198
d0a9981f
MK
31992016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3200
3201 * linux-aarch64-ipa.c: Add <elf.h> include.
3202 * linux-ppc-ipa.c: Add <elf.h> include.
3203 * linux-s390-ipa.c: Add <elf.h> include.
3204
252db07e
MK
32052016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3206
3207 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3208 (get_raw_reg_ptr): Likewise.
3209 (get_trace_state_variable_value_ptr): Likewise.
3210 (set_trace_state_variable_value_ptr): Likewise.
3211 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3212 char *.
3213
14e2b6d9
MK
32142016-03-31 Wei-cheng Wang <cole945@gmail.com>
3215 Marcin Kościelnicki <koriakin@0x04.net>
3216
3217 PR/17221
3218 * linux-ppc-low.c (emit_insns): New function.
3219 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3220 (ppc_emit_prologue): New function.
3221 (ppc_emit_epilogue): New function.
3222 (ppc_emit_add): New function.
3223 (ppc_emit_sub): New function.
3224 (ppc_emit_mul): New function.
3225 (ppc_emit_lsh): New function.
3226 (ppc_emit_rsh_signed): New function.
3227 (ppc_emit_rsh_unsigned): New function.
3228 (ppc_emit_ext): New function.
3229 (ppc_emit_zero_ext): New function.
3230 (ppc_emit_log_not): New function.
3231 (ppc_emit_bit_and): New function.
3232 (ppc_emit_bit_or): New function.
3233 (ppc_emit_bit_xor): New function.
3234 (ppc_emit_bit_not): New function.
3235 (ppc_emit_equal): New function.
3236 (ppc_emit_less_signed): New function.
3237 (ppc_emit_less_unsigned): New function.
3238 (ppc_emit_ref): New function.
3239 (ppc_emit_const): New function.
3240 (ppc_emit_reg): New function.
3241 (ppc_emit_pop): New function.
3242 (ppc_emit_stack_flush): New function.
3243 (ppc_emit_swap): New function.
3244 (ppc_emit_stack_adjust): New function.
3245 (ppc_emit_call): New function.
3246 (ppc_emit_int_call_1): New function.
3247 (ppc_emit_void_call_2): New function.
3248 (ppc_emit_if_goto): New function.
3249 (ppc_emit_goto): New function.
3250 (ppc_emit_eq_goto): New function.
3251 (ppc_emit_ne_goto): New function.
3252 (ppc_emit_lt_goto): New function.
3253 (ppc_emit_le_goto): New function.
3254 (ppc_emit_gt_goto): New function.
3255 (ppc_emit_ge_goto): New function.
3256 (ppc_write_goto_address): New function.
3257 (ppc_emit_ops_impl): New static variable.
3258 (ppc64v1_emit_prologue): New function.
3259 (ppc64v2_emit_prologue): New function.
3260 (ppc64_emit_epilogue): New function.
3261 (ppc64_emit_add): New function.
3262 (ppc64_emit_sub): New function.
3263 (ppc64_emit_mul): New function.
3264 (ppc64_emit_lsh): New function.
3265 (ppc64_emit_rsh_signed): New function.
3266 (ppc64_emit_rsh_unsigned): New function.
3267 (ppc64_emit_ext): New function.
3268 (ppc64_emit_zero_ext): New function.
3269 (ppc64_emit_log_not): New function.
3270 (ppc64_emit_bit_and): New function.
3271 (ppc64_emit_bit_or): New function.
3272 (ppc64_emit_bit_xor): New function.
3273 (ppc64_emit_bit_not): New function.
3274 (ppc64_emit_equal): New function.
3275 (ppc64_emit_less_signed): New function.
3276 (ppc64_emit_less_unsigned): New function.
3277 (ppc64_emit_ref): New function.
3278 (ppc64_emit_const): New function.
3279 (ppc64v1_emit_reg): New function.
3280 (ppc64v2_emit_reg): New function.
3281 (ppc64_emit_pop): New function.
3282 (ppc64_emit_stack_flush): New function.
3283 (ppc64_emit_swap): New function.
3284 (ppc64v1_emit_call): New function.
3285 (ppc64v2_emit_call): New function.
3286 (ppc64v1_emit_int_call_1): New function.
3287 (ppc64v2_emit_int_call_1): New function.
3288 (ppc64v1_emit_void_call_2): New function.
3289 (ppc64v2_emit_void_call_2): New function.
3290 (ppc64_emit_if_goto): New function.
3291 (ppc64_emit_eq_goto): New function.
3292 (ppc64_emit_ne_goto): New function.
3293 (ppc64_emit_lt_goto): New function.
3294 (ppc64_emit_le_goto): New function.
3295 (ppc64_emit_gt_goto): New function.
3296 (ppc64_emit_ge_goto): New function.
3297 (ppc64v1_emit_ops_impl): New static variable.
3298 (ppc64v2_emit_ops_impl): New static variable.
3299 (ppc_emit_ops): New function.
3300 (linux_low_target): Wire in ppc_emit_ops.
3301
a2174ba4
MK
33022016-03-31 Wei-cheng Wang <cole945@gmail.com>
3303 Marcin Kościelnicki <koriakin@0x04.net>
3304
3305 PR/17221
3306 * Makefile.in: Add powerpc-*-ipa.o
3307 * configure.srv: Add ipa_obj for powerpc*-linux.
3308 * linux-ppc-ipa.c: New file.
3309 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3310 includes.
3311 (PPC_FIELD): New macro.
3312 (PPC_SEXT): New macro.
3313 (PPC_OP6): New macro.
3314 (PPC_BO): New macro.
3315 (PPC_LI): New macro.
3316 (PPC_BD): New macro.
3317 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3318 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3319 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3320 (ppc_get_thread_area): New function.
3321 (is_elfv2_inferior): New function.
3322 (gen_ds_form): New function.
3323 (GEN_STD): New macro.
3324 (GEN_STDU): New macro.
3325 (GEN_LD): New macro.
3326 (GEN_LDU): New macro.
3327 (gen_d_form): New function.
3328 (GEN_ADDI): New macro.
3329 (GEN_ADDIS): New macro.
3330 (GEN_LI): New macro.
3331 (GEN_LIS): New macro.
3332 (GEN_ORI): New macro.
3333 (GEN_ORIS): New macro.
3334 (GEN_LWZ): New macro.
3335 (GEN_STW): New macro.
3336 (GEN_STWU): New macro.
3337 (gen_xfx_form): New function.
3338 (GEN_MFSPR): New macro.
3339 (GEN_MTSPR): New macro.
3340 (GEN_MFCR): New macro.
3341 (GEN_MTCR): New macro.
3342 (GEN_SYNC): New macro.
3343 (GEN_LWSYNC): New macro.
3344 (gen_x_form): New function.
3345 (GEN_OR): New macro.
3346 (GEN_MR): New macro.
3347 (GEN_LWARX): New macro.
3348 (GEN_STWCX): New macro.
3349 (GEN_CMPW): New macro.
3350 (gen_md_form): New function.
3351 (GEN_RLDICL): New macro.
3352 (GEN_RLDICR): New macro.
3353 (gen_i_form): New function.
3354 (GEN_B): New macro.
3355 (GEN_BL): New macro.
3356 (gen_b_form): New function.
3357 (GEN_BNE): New macro.
3358 (GEN_LOAD): New macro.
3359 (GEN_STORE): New macro.
3360 (gen_limm): New function.
3361 (gen_atomic_xchg): New function.
3362 (gen_call): New function.
3363 (ppc_relocate_instruction): New function.
3364 (ppc_install_fast_tracepoint_jump_pad): New function.
3365 (ppc_get_min_fast_tracepoint_insn_len): New function.
3366 (ppc_get_ipa_tdesc_idx): New function.
3367 (the_low_target): Wire in the new functions.
3368 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3369 tdescs.
3370 * linux-ppc-tdesc.h: New file.
3371
a13c4696
MK
33722016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3373
3374 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3375 (alloc_jump_pad_buffer): New function.
3376 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3377 (alloc_jump_pad_buffer): New function.
3378 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3379 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3380 (alloc_jump_pad_buffer): New function.
3381 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3382 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3383 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3384 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3385
1cda1512
MK
33862016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3387
3388 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3389 * linux-amd64-ipa.c: Likewise.
3390 * linux-i386-ipa.c: Likewise.
3391 * linux-s390-ipa.c: Likewise.
3392 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3393 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3394 set_trace_state_variable_value_ptr.
3395 (struct ipa_sym_addresses): Likewise.
3396 (symbol_list): Likewise.
3397 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3398 accessing gdb_collect directly.
3399 (gdb_collect_ptr_type): New typedef.
3400 (get_raw_reg_ptr_type): New typedef.
3401 (get_trace_state_variable_value_ptr_type): New typedef.
3402 (set_trace_state_variable_value_ptr_type): New typedef.
3403 (gdb_collect_ptr): New global.
3404 (get_raw_reg_ptr): New global.
3405 (get_trace_state_variable_value_ptr): New global.
3406 (set_trace_state_variable_value_ptr): New global.
3407 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3408 accessing get_raw_reg directly.
3409 (get_get_tsv_func_addr): Likewise for
3410 get_trace_state_variable_value_ptr.
3411 (get_set_tsv_func_addr): Likewise for
3412 set_trace_state_variable_value_ptr.
3413 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3414
72fb5488
SM
34152016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3416
3417 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3418
28170b88
MK
34192016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3420
3421 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3422 packets.
3423 (relocate_instruction): Remove own_buf.
3424 * server.c (own_buf): Make global.
3425 (handle_v_requests): Make global.
3426 * server.h (own_buf): New declaration.
3427 (handle_v_requests): New prototype.
3428
f39e8743
MK
34292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3430
3431 PR 18377
3432 * linux-s390-low.c (add_insns): New function.
3433 (s390_emit_prologue): New function.
3434 (s390_emit_epilogue): New function.
3435 (s390_emit_add): New function.
3436 (s390_emit_sub): New function.
3437 (s390_emit_mul): New function.
3438 (s390_emit_lsh): New function.
3439 (s390_emit_rsh_signed): New function.
3440 (s390_emit_rsh_unsigned): New function.
3441 (s390_emit_ext): New function.
3442 (s390_emit_log_not): New function.
3443 (s390_emit_bit_and): New function.
3444 (s390_emit_bit_or): New function.
3445 (s390_emit_bit_xor): New function.
3446 (s390_emit_bit_not): New function.
3447 (s390_emit_equal): New function.
3448 (s390_emit_less_signed): New function.
3449 (s390_emit_less_unsigned): New function.
3450 (s390_emit_ref): New function.
3451 (s390_emit_if_goto): New function.
3452 (s390_emit_goto): New function.
3453 (s390_write_goto_address): New function.
3454 (s390_emit_litpool): New function.
3455 (s390_emit_const): New function.
3456 (s390_emit_call): New function.
3457 (s390_emit_reg): New function.
3458 (s390_emit_pop): New function.
3459 (s390_emit_stack_flush): New function.
3460 (s390_emit_zero_ext): New function.
3461 (s390_emit_swap): New function.
3462 (s390_emit_stack_adjust): New function.
3463 (s390_emit_set_r2): New function.
3464 (s390_emit_int_call_1): New function.
3465 (s390_emit_void_call_2): New function.
3466 (s390_emit_eq_goto): New function.
3467 (s390_emit_ne_goto): New function.
3468 (s390_emit_lt_goto): New function.
3469 (s390_emit_le_goto): New function.
3470 (s390_emit_gt_goto): New function.
3471 (s390_emit_ge_goto): New function.
3472 (s390x_emit_prologue): New function.
3473 (s390x_emit_epilogue): New function.
3474 (s390x_emit_add): New function.
3475 (s390x_emit_sub): New function.
3476 (s390x_emit_mul): New function.
3477 (s390x_emit_lsh): New function.
3478 (s390x_emit_rsh_signed): New function.
3479 (s390x_emit_rsh_unsigned): New function.
3480 (s390x_emit_ext): New function.
3481 (s390x_emit_log_not): New function.
3482 (s390x_emit_bit_and): New function.
3483 (s390x_emit_bit_or): New function.
3484 (s390x_emit_bit_xor): New function.
3485 (s390x_emit_bit_not): New function.
3486 (s390x_emit_equal): New function.
3487 (s390x_emit_less_signed): New function.
3488 (s390x_emit_less_unsigned): New function.
3489 (s390x_emit_ref): New function.
3490 (s390x_emit_if_goto): New function.
3491 (s390x_emit_const): New function.
3492 (s390x_emit_call): New function.
3493 (s390x_emit_reg): New function.
3494 (s390x_emit_pop): New function.
3495 (s390x_emit_stack_flush): New function.
3496 (s390x_emit_zero_ext): New function.
3497 (s390x_emit_swap): New function.
3498 (s390x_emit_stack_adjust): New function.
3499 (s390x_emit_int_call_1): New function.
3500 (s390x_emit_void_call_2): New function.
3501 (s390x_emit_eq_goto): New function.
3502 (s390x_emit_ne_goto): New function.
3503 (s390x_emit_lt_goto): New function.
3504 (s390x_emit_le_goto): New function.
3505 (s390x_emit_gt_goto): New function.
3506 (s390x_emit_ge_goto): New function.
3507 (s390_emit_ops): New function.
3508 (struct linux_target_ops): Fill in emit_ops hook.
3509
abd9baf9
MK
35102016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3511
3512 PR 18377
3513 * Makefile.in: Add s390 IPA files.
3514 * configure.srv: Build IPA for s390.
3515 * linux-s390-ipa.c: New file.
3516 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3517 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3518 (tdesc_s390_linux32): Likewise.
3519 (init_registers_s390_linux32v1): Likewise.
3520 (tdesc_s390_linux32v1): Likewise.
3521 (init_registers_s390_linux32v2): Likewise.
3522 (tdesc_s390_linux32v2): Likewise.
3523 (init_registers_s390_linux64): Likewise.
3524 (tdesc_s390_linux64): Likewise.
3525 (init_registers_s390_linux64v1): Likewise.
3526 (tdesc_s390_linux64v1): Likewise.
3527 (init_registers_s390_linux64v2): Likewise.
3528 (tdesc_s390_linux64v2): Likewise.
3529 (init_registers_s390_te_linux64): Likewise.
3530 (tdesc_s390_te_linux64): Likewise.
3531 (init_registers_s390_vx_linux64): Likewise.
3532 (tdesc_s390_vx_linux64): Likewise.
3533 (init_registers_s390_tevx_linux64): Likewise.
3534 (tdesc_s390_tevx_linux64): Likewise.
3535 (init_registers_s390x_linux64): Likewise.
3536 (tdesc_s390x_linux64): Likewise.
3537 (init_registers_s390x_linux64v1): Likewise.
3538 (tdesc_s390x_linux64v1): Likewise.
3539 (init_registers_s390x_linux64v2): Likewise.
3540 (tdesc_s390x_linux64v2): Likewise.
3541 (init_registers_s390x_te_linux64): Likewise.
3542 (tdesc_s390x_te_linux64): Likewise.
3543 (init_registers_s390x_vx_linux64): Likewise.
3544 (tdesc_s390x_vx_linux64): Likewise.
3545 (init_registers_s390x_tevx_linux64): Likewise.
3546 (tdesc_s390x_tevx_linux64): Likewise.
3547 (have_hwcap_s390_vx): New static variable.
3548 (s390_arch_setup): Fill have_hwcap_s390_vx.
3549 (s390_get_thread_area): New function.
3550 (s390_ft_entry_gpr_esa): New const.
3551 (s390_ft_entry_gpr_zarch): New const.
3552 (s390_ft_entry_misc): New const.
3553 (s390_ft_entry_fr): New const.
3554 (s390_ft_entry_vr): New const.
3555 (s390_ft_main_31): New const.
3556 (s390_ft_main_64): New const.
3557 (s390_ft_exit_fr): New const.
3558 (s390_ft_exit_vr): New const.
3559 (s390_ft_exit_misc): New const.
3560 (s390_ft_exit_gpr_esa): New const.
3561 (s390_ft_exit_gpr_zarch): New const.
3562 (append_insns): New function.
3563 (s390_relocate_instruction): New function.
3564 (s390_install_fast_tracepoint_jump_pad): New function.
3565 (s390_get_min_fast_tracepoint_insn_len): New function.
3566 (s390_get_ipa_tdesc_idx): New function.
3567 (struct linux_target_ops): Wire in the above functions.
3568 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3569 * linux-s390-tdesc.h: New file.
3570
a4105d04
MK
35712016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3572
3573 * linux-s390-low.c (s390_supports_tracepoints): New function.
3574 (struct linux_target_ops): Fill supports_tracepoints hook.
3575
35ac8b3e
YQ
35762016-03-18 Yao Qi <yao.qi@linaro.org>
3577
3578 * linux-low.c (lwp_signal_can_be_delivered): New function.
3579 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3580
94610ec4
YQ
35812016-03-18 Yao Qi <yao.qi@linaro.org>
3582
3583 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3584 0 if signal is enqueued. Remove 'signal' from one debugging
3585 message. Move one debugging message to some lines below.
3586 Remove code setting 'signal' to 0.
3587
80aea927
YQ
35882016-03-18 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-low.c (linux_low_filter_event): Remove redundant
3591 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3592
b04fd3be
MK
35932016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3594
3595 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3596 (struct linux_target_ops): Wire in the above.
3597
c40c8d4b
YQ
35982016-03-03 Yao Qi <yao.qi@linaro.org>
3599
3600 * linux-low.c: Update comments to start_step_over.
3601
0f8288ae
YQ
36022016-03-03 Yao Qi <yao.qi@linaro.org>
3603
3604 PR server/19736
3605 * linux-low.c (handle_extended_wait): Set child suspended
3606 if event_lwp->bp_reinsert isn't zero.
3607
fdbd04a8
YQ
36082016-03-02 Yao Qi <yao.qi@linaro.org>
3609
3610 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3611 enqueue_pending_signal.
3612
6896a8fa
MK
36132016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3614
3615 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3616 is actually loaded.
3617
ab503087
MK
36182016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3619
3620 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3621 (s390_regmap_3264) [!__s390x__]: New global.
3622 (s390_collect_ptrace_register): Skip map entries containing -1.
3623 (s390_supply_ptrace_register): Ditto.
3624 (s390_fill_gprs_high): New function.
3625 (s390_store_gprs_high): New function.
3626 (s390_regsets): Add NT_S390_HIGH_GPRS.
3627 (s390_get_hwcap): Enable on 31-bit.
3628 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3629 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3630 Detect NT_S390_HIGH_GPRS.
3631 (s390_usrregs_info_3264): Enable on 31-bit.
3632 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3633 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3634
ae91f625
MK
36352016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3636
3637 PR gdb/13808
3638 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3639 * configure.srv: Ditto.
3640 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3641 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3642 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3643 (init_registers_amd64_linux): Remove prototype.
3644 (tdesc_amd64_linux): Remove declaration.
3645 (get_ipa_tdesc): New function.
3646 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3647 initialize remaining tdescs.
3648 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3649 (init_registers_i386_linux): Remove prototype.
3650 (tdesc_i386_linux): Remove declaration.
3651 (get_ipa_tdesc): New function.
3652 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3653 initialize remaining tdescs.
3654 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3655 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3656 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3657 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3658 (x86_get_ipa_tdesc_idx): New function.
3659 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3660 * linux-x86-tdesc.h: New file.
3661 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3662 (target_get_ipa_tdesc_idx): New macro.
3663 * tracepoint.c (ipa_tdesc_idx): New macro.
3664 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3665 (symbol_list): Add ipa_tdesc_idx.
3666 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3667 (ipa_tdesc): Remove.
3668 (ipa_tdesc_idx): New variable.
3669 (get_context_regcache): Use get_ipa_tdesc.
3670 (gdb_collect): Ditto.
3671 (gdb_probe): Ditto.
3672 * tracepoint.h (get_ipa_tdesc): New prototype.
3673 (ipa_tdesc): Remove.
3674
e7ad2f14
PA
36752016-02-24 Pedro Alves <palves@redhat.com>
3676
3677 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3678 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3679 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3680 Factor out common code between the USE_SIGTRAP_SIGINFO and
3681 !USE_SIGTRAP_SIGINFO blocks.
3682 (linux_low_filter_event): Call save_stop_reason instead of
3683 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3684 Update comments.
3685 (linux_wait_1): Update comments.
3686
657f9cde
WW
36872016-02-24 Wei-cheng Wang <cole945@gmail.com>
3688
3689 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3690 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3691 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3692 ppc_insert_point, ppc_remove_point.
3693
b00b61e1
MK
36942016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3695
3696 * linux-s390-low.c (s390_supports_z_point_type): New function.
3697 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3698
553cb527
YQ
36992016-02-16 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3702 PC. Get pc from regcache_read_pc.
3703
a5652c21
YQ
37042016-02-12 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3707 or linux_get_pc_32bit.
3708 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3709
ed443b61
YQ
37102016-02-12 Yao Qi <yao.qi@linaro.org>
3711
3712 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3713 arm_linux_get_next_pcs_fixup.
3714
020ecd38
MK
37152016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3716
3717 * tracepoint.c (x_tracepoint_action_download): Change
3718 write_inferior_data_ptr to write_inferior_data_pointer.
3719 (cmd_qtstart): Likewise.
3720 (write_inferior_data_ptr): Remove.
3721 (download_agent_expr): Change write_inferior_data_ptr to
3722 write_inferior_data_pointer.
3723 (download_tracepoint_1): Likewise.
3724 (download_tracepoint): Likewise.
3725 (download_trace_state_variables): Likewise.
3726
7cae9051
WW
37272016-02-11 Wei-cheng Wang <cole945@gmail.com>
3728 Marcin Kościelnicki <koriakin@0x04.net>
3729
3730 * tracepoint.c (struct tracepoint_action_ops): Remove.
3731 (struct tracepoint_action): Remove ops.
3732 (m_tracepoint_action_download, r_tracepoint_action_download)
3733 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3734 size and offset accordingly.
3735 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3736 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3737 (tracepoint_action_send, tracepoint_action_download): New functions.
3738 Helpers for trace action handlers.
3739 (add_tracepoint_action): Remove setup actions ops.
3740 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3741
9f6a71b4
YQ
37422016-02-10 Yao Qi <yao.qi@linaro.org>
3743
3744 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3745
1e94266c
SM
37462016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3747
3748 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3749 to AC_OUTPUT.
3750 * configure: Regenerate.
3751
8adce034
SM
37522016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3753
3754 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3755 void * to gdb_byte *.
3756 * linux-low.c (siginfo_fixup): Likewise.
3757 (linux_xfer_siginfo): Likewise.
3758 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3759 Likewise.
3760 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3761
93813b37
WT
37622016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3763
3764 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3765 to srv_tgtobj.
3766 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3767 to srv_tgtobj.
3768 * linux-x86-low.c [__x86_64__]: Include
3769 "nat/amd64-linux-siginfo.h".
3770 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3771 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3772 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3773 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3774 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3775 (cpt_si_fd, si_timerid, si_overrun): Move from
3776 nat/amd64-linux-siginfo.c.
3777 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3778
8424cc97
SM
37792016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3780
3781 * server.c (skip_to_semicolon): Remove.
3782 (process_point_options): Use strchrnul instead of
3783 skip_to_semicolon.
3784
4d18591b
YQ
37852016-01-26 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3788 * linux-low.c (install_software_single_step_breakpoints): Don't
3789 call regcache_read_pc.
3790 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3791 argument pc.
3792
d8020970
YQ
37932016-01-26 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-low.c (install_software_single_step_breakpoints): Call
3796 regcache_read_pc instead of get_pc.
3797
8b207339
YQ
37982016-01-26 Yao Qi <yao.qi@linaro.org>
3799
3800 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3801 (unblock_async_io): Rename to ...
3802 (block_unblock_async_io): ... it. New function.
3803 (enable_async_io): Don't install SIGIO handler. Unblock it
3804 instead.
3805 (disable_async_io): Don't ignore SIGIO. Block it instead.
3806 (initialize_async_io): Install SIGIO handler. Don't call
3807 unblock_async_io.
3808
18879fef
YQ
38092016-01-26 Yao Qi <yao.qi@linaro.org>
3810
3811 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3812 first character is '\003', call *the_target->request_interrupt.
3813
a0f8e08a
YQ
38142016-01-25 Yao Qi <yao.qi@linaro.org>
3815
3816 * remote-utils.c (new_thread_notify): Remove.
3817 (dead_thread_notify): Likewise.
3818 * remote-utils.h (new_thread_notify): Remove declaration.
3819 (dead_thread_notify): Likewise.
3820
cc5fd9ab
MK
38212016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3822
3823 * gdb.trace/pending.exp: Fix expected message on continue.
3824
99e8eb11
MK
38252016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3826
3827 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3828 it works properly on big-endian machines where sizeof (CORE_ADDR)
3829 != sizeof (void *).
3830
a994041d
PA
38312016-01-21 Pedro Alves <palves@redhat.com>
3832
3833 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3834 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3835 * configure: Regenerate.
3836
f7a6a40d
YQ
38372016-01-21 Yao Qi <yao.qi@linaro.org>
3838
3839 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3840 is_thumb and set it according to CPSR saved on the stack.
3841 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3842 arm_sigreturn_next_pc.
3843
6f69e520
YQ
38442016-01-18 Yao Qi <yao.qi@linaro.org>
3845
3846 * linux-low.c (linux_set_pc_64bit): New function.
3847 (linux_get_pc_64bit): New function.
3848 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3849 Declare.
3850 * linux-sparc-low.c (debug_threads): Remove declaration.
3851 (sparc_get_pc): Remove.
3852 (the_low_target): Use linux_get_pc_64bit instead of
3853 sparc_get_pc.
3854 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3855 (the_low_target): Use linux_get_pc_64bit and
3856 linux_set_pc_64bit.
3857
276d4552
YQ
38582016-01-18 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-arm-low.c (debug_threads): Remove declaration.
3861 (arm_get_pc, arm_set_pc): Remove.
3862 (the_low_target): Use linux_get_pc_32bit and
3863 linux_set_pc_32bit.
3864 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3865 (the_low_target): Use linux_get_pc_32bit and
3866 linux_set_pc_32bit.
3867 * linux-cris-low.c (debug_threads): Remove declaration.
3868 (cris_get_pc, cris_set_pc,): Remove.
3869 (the_low_target): Use linux_get_pc_32bit and
3870 linux_set_pc_32bit.
3871 * linux-crisv32-low.c (debug_threads): Remove declaration.
3872 (cris_get_pc, cris_set_pc): Remove.
3873 (the_low_target): Use linux_get_pc_32bit and
3874 linux_set_pc_32bit.
3875 * linux-low.c: Include inttypes.h.
3876 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3877 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3878 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3879 (the_low_target): Use linux_get_pc_32bit and
3880 linux_set_pc_32bit.
3881 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3882 (the_low_target): Use linux_get_pc_32bit and
3883 linux_set_pc_32bit.
3884 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3885 (the_low_target): Use linux_get_pc_32bit and
3886 linux_set_pc_32bit.
3887 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3888 (the_low_target): Use linux_get_pc_32bit and
3889 linux_set_pc_32bit.
3890 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3891 (the_low_target): Use linux_get_pc_32bit and
3892 linux_set_pc_32bit.
3893
eb0edac8
GB
38942016-01-18 Gary Benson <gbenson@redhat.com>
3895
3896 * configure.ac (AC_FUNC_FORK): New check.
3897 * config.in: Regenerate.
3898 * configure: Likewise.
3899
1b451dda
YQ
39002016-01-14 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3903 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3904 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3905 arm_get_next_pcs_ctor.
3906
82075af2
JS
39072016-01-12 Josh Stone <jistone@redhat.com>
3908 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3909
3910 * inferiors.h: Include "gdb_vecs.h".
3911 (struct process_info): Add syscalls_to_catch.
3912 * inferiors.c (remove_process): Free syscalls_to_catch.
3913 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3914 syscall_return stops.
3915 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3916 * server.c (handle_general_set): Handle QCatchSyscalls.
3917 (handle_query): Report support for QCatchSyscalls.
3918 * target.h (struct target_ops): Add supports_catch_syscall.
3919 (target_supports_catch_syscall): New macro.
3920 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3921 (struct lwp_info): Add syscall_state.
3922 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3923 Maintain syscall_state and syscalls_to_catch across exec.
3924 (get_syscall_trapinfo): New function, proxy to the_low_target.
3925 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3926 (linux_low_filter_event): Toggle syscall_state entry/return for
3927 syscall traps, and set it ignored for all others.
3928 (gdb_catching_syscalls_p): New function.
3929 (gdb_catch_this_syscall_p): New function.
3930 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3931 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3932 (linux_supports_catch_syscall): New function.
3933 (linux_target_ops): Install it.
3934 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3935 (the_low_target): Install it.
3936
8f13a3ce
MF
39372016-01-12 Mike Frysinger <vapier@gentoo.org>
3938
3939 * acinclude.m4: Include new ../warning.m4 file.
3940 * configure: Regenerated.
3941 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3942
5b3da067
MF
39432016-01-12 Mike Frysinger <vapier@gentoo.org>
3944
3945 * ax.c (is_goto_target): Mark static.
3946 * linux-low.c (register_addr): Likewise.
3947 (linux_fetch_registers, linux_store_registers): Likewise.
3948 * mem-break.c (any_persistent_commands): Fix old prototype.
3949 (add_commands_to_breakpoint): Mark static.
3950 * regcache.c (find_register_by_name): Delete unused func.
3951 * remote-utils.c (hex_or_minus_one): Mark static.
3952 * server.c (monitor_show_help): Mark static.
3953 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3954 handle_v_requests): Likewise.
3955
bc504a31
PA
39562016-01-12 Pedro Alves <palves@redhat.com>
3957
3958 Remove use of the registered trademark symbol throughout.
3959
5a0dd67a
YQ
39602016-01-08 Yao Qi <yao.qi@linaro.org>
3961
3962 * remote-utils.c (getpkt): If c is '\003', call target hook
3963 request_interrupt.
3964
b2ca446f
YQ
39652016-01-06 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3968 linux-aarch32-low.c.
3969 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3970 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3971 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3972 (thumb2_breakpoint): Declare.
3973 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3974 linux-aarch32-low.h.
3975 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3976 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3977 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3978
edd88788
JB
39792016-01-01 Joel Brobecker <brobecker@adacore.com>
3980
3981 * gdbreplay.c (gdbreplay_version): Change copyright year in
3982 version message.
3983 * server.c (gdbserver_version): Likewise.
3984
65da7f14
PP
39852015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3986
3987 * server.c (crc32_table): Delete.
3988 (crc32): Use libiberty's xcrc32 function.
3989
4abd5ed2
JB
39902015-12-22 Joel Brobecker <brobecker@adacore.com>
3991
3992 * lynx-low.c (lynx_delete_thread_callback): New function.
3993 (lynx_mourn): Properly delete our process and all of its
3994 threads. Remove call to clear_inferiors.
3995
0e50fe5c
JB
39962015-12-22 Joel Brobecker <brobecker@adacore.com>
3997
3998 * target.c (thread_search_callback): Add check that
3999 the thread_stopped target callback is not NULL before
4000 calling it.
4001
35adc03f
YQ
40022015-12-21 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4005 arm breakpoint.
4006
bd2b2909
AT
40072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4008
4009 * server.c (handle_query): Call target_supports_software_single_step.
4010
7fe5e27e
AT
40112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4012
4013 * linux-low.c (single_step): New function.
4014 (linux_resume_one_lwp_throw): Call single_step.
4015 (start_step_over): Likewise.
4016
d9311bfa
AT
40172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4018
4019 * Makefile.in (SFILES): Append arch/arm-linux.c,
4020 arch/arm-get-next-pcs.c.
4021 (arm-linux.o): New rule.
4022 (arm-get-next-pcs.o): New rule.
4023 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4024 arm-linux.o.
4025 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4026 to linux-aarch32-low.c.
4027 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4028 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4029 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4030 (thumb2_breakpoint_len): Likewise.
4031 (arm_is_thumb_mode): Make non-static.
4032 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4033 from linux-aarch32-low.c.
4034 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4035 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4036 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4037 (thumb2_breakpoint_len): Likewise.
4038 (arm_is_thumb_mode): New declaration.
4039 * linux-arm-low.c: Include arch/arm-linux.h
4040 aarch/arm-get-next-pcs.h, sys/syscall.h.
4041 (get_next_pcs_ops): New struct.
4042 (get_next_pcs_addr_bits_remove): New function.
4043 (get_next_pcs_is_thumb): New function.
4044 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4045 (arm_sigreturn_next_pc): Likewise.
4046 (get_next_pcs_syscall_next_pc): Likewise.
4047 (arm_gdbserver_get_next_pcs): Likewise.
4048 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4049 Initialize.
4050 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4051 * server.h: Include gdb_vecs.h.
4052
68ce2059
AT
40532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4054
4055 * Makefile.in (SFILES): Append common/common-regcache.c.
4056 (OBS): Append common-regcache.o.
4057 (common-regcache.o): New rule.
4058 * regcache.c (init_register_cache): Initialize cache to
4059 REG_UNAVAILABLE.
4060 (regcache_raw_read_unsigned): New function.
4061 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4062 register_status enum.
4063
fa5308bd
AT
40642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4065
4066 * linux-aarch64-low.c (the_low_targets): Rename
4067 breakpoint_reinsert_addr to get_next_pcs.
4068 * linux-arm-low.c (the_low_targets): Likewise.
4069 * linux-bfin-low.c (the_low_targets): Likewise.
4070 * linux-cris-low.c (the_low_targets): Likewise.
4071 * linux-crisv32-low.c (the_low_targets): Likewise.
4072 * linux-low.c (can_software_single_step): Likewise.
4073 (install_software_single_step_breakpoints): New function.
4074 (start_step_over): Use install_software_single_step_breakpoints.
4075 * linux-low.h: New CORE_ADDR vector.
4076 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4077 get_next_pcs.
4078 * linux-mips-low.c (the_low_targets): Likewise.
4079 * linux-nios2-low.c (the_low_targets): Likewise.
4080 * linux-sparc-low.c (the_low_targets): Likewise.
4081
4a6ed09b
PA
40822015-12-17 Pedro Alves <palves@redhat.com>
4083
4084 * linux-low.c (linux_kill_one_lwp): Remove references to
4085 LinuxThreads.
4086 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4087 to 'kill'.
4088 (linux_init_signals): Delete.
4089 (initialize_low): Adjust.
4090 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4091
7544db95
PA
40922015-12-16 Pedro Alves <palves@redhat.com>
4093
4094 * configure.ac (compiler warning flags): When testing a
4095 -Wno-foo option, check whether -Wfoo works instead.
4096 * configure: Regenerate.
4097
8020350c
DB
40982015-12-11 Don Breazeal <donb@codesourcery.com>
4099
4100 * server.c (process_serial_event): Don't exit from gdbserver
4101 in remote mode if there are still active inferiors.
4102
db91f502
YQ
41032015-12-11 Yao Qi <yao.qi@linaro.org>
4104
4105 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4106 arm_breakpoint_at if the process is 32-bit.
4107
b37a6290
YQ
41082015-12-11 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4111 arm breakpoint.
4112
17b1509a
YQ
41132015-12-07 Yao Qi <yao.qi@linaro.org>
4114
4115 * configure.srv: Append arm.o to srv_tgtobj for
4116 aarch64*-*-linux* target.
4117 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4118 from linux-arm-low.c.
4119 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4120 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4121 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4122 (thumb2_breakpoint_len): Likewise.
4123 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4124 (arm_breakpoint_kinds): Likewise.
4125 (arm_breakpoint_kind_from_pc): Likewise.
4126 (arm_sw_breakpoint_from_kind): Likewise.
4127 (arm_breakpoint_kind_from_current_state): Likewise.
4128 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4129 (arm_sw_breakpoint_from_kind): Declare.
4130 (arm_breakpoint_kind_from_current_state): Declare.
4131 (arm_breakpoint_at): Declare.
4132 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4133 arm_sw_breakpoint_from_kind if process is 32-bit.
4134 (aarch64_breakpoint_kind_from_pc): New function.
4135 (aarch64_breakpoint_kind_from_current_state): New function.
4136 (the_low_target): Initialize fields breakpoint_kind_from_pc
4137 and breakpoint_kind_from_current_state.
4138 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4139 linux-aarch32-low.c.
4140 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4141 (arm_breakpoint, arm_breakpoint_len): Likewise.
4142 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4143 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4144 (arm_is_thumb_mode): Likewise.
4145 (arm_breakpoint_at): Likewise.
4146 (arm_breakpoint_kind_from_pc): Likewise.
4147 (arm_sw_breakpoint_from_kind): Likewise.
4148 (arm_breakpoint_kind_from_current_state): Likewise.
4149
4150 Revert:
4151 2015-08-04 Yao Qi <yao.qi@linaro.org>
4152
4153 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4154 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4155 * server.c (extended_protocol): Remove "static".
4156 * server.h (extended_protocol): Declare it.
4157
ece66d65
JS
41582015-12-04 Josh Stone <jistone@redhat.com>
4159
4160 * target.h (struct target_ops) <arch_setup>: Rename to ...
4161 (struct target_ops) <post_create_inferior>: ... this.
4162 (target_arch_setup): Rename to ...
4163 (target_post_create_inferior): ... this, calling post_create_inferior.
4164 * server.c (start_inferior): Update target_arch_setup calls to
4165 target_post_create_inferior.
4166 * linux-low.c (linux_low_ptrace_options): Forward declare.
4167 (linux_arch_setup): Update its comment for general use.
4168 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4169 (struct linux_target_ops): Use linux_post_create_inferior.
4170 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4171 to post_create_inferior.
4172 * nto-low.c (struct nto_target_ops): Likewise.
4173 * spu-low.c (struct spu_target_ops): Likewise.
4174 * win32-low.c (struct win32_target_ops): Likewise.
4175
e58c48b4
AT
41762015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4177
4178 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4179
fbec8956
AT
41802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4181
4182 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4183 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4184 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4185 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4186 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4187 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4188 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4189 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4190 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4191 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4192 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4193 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4194
9b4c5f87
AT
41952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4196
4197 * linux-low.c (linux_look_up_symbols): Don't call
4198 linux_supports_traceclone.
4199 * linux-low.h (thread_db_init): Remove use_events argument.
4200 * thread-db.c (thread_db_use_event): Remove global variable.
4201 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4202 (struct thread_db) <td_create_bp>: Remove field.
4203 (thread_db_create_event): Remove function.
4204 (thread_db_enable_reporting): Likewise.
4205 (find_one_thread): Don't check for thread_db_use_events.
4206 (attach_thread): Likewise.
4207 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4208 (try_thread_db_load_1): Don't check for thread_db_use_events.
4209 (thread_db_init): Remove use_events argument and thread events
4210 handling.
4211 (remove_thread_event_breakpoints): Remove function.
4212 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4213
7d00775e
AT
42142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4215
4216 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4217 New function.
4218 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4219 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4220 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4221 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4222 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4223 Initialize.
4224 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4225 New function.
4226 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4227 * linux-low.c (can_hardware_single_step): Use
4228 supports_hardware_single_step.
4229 (can_software_single_step): New function.
4230 (start_step_over): Call can_software_single_step.
4231 (linux_supports_hardware_single_step): New function.
4232 (struct target_ops) <supports_software_single_step>: Initialize.
4233 * linux-low.h (struct linux_target_ops)
4234 <supports_hardware_single_step>: Initialize.
4235 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4236 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4237 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4238 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4239 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4240 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4241 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4242 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4243 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4244 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4245 Initialize.
4246 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4247 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4248 Initialize.
4249 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4250 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4251 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4252 New function.
4253 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4254 * target.h (struct target_ops): <supports_software_single_step>:
4255 New field.
4256 (target_supports_software_single_step): New macro.
4257
2d97cd35
AT
42582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4259
4260 * linux-low.c (linux_wait_1): Fix pc advance condition.
4261 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4262 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4263
769ef81f
AT
42642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4265
4266 * linux-arm-low.c (arm_is_thumb_mode): New function.
4267 (arm_breakpoint_at): Use arm_is_thumb_mode.
4268 (arm_breakpoint_kind_from_current_state): New function.
4269 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4270 Initialize.
4271 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4272 (linux_breakpoint_kind_from_current_state): New function.
4273 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4274 * linux-low.h (struct linux_target_ops)
4275 <breakpoint_kind_from_current_state>: New field.
4276 * target.h (struct target_ops): Likewise.
4277 (target_breakpoint_kind_from_current_state): New macro.
4278
1bebeeca
PA
42792015-11-30 Pedro Alves <palves@redhat.com>
4280
4281 * linux-low.c (linux_resume): Wake up the event loop before
4282 returning.
4283
a67a9fae
PA
42842015-11-30 Pedro Alves <palves@redhat.com>
4285
4286 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4287 check.
4288 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4289 to -1.
4290 * target.c (struct thread_search): New structure.
4291 (thread_search_callback): New function.
4292 (prev_general_thread): New global.
4293 (prepare_to_access_memory, done_accessing_memory): New functions.
4294 * target.h (prepare_to_access_memory, done_accessing_memory):
4295 Replace macros with function declarations.
4296
f2faf941
PA
42972015-11-30 Pedro Alves <palves@redhat.com>
4298
4299 PR 14618
4300 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4301 report TARGET_WAITKIND_NO_RESUMED.
4302 * remote-utils.c (prepare_resume_reply): Handle
4303 TARGET_WAITKIND_NO_RESUMED.
4304 * server.c (report_no_resumed): New global.
4305 (handle_query) <qSupported>: Handle "no-resumed+". Report
4306 "no-resumed+" support.
4307 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4308 return error if the client doesn't support no-resumed events.
4309 (push_stop_notification): New function.
4310 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4311 events if the client supports them.
4312
a681f9c9
PA
43132015-11-30 Pedro Alves <palves@redhat.com>
4314
4315 * linux-low.c (thread_still_has_status_pending_p): Don't check
4316 vCont;t here.
4317 (lwp_resumed): New function.
4318 (status_pending_p_callback): Return early if the LWP is not
4319 supposed to be resumed.
4320
65706a29
PA
43212015-11-30 Pedro Alves <palves@redhat.com>
4322
4323 * linux-low.c (handle_extended_wait): Assert that the LWP's
4324 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4325 thread create events, leave the new child's status pending.
4326 (linux_low_filter_event): If GDB wants to hear about thread exit
4327 events, leave the LWP marked dead and don't delete it.
4328 (linux_wait_for_event_filtered): Don't check for thread exit.
4329 (filter_exit_event): New function.
4330 (linux_wait_1): Use it, when returning an exit event.
4331 (linux_resume_one_lwp_throw): Assert that the LWP's
4332 waitstatus is TARGET_WAITKIND_IGNORE.
4333 * remote-utils.c (prepare_resume_reply): Handle
4334 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4335 * server.c (report_thread_events): New global.
4336 (handle_general_set): Handle QThreadEvents.
4337 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4338 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4339 TARGET_WAITKIND_THREAD_EXITED.
4340 * server.h (report_thread_events): Declare.
4341
56cf4bed
PA
43422015-11-30 Pedro Alves <palves@redhat.com>
4343
4344 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4345 the thread's last_resume_kind was resume_stop.
4346
500c1d85
PA
43472015-11-30 Pedro Alves <palves@redhat.com>
4348
4349 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4350 before returning.
4351
de979965
PA
43522015-11-30 Pedro Alves <palves@redhat.com>
4353
4354 * server.c (handle_v_requests): Handle vCtrlC.
4355
34c65914
PA
43562015-11-30 Pedro Alves <palves@redhat.com>
4357
4358 * gdbthread.h (find_any_thread_of_pid): Declare.
4359 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4360 functions.
4361 * server.c (handle_query): If current_thread is NULL, look for
4362 another thread of the selected process.
4363
79efa585 43642015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4365 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4366
4367 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4368 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4369 name in reply.
4370 * target.h (struct target_ops) <thread_name>: New field.
4371 (target_thread_name): New macro.
4372
80d82c19
JB
43732015-11-23 Joel Brobecker <brobecker@adacore.com>
4374
4375 * regcache.h (regcache_invalidate_pid): Add declaration.
4376 * regcache.c (regcache_invalidate_pid): New function, extracted
4377 from regcache_invalidate.
4378 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4379 Add trivial documentation comment.
4380 * lynx-low.c: Use regcache_invalidate_pid instead of
4381 regcache_invalidate.
4382
64da5dd5
JB
43832015-11-23 Joel Brobecker <brobecker@adacore.com>
4384
4385 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4386 and Elf64_auxv_t if the target is Android.
4387
37ce4055
DE
43882015-11-22 Doug Evans <xdje42@gmail.com>
4389
4390 * target.h: #include <sys/types.h>.
4391
06e03fff
PA
43922015-11-19 Pedro Alves <palves@redhat.com>
4393
4394 * linux-low.c (linux_process_qsupported): Change prototype.
4395 Adjust.
4396 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4397 Change prototype.
4398 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4399 and adjust to loop over all features.
4400 * server.c (handle_query) <qSupported>: Adjust to call
4401 target_process_qsupported once, passing it a vector of unprocessed
4402 features.
4403 * target.h (struct target_ops) <process_qsupported>: Change
4404 prototype.
4405 (target_process_qsupported): Adjust.
4406
9a084706
PA
44072015-11-19 Pedro Alves <palves@redhat.com>
4408
4409 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4410 mode.
4411 * configure: Regenerate.
4412
dad44a1f
PA
44132015-11-19 Pedro Alves <palves@redhat.com>
4414
4415 * configure: Regenerate.
4416
231c0592
YQ
44172015-11-19 Yao Qi <yao.qi@linaro.org>
4418
4419 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4420 type to uint32_t.
4421
6c1c9a8b
YQ
44222015-11-19 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4425 (struct aarch64_operand): Move enum out.
4426
9caa3311
YQ
44272015-11-19 Yao Qi <yao.qi@linaro.org>
4428
4429 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4430 struct user_fpsimd_state *.
4431 (aarch64_store_fpregset): Likewise.
4432
6a69a054
YQ
44332015-11-19 Yao Qi <yao.qi@linaro.org>
4434
4435 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4436 struct user_pt_regs *.
4437 (aarch64_store_gregset): Likewise.
4438
1798301e
PA
44392015-11-18 Pedro Alves <palves@redhat.com>
4440
4441 * Makefile.in (all_object_files): Add $IPA_OBJS.
4442
ce7715e2
PA
44432015-11-17 Pedro Alves <palves@redhat.com>
4444
4445 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4446 GDB_SIGNAL_0 and gdb_signal_to_string.
4447
c0879059
PA
44482015-11-17 Pedro Alves <palves@redhat.com>
4449
4450 * win32-low.c (handle_output_debug_string): Remove parameter.
4451 (win32_kill): Remove our_status local and adjust call to
4452 handle_output_debug_string.
4453 (get_child_debug_event): Adjust call to
4454 handle_output_debug_string.
4455
1996e237
SM
44562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4457
4458 * linux-mips-low.c (mips_fill_gregset): Add cast.
4459 (mips_store_gregset): Likewise.
4460 (mips_fill_fpregset): Likewise.
4461 (mips_store_fpregset): Likewise.
4462
cbec665b
SM
44632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4464
4465 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4466 priv.
4467
eb3e3c67
SM
44682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4469
4470 * linux-mips-low.c (mips_linux_new_thread): Change type of
4471 watch_type to enum target_hw_bp_type.
4472
171de4b8
SM
44732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4474
4475 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4476 Change return type to arm_hwbp_type.
4477
04248ead
SM
44782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4479
4480 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4481 (arm_store_gregset): Likewise.
4482 * linux-arm-low.c (arm_get_hwcap): Likewise.
4483 (arm_read_description): Likewise.
4484
04b3479c
SM
44852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4486
4487 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4488
2bc84e8a
SM
44892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4490
4491 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4492 (ppc_fill_vsxregset): Likewise.
4493 (ppc_store_vsxregset): Likewise.
4494 (ppc_fill_vrregset): Likewise.
4495 (ppc_store_vrregset): Likewise.
4496 (ppc_fill_evrregset): Likewise.
4497 (ppc_store_evrregset): Likewise.
4498
e6c5bb05
SM
44992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4500
4501 * linux-ppc-low.c (ppc_usrregs_info): Remove
4502 forward-declaration.
4503 (ppc_arch_setup): Move lower in file.
4504
7ea45d72
SM
45052015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4506
4507 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4508 (ps_pdwrite): Likewise.
4509
69291610
HW
45102015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4511
4512 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4513 to after assert checks.
4514
b42945fd
SM
45152015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4516
4517 * proc-service.c (ps_pdread): Add/adjust casts.
4518 (ps_pdwrite): Add/adjust casts.
4519
d6f85c84
SM
45202015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4521
4522 * server.c (handle_search_memory_1): Cast return value of
4523 memmem.
4524
f98cd059
SM
45252015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4526
4527 * server.c (write_qxfer_response): Change type of data to
4528 gdb_byte *.
4529
d2412fa5
PA
45302015-10-29 Pedro Alves <palves@redhat.com>
4531
4532 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4533
c17414a2
PA
45342015-10-29 Pedro Alves <palves@redhat.com>
4535
4536 * tracepoint.c (clear_installed_tracepoints): Add casts.
4537
e053fbc4
PA
45382015-10-29 Pedro Alves <palves@redhat.com>
4539
4540 * server.c (handle_v_cont, process_serial_event): Add enum
4541 gdb_signal casts to signal parsing code.
4542
add67df8
PA
45432015-10-29 Pedro Alves <palves@redhat.com>
4544
4545 * linux-low.h (NULL_REGSET): Define.
4546 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4547 * linux-arm-low.c (arm_regsets): Likewise.
4548 * linux-crisv32-low.c (cris_regsets): Likewise.
4549 * linux-m68k-low.c (m68k_regsets): Likewise.
4550 * linux-mips-low.c (mips_regsets): Likewise.
4551 * linux-nios2-low.c (nios2_regsets): Likewise.
4552 * linux-ppc-low.c (ppc_regsets): Likewise.
4553 * linux-s390-low.c (s390_regsets): Likewise.
4554 * linux-sh-low.c (sh_regsets): Likewise.
4555 * linux-sparc-low.c (sparc_regsets): Likewise.
4556 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4557 * linux-tile-low.c (tile_regsets): Likewise.
4558 * linux-x86-low.c (x86_regsets): Likewise.
4559 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4560
50bc912a
PA
45612015-10-29 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.h (NULL_REGSET): Define.
4564 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4565 * linux-arm-low.c (arm_regsets): Likewise.
4566 * linux-crisv32-low.c (cris_regsets): Likewise.
4567 * linux-m68k-low.c (m68k_regsets): Likewise.
4568 * linux-mips-low.c (mips_regsets): Likewise.
4569 * linux-nios2-low.c (nios2_regsets): Likewise.
4570 * linux-ppc-low.c (ppc_regsets): Likewise.
4571 * linux-s390-low.c (s390_regsets): Likewise.
4572 * linux-sh-low.c (sh_regsets): Likewise.
4573 * linux-sparc-low.c (sparc_regsets): Likewise.
4574 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4575 * linux-tile-low.c (tile_regsets): Likewise.
4576 * linux-x86-low.c (x86_regsets): Likewise.
4577 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4578
682b2546
DE
45792015-10-26 Doug Evans <dje@google.com>
4580
4581 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4582
963843d4
DE
45832015-10-26 Doug Evans <dje@google.com>
4584
4585 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4586
d41401ac
DE
45872015-10-26 Doug Evans <dje@google.com>
4588
4589 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4590 for debug_printf.
4591 (attach_thread, find_new_threads_callback): Ditto.
4592
3db28855
AT
45932015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4594
4595 * mem-break.h (set_breakpoint_data): Remove.
4596
fb78e89c
AT
45972015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4598
4599 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4600 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4601 (initialize_low): Remove set_breakpoint_data call.
4602 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4603 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4604 (initialize_low): Remove set_breakpoint_data call.
4605 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4606 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4607 (initialize_low): Remove set_breakpoint_data call.
4608
2e6ee069
AT
46092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4610
4611 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4612 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4613 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4614 * target.h (target_breakpoint_kind_from_pc): New macro.
4615
1652a986
AT
46162015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4617
4618 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4619 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4620 the default breakpoint kind.
4621
abeead09
AT
46222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4623
4624 * linux-arm-low.c (arm_supports_z_point_type): Add software
4625 breakpoint support.
4626
b0b4b501
AT
46272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4628
4629 * linux-arm-low.c: Refactor breakpoint definitions.
4630 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4631 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4632
8689682c
AT
46332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4634
4635 * Makefile.in: Add arm.c/o.
4636 * configure.srv: Likewise.
4637 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4638 (arm_breakpoint_kind_from_pc): New function.
4639 (arm_sw_breakpoint_from_kind): Return proper kind.
4640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4641
27165294
AT
46422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4643
4644 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4645 removal.
4646 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4647 (struct raw_breakpoint) <size>: Remove.
4648 (struct raw_breakpoint) <kind>: Add.
4649 (bp_size): New function.
4650 (bp_opcode): Likewise.
4651 (find_raw_breakpoint_at): Adjust for kind.
4652 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4653 (remove_memory_breakpoint): Adjust for kind call bp_size.
4654 (set_raw_breakpoint_at): Adjust for kind.
4655 (set_breakpoint): Likewise.
4656 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4657 (delete_raw_breakpoint): Adjust for kind.
4658 (delete_breakpoint): Likewise.
4659 (find_gdb_breakpoint): Likewise.
4660 (set_gdb_breakpoint_1): Likewise.
4661 (set_gdb_breakpoint): Likewise.
4662 (delete_gdb_breakpoint_1): Likewise.
4663 (delete_gdb_breakpoint): Likewise.
4664 (uninsert_raw_breakpoint): Likewise.
4665 (reinsert_raw_breakpoint): Likewise.
4666 (set_breakpoint_data): Remove.
4667 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4668 (check_mem_read): Adjust for kind call bp_size.
4669 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4670 (clone_one_breakpoint): Adjust for kind.
4671 * mem-break.h (set_gdb_breakpoint): Likewise.
4672 (delete_gdb_breakpoint): Likewise.
4673 * server.c (process_serial_event): Likewise.
4674
dd373349
AT
46752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4676
4677 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4678 (struct linux_target_ops) <breakpoint>: Remove.
4679 (struct linux_target_ops) <breakpoint_len>: Remove.
4680 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4681 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4682 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4683 (arm_sw_breakpoint_from_kind): New function.
4684 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4685 (struct linux_target_ops) <breakpoint>: Remove.
4686 (struct linux_target_ops) <breakpoint_len>: Remove.
4687 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4688 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4689 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4690 (struct linux_target_ops) <breakpoint>: Remove.
4691 (struct linux_target_ops) <breakpoint_len>: Remove.
4692 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4693 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4694 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4695 (struct linux_target_ops) <breakpoint>: Remove.
4696 (struct linux_target_ops) <breakpoint_len>: Remove.
4697 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4698 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4699 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4700 and sw_breakpoint_from_kind to increment the pc.
4701 (linux_breakpoint_kind_from_pc): New function.
4702 (linux_sw_breakpoint_from_kind): New function.
4703 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4704 (initialize_low): Call breakpoint_kind_from_pc and
4705 sw_breakpoint_from_kind to replace breakpoint_data/len.
4706 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4707 New field.
4708 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4709 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4710 (struct linux_target_ops) <breakpoint>: Remove.
4711 (struct linux_target_ops) <breakpoint_len>: Remove.
4712 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4713 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4714 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4715 (struct linux_target_ops) <breakpoint>: Remove.
4716 (struct linux_target_ops) <breakpoint_len>: Remove.
4717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4719 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4720 (struct linux_target_ops) <breakpoint>: Remove.
4721 (struct linux_target_ops) <breakpoint_len>: Remove.
4722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4723 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4724 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4725 (struct linux_target_ops) <breakpoint>: Remove.
4726 (struct linux_target_ops) <breakpoint_len>: Remove.
4727 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4728 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4729 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4730 (struct linux_target_ops) <breakpoint>: Remove.
4731 (struct linux_target_ops) <breakpoint_len>: Remove.
4732 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4733 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4734 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4735 (struct linux_target_ops) <breakpoint>: Remove.
4736 (struct linux_target_ops) <breakpoint_len>: Remove.
4737 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4738 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4739 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4740 (struct linux_target_ops) <breakpoint>: Remove.
4741 (struct linux_target_ops) <breakpoint_len>: Remove.
4742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4743 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4744 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4745 (struct linux_target_ops) <breakpoint>: Remove.
4746 (struct linux_target_ops) <breakpoint_len>: Remove.
4747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4748 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4749 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4750 (struct linux_target_ops) <breakpoint>: Remove.
4751 (struct linux_target_ops) <breakpoint_len>: Remove.
4752 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4753 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4754 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4755 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4756 (struct linux_target_ops) <breakpoint>: Remove.
4757 (struct linux_target_ops) <breakpoint_len>: Remove.
4758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4760 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4761 (struct linux_target_ops) <breakpoint>: Remove.
4762 (struct linux_target_ops) <breakpoint_len>: Remove.
4763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4765
4cd98a19
AT
47662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4767
4768 * linux-cris-low.c (cris_get_pc): Remove void arg.
4769
774ee6d2
AR
47702015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4771
4772 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4773 variable name.
4774
833dcd29
AR
47752015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4776
4777 * inferiors.c (thread_pid_matches_callback): New function.
4778 (find_thread_process): New function.
4779 (remove_thread): Reset current_thread.
4780 (remove_process): Assert threads have been removed first.
4781
8d689ee5
YQ
47822015-10-15 Yao Qi <yao.qi@linaro.org>
4783
4784 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4785 if it is 3.
4786 (aarch64_remove_point): Likewise.
4787 * regcache.c (regcache_register_size): New function.
4788
1c2e1515
YQ
47892015-10-12 Yao Qi <yao.qi@linaro.org>
4790
4791 * linux-aarch64-low.c: Update all callers as emit_load_store
4792 is renamed to aarch64_emit_load_store.
4793
e1c587c3
YQ
47942015-10-12 Yao Qi <yao.qi@linaro.org>
4795
4796 * linux-aarch64-low.c: Update all callers of function renaming
4797 from emit_insn to aarch64_emit_insn.
4798
b6542f81
YQ
47992015-10-12 Yao Qi <yao.qi@linaro.org>
4800
4801 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4802 arch/aarch64-insn.h.
4803 (struct aarch64_memory_operand): Likewise.
4804 (ENCODE): Likewise.
4805 (emit_insn): Move to arch/aarch64-insn.c.
4806 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4807 (emit_load_store): Move to arch/aarch64-insn.c.
4808 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4809 (can_encode_int32): Remove.
4810
246994ce
YQ
48112015-10-12 Yao Qi <yao.qi@linaro.org>
4812
4813 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4814 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4815 (aarch64_relocate_instruction): Likewise.
4816 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4817 (struct aarch64_insn_visitor): Likewise.
4818
0badd99f
YQ
48192015-10-12 Yao Qi <yao.qi@linaro.org>
4820
4821 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4822 (struct aarch64_insn_visitor): New.
4823 (struct aarch64_insn_relocation_data): New.
4824 (aarch64_ftrace_insn_reloc_b): New function.
4825 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4826 (aarch64_ftrace_insn_reloc_cb): Likewise.
4827 (aarch64_ftrace_insn_reloc_tb): Likewise.
4828 (aarch64_ftrace_insn_reloc_adr): Likewise.
4829 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4830 (aarch64_ftrace_insn_reloc_others): Likewise.
4831 (visitor): New.
4832 (aarch64_relocate_instruction): Use visitor.
4833
dfaffe9d
YQ
48342015-10-12 Yao Qi <yao.qi@linaro.org>
4835
4836 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4837 int. Add argument buf.
4838 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4839 aarch64_relocate_instruction.
4840
70b439f0
YQ
48412015-10-12 Yao Qi <yao.qi@linaro.org>
4842
4843 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4844 argument insn. Remove local variable insn. Don't call
4845 target_read_uint32.
4846 (aarch64_install_fast_tracepoint_jump_pad): Call
4847 target_read_uint32.
4848
7781c06f
YQ
48492015-09-30 Yao Qi <yao.qi@linaro.org>
4850
4851 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4852 (emit_load_store_pair): Likewise.
4853
9a3c8263
SM
48542015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4855
4856 * dll.c (match_dll): Add cast(s).
4857 (unloaded_dll): Likewise.
4858 * linux-low.c (second_thread_of_pid_p): Likewise.
4859 (delete_lwp_callback): Likewise.
4860 (count_events_callback): Likewise.
4861 (select_event_lwp_callback): Likewise.
4862 (linux_set_resume_request): Likewise.
4863 * server.c (accumulate_file_name_length): Likewise.
4864 (emit_dll_description): Likewise.
4865 (handle_qxfer_threads_worker): Likewise.
4866 (visit_actioned_threads): Likewise.
4867 * thread-db.c (any_thread_of): Likewise.
4868 * tracepoint.c (same_process_p): Likewise.
4869 (match_blocktype): Likewise.
4870 (build_traceframe_info_xml): Likewise.
4871
224c3ddb
SM
48722015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4873
4874 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4875 assignment.
4876 (gdb_unparse_agent_expr): Likewise.
4877 * hostio.c (require_data): Likewise.
4878 (handle_pread): Likewise.
4879 * linux-low.c (disable_regset): Likewise.
4880 (fetch_register): Likewise.
4881 (store_register): Likewise.
4882 (get_dynamic): Likewise.
4883 (linux_qxfer_libraries_svr4): Likewise.
4884 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4885 (set_fast_tracepoint_jump): Likewise.
4886 (uninsert_fast_tracepoint_jumps_at): Likewise.
4887 (reinsert_fast_tracepoint_jumps_at): Likewise.
4888 (validate_inserted_breakpoint): Likewise.
4889 (clone_agent_expr): Likewise.
4890 * regcache.c (init_register_cache): Likewise.
4891 * remote-utils.c (putpkt_binary_1): Likewise.
4892 (decode_M_packet): Likewise.
4893 (decode_X_packet): Likewise.
4894 (look_up_one_symbol): Likewise.
4895 (relocate_instruction): Likewise.
4896 (monitor_output): Likewise.
4897 * server.c (handle_search_memory): Likewise.
4898 (handle_qxfer_exec_file): Likewise.
4899 (handle_qxfer_libraries): Likewise.
4900 (handle_qxfer): Likewise.
4901 (handle_query): Likewise.
4902 (handle_v_cont): Likewise.
4903 (handle_v_run): Likewise.
4904 (captured_main): Likewise.
4905 * target.c (write_inferior_memory): Likewise.
4906 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4907 * tracepoint.c (init_trace_buffer): Likewise.
4908 (add_tracepoint_action): Likewise.
4909 (add_traceframe): Likewise.
4910 (add_traceframe_block): Likewise.
4911 (cmd_qtdpsrc): Likewise.
4912 (cmd_qtdv): Likewise.
4913 (cmd_qtstatus): Likewise.
4914 (response_source): Likewise.
4915 (response_tsv): Likewise.
4916 (cmd_qtnotes): Likewise.
4917 (gdb_collect): Likewise.
4918 (initialize_tracepoint): Likewise.
4919
afbe19f8
PL
49202015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4921
4922 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4923 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4924 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4925 <NOP>: New.
4926 (enum aarch64_condition_codes): New enum.
4927 (w0): New static global.
4928 (fp): Likewise.
4929 (lr): Likewise.
4930 (struct aarch64_memory_operand) <type>: New
4931 MEMORY_OPERAND_POSTINDEX type.
4932 (postindex_memory_operand): New helper function.
4933 (emit_ret): New function.
4934 (emit_load_store_pair): New function, factored out of emit_stp
4935 with support for MEMORY_OPERAND_POSTINDEX.
4936 (emit_stp): Rewrite using emit_load_store_pair.
4937 (emit_ldp): New function.
4938 (emit_load_store): Likewise.
4939 (emit_ldr): Mention post-index instruction in comment.
4940 (emit_ldrh): New function.
4941 (emit_ldrb): New function.
4942 (emit_ldrsw): Mention post-index instruction in comment.
4943 (emit_str): Likewise.
4944 (emit_subs): New function.
4945 (emit_cmp): Likewise.
4946 (emit_and): Likewise.
4947 (emit_orr): Likewise.
4948 (emit_orn): Likewise.
4949 (emit_eor): Likewise.
4950 (emit_mvn): Likewise.
4951 (emit_lslv): Likewise.
4952 (emit_lsrv): Likewise.
4953 (emit_asrv): Likewise.
4954 (emit_mul): Likewise.
4955 (emit_sbfm): Likewise.
4956 (emit_sbfx): Likewise.
4957 (emit_ubfm): Likewise.
4958 (emit_ubfx): Likewise.
4959 (emit_csinc): Likewise.
4960 (emit_cset): Likewise.
4961 (emit_nop): Likewise.
4962 (emit_ops_insns): New helper function.
4963 (emit_pop): Likewise.
4964 (emit_push): Likewise.
4965 (aarch64_emit_prologue): New function.
4966 (aarch64_emit_epilogue): Likewise.
4967 (aarch64_emit_add): Likewise.
4968 (aarch64_emit_sub): Likewise.
4969 (aarch64_emit_mul): Likewise.
4970 (aarch64_emit_lsh): Likewise.
4971 (aarch64_emit_rsh_signed): Likewise.
4972 (aarch64_emit_rsh_unsigned): Likewise.
4973 (aarch64_emit_ext): Likewise.
4974 (aarch64_emit_log_not): Likewise.
4975 (aarch64_emit_bit_and): Likewise.
4976 (aarch64_emit_bit_or): Likewise.
4977 (aarch64_emit_bit_xor): Likewise.
4978 (aarch64_emit_bit_not): Likewise.
4979 (aarch64_emit_equal): Likewise.
4980 (aarch64_emit_less_signed): Likewise.
4981 (aarch64_emit_less_unsigned): Likewise.
4982 (aarch64_emit_ref): Likewise.
4983 (aarch64_emit_if_goto): Likewise.
4984 (aarch64_emit_goto): Likewise.
4985 (aarch64_write_goto_address): Likewise.
4986 (aarch64_emit_const): Likewise.
4987 (aarch64_emit_call): Likewise.
4988 (aarch64_emit_reg): Likewise.
4989 (aarch64_emit_pop): Likewise.
4990 (aarch64_emit_stack_flush): Likewise.
4991 (aarch64_emit_zero_ext): Likewise.
4992 (aarch64_emit_swap): Likewise.
4993 (aarch64_emit_stack_adjust): Likewise.
4994 (aarch64_emit_int_call_1): Likewise.
4995 (aarch64_emit_void_call_2): Likewise.
4996 (aarch64_emit_eq_goto): Likewise.
4997 (aarch64_emit_ne_goto): Likewise.
4998 (aarch64_emit_lt_goto): Likewise.
4999 (aarch64_emit_le_goto): Likewise.
5000 (aarch64_emit_gt_goto): Likewise.
5001 (aarch64_emit_ge_got): Likewise.
5002 (aarch64_emit_ops_impl): New static global variable.
5003 (aarch64_emit_ops): New target function, return
5004 &aarch64_emit_ops_impl.
5005 (struct linux_target_ops): Install it.
5006
bb903df0
PL
50072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5008
5009 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5010 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5011 aarch64-ipa.o.
5012 * linux-aarch64-ipa.c: New file.
5013 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5014 and endian.h.
5015 (aarch64_get_thread_area): New target method.
5016 (extract_signed_bitfield): New helper function.
5017 (aarch64_decode_ldr_literal): New function.
5018 (enum aarch64_opcodes): New enum.
5019 (struct aarch64_register): New struct.
5020 (struct aarch64_operand): New struct.
5021 (x0): New static global.
5022 (x1): Likewise.
5023 (x2): Likewise.
5024 (x3): Likewise.
5025 (x4): Likewise.
5026 (w2): Likewise.
5027 (ip0): Likewise.
5028 (sp): Likewise.
5029 (xzr): Likewise.
5030 (aarch64_register): New helper function.
5031 (register_operand): Likewise.
5032 (immediate_operand): Likewise.
5033 (struct aarch64_memory_operand): New struct.
5034 (offset_memory_operand): New helper function.
5035 (preindex_memory_operand): Likewise.
5036 (enum aarch64_system_control_registers): New enum.
5037 (ENCODE): New macro.
5038 (emit_insn): New helper function.
5039 (emit_b): New function.
5040 (emit_bcond): Likewise.
5041 (emit_cb): Likewise.
5042 (emit_tb): Likewise.
5043 (emit_blr): Likewise.
5044 (emit_stp): Likewise.
5045 (emit_ldp_q_offset): Likewise.
5046 (emit_stp_q_offset): Likewise.
5047 (emit_load_store): Likewise.
5048 (emit_ldr): Likewise.
5049 (emit_ldrsw): Likewise.
5050 (emit_str): Likewise.
5051 (emit_ldaxr): Likewise.
5052 (emit_stxr): Likewise.
5053 (emit_stlr): Likewise.
5054 (emit_data_processing_reg): Likewise.
5055 (emit_data_processing): Likewise.
5056 (emit_add): Likewise.
5057 (emit_sub): Likewise.
5058 (emit_mov): Likewise.
5059 (emit_movk): Likewise.
5060 (emit_mov_addr): Likewise.
5061 (emit_mrs): Likewise.
5062 (emit_msr): Likewise.
5063 (emit_sevl): Likewise.
5064 (emit_wfe): Likewise.
5065 (append_insns): Likewise.
5066 (can_encode_int32_in): New helper function.
5067 (aarch64_relocate_instruction): New function.
5068 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5069 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5070 (struct linux_target_ops): Install aarch64_get_thread_area,
5071 aarch64_install_fast_tracepoint_jump_pad and
5072 aarch64_get_min_fast_tracepoint_insn_len.
5073
787749ea
PL
50742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5075
5076 * Makefile.in (aarch64-insn.o): New rule.
5077 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5078
9812b2e6
YQ
50792015-09-21 Yao Qi <yao.qi@linaro.org>
5080
5081 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5082
18fe412b
YQ
50832015-09-21 Yao Qi <yao.qi@linaro.org>
5084
5085 * tracepoint.c (max_jump_pad_size): Remove.
5086
a0cc84cd
YQ
50872015-09-18 Yao Qi <yao.qi@linaro.org>
5088
5089 * linux-aarch64-low.c: Don't include sys/uio.h.
5090 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5091
d78908cf
WW
50922015-09-16 Wei-cheng Wang <cole945@gmail.com>
5093
5094 * tracepoint.c (eval_result_type): Change prototype.
5095 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5096
d57e0d50
PA
50972015-09-15 Pedro Alves <palves@redhat.com>
5098
5099 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5100 Check whether to report exec events instead of checking whether
5101 multiprocess is enabled.
5102
5a676acc
PA
51032015-09-15 Pedro Alves <palves@redhat.com>
5104
5105 PR remote/18965
5106 * remote-utils.c (prepare_resume_reply): Merge
5107 TARGET_WAITKIND_VFORK_DONE switch case with the
5108 TARGET_WAITKIND_FORKED case.
5109
7c5d0fad
YQ
51102015-09-15 Yao Qi <yao.qi@linaro.org>
5111
5112 * server.c (handle_query): Check string comparison using
5113 "else if" instead of "if".
5114
750ce8d1
YQ
51152015-09-15 Yao Qi <yao.qi@linaro.org>
5116
5117 * server.c (vCont_supported): New global variable.
5118 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5119 matches. Append ";vContSupported+" to own_buf.
5120 (handle_v_requests): Append ";s;S" to own_buf if target supports
5121 hardware single step or vCont_supported is false.
5122 (capture_main): Set vCont_supported to zero.
5123
70b90b91
YQ
51242015-09-15 Yao Qi <yao.qi@linaro.org>
5125
5126 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5127 it to ...
5128 (linux_supports_hardware_single_step): ... New function.
5129 (linux_target_ops): Update.
5130 * lynx-low.c (lynx_target_ops): Set field
5131 supports_hardware_single_step to target_can_do_hardware_single_step.
5132 * nto-low.c (nto_target_ops): Likewise.
5133 * spu-low.c (spu_target_ops): Likewise.
5134 * win32-low.c (win32_target_ops): Likewise.
5135 * target.c (target_can_do_hardware_single_step): New function.
5136 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5137 Remove. <supports_hardware_single_step>: New field.
5138 (target_supports_conditional_breakpoints): Remove.
5139 (target_supports_hardware_single_step): New macro.
5140 (target_can_do_hardware_single_step): Declare.
5141 * server.c (handle_query): Use target_supports_hardware_single_step
5142 instead of target_supports_conditional_breakpoints.
5143
ade90bde
YQ
51442015-09-15 Yao Qi <yao.qi@linaro.org>
5145
5146 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5147 function.
5148 (struct linux_target_ops the_low_target): Install
5149 aarch64_linux_siginfo_fixup.
5150
94585166
DB
51512015-09-11 Don Breazeal <donb@codesourcery.com>
5152 Luis Machado <lgustavo@codesourcery.com>
5153
5154 * linux-low.c (linux_mourn): Static declaration.
5155 (linux_arch_setup): Move in front of
5156 handle_extended_wait.
5157 (linux_arch_setup_thread): New function.
5158 (handle_extended_wait): Handle exec events. Call
5159 linux_arch_setup_thread. Make event_lwp argument a
5160 pointer-to-a-pointer.
5161 (check_zombie_leaders): Do not check stopped threads.
5162 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5163 (linux_low_filter_event): Add lwp and thread for exec'ing
5164 non-leader thread if leader thread has been deleted.
5165 Refactor code into linux_arch_setup_thread and call it.
5166 Pass child lwp pointer by reference to handle_extended_wait.
5167 (linux_wait_for_event_filtered): Update comment.
5168 (linux_wait_1): Prevent clobbering exec event status.
5169 (linux_supports_exec_events): New function.
5170 (linux_target_ops) <supports_exec_events>: Initialize new member.
5171 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5172 new member.
5173 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5174 * server.c (report_exec_events): New global variable.
5175 (handle_query): Handle qSupported query for exec-events feature.
5176 (captured_main): Initialize report_exec_events.
5177 * server.h (report_exec_events): Declare new global variable.
5178 * target.h (struct target_ops) <supports_exec_events>: New
5179 member.
5180 (target_supports_exec_events): New macro.
5181 * win32-low.c (win32_target_ops) <supports_exec_events>:
5182 Initialize new member.
5183
0568462b
MM
51842015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5185
5186 * linux-low.c (linux_low_enable_btrace): Remove.
5187 (linux_target_ops): Replace linux_low_enable_btrace with
5188 linux_enable_btrace.
5189
39edd165
YQ
51902015-09-03 Yao Qi <yao.qi@linaro.org>
5191
5192 * linux-aarch64-low.c (aarch64_insert_point): Call
5193 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5194 returns true.
5195
1db33b5a
UW
51962015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5197
5198 * linux-low.c (check_stopped_by_breakpoint): Use
5199 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5200
ab290430
PA
52012015-08-27 Pedro Alves <palves@redhat.com>
5202
5203 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5204
8d749320
SM
52052015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5206
6711b7f8
SM
5207 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5208 the XNEW-family equivalent.
8d749320
SM
5209 (compile_bytecodes): Likewise.
5210 * dll.c (loaded_dll): Likewise.
5211 * event-loop.c (append_callback_event): Likewise.
5212 (create_file_handler): Likewise.
5213 (create_file_event): Likewise.
5214 * hostio.c (handle_open): Likewise.
5215 * inferiors.c (add_thread): Likewise.
5216 (add_process): Likewise.
5217 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5218 * linux-arm-low.c (arm_new_process): Likewise.
5219 (arm_new_thread): Likewise.
5220 * linux-low.c (add_to_pid_list): Likewise.
5221 (linux_add_process): Likewise.
5222 (handle_extended_wait): Likewise.
5223 (add_lwp): Likewise.
5224 (enqueue_one_deferred_signal): Likewise.
5225 (enqueue_pending_signal): Likewise.
5226 (linux_resume_one_lwp_throw): Likewise.
5227 (linux_resume_one_thread): Likewise.
5228 (linux_read_memory): Likewise.
5229 (linux_write_memory): Likewise.
5230 * linux-mips-low.c (mips_linux_new_process): Likewise.
5231 (mips_linux_new_thread): Likewise.
5232 (mips_add_watchpoint): Likewise.
5233 * linux-x86-low.c (initialize_low_arch): Likewise.
5234 * lynx-low.c (lynx_add_process): Likewise.
5235 * mem-break.c (set_raw_breakpoint_at): Likewise.
5236 (set_breakpoint): Likewise.
5237 (add_condition_to_breakpoint): Likewise.
5238 (add_commands_to_breakpoint): Likewise.
5239 (clone_agent_expr): Likewise.
5240 (clone_one_breakpoint): Likewise.
5241 * regcache.c (new_register_cache): Likewise.
5242 * remote-utils.c (look_up_one_symbol): Likewise.
5243 * server.c (queue_stop_reply): Likewise.
5244 (start_inferior): Likewise.
5245 (queue_stop_reply_callback): Likewise.
5246 (handle_target_event): Likewise.
5247 * spu-low.c (fetch_ppc_memory): Likewise.
5248 (store_ppc_memory): Likewise.
5249 * target.c (set_target_ops): Likewise.
5250 * thread-db.c (thread_db_load_search): Likewise.
5251 (try_thread_db_load_1): Likewise.
5252 * tracepoint.c (add_tracepoint): Likewise.
5253 (add_tracepoint_action): Likewise.
5254 (create_trace_state_variable): Likewise.
5255 (cmd_qtdpsrc): Likewise.
5256 (cmd_qtro): Likewise.
5257 (add_while_stepping_state): Likewise.
5258 * win32-low.c (child_add_thread): Likewise.
5259 (get_image_name): Likewise.
5260
ed8b7b42
YQ
52612015-08-25 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5264
db3cb7cb
YQ
52652015-08-25 Yao Qi <yao.qi@linaro.org>
5266
5267 * Makefile.in (aarch64-linux.o): New rule.
5268 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5269 srv_tgtobj.
5270 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5271 (aarch64_init_debug_reg_state): Make it extern.
5272 (aarch64_linux_prepare_to_resume): Remove.
5273
f6011a1c
YQ
52742015-08-25 Yao Qi <yao.qi@linaro.org>
5275
5276 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5277 lwp_arch_private_info and ptid_of_lwp.
5278
88e2cf7e
YQ
52792015-08-25 Yao Qi <yao.qi@linaro.org>
5280
5281 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5282 Find proc_info by find_process_pid. All callers updated.
5283
5e35436e
YQ
52842015-08-25 Yao Qi <yao.qi@linaro.org>
5285
5286 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5287 Remove.
5288 (debug_reg_change_callback): Remove.
5289 (aarch64_notify_debug_reg_change): Remove.
5290
4a8a7965
YQ
52912015-08-25 Yao Qi <yao.qi@linaro.org>
5292
5293 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5294 Call current_lwp_ptid.
5295
32a271ee
YQ
52962015-08-25 Yao Qi <yao.qi@linaro.org>
5297
5298 * linux-aarch64-low.c (debug_reg_change_callback): Use
5299 debug_printf.
5300
0d51c8d7
YQ
53012015-08-25 Yao Qi <yao.qi@linaro.org>
5302
5303 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5304
31a43dd5
YQ
53052015-08-25 Yao Qi <yao.qi@linaro.org>
5306
5307 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5308
8ee52567
YQ
53092015-08-25 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5312 the code.
5313
ff3f0f45
YQ
53142015-08-25 Yao Qi <yao.qi@linaro.org>
5315
5316 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5317 Remove.
5318 (debug_reg_change_callback): Remove argument entry and add argument
5319 lwp. Remove local variable thread. Don't print thread id in the
5320 debugging output. Don't check whether pid of thread equals to pid.
5321 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5322 iterate_over_lwps instead find_inferior.
5323
3d40fbb5
PA
53242015-08-24 Pedro Alves <palves@redhat.com>
5325
5326 * inferiors.c (get_first_process): New function.
5327 * inferiors.h (get_first_process): New declaration.
5328 * remote-utils.c (read_ptid): Default to the first process in the
5329 list, instead of to the current thread's process.
5330
438e1e42
PA
53312015-08-24 Pedro Alves <palves@redhat.com>
5332
5333 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5334 * event-loop.c: Likewise.
5335 * remote-utils.c: Likewise.
5336 * tracepoint.c: Likewise.
5337
a8c6d4fc
PA
53382015-08-24 Pedro Alves <palves@redhat.com>
5339
5340 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5341 ptid_get_lwp.
5342
99b0bb12
PA
53432015-08-21 Pedro Alves <palves@redhat.com>
5344
5345 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5346 instead of literal 1.
5347
f8904751
PA
53482015-08-21 Pedro Alves <palves@redhat.com>
5349
5350 * tdesc.c (default_description): Explicitly zero-initialize.
5351
465a859e
PA
53522015-08-21 Pedro Alves <palves@redhat.com>
5353
5354 PR gdb/18749
5355 * inferiors.c (remove_thread): Discard any pending stop reply for
5356 this thread.
5357 * server.c (remove_all_on_match_pid): Rename to ...
5358 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5359 instead of a pid.
5360 (discard_queued_stop_replies): Change parameter to a ptid. Now
5361 extern.
5362 (handle_v_kill, kill_inferior_callback, captured_main)
5363 (process_serial_event): Adjust.
5364 * server.h (discard_queued_stop_replies): Declare.
5365
f0db101d
PA
53662015-08-21 Pedro Alves <palves@redhat.com>
5367
5368 * linux-low.c (wait_for_sigstop): Always switch to no thread
5369 selected if the previously current thread dies.
5370 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5371 process instead of the current thread's.
5372 * remote-utils.c (input_interrupt): Don't check if there's no
5373 current thread.
5374 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5375 current thread to the general thread fails, error out.
5376 (handle_qxfer_auxv, handle_qxfer_libraries)
5377 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5378 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5379 (handle_query): Check if there's a thread selected instead of
5380 checking whether there's any thread in the thread list.
5381 (handle_qxfer_threads, handle_qxfer_btrace)
5382 (handle_qxfer_btrace_conf): Don't error out early if there's no
5383 thread in the thread list.
5384 (handle_v_cont, myresume): Don't set the current thread to the
5385 continue thread.
5386 (process_serial_event) <Hg handling>: Also set thread_id if the
5387 previous general thread is still alive.
5388 (process_serial_event) <g/G handling>: If setting the current
5389 thread to the general thread fails, error out.
5390 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5391 thread's lwp instead of the current thread's.
5392 * target.c (set_desired_thread): If the desired thread was not
5393 found, leave the current thread pointing to NULL. Return an int
5394 (boolean) indicating success.
5395 * target.h (set_desired_thread): Change return type to int.
5396
40045d91
MF
53972015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5398
5399 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5400 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5401 #includes.
5402 (ps_get_thread_area): New function.
5403
45face3b
GB
54042015-08-19 Gary Benson <gbenson@redhat.com>
5405
5406 * hostio.c (handle_pread): Do not attempt to read more data
5407 than hostio_reply_with_data can fit in a packet.
5408
16d5f642
JB
54092015-08-18 Joel Brobecker <brobecker@adacore.com>
5410
5411 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5412
a738da3a
MF
54132015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5414
5415 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5416
33ebda9d
PA
54172015-08-06 Pedro Alves <palves@redhat.com>
5418
5419 * tracepoint.c (expr_eval_result): Now an int.
5420
a44892be
PA
54212015-08-06 Pedro Alves <palves@redhat.com>
5422
5423 * gdbthread.h (struct regcache): Forward declare.
5424 (struct thread_info) <regcache_data>: Now a struct regcache
5425 pointer.
5426 * inferiors.c (inferior_regcache_data)
5427 (set_inferior_regcache_data): Now work with struct regcache
5428 pointers.
5429 * inferiors.h (struct regcache): Forward declare.
5430 (inferior_regcache_data, set_inferior_regcache_data): Now work
5431 with struct regcache pointers.
5432 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5433 (free_register_cache_thread): Remove struct regcache pointer
5434 casts.
5435
608a1e46
PA
54362015-08-06 Pedro Alves <palves@redhat.com>
5437
5438 * server.c (captured_main): On error, print the exception message
5439 to stderr, and if run_once is set, throw a quit.
5440
f0ce0d3a
PA
54412015-08-06 Pedro Alves <palves@redhat.com>
5442
5443 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5444 the current thread.
5445
bf47e248
PA
54462015-08-06 Pedro Alves <palves@redhat.com>
5447
5448 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5449 reading beyond the passed in buffer length.
5450
b6b9ffcc
PL
54512015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5452
5453 * tracepoint.c (symbol_list) <required>: Remove.
5454
863d01bd
PA
54552015-08-06 Pedro Alves <palves@redhat.com>
5456
5457 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5458 count if stopping and suspending threads.
5459 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5460 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5461 (linux_detach): Complete an ongoing step-over.
5462 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5463 throughout.
5464 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5465 (linux_wait_1): If passing a signal to the inferior after
5466 finishing a step-over, unsuspend and re-resume all lwps. If we
5467 see a single-step event but the thread should be continuing, don't
5468 pass the trap to gdb.
5469 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5470 internal_error instead of gdb_assert.
5471 (enqueue_pending_signal): New function.
5472 (check_ptrace_stopped_lwp_gone): Add debug output.
5473 (start_step_over): Use internal_error instead of gdb_assert.
5474 (complete_ongoing_step_over): New function.
5475 (linux_resume_one_thread): Don't resume a suspended thread.
5476 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5477 it stepping.
5478
00db26fa
PA
54792015-08-06 Pedro Alves <palves@redhat.com>
5480
5481 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5482 (linux_thread_alive): Use lwp_is_marked_dead.
5483 (extended_event_reported): Delete.
5484 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5485 instead of extended_event_reported.
5486 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5487 as well.
5488 (lwp_is_marked_dead): New function.
5489 (lwp_running): Use lwp_is_marked_dead.
5490 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5491 comment.
5492
ad071a30
PA
54932015-08-06 Pedro Alves <palves@redhat.com>
5494
5495 * linux-low.c (linux_wait_1): Move fork event output out of the
5496 !report_to_gdb check. Pass event_child->waitstatus to
5497 target_waitstatus_to_string instead of ourstatus.
5498
524b57e6
YQ
54992015-08-04 Yao Qi <yao.qi@linaro.org>
5500
5501 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5502 if current_thread is 32 bit.
5503
6085d6f6
YQ
55042015-08-04 Yao Qi <yao.qi@linaro.org>
5505
5506 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5507 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5508 * server.c (extended_protocol): Remove "static".
5509 * server.h (extended_protocol): Declare it.
5510
8a7e4587
YQ
55112015-08-04 Yao Qi <yao.qi@linaro.org>
5512
5513 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5514 both aarch64 and aarch32.
5515 (aarch64_set_pc): Likewise.
5516
3b53ae99
YQ
55172015-08-04 Yao Qi <yao.qi@linaro.org>
5518
5519 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5520 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5521 arm-with-neon.xml to srv_xmlfiles.
5522 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5523 (is_64bit_tdesc): New function.
5524 (aarch64_linux_read_description): New function.
5525 (aarch64_arch_setup): Call aarch64_linux_read_description.
5526 (regs_info): Rename to regs_info_aarch64.
5527 (aarch64_regs_info): Return right regs_info.
5528 (initialize_low_arch): Call initialize_low_arch_aarch32.
5529
bd9e6534
YQ
55302015-08-04 Yao Qi <yao.qi@linaro.org>
5531
5532 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5533 * linux-aarch32-low.c: New file.
5534 * linux-aarch32-low.h: New file.
5535 * linux-arm-low.c (arm_fill_gregset): Move it to
5536 linux-aarch32-low.c.
5537 (arm_store_gregset): Likewise.
5538 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5539 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5540 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5541 (regs_info): Rename to regs_info_arm.
5542 (arm_regs_info): Return regs_info_aarch32 if
5543 have_ptrace_getregset is 1 and target description is
5544 arm_with_neon or arm_with_vfpv3.
5545 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5546 Call initialize_low_arch_aarch32 instead.
5547
ded48a5e
YQ
55482015-08-04 Yao Qi <yao.qi@linaro.org>
5549
5550 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5551 * linux-low.c: ... here.
5552 * linux-low.h (have_ptrace_getregset): Declare it.
5553
96e9210f
PA
55542015-08-04 Pedro Alves <palves@redhat.com>
5555
5556 * thread-db.c (struct thread_db): Use new typedefs.
5557 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5558 CHK calls.
5559 (disable_thread_event_reporting): Cast result of dlsym to
5560 destination function pointer type.
5561 (thread_db_mourn): Use td_ta_delete_ftype.
5562
af60a1ef
SL
55632015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5564
5565 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5566 arch variant.
5567 (CDX_BREAKPOINT): Define for R2.
5568 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5569 (the_low_target): Add comments.
5570
e8b41681
YQ
55712015-07-30 Yao Qi <yao.qi@linaro.org>
5572
5573 * linux-arm-low.c (arm_hwcap): Remove it.
5574 (arm_read_description): New local variable arm_hwcap. Don't
5575 set arm_hwcap to zero.
5576
89abb039
YQ
55772015-07-30 Yao Qi <yao.qi@linaro.org>
5578
5579 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5580 Use regcache->tdesc instead.
5581 (arm_store_wmmxregset): Likewise.
5582 (arm_fill_vfpregset): Likewise.
5583 (arm_store_vfpregset): Likewise.
5584
deca266c
YQ
55852015-07-30 Yao Qi <yao.qi@linaro.org>
5586
5587 * linux-arm-low.c: Include arch/arm.h.
5588 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5589 (arm_store_gregset): Likewise.
5590
aa58a496
SM
55912015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5592
5593 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5594 ptrace's 4th parameter.
5595
50904b25
YQ
55962015-07-27 Yao Qi <yao.qi@linaro.org>
5597
5598 * configure.srv (case aarch64*-*-linux*): Don't set
5599 srv_linux_usrregs.
5600
5826e159
PA
56012015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5602
5603 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5604 sys/ptrace.h.
5605 * linux-arm-low.c: Likewise.
5606 * linux-cris-low.c: Likewise.
5607 * linux-crisv32-low.c: Likewise.
5608 * linux-low.c: Likewise.
5609 * linux-m68k-low.c: Likewise.
5610 * linux-mips-low.c: Likewise.
5611 * linux-nios2-low.c: Likewise.
5612 * linux-s390-low.c: Likewise.
5613 * linux-sparc-low.c: Likewise.
5614 * linux-tic6x-low.c: Likewise.
5615 * linux-tile-low.c: Likewise.
5616 * linux-x86-low.c: Likewise.
5617
54019719
PA
56182015-07-24 Pedro Alves <palves@redhat.com>
5619
5620 * config.in: Regenerate.
5621 * configure: Regenerate.
5622
eb7aa561
PA
56232015-07-24 Pedro Alves <palves@redhat.com>
5624
5625 * acinclude.m4: Include ../ptrace.m4.
5626 * configure.ac: Call GDB_AC_PTRACE.
5627 * config.in, configure: Regenerate.
5628
55d7b841
YQ
56292015-07-24 Yao Qi <yao.qi@linaro.org>
5630
5631 * linux-low.c (linux_create_inferior): Remove setting to
5632 proc->priv->new_inferior.
5633 (linux_attach): Likewise.
5634 (linux_low_filter_event): Likewise.
5635 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5636
c06cbd92
YQ
56372015-07-24 Yao Qi <yao.qi@linaro.org>
5638
5639 * linux-low.c (linux_arch_setup): New function.
5640 (linux_low_filter_event): If proc->tdesc is NULL and
5641 proc->attached is true, call the_low_target.arch_setup.
5642 Otherwise, keep status pending, and return.
5643 (linux_resume_one_lwp_throw): Don't call get_pc if
5644 thread->while_stepping isn't NULL. Don't call
5645 get_thread_regcache if proc->tdesc is NULL.
5646 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5647 (linux_target_ops): Install arch_setup.
5648 * server.c (start_inferior): Call the_target->arch_setup.
5649 * target.h (struct target_ops) <arch_setup>: New field.
5650 (target_arch_setup): New marco.
5651 * lynx-low.c (lynx_target_ops): Update.
5652 * nto-low.c (nto_target_ops): Update.
5653 * spu-low.c (spu_target_ops): Update.
5654 * win32-low.c (win32_target_ops): Update.
5655
5ae3ebba
YQ
56562015-07-24 Yao Qi <yao.qi@linaro.org>
5657
5658 * linux-low.c (linux_add_process): Don't set
5659 proc->priv->new_inferior.
5660 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5661 (linux_attach): Likewise.
5662
eb97750b
YQ
56632015-07-24 Yao Qi <yao.qi@linaro.org>
5664
5665 * server.c (start_inferior): Code refactor.
5666
51aee833
YQ
56672015-07-24 Yao Qi <yao.qi@linaro.org>
5668
5669 * server.c (process_serial_event): Set general_thread.
5670
af1b22f3
YQ
56712015-07-21 Yao Qi <yao.qi@linaro.org>
5672
5673 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5674 aarch64_linux_get_debug_reg_capacity.
5675
554717a3
YQ
56762015-07-17 Yao Qi <yao.qi@linaro.org>
5677
5678 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5679 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5680 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5681 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5682 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5683 (AARCH64_HWP_ALIGNMENT): Likewise.
5684 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5685 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5686 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5687 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5688 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5689 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5690 (struct aarch64_debug_reg_state): Likewise.
5691 (struct arch_lwp_info): Likewise.
5692 (aarch64_align_watchpoint): Likewise.
5693 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5694 (aarch64_watchpoint_length): Likewise.
5695 (aarch64_point_encode_ctrl_reg): Likewise
5696 (aarch64_point_is_aligned): Likewise.
5697 (aarch64_align_watchpoint): Likewise.
5698 (aarch64_linux_set_debug_regs):
5699 (aarch64_dr_state_insert_one_point): Likewise.
5700 (aarch64_dr_state_remove_one_point): Likewise.
5701 (aarch64_handle_breakpoint): Likewise.
5702 (aarch64_handle_aligned_watchpoint): Likewise.
5703 (aarch64_handle_unaligned_watchpoint): Likewise.
5704 (aarch64_handle_watchpoint): Likewise.
5705
c67ca4de
YQ
57062015-07-17 Yao Qi <yao.qi@linaro.org>
5707
5708 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5709 and don't aarch64_get_debug_reg_state. All callers update.
5710 (aarch64_handle_aligned_watchpoint): Likewise.
5711 (aarch64_handle_unaligned_watchpoint): Likewise.
5712 (aarch64_handle_watchpoint): Likewise.
5713 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5714 (aarch64_remove_point): Likewise.
5715
25abf979
YQ
57162015-07-17 Yao Qi <yao.qi@linaro.org>
5717
5718 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5719 debug_printf.
5720 (aarch64_handle_unaligned_watchpoint): Likewise.
5721
db1ff28b
JK
57222015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5723
5724 Revert the previous 3 commits:
5725 Move gdb_regex* to common/
5726 Move linux_find_memory_regions_full & co.
5727 gdbserver build-id attribute generator
5728
700ca40f
JK
57292015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5730 Jan Kratochvil <jan.kratochvil@redhat.com>
5731
5732 gdbserver build-id attribute generator.
5733 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5734 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5735 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5736 (find_phdr): New.
5737 (get_dynamic): Use find_pdhr to traverse program headers.
5738 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5739 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5740 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5741 (get_hex_build_id): New.
5742 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5743 to reply XML document.
5744
9904185c
JK
57452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5746 Jan Kratochvil <jan.kratochvil@redhat.com>
5747
5748 * target.c: Include target/target-utils.h and fcntl.h.
5749 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5750 (target_fileio_read_stralloc): New functions.
5751
6e5b4429
JK
57522015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5753
5754 * Makefile.in (OBS): Add gdb_regex.o.
5755 (gdb_regex.o): New.
5756 * config.in: Rebuilt.
5757 * configure: Rebuilt.
5758
ddc98fbf
JK
57592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5760 Jan Kratochvil <jan.kratochvil@redhat.com>
5761
5762 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5763 * Makefile.in (OBS): Add target-utils.o.
5764 (linux-maps.o, target-utils.o): New.
5765 * configure.srv (srv_linux_obj): Add linux-maps.o.
5766
e57bb7a0
PL
57672015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5768
5769 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5770 function, return 1.
5771 (the_low_target): Install it.
5772
586b02a9
PA
57732015-07-14 Pedro Alves <palves@redhat.com>
5774
5775 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5776 Instead, ignore ECHILD, and throw an error for other errnos.
5777
58c1b36c
PA
57782015-07-10 Pedro Alves <palves@redhat.com>
5779
5780 * event-loop.c (struct callback_event) <data>: Change type to
5781 gdb_client_data instance instead of gdb_client_data pointer.
5782 (append_callback_event): Adjust.
5783
421530db
PL
57842015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5785
5786 * linux-aarch64-low.c: Add comments for each linux_target_ops
5787 method. Remove comments already covered in target_ops and
5788 linux_target_ops definitions.
5789 (the_low_target): Add comments for each unimplemented method.
5790
c2d65f38
YQ
57912015-07-09 Yao Qi <yao.qi@linaro.org>
5792
5793 * linux-aarch64-low.c (aarch64_regmap): Remove.
5794 (aarch64_usrregs_info): Remove.
5795 (regs_info): Set field usrregs to NULL.
5796
b20a6524
MM
57972015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5798
5799 * linux-low.c: Include "rsp-low.h"
5800 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5801 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5802 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5803 (handle_btrace_enable_pt): New.
5804 (handle_btrace_general_set): Support "pt".
5805 (handle_btrace_conf_general_set): Support "pt:size".
5806
96c97461
PL
58072015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5808
5809 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5810 Z_PACKET_SW_BP.
5811
37d66942
PL
58122015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5813
5814 * linux-aarch64-low.c: Remove comment about endianness.
5815 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5816 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5817 memcmp.
5818
dc06243f
GB
58192015-06-24 Gary Benson <gbenson@redhat.com>
5820
5821 * linux-i386-ipa.c (stdint.h): Do not include.
5822 * lynx-i386-low.c (stdint.h): Likewise.
5823 * lynx-ppc-low.c (stdint.h): Likewise.
5824 * mem-break.c (stdint.h): Likewise.
5825 * thread-db.c (stdint.h): Likewise.
5826 * tracepoint.c (stdint.h): Likewise.
5827 * win32-low.c (stdint.h): Likewise.
5828
124e13d9
SM
58292015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5830
5831 * server.c (write_qxfer_response): Update call to
5832 remote_escape_output.
5833
909c2cda
JK
58342015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5835 Jan Kratochvil <jan.kratochvil@redhat.com>
5836
5837 Merge multiple hex conversions.
5838 * gdbreplay.c (tohex): Rename to 'fromhex'.
5839 (logchar): Use fromhex.
5840
24c05f46
JK
58412015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5842
5843 * server.c (handle_qxfer_libraries): Set `version' attribute for
5844 <library-list>.
5845
14d2069a
GB
58462015-06-10 Gary Benson <gbenson@redhat.com>
5847
5848 * target.h (struct target_ops) <multifs_open>: New field.
5849 <multifs_unlink>: Likewise.
5850 <multifs_readlink>: Likewise.
5851 * linux-low.c (nat/linux-namespaces.h): New include.
5852 (linux_target_ops): Initialize the_target->multifs_open,
5853 the_target->multifs_unlink and the_target->multifs_readlink.
5854 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5855 * hostio.c (hostio_fs_pid): New static variable.
5856 (hostio_handle_new_gdb_connection): New function.
5857 (handle_setfs): Likewise.
5858 (handle_open): Use the_target->multifs_open as appropriate.
5859 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5860 (handle_readlink): Use the_target->multifs_readlink as
5861 appropriate.
5862 (handle_vFile): Handle vFile:setfs packets.
5863 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5864 after target_handle_new_gdb_connection.
5865
4b8b5e72
GB
58662015-06-10 Gary Benson <gbenson@redhat.com>
5867
5868 * configure.ac (AC_CHECK_FUNCS): Add setns.
5869 * config.in: Regenerate.
5870 * configure: Likewise.
5871 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5872 (linux-namespaces.o): New rule.
5873 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5874
3ac2e371
GB
58752015-06-09 Gary Benson <gbenson@redhat.com>
5876
5877 * hostio.c (handle_open): Process mode argument with
5878 fileio_to_host_mode.
5879
ca9b78ce
YQ
58802015-06-01 Yao Qi <yao.qi@linaro.org>
5881
5882 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5883 * linux-x86-low.c: Likewise.
5884
bfacd19d
DB
58852015-05-28 Don Breazeal <donb@codesourcery.com>
5886
5887 * linux-low.c (handle_extended_wait): Initialize
5888 thread_info.last_resume_kind for new fork children.
5889
452003ef
PA
58902015-05-15 Pedro Alves <palves@redhat.com>
5891
5892 * target.h (target_handle_new_gdb_connection): Rewrite using if
5893 wrapped in do/while.
5894
1041a03c
JB
58952015-05-14 Joel Brobecker <brobecker@adacore.com>
5896
5897 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5898 * configure, config.in: Regenerate.
5899 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5900 Declare typedef.
5901
c269dbdb
DB
59022015-05-12 Don Breazeal <donb@codesourcery.com>
5903
5904 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5905 PTRACE_EVENT_VFORK_DONE.
5906 (linux_low_ptrace_options, extended_event_reported): Add vfork
5907 events.
5908 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5909 and "vforkdone" for RSP 'T' Stop Reply Packet.
5910 * server.h (report_vfork_events): Declare
5911 global variable.
5912
3a8a0396
DB
59132015-05-12 Don Breazeal <donb@codesourcery.com>
5914
5915 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5916 (the_low_target) <new_fork>: Initialize new member.
5917 * linux-arm-low.c (arm_new_fork): New function.
5918 (the_low_target) <new_fork>: Initialize new member.
5919 * linux-low.c (handle_extended_wait): Call new target function
5920 new_fork.
5921 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5922 * linux-mips-low.c (mips_add_watchpoint): New function
5923 extracted from mips_insert_point.
5924 (the_low_target) <new_fork>: Initialize new member.
5925 (mips_linux_new_fork): New function.
5926 (mips_insert_point): Call mips_add_watchpoint.
5927 * linux-x86-low.c (x86_linux_new_fork): New function.
5928 (the_low_target) <new_fork>: Initialize new member.
5929
de0d863e
DB
59302015-05-12 Don Breazeal <donb@codesourcery.com>
5931
5932 * linux-low.c (handle_extended_wait): Implement return value,
5933 rename argument 'event_child' to 'event_lwp', handle
5934 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5935 (linux_low_ptrace_options): New function.
5936 (linux_low_filter_event): Call linux_low_ptrace_options,
5937 use different argument fo linux_enable_event_reporting,
5938 use return value from handle_extended_wait.
5939 (extended_event_reported): New function.
5940 (linux_wait_1): Call extended_event_reported and set
5941 status to report fork events.
5942 (linux_write_memory): Add pid to debug message.
5943 (reset_lwp_ptrace_options_callback): New function.
5944 (linux_handle_new_gdb_connection): New function.
5945 (linux_target_ops): Initialize new structure member.
5946 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5947 * lynx-low.c: Initialize new structure member.
5948 * remote-utils.c (prepare_resume_reply): Implement stop reason
5949 "fork" for "T" stop message.
5950 * server.c (handle_query): Call handle_new_gdb_connection.
5951 * server.h (report_fork_events): Declare global flag.
5952 * target.h (struct target_ops) <handle_new_gdb_connection>:
5953 New member.
5954 (target_handle_new_gdb_connection): New macro.
5955 * win32-low.c: Initialize new structure member.
5956
ddcbc397
DB
59572015-05-12 Don Breazeal <donb@codesourcery.com>
5958
5959 * mem-break.c (APPEND_TO_LIST): Define macro.
5960 (clone_agent_expr): New function.
5961 (clone_one_breakpoint): New function.
5962 (clone_all_breakpoints): New function.
5963 * mem-break.h: Declare new functions.
5964
89245bc0
DB
59652015-05-12 Don Breazeal <donb@codesourcery.com>
5966
5967 * linux-low.c (linux_supports_fork_events): New function.
5968 (linux_supports_vfork_events): New function.
5969 (linux_target_ops): Initialize new structure members.
5970 (initialize_low): Call linux_check_ptrace_features.
5971 * lynx-low.c (lynx_target_ops): Initialize new structure
5972 members.
5973 * server.c (report_fork_events, report_vfork_events):
5974 New global flags.
5975 (handle_query): Add new features to qSupported packet and
5976 response.
5977 (captured_main): Initialize new global variables.
5978 * target.h (struct target_ops) <supports_fork_events>:
5979 New member.
5980 <supports_vfork_events>: New member.
5981 (target_supports_fork_events): New macro.
5982 (target_supports_vfork_events): New macro.
5983 * win32-low.c (win32_target_ops): Initialize new structure
5984 members.
5985
835205d0
GB
59862015-05-12 Gary Benson <gbenson@redhat.com>
5987
5988 * server.c (handle_qxfer_exec_file): Use current process
5989 if annex is empty.
5990
21e94bd9
SL
59912015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5992
5993 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5994 Remove HAVE_PTRACE_GETREGS conditionals.
5995 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5996 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5997
45614f15
YQ
59982015-05-08 Yao Qi <yao.qi@linaro.org>
5999
6000 * linux-low.c (linux_supports_conditional_breakpoints): New
6001 function.
6002 (linux_target_ops): Install new target method.
6003 * lynx-low.c (lynx_target_ops): Install NULL hook for
6004 supports_conditional_breakpoints.
6005 * nto-low.c (nto_target_ops): Likewise.
6006 * spu-low.c (spu_target_ops): Likewise.
6007 * win32-low.c (win32_target_ops): Likewise.
6008 * server.c (handle_query): Check
6009 target_supports_conditional_breakpoints.
6010 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6011 New field.
6012 (target_supports_conditional_breakpoints): New macro.
6013
80ad801e
PA
60142015-05-06 Pedro Alves <palves@redhat.com>
6015
6016 PR server/18081
6017 * server.c (start_inferior): If the process exits, mourn it.
6018
819843c7
GB
60192015-04-21 Gary Benson <gbenson@redhat.com>
6020
6021 * hostio.c (fileio_open_flags_to_host): Factored out to
6022 fileio_to_host_openflags in common/fileio.c. Single use
6023 updated.
6024
a2d5a9d7
MF
60252015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6026
6027 * linux-xtensa-low.c (xtensa_fill_gregset)
6028 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6029 XCHAL_HAVE_LOOP.
6030
deb44829
MF
60312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6032
6033 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6034 (regs_info): Replace usrregs pointer with NULL.
6035
e57f1de3
GB
60362015-04-17 Gary Benson <gbenson@redhat.com>
6037
6038 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6039 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6040 * server.c (handle_qxfer_exec_file): New function.
6041 (qxfer_packets): Add exec-file entry.
6042 (handle_query): Report qXfer:exec-file:read as supported packet.
6043
62828379
RN
60442015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6045
6046 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6047
b88bb450
GB
60482015-04-09 Gary Benson <gbenson@redhat.com>
6049
6050 * hostio-errno.c (errno_to_fileio_error): Remove function.
6051 Update caller to use remote_fileio_to_fio_error.
6052
c8f4bfdd
YQ
60532015-04-09 Yao Qi <yao.qi@linaro.org>
6054
6055 * linux-low.c (linux_insert_point): Call
6056 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6057 (linux_remove_point): Call remove_memory_breakpoint if type is
6058 raw_bkpt_type_sw.
6059 * linux-x86-low.c (x86_insert_point): Don't call
6060 insert_memory_breakpoint.
6061 (x86_remove_point): Don't call remove_memory_breakpoint.
6062
41f98f02
PA
60632015-04-01 Pedro Alves <palves@redhat.com>
6064 Cleber Rosa <crosa@redhat.com>
6065
6066 * server.c (gdbserver_usage): Reorganize and extend the usage
6067 message.
6068
2bf6fb9d
PA
60692015-03-24 Pedro Alves <palves@redhat.com>
6070
6071 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6072 output. Also dump TRAP_TRACE.
6073 (linux_low_filter_event): In debug output, distinguish a
6074 resume_stop SIGSTOP from a delayed SIGSTOP.
6075
369f6daa
GB
60762015-03-24 Gary Benson <gbenson@redhat.com>
6077
6078 * linux-x86-low.c (x86_linux_new_thread): Moved to
6079 nat/x86-linux.c.
6080 (x86_linux_prepare_to_resume): Likewise.
6081
8e5d4070
GB
60822015-03-24 Gary Benson <gbenson@redhat.com>
6083
6084 * Makefile.in (x86-linux-dregs.o): New rule.
6085 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6086 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6087 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6088 (x86_linux_dr_get): Likewise.
6089 (x86_linux_dr_set): Likewise.
6090 (update_debug_registers_callback): Likewise.
6091 (x86_linux_dr_set_addr): Likewise.
6092 (x86_linux_dr_get_addr): Likewise.
6093 (x86_linux_dr_set_control): Likewise.
6094 (x86_linux_dr_get_control): Likewise.
6095 (x86_linux_dr_get_status): Likewise.
6096 (x86_linux_update_debug_registers): Likewise.
6097
2b95d440
GB
60982015-03-24 Gary Benson <gbenson@redhat.com>
6099
6100 * linux-x86-low.c (x86_linux_update_debug_registers):
6101 New function, factored out from...
6102 (x86_linux_prepare_to_resume): ...this.
6103
14b0bc68
GB
61042015-03-24 Gary Benson <gbenson@redhat.com>
6105
6106 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6107 (x86_linux_dr_set): Likewise.
6108 (update_debug_registers_callback): Likewise.
6109 (x86_linux_dr_set_addr): Likewise.
6110 (x86_linux_dr_get_addr): Likewise.
6111 (x86_linux_dr_set_control): Likewise.
6112 (x86_linux_dr_get_control): Likewise.
6113 (x86_linux_dr_get_status): Likewise.
6114 (x86_linux_prepare_to_resume): Likewise.
6115
5dfe6ca8
GB
61162015-03-24 Gary Benson <gbenson@redhat.com>
6117
6118 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6119 Use perror_with_name. Pass string through gettext.
6120 (x86_linux_dr_set): Likewise.
6121
d33472ad
GB
61222015-03-24 Gary Benson <gbenson@redhat.com>
6123
6124 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6125 (x86_linux_dr_set_addr): ...this.
6126 (x86_dr_low_get_addr): Rename to...
6127 (x86_linux_dr_get_addr): ...this.
6128 (x86_dr_low_set_control): Rename to...
6129 (x86_linux_dr_set_control): ...this.
6130 (x86_dr_low_get_control): Rename to...
6131 (x86_linux_dr_get_control): ...this.
6132 (x86_dr_low_get_status): Rename to...
6133 (x86_linux_dr_get_status): ...this.
6134 (x86_dr_low): Update with new function names.
6135
4b134ca1
GB
61362015-03-24 Gary Benson <gbenson@redhat.com>
6137
6138 * Makefile.in (x86-linux.o): New rule.
6139 * configure.srv: Add x86-linux.o to relevant targets.
6140 * linux-low.c (lwp_set_arch_private_info): New function.
6141 (lwp_arch_private_info): Likewise.
6142 * linux-x86-low.c: Include nat/x86-linux.h.
6143 (arch_lwp_info): Removed structure.
6144 (update_debug_registers_callback):
6145 Use lwp_set_debug_registers_changed.
6146 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6147 and lwp_set_debug_registers_changed.
6148 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6149
34c703da
GB
61502015-03-24 Gary Benson <gbenson@redhat.com>
6151
6152 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6153 * linux-arm-low.c (arm_new_thread): Likewise.
6154 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6155 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6156 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6157 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6158
cff068da
GB
61592015-03-24 Gary Benson <gbenson@redhat.com>
6160
6161 * linux-low.c (ptid_of_lwp): New function.
6162 (lwp_is_stopped): Likewise.
6163 (lwp_stop_reason): Likewise.
6164 * linux-x86-low.c (update_debug_registers_callback):
6165 Use lwp_is_stopped.
6166 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6167 lwp_stop_reason.
6168
b2f7c7e8
GB
61692015-03-24 Gary Benson <gbenson@redhat.com>
6170
6171 * linux-low.h (linux_stop_lwp): Remove declaration.
6172
6d4ee8c6
GB
61732015-03-24 Gary Benson <gbenson@redhat.com>
6174
6175 * linux-low.h: Include nat/linux-nat.h.
6176 * linux-low.c (iterate_over_lwps_args): New structure.
6177 (iterate_over_lwps_filter): New function.
6178 (iterate_over_lwps): Likewise.
6179 * linux-x86-low.c (update_debug_registers_callback):
6180 Update signature to what iterate_over_lwps expects.
6181 Remove PID check that iterate_over_lwps now performs.
6182 (x86_dr_low_set_addr): Use iterate_over_lwps.
6183 (x86_dr_low_set_control): Likewise.
6184
70a0bb6b
GB
61852015-03-24 Gary Benson <gbenson@redhat.com>
6186
6187 * linux-x86-low.c (x86_debug_reg_state): New function.
6188 (x86_linux_prepare_to_resume): Use the above.
6189
7b669087
GB
61902015-03-24 Gary Benson <gbenson@redhat.com>
6191
6192 * linux-low.c (current_lwp_ptid): New function.
6193 * linux-x86-low.c: Include nat/linux-nat.h.
6194 (x86_dr_low_get_addr): Use current_lwp_ptid.
6195 (x86_dr_low_get_control): Likewise.
6196 (x86_dr_low_get_status): Likewise.
6197
eef49a3d
PA
61982015-03-20 Pedro Alves <palves@redhat.com>
6199
6200 * tracepoint.c (cmd_qtstatus): Make "str" const.
6201
b2333d22
PA
62022015-03-20 Pedro Alves <palves@redhat.com>
6203
6204 * server.c (handle_general_set): Make "req_str" const.
6205
23f238d3
PA
62062015-03-19 Pedro Alves <palves@redhat.com>
6207
6208 * linux-low.c (linux_resume_one_lwp): Rename to ...
6209 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6210 instead call perror_with_name.
6211 (check_ptrace_stopped_lwp_gone): New function.
6212 (linux_resume_one_lwp): Reimplement as wrapper around
6213 linux_resume_one_lwp_throw that swallows errors if the LWP is
6214 gone.
6215
91baf43f
PA
62162015-03-19 Pedro Alves <palves@redhat.com>
6217
6218 * linux-low.c (count_events_callback, select_event_lwp_callback):
6219 No longer check whether the thread has resume_stop as last resume
6220 kind.
6221
8bf3b159
PA
62222015-03-19 Pedro Alves <palves@redhat.com>
6223
6224 * linux-low.c (count_events_callback, select_event_lwp_callback):
6225 Use the lwp's status_pending_p field, not the thread's.
6226
b90fc188
PA
62272015-03-19 Pedro Alves <palves@redhat.com>
6228
6229 * linux-low.c (select_event_lwp_callback): Update comments to
6230 no longer mention SIGTRAP.
6231
464b0089
GB
62322015-03-18 Gary Benson <gbenson@redhat.com>
6233
6234 * server.c (handle_query): Do not report vFile:fstat as supported.
6235
aa9e327f
GB
62362015-03-11 Gary Benson <gbenson@redhat.com>
6237
6238 * hostio.c (sys/types.h): New include.
6239 (sys/stat.h): Likewise.
6240 (common-remote-fileio.h): Likewise.
6241 (handle_fstat): New function.
6242 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6243
791c0056
GB
62442015-03-11 Gary Benson <gbenson@redhat.com>
6245
6246 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6247 struct stat.st_blocks and struct stat.st_blksize.
6248 * configure: Regenerate.
6249 * config.in: Likewise.
6250 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6251 (OBS): Add common-remote-fileio.o.
6252 (common-remote-fileio.o): New rule.
6253
9a9df970
PA
62542015-03-09 Pedro Alves <palves@redhat.com>
6255
6256 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6257 'struct sockaddr' pointer in 'accept' call.
6258
9eb1356e
PA
62592015-03-09 Pedro Alves <palves@redhat.com>
6260
6261 Revert:
6262 2015-03-07 Pedro Alves <palves@redhat.com>
6263 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6264 or <winsock2.h> here. Instead include "gdb_socket.h".
6265 (remote_open): Use union gdb_sockaddr_u.
6266 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6267 or <winsock2.h> here. Instead include "gdb_socket.h".
6268 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6269 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6270 or <sys/un.h>.
6271 (init_named_socket, gdb_agent_helper_thread): Use union
6272 gdb_sockaddr_u.
6273
aac331e4
PA
62742015-03-07 Pedro Alves <palves@redhat.com>
6275
6276 * configure.ac (build_warnings): Move
6277 -Wdeclaration-after-statement to the C-specific set.
6278 * configure: Regenerate.
6279
366c75fc
PA
62802015-03-07 Pedro Alves <palves@redhat.com>
6281
6282 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6283 or <winsock2.h> here. Instead include "gdb_socket.h".
6284 (remote_open): Use union gdb_sockaddr_u.
6285 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6286 or <winsock2.h> here. Instead include "gdb_socket.h".
6287 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6288 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6289 or <sys/un.h>.
6290 (init_named_socket, gdb_agent_helper_thread): Use union
6291 gdb_sockaddr_u.
6292
492d29ea
PA
62932015-03-07 Pedro Alves <palves@redhat.com>
6294
6295 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6296 instead.
6297
60a191ed
YQ
62982015-03-06 Yao Qi <yao.qi@linaro.org>
6299
6300 * linux-aarch64-low.c (aarch64_insert_point): Use
6301 show_debug_regs as a boolean.
6302 (aarch64_remove_point): Likewise.
6303
f5771b1d
PA
63042015-03-05 Pedro Alves <palves@redhat.com>
6305
6306 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6307 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6308 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6309 * nto-low.c (nto_target_ops): Likewise.
6310 * spu-low.c (spu_target_ops): Likewise.
6311 * win32-low.c (win32_target_ops): Likewise.
6312
3e572f71
PA
63132015-03-04 Pedro Alves <palves@redhat.com>
6314
72f4393d 6315 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6316 Decide whether a breakpoint triggered based on the SIGTRAP's
6317 siginfo.si_code.
72f4393d
L
6318 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6319 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6320 (linux_low_filter_event): Check for breakpoints before checking
6321 watchpoints.
6322 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6323 siginfo.si_code.
72f4393d
L
6324 (linux_stopped_by_sw_breakpoint)
6325 (linux_supports_stopped_by_sw_breakpoint)
6326 (linux_stopped_by_hw_breakpoint)
6327 (linux_supports_stopped_by_hw_breakpoint): New functions.
6328 (linux_target_ops): Install new target methods.
3e572f71 6329
1ec68e26
PA
63302015-03-04 Pedro Alves <palves@redhat.com>
6331
6332 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6333 * server.c (swbreak_feature, hwbreak_feature): New globals.
6334 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6335 (captured_main): Clear swbreak_feature and hwbreak_feature.
6336 * server.h (swbreak_feature, hwbreak_feature): Declare.
6337 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6338 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6339 supports_stopped_by_hw_breakpoint>: New fields.
6340 (target_supports_stopped_by_sw_breakpoint)
6341 (target_stopped_by_sw_breakpoint)
6342 (target_supports_stopped_by_hw_breakpoint)
6343 (target_stopped_by_hw_breakpoint): Declare.
6344
15c66dd6
PA
63452015-03-04 Pedro Alves <palves@redhat.com>
6346
6347 enum lwp_stop_reason -> enum target_stop_reason
6348 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6349 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6350 (linux_wait_1, stuck_in_jump_pad_callback)
6351 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6352 (linux_stopped_by_watchpoint):
6353 * linux-low.h (enum lwp_stop_reason): Delete.
6354 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6355 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6356
98fc70d6
YQ
63572015-03-04 Yao Qi <yao.qi@linaro.org>
6358
6359 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6360
dd2ac174
GB
63612015-03-03 Gary Benson <gbenson@redhat.com>
6362
6363 * hostio.c (handle_vFile): Fix prefix lengths.
6364
d68e53f4
MM
63652015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6366
6367 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6368 ptr_bits.
6369
bf2d68ab
AA
63702015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6371
6372 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6373 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6374 (clean): Add "rm -f" for above C files.
6375 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6376 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6377 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6378 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6379 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6380 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6381 (init_registers_s390x_vx_linux64)
6382 (init_registers_s390x_tevx_linux64)
6383 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6384 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6385 declarations.
6386 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6387 (s390_store_vxrs_high): New functions.
6388 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6389 NT_S390_VXRS_HIGH.
6390 (s390_arch_setup): Add logic for selecting one of the new target
6391 descriptions. Activate the new vector regsets if applicable.
6392 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6393 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6394 and init_registers_s390x_tevx_linux64.
6395
c966a859
PA
63962015-03-01 Pedro Alves <palves@redhat.com>
6397
6398 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6399 parameter.
6400
4180215b
PA
64012015-02-27 Pedro Alves <palves@redhat.com>
6402
6403 * linux-x86-low.c (u_debugreg_offset): New function.
6404 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6405
749bab01
PA
64062015-02-27 Pedro Alves <palves@redhat.com>
6407
6408 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6409 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6410 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6411 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6412 (ps_lsetfpregs, ps_getpid)
6413 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6414 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6415 (ps_lsetxregs, ps_plog): Declare.
6416
3c14e5a3
PA
64172015-02-27 Pedro Alves <palves@redhat.com>
6418
6419 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6420 IP_AGENT_EXPORT_FUNC.
6421 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6422 IP_AGENT_EXPORT_FUNC.
6423 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6424 (IP_AGENT_EXPORT): Delete.
6425 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6426 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6427 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6428 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6429 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6430 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6431 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6432 (traceframe_read_count, traceframe_write_count)
6433 (traceframes_created, trace_state_variables, get_raw_reg)
6434 (get_trace_state_variable_value, set_trace_state_variable_value)
6435 (ust_loaded, helper_thread_id, cmd_buf): Use
6436 IPA_SYM_EXPORTED_NAME.
6437 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6438 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6439 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6440 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6441 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6442 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6443 EXTERN_C_PUSH/EXTERN_C_POP.
6444 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6445 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6446 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6447 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6448 (traceframe_write_count, traceframe_read_count)
6449 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6450 (about_to_request_buffer_space, get_trace_state_variable_value)
6451 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6452 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6453 EXTERN_C_PUSH/EXTERN_C_POP.
6454 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6455 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6456 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6457 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6458 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6459 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6460 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6461 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6462 Define.
6463 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6464 (IP_AGENT_EXPORT_VAR_DECL): Define.
6465 (tracing): Declare.
6466 (gdb_agent_get_raw_reg): Declare.
6467
fe978cb0
PA
64682015-02-27 Tom Tromey <tromey@redhat.com>
6469 Pedro Alves <palves@redhat.com>
6470
6471 Rename symbols whose names are reserved C++ keywords throughout.
6472
3bc3d82a
PA
64732015-02-27 Pedro Alves <palves@redhat.com>
6474
6475 * Makefile.in (COMPILER): New, get it from autoconf.
6476 (CXX): Get from autoconf instead.
6477 (COMPILE.pre): Use COMPILER.
6478 (CC-LD): Rename to ...
6479 (CC_LD): ... this. Use COMPILER.
6480 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6481 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6482 * acinclude.m4: Include build-with-cxx.m4.
6483 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6484 Disable -Werror by default if building in C++ mode.
6485 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6486 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6487 the C++ compiler. Save/restore CXXFLAGS too.
6488 * configure: Regenerate.
6489
07697489
PA
64902015-02-27 Pedro Alves <palves@redhat.com>
6491
6492 * acinclude.m4: Include libiberty.m4.
6493 * configure.ac: Call libiberty_INIT.
6494 * config.in, configure: Regenerate.
6495
9beb7c4e
PA
64962015-02-26 Pedro Alves <palves@redhat.com>
6497
6498 * linux-low.c (linux_wait_1): When incrementing the PC past a
6499 program breakpoint always use the_low_target.breakpoint_len as
6500 increment, rather than the maximum between that and
6501 the_low_target.decr_pc_after_break.
6502
8090aef2
PA
65032015-02-23 Pedro Alves <palves@redhat.com>
6504
6505 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6506 thread was doing a step-over; always adjust the PC if
6507 we stepped over a permanent breakpoint.
6508 (linux_wait_1): If we stepped over breakpoint that was on top of a
6509 permanent breakpoint, manually advance the PC past it.
6510
bc9540e8
PA
65112015-02-23 Pedro Alves <palves@redhat.com>
6512
6513 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6514 modes.
6515 (x86_fill_gregset, x86_store_gregset): Use it when handling
6516 $orig_eax.
6517
2db9a427
PA
65182015-02-20 Pedro Alves <palves@redhat.com>
6519
6520 * thread-db.c: Include "nat/linux-procfs.h".
6521 (thread_db_init): Skip listing new threads if the kernel supports
6522 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6523
afa8d396
PA
65242015-02-20 Pedro Alves <palves@redhat.com>
6525
6526 * linux-low.c (status_pending_p_callback): Use ptid_match.
6527
c9587f88
AT
65282015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6529
6530 PR breakpoints/16812
6531 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6532 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6533 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6534
b05ec7a5
AT
65352015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6536
6537 PR breakpoints/15956
6538 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6539
d33501a5
MM
65402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6541
6542 * linux-low.c (linux_low_btrace_conf): Print size.
6543 * server.c (handle_btrace_conf_general_set): New.
6544 (hanle_general_set): Call handle_btrace_conf_general_set.
6545 (handle_query): Report Qbtrace-conf:bts:size as supported.
6546
f4abbc16
MM
65472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6548
6549 * linux-low.c (linux_low_enable_btrace): Update parameters.
6550 (linux_low_btrace_conf): New.
6551 (linux_target_ops)<to_btrace_conf>: Initialize.
6552 * server.c (current_btrace_conf): New.
6553 (handle_btrace_enable): Rename to ...
6554 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6555 to target_enable_btrace. Update comment. Update users.
6556 (handle_qxfer_btrace_conf): New.
6557 (qxfer_packets): Add btrace-conf entry.
6558 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6559 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6560 (target_ops)<read_btrace_conf>: New.
6561 (target_enable_btrace): Update parameters.
6562 (target_read_btrace_conf): New.
6563
043c3577
MM
65642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6565
6566 * server.c (handle_btrace_general_set): Remove call to
6567 target_supports_btrace.
6568 (supported_btrace_packets): New.
6569 (handle_query): Call supported_btrace_packets.
6570 * target.h: include btrace-common.h.
6571 (btrace_target_info): Removed.
6572 (supports_btrace, target_supports_btrace): Update parameters.
6573
734b0e4b
MM
65742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6575
6576 * Makefile.in (SFILES): Add common/btrace-common.c.
6577 (OBS): Add common/btrace-common.o.
6578 (btrace-common.o): Add build rules.
6579 * linux-low: Include btrace-common.h.
6580 (linux_low_read_btrace): Use struct btrace_data. Call
6581 btrace_data_init and btrace_data_fini.
6582
d6c146e9
PA
65832015-02-06 Pedro Alves <palves@redhat.com>
6584
6585 * thread-db.c (find_new_threads_callback): Add debug output.
6586
20ba1ce6
PA
65872015-02-04 Pedro Alves <palves@redhat.com>
6588
6589 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6590 (resume_stopped_resumed_lwps): New function.
6591 (linux_wait_for_event_filtered): Use it.
6592
8cc73a39
SDJ
65932015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6594
6595 * Makefile.in (SFILES): Add linux-personality.c.
6596 (linux-personality.o): New rule.
6597 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6598 list of objects to be built.
6599 * linux-low.c: Include nat/linux-personality.h.
6600 (linux_create_inferior): Remove code to disable address space
6601 randomization (moved to ../nat/linux-personality.c). Create
6602 cleanup to disable address space randomization.
6603
fb23d554
SDJ
66042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6605
6606 * Makefile.in (posix-strerror.o): New rule.
6607 (mingw-strerror.o): Likewise.
6608 * configure: Regenerated.
6609 * configure.ac: Source file ../common/common.host. Initialize new
6610 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6611
cdf43629
YQ
66122015-01-14 Yao Qi <yao@codesourcery.com>
6613
6614 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6615 (ppc-linux.o): New rule.
6616 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6617 * configure.ac: AC_CHECK_FUNCS(getauxval).
6618 * config.in: Re-generated.
6619 * configure: Re-generated.
6620 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6621 ppc64_64bit_inferior_p
6622
514c5338
YQ
66232015-01-14 Yao Qi <yao@codesourcery.com>
6624
6625 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6626 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6627 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6628 (PT_ORIG_R3, PT_TRAP): Likewise.
6629 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6630 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6631 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6632
3368c1e5
JB
66332015-01-10 Joel Brobecker <brobecker@adacore.com>
6634
6635 * i387-fp.c (i387_cache_to_xsave): In look over
6636 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6637 zmmh_low_space field by use of zmmh_high_space.
6638
582511be
PA
66392015-01-09 Pedro Alves <palves@redhat.com>
6640
6641 * linux-low.c (step_over_bkpt): Move higher up in the file.
6642 (handle_extended_wait): Don't store the stop_pc here.
6643 (get_stop_pc): Adjust comments and rename to ...
6644 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6645 stopped for a software breakpoint or hardware breakpoint.
6646 (thread_still_has_status_pending_p): New function.
6647 (status_pending_p_callback): Use
6648 thread_still_has_status_pending_p. If the event is no longer
6649 interesting, resume the LWP.
6650 (handle_tracepoints): Add assert.
6651 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6652 (wstatus_maybe_breakpoint): New function.
6653 (cancel_breakpoint): Delete function.
6654 (check_stopped_by_watchpoint): New function, factored out from
6655 linux_low_filter_event.
6656 (lp_status_maybe_breakpoint): Delete function.
6657 (linux_low_filter_event): Remove filter_ptid argument.
6658 Leave thread group exits pending here. Store the LWP's stop PC.
6659 Always leave events pending.
6660 (linux_wait_for_event_filtered): Pull all events out of the
6661 kernel, and leave them all pending.
6662 (count_events_callback, select_event_lwp_callback): Consider all
6663 events.
6664 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6665 (select_event_lwp): Only give preference to the stepping LWP in
6666 all-stop mode. Adjust comments.
6667 (ignore_event): New function.
6668 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6669 references to cancel_breakpoints. Adjust to renames. Also give
6670 equal priority to all LWPs that have had events in non-stop mode.
6671 If reporting a software breakpoint event, unadjust the LWP's PC.
6672 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6673 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6674 Adjust.
6675 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6676 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6677 (linux_stopped_by_watchpoint): Adjust.
6678 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6679 * linux-low.h (enum lwp_stop_reason): New.
6680 (struct lwp_info) <stop_pc>: Adjust comment.
6681 <stopped_by_watchpoint>: Delete field.
6682 <stop_reason>: New field.
6683 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6684 * mem-break.c (software_breakpoint_inserted_here)
6685 (hardware_breakpoint_inserted_here): New function.
6686 * mem-break.h (software_breakpoint_inserted_here)
6687 (hardware_breakpoint_inserted_here): Declare.
6688 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6689 (cancel_breakpoints): Delete.
6690 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6691 (upload_fast_traceframes): Remove references to
6692 cancel_breakpoints.
6693
a33e3959
PA
66942015-01-09 Pedro Alves <palves@redhat.com>
6695
6696 * thread-db.c (find_new_threads_callback): Ignore thread if the
6697 kernel thread ID is -1.
6698
8784d563
PA
66992015-01-09 Pedro Alves <palves@redhat.com>
6700
6701 * linux-low.c (linux_attach_fail_reason_string): Move to
6702 nat/linux-ptrace.c, and rename.
6703 (linux_attach_lwp): Update comment.
6704 (attach_proc_task_lwp_callback): New function.
6705 (linux_attach): Adjust to rename and use
6706 linux_proc_attach_tgid_threads.
6707 (linux_attach_fail_reason_string): Delete declaration.
6708
76f2b779
JB
67092015-01-01 Joel Brobecker <brobecker@adacore.com>
6710
6711 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6712 * server.c (gdbserver_version): Likewise.
6713
fafcc06a
SDJ
67142014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6715
6716 * remote-utils.c: Include ctype.h.
6717 (input_interrupt): Explicitly handle the case when the char
6718 received is the NUL byte. Improve the printing of non-ASCII
6719 characters.
6720
beed38b8
JB
67212014-12-16 Joel Brobecker <brobecker@adacore.com>
6722
6723 * linux-low.c (linux_low_filter_event): Update call to
6724 linux_enable_event_reporting following the addition of
6725 a new parameter to that function.
6726
bf330350
CU
67272014-12-16 Catalin Udma <catalin.udma@freescale.com>
6728
6729 PR server/17457
6730 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6731 (AARCH64_FPCR_REGNO): Likewise.
6732 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6733 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6734 (aarch64_store_fpregset): Likewise.
6735
5227d625
JB
67362014-12-15 Joel Brobecker <brobecker@adacore.com>
6737
6738 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6739 Remove FIXME comment about assumption about N.
6740
f93b65a0
JB
67412014-12-13 Joel Brobecker <brobecker@adacore.com>
6742
6743 * configure.ac: If large-file support is disabled in GDBserver,
6744 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6745 * configure: Regenerate.
6746
e5a9158d
AA
67472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6748
6749 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6750 warning upon ENODATA from ptrace.
6751 * linux-s390-low.c (s390_store_tdb): New.
6752 (s390_regsets): Add regset for NT_S390_TDB.
6753
feea5f36
AA
67542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6755
6756 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6757 without a fill_function.
6758 * linux-s390-low.c (s390_fill_last_break): Remove.
6759 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6760 (s390_arch_setup): Use regset's size instead of fill_function for
6761 loop end condition.
6762
098dbe61
AA
67632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6764
6765 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6766 the regset's store function when ptrace returned an error.
6767 * regcache.c (get_thread_regcache): Invalidate register cache
6768 before fetching inferior's registers.
6769
28eef672
AA
67702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6771
6772 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6773 while-loop as for-loop.
6774 (regsets_store_inferior_registers): Likewise.
6775
bdca27a2
YQ
67762014-11-28 Yao Qi <yao@codesourcery.com>
6777
6778 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6779 * config.in, configure: Re-generate.
6780 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6781 is defined.
6782
9c232dda
YQ
67832014-11-21 Yao Qi <yao@codesourcery.com>
6784
6785 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6786 (AC_CHECK_HEADERS): Remove malloc.h.
6787 * configure: Re-generated.
6788 * config.in: Re-generated.
6789 * server.h: Don't include alloca.h and malloc.h.
6790 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6791 Don't include malloc.h.
6792
43968415
JB
67932014-11-17 Joel Brobecker <brobecker@adacore.com>
6794
6795 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6796 corresponding ERRNO check in same block.
6797
40e91bc7
PA
67982014-11-12 Pedro Alves <palves@redhat.com>
6799
6800 * server.c (cont_thread): Update comment.
6801 (start_inferior, attach_inferior): No longer clear cont_thread.
6802 (handle_v_cont): No longer set cont_thread.
6803 (captured_main): Clear cont_thread each time a GDB connects.
6804
c2c118cf
PA
68052014-11-12 Pedro Alves <palves@redhat.com>
6806
6807 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6808 thread, and don't resume all threads if the Hc thread has exited.
6809
78708b7c
PA
68102014-11-12 Pedro Alves <palves@redhat.com>
6811
6812 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6813 the process group instead of to a specific LWP.
6814
a2abc7de
PA
68152014-10-15 Pedro Alves <palves@redhat.com>
6816
6817 PR server/17487
6818 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6819 parameter.
6820 (arm_set_thread_context): Delete.
6821 (the_low_target): Adjust.
6822 * win32-i386-low.c (debug_registers_changed)
6823 (debug_registers_used): Delete.
6824 (update_debug_registers_callback): New function.
6825 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6826 needing to update their debug registers.
6827 (win32_get_current_dr): New function.
6828 (x86_dr_low_get_addr, x86_dr_low_get_control)
6829 (x86_dr_low_get_status): Fetch the debug register from the thread
6830 record's context.
6831 (i386_initial_stuff): Adjust.
6832 (i386_get_thread_context): Remove current_event parameter. Don't
6833 clear debug_registers_changed nor copy DR values to
6834 debug_reg_state.
6835 (i386_set_thread_context): Delete.
6836 (i386_prepare_to_resume): New function.
6837 (i386_thread_added): Mark the thread as needing to update irs
6838 debug registers.
6839 (the_low_target): Remove i386_set_thread_context and install
6840 i386_prepare_to_resume.
6841 * win32-low.c (win32_get_thread_context): Adjust.
6842 (win32_set_thread_context): Use SetThreadContext
6843 directly.
6844 (win32_prepare_to_resume): New function.
6845 (win32_require_context): New function, factored out from ...
6846 (thread_rec): ... this.
6847 (continue_one_thread): Call win32_prepare_to_resume on each thread
6848 we're about to continue.
6849 (win32_resume): Call win32_prepare_to_resume on the event thread.
6850 * win32-low.h (struct win32_thread_info)
6851 <debug_registers_changed>: New field.
6852 (struct win32_target_ops): Change prototype of set_thread_context,
6853 delete set_thread_context and add prepare_to_resume.
6854 (win32_require_context): New declaration.
6855
a442d071
GB
68562014-10-08 Gary Benson <gbenson@redhat.com>
6857
6858 * server.h: Do not include common-exceptions.h.
6859
6f1947e8
GB
68602014-10-08 Gary Benson <gbenson@redhat.com>
6861
6862 * server.h: Do not include cleanups.h.
6863
63b434a4
JH
68642014-09-30 James Hogan <james.hogan@imgtec.com>
6865
6866 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6867 mips64-dsp-linux.c.
6868
c4d9ceb6
YQ
68692014-09-23 Yao Qi <yao@codesourcery.com>
6870
6871 * linux-low.c (lp_status_maybe_breakpoint): New function.
6872 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6873 (count_events_callback): Likewise.
6874 (select_event_lwp_callback): Likewise.
6875 (cancel_breakpoints_callback): Likewise.
6876
89a5711c
DB
68772014-09-19 Don Breazeal <donb@codesourcery.com>
6878
6879 * linux-low.c (handle_extended_wait): Call
6880 linux_ptrace_get_extended_event.
6881 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6882 linux_is_extended_waitstatus.
6883
bffc0964
JB
68842014-09-16 Joel Brobecker <brobecker@adacore.com>
6885
6886 * Makefile.in (CPPFLAGS): Define.
6887 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6888 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6889
0bfdf32f
GB
68902014-09-16 Gary Benson <gbenson@redhat.com>
6891
6892 * inferiors.h (current_inferior): Renamed as...
6893 (current_thread): New variable. All uses updated.
6894 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6895 (maybe_move_out_of_jump_pad): Likewise.
6896 (cancel_breakpoint): Likewise.
6897 (linux_low_filter_event): Likewise.
6898 (wait_for_sigstop): Likewise.
6899 (linux_resume_one_lwp): Likewise.
6900 (need_step_over_p): Likewise.
6901 (start_step_over): Likewise.
6902 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6903 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6904 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6905 and save_inferior as saved_thread.
6906 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6907 saved_thread.
6908 (regcache_invalidate_thread): Likewise.
6909 * remote-utils.c (prepare_resume_reply): Likewise.
6910 * thread-db.c (thread_db_get_tls_address): Likewise.
6911 (disable_thread_event_reporting): Likewise.
6912 (remove_thread_event_breakpoints): Likewise.
6913 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6914 as saved_thread.
6915 * target.h (set_desired_inferior): Renamed as...
6916 (set_desired_thread): New declaration. All uses updated.
6917 * server.c (myresume): Updated comment to reference thread instead
6918 of inferior.
6919 (handle_serial_event): Likewise.
6920 (handle_target_event): Likewise.
6921
361c8ade
GB
69222014-09-12 Tom Tromey <tromey@redhat.com>
6923 Gary Benson <gbenson@redhat.com>
6924
6925 * regcache.h: Include common-regcache.h.
6926 (regcache_read_pc): Don't declare.
6927 * regcache.c (get_thread_regcache_for_ptid): New function.
6928
bd9269f7
GB
69292014-09-11 Tom Tromey <tromey@redhat.com>
6930 Gary Benson <gbenson@redhat.com>
6931
6932 * symbol.c: New file.
6933 * Makefile.in (SFILES): Add symbol.c.
6934 (OBS): Add symbol.o.
6935
f8c1d06b
GB
69362014-09-11 Gary Benson <gbenson@redhat.com>
6937
6938 * target.c (target_stop_ptid, target_continue_ptid): New
6939 functions.
6940
721ec300
GB
69412014-09-11 Tom Tromey <tromey@redhat.com>
6942 Gary Benson <gbenson@redhat.com>
6943
6944 * target.h: Include target/target.h.
6945 * target.c (target_read_memory, target_read_uint32)
6946 (target_write_memory): New functions.
6947
c5e92cca
GB
69482014-09-11 Gary Benson <gbenson@redhat.com>
6949
6950 * server.h (debug_hw_points): Don't declare.
6951 * server.c (debug_hw_points): Don't define. Replace all uses
6952 with show_debug_regs.
6953 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6954 all uses with show_debug_regs.
6955
2e4bb98a
EBM
69562014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6957
6958 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6959 endianness into account.
6960 (ppc_supply_ptrace_register): Likewise.
6961
ac740bc7
JH
69622014-09-03 James Hogan <james.hogan@imgtec.com>
6963
6964 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6965 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6966
97ea6506
GB
69672014-09-03 Gary Benson <gbenson@redhat.com>
6968
6969 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6970 ALL_DEBUG_ADDRESS_REGISTERS.
6971
df7e5265
GB
69722014-09-02 Gary Benson <gbenson@redhat.com>
6973
6974 * i386-low.h: Renamed as...
6975 * x86-low.h: New file. All type, function and variable name
6976 prefixes changed from "i386_" to "x86_". All references updated.
6977 * i386-low.c: Renamed as...
6978 * x86-low.c: New file. All type, function and variable name
6979 prefixes changed from "i386_" to "x86_". All references updated.
6980
ed859da7
GB
69812014-09-02 Gary Benson <gbenson@redhat.com>
6982
6983 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6984 (x86_linux_new_thread): Likewise.
6985
860789c7
GB
69862014-08-29 Gary Benson <gbenson@redhat.com>
6987
6988 * server.h (setjmp.h): Do not include.
6989 (toplevel): Do not declare.
6990 (common-exceptions.h): Include.
6991 (cleanups.h): Likewise.
6992 * server.c (toplevel): Do not define.
6993 (exit_code): New static global.
6994 (detach_or_kill_for_exit_cleanup): New function.
6995 (main): New function. Original main renamed to...
6996 (captured_main): New function.
6997 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6998
ff55e1b5
GB
69992014-08-29 Gary Benson <gbenson@redhat.com>
7000
7001 * Makefile.in (SFILES): Add common/common-exceptions.c.
7002 (OBS): Add common-exceptions.o.
7003 (common-exceptions.o): New rule.
7004 * utils.c (prepare_to_throw_exception): New function.
7005
e9bcb658
GB
70062014-08-29 Gary Benson <gbenson@redhat.com>
7007
7008 * config.in: Regenerate.
7009 * configure: Likewise.
7010
e3180625
GB
70112014-08-29 Gary Benson <gbenson@redhat.com>
7012
7013 * Makefile.in (SFILES): Add common/cleanups.c.
7014 (OBS): cleanups.o.
7015 (cleanups.o): New rule.
7016
e3d6ba5d
GB
70172014-08-29 Gary Benson <gbenson@redhat.com>
7018
7019 * utils.c (internal_vwarning): New function.
7020
7096e886
GB
70212014-08-28 Gary Benson <gbenson@redhat.com>
7022
7023 * utils.h (fatal): Remove declaration.
7024 * utils.c (fatal): Remove function.
7025
14ce3192
GB
70262014-08-28 Gary Benson <gbenson@redhat.com>
7027
7028 * tracepoint.c (gdb_agent_init): Replace fatal with
7029 perror_with_name.
7030 (initialize_tracepoint): Likewise.
7031
50278d59
GB
70322014-08-28 Gary Benson <gbenson@redhat.com>
7033
7034 * remote-utils.c (remote_prepare): Replace fatal with error.
7035
aa96c426
GB
70362014-08-28 Gary Benson <gbenson@redhat.com>
7037
7038 * linux-low.c (linux_async): Replace fatal with warning.
7039 Tidy up and return.
7040 (linux_start_non_stop): Return -1 if linux_async failed.
7041
f7160e97
GB
70422014-08-28 Gary Benson <gbenson@redhat.com>
7043
7044 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7045 gdb_assert.
7046 (i386_dr_low_get_addr): Remove vague comment.
7047 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7048 gdb_assert.
7049
38e08fca
GB
70502014-08-28 Gary Benson <gbenson@redhat.com>
7051
7052 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7053 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7054 internal_error.
7055 (linux_resume_one_lwp): Likewise.
7056 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7057 gdb_assert.
7058 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7059 with internal_error.
7060 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7061 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7062 (find_register_by_name): Replace fatal with internal_error.
7063 (find_regno): Likewise.
7064 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7065 * thread-db.c (thread_db_create_event): Likewise.
7066 (thread_db_load_search): Likewise.
7067 (try_thread_db_load_1): Likewise.
7068 * tracepoint.c (get_jump_space_head): Replace fatal with
7069 internal_error.
7070 (claim_trampoline_space): Likewise.
7071 (have_fast_tracepoint_trampoline_buffer): Likewise.
7072 (cmd_qtstart): Likewise.
7073 (stop_tracing): Likewise.
7074 (fast_tracepoint_collecting): Likewise.
7075 (target_malloc): Likewise.
7076 (download_tracepoint): Likewise.
7077 (download_trace_state_variables): Replace check with gdb_assert.
7078 (upload_fast_traceframes): Replace fatal with internal_error.
7079
34abf635
GB
70802014-08-19 Tom Tromey <tromey@redhat.com>
7081 Gary Benson <gbenson@redhat.com>
7082
7083 * Makefile.in (SFILES): Add common/common-debug.c.
7084 (OBS): Add common-debug.o.
7085 (common-debug.o): New rule.
7086 * debug.h (debug_printf): Don't declare.
7087 * debug.c (debug_printf): Renamed and rewritten as...
7088 (debug_vprintf): New function.
7089
f6e94d78
GB
70902014-08-19 Gary Benson <gbenson@redhat.com>
7091
7092 * utils.h: Do not include print-utils.h.
7093
9239eeab
GB
70942014-08-19 Tom Tromey <tromey@redhat.com>
7095 Gary Benson <gbenson@redhat.com>
7096
7097 * server.h: Add static assertion.
7098 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7099
ef87c8bb
GB
71002014-08-19 Tom Tromey <tromey@redhat.com>
7101 Gary Benson <gbenson@redhat.com>
7102
7103 * Makefile.in (SFILES): Add common/errors.c.
7104 (OBS): Add errors.o.
7105 (IPA_OBS): Add errors-ipa.o.
7106 (errors.o): New rule.
7107 (errors-ipa.o): Likewise.
7108 * utils.h (perror_with_name, error, warning): Don't declare.
7109 * utils.c (warning): Renamed and rewritten as...
7110 (vwarning): New function.
7111 (error): Renamed and rewritten as...
7112 (verror): New function.
7113 (internal_error): Renamed and rewritten as...
7114 (internal_verror): New function.
7115
bb974a24
GB
71162014-08-07 Gary Benson <gbenson@redhat.com>
7117
7118 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7119 * configure: Regenerate.
7120 * config.in: Likewise.
7121 * server.h: Do not include errno.h.
7122 * event-loop.c: Likewise.
7123 * hostio-errno.c: Likewise.
7124 * linux-low.c: Likewise.
7125 * remote-utils.c: Likewise.
7126 * spu-low.c: Likewise.
7127 * utils.c: Likewise.
7128 * gdbreplay.c: Unconditionally include errno.h.
7129
6d3d12eb
GB
71302014-08-07 Gary Benson <gbenson@redhat.com>
7131
7132 * server.h: Do not include string.h.
7133 * event-loop.c: Likewise.
7134 * linux-low.c: Likewise.
7135 * regcache.c: Likewise.
7136 * remote-utils.c: Likewise.
7137 * spu-low.c: Likewise.
7138 * utils.c: Likewise.
7139
dccbb609
GB
71402014-08-07 Gary Benson <gbenson@redhat.com>
7141
7142 * server.h: Do not include gdb_assert.h.
7143
e76df0d0
GB
71442014-08-07 Gary Benson <gbenson@redhat.com>
7145
7146 * server.h: Do not include common-utils.h.
7147
4cb9c816
GB
71482014-08-07 Gary Benson <gbenson@redhat.com>
7149
7150 * server.h: Do not include ptid.h.
7151 * notif.h: Likewise.
7152
3995eeee
GB
71532014-08-07 Gary Benson <gbenson@redhat.com>
7154
7155 * server.h: Do not include gdb_locale.h.
7156
cb9f1a9b
GB
71572014-08-07 Gary Benson <gbenson@redhat.com>
7158
7159 * server.h: Do not include gdb/signals.h.
7160 * win32-low.c: Likewise.
7161
a5fceff8
GB
71622014-08-07 Gary Benson <gbenson@redhat.com>
7163
7164 * server.h: Do not include pathmax.h.
7165
b9391142
GB
71662014-08-07 Gary Benson <gbenson@redhat.com>
7167
7168 * server.h: Do not include libiberty.h.
7169 * linux-bfin-low.c: Likewise.
7170
0e443c87
GB
71712014-08-07 Gary Benson <gbenson@redhat.com>
7172
7173 * server.h: Do not include ansidecl.h.
7174
8ebb3f56
GB
71752014-08-07 Gary Benson <gbenson@redhat.com>
7176
7177 * linux-x86-low.c: Do not include stddef.h.
7178 * lynx-ppc-low.c: Likewise.
7179 * tracepoint.c: Likewise.
7180
8980bdf6
GB
71812014-08-07 Gary Benson <gbenson@redhat.com>
7182
7183 * server.h: Do not include stdarg.h.
7184 * nto-low.c: Likewise.
7185
d7096f71
GB
71862014-08-07 Gary Benson <gbenson@redhat.com>
7187
7188 * server.h: Do not include stdlib.h.
7189 * inferiors.c: Likewise.
7190 * linux-low.c: Likewise.
7191 * regcache.c: Likewise.
7192 * spu-low.c: Likewise.
7193 * tracepoint.c: Likewise.
7194 * utils.c: Likewise.
7195
d02f550d
GB
71962014-08-07 Gary Benson <gbenson@redhat.com>
7197
7198 * server.h: Do not include stdio.h.
7199 * linux-low.c: Likewise.
7200 * remote-utils.c: Likewise.
7201 * spu-low.c: Likewise.
7202 * utils.c: Likewise.
7203 * wincecompat.c: Likewise.
7204
87f6c4e3
GB
72052014-08-06 Gary Benson <gbenson@redhat.com>
7206
7207 * regcache.c (init_register_cache): Move conditionals inside if.
7208
7089dca4
GB
72092014-08-06 Gary Benson <gbenson@redhat.com>
7210
7211 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7212
462f517e
GB
72132014-07-31 Gary Benson <gbenson@redhat.com>
7214
7215 * ax.h: Do not include server.h.
7216 * gdbthread.h: Likewise.
7217 * lynx-low.h: Likewise.
7218 * notif.h: Likewise.
7219
976411d6
GB
72202014-07-30 Gary Benson <gbenson@redhat.com>
7221
7222 * server.h: Include common-defs.h.
7223 Do not include config.h or build-gnulib-gdbserver/config.h.
7224
d41f6d8e
GB
72252014-07-30 Gary Benson <gbenson@redhat.com>
7226
7227 * hostio-errno.c: Move server.h to top of includes list.
7228 * inferiors.c: Likewise.
7229 * linux-x86-low.c: Likewise.
7230 * notif.c: Include server.h.
7231
314c6a35
TT
72322014-07-24 Tom Tromey <tromey@redhat.com>
7233 Gary Benson <gbenson@redhat.com>
7234
7235 * server.h (CORE_ADDR): Now unsigned.
7236
69ff6be5
PA
72372014-07-16 Pedro Alves <palves@redhat.com>
7238
7239 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7240
ce9e3fe7
PA
72412014-07-15 Pedro Alves <palves@redhat.com>
7242
7243 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7244 copy.
7245
e76126e8
PA
72462014-07-11 Pedro Alves <palves@redhat.com>
7247
7248 * linux-low.c (kill_wait_lwp): New function, based on
7249 kill_one_lwp_callback, but use my_waitpid directly.
7250 (kill_one_lwp_callback, linux_kill): Use it.
7251
8e9db26e
PA
72522014-06-23 Pedro Alves <palves@redhat.com>
7253
7254 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7255 before setting DR0..DR3.
7256
698b3e08
GB
72572014-06-20 Gary Benson <gbenson@redhat.com>
7258
7259 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7260 * configure: Regenerated.
7261 * config.in: Likewise.
7262
125f8a3d
GB
72632014-06-20 Gary Benson <gbenson@redhat.com>
7264
7265 * Makefile.in (SFILES): Update locations for files moved
7266 from common to nat.
7267 (object file files): Reordered.
7268
42995dbd
GB
72692014-06-20 Gary Benson <gbenson@redhat.com>
7270
7271 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7272 (i386_dr_low_set_addr): Likewise.
7273 (i386_dr_low_get_addr): Likewise.
7274 (i386_dr_low_can_set_control): Likewise.
7275 (i386_dr_low_set_control): Likewise.
7276 (i386_dr_low_get_control): Likewise.
7277 (i386_dr_low_get_status): Likewise.
7278 (i386_get_debug_register_length): Likewise.
7279 * linux-x86-low.c (i386_dr_low_set_addr):
7280 Changed signature. Made static.
7281 (i386_dr_low_get_addr): Likewise.
7282 (i386_dr_low_set_control): Likewise.
7283 (i386_dr_low_get_control): Likewise.
7284 (i386_dr_low_get_status): Likewise.
7285 (i386_dr_low): New global variable.
7286 * win32-i386-low.c (i386_dr_low_set_addr):
7287 Changed signature. Made static.
7288 (i386_dr_low_get_addr): Likewise.
7289 (i386_dr_low_set_control): Likewise.
7290 (i386_dr_low_get_control): Likewise.
7291 (i386_dr_low_get_status): Likewise.
7292 (i386_dr_low): New global variable.
7293
e1d2394b
MS
72942014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7295
7296 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7297 * Makefile.in (AR, AR_FLAGS): Define.
7298 * configure: Regenerate.
7299
3a8ee006
GB
73002014-06-19 Gary Benson <gbenson@redhat.com>
7301
7302 * Makefile.in (i386-dregs.o): New rule.
7303 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7304 * i386-low.c (target.h): Remove include.
7305 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7306 (DR_CONTROL_SHIFT): Likewise.
7307 (DR_CONTROL_SIZE): Likewise.
7308 (DR_RW_EXECUTE): Likewise.
7309 (DR_RW_WRITE): Likewise.
7310 (DR_RW_READ): Likewise.
7311 (DR_RW_IORW): Likewise.
7312 (DR_LEN_1): Likewise.
7313 (DR_LEN_2): Likewise.
7314 (DR_LEN_4): Likewise.
7315 (DR_LEN_8): Likewise.
7316 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7317 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7318 (DR_ENABLE_SIZE): Likewise.
7319 (DR_LOCAL_SLOWDOWN): Likewise.
7320 (DR_GLOBAL_SLOWDOWN): Likewise.
7321 (DR_CONTROL_RESERVED): Likewise.
7322 (I386_DR_CONTROL_MASK): Likewise.
7323 (I386_DR_VACANT): Likewise.
7324 (I386_DR_LOCAL_ENABLE): Likewise.
7325 (I386_DR_GLOBAL_ENABLE): Likewise.
7326 (I386_DR_DISABLE): Likewise.
7327 (I386_DR_SET_RW_LEN): Likewise.
7328 (I386_DR_GET_RW_LEN): Likewise.
7329 (I386_DR_WATCH_HIT): Likewise.
7330 (i386_wp_op_t): Likewise.
7331 (i386_show_dr): Likewise.
7332 (i386_length_and_rw_bits): Likewise.
7333 (i386_insert_aligned_watchpoint): Likewise.
7334 (i386_remove_aligned_watchpoint): Likewise.
7335 (i386_handle_nonaligned_watchpoint): Likewise.
7336 i386_update_inferior_debug_regs(): Likewise.
7337 (i386_dr_insert_watchpoint): Likewise.
7338 (i386_dr_remove_watchpoint): Likewise.
7339 (i386_dr_region_ok_for_watchpoint): Likewise.
7340 (i386_dr_stopped_data_address): Likewise.
7341 (i386_dr_stopped_by_watchpoint): Likewise.
7342
8f26655c
GB
73432014-06-19 Gary Benson <gbenson@redhat.com>
7344
7345 * i386-low.c (i386_dr_show): Renamed to
7346 i386_show_dr and made static. All uses updated.
7347 (i386_dr_length_and_rw_bits): Renamed to
7348 i386_length_and_rw_bits and made static.
7349 All uses updated.
7350 (i386_dr_insert_aligned_watchpoint): Renamed to
7351 i386_insert_aligned_watchpoint and made static.
7352 All uses updated.
7353 (i386_dr_remove_aligned_watchpoint): Renamed to
7354 i386_remove_aligned_watchpoint and made static.
7355 All uses updated.
7356 (i386_dr_update_inferior_debug_regs): Renamed to
7357 i386_update_inferior_debug_regs and made static.
7358 All uses updated.
7359
b9228891
GB
73602014-06-18 Gary Benson <gbenson@redhat.com>
7361
5171def3
GB
7362 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7363 (i386_dr_low_can_set_control): Likewise.
7364 (i386_get_debug_register_length): Likewise.
7365 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7366 (i386_dr_low_can_set_control): Likewise.
7367 (i386_get_debug_register_length): Likewise.
7368
73692014-06-17 Gary Benson <gbenson@redhat.com>
7370
b9228891
GB
7371 * i386-low.h (i386-dregs.h): New include.
7372 (DR_FIRSTADDR): Now in i386-dregs.h.
7373 (DR_LASTADDR): Likewise.
7374 (DR_NADDR): Likewise.
7375 (DR_STATUS): Likewise.
7376 (DR_CONTROL): Likewise.
7377 (i386_debug_reg_state): Likewise.
7378 (i386_dr_insert_watchpoint): Likewise.
7379 (i386_dr_remove_watchpoint): Likewise.
7380 (i386_dr_region_ok_for_watchpoint): Likewise.
7381 (i386_dr_stopped_data_address): Likewise.
7382 (i386_dr_stopped_by_watchpoint): Likewise.
7383 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7384
4be83cc2
GB
73852014-06-18 Gary Benson <gbenson@redhat.com>
7386
7387 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7388 i386_dr_insert_watchpoint.
7389 (i386_low_remove_watchpoint): Renamed to
7390 i386_dr_remove_watchpoint.
7391 (i386_low_region_ok_for_watchpoint): Renamed to
7392 i386_dr_region_ok_for_watchpoint.
7393 (i386_low_stopped_data_address): Renamed to
7394 i386_dr_stopped_data_address.
7395 (i386_low_stopped_by_watchpoint): Renamed to
7396 i386_dr_stopped_by_watchpoint.
7397 * i386-low.c (i386_show_dr): Renamed to
7398 i386_dr_show and made nonstatic. All uses updated.
7399 (i386_length_and_rw_bits): Renamed to
7400 i386_dr_length_and_rw_bits and made nonstatic.
7401 All uses updated.
7402 (i386_insert_aligned_watchpoint): Renamed to
7403 i386_dr_insert_aligned_watchpoint and made nonstatic.
7404 All uses updated.
7405 (i386_remove_aligned_watchpoint): Renamed to
7406 i386_dr_remove_aligned_watchpoint and made nonstatic.
7407 All uses updated.
7408 (i386_update_inferior_debug_regs): Renamed to
7409 i386_dr_update_inferior_debug_regs and made nonstatic.
7410 All uses updated.
7411 (i386_low_insert_watchpoint): Renamed to
7412 i386_dr_insert_watchpoint. All uses updated.
7413 (i386_low_remove_watchpoint): Renamed to
7414 i386_dr_remove_watchpoint. All uses updated.
7415 (i386_low_region_ok_for_watchpoint): Renamed to
7416 i386_dr_region_ok_for_watchpoint. All uses updated.
7417 (i386_low_stopped_data_address): Renamed to
7418 i386_dr_stopped_data_address. All uses updated.
7419 (i386_low_stopped_by_watchpoint): Renamed to
7420 i386_dr_stopped_by_watchpoint. All uses updated.
7421
131aa0d4
GB
74222014-06-18 Gary Benson <gbenson@redhat.com>
7423
7424 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7425 (i386_dr_low_can_set_control): Likewise.
7426 (i386_insert_aligned_watchpoint): New check.
7427
d9305f7f
GB
74282014-06-18 Gary Benson <gbenson@redhat.com>
7429
7430 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7431 Renamed to state.
7432
e927c9fc
GB
74332014-06-18 Gary Benson <gbenson@redhat.com>
7434
7435 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7436 instead of fatal and error.
7437 (i386_handle_nonaligned_watchpoint): Likewise.
7438
1b6d4134
GB
74392014-06-18 Gary Benson <gbenson@redhat.com>
7440
7441 * i386-low.c (i386_get_debug_register_length): New macro.
7442 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7443 (i386_show_dr): Use debug_printf instead of fprintf. Use
7444 phex to format values.
7445
6e62758f
GB
74462014-06-18 Gary Benson <gbenson@redhat.com>
7447
7448 * i386-low.h: Comment changes.
7449 * i386-low.c: Likewise.
7450
fc6e2f03
GB
74512014-06-18 Gary Benson <gbenson@redhat.com>
7452
7453 * i386-low.c: Whitespace changes.
7454
f9d1eeed
TT
74552014-06-12 Tom Tromey <tromey@redhat.com>
7456
7457 * utils.c (freeargv): Remove.
7458
0b04e523
TT
74592014-06-12 Tom Tromey <tromey@redhat.com>
7460
7461 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7462 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7463 (parse_debug_format_options): Likewise.
7464 (gdbserver_usage): Likewise.
7465 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7466 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7467 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7468 against libiberty.
7469 ($(LIBGNU)): Depend on libiberty.
7470 (all-lib): Recurse into all subdirs.
7471 (install-only): Invoke "install" target in subdirs.
7472 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7473 targets.
7474 * configure: Rebuild.
7475 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7476 for vasprintf, vsnprintf, or gettimeofday.
7477 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7478 srv_tgtobj.
7479
270c9937
JB
74802014-06-05 Joel Brobecker <brobecker@adacore.com>
7481
7482 * development.sh: Delete.
7483 * Makefile.in (config.status): Adjust dependency on development.sh.
7484 * configure.ac: Adjust development.sh source call.
7485 * configure: Regenerate.
7486
0a261ed8
PA
74872014-06-02 Pedro Alves <palves@redhat.com>
7488
7489 * ax.c (gdb_free_agent_expr): New function.
7490 * ax.h (gdb_free_agent_expr): New declaration.
7491 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7492 list.
7493 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7494 static.
7495 (clear_breakpoint_conditions_and_commands): New function.
7496 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7497 (clear_breakpoint_conditions_and_commands): New declaration.
7498
e9dae05e
RR
74992014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7500
7501 * linux-aarch64-low.c (asm/ptrace.h): Include.
7502
5876f503
JK
75032014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7504
7505 Fix TLS access for -static -pthread.
7506 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7507 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7508 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7509
802e8e6d
PA
75102014-05-20 Pedro Alves <palves@redhat.com>
7511
7512 * linux-aarch64-low.c (aarch64_insert_point)
7513 (aarch64_remove_point): No longer check whether the type is
7514 supported here. Adjust to new interface.
7515 (the_low_target): Install aarch64_supports_z_point_type as
7516 supports_z_point_type method.
7517 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7518 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7519 instead of a Z packet char. Adjust.
7520 (arm_supports_z_point_type): New function.
7521 (arm_insert_point, arm_remove_point): Adjust to new interface.
7522 (the_low_target): Install arm_supports_z_point_type.
7523 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7524 (cris_insert_point, cris_remove_point): Adjust to new interface.
7525 Don't check whether the type is supported here.
7526 (the_low_target): Install cris_supports_z_point_type.
7527 * linux-low.c (linux_supports_z_point_type): New function.
7528 (linux_insert_point, linux_remove_point): Adjust to new interface.
7529 * linux-low.h (struct linux_target_ops) <insert_point,
7530 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7531 raw_breakpoint pointer parameter.
7532 <supports_z_point_type>: New method.
7533 * linux-mips-low.c (mips_supports_z_point_type): New function.
7534 (mips_insert_point, mips_remove_point): Adjust to new interface.
7535 Use mips_supports_z_point_type.
7536 (the_low_target): Install mips_supports_z_point_type.
7537 * linux-ppc-low.c (the_low_target): Install NULL as
7538 supports_z_point_type method.
7539 * linux-s390-low.c (the_low_target): Install NULL as
7540 supports_z_point_type method.
7541 * linux-sparc-low.c (the_low_target): Install NULL as
7542 supports_z_point_type method.
7543 * linux-x86-low.c (x86_supports_z_point_type): New function.
7544 (x86_insert_point): Adjust to new insert_point interface. Use
7545 insert_memory_breakpoint. Adjust to new
7546 i386_low_insert_watchpoint interface.
7547 (x86_remove_point): Adjust to remove_point interface. Use
7548 remove_memory_breakpoint. Adjust to new
7549 i386_low_remove_watchpoint interface.
7550 (the_low_target): Install x86_supports_z_point_type.
7551 * lynx-low.c (lynx_target_ops): Install NULL as
7552 supports_z_point_type callback.
7553 * nto-low.c (nto_supports_z_point_type): New.
7554 (nto_insert_point, nto_remove_point): Adjust to new interface.
7555 (nto_target_ops): Install nto_supports_z_point_type.
7556 * mem-break.c: Adjust intro comment.
7557 (struct raw_breakpoint) <raw_type, size>: New fields.
7558 <inserted>: Update comment.
7559 <shlib_disabled>: Delete field.
7560 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7561 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7562 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7563 (raw_bkpt_type_to_target_hw_bp_type): New function.
7564 (find_enabled_raw_code_breakpoint_at): New function.
7565 (find_raw_breakpoint_at): New type and size parameters. Use them.
7566 (insert_memory_breakpoint): New function, based off
7567 set_raw_breakpoint_at.
7568 (remove_memory_breakpoint): New function.
7569 (set_raw_breakpoint_at): Reimplement.
7570 (set_breakpoint): New, based on set_breakpoint_at.
7571 (set_breakpoint_at): Reimplement.
7572 (delete_raw_breakpoint): Go through the_target->remove_point
7573 instead of assuming memory breakpoints.
7574 (find_gdb_breakpoint_at): Delete.
7575 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7576 (find_gdb_breakpoint): New function.
7577 (set_gdb_breakpoint_at): Delete.
7578 (z_type_supported): New function.
7579 (set_gdb_breakpoint_1): New function, loosely based off
7580 set_gdb_breakpoint_at.
7581 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7582 (delete_gdb_breakpoint_at): Delete.
7583 (delete_gdb_breakpoint_1): New function, loosely based off
7584 delete_gdb_breakpoint_at.
7585 (delete_gdb_breakpoint): New function.
7586 (clear_gdb_breakpoint_conditions): Rename to ...
7587 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7588 breakpoint.
7589 (add_condition_to_breakpoint): Make static.
7590 (add_breakpoint_condition): Take a struct breakpoint pointer
7591 instead of an address. Adjust.
7592 (gdb_condition_true_at_breakpoint): Rename to ...
7593 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7594 z_type parameter.
7595 (gdb_condition_true_at_breakpoint): Reimplement.
7596 (add_breakpoint_commands): Take a struct breakpoint pointer
7597 instead of an address. Adjust.
7598 (gdb_no_commands_at_breakpoint): Rename to ...
7599 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7600 parameter. Return true if no breakpoint was found. Change debug
7601 output.
7602 (gdb_no_commands_at_breakpoint): Reimplement.
7603 (run_breakpoint_commands): Rename to ...
7604 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7605 and change return type to boolean.
7606 (run_breakpoint_commands): New function.
7607 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7608 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7609 breakpoint. Go through the_target->remove_point instead of
7610 assuming memory breakpoint.
7611 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7612 software and hardware breakpoints.
7613 (reinsert_raw_breakpoint): Go through the_target->insert_point
7614 instead of assuming memory breakpoint.
7615 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7616 software and hardware breakpoints.
7617 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7618 Check both software and hardware breakpoints.
7619 (validate_inserted_breakpoint): Assert the breakpoint is a
7620 software breakpoint. Set the inserted flag to -1 instead of
7621 setting shlib_disabled.
7622 (delete_disabled_breakpoints): Adjust.
7623 (validate_breakpoints): Only validate software breakpoints.
7624 Adjust to inserted flag change.
7625 (check_mem_read, check_mem_write): Skip breakpoint types other
7626 than software breakpoints. Adjust to inserted flag change.
7627 * mem-break.h (enum raw_bkpt_type): New enum.
7628 (raw_breakpoint, struct process_info): Forward declare.
7629 (Z_packet_to_target_hw_bp_type): Delete declaration.
7630 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7631 (set_gdb_breakpoint, delete_gdb_breakpoint)
7632 (clear_breakpoint_conditions): New declarations.
7633 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7634 (breakpoint_inserted_here): Update comment.
7635 (add_breakpoint_condition, add_breakpoint_commands): Replace
7636 address parameter with a breakpoint pointer parameter.
7637 (gdb_breakpoint_here): Update comment.
7638 (delete_gdb_breakpoint_at): Delete.
7639 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7640 * server.c (process_point_options): Take a struct breakpoint
7641 pointer instead of an address. Adjust.
7642 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7643 delete_gdb_breakpoint.
7644 * spu-low.c (spu_target_ops): Install NULL as
7645 supports_z_point_type method.
7646 * target.h: Include mem-break.h.
7647 (struct target_ops) <prepare_to_access_memory>: Update comment.
7648 <supports_z_point_type>: New field.
7649 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7650 instead of a char. Also take a raw breakpoint pointer.
7651 * win32-arm-low.c (the_low_target): Install NULL as
7652 supports_z_point_type.
7653 * win32-i386-low.c (i386_supports_z_point_type): New function.
7654 (i386_insert_point, i386_remove_point): Adjust to new interface.
7655 (the_low_target): Install i386_supports_z_point_type.
7656 * win32-low.c (win32_supports_z_point_type): New function.
7657 (win32_insert_point, win32_remove_point): Adjust to new interface.
7658 (win32_target_ops): Install win32_supports_z_point_type.
7659 * win32-low.h (struct win32_target_ops):
7660 <supports_z_point_type>: New method.
7661 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7662 instead of a char. Also take a raw breakpoint pointer.
7663
932539e3
PA
76642014-05-20 Pedro Alves <palves@redhat.com>
7665
7666 * mem-break.h: Include break-common.h.
7667 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7668 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7669 (Z_packet_to_target_hw_bp_type): New declaration.
7670 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7671 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7672 (Z_PACKET_ACCESS_WP): Delete macros.
7673 (Z_packet_to_hw_type): Delete function.
7674 * i386-low.h: Don't include break-common.h here.
7675 (Z_packet_to_hw_type): Delete declaration.
7676 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7677 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7678 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7679 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7680 * linux-aarch64-low.c: Don't include break-common.h here.
7681 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7682 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7683 (Z_packet_to_target_hw_bp_type): Delete function.
7684 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7685 function.
7686 (mips_insert_point, mips_remove_point): Use
7687 Z_packet_to_target_hw_bp_type.
7688
4ff0d3d8
PA
76892014-05-20 Pedro Alves <palves@redhat.com>
7690
7691 * linux-aarch64-low.c: Include break-common.h.
7692 (enum target_point_type): Delete.
7693 (Z_packet_to_point_type): Rename to ...
7694 (Z_packet_to_target_hw_bp_type): ... this, and return a
7695 target_hw_bp_type instead.
7696 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7697 instead of an enum target_point_type.
7698 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7699 breakpoint type.
7700 (aarch64_dr_state_insert_one_point)
7701 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7702 (aarch64_handle_aligned_watchpoint)
7703 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7704 Take an enum target_hw_bp_type instead of an enum
7705 target_point_type.
7706 (aarch64_supports_z_point_type): New function.
7707 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7708 use Z_packet_to_target_hw_bp_type.
7709
786dc519
JB
77102014-05-20 Joel Brobecker <brobecker@adacore.com>
7711
7712 * configure.ac: Only use -Werror by default when DEVELOPMENT
7713 is true.
7714 * configure: Regenerate.
7715
9e0aa64f
JK
77162014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7717
7718 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7719 * linux-x86-low.c (X86_64_USER_REGS): New.
7720 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7721
2b577b92
YQ
77222014-04-28 Yao Qi <yao@codesourcery.com>
7723
7724 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7725 name.
7726
94611da2
PA
77272014-04-25 Pedro Alves <palves@redhat.com>
7728
7729 PR server/16255
7730 * linux-low.c (linux_attach_fail_reason_string): New function.
7731 (linux_attach_lwp): Delete.
7732 (linux_attach_lwp_1): Rename to ...
7733 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7734 argument. Remove "initial" parameter. Return int instead of
7735 void. Don't error or warn here.
7736 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7737 failure to attach to the tgid. Call warning when failing to
7738 attach to an lwp.
7739 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7740 argument. Remove "initial" parameter. Return int instead of
7741 void. Don't error or warn here.
7742 (linux_attach_fail_reason_string): New declaration.
7743 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7744 interface change. Use linux_attach_fail_reason_string.
7745
01f9f808
MS
77462014-04-24 Michael Sturm <michael.sturm@mintel.com>
7747 Walfred Tedeschi <walfred.tedeschi@intel.com>
7748
7749 * Makefile.in: Added rules to handle new files
7750 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7751 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7752 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7753 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7754 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7755 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7756 x32-avx512-linux.o.
7757 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7758 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7759 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7760 i386/x32-avx512.xml.
7761 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7762 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7763 i386/x32-avx512-linux.xml.
7764 * i387-fp.c (num_avx512_k_registers): New constant for number
7765 of K registers.
7766 (num_avx512_zmmh_low_registers): New constant for number of
7767 lower ZMM registers (0-15).
7768 (num_avx512_zmmh_high_registers): New constant for number of
7769 higher ZMM registers (16-31).
7770 (num_avx512_ymmh_registers): New contant for number of higher
7771 YMM registers (ymm16-31 added by avx521 on x86_64).
7772 (num_avx512_xmm_registers): New constant for number of higher
7773 XMM registers (xmm16-31 added by AVX512 on x86_64).
7774 (struct i387_xsave): Add space for AVX512 registers.
7775 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7776 Add code to handle AVX512 registers.
7777 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7778 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7779 prototypei from generated file.
7780 (tdesc_amd64_avx512_linux): Likewise.
7781 (init_registers_x32_avx512_linux): Likewise.
7782 (tdesc_x32_avx512_linux): Likewise.
7783 (init_registers_i386_avx512_linux): Likewise.
7784 (tdesc_i386_avx512_linux): Likewise.
7785 (x86_64_regmap): Add AVX512 registers.
7786 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7787 mask.
7788 (initialize_low_arch): Add code to initialize AVX512 registers.
7789
51aa91f9
PA
77902014-04-23 Pedro Alves <palves@redhat.com>
7791
7792 * mem-break.c (find_gdb_breakpoint_at): Make static.
7793 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7794
a4165e94
PA
77952014-04-23 Pedro Alves <palves@redhat.com>
7796
7797 * i386-low.c: Don't include break-common.h here.
7798 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7799 prototype to take target_hw_bp_type as argument instead of a Z
7800 packet char.
7801 * i386-low.h: Include break-common.h here.
7802 (Z_packet_to_hw_type): Declare.
7803 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7804 prototypes.
7805 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7806 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7807 (x86_remove_point): Convert the packet number to a
7808 target_hw_bp_type before calling i386_low_remove_watchpoint.
7809 * win32-i386-low.c (i386_insert_point): Convert the packet number
7810 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7811 (i386_remove_point): Convert the packet number to a
7812 target_hw_bp_type before calling i386_low_remove_watchpoint.
7813
b8acf843
PA
78142014-04-23 Pedro Alves <palves@redhat.com>
7815
7816 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7817
d708bcd1
PA
78182014-04-10 Pedro Alves <palves@redhat.com>
7819
7820 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7821 Check if the condition or command is NULL before checking if the
7822 breakpoint is known. On success, return true.
7823 * mem-break.h (add_breakpoint_condition): Document return.
7824 (add_breakpoint_commands): Add describing comment.
7825 * server.c (skip_to_semicolon): New function.
7826 (process_point_options): Use it.
7827
2eec7d5b
PA
78282014-04-09 Pedro Alves <palves@redhat.com>
7829
7830 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7831 to lwpid_of.
7832
fa96cb38
PA
78332014-02-27 Pedro Alves <palves@redhat.com>
7834
7835 PR 12702
7836 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7837 macros.
7838 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7839 output.
7840 (last_thread_of_process_p): Take a PID argument instead of a
7841 thread pointer.
7842 (linux_wait_for_lwp): Delete.
7843 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7844 functions.
7845 (linux_low_filter_event): New function, party factored out from
7846 linux_wait_for_event.
7847 (linux_wait_for_event): Rename to ...
7848 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7849 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7850 sigsuspend. Check for zombie leaders.
7851 (linux_wait_for_event): Reimplement as wrapper around
7852 linux_wait_for_event_filtered.
7853 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7854 a normal or signal exit is seen, it's the whole process exiting.
7855 (wait_for_sigstop): No longer a for_each_inferior callback.
7856 Rewrite on top of linux_wait_for_event_filtered.
7857 (stop_all_lwps): Call wait_for_sigstop directly.
7858 * server.c (resume, handle_target_event): Handle
7859 TARGET_WAITKIND_NO_RESUMED.
7860
d763de10
JB
78612014-02-26 Joel Brobecker <brobecker@adacore.com>
7862
7863 * win32-low.c (psapi_get_dll_name,
7864 * win32_CreateToolhelp32Snapshot): Delete.
7865 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7866 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7867 Delete.
7868 (handle_load_dll): Add function description.
7869 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7870
850a0f76
JB
78712014-02-26 Joel Brobecker <brobecker@adacore.com>
7872
7873 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7874 Add comment.
7875 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7876 base address when calling win32_add_one_solib.
7877 (handle_load_dll): Delete local variable load_addr.
7878 Remove 0x1000 offset applied to DLL base address when calling
7879 win32_add_one_solib.
7880 (handle_unload_dll): Add comment.
7881
f25b3fc3
JB
78822014-02-26 Joel Brobecker <brobecker@adacore.com>
7883
7884 * win32-low.c (win32_add_all_dlls): Renames
7885 win32_ensure_ntdll_loaded. Rewrite function documentation.
7886 Adjust implementation to always load all DLLs.
7887 Add 0x1000 offset to DLL base address when calling
7888 win32_add_one_solib.
7889 (child_initialization_done): New static global.
7890 (do_initial_child_stuff): Set child_initialization_done to
7891 zero during child initialization, and 1 after. Replace call
7892 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7893 Add comment.
7894 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7895 (handle_unload_dll): Add function documentation.
7896 (get_child_debug_event): Ignore load and unload DLL events
7897 during child initialization.
7898
d86d4aaf
DE
78992014-02-20 Doug Evans <dje@google.com>
7900
3bc32da3 7901 Remove global all_lwps.
d86d4aaf
DE
7902 * inferiors.h (ptid_of): Move here from linux-low.h.
7903 (pid_of, lwpid_of): Ditto.
7904 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7905 parameter is a struct thread_info * now.
7906 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7907 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7908 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7909 directly.
7910 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7911 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7912 * linux-arm-low.c (update_registers_callback): Update, "entry"
7913 parameter is a struct thread_info * now.
7914 Fetch lwpid from current_inferior directly.
7915 (arm_insert_point): Pass &all_threads to find_inferior instead of
7916 &all_lwps.
7917 (arm_remove_point): Ditto.
7918 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7919 (arm_prepare_to_resume): Fetch pid from thread.
7920 (arm_read_description): Fetch lwpid from current_inferior directly.
7921 * linux-low.c (all_lwps): Delete.
7922 (delete_lwp): Delete call to remove_inferior.
7923 (handle_extended_wait): Fetch lwpid from thread.
7924 (add_lwp): Don't set lwp->entry.id. Remove call to
7925 add_inferior_to_list.
7926 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7927 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7928 (kill_one_lwp_callback): Ditto.
7929 (linux_kill): Don't dereference NULL pointer.
7930 Fetch ptid,lwpid from thread.
7931 (get_detach_signal): Fetch ptid from thread.
7932 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7933 Simplify call to regcache_invalidate_thread.
7934 (delete_lwp_callback): Update, "entry" parameter is a
7935 struct thread_info * now. Fetch pid from thread.
7936 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7937 (status_pending_p_callback): Update, "entry" parameter is a
7938 struct thread_info * now. Fetch ptid from thread.
7939 (find_lwp_pid): Update, "entry" parameter is a
7940 struct thread_info * now.
7941 (linux_wait_for_lwp): Fetch pid from thread.
7942 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7943 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7944 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7945 (dequeue_one_deferred_signal): Ditto.
7946 (cancel_breakpoint): Fetch ptid from current_inferior.
7947 (linux_wait_for_event): Pass &all_threads to find_inferior,
7948 not &all_lwps. Fetch ptid, lwpid from thread.
7949 (count_events_callback): Update, "entry" parameter is a
7950 struct thread_info * now.
7951 (select_singlestep_lwp_callback): Ditto.
7952 (select_event_lwp_callback): Ditto.
7953 (cancel_breakpoints_callback): Ditto.
7954 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7955 not &all_lwps.
7956 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7957 (unsuspend_one_lwp): Update, "entry" parameter is a
7958 struct thread_info * now.
7959 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7960 not &all_lwps.
7961 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7962 Fetch lwpid from thread, not lwp.
7963 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7964 Pass &all_threads to find_inferior, not &all_lwps.
7965 (send_sigstop): Fetch lwpid from thread, not lwp.
7966 (send_sigstop_callback): Update, "entry" parameter is a
7967 struct thread_info * now.
7968 (suspend_and_send_sigstop_callback): Ditto.
7969 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7970 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7971 struct thread_info * now.
7972 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7973 from thread, lwp.
7974 (lwp_running): Update, "entry" parameter is a
7975 struct thread_info * now.
7976 (stop_all_lwps): Fetch ptid from thread.
7977 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7978 (linux_resume_one_lwp): Fetch lwpid from thread.
7979 (linux_set_resume_request): Update, "entry" parameter is a
7980 struct thread_info * now. Fetch pid, lwpid from thread.
7981 (resume_status_pending_p): Update, "entry" parameter is a
7982 struct thread_info * now.
7983 (need_step_over_p): Ditto. Fetch lwpid from thread.
7984 (start_step_over): Fetch lwpid from thread.
7985 (linux_resume_one_thread): Update, "entry" parameter is a
7986 struct thread_info * now. Fetch lwpid from thread.
7987 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7988 (proceed_one_lwp): Update, "entry" parameter is a
7989 struct thread_info * now. Fetch lwpid from thread.
7990 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7991 struct thread_info * now.
7992 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7993 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7994 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7995 directly.
7996 (regsets_store_inferior_registers): Ditto.
7997 (fetch_register, store_register): Ditto.
7998 (linux_read_memory, linux_write_memory): Ditto.
7999 (linux_request_interrupt): Ditto.
8000 (linux_read_auxv): Ditto.
8001 (linux_xfer_siginfo): Ditto.
8002 (linux_qxfer_spu): Ditto.
8003 (linux_qxfer_libraries_svr4): Ditto.
8004 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8005 moved to inferiors.h.
8006 (get_lwp): Delete.
8007 (get_thread_lwp): Update.
8008 (struct lwp_info): Delete member "entry". Simplify comment for
8009 member "thread".
8010 (all_lwps): Delete.
8011 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8012 current_inferior directly.
8013 (update_watch_registers_callback): Update, "entry" parameter is a
8014 struct thread_info * now. Fetch pid from thread.
8015 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8016 (mips_insert_point): Fetch lwpid from current_inferior.
8017 Pass &all_threads to find_inferior, not &all_lwps.
8018 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8019 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8020 directly.
8021 (mips_stopped_data_address): Ditto.
8022 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8023 directly.
8024 * linux-tile-low.c (tile_arch_setup): Ditto.
8025 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8026 (update_debug_registers_callback): Update, "entry" parameter is a
8027 struct thread_info * now. Fetch pid from thread.
8028 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8029 Pass &all_threads to find_inferior, not &all_lwps.
8030 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8031 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8032 Pass &all_threads to find_inferior, not &all_lwps.
8033 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8034 (i386_dr_low_get_status): Ditto.
8035 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8036 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8037 (x86_linux_read_description): Ditto.
8038 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8039
3b8361aa
DE
80402014-02-20 Doug Evans <dje@google.com>
8041
8042 * inferiors.c (get_first_inferior): Fix buglet.
8043
f7667f0d
DE
80442014-02-19 Doug Evans <dje@google.com>
8045
8046 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8047 * inferiors.c (add_thread): Change result type to struct thread_info *.
8048 All callers updated.
8049 (add_lwp): Call add_thread here instead of in callers.
8050 All callers updated.
8051 * linux-low.h (get_lwp_thread): Rewrite.
8052 (struct lwp_info): New member "thread".
8053
b3312d80
DE
80542014-02-19 Doug Evans <dje@google.com>
8055
8056 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8057 All callers updated.
8058
ecc6f45c
DE
80592014-02-19 Doug Evans <dje@google.com>
8060
8061 * inferiors.c (add_thread): Fix whitespace.
8062
649ebbca
DE
80632014-02-19 Doug Evans <dje@google.com>
8064
8065 * dll.c (clear_dlls): Replace accessing list implemention details
8066 with API function.
8067 * gdbthread.h (get_first_thread): Declare.
8068 * inferiors.c (for_each_inferior_with_data): New function.
8069 (get_first_thread): New function.
8070 (find_thread_ptid): Simplify.
8071 (get_first_inferior): New function.
8072 (clear_list): Delete.
8073 (one_inferior_p): New function.
8074 (clear_inferior_list): New function.
8075 (clear_inferiors): Update.
8076 * inferiors.h (for_each_inferior_with_data): Declare.
8077 (clear_inferior_list): Declare.
8078 (one_inferior_p): Declare.
8079 (get_first_inferior): Declare.
8080 * linux-low.c (linux_wait_for_event): Replace accessing list
8081 implemention details with API function.
8082 * server.c (target_running): Ditto.
8083 (accumulate_file_name_length): New function.
8084 (emit_dll_description): New function.
8085 (handle_qxfer_libraries): Replace accessing list implemention
8086 details with API function.
8087 (handle_qxfer_threads_worker): New function.
8088 (handle_qxfer_threads_proper): Replace accessing list implemention
8089 details with API function.
8090 (handle_query): Ditto.
8091 (visit_actioned_threads_callback_ftype): New typedef.
8092 (visit_actioned_threads_data): New struct.
8093 (visit_actioned_threads): Rewrite to be find_inferior callback.
8094 (resume): Call find_inferior.
8095 (handle_status): Replace accessing list implemention
8096 details with API function.
8097 (process_serial_event): Replace accessing list implemention details
8098 with API function.
8099 * target.c (set_desired_inferior): Replace accessing list implemention
8100 details with API function.
8101 * tracepoint.c (same_process_p): New function.
8102 (gdb_agent_about_to_close): Replace accessing list implemention
8103 details with API function.
8104 * win32-low.c (child_delete_thread): Replace accessing list
8105 implemention details with API function.
8106 (match_dll_by_basename): New function.
8107 (dll_is_loaded_by_basename): New function.
8108 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8109 details call to dll_is_loaded_by_basename.
8110
80894984
DE
81112014-02-19 Doug Evans <dje@google.com>
8112
8113 * dll.h (struct dll_info): Add comment.
8114 * gdbthread.h (struct thread_info): Add comment.
8115 (current_ptid): Simplify.
8116 * inferiors.c (add_process): Update.
8117 (remove_process): Update.
8118 * inferiors.h (struct process_info): Rename member "head" to "entry".
8119 * linux-low.c (delete_lwp): Update.
8120 (add_lwp): Update.
8121 (last_thread_of_process_p): Update.
8122 (kill_one_lwp_callback, linux_kill): Update.
8123 (status_pending_p_callback): Update.
8124 (wait_for_sigstop): Update. Simplify read of ptid.
8125 (start_step_over): Update.
8126 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8127 (get_lwp_thread): Update.
8128 (struct lwp_info): Rename member "head" to "entry".
8129 * regcache.h (inferior_list_entry): Delete.
8130 * server.c (kill_inferior_callback): Update.
8131 (detach_or_kill_inferior_callback): Update.
8132 (print_started_pid): Update.
8133 (print_attached_pid): Update.
8134 (process_serial_event): Simplify read of ptid.
8135 * thread-db.c (thread_db_create_event): Update.
8136 (thread_db_get_tls_address): Update.
8137 * win32-low.c (current_inferior_ptid): Simplify.
8138
46917d26
TT
81392014-02-19 Tom Tromey <tromey@redhat.com>
8140
8141 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8142 argument.
8143 (target_supports_btrace): Update.
8144
0759a81e
YQ
81452014-02-14 Yao Qi <yao@codesourcery.com>
8146
8147 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8148 (rsp-low-ipa.o): New target.
8149
a7191e8b
TT
81502014-02-12 Tom Tromey <tromey@redhat.com>
8151
8152 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8153 convert_ascii_to_int.
8154 * regcache.c (registers_to_string): Likewise.
8155 * remote-utils.c (decode_M_packet): Likewise.
8156 * server.c (process_serial_event): Likewise.
8157
ff0e980e
TT
81582014-02-12 Tom Tromey <tromey@redhat.com>
8159
8160 * server.c (handle_query, handle_v_run): Use hex2bin, not
8161 unhexify.
8162 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8163
e9371aff
TT
81642014-02-12 Tom Tromey <tromey@redhat.com>
8165
8166 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8167 convert_int_to_ascii.
8168 * regcache.c (registers_to_string, collect_register_as_string):
8169 Likewise.
8170 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8171 Likewise.
8172 * server.c (process_serial_event): Likewise.
8173 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8174 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8175
971dc0b8
TT
81762014-02-12 Tom Tromey <tromey@redhat.com>
8177
8178 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8179 bin2hex, not hexify.
8180 * tracepoint.c (cmd_qtstatus): Likewise.
8181
0a822afb
TT
81822014-02-12 Tom Tromey <tromey@redhat.com>
8183
8184 * remote-utils.c (monitor_output): Pass explicit length to
8185 hexify.
8186
9c3d6531
TT
81872014-02-12 Tom Tromey <tromey@redhat.com>
8188
8189 * tracepoint.c: Include rsp-low.h.
8190 * server.c: Include rsp-low.h.
8191 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8192 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8193 declare.
8194 * remote-utils.c: Include rsp-low.h.
8195 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8196 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8197 (convert_int_to_ascii, convert_ascii_to_int): Move to
8198 common/rsp-low.c.
8199 * regcache.c: Include rsp-low.h.
8200 * ax.c: Include rsp-low.h.
8201 * Makefile.in (SFILES): Add common/rsp-low.c.
8202 (OBS): Add rsp-low.o.
8203 (rsp-low.o): New target.
8204
01fd3ea5
TT
82052014-02-12 Tom Tromey <tromey@redhat.com>
8206
8207 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8208 Include print-utils.h.
8209 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8210 (plongest, thirty_two, phex_nz): Remove.
8211 * Makefile.in (SFILES): Add common/print-utils.c.
8212 (OBS): Add print-utils.o.
8213 (print-utils-ipa.o): New target.
8214 (print-utils.o): New target.
8215 (IPA_OBJS): Add print-utils-ipa.o.
8216
e99dc820
TT
82172014-02-06 Tom Tromey <tromey@redhat.com>
8218
8219 * Makefile.in (SFILES): Fix indentation.
8220
ee1e2d4f
DE
82212014-02-05 Doug Evans <dje@google.com>
8222
8223 * linux-low.c (linux_wait_for_event): Improve comment.
8224 (linux_wait_1): Keep current_inferior in sync with event_child.
8225
f5a02773
DE
82262014-01-22 Doug Evans <dje@google.com>
8227
8228 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8229
87ce2a04
DE
82302014-01-22 Doug Evans <dje@google.com>
8231
8232 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8233 * configure: Regenerate.
8234 * config.in: Regenerate.
8235 * Makefile.in (SFILES): Add debug.c.
8236 (OBS): Add debug.o.
8237 * debug.c: New file.
8238 * debug.h: New file.
8239 * linux-aarch64-low.c (*): Update all debugging printfs to use
8240 debug_printf instead of fprintf.
8241 * linux-arm-low.c (*): Ditto.
8242 * linux-cris-low.c (*): Ditto.
8243 * linux-crisv32-low.c (*): Ditto.
8244 * linux-m32r-low.c (*): Ditto.
8245 * linux-sparc-low.c (*): Ditto.
8246 * linux-x86.c (*): Ditto.
8247 * linux-low.c (*): Ditto.
8248 (linux_wait_1): Add calls to debug_enter, debug_exit.
8249 (linux_wait): Remove redundant debugging printf.
8250 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8251 (linux_resume, unstop_all_lwps): Ditto.
8252 * mem-break.c (*): Update all debugging printfs to use
8253 debug_printf instead of fprintf.
8254 * remote-utils.c (*): Ditto.
8255 * thread-db.c (*): Ditto.
8256 * server.c #include <ctype.h>, "gdb_vecs.h".
8257 (debug_threads): Moved to debug.c.
8258 (*): Update all debugging printfs to use debug_printf instead of
8259 fprintf.
8260 (start_inferior): Replace call to fflush with call to debug_flush.
8261 (monitor_show_help): Mention set debug-format.
8262 (parse_debug_format_options): New function.
8263 (handle_monitor_command): Handle "monitor set debug-format".
8264 (gdbserver_usage): Mention --debug-format.
8265 (main): Parse --debug-format.
8266 * server.h (debug_threads): Declaration moved to debug.h.
8267 #include "debug.h".
8268 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8269 trace_debug_1 that uses debug_printf.
8270 (tracepoint_look_up_symbols): Update all debugging printfs to use
8271 debug_printf instead of fprintf.
8272
e671835b
BS
82732014-01-20 Baruch Siach <baruch@tkos.co.il>
8274
8275 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8276 sys/ptrace.h.
8277
b5737fa9
PA
82782014-01-17 Pedro Alves <palves@redhat.com>
8279
ea38d2a9 8280 PR build/16445
c7faa97a
PA
8281 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8282 defined after including gdb_proc_service.h.
b5737fa9 8283
40ed484e
DE
82842014-01-16 Doug Evans <dje@google.com>
8285
8286 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8287 (match_dll): Use it.
8288
969c39fb
MM
82892014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8290
8291 * target.h (target_ops) <read_btrace>: Change parameters and
8292 return type to allow error reporting.
8293 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8294 trace reading errors on.
8295 * linux-low.c (linux_low_read_btrace): Pass trace reading
8296 errors on.
8297 (linux_low_disable_btrace): New.
8298
ab7f45ba
DE
82992014-01-15 Doug Evans <dje@google.com>
8300
8301 * inferiors.c (thread_id_to_gdb_id): Delete.
8302 * inferiors.h (thread_id_to_gdb_id): Delete.
8303
66af0f44
EZ
83042014-01-13 Eli Zaretskii <eliz@gnu.org>
8305
8306 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8307 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8308 versions.
8309
9939e131
PA
83102014-01-08 Pedro Alves <palves@redhat.com>
8311
8312 * server.c (handle_status): Don't discard previous queued stop
8313 replies or thread's pending status here.
8314 (main) <disconnection>: Do it here instead.
8315
b7ea362b
PA
83162014-01-08 Pedro Alves <palves@redhat.com>
8317
8318 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8319 * server.c (visit_actioned_threads, handle_pending_status): New
8320 function.
8321 (handle_v_cont): Factor out parts to ...
8322 (resume): ... this new function. If in all-stop, and a thread
8323 being resumed has a pending status, report it without actually
8324 resuming.
8325 (myresume): Adjust to use the new 'resume' function.
8326 (clear_pending_status_callback, set_pending_status_callback)
8327 (find_status_pending_thread_callback): New functions.
8328 (handle_status): Handle the case of multiple threads having
8329 interesting statuses to report. Report threads' real last signal
8330 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8331 with an interesting thread to report the status for, instead of
8332 always reporting the status of the first thread.
8333
28498c42
JB
83342014-01-01 Joel Brobecker <brobecker@adacore.com>
8335
8336 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8337 * gdbreplay.c (gdbreplay_version): Likewise.
8338
f45c82da
YZ
83392013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8340
8341 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8342 iov.iov_len with the real length in use.
8343
379a5e2d
JB
83442013-12-13 Joel Brobecker <brobecker@adacore.com>
8345
8346 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8347 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8348 for all targets that use win32-low.c.
8349 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8350 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8351
4210d83e
PA
83522013-12-13 Pedro Alves <palves@redhat.com>
8353
8354 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8355 if equal to TARGET_WAITKIND_LOADED.
8356 * win32-low.c (cached_status): New static global.
8357 (win32_wait): Add declaration.
8358 (do_initial_child_stuff): Flush all initial pending debug events
8359 up to the initial breakpoint.
8360 (win32_wait): If CACHED_STATUS was set, return that instead
8361 of doing a real wait. Remove the code resuming the execution
8362 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8363 during the initial phase. Also remove the code changing
8364 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8365 TARGET_WAITKIND_STOPPED.
8366
e7f0d979
YQ
83672013-12-11 Yao Qi <yao@codesourcery.com>
8368
8369 * notif.c (handle_notif_ack): Return 0 if no notification
8370 matches.
8371
ebcf782c
DE
83722013-11-20 Doug Evans <dje@google.com>
8373
8374 * linux-low.c (linux_set_resume_request): Fix comment.
8375
20ad9378
DE
83762013-11-20 Doug Evans <dje@google.com>
8377
8378 * linux-low.c (resume_status_pending_p): Tweak comment.
8379
a196ebeb
WT
83802013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8381
8382 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8383 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8384 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8385 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8386 (srv_amd64_regobj): Add amd64-mpx.o.
8387 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8388 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8389 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8390 * i387-fp.c (num_pl_bnd_register) Added constant.
8391 (num_pl_bnd_cfg_registers) Added constant.
8392 (struct i387_xsave) Added reserved area and MPX fields.
8393 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8394 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8395 function.
8396 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8397 (init_registers_amd64_mpx_linux): Declare new function.
8398 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8399 (x86_64_regmap): Add MPX registers.
8400 (x86_linux_read_description): Add MPX case.
8401 (initialize_low_arch): Initialize MPX targets.
8402
0080a2f6
TT
84032013-11-18 Tom Tromey <tromey@redhat.com>
8404
8405 * configure: Rebuild.
8406 * configure.ac: Don't check for stdlib.h.
8407 * gdbreplay.c: Unconditionally include stdlib.h.
8408
2978b111
TT
84092013-11-18 Tom Tromey <tromey@redhat.com>
8410
8411 * config.in: Rebuild.
8412 * configure: Rebuild.
8413 * configure.ac: Don't use AC_HEADER_DIRENT.
8414
a3d08894
TT
84152013-11-18 Tom Tromey <tromey@redhat.com>
8416
8417 * server.h: Don't check HAVE_STRING_H.
8418 * gdbreplay.c: Don't check HAVE_STRING_H.
8419 * configure: Rebuild.
8420
0a5dd17d
TT
84212013-11-18 Tom Tromey <tromey@redhat.com>
8422
8423 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8424 LIBGNU.
8425
1bd2f0ba
TT
84262013-11-08 Tom Tromey <tromey@redhat.com>
8427
8428 * configure, config.in: Rebuild.
8429 * configure.ac: Remove unused configury.
8430
3266f10b
TT
84312013-11-08 Tom Tromey <tromey@redhat.com>
8432
8433 * acinclude.m4: Include common.m4, codeset.m4.
8434 * configure, config.in: Rebuild.
8435 * configure.ac: Use GDB_AC_COMMON.
8436
6682d959
AA
84372013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8438
8439 * linux-s390-low.c (HWCAP_S390_TE): New define.
8440 (s390_arch_setup): Consider the TE field in the HWCAP for
8441 determining 'have_regset_tdb'.
8442
fd0a4d76
SDJ
84432013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8444
8445 PR gdb/16014
8446 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8447 call to sizeof.
8448
1a3d890b
PA
84492013-10-02 Pedro Alves <palves@redhat.com>
8450
8451 * server.c (process_serial_event): Don't output "GDBserver
8452 exiting" if GDB is connected through stdio.
8453 * target.c (mywait): Likewise, be silent if GDB is connected
8454 through stdio.
8455
97ad4581
JB
84562013-10-01 Joel Brobecker <brobecker@adacore.com>
8457
8458 * lynx-low.c (lynx_add_threads_after_attach): New function.
8459 (lynx_attach): Remove call to add_thread. Add call to
8460 lynx_add_threads_after_attach instead.
8461
5b4e221c
MF
84622013-09-28 Mike Frysinger <vapier@gentoo.org>
8463
8464 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8465 * config.in, configure: Regenerated.
8466
ee47b2f8
YQ
84672013-09-18 Yao Qi <yao@codesourcery.com>
8468
8469 PR server/15959
8470 * server.c (start_inferior): Clear 'resume_info'.
8471
d6707650 84722013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8473
d6707650
JW
8474 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8475 for each register.
8476
9243dd0e 84772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8478
9243dd0e
JW
8479 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8480 linux-tile-low.o to srv_tgtobj.
8481
c623a6ef
WN
84822013-09-16 Will Newton <will.newton@linaro.org>
8483
8484 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8485 out regs.
8486
fb71d39e
PA
84872013-09-06 Pedro Alves <palves@redhat.com>
8488
8489 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8490 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8491 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8492 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8493 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8494 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8495
8e7e9910
PA
84962013-09-06 Pedro Alves <palves@redhat.com>
8497
8498 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8499 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8500
7c3a12ca
PA
85012013-09-06 Pedro Alves <palves@redhat.com>
8502
8503 * linux-amd64-ipa.c: Include tracepoint.h.
8504 * linux-i386-ipa.c: Include tracepoint.h.
8505
8eb3d7b6
RW
85062013-09-06 Ricard Wanderlof <ricardw@axis.com>
8507
8508 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8509 (ps_get_thread_area): New function.
8510
eddddb9d
RW
85112013-09-06 Ricard Wanderlof <ricardw@axis.com>
8512
8513 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8514 (initialize_low_arch): Call init_registers_crisv32 rather than
8515 init_register_crisv32.
8516
533b0600
PA
85172013-09-05 Pedro Alves <palves@redhat.com>
8518
8519 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8520 to ...
8521 * hostio.h: ... this new file.
8522 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8523 win32-low.c: Include hostio.h.
8524
0ce3d3b5
PA
85252013-09-05 Pedro Alves <palves@redhat.com>
8526
8527 * server.h (gdb_client_data, handler_func, callback_handler_func)
8528 (delete_file_handler, add_file_handler, append_callback_event)
8529 (delete_callback_event, start_event_loop, initialize_event_loop):
8530 Move to event-loop.h and include it.
8531 * event-loop.h: New file.
8532
799cdc37
PA
85332013-09-05 Pedro Alves <palves@redhat.com>
8534
8535 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8536 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8537 (loaded_dll, unloaded_dll): Move to ...
8538 * dll.h: ... this new file.
8539 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8540
6a6bbd9d
PA
85412013-09-05 Pedro Alves <palves@redhat.com>
8542
8543 * server.h (current_process, get_thread_process, all_processes)
8544 (add_inferior_to_list, for_each_inferior, current_inferior)
8545 (remove_inferior, add_process, remove_process, find_process_pid)
8546 (have_started_inferiors_p, have_attached_inferiors_p)
8547 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8548 (clear_inferiors, find_inferior, find_inferior_id)
8549 (inferior_target_data, set_inferior_target_data)
8550 (inferior_regcache_data, set_inferior_regcache_data): Move to
8551 inferiors.h, and include it.
8552 * inferiors.h: New file.
8553
f699aaba
PA
85542013-09-05 Pedro Alves <palves@redhat.com>
8555
8556 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8557 Move ...
72f4393d 8558 * ax.h: ... here.
f699aaba 8559
c144c7a0
PA
85602013-09-05 Pedro Alves <palves@redhat.com>
8561
8562 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8563 tracepoint.h.
8564 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8565 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8566 (handle_tracepoint_general_set, handle_tracepoint_query)
8567 (tracepoint_finished_step, tracepoint_was_hit)
8568 (release_while_stepping_state_list, current_traceframe)
8569 (in_readonly_region, traceframe_read_mem)
8570 (fetch_traceframe_registers, traceframe_read_sdata)
8571 (traceframe_read_info, struct fast_tpoint_collect_status)
8572 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8573 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8574 (supply_fast_tracepoint_registers)
8575 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8576 (ipa_tdesc, claim_trampoline_space)
8577 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8578 (agent_mem_read, agent_get_trace_state_variable_value)
8579 (agent_set_trace_state_variable_value, agent_tsv_read)
8580 (agent_mem_read_string, get_raw_reg_func_addr)
8581 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8582 * tracepoint.h: ... this new file.
8583
ff42e6ab
PA
85842013-09-05 Pedro Alves <palves@redhat.com>
8585
8586 * server.h (perror_with_name, error, fatal, warning, paddress)
8587 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8588 include it.
8589 * utils.h: New file.
8590
541af0f4
PA
85912013-09-05 Pedro Alves <palves@redhat.com>
8592
8593 * server.h (remote_debug, noack_mode, transport_is_reliable)
8594 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8595 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8596 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8597 (write_enn, initialize_async_io, enable_async_io)
8598 (disable_async_io, check_remote_input_interrupt_request)
8599 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8600 (dead_thread_notify, prepare_resume_reply)
8601 (decode_address_to_semicolon, decode_address, decode_m_packet)
8602 (decode_M_packet, decode_X_packet, decode_xfer_write)
8603 (decode_search_memory_packet, unhexify, hexify)
8604 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8605 (look_up_one_symbol, relocate_instruction)
8606 (monitor_output): Move to remote-utils.h, and include it.
8607 * remote-utils.h: New file.
8608
eebdf26b
PA
86092013-09-05 Pedro Alves <palves@redhat.com>
8610
8611 * server.h (_): Delete.
8612
3aafd2ff
PA
86132013-09-02 Pedro Alves <palves@redhat.com>
8614
8615 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8616 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8617 allocated.
8618 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8619
cee83bcb
PM
86202013-09-02 Pierre Muller <muller@sourceware.org>
8621
8622 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8623 or WriteProcessMemory complete successfully and handle
8624 ERROR_PARTIAL_COPY error.
8625
9a13b2fa
PA
86262013-09-02 Pedro Alves <palves@redhat.com>
8627
8628 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8629 error instead of EIO.
8630
602e3198
JK
86312013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8632
8633 PR server/15604
8634 * linux-low.c: Include filestuff.h.
8635 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8636 * lynx-low.c: Include filestuff.h.
8637 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8638 * server.c: Include filestuff.h.
8639 (main): Call notice_open_fds.
8640 * spu-low.c: Include filestuff.h.
8641 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8642
96d7229d
LM
86432013-08-22 Luis Machado <lgustavo@codesourcery.com>
8644
8645 * Makefile.in: Explain why ../target and ../nat are not
8646 listed as include file search paths.
8647 (linux-waitpid.o): New object file rule.
8648 * configure.srv (srv_native_linux_obj): New variable.
8649 Replace all occurrences of linux native object files with
8650 $srv_native_linux_obj.
8651 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8652 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8653 (linux_enable_event_reporting): Remove declaration.
8654 (my_waitpid): Moved to common/linux-waitpid.c.
8655 (linux_wait_for_event): Pass ptid when calling
8656 linux_enable_event_reporting.
8657 (linux_supports_tracefork_flag): Remove.
8658 (linux_enable_event_reporting): Likewise.
8659 (linux_tracefork_grandchild): Remove.
8660 (STACK_SIZE): Moved to common/linux-ptrace.c.
8661 (linux_tracefork_child): Remove.
8662 (linux_test_for_tracefork): Remove.
8663 (linux_look_up_symbols): Call linux_supports_traceclone.
8664 (initialize_low): Remove call to linux_test_for_tracefork.
8665 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8666 common/linux-ptrace.h.
8667 (PTRACE_TYPE_ARG4): Likewise.
8668 Include linux-ptrace.h.
8669
32940073
PA
86702013-08-21 Pedro Alves <palves@redhat.com>
8671
8672 * config.in: Renegerate.
8673
33b60d58 86742013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8675
33b60d58
LM
8676 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8677 (SFILES): Remove $(srcdir)/common/target-common.c and
8678 add $(srcdir)/target/waitstatus.c.
8679 (OBS): Remove target-common.o and add waitstatus.o.
8680 (server_h): Remove $(srcdir)/../common/target-common.h and
8681 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8682 and $(srcdir)/../target/waitstatus.h.
8683 (target-common.o): Remove.
8684 (waitstatus.o): New target object file.
8685 * target.h: Do not include target-common.h and
8686 include target/resume.h, target/wait.h and
8687 target/waitstatus.h.
8688
b8e1b30e
LM
86892013-08-13 Luis Machado <lgustavo@codesourcery.com>
8690
8691 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8692 to PTRACE_TYPE_ARG3.
8693 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8694 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8695 PTRACE_TYPE_ARG4.
8696 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8697 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8698
7a60ad40
YQ
86992013-07-27 Jie Zhang <jie@codesourcery.com>
8700 Daniel Jacobowitz <dan@codesourcery.com>
8701 Yao Qi <yao@codesourcery.com>
8702
8703 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8704 (mips-linux-watch.o): New rule.
8705 (mips_linux_watch_h): New variable.
8706 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8707 srv_tgtobj.
8708 * linux-mips-low.c: Include mips-linux-watch.h.
8709 (struct arch_process_info, struct arch_lwp_info): New.
8710 (update_watch_registers_callback): New function.
8711 (mips_linux_new_process, mips_linux_new_thread) New functions.
8712 (mips_linux_prepare_to_resume, mips_insert_point): New
8713 functions.
8714 (mips_remove_point, mips_stopped_by_watchpoint): New
8715 functions.
8716 (rsp_bp_type_to_target_hw_bp_type): New function.
8717 (mips_stopped_data_address): New function.
8718 (the_low_target): Add watchpoint support functions.
8719
de6f69ad
YQ
87202013-07-27 Yao Qi <yao@codesourcery.com>
8721
8722 * i386-low.c: Include break-common.h.
8723 (enum target_hw_bp_type): Remove.
8724
3360c0bf
LM
87252013-07-24 Luis Machado <lgustavo@codesourcery.com>
8726
8727 * Makefile.in (SFILES): /common/target-common.c.
8728 (OBS): Add target-common.o.
8729 (server_h): Add $(srcdir)/../common/target-common.h.
8730 (target-common.o): New target.
8731 * server.c (queue_stop_reply_callback): Free
8732 status string after use.
8733 * target.c (target_waitstatus_to_string): Remove.
8734 * target.h: Include target-common.h.
8735 (resume_kind): Likewise.
8736 (target_waitkind): Likewise.
8737 (target_waitstatus): Likewise.
8738 (TARGET_WNOHANG): Likewise.
8739
bd885420
YQ
87402013-07-04 Yao Qi <yao@codesourcery.com>
8741
8742 * Makefile.in (host_alias): Use @host_noncanonical@.
8743 (target_alias): Use @target_noncanonical@.
8744 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8745 ACX_NONCANONICAL_HOST.
8746 * configure: Regenerated.
8747
8748 Revert:
8749 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8750
8751 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8752 * configure: Rebuild.
8753 * Makefile.in (version_host, version_target): Get from configure.
8754 (version.c): Use $(version_host) and $(version_target).
8755
17ef446e
PA
87562013-07-03 Pedro Alves <palves@redhat.com>
8757
8758 * Makefile.in (config.status): Depend on development.sh.
8759 * acinclude.m4: Include libmcheck.m4.
8760 * configure: Regenerate.
8761
7a9a7487
MG
87622013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8763
8764 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8765 attribute inside the parentheses.
8766 (winapi_DebugSetProcessKillOnExit): Ditto.
8767 (winapi_DebugBreakProcess): Ditto.
8768 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8769
49b64de6
MG
87702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8771
8772 * notif.h (notif_event): Add a dummy member to avoid compiler
8773 errors.
8774
d5749ee7
PA
87752013-07-01 Pedro Alves <palves@redhat.com>
8776
8777 * hostio.c (HOSTIO_PATH_MAX): Define.
8778 (require_filename, handle_open, handle_unlink, handle_readlink):
8779 Use it.
8780
d8d2a3ee
PA
87812013-07-01 Pedro Alves <palves@redhat.com>
8782
8783 * server.h: Include "pathmax.h".
8784 * linux-low.c: Don't include sys/param.h.
8785 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8786 MAXPATHLEN.
8787 * win32-low.c: Don't include sys/param.h.
8788 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8789
bc7dea8d
PA
87902013-07-01 Pedro Alves <palves@redhat.com>
8791
8792 * event-loop.c: Don't check HAVE_UNISTD_H before including
8793 <unistd.h>.
8794 * gdbreplay.c: Likewise.
8795 * remote-utils.c: Likewise.
8796 * server.c: Likewise.
8797 * configure.ac: Don't check for unistd.h.
8798 * configure: Regenerate.
8799
d6c2da54
TT
88002013-06-28 Tom Tromey <tromey@redhat.com>
8801
8802 * Makefile.in (version.c): Use version.in, not
8803 common/version.in.
8804
257b6bec
MG
88052013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8806
8807 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8808 * configure: Rebuild.
8809 * Makefile.in (version_host, version_target): Get from configure.
8810 (version.c): Use $(version_host) and $(version_target).
8811
86ebe149
DK
88122013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8813
8814 Fix trace-status to output user name without trailing colon.
8815 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8816
f30aa5af
DK
88172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8818
8819 Fix trace-status to output proper start-time and stop-time.
8820 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8821 output start time and stop time in hex as gdb expects.
8822
28a93511
YQ
88232013-06-26 Pedro Alves <pedro@codesourcery.com>
8824
8825 * tracepoint.c (build_traceframe_info_xml): Output trace state
8826 variables present in the trace buffer.
8827
01208463
TT
88282013-06-24 Tom Tromey <tromey@redhat.com>
8829
8830 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8831 create-version.sh.
8832 (version.o): Remove.
8833 * gdbreplay.c: Include version.h.
8834 (version, host_name): Don't declare.
8835 * server.h: Include version.h.
8836 (version, host_name): Don't declare.
8837
760256f9
PA
88382013-06-12 Pedro Alves <palves@redhat.com>
8839
8840 * linux-x86-low.c (linux_is_elf64): Delete global.
8841 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8842 with local linux_pid_exe_is_elf_64_file use.
8843
030031ee
PA
88442013-06-11 Pedro Alves <palves@redhat.com>
8845
8846 * linux-low.c (regset_disabled, disable_regset): New functions.
8847 (regsets_fetch_inferior_registers)
8848 (regsets_store_inferior_registers): Use them.
8849 (initialize_regsets_info); Don't allocate the disabled_regsets
8850 array here.
8851 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8852 comment.
8853
5da6eb0a
PA
88542013-06-11 Pedro Alves <palves@redhat.com>
8855
8856 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8857 xmalloc.
8858
7e5aaa09
PA
88592013-06-11 Pedro Alves <palves@redhat.com>
8860
8861 * linux-x86-low.c (initialize_low_arch): Call
8862 init_registers_x32_avx_linux.
8863
d878444c
JK
88642013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8865
8866 Fix compatibility with Android Bionic.
8867 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8868 it is not empty.
8869
3aee8918
PA
88702013-06-07 Pedro Alves <palves@redhat.com>
8871
5f2b57b5 8872 PR server/14823
3aee8918
PA
8873 * Makefile.in (OBS): Add tdesc.o.
8874 (IPA_OBJS): Add tdesc-ipa.o.
8875 (tdesc-ipa.o): New rule.
8876 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8877 interface.
8878 * linux-low.c (new_inferior): Delete.
8879 (disabled_regsets, num_regsets): Delete.
8880 (linux_add_process): Adjust to set the new per-process
8881 new_inferior flag.
8882 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8883 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8884 was a stop. When calling arch_setup, switch the current inferior
8885 to the thread that got an event.
8886 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8887 (regsets_fetch_inferior_registers)
8888 (regsets_store_inferior_registers): New regsets_info parameter.
8889 Adjust to use it.
8890 (linux_register_in_regsets): New regs_info parameter. Adjust to
8891 use it.
8892 (register_addr, fetch_register, store_register): New usrregs_info
8893 parameter. Adjust to use it.
8894 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8895 parameter regs_info. Adjust to use it.
8896 (linux_fetch_registers): Get the current inferior's regs_info, and
8897 adjust to use it.
8898 (linux_store_registers): Ditto.
8899 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8900 (initialize_low): Don't initialize the target_regsets here. Call
8901 initialize_low_arch.
8902 * linux-low.h (target_regsets): Delete declaration.
8903 (struct regsets_info): New.
8904 (struct usrregs_info): New.
8905 (struct regs_info): New.
8906 (struct process_info_private) <new_inferior>: New field.
8907 (struct linux_target_ops): Delete the num_regs, regmap, and
8908 regset_bitmap fields. New field regs_info.
8909 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8910 * i387-fp.c (num_xmm_registers): Delete.
8911 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8912 calls to new interface.
8913 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8914 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8915 Infer the number of xmm registers from the regcache's target
8916 description.
8917 * i387-fp.h (num_xmm_registers): Delete.
8918 * inferiors.c (add_thread): Don't install the thread's regcache
8919 here.
8920 * proc-service.c (gregset_info): Fetch the current inferior's
8921 regs_info. Adjust to use it.
8922 * regcache.c: Include tdesc.h.
8923 (register_bytes, reg_defs, num_registers)
8924 (gdbserver_expedite_regs): Delete.
8925 (get_thread_regcache): If the thread doesn't have a regcache yet,
8926 create one, instead of aborting gdbserver.
8927 (regcache_invalidate_one): Rename to ...
8928 (regcache_invalidate_thread): ... this.
8929 (regcache_invalidate_one): New.
8930 (regcache_invalidate): Only invalidate registers of the current
8931 process.
8932 (init_register_cache): Add target_desc parameter, and use it.
8933 (new_register_cache): Ditto. Assert the target description has a
8934 non zero registers_size.
8935 (regcache_cpy): Add assertions. Adjust.
8936 (realloc_register_cache, set_register_cache): Delete.
8937 (registers_to_string, registers_from_string): Adjust.
8938 (find_register_by_name, find_regno, find_register_by_number)
8939 (register_cache_size): Add target_desc parameter, and use it.
8940 (free_register_cache_thread, free_register_cache_thread_one)
8941 (regcache_release, register_cache_size): New.
8942 (register_size): Add target_desc parameter, and use it.
8943 (register_data, supply_register, supply_register_zeroed)
8944 (supply_regblock, supply_register_by_name, collect_register)
8945 (collect_register_as_string, collect_register_by_name): Adjust.
8946 * regcache.h (struct target_desc): Forward declare.
8947 (struct regcache) <tdesc>: New field.
8948 (init_register_cache, new_register_cache): Add target_desc
8949 parameter.
8950 (regcache_invalidate_thread): Declare.
8951 (regcache_invalidate_one): Delete declaration.
8952 (regcache_release): Declare.
8953 (find_register_by_number, register_cache_size, register_size)
8954 (find_regno): Add target_desc parameter.
8955 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8956 declarations.
8957 * remote-utils.c: Include tdesc.h.
8958 (outreg, prepare_resume_reply): Adjust.
8959 * server.c: Include tdesc.h.
8960 (gdbserver_xmltarget): Delete declaration.
8961 (get_features_xml, process_serial_event): Adjust.
8962 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8963 declare.
8964 (struct process_info) <tdesc>: New field.
8965 (ipa_tdesc): Declare.
8966 * tdesc.c: New file.
8967 * tdesc.h: New file.
8968 * tracepoint.c: Include tdesc.h.
8969 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8970 (get_context_regcache): Adjust to pass ipa_tdesc down.
8971 (do_action_at_tracepoint): Adjust to get the register cache size
8972 from the context regcache's description.
8973 (traceframe_walk_blocks): Adjust to get the register cache size
8974 from the current trace frame's description.
8975 (traceframe_get_pc): Adjust to get current trace frame's
8976 description and pass it down.
8977 (gdb_collect): Adjust to get the register cache size from the
8978 IPA's description.
8979 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8980 (gdbserver_xmltarget): Delete.
8981 (initialize_low_tracepoint): Set the ipa's target description.
8982 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8983 (initialize_low_tracepoint): Set the ipa's target description.
8984 * linux-x86-low.c: Include tdesc.h.
8985 [__x86_64__] (is_64bit_tdesc): New.
8986 (ps_get_thread_area, x86_get_thread_area): Use it.
8987 (i386_cannot_store_register): Rename to ...
8988 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8989 (i386_cannot_fetch_register): Rename to ...
8990 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8991 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8992 to new interface.
8993 (target_regsets): Rename to ...
8994 (x86_regsets): ... this.
8995 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8996 interface.
8997 (x86_siginfo_fixup): Use is_64bit_tdesc.
8998 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8999 (tdesc_x32_avx_linux, tdesc_x32_linux)
9000 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9001 Declare.
9002 (x86_linux_update_xmltarget): Delete.
9003 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9004 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9005 (AMD64_LINUX_USER64_CS): New.
9006 (x86_linux_read_description): New, based on
9007 x86_linux_update_xmltarget.
9008 (same_process_callback): New.
9009 (x86_arch_setup_process_callback): New.
9010 (x86_linux_update_xmltarget): New.
9011 (x86_regsets_info): New.
9012 (amd64_linux_regs_info): New.
9013 (i386_linux_usrregs_info): New.
9014 (i386_linux_regs_info): New.
9015 (x86_linux_regs_info): New.
9016 (x86_arch_setup): Reimplement.
9017 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9018 (x86_emit_ops): Ditto.
9019 (the_low_target): Adjust. Install x86_linux_regs_info,
9020 x86_cannot_fetch_register, and x86_cannot_store_register.
9021 (initialize_low_arch): New.
9022 * linux-ia64-low.c (tdesc_ia64): Declare.
9023 (ia64_fetch_register): Adjust.
9024 (ia64_usrregs_info, regs_info): New globals.
9025 (ia64_regs_info): New function.
9026 (the_low_target): Adjust.
9027 (initialize_low_arch): New function.
9028 * linux-sparc-low.c (tdesc_sparc64): Declare.
9029 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9030 Adjust.
9031 (sparc_arch_setup): New function.
9032 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9033 (the_low_target): Adjust.
9034 (initialize_low_arch): New function.
9035 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9036 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9037 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9038 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9039 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9040 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9041 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9042 (tdesc_powerpc_isa205_vsx64l): Declare.
9043 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9044 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9045 (ppc_set_pc, ppc_get_hwcap): Adjust.
9046 (ppc_usrregs_info): Forward declare.
9047 (!__powerpc64__) ppc_regmap_adjusted: New global.
9048 (ppc_arch_setup): Adjust to the current process'es target
9049 description.
9050 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9051 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9052 (ppc_store_evrregset): Adjust.
9053 (target_regsets): Rename to ...
9054 (ppc_regsets): ... this, and make static.
9055 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9056 (ppc_regs_info): New function.
9057 (the_low_target): Adjust.
9058 (initialize_low_arch): New function.
9059 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9060 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9061 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9062 (tdesc_s390x_linux64v2): Declare.
9063 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9064 (s390_fill_gregset, s390_store_last_break): Adjust.
9065 (target_regsets): Rename to ...
9066 (s390_regsets): ... this, and make static.
9067 (s390_get_pc, s390_set_pc): Adjust.
9068 (s390_get_hwcap): New target_desc parameter, and use it.
9069 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9070 (s390_arch_setup): Adjust to set the current process'es target
9071 description. Don't adjust the regmap.
9072 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9073 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9074 (regs_info_3264): New globals.
9075 (s390_regs_info): New function.
9076 (the_low_target): Adjust.
9077 (initialize_low_arch): New function.
9078 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9079 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9080 [__mips64] (init_registers_mips_linux)
9081 (init_registers_mips_dsp_linux): Delete defines.
9082 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9083 (have_dsp): New global.
9084 (mips_read_description): New, based on mips_arch_setup.
9085 (mips_arch_setup): Reimplement.
9086 (get_usrregs_info): New function.
9087 (mips_cannot_fetch_register, mips_cannot_store_register)
9088 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9089 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9090 (target_regsets): Rename to ...
9091 (mips_regsets): ... this, and make static.
9092 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9093 (dsp_regs_info, regs_info): New globals.
9094 (mips_regs_info): New function.
9095 (the_low_target): Adjust.
9096 (initialize_low_arch): New function.
9097 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9098 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9099 Declare.
9100 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9101 (arm_read_description): New, with bits factored from
9102 arm_arch_setup.
9103 (arm_arch_setup): Reimplement.
9104 (target_regsets): Rename to ...
9105 (arm_regsets): ... this, and make static.
9106 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9107 (arm_regs_info): New function.
9108 (the_low_target): Adjust.
9109 (initialize_low_arch): New function.
9110 * linux-m68k-low.c (tdesc_m68k): Declare.
9111 (target_regsets): Rename to ...
9112 (m68k_regsets): ... this, and make static.
9113 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9114 (m68k_regs_info): New function.
9115 (m68k_arch_setup): New function.
9116 (the_low_target): Adjust.
9117 (initialize_low_arch): New function.
9118 * linux-sh-low.c (tdesc_sharch): Declare.
9119 (target_regsets): Rename to ...
9120 (sh_regsets): ... this, and make static.
9121 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9122 (sh_regs_info, sh_arch_setup): New functions.
9123 (the_low_target): Adjust.
9124 (initialize_low_arch): New function.
9125 * linux-bfin-low.c (tdesc_bfin): Declare.
9126 (bfin_arch_setup): New function.
9127 (bfin_usrregs_info, regs_info): New globals.
9128 (bfin_regs_info): New function.
9129 (the_low_target): Adjust.
9130 (initialize_low_arch): New function.
9131 * linux-cris-low.c (tdesc_cris): Declare.
9132 (cris_arch_setup): New function.
9133 (cris_usrregs_info, regs_info): New globals.
9134 (cris_regs_info): New function.
9135 (the_low_target): Adjust.
9136 (initialize_low_arch): New function.
9137 * linux-cris-low.c (tdesc_crisv32): Declare.
9138 (cris_arch_setup): New function.
9139 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9140 (cris_regs_info): New function.
9141 (the_low_target): Adjust.
9142 (initialize_low_arch): New function.
9143 * linux-m32r-low.c (tdesc_m32r): Declare.
9144 (m32r_arch_setup): New function.
9145 (m32r_usrregs_info, regs_info): New globals.
9146 (m32r_regs_info): Adjust.
9147 (initialize_low_arch): New function.
9148 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9149 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9150 (tic6x_usrregs_info): Forward declare.
9151 (tic6x_read_description): New function, based on ...
9152 (tic6x_arch_setup): ... this. Reimplement.
9153 (target_regsets): Rename to ...
9154 (tic6x_regsets): ... this, and make static.
9155 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9156 (tic6x_regs_info): New function.
9157 (the_low_target): Adjust.
9158 (initialize_low_arch): New function.
9159 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9160 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9161 (target_regsets): Rename to ...
9162 (xtensa_regsets): ... this, and make static.
9163 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9164 globals.
9165 (xtensa_arch_setup, xtensa_regs_info): New functions.
9166 (the_low_target): Adjust.
9167 (initialize_low_arch): New function.
9168 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9169 (nios2_arch_setup): Set the current process'es tdesc.
9170 (target_regsets): Rename to ...
9171 (nios2_regsets): ... this.
9172 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9173 (nios2_regs_info): New function.
9174 (the_low_target): Adjust.
9175 (initialize_low_arch): New function.
a261b8f5
PA
9176 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9177 (aarch64_arch_setup): Set the current process'es tdesc.
9178 (target_regsets): Rename to ...
9179 (aarch64_regsets): ... this.
9180 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9181 (aarch64_regs_info): New function.
9182 (the_low_target): Adjust.
9183 (initialize_low_arch): New function.
3aee8918
PA
9184 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9185 globals.
9186 (target_regsets): Rename to ...
9187 (tile_regsets): ... this.
9188 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9189 (tile_regs_info): New function.
9190 (tile_arch_setup): Set the current process'es tdesc.
9191 (the_low_target): Adjust.
9192 (initialize_low_arch): New function.
9193 * spu-low.c (tdesc_spu): Declare.
9194 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9195 * win32-arm-low.c (tdesc_arm): Declare.
9196 (arm_arch_setup): New function.
9197 (the_low_target): Install arm_arch_setup instead of
9198 init_registers_arm.
9199 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9200 (init_windows_x86): Rename to ...
9201 (i386_arch_setup): ... this. Set `win32_tdesc'.
9202 (the_low_target): Adjust.
9203 * win32-low.c (win32_tdesc): New global.
9204 (child_add_thread): Don't create the thread cache here.
9205 (do_initial_child_stuff): Set the new process'es tdesc.
9206 * win32-low.h (struct target_desc): Forward declare.
9207 (win32_tdesc): Declare.
9208 * lynx-i386-low.c (tdesc_i386): Declare global.
9209 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9210 * lynx-low.c (lynx_tdesc): New global.
9211 (lynx_add_process): Set the new process'es tdesc.
9212 * lynx-low.h (struct target_desc): Forward declare.
9213 (lynx_tdesc): Declare global.
9214 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9215 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9216 * nto-low.c (nto_tdesc): New global.
9217 (do_attach): Set the new process'es tdesc.
9218 * nto-low.h (struct target_desc): Forward declare.
9219 (nto_tdesc): Declare.
9220 * nto-x86-low.c (tdesc_i386): Declare.
9221 (nto_x86_arch_setup): Set `nto_tdesc'.
9222
b1fbec62
GB
92232013-06-04 Gary Benson <gbenson@redhat.com>
9224
9225 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9226 to qSupported response when appropriate.
9227 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9228 with nonzero-length annex.
9229 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9230 arguments supplied in annex.
9231
d1ec4ce7
DE
92322013-05-31 Doug Evans <dje@google.com>
9233
ac44adcb 9234 PR server/15594
d1ec4ce7
DE
9235 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9236 64 bits in 64-cross-32 environment.
9237
9b25f2d3
PA
92382013-05-28 Pedro Alves <palves@redhat.com>
9239
9240 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9241 (aarch64-without-fpu.c): Delete rule.
9242 * configure.srv (aarch64*-*-linux*): Remove references to
9243 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9244 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9245 declaration.
9246
6740dc9c
PA
92472013-05-24 Pedro Alves <palves@redhat.com>
9248
9249 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9250 instead of strchr/decode_address. Error if the range isn't split
9251 with a ','. Don't assume there's be a ':' in the action.
9252
c2d6af84
PA
92532013-05-23 Yao Qi <yao@codesourcery.com>
9254 Pedro Alves <palves@redhat.com>
9255
9256 * linux-low.c (lwp_in_step_range): New function.
9257 (linux_wait_1): If the thread was range stepping and stopped
9258 outside the stepping range, report the stop to GDB. Otherwise,
9259 continue stepping. Add range stepping debug output.
9260 (linux_set_resume_request): Copy the step range from the resume
9261 request to the lwp.
9262 (linux_supports_range_stepping): New.
9263 (linux_target_ops) <supports_range_stepping>: Set to
9264 linux_supports_range_stepping.
9265 * linux-low.h (struct linux_target_ops)
9266 <supports_range_stepping>: New field.
9267 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9268 * linux-x86-low.c (x86_supports_range_stepping): New.
9269 (the_low_target) <supports_range_stepping>: Set to
9270 x86_supports_range_stepping.
9271 * server.c (handle_v_cont): Handle 'r' action.
9272 (handle_v_requests): Append ";r" if the target supports range
9273 stepping.
9274 * target.h (struct thread_resume) <step_range_start,
9275 step_range_end>: New fields.
9276 (struct target_ops) <supports_range_stepping>:
9277 New field.
9278 (target_supports_range_stepping): New macro.
9279
58794e1a
JB
92802013-05-17 Joel Brobecker <brobecker@adacore.com>
9281
9282 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9283 confusion in comment.
9284
d631c5a7
JB
92852013-05-17 Joel Brobecker <brobecker@adacore.com>
9286
9287 * lynx-low.c (struct process_info_private): New type.
9288 (lynx_add_process): New function.
9289 (lynx_create_inferior, lynx_attach): Replace calls to
9290 add_process by calls to lynx_add_process.
9291 (lynx_resume): If PTID is null, then try using
9292 current_process()->private->last_wait_event_ptid.
9293 Add comments.
9294 (lynx_clear_inferiors): Delete. The contents of that function
9295 has been inlined in lynx_mourn;
9296 (lynx_wait_1): Save the ptid in the process's private data.
9297 (lynx_mourn): Free the process' private data. Replace call
9298 to lynx_clear_inferiors by call to clear_inferiors.
9299
96f7a20f
YQ
93002013-05-17 Yao Qi <yao@codesourcery.com>
9301
9302 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9303 the right place.
9304
db0dfaa0
LM
93052013-05-16 Luis Machado <lgustavo@codesourcery.com>
9306
9307 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9308 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9309 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9310 PT_TEXT_END_ADDR guards. Update comments.
9311 (linux_target_op) <read_offsets>: Conditionally define to
9312 linux_read_offsets if the target is UCLIBC and if it defines
9313 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9314
68f5f838
SL
93152013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9316 Andrew Jenner <andrew@codesourcery.com>
9317
9318 * Makefile.in (SFILES): Add linux-nios2-low.c.
9319 (clean): Add action to delete nios2-linux.c.
9320 (nios2-linux.c): New rule.
9321 * configure.srv: Add nios2*-*-linux*.
9322 * linux-nios2-low.c: New.
9323
1ebff1fd
HAQ
93242013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9325
9326 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9327
f6150862
HZ
93282013-04-25 Hui Zhu <hui@codesourcery.com>
9329
9330 PR gdb/15186
f6150862
HZ
9331 * ax.c (ax_printf): Add fflush.
9332
614c279d
TT
93332013-04-22 Tom Tromey <tromey@redhat.com>
9334
9335 * Makefile.in (SFILES): Add filestuff.c.
9336 (OBS): Add filestuff.o.
9337 (filestuff.o): New target.
9338 * config.in, configure: Rebuild.
9339 * configure.ac: Check for fdwalk, pipe2.
9340
7d4e5717
PA
93412013-04-17 Pedro Alves <palves@redhat.com>
9342
9343 * configure.ac (USE_THREAD_DB): Delete variable.
9344 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9345 Don't AC_SUBST USE_THREAD_DB.
9346 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9347 * config.in, configure: Regenerate.
9348
d5c93e41
PA
93492013-04-16 Pedro Alves <palves@redhat.com>
9350
9351 * linux-low.h (struct lwp_info) <thread_known>: Move under
9352 the USE_THREAD_DB #ifdef.
9353
04f5fe89
PA
93542013-04-16 Pedro Alves <palves@redhat.com>
9355
9356 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9357 (linux-low.o): Delete rule.
9358 * linux-low.h: Always include "gdb_thread_db.h" instead of
9359 conditionally including thread_db.h.
9360 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9361 HAVE_THREAD_DB_H.
9362
480b27bf
JK
93632013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9364
9365 * Makefile.in (install-only): Fix make install regression.
9366
43662968
JK
93672013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9368
9369 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9370 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9371 installation.
9372 * gdbserver.1: Remove.
9373
3e74e146
PA
93742013-03-22 Pedro Alves <palves@redhat.com>
9375
9376 * linux-low.c (handle_extended_wait): Don't call
9377 linux_enable_event_reporting.
9378
a8347a2a
TT
93792013-03-15 Tony Theodore <tonyt@logyst.com>
9380
9381 PR build/9098:
9382 * Makefile.in (SHELL): Use @SHELL@.
9383
eeb56fa7
SDJ
93842013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9385
9386 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9387 compiler warning.
9388
4fa7e2ff
JB
93892013-03-13 Joel Brobecker <brobecker@adacore.com>
9390
9391 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9392 Remove extraneous NULL element.
9393
8ddb1965
YQ
93942013-03-13 Yao Qi <yao@codesourcery.com>
9395
9396 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9397 'V' block in trace frame.
9398
9accd112
MM
93992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9400
9401 * target.h (struct target_ops): Add btrace ops.
9402 (target_supports_btrace): New macro.
9403 (target_enable_btrace): New macro.
9404 (target_disable_btrace): New macro.
9405 (target_read_btrace): New macro.
9406 * gdbthread.h (struct thread_info): Add btrace field.
9407 * server.c: Include btrace-common.h.
9408 (handle_btrace_general_set): New function.
9409 (handle_btrace_enable): New function.
9410 (handle_btrace_disable): New function.
9411 (handle_general_set): Call handle_btrace_general_set.
9412 (handle_qxfer_btrace): New function.
9413 (struct qxfer qxfer_packets[]): Add btrace entry.
9414 * inferiors.c (remove_thread): Disable btrace.
9415 * linux-low: Include linux-btrace.h.
9416 (linux_low_enable_btrace): New function.
9417 (linux_low_read_btrace): New function.
9418 (linux_target_ops): Add btrace ops.
9419 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9420 Add srv_linux_btrace=yes.
9421 (x86_64-*-linux*): Add linux-btrace.o.
9422 Add srv_linux_btrace=yes.
9423 * configure.ac: Define HAVE_LINUX_BTRACE.
9424 * config.in: Regenerated.
9425 * configure: Regenerated.
9426
5cc22e4c
MM
94272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9428
9429 * server.c (handle_qxfer): Preserve error message if -3 is
9430 returned.
9431 (qxfer): Document the -3 return value.
9432
7c97f91e
MM
94332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9434
9435 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9436 (linux_btrace_h): New variable.
9437 (linux-btrace.o): New rule.
9438
be9a119c 94392013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9440 Hafiz Abid Qadeer <abidh@codesourcery.com>
9441
9442 * tracepoint.c (trace_buffer_size): New global.
9443 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9444 (init_trace_buffer): Change to one-argument function. Allocate
9445 trace buffer memory.
9446 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9447 handle QTBuffer:size packet.
9448 (cmd_bigqtbuffer_size): New function.
9449 (initialize_tracepoint): Call init_trace_buffer with
9450 DEFAULT_TRACE_BUFFER_SIZE.
9451 * server.c (handle_query): Add QTBuffer:size in the
9452 supported packets.
9453
e64f7499
YQ
94542013-03-07 Yao Qi <yao@codesourcery.com>
9455
9456 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9457 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9458 of -1.
9459 (cmd_qtsp): Adjust condition. Do post increment.
9460 Set cur_action and cur_step_action back to 0.
9461
f0ae6fc3
PA
94622013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9463
9464 PR server/15236
9465 * linux-low.c (linux_write_memory): Return early success if LEN is
9466 zero.
9467
b5b0b0af
CV
94682013-03-05 Corinna Vinschen <vinschen@redhat.de>
9469
334ad4a8 9470 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9471
589bc927
TT
94722013-02-28 Tom Tromey <tromey@redhat.com>
9473
9474 * configure.ac: Invoke AC_SYS_LARGEFILE.
9475 * configure, config.in: Rebuild.
9476
dfe07582
CV
94772013-02-28 Corinna Vinschen <vinschen@redhat.com>
9478
9479 * win32-low.c: Throughout, fix format strings and casts of
9480 printf-like functions to avoid type related warnings on all
9481 platforms.
9482 (get_child_debug_event): Print dwDebugEventCode as hex since
9483 that's how it's usually documented.
9484
736cd585
YQ
94852013-02-28 Yao Qi <yao@codesourcery.com>
9486
9487 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9488 pulongest.
9489
e1f58301
JW
94902013-02-27 Jiong Wang <jiwang@tilera.com>
9491
9492 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9493 (reg-tilegx32.c): New rule.
9494 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9495 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9496 different register info initializer according to elf class.
9497 (init_registers_tilgx32): New function. The tilegx32 register info
9498 initializer.
9499 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9500 (tile_store_gregset): Likewise.
9501
d171ca78
YQ
95022013-02-27 Yao Qi <yao@codesourcery.com>
9503
9504 * server.c (process_point_options): Print debug message when
9505 debug_threads is true.
9506
282bbdf3
YQ
95072013-02-26 Yao Qi <yao@codesourcery.com>
9508
9509 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9510
aca22551
PA
95112013-02-19 Pedro Alves <palves@redhat.com>
9512 Kai Tietz <ktietz@redhat.com>
9513
9514 PR gdb/15161
9515
9516 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9517 instead of strtoul to extract address from packet.
9518 (process_serial_event) <'z'>: Likewise.
9519
4f3cee1c
YQ
95202013-02-18 Yao Qi <yao@codesourcery.com>
9521
9522 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9523
8e1d55a3
PA
95242013-02-14 Pedro Alves <palves@redhat.com>
9525
9526 Plug memory leak.
9527
9528 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9529 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9530
458820da
PA
95312013-02-14 Pedro Alves <palves@redhat.com>
9532
9533 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9534
baea0dae
PA
95352013-02-14 Pedro Alves <palves@redhat.com>
9536
9537 * tracepoint.c (save_string): Delete.
9538 (add_tracepoint_action): Use savestring instead of save_string.
9539
0b1afbb3
PA
95402013-02-12 Pedro Alves <palves@redhat.com>
9541
9542 * linux-xtensa-low.c: Ditto.
9543 * xtensa-xtregs.c: Ditto.
9544
8a4ac37e
PA
95452013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9546
9547 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9548 thread_db.
9549
148de6bb
MS
95502013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9551
9552 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9553 aarch64_num_wp_regs and aarch64_num_bp_regs to
9554 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9555
55fac6e0
MS
95562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9557
9558 * linux-aarch64-low.c (ps_get_thread_area): Replace
9559 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9560
176eb98c
MS
95612013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9562 Marcus Shawcroft <marcus.shawcroft@arm.com>
9563 Nigel Stephens <nigel.stephens@arm.com>
9564 Yufeng Zhang <yufeng.zhang@arm.com>
9565
9566 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9567 (aarch64.c, aarch64-without-fpu.c): New targets.
9568 * configure.srv (aarch64*-*-linux*): New.
9569 * linux-aarch64-low.c: New file.
9570
56f7af9c
MS
95712013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9572
43aaf8b6 9573 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9574 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9575 (dequeue_one_deferred_signal, linux_resume_one_thread)
9576 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9577 (linux_tracefork_grandchild, linux_test_for_tracefork)
9578 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9579 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9580 where the argument is 0.
9581
60f662b0
YQ
95822013-01-25 Yao Qi <yao@codesourcery.com>
9583
9584 * event-loop.c: Include "queue.h".
9585 (gdb_event_p): New typedef.
9586 (struct gdb_event) <next_event>: Remove.
9587 (event_queue): Change to QUEUE(gdb_event_p).
9588 (async_queue_event): Remove.
9589 (gdb_event_xfree): New.
9590 (initialize_event_loop): New.
9591 (process_event): Use API from QUEUE.
9592 (wait_for_event): Likewise.
9593 * server.c (main): Call initialize_event_loop.
9594 * server.h (initialize_event_loop): Declare.
9595
5ae4861a
YQ
95962013-01-18 Yao Qi <yao@codesourcery.com>
9597
9598 * ax.h (struct eval_agent_expr_context): New.
9599 (gdb_eval_agent_expr): Update declaration.
9600 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9601 TFRAME. Add new argument CTX.
9602 * server.h (struct eval_agent_expr_context): Declare.
9603 (agent_mem_read, agent_tsv_read): Update declaration.
9604 (agent_mem_read_string): Likewise.
9605 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9606 (add_traceframe_block): Add new argument TPOINT.
9607 Increase TPOINT->traceframe_usage.
9608 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9609 eval_tracepoint_agent_expr.
9610 (condition_true_at_tracepoint): Likewise.
9611 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9612 (agent_mem_read_string, agent_tsv_read): Likewise.
9613
85e00e85
YQ
96142013-01-16 Yao Qi <yao@codesourcery.com>
9615
9616 * linux-low.c (linux_resume_one_lwp): Don't check
9617 'lwp->bp_reinsert != 0'.
9618
4039cf45
JB
96192013-01-07 Joel Brobecker <brobecker@adacore.com>
9620 Pedro Alves <palves@redhat.com>
9621
9622 * lynx-low.c (ptrace_request_to_str): Define a temporary
9623 macro and use it to simplify this function's implementation.
9624
9044dee2
JB
96252013-01-07 Joel Brobecker <brobecker@adacore.com>
9626
9627 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9628 sets errno.
9629
e6352c8f
JB
96302013-01-07 Joel Brobecker <brobecker@adacore.com>
9631
9632 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9633
50681a27
JB
96342013-01-07 Joel Brobecker <brobecker@adacore.com>
9635
9636 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9637
3f6e77ef
JB
96382013-01-07 Joel Brobecker <brobecker@adacore.com>
9639
9640 * lynx-low.c (lynx_resume): Use the resume_info parameter
9641 to determine the ptid for the lynx_ptrace call, unless
9642 it is equal to minus_one_ptid, in which case we use the
9643 ptid of the current_inferior.
9644 (lynx_wait_1): After having received a thread create/exit
9645 event, resume the inferior's execution using the signaling
9646 thread's ptid, rather than the old ptid.
9647
7fda33ae
JB
96482013-01-07 Joel Brobecker <brobecker@adacore.com>
9649
9650 * lynx-low.c (lynx_resume): Delete variable ret.
9651
b9786c74
JB
96522013-01-01 Joel Brobecker <brobecker@adacore.com>
9653
9654 * gdbreplay.c (gdbreplay_version): Update copyright year.
9655 * server.c (gdbserver_version): Likewise.
9656
8b93d60f
JB
96572012-12-17 Joel Brobecker <brobecker@adacore.com>
9658
9659 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9660 new thread.
9661
037335a7
JB
96622012-12-17 Joel Brobecker <brobecker@adacore.com>
9663
9664 * lynx-low.c (ptrace_request_to_str): Add handling for
9665 PTRACE_GETTRACESIG.
9666
52d4cbd8
JB
96672012-12-17 Joel Brobecker <brobecker@adacore.com>
9668
9669 * lynx-low.c (lynx_attach): Delete variable new_process.
9670
ab8f6ca9
JB
96712012-12-17 Joel Brobecker <brobecker@adacore.com>
9672
9673 * lynx-low.c (lynx_create_inferior): Delete variable
9674 new_process.
9675
78cbc024
JB
96762012-12-17 Joel Brobecker <brobecker@adacore.com>
9677
9678 * lynx-low.c (ptrace_request_to_str): Do not handle
9679 PTRACE_GETTHREADLIST if this macro does not exist.
9680
14a00470
YQ
96812012-12-15 Yao Qi <yao@codesourcery.com>
9682
9683 * Makefile.in (OBS): Add notif.o.
9684 * notif.c, notif.h: New.
9685 * server.c: Include "notif.h".
9686 (struct vstop_notif) <next>: Remove.
9687 <base>: New field.
9688 (queue_stop_reply): Update.
9689 (push_event, send_next_stop_reply): Remove.
9690 (discard_queued_stop_replies): Update.
9691 (notif_stop): New variable.
9692 (handle_v_stopped): Remove.
9693 (handle_v_requests): Don't call handle_v_stopped. Call
9694 handle_ack_notif instead.
9695 (queue_stop_reply_callback): Call notif_event_enque instead
9696 of queue_stop_reply.
9697 (handle_status): Don't call send_next_stop_reply, call
9698 notif_write_event instead.
9699 (kill_inferior_callback): Likewise.
9700 (detach_or_kill_inferior_callback): Likewise.
9701 (main): Call initialize_notif.
9702 (process_serial_event): Call QUEUE_is_empty.
9703 (handle_target_event): Call notif_push instead of push event.
9704 * server.h (push_event): Remove declaration.
9705
61c125b9
TT
97062012-12-10 Tom Tromey <tromey@redhat.com>
9707
9708 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9709 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9710 macros.
9711 (.c.o): Rewrite.
9712 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9713 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9714 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9715 (amd64-linux-ipa.o, ax.o): Rewrite.
9716 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9717 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9718 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9719 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9720 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9721 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9722 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9723 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9724 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9725 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9726 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9727 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9728 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9729 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9730 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9731 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9732 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9733 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9734 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9735 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9736 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9737 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9738 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9739 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9740 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9741 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9742 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9743 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9744 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9745 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9746 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9747 (reg-tilegx.o): Remove.
9748 (all_object_files): New macro.
9749 Include .deps files.
9750 * aclocal.m4, configure: Rebuild.
9751 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9752 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9753 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9754
e90e9ad9
TT
97552012-12-05 Tom Tromey <tromey@redhat.com>
9756
9757 PR gdb/14917:
9758 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9759
02d403bf 97602012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9761
9762 * configure.ac: Check for linux/perf_event.h.
9763 * config.in: Regenerated.
9764 * configure: Regenerated.
9765
0270a750
PA
97662012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9767
9768 * hostio.c (handle_readlink): Decrease buffer size
9769 parameter passed to readlink by one byte.
9770
8c29b58e
YQ
97712012-11-26 Yao Qi <yao@codesourcery.com>
9772
9773 * configure.ac (build_warnings): Append '-Wempty-body'.
9774 * configure: Regenerated.
9775 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9776 body.
9777
8bdce1ff
PM
97782012-11-15 Pierre Muller <muller@sourceware.org>
9779
9780 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9781 * config.in: Regenerate.
9782 * configure: Regenerate.
9783 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9784 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9785 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9786 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9787 header.
9788 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9789 instead of <sys/wait.h> header.
9790 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9791
02d403bf 97922012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9793
9794 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9795 (various make rules): Remove -DGDBSERVER
9796
fbd5db48
YQ
97972012-11-09 Yao Qi <yao@codesourcery.com>
9798
9799 * spu-low.c (current_ptid): Move it to ..
9800 * gdbthread.h: ... here. New.
9801 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9802 * server.c (myresume, process_serial_event): Likewise.
9803 * thread-db.c (thread_db_find_new_threads): Likewise.
9804 * tracepoint.c (run_inferior_command): Likewise.
9805
b3dc46ff
AB
98062012-10-01 Andrew Burgess <aburgess@broadcom.com>
9807
9808 * server.c (handle_search_memory_1): Include access length in
9809 warning message.
9810
07c04788
HPN
98112012-09-05 Michael Brandt <michael.brandt@axis.com>
9812
9813 * linux-crisv32-low.c: Fix compile errors.
9814
918d227b
YQ
98152012-09-04 Yao Qi <yao@codesourcery.com>
9816
9817 * tracepoint.c (cmd_qtsv): Adjust debug message.
9818 Don't check CUR_TPOINT.
9819
18c1b81a
YQ
98202012-08-28 Yao Qi <yao@codesourcery.com>
9821
9822 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9823 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9824 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9825 Remove declarations of xmalloc, xreallloc, xstrdup and
9826 freeargv.
9827 * Makefile.in (libiberty_h): New.
9828 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9829 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9830
dc82f37b
YQ
98312012-08-23 Yao Qi <yao@codesourcery.com>
9832
9833 * server.h: Remove declaration of 'xsnprintf'.
9834
406b1477
KS
98352012-08-22 Keith Seitz <keiths@redhat.com>
9836
9837 * server.h: Include build-gnulib-gbserver/config.h.
9838 * gdbreplay.c: Likewise.
9839
e6712ff1
DE
98402012-08-08 Doug Evans <dje@google.com>
9841
9842 * Makefile.in (SFILES): Add gdb_vecs.c.
9843 (OBS): Add gdb_vecs.o.
9844 (gdb_vecs_h, host_defs_h): New variables.
9845 (thread-db.o): Add $(gdb_vecs_h) dependency.
9846 (gdb_vecs.o): New rule.
9847 * thread-db.c: #include "gdb_vecs.h".
9848 (thread_db_load_search): Use a vector to iterate over path elements.
9849 Handle text appearing after "$pdir".
9850
9851 * configure.ac: Add check for strstr.
9852 * config.in: Regenerate.
9853 * configure: Regenerate.
9854
7c3270ae
UW
98552012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9856
9857 * hostio.c (handle_pread): If pread fails, fall back to attempting
9858 lseek/read.
9859 (handle_pwrite): Likewise for pwrite.
9860
b62e2b27
UW
98612012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9862
9863 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9864 between unsupported TYPE and unimplementable ADDR/LEN combination.
9865 (arm_insert_point): Act on new return value.
9866
78a99e91
PA
98672012-07-31 Pedro Alves <palves@redhat.com>
9868
9869 * server.c (process_point_options): Only skip tokens if we find
9870 one that is unrecognized. Don't treat 'X' specially while
9871 skipping unrecognized tokens.
9872
fcf303ab
UW
98732012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9874
9875 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9876 to 4-byte-align HW breakpoint addresses for Thumb.
9877
7255706c
YQ
98782012-07-27 Yao Qi <yao@codesourcery.com>
9879
9880 PR remote/14161.
9881
9882 * server.h: Declare gdb_agent_about_to_close.
9883 * target.c (kill_inferior): Include "agent.h".
9884 New. Send command 'kill'.
9885 * target.h (kill_inferior): Removed macro.
9886 * tracepoint.c (gdb_agent_about_to_close): New.
9887 (gdb_agent_helper_thread): Handle command 'close'.
9888 Wait endlessly until the inferior stops.
9889 Install gdb_agent_remove_socket to atexit hook.
9890 (agent_socket_name): New static variable.
9891 (gdb_agent_socket_init): Replace local variable 'name' with
9892 'agent_socket_name'.
9893 (gdb_agent_remove_socket): New.
9894
5a3f286f
YQ
98952012-07-27 Yao Qi <yao@codesourcery.com>
9896
9897 * server.c (process_point_options): Stop at 'X' when parsing.
9898
961bd387
ME
98992012-07-19 Michael Eager <eager@eagercon.com>
9900
a261b8f5 9901 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9902 to hw_execute.
9903 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9904 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9905 hardware breakpoint.
9906
aa7c7447
JK
99072012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9908
9909 * gdbserver/linux-low.c (initialize_low): Call
9910 linux_ptrace_init_warnings.
9911
7f216e7c
DE
99122012-07-02 Doug Evans <dje@google.com>
9913
9914 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9915 pointer to int.
9916
d3ce09f5
SS
99172012-07-02 Stan Shebs <stan@codesourcery.com>
9918
9919 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9920 (ax.o): Add it to build rule.
9921 (ax-ipa.o): Ditto.
9922 (OBS): Add format.o.
9923 (IPA_OBS): Add format.o.
9924 * server.c (handle_query): Claim support for breakpoint commands.
9925 (process_point_options): Add command case.
9926 (process_serial_event): Leave running if there are printfs in
9927 effect.
9928 * mem-break.h (any_persistent_commands): Declare.
9929 (add_breakpoint_commands): Declare.
9930 (gdb_no_commands_at_breakpoint): Declare.
9931 (run_breakpoint_commands): Declare.
9932 * mem-break.c (struct point_command_list): New struct.
9933 (struct breakpoint): New field command_list.
9934 (any_persistent_commands): New function.
9935 (add_commands_to_breakpoint): New function.
9936 (add_breakpoint_commands): New function.
9937 (gdb_no_commands_at_breakpoint): New function.
9938 (run_breakpoint_commands): New function.
9939 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9940 locally.
9941 * ax.c: Include format.h.
9942 (ax_printf): New function.
9943 (gdb_eval_agent_expr): Add printf opcode.
9944
2f8f6aed
YQ
99452012-06-13 Yao Qi <yao@codesourcery.com>
9946
9947 * server.c (start_inferior): Remove duplicated writes to fields
9948 'last_resume_kind' and 'last_status' of 'current_inferior'.
9949
0c9070b3
YQ
99502012-06-12 Yao Qi <yao@codesourcery.com>
9951 Pedro Alves <palves@redhat.com>
9952
9953 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9954 comment.
9955 * server.c (handle_v_cont): Extend comment.
9956
c52daf70
YQ
99572012-06-11 Yao Qi <yao@codesourcery.com>
9958
9959 * linux-low.c (linux_attach): Add 'static'.
9960
d38bbb0a
YQ
99612012-06-06 Yao Qi <yao@codesourcery.com>
9962
9963 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9964
89dc0afd
JK
99652012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9966
9967 Fix gcc -flto compilation warning.
9968 * server.c (main): Make variable multi_mode and attach volatile.
9969
75f62ce7
TJB
99702012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9971
9972 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9973 if the platform doesn't know about it.
9974
65f479b6
PA
99752012-05-30 Jeff Kenton <jkenton@tilera.com>
9976
9977 * Makefile.in (SFILES): Add linux-tile-low.c.
9978 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9979 * configure.srv: Handle tilegx-*-linux*.
9980 * linux-tile-low.c: New file.
9981
0c5bf5a9
JK
99822012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9983
9984 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9985
a493e3e2
PA
99862012-05-24 Pedro Alves <palves@redhat.com>
9987
9988 PR gdb/7205
9989
43aaf8b6 9990 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9991
2ea28649
PA
99922012-05-24 Pedro Alves <palves@redhat.com>
9993
9994 PR gdb/7205
9995
9996 Replace target_signal with gdb_signal throughout.
9997
8d409d16
MR
99982012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9999
10000 * linux-low.c (linux_store_registers): Avoid the copying sequence
10001 when no data has been retrieved by ptrace.
10002
23512c01
MGD
100032012-05-22 Will Deacon <will.deacon@arm.com>
10004
10005 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10006 Include asm/ptrace.h.
10007 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10008 already defined.
10009
4934b29e
MR
100102012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10011
10012 * linux-low.c (linux_store_registers): Don't re-retrieve data
10013 with ptrace that has already been obtained from /proc. Always
10014 copy any data retrieved with ptrace to the buffer supplied.
10015
bde24c0a
PA
100162012-05-11 Yao Qi <yao@codesourcery.com>
10017 Pedro Alves <palves@redhat.com>
10018
10019 * linux-low.c (enum stopping_threads_kind): New.
10020 (stopping_threads): Change type to `enum stopping_threads_kind'.
10021 (handle_extended_wait): If stopping and suspending threads, leave
10022 the new_lwp suspended too.
10023 (linux_wait_for_event): Adjust.
10024 (stop_all_lwps): Set `stopping_threads' to
10025 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10026 whether we're suspending threads or just stopping them. Assert no
10027 recursion happens.
10028
623b6bdf
YQ
100292012-04-29 Yao Qi <yao@codesourcery.com>
10030
10031 * server.h: Move some code to ...
10032 * gdbthread.h: ... here. New.
10033 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10034 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10035 (nto-low.o, win32-low.o): Likewise.
10036 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10037 * regcache.c, remote-utils.c, server.c: Likewise.
10038 * target.c, tracepoint.c, win32-low.c: Likewise.
10039
f15f9948
TJB
100402012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10041
10042 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10043 (PTRACE_ARG4_TYPE): Likewise.
10044 (PTRACE_XFER_TYPE): Likewise.
10045 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10046 ptrace to PTRACE_ARG3_TYPE.
10047 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10048 (PTRACE_ARG4_TYPE): Likewise.
10049 (PTRACE_XFER_TYPE): Likewise.
10050 (linux_detach_one_lwp): Cast fourth argument of
10051 ptrace to long then PTRACE_ARG4_TYPE.
10052 (regsets_fetch_inferior_registers): Cast third argument of
10053 ptrace to long then PTRACE_ARG3_TYPE.
10054 (regsets_store_inferior_registers): Likewise.
10055
38ea300a
PA
100562012-04-20 Pedro Alves <palves@redhat.com>
10057
10058 * configure: Regenerate.
10059
c971b7fa
PA
100602012-04-19 Pedro Alves <palves@redhat.com>
10061
43aaf8b6 10062 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10063 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10064 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10065 (all, install-only, uninstall, clean-info, all-lib, clean): No
10066 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10067 (maintainer-clean realclean distclean): Use subdir_do.
10068 (subdir_do): New.
10069 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10070 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10071 * acinclude.m4: Include acx_configure_dir.m4.
10072 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10073 calls. Call AC_PROG_RANLIB. Configure gnulib using
10074 ACX_CONFIGURE_DIR.
10075 (GNULIB): New.
10076 (GNULIB_STDINT_H): Adjust.
10077 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10078 * gdbreplay.c: Include build-gnulib/config.h.
10079 * server.h: Likewise.
10080 * aclocal.m4: Regenerate.
10081 * config.in: Regenerate.
10082 * configure: Regenerate.
c971b7fa 10083
809277f8
PA
100842012-04-19 Pedro Alves <palves@redhat.com>
10085
10086 * Makefile.in (LIBGNU, INCGNU): Adjust.
10087 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10088 (all, install-only, uninstall, clean-info, all-lib, clean)
10089 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10090 * configure.ac: Adjust AC_OUTPUT output.
10091 * aclocal.m4: Regenerate.
10092 * configure: Regenerate.
10093
fd9bb8b8
PA
100942012-04-19 Pedro Alves <palves@redhat.com>
10095
10096 * Makefile.in (generated_files): New.
10097 (server_h): Remove the explicit dependency on config.h, and depend
10098 on $generated_files.
10099
1c298c66
PA
101002012-04-19 Pedro Alves <palves@redhat.com>
10101
10102 * Makefile.in (INCGNU): Add -Ignulib.
10103
57c4b50b
PA
101042012-04-19 Pedro Alves <palves@redhat.com>
10105
10106 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10107 (INCGNU): ... this, and spell out -I here.
10108 (GNULIB_LIB): Rename to ...
10109 (LIBGNU): ... this.
10110 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10111
1030e047
PA
101122012-04-19 Pedro Alves <palves@redhat.com>
10113
10114 * config.in: Regenerate.
10115
447d4319
PA
101162012-04-19 Pedro Alves <palves@redhat.com>
10117
10118 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10119 * server.h (memmem): Remove declaration.
10120 * config.in: Regenerate.
10121 * configure: Regenerate.
10122
aad9eab9
YQ
101232012-04-19 Yao Qi <yao@codesourcery.com>
10124
10125 * Makefile.in (SFILES): Add common/vec.c.
10126 (OBS): Add vec.o.
10127 (vec.o): New rule.
10128
3e10640f
YQ
101292012-04-19 Yao Qi <yao@codesourcery.com>
10130
10131 * remote-utils.c (prepare_resume_reply): Replace with macro
10132 target_core_of_thread.
10133 * server.c (handle_qxfer_threads_proper): Likewise.
10134 * target.h (traget_core_of_thread): New macro.
10135
71622373
PA
101362012-04-18 Pedro Alves <palves@redhat.com>
10137
10138 * aclocal.m4: Regenerate.
10139 * configure: Regenerate.
10140
80d26939
YQ
101412012-04-16 Yao Qi <yao@codesourcery.com>
10142
10143 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10144 duplicated on address.
10145
42476b70
YQ
101462012-04-16 Yao Qi <yao@codesourcery.com>
10147
10148 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10149 (struct tracepoint_action_ops) <send>: New field.
10150 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10151 (agent_expr_send, x_tracepoint_action_send): New.
10152 (l_tracepoint_action_send): New.
10153 (cmd_qtdp): Download and install tracepoint
10154 according to `use_agent'.
10155 (run_inferior_command): Add one more parameter `len'.
10156 Update callers.
10157 (tracepoint_send_agent): New.
10158 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10159
7bc83639
YQ
101602012-04-16 Yao Qi <yao@codesourcery.com>
10161
10162 * tracepoint.c (download_tracepoints): Moved to ...
10163 (cmd_qtstart): ... here.
10164
5f18041e
YQ
101652012-04-14 Yao Qi <yao@codesourcery.com>
10166
10167 * tracepoint.c: Include inttypes.h.
10168 (struct collect_memory_action): Use sized types.
10169 (struct tracepoint): Likewise.
10170 (cmd_qtdp, stop_tracing): Update print specifiers.
10171 (cmd_qtp, response_tracepoint): Likewise.
10172 (collect_data_at_tracepoint): Likewise.
10173 (collect_data_at_step): Likewise.
10174
55a8c076
YQ
101752012-04-14 Yao Qi <yao@codesourcery.com>
10176
10177 Import gnulib module inttypes.
10178 * aclocal.m4, config.in, configure: Regenerated.
10179
dc750257
YQ
101802012-04-14 Yao Qi <yao@codesourcery.com>
10181
10182 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10183 Makefile and config.status at last.
10184
0ab5faf9
YQ
101852012-04-13 Yao Qi <yao@codesourcery.com>
10186
10187 * tracepoint.c: Include stdint.h unconditionally.
10188
18f5fd81
TJB
101892012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10190
10191 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10192 on BFD_HAVE_SYS_PROCFS_TYPE.
10193 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10194 * configure: Regenerate.
10195 * config.in: Likewise.
10196
4d47af5c
L
101972012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10198
10199 * Makefile.in (clean): Also remove x32.c x32-linux.c
10200 x32-avx.c x32-avx-linux.c.
10201 (x32.o): New target.
10202 (x32.c): Likewise.
10203 (x32-linux.o): Likewise.
10204 (x32-linux.c): Likewise.
10205 (x32-avx.o): Likewise.
10206 (x32-avx.c): Likewise.
10207 (x32-avx-linux.o): Likewise.
10208 (x32-avx-linux.c): Likewise.
10209
10210 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10211 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10212 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10213 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10214 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10215 i386/x32-avx-linux.xml.
10216
10217 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10218 (init_registers_x32_avx_linux): Likwise.
10219 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10220 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10221
ecedbe58
PA
102222012-04-13 Pedro Alves <palves@redhat.com>
10223
10224 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10225 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10226 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10227 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10228 the sub-make.
10229
c92b5177
L
102302012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10231
10232 * linux-x86-low.c (compat_x32_clock_t): New.
10233 (compat_x32_siginfo_t): Likewise.
10234 (compat_x32_siginfo_from_siginfo): Likewise.
10235 (siginfo_from_compat_x32_siginfo): Likewise.
10236 (linux_is_elf64): Likewise.
10237 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10238 and siginfo_from_compat_x32_siginfo for x32.
10239 (x86_arch_setup): Set linux_is_elf64.
10240
214d508e
L
102412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10242
10243 PR gdb/13969
10244 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10245 e_machine field.
10246 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10247 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10248 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10249 compatible with process.
10250
c9a1864a
YQ
102512012-04-12 Yao Qi <yao@codesourcery.com>
10252
10253 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10254 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10255 (install-only, install-info, clean): Handle sub dir gnulib.
10256 (all-lib, am--refresh): New targets.
10257 (memmem.o): Remove target.
10258 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10259 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10260 (AC_REPLACE_FUNCS): Remove memmem.
10261 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10262 (AC_OUTPUT): Generate Makefile in gnulib/.
10263 * aclocal.m4, config.in, configure: Regenerated.
10264
367ba2c2
MR
102652012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10266
10267 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10268
9d236627
PA
102692012-04-05 Pedro Alves <palves@redhat.com>
10270
10271 -Werror=strict-aliasing
10272
10273 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10274 pointer.
10275
111217b3
PA
102762012-04-04 Pedro Alves <palves@redhat.com>
10277
10278 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10279 (sparc_store_gregset_from_stack, sparc_store_gregset)
10280 (sparc_breakpoint_at): Fix formatting.
10281
8365dcf5
TJB
102822012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10283
10284 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10285 are available.
10286 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10287 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10288 * config.in: Regenerate.
10289 * configure: Likewise.
10290
689cc2ae
PA
102912012-03-29 Pedro Alves <palves@redhat.com>
10292
10293 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10294 Correct ptrace arguments.
10295
c14dfd32
PA
102962012-03-28 Pedro Alves <palves@redhat.com>
10297
10298 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10299 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10300 (IA64_FR1_REGNUM): New defines.
10301 (ia64_fetch_register): New.
10302 (the_low_target): Install it.
10303 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10304 field.
10305 * linux-low.c (linux_fetch_registers): Try the
10306 the_low_target.fetch_register hook first.
10307
10308 * linux-arm-low.c (the_low_target): Adjust.
10309 * linux-bfin-low.c (the_low_target): Adjust.
10310 * linux-cris-low.c (the_low_target): Adjust.
10311 * linux-crisv32-low.c (the_low_target): Adjust.
10312 * linux-m32r-low.c (the_low_target): Adjust.
10313 * linux-m68k-low.c (the_low_target): Adjust.
10314 * linux-mips-low.c (the_low_target): Adjust.
10315 * linux-ppc-low.c (the_low_target): Adjust.
10316 * linux-s390-low.c (the_low_target): Adjust.
10317 * linux-sh-low.c (the_low_target): Adjust.
10318 * linux-sparc-low.c (the_low_target): Adjust.
10319 * linux-tic6x-low.c (the_low_target): Adjust.
10320 * linux-x86-low.c (the_low_target): Adjust.
10321 * linux-xtensa-low.c (the_low_target): Adjust.
10322
63c88e13
PA
103232012-03-26 Pedro Alves <palves@redhat.com>
10324
10325 * server.c (handle_qxfer_libraries): Don't bail early if
10326 the_target->qxfer_libraries_svr4 is not NULL.
10327
fb723180
PA
103282012-03-26 Pedro Alves <palves@redhat.com>
10329
10330 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10331
0afae3cf
PA
103322012-03-23 Pedro Alves <palves@redhat.com>
10333
10334 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10335 "library-list-svr4" element's start tag when the the DSO list is
10336 empty.
10337
485f1ee4
PA
103382012-03-23 Pedro Alves <palves@redhat.com>
10339
10340 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10341 a variable whose type size is the same as the inferior's pointer
10342 size.
10343
a5362b9a
TS
103442012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10345
10346 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10347 struct siginfo.
10348 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10349 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10350 * linux-low.h: Include <signal.h>.
10351 (struct siginfo): Remove forward declaration.
10352 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10353 struct siginfo.
10354
d226c142
MF
103552012-03-21 Mike Frysinger <vapier@gentoo.org>
10356
10357 * .gitignore: Ignore more files.
10358
122f36ef
PA
103592012-03-19 Pedro Alves <palves@redhat.com>
10360 Jan Kratochvil <jan.kratochvil@redhat.com>
10361
10362 * server.c (cont_thread, general_thread): Add describing comments.
10363 (start_inferior): Clear `cont_thread'.
10364 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10365 of a process.
10366
fc3e5175
YQ
103672012-03-15 Yao Qi <yao@codesourcery.com>
10368
10369 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10370 handling to ...
10371 (cmd_qtdp): ... here.
10372
8d0d92cd
YQ
103732012-03-15 Yao Qi <yao@codesourcery.com>
10374
10375 * tracepoint.c (struct tracepoint_action_ops): New.
10376 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10377 (m_tracepoint_action_download): New.
10378 (r_tracepoint_action_download): New.
10379 (x_tracepoint_action_download): New.
10380 (l_tracepoint_action_download): New.
10381 (add_tracepoint_action): Install `action->ops' according type.
10382 (download_tracepoint_1): Move code `download' function pointer
10383 of various tracepoint_action_ops.
10384
87b0bb13
JK
103852012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10386
10387 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10388 linux_ptrace_attach_warnings.
10389
5f572dec
JK
103902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10391
10392 * Makefile.in (linux-ptrace.o): New.
10393 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10394 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10395 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10396 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10397 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10398 of these targets.
10399 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10400
f4647387
YQ
104012012-03-08 Yao Qi <yao@codesourcery.com>
10402 Pedro Alves <palves@redhat.com>
10403
10404 Fix PR server/13392.
10405 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10406 offset of JMP insn.
10407 * tracepoint.c (remove_tracepoint): New.
10408 (cmd_qtdp): Call remove_tracepoint when failed to install.
10409
9b224c5e
PA
104102012-03-07 Pedro Alves <palves@redhat.com>
10411
10412 * linux-low.c (get_detach_signal): New.
10413 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10414 Pass on pending signals to PTRACE_DETACH. Check the result of the
10415 ptrace call.
10416 * server.c (program_signals, program_signals_p): New.
10417 (handle_general_set): Handle QProgramSignals.
10418 * server.h (program_signals, program_signals_p): Declare.
10419
e237a7e2
JK
104202012-03-05 Pedro Alves <palves@redhat.com>
10421 Jan Kratochvil <jan.kratochvil@redhat.com>
10422
10423 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10424 New comment why.
10425
5808517f
YQ
104262012-03-03 Yao Qi <yao@codesourcery.com>
10427
10428 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10429 agent_look_up_symbols.
10430
58b4daa5
YQ
104312012-03-03 Yao Qi <yao@codesourcery.com>
10432
10433 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10434 (linux-x86-low.o): Likewise.
10435 * server.h: Remove in_process_agent_loaded.
10436 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10437 common/agent.c.
10438 Update callers.
10439
8ffcbaaf
YQ
104402012-03-03 Yao Qi <yao@codesourcery.com>
10441
10442 * tracepoint.c (gdb_agent_capability): New global.
10443 (in_process_agent_loaded_ust): Renamed to
10444 `in_process_agent_supports_ust'.
10445 Update callers.
10446 (in_process_agent_supports_ust): Call agent_capability_check.
10447 (clear_installed_tracepoints): Assert that agent supports
10448 agent.
10449
d1feda86
YQ
104502012-03-03 Yao Qi <yao@codesourcery.com>
10451
10452 * linux-low.c (linux_supports_agent): New.
10453 (linux_target_ops): Initialize field `supports_agent' with
10454 linux_supports_agent.
10455 * target.h (struct target_ops) <supports_agent>: New.
10456 (target_supports_agent): New macro.
10457 * server.c (handle_general_set): Handle packet 'QAgent'.
10458 (handle_query): Send `QAgent+'.
10459 * Makefile.in (server.o): Depends on agent.h.
10460
2fa291ac
YQ
104612012-03-03 Yao Qi <yao@codesourcery.com>
10462
10463 * Makefile.in (OBS): Add agent.o.
10464 Add new rule for agent.o.
10465 Track dependence of tracepoint.c on agent.h.
10466 * tracepoint.c (run_inferior_command_1):
10467 (run_inferior_command): Call agent_run_command.
10468 (gdb_ust_connect_sync_socket): Deleted. Move it to
10469 common/agent.c.
10470 (resume_thread, stop_thread): Likewise.
10471 (gdb_ust_socket_init): Renamed to ...
10472 (gdb_agent_socket_init): ... New.
10473 (gdb_ust_thread): Renamed to ...
10474 (gdb_agent_helper_thread): ... New.
10475 (gdb_ust_init): Move some code to ...
10476 (gdb_agent_init): ... here. New.
10477 [HAVE_UST]: Call gdb_ust_init.
10478 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10479 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10480 * config.in, configure: Regenerated.
10481
05044653
PA
104822012-03-02 Pedro Alves <palves@redhat.com>
10483
10484 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10485 * linux-low.c (struct simple_pid_list): New.
10486 (stopped_pids): New a struct simple_pid_list pointer.
10487 (add_to_pid_list, pull_pid_from_list): New.
10488 (handle_extended_wait): Don't assume the first signal new children
10489 report is SIGSTOP. Adjust call to pull_pid_from_list.
10490 (linux_wait_for_lwp): Adjust.
10491
8d00225b
YQ
104922012-03-02 Yao Qi <yao@codesourcery.com>
10493
10494 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10495 debug log.
10496
19560ba5
YQ
104972012-03-02 Yao Qi <yao@codesourcery.com>
10498
10499 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10500 `stop_pc' and `tpoint'. Update caller.
10501
1faeff08
MR
105022012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10503
10504 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10505 * linux-low.c (use_linux_regsets): New macro.
10506 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10507 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10508 (linux_register_in_regsets): New function.
10509 (usr_fetch_inferior_registers): Skip registers covered by
10510 regsets.
10511 (usr_store_inferior_registers): Likewise.
10512 (usr_fetch_inferior_registers): New macro.
10513 (usr_store_inferior_registers): Likewise.
10514 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10515 (linux_store_registers): Likewise.
10516 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10517 prototype.
10518 (init_registers_mips64_dsp_linux): Likewise.
10519 (init_registers_mips_linux): New macro.
10520 (init_registers_mips_dsp_linux): Likewise.
10521 (mips_dsp_num_regs): Likewise.
10522 (DSP_BASE, DSP_CONTROL): New fallback macros.
10523 (mips_base_regs): New macro.
10524 (mips_regmap): Use it. Fix the size.
10525 (mips_dsp_regmap): New variable.
10526 (mips_dsp_regset_bitmap): Likewise.
10527 (mips_arch_setup): New function.
10528 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10529 than mips_regmap.
10530 (mips_cannot_store_register): Likewise.
10531 (the_low_target): Update .arch_setup, .num_regs and .regmap
10532 initializers. Add .regset_bitmap initializer.
10533 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10534 initializer.
10535 * linux-bfin-low.c (the_low_target): Likewise.
10536 * linux-cris-low.c (the_low_target): Likewise.
10537 * linux-crisv32-low.c (the_low_target): Likewise.
10538 * linux-ia64-low.c (the_low_target): Likewise.
10539 * linux-m32r-low.c (the_low_target): Likewise.
10540 * linux-m68k-low.c (the_low_target): Likewise.
10541 * linux-ppc-low.c (the_low_target): Likewise.
10542 * linux-s390-low.c (the_low_target): Likewise.
10543 * linux-sh-low.c (the_low_target): Likewise.
10544 * linux-sparc-low.c (the_low_target): Likewise.
10545 * linux-tic6x-low.c (the_low_target): Likewise.
10546 * linux-x86-low.c (the_low_target): Likewise.
10547 * linux-xtensa-low.c (the_low_target): Likewise.
10548 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10549 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10550 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10551 srv_xmlfiles.
10552 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10553 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10554
c03e6ccc
YQ
105552012-02-29 Yao Qi <yao@codesourcery.com>
10556 Pedro Alves <palves@redhat.com>
10557
10558 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10559 `step_over_finished' is true.
10560
644cebc9
PA
105612012-02-27 Pedro Alves <palves@redhat.com>
10562
10563 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10564 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10565
c14d7ab2
PA
105662012-02-27 Pedro Alves <palves@redhat.com>
10567
10568 PR server/9684
10569 * linux-low.c (pid_is_stopped): New.
10570 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10571
412c89dd
LM
105722012-02-25 Luis Machado <lgustavo@codesourcery.com>
10573
10574 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10575 of conditions.
10576
b745defe
MR
105772012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10578
10579 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10580
9f3a5c85
LM
105812012-02-24 Luis Machado <lgustavo@codesourcery>
10582
10583 * server.c (handle_query): Advertise support for target-side
10584 breakpoint condition evaluation.
10585 (process_point_options): New function.
10586 (process_serial_event): When inserting a breakpoint, check for
10587 a target-side condition that should be evaluated.
10588
10589 * mem-break.c: Include regcache.h and ax.h.
10590 (point_cond_list_t): New data structure.
10591 (breakpoint) <cond_list>: New field.
10592 (find_gdb_breakpoint_at): Make non-static.
10593 (delete_gdb_breakpoint_at): Clear any target-side
10594 conditions.
10595 (clear_gdb_breakpoint_conditions): New function.
10596 (add_condition_to_breakpoint): Likewise.
10597 (add_breakpoint_condition): Likewise.
10598 (gdb_condition_true_at_breakpoint): Likewise.
10599 (gdb_breakpoint_here): Return result directly instead
10600 of going through a local variable.
10601
10602 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10603 (clear_gdb_breakpoint_conditions): Likewise.
10604 (add_breakpoint_condition): Likewise.
10605 (gdb_condition_true_at_breakpoint): Likewise.
10606
10607 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10608 (need_step_over_p): Take target-side breakpoint condition into
10609 consideration.
10610
5e1dc496
LM
106112012-02-24 Luis Machado <lgustavo@codesourcery>
10612
10613 * server.h: Include tracepoint.h.
10614 (agent_mem_read, agent_get_trace_state_variable_value,
10615 agent_set_trace_state_variable_value,
10616 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10617 get_set_tsv_func_addr): New prototypes.
10618
10619 * ax.h: New include file.
10620 * ax.c: New source file.
10621
10622 * tracepoint.c: Include ax.h.
10623 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10624 agent_expr, eval_result_type): Move to ax.h.
10625 (parse_agent_expr): Rename to ...
10626 (gdb_parse_agent_expr): ... this, make it non-static and move
10627 to ax.h.
10628 (unparse_agent_expr) Rename to ...
10629 (gdb_unparse_agent_expr): ... this, make it non-static and move
10630 to ax.h.
10631 (eval_agent_expr): Rename to ...
10632 (eval_tracepoint_agent_expr): ... this.
10633 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10634 forward declarations.
10635 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10636 (agent_get_trace_state_variable_value): New function.
10637 (agent_set_trace_state_variable_value): New function.
10638 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10639 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10640 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10641 (condition_true_at_tracepoint): Likewise.
10642 (parse_agent_expr): Rename to ...
10643 (gdb_parse_agent_expr): ... this and move to ax.c.
10644 (unparse_agent_expr): Rename to ...
10645 (gdb_unparse_agent_expr): ... this and move to ax.c.
10646 (gdb_agent_op_name): Move to ax.c.
10647 (eval_agent_expr): Rename to ...
10648 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10649 and move to ax.c.
10650 (eval_tracepoint_agent_expr): New function.
10651 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10652 non-static.
5e1dc496
LM
10653 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10654 ax.c.
10655 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10656 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10657 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10658 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10659 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10660 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10661 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10662 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10663 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10664 (compile_bytecodes): Remove forward declaration.
10665 (is_goto_target): Move to ax.c.
10666 (compile_bytecodes): Move to ax.c and call
10667 agent_get_trace_state_variable_value (...) and
10668 agent_set_trace_state_variable_value (...).
10669
10670 * Makefile.in: Update ax.c and IPA dependencies.
10671
277e4e52
PA
106722012-02-24 Pedro Alves <palves@redhat.com>
10673
10674 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10675 (cmd_bigqtbuffer_circular): ... this. Only handle
10676 'QTBuffer:circular:'.
10677 (handle_tracepoint_general_set): Adjust.
10678
bf4c19f7
YQ
106792012-02-16 Yao Qi <yao@codesourcery.com>
10680
10681 * inferiors.c: Move code to ...
10682 * dll.c: .... here. New.
10683 * server.h: Declare clear_dlls.
10684 * Makefile.in (SFILES): Add dll.c.
10685 (OBS): Add dll.o
10686 (dll.o): New rule.
10687
d73f2619
YQ
106882012-02-11 Yao Qi <yao@codesourcery.com>
10689
10690 * server.c: (handle_monitor_command): Add a new parameter
10691 `own_buf'.
10692 (handle_query): Update caller.
10693
f8255c2a
JB
106942012-02-09 Joel Brobecker <brobecker@adacore.com>
10695
10696 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10697 * configure, config.in: Regenerate.
10698 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10699 is not defined.
10700
da84f473
PA
107012012-02-02 Pedro Alves <palves@redhat.com>
10702
10703 Try SIGKILL first, then PTRACE_KILL.
10704 * linux-low.c (linux_kill_one_lwp): New.
10705 (linux_kill_one_lwp): Rename to ...
10706 (kill_one_lwp_callback): ... this. Use the new
10707 linux_kill_one_lwp.
10708
e886a173
PA
107092012-02-02 Pedro Alves <palves@redhat.com>
10710
10711 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10712 inferior.
10713
be07f1a2
PA
107142012-01-27 Pedro Alves <palves@redhat.com>
10715
10716 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10717 (elf_64_file_p): Make static.
10718 (linux_pid_exe_is_elf_64_file): New.
10719 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10720 Delete declarations.
10721 (linux_pid_exe_is_elf_64_file): Declare.
10722 * linux-x86-low.c (x86_arch_setup): Use
10723 linux_pid_exe_is_elf_64_file.
10724
d8301ad1
JK
107252012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10726
10727 * linux-low.c (linux_wait_for_event_1): Rename to ...
10728 (linux_wait_for_event): ... here and merge it with former
10729 linux_wait_for_event - new variable wait_ptid, use it.
10730 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10731
01b17894
PA
107322012-01-23 Pedro Alves <palves@redhat.com>
10733
10734 * server.c (main): Avoid yet another case of infinite loop while
10735 detaching/killing after a longjmp.
10736
e825046f
JK
107372012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10738
10739 Code cleanup.
10740 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10741
b9e7b9c3
UW
107422012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10743
10744 * hostio.c (handle_readlink): New function.
10745 (handle_vFile): Call it to handle "vFile:readlink" packets.
10746
901f9912
UW
107472012-01-20 Pedro Alves <palves@redhat.com>
10748 Ulrich Weigand <ulrich.weigand@linaro.org>
10749
10750 * server.c (handle_v_requests): Only support vAttach and vRun to
10751 start multiple processes when in extended protocol mode.
10752
fc1ab1a0
PA
107532012-01-17 Pedro Alves <palves@redhat.com>
10754
10755 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10756 memalign plus mprotect to allocate the scratch buffer.
10757
7d5d4e98
PA
107582012-01-13 Pedro Alves <palves@redhat.com>
10759
10760 * server.c (attach_inferior): Clear `cont_thread'.
10761
f128d5e9
PA
107622012-01-13 Pedro Alves <palves@redhat.com>
10763
10764 * server.c (main): Avoid infinite loop while detaching/killing
10765 after a longjmp.
10766
06db92f0
DE
107672012-01-09 Doug Evans <dje@google.com>
10768
10769 * server.c (start_inferior): Set last_ptid in --wrapper case.
10770
32d92999
YQ
107712012-01-06 Yao Qi <yao@codesourcery.com>
10772
10773 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10774 defined.
10775 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10776
5e0a92a9
YQ
107772012-01-04 Yao Qi <yao@codesourcery.com>
10778
10779 * tracepoint.c (cmd_qtdp): Print debug message
10780 for static tracepoint.
10781
ae639e8c
YQ
107822012-01-04 Yao Qi <yao@codesourcery.com>
10783
10784 * tracepoint.c (trace_vdebug): Differentiate debug message
10785 between gdbserver and IPA.
10786
f72429c5
YQ
107872012-01-03 Yao Qi <yao@codesourcery.com>
10788
10789 * tracepoint.c (tracepoint_was_hit): Don't collect for
10790 static tracepoint.
10791
12c3e59c
JB
107922012-01-02 Joel Brobecker <brobecker@adacore.com>
10793
10794 * terminal.h: Reformat copyright header.
10795
67827812
JB
107962012-01-02 Joel Brobecker <brobecker@adacore.com>
10797
10798 * server.c (gdbserver_version): Update copyright year.
10799 * gdbreplay.c (gdbreplay_version): Likewise.
10800
3e52c33d
JK
108012011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10802
10803 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10804
10805 Revert:
10806 2011-12-18 Hui Zhu <teawater@gmail.com>
10807 * linux-low.c (linux_create_inferior): Save return value to ret.
10808
66f1260e
HZ
108092011-12-18 Hui Zhu <teawater@gmail.com>
10810
10811 * linux-low.c (linux_create_inferior): Save return value to ret.
10812
e77616d7
DE
108132011-12-16 Doug Evans <dje@google.com>
10814
e7b06c57
DE
10815 * linux-low.c (linux_create_inferior): If stdio connection,
10816 redirect stdin from /dev/null, stdout to stderr.
10817 * remote-utils.c (remote_is_stdio): New static global.
10818 (remote_connection_is_stdio): New function.
10819 (remote_prepare): Handle stdio connection.
10820 (remote_open): Ditto.
10821 (remote_close): Don't close stdin for stdio connections.
10822 (read_prim,write_prim): New functions. Replace all calls to
10823 read/write to these.
10824 * server.c (main): Watch for "-" argument. Move call to
10825 remote_prepare before start_inferior.
10826 * server.h (STDIO_CONNECTION_NAME): New macro.
10827 (remote_connection_is_stdio): Declare.
10828
e77616d7
DE
10829 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10830 in debugging output.
10831
82067193
YQ
108322011-12-15 Yao Qi <yao@codesourcery.com>
10833
10834 * tracepoint.c: Include sys/syscall.h.
10835 (gdb_ust_thread): Remove preprocessor conditional.
10836
82bfbe7e
PA
108372011-12-14 Pedro Alves <pedro@codesourcery.com>
10838
10839 * linux-low.c (linux_detach_one_lwp): Call
10840 the_low_target.prepare_to_resume before detaching.
10841
712c6575
YQ
108422011-12-14 Yao Qi <yao@codesourcery.com>
10843
10844 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10845 of write.
10846
d54d1edf
YQ
108472011-12-14 Yao Qi <yao@codesourcery.com>
10848
10849 * i386-low.c (i386_low_stopped_data_address): Initialize local
10850 variable `control'.
10851
6210a125
PA
108522011-12-13 Pedro Alves <pedro@codesourcery.com>
10853
10854 PR remote/13492
10855
10856 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10857 DR_CONTROL unless necessary. Extend comments.
10858 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10859 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10860
2ece8244
YQ
108612011-12-13 Yao Qi <yao@codesourcery.com>
10862
10863 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10864 macros.
10865 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10866
784867a5
JK
108672011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10868
10869 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10870 Print new debug message for such case.
10871
6bf36717
JK
108722011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10873
10874 Fix overlapping memcpy.
10875 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10876 the read_inferior_memory transfer.
10877 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10878 write_inferior_memory transfer.
10879 (set_fast_tracepoint_jump): New variable buf. Use it for the
10880 read_inferior_memory and write_inferior_memory transfers.
10881 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10882 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10883 Use it for the write_inferior_memory transfer.
10884 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10885 buffers.
10886
50275556
MR
108872011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10888
10889 * linux-low.c (fetch_register, store_register): Make code
10890 consistent, fix formatting.
10891
7325beb4
MR
108922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10893
10894 * linux-low.c (usr_store_inferior_registers): Factor out code
10895 to handle individual registers into...
10896 (store_register): ... this new function.
10897
c642a434
UW
108982011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10899
10900 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10901 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10902 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10903 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10904 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10905 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10906 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10907 (srv_xmlfiles): Add new XML files.
10908
10909 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10910 and <sys/uio.h>.
10911 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10912 (init_registers_s390_linux32v1): Add prototype.
10913 (init_registers_s390_linux32v2): Likewise.
10914 (init_registers_s390_linux64v1): Likewise.
10915 (init_registers_s390_linux64v2): Likewise.
10916 (init_registers_s390x_linux64v1): Likewise.
10917 (init_registers_s390x_linux64v2): Likewise.
10918 (s390_num_regs): Increment to 52.
10919 (s390_regmap): Add orig_r2 register.
10920 (s390_num_regs_3264): Increment to 68.
10921 (s390_regmap_3264): Add orig_r2 register.
10922 (s390_collect_ptrace_register): Handle orig_r2 register.
10923 (s390_supply_ptrace_register): Likewise.
10924 (s390_fill_last_break): New function.
10925 (s390_store_last_break): Likewise.
10926 (s390_fill_system_call): New function.
10927 (s390_store_system_call): Likewise.
10928 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10929 register sets.
10930 (s390_check_regset): New function.
10931 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10932 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10933 Update target_regsets for available register sets.
10934
2268b414
JK
109352011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10936 Jan Kratochvil <jan.kratochvil@redhat.com>
10937
10938 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10939 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10940 New.
10941 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10942 * linux-low.h (struct process_info_private): New member r_debug.
10943 * server.c (handle_qxfer_libraries): Call
10944 the_target->qxfer_libraries_svr4.
10945 (handle_qxfer_libraries_svr4): New function.
10946 (qxfer_packets): New entry "libraries-svr4".
10947 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10948 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10949 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10950 PACKET_qXfer_libraries_svr4.
10951
d6db1fab
UW
109522011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10953
10954 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10955 PSW address/mask between 8-byte and 16-byte formats.
10956 (s390_supply_ptrace_register): Likewise.
10957 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10958 basic addressing mode bit.
10959
242f5f1c
SS
109602011-11-24 Stan Shebs <stan@codesourcery.com>
10961
10962 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10963
f196051f
SS
109642011-11-17 Stan Shebs <stan@codesourcery.com>
10965
10966 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10967 (tracing_start_time): New global.
10968 (tracing_stop_time): New global.
10969 (tracing_user_name): New global.
10970 (tracing_notes): New global.
10971 (tracing_stop_note): New global.
10972 (cmd_qtstart): Set traceframe_usage, start_time.
10973 (stop_tracing): Set stop_time.
10974 (cmd_qtstatus): Report additional status.
10975 (cmd_qtp): New function.
10976 (handle_tracepoint_query): Call it.
10977 (cmd_qtnotes): New function.
10978 (handle_tracepoint_general_set): Call it.
10979 (get_timestamp): Rename from tsv_get_timestamp.
10980
405f8e94
SS
109812011-11-14 Stan Shebs <stan@codesourcery.com>
10982 Kwok Cheung Yeung <kcy@codesourcery.com>
10983
10984 * linux-x86-low.c (small_jump_insn): New.
10985 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10986 trampoline and error message, build a trampoline and issue a small
10987 jump instruction to it.
10988 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10989 trampoline and error message.
10990 (x86_get_min_fast_tracepoint_insn_len): New.
10991 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10992 * linux-low.h (struct linux_target_ops): Add arguments to
10993 install_fast_tracepoint_jump_pad operation, add new operation.
10994 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10995 arguments.
10996 (linux_get_min_fast_tracepoint_insn_len): New function.
10997 (linux_target_op): Add new operation.
10998 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10999 (gdb_trampoline_buffer_end): Ditto.
11000 (gdb_trampoline_buffer_error): Ditto.
11001 (struct ipa_sym_addresses): Add fields for new IPA variables.
11002 (symbol_list): Add entries for new IPA variables.
11003 (struct tracepoint): Add fields to hold the address range of the
11004 trampoline used by the tracepoint.
11005 (trampoline_buffer_head): New static variable.
11006 (trampoline_buffer_tail): Ditto.
11007 (claim_trampoline_space): New function.
11008 (have_fast_tracepoint_trampoline_buffer): New function.
11009 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11010 structure.
11011 (install_fast_tracepoint): Ditto, also add error buffer argument.
11012 (cmd_qtminftpilen): New function.
11013 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11014 (fast_tracepoint_from_trampoline_address): New function.
11015 (fast_tracepoint_collecting): Handle trampoline as part of jump
11016 pad space.
11017 (set_trampoline_buffer_space): New function.
11018 (initialize_tracepoint): Initialize new IPA variables.
11019 * target.h (struct target_ops): Add arguments to
11020 install_fast_tracepoint_jump_pad operation, add new
11021 get_min_fast_tracepoint_insn_len operation.
11022 (target_get_min_fast_tracepoint_insn_len): New.
11023 (install_fast_tracepoint_jump_pad): Add arguments.
11024 * server.h (IPA_BUFSIZ): Define.
11025 * linux-i386-ipa.c: Include extra header files.
11026 (initialize_fast_tracepoint_trampoline_buffer): New function.
11027 (initialize_low_tracepoint): Call it.
11028 * server.h (set_trampoline_buffer_space): Declare.
11029 (claim_trampoline_space): Ditto.
11030 (have_fast_tracepoint_trampoline_buffer): Ditto.
11031
1e4d1764
YQ
110322011-11-14 Yao Qi <yao@codesourcery.com>
11033
11034 * server.c (handle_query): Handle InstallInTrace for qSupported.
11035 * tracepoint.c (add_tracepoint): Sort list.
11036 (install_tracepoint, download_tracepoint): New.
11037 (cmd_qtdp): Call them to install and download tracepoints.
11038 (sort_tracepoints): Removed.
11039 (cmd_qtstart): Update.
11040
5c73ff4e
YQ
110412011-11-14 Yao Qi <yao@codesourcery.com>
11042
11043 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11044 * mem-break.h: Declare.
11045 * tracepoint.c (cmd_qtstart): Move some code to ...
11046 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11047 New.
11048 (download_tracepoints): Move some code to ...
11049 (download_tracepoint_1): ... here. New.
11050
86a30030
YQ
110512011-11-08 Yao Qi <yao@codesourcery.com>
11052
11053 * remote-utils.c (relocate_instruction): A comment fix.
11054
8d26e50c
JB
110552011-11-07 Joel Brobecker <brobecker@adacore.com>
11056
11057 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11058 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11059 dr_status_mirror and dr_control_mirror from debug_reg_state.
11060 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11061 (i386_initial_stuff): Remove use of deleted globals.
11062 (i386_get_thread_context, i386_set_thread_context,
11063 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11064 from debug_reg_state.
11065
a59306a3
YQ
110662011-11-05 Yao Qi <yao@codesourcery.com>
11067
11068 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11069 address as TPOINT's.
11070
3065dfb6
SS
110712011-11-02 Stan Shebs <stan@codesourcery.com>
11072
11073 * tracepoint.c (agent_mem_read_string): New function.
11074 (eval_agent_expr): Call it for tracenz.
11075 * server.c (handle_query): Report support for tracenz.
11076
fd0d8c7c
YQ
110772011-11-02 Yao Qi <yao@codesourcery.com>
11078
11079 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11080
609086b1
YQ
110812011-11-02 Yao Qi <yao@codesourcery.com>
11082
11083 * target.h: Fix a typo in comment.
11084
b9fd1791
PA
110852011-10-31 Pedro Alves <pedro@codesourcery.com>
11086
11087 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11088 clobber the breakpoints' shadows with fast tracepoint jumps.
11089 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11090 * target.c (write_inferior_memory): Also pass MYADDR down to
11091 check_mem_write.
11092
03583c20
UW
110932011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11094
11095 * configure.ac: Check support for personality routine.
11096 * configure: Regenerate.
11097 * config.in: Likewise.
11098 * linux-low.c: Include <sys/personality.h>.
11099 Define ADDR_NO_RANDOMIZE if necessary.
11100 (linux_create_inferior): Disable address space randomization when
11101 forking inferior, if requested.
11102 (linux_supports_disable_randomization): New function.
11103 (linux_target_ops): Install it.
11104 * server.h (disable_randomization): Declare.
11105 * server.c (disable_randomization): New global variable.
11106 (handle_general_set): Handle QDisableRandomization.
11107 (handle_query): Likewise for qSupported.
11108 (main): Support --disable-randomization and --no-disable-randomization
11109 command line arguments.
11110 * target.h (struct target_ops): Add supports_disable_randomization.
11111 (target_supports_disable_randomization): New macro.
11112
723b724b
MF
111132011-09-29 Mike Frysinger <vapier@gentoo.org>
11114
11115 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11116 ifdef check.
11117 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11118 [!PT_GETDSBT] (target_loadmap): New definition.
11119 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11120 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11121 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11122 and PT_GETDSBT to LINUX_LOADMAP.
11123 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11124 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11125
55329a5c 111262011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11127
11128 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11129 (arm_linux_hwbp_cap): New static variable.
11130 (arm_linux_get_hwbp_cap): Replace by ...
11131 (arm_linux_init_hwbp_cap): ... this new function.
11132 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11133 (arm_linux_get_hw_watchpoint_count): Likewise.
11134 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11135 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11136 (arm_prepare_to_resume): Use perror_with_name instead of error.
11137
55329a5c 111382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11139
11140 * linux-arm-low.c: Include <signal.h>.
11141 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11142 (struct arm_linux_hwbp_cap): New data type.
11143 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11144 (struct arm_linux_hw_breakpoint): New data type.
11145 (MAX_BPTS, MAX_WPTS): Define.
11146 (struct arch_process_info, struct arch_lwp_info): New data types.
11147 (arm_linux_get_hwbp_cap): New function.
11148 (arm_linux_get_hw_breakpoint_count): Likewise.
11149 (arm_linux_get_hw_watchpoint_count): Likewise.
11150 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11151 (arm_hwbp_control_initialize): Likewise.
11152 (arm_hwbp_control_is_enabled): Likewise.
11153 (arm_hwbp_control_is_initialized): Likewise.
11154 (arm_hwbp_control_disable): Likewise.
11155 (arm_linux_hw_breakpoint_equal): Likewise.
11156 (arm_linux_hw_point_initialize): Likewise.
11157 (struct update_registers_data): New data structure.
11158 (update_registers_callback: New function.
11159 (arm_insert_point): Likewise.
11160 (arm_remove_point): Likewise.
11161 (arm_stopped_by_watchpoint): Likewise.
11162 (arm_stopped_data_address): Likewise.
11163 (arm_new_process): Likewise.
11164 (arm_new_thread): Likewise.
11165 (arm_prepare_to_resume): Likewise.
11166 (the_low_target): Register arm_insert_point, arm_remove_point,
11167 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11168 arm_new_thread, and arm_prepare_to_resume.
11169
6b9801d4
SS
111702011-09-15 Stan Shebs <stan@codesourcery.com>
11171
11172 * server.h (struct emit_ops): Add compare-goto fields.
11173 * tracepoint.c (gdb_agent_op_sizes): New table.
11174 (emit_eq_goto): New function.
11175 (emit_ne_goto): New function.
11176 (emit_lt_goto): New function.
11177 (emit_le_goto): New function.
11178 (emit_gt_goto): New function.
11179 (emit_ge_goto): New function.
11180 (is_goto_target): New function.
11181 (compile_bytecodes): Recognize special cases of compare-goto
11182 combinations and call specialized emitters for them.
11183 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11184 (amd64_emit_ne_goto): New function.
11185 (amd64_emit_lt_goto): New function.
11186 (amd64_emit_le_goto): New function.
11187 (amd64_emit_gt_goto): New function.
11188 (amd64_emit_ge_goto): New function.
11189 (amd64_emit_ops): Add the new functions.
11190 (i386_emit_eq_goto): New function.
11191 (i386_emit_ne_goto): New function.
11192 (i386_emit_lt_goto): New function.
11193 (i386_emit_le_goto): New function.
11194 (i386_emit_gt_goto): New function.
11195 (i386_emit_ge_goto): New function.
11196 (i386_emit_ops): Add the new functions.
11197
bf15cbda
SS
111982011-09-08 Stan Shebs <stan@codesourcery.com>
11199
11200 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11201 (i386_emit_epilogue): Restore %ebx.
11202
943ca1dd
JZ
112032011-08-31 Jie Zhang <jzhang918@gmail.com>
11204
11205 * server.c (step_thread): Remove definition.
11206 (process_serial_event): Don't handle Hs.
11207 * server.h (step_thread): Remove declaration.
11208 * target.c (set_desired_inferior): Remove use of step_thread.
11209
e3deef73
LM
112102011-08-24 Luis Machado <lgustavo@codesourcery.com>
11211
11212 * linux-low.c: Include linux-procfs.h.
11213 (linux_attach_lwp_1): Update comments.
11214 (linux_attach): Scan for existing threads when attaching to a
11215 process that is the tgid.
11216 * Makefile.in: Update dependencies.
11217
13da1c97
LM
112182011-08-24 Luis Machado <lgustavo@codesourcery.com>
11219
11220 * configure.srv: Add linux-procfs.o dependencies.
11221
881127c9
YQ
112222011-08-14 Yao Qi <yao@codesourcery.com>
11223
11224 * target.h (struct target_ops): Fix indent.
11225 * win32-low.c (win32_target_ops): Fix comment.
11226
58dbd541
YQ
112272011-08-14 Andrew Jenner <andrew@codesourcery.com>
11228 Yao Qi <yao@codesourcery.com>
11229
11230 * Makefile.in (clean): Remove tic6x-*.c files.
11231 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11232 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11233 (tic6x-c64xp-linux.c): Likewise.
11234 * configure.srv: Add support for tic6x-*-uclinux.
11235 * linux-tic6x-low.c: New.
11236 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11237
78d85199
YQ
112382011-08-14 Andrew Stubbs <ams@codesourcery.com>
11239 Yao Qi <yao@codesourcery.com>
11240
11241 * target.h (struct target_ops): Add read_loadmap.
11242 * linux-low.c (struct target_loadseg): New type.
11243 (struct target_loadmap): New type.
11244 (linux_read_loadmap): New function.
11245 (linux_target_ops): Add linux_read_loadmap.
11246 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11247 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11248 to NULL.
78d85199 11249
a959a88d
EZ
112502011-08-05 Eli Zaretskii <eliz@gnu.org>
11251
11252 * win32-low.c: Include <stdint.h>.
11253
1ced966e
PA
112542011-07-22 Pedro Alves <pedro@codesourcery.com>
11255
11256 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11257 to the inferior here.
11258 (i386_remove_aligned_watchpoint): Ditto.
11259 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11260 fit part of the watchpoint in the debug registers.
11261 (i386_update_inferior_debug_regs): New.
11262 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11263 registers, and only update the inferior on success.
11264 (i386_low_remove_watchpoint): Ditto.
11265
d26e3629
KY
112662011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11267
11268 * linux-low.c (compare_ints, unique, list_threads, show_process,
11269 linux_core_of_thread): Delete.
11270 (linux_target_ops): Change linux_core_of_thread to
11271 linux_common_core_of_thread.
11272 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11273 * utils.c (malloc_failure): Change type of argument.
11274 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11275 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11276 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11277 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11278 (IPA_OBJS): Add common-utils-ipa.o.
11279 (ptid_h, linux_osdata_h): New macros.
11280 (server_h): Add common/common-utils.h, common/xml-utils.h,
11281 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11282 common/ptid.h.
11283 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11284 ptid.o, buffer.o): New rules.
11285 (linux-low.o): Add common/linux-osdata.h as a dependency.
11286 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11287 * configure.ac: Add AC_HEADER_DIRENT check.
11288 * config.in: Regenerate.
11289 * configure: Regenerate.
11290 * remote-utils.c (xml_escape_text): Delete.
11291 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11292 buffer_xml_printf): Move to common/buffer.c.
11293 * server.c (main): Remove call to initialize_inferiors.
11294 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11295 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11296 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11297 internal_error, gdb_assert, gdb_assert_fail): Delete.
11298 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11299 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11300 common/buffer.h.
11301 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11302 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11303 initialize_inferiors): Delete.
11304
2275a1a7
PA
113052011-07-20 Pedro Alves <pedro@codesourcery.com>
11306
11307 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11308 symbol error.
11309
0a5b1e09
PA
113102011-05-31 Pedro Alves <pedro@codesourcery.com>
11311
11312 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11313 assertion.
11314 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11315
6938fd34
YQ
113162011-05-26 Yao Qi <yao@codesourcery.com>
11317
11318 * Makefile.in (thread-db.o): Track dependence to
11319 common/gdb_thread_db.h.
11320 * thread-db.c: include gdb_thread_db.h from right place.
11321
b481f9e0
TT
113222011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11323
11324 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11325 __FILE__ and __LINE__ to internal_error.
11326
98a5dd13
DE
113272011-05-13 Doug Evans <dje@google.com>
11328
11329 * thread-db.c (try_thread_db_load_from_sdir): New function.
11330 (try_thread_db_load_from_dir): New function.
11331 (thread_db_load_search): Handle $sdir, ignore $pdir.
11332 Remove trying of system directories if search of
11333 libthread-db-search-path fails, that is now done via $sdir.
11334
d248b706
KY
113352011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11336
11337 * server.c (handle_query): Add EnableDisableTracepoints to the list
11338 of supported features.
43aaf8b6 11339 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11340 tracepoints.
43aaf8b6
PA
11341 (cmd_qtenable_disable): New.
11342 (cmd_qtstart): Install tracepoints even if disabled.
11343 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11344 receiving a QTEnable or QTDisable packet.
11345 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11346 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11347 tracepoints.
11348 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11349
84e578fb
DE
113502011-05-10 Doug Evans <dje@google.com>
11351
11352 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11353
71f55dd8
DE
113542011-05-04 Doug Evans <dje@google.com>
11355
11356 * linux-low.c (linux_join): Skip process lookup.
11357 * spu-low.c (spu_join): Ditto.
11358 * server.c (join_inferiors_callback): Delete.
11359 (process_serial_event): For 'D' packet (detach) call join_inferior
11360 directly.
11361
4d393d60
JM
113622011-05-04 Joseph Myers <joseph@codesourcery.com>
11363
11364 * README: Don't mention xscale*-*-linux*.
11365 * configure.srv (xscale*-*-linux*): Don't handle target.
11366
b00ad6ff
NF
113672011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11368
11369 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11370 casting pointers.
11371 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11372 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11373 (i386_emit_void_call_2): Likewise.
11374
af96c192
YQ
113752011-04-26 Yao Qi <yao@codesourcery.com>
11376
43aaf8b6
PA
11377 * linux-low.c: Move common macros to linux-ptrace.h.
11378 Include linux-ptrace.h.
af96c192
YQ
11379 * Makefile.in (linux_ptrace_h): New.
11380 (linux-low.o): Depends on linux-ptrace.h.
11381
03f2bd59
JK
113822011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11383
11384 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11385 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11386 (remote_prepare): New function with most of the TCP code from ...
11387 (remote_open): ... here. Detect PORT here unconditionally. Move also
11388 setting transport_is_reliable.
11389 * server.c (run_once): New variable.
11390 (gdbserver_usage): Document it.
11391 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11392 the first run if RUN_ONCE.
11393 * server.h (run_once, remote_prepare): New declarations.
11394
7a9dd1b2
TT
113952011-04-19 Tom Tromey <tromey@redhat.com>
11396
11397 * win32-low.c (handle_load_dll): Remove duplicate "the".
11398
81239425
PM
113992011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11400
11401 Remove support for old Cygwin 1.5 versions.
11402 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11403 function to avoid warning.
11404 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11405 warning.
11406
9e0627f1
PM
114072011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11408
11409 * gdbserver/server.h (Macro _): Define it if not available.
11410
588eebee
MS
114112011-03-14 Michael Snyder <msnyder@vmware.com>
11412
348af9f7 11413 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11414
43f70d4c
JB
114152011-03-10 Joel Brobecker <brobecker@adacore.com>
11416
11417 * Makefile.in (maintainer-clean realclean distclean): Remove
11418 "make ... subdir_do" command.
11419
348af9f7
MS
114202011-03-10 Michael Snyder <msnyder@vmware.com>
11421
11422 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11423
11424 * server.c (handle_v_run): Free alloced buffer on early return.
11425
e637a4f5
YQ
114262011-03-09 Yao Qi <yao@codesourcery.com>
11427
11428 Revert:
11429 2011-03-04 Yao Qi <yao@codesourcery.com>
11430
11431 * Makefile.in: Remove GNU make feature --directory.
11432
11433 2011-03-05 Yao Qi <yao@codesourcery.com>
11434
11435 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11436 (subdir_do): New make target. Copied from gdb/Makefile.
11437 (maintainer-clean, realclean, distclean, clean): Call corresponding
11438 make targets in common/Makefile.
11439
11440 2011-02-11 Yao Qi <yao@codesourcery.com>
11441
11442 * configure.ac: Call AC_PROG_RANLIB.
11443 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11444 * configure: Regenerate.
11445
e6edda56
JK
114462011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11447
11448 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11449
e5141119
JB
114502011-03-06 Yao Qi <yao@codesourcery.com>
11451
11452 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11453
64794aa4
JB
114542011-03-05 Yao Qi <yao@codesourcery.com>
11455
11456 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11457 (subdir_do): New make target. Copied from gdb/Makefile.
11458 (maintainer-clean, realclean, distclean, clean): Call corresponding
11459 make targets in common/Makefile.
11460
7a762829
YQ
114612011-03-04 Yao Qi <yao@codesourcery.com>
11462
11463 * Makefile.in: Remove GNU make feature --directory.
11464
348af9f7
MS
114652011-03-04 Michael Snyder <msnyder@vmware.com>
11466
11467 * server.c (queue_stop_reply): Call xmalloc not malloc.
11468
114692011-03-02 Michael Snyder <msnyder@vmware.com>
11470
11471 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11472
9f72fee2
MS
114732011-02-28 Michael Snyder <msnyder@vmware.com>
11474
588eebee
MS
11475 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11476 (cmd_qtframe): Ditto.
11477 (cmd_qtbuffer): Ditto.
11478 (cmd_bigqtbuffer): Ditto.
11479
9f72fee2
MS
11480 * utils.c (decimal2str): Initialize 'width' to nine, then
11481 don't mess with it.
11482
8040bd49
UW
114832011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11484
11485 * hostio.c (require_data): Free *data, not data.
11486
7e52cbd0
JK
114872011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11488
11489 * hostio.c (require_data): Use free, not xfree.
11490
9130f83e
MS
114912011-02-27 Michael Snyder <msnyder@vmware.com>
11492
4b812f4e
MS
11493 * server.c (handle_query): Discard unused value.
11494
9130f83e
MS
11495 * hostio.c (require_data): Free malloc memory before returning
11496 error.
11497
69d37113
MS
114982011-02-26 Michael Snyder <msnyder@vmware.com>
11499
11500 * linux-low.c (list_threads): Call closedir for dirent.
11501
35f5825a
MS
115022011-02-27 Michael Snyder <msnyder@vmware.com>
11503
2a589cef
MS
11504 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11505 a case statement falls through.
11506
0adea5f7
MS
11507 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11508
35f5825a
MS
11509 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11510 in comparison.
11511
238f1c74
MS
115122011-02-26 Michael Snyder <msnyder@vmware.com>
11513
11514 * utils.c (decimal2str): Eliminate dead code and dead param.
11515 (pulongest): Drop dead param from call to decimal2str.
11516 (plongest): Ditto.
11517
633ff500
JB
115182011-02-24 Joel Brobecker <brobecker@adacore.com>
11519
11520 Revert the following patch (not approved yet):
11521 2011-02-21 Hui Zhu <teawater@gmail.com>
11522 * tracepoint.c (tp_printf): New function.
11523 (eval_agent_expr): Handle gdb_agent_op_printf.
11524
f9c6ff72
HZ
115252011-02-21 Hui Zhu <teawater@gmail.com>
11526
11527 * tracepoint.c (tp_printf): New function.
11528 (eval_agent_expr): Handle gdb_agent_op_printf.
11529
94d5e490
TT
115302011-02-18 Tom Tromey <tromey@redhat.com>
11531
11532 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11533 (tracepoint.o): Likewise.
11534 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11535 (gdb_agent_op_names): Likewise.
11536
c7f96d2b
TT
115372011-02-18 Tom Tromey <tromey@redhat.com>
11538
11539 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11540 gdb_agent_op_rot>: New constants.
11541 (gdb_agent_op_names): Add pick and roll.
11542 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11543 cases.
11544
0feedb2c
JK
115452011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11546
11547 * aclocal.m4: Regenerated with aclocal-1.11.1.
11548
b3b9301e
PA
115492011-02-14 Pedro Alves <pedro@codesourcery.com>
11550
11551 * server.c (handle_qxfer_traceframe_info): New.
11552 (qxfer_packets): Register "traceframe-info".
11553 (handle_query): Report support for qXfer:traceframe-info:read+.
11554 * tracepoint.c (match_blocktype): New.
11555 (traceframe_find_block_type): Rename to ...
11556 (traceframe_walk_blocks): ... this. Add callback filter argument,
11557 and use it.
11558 (traceframe_find_block_type): New, reimplemented on top of
11559 traceframe_walk_blocks.
11560 (build_traceframe_info_xml): New.
11561 (traceframe_read_info): New.
11562 * server.h (traceframe_read_info): Declare.
11563
4f3e6fb7
YQ
115642011-02-11 Yao Qi <yao@codesourcery.com>
11565
11566 * configure.ac: Call AC_PROG_RANLIB.
11567 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11568 * configure: Regenerate.
11569
764880b7
PA
115702011-02-07 Pedro Alves <pedro@codesourcery.com>
11571
11572 * server.c (gdb_read_memory): Change return semantics to allow
11573 partial transfers.
11574 (handle_search_memory_1): Adjust.
11575 (process_serial_event) <'m' packet>: Handle partial transfers.
11576 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11577
1c79eb8a
PA
115782011-01-28 Pedro Alves <pedro@codesourcery.com>
11579
11580 * regcache.c (init_register_cache): Initialize
11581 regcache->register_status.
11582 (free_register_cache): Release regcache->register_status.
11583 (regcache_cpy): Copy register_status.
11584 (registers_to_string): Print 'x's for unavailable registers.
11585 (supply_register): Mark the register's status valid or
11586 unavailable, depending on whether a buffer was passed in or not.
11587 (supply_register_zeroed): New.
11588 (supply_regblock): Mark the registers' status valid or
11589 unavailable, depending on whether a buffer was passed in or not.
11590 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11591 (struct regcache): New `register_status' field.
11592 (supply_register_zeroed): Declare.
11593 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11594 supply_register_zeroed, rather than passing a NULL buffer to
11595 supply_register.
11596 * tracepoint.c (fetch_traceframe_registers): Update comment.
11597
85724a0e
PA
115982011-01-28 Pedro Alves <pedro@codesourcery.com>
11599
11600 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11601 buffer explicit.
11602
d08aafef
PA
116032011-01-25 Pedro Alves <pedro@codesourcery.com>
11604
11605 * server.h (decode_xfer_write): Change prototype.
11606 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11607 and don't extract the annex here.
11608 * server.c (decode_xfer_read): Remove `annex' parameter,
11609 and don't extract the annex here.
11610 (decode_xfer): New.
11611 (struct qxfer): New.
11612 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11613 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11614 (handle_qxfer_statictrace): New functions, abstracted out from
11615 handle_query, and made to use the struct qxfer interface.
11616 (handle_threads_qxfer_proper): Rename to ...
11617 (handle_qxfer_threads_proper): ... this.
11618 (handle_threads_qxfer): Rename to ...
11619 (handle_qxfer_threads): ... this. Adjust.
11620 (qxfer_packets): New array.
11621 (handle_qxfer): New function.
11622 (handle_query): Use handle_qxfer.
11623
493e2a69
MS
116242011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11625
11626 * gdbreplay.c: Shorten lines of >= 80 columns.
11627 * linux-low.c: Ditto.
11628 * linux-ppc-low.c: Ditto.
11629 * linux-s390-low.c: Ditto.
11630 * linux-sparc-low.c: Ditto.
11631 * linux-x86-low.c: Ditto.
11632 * linux-xtensa-low.c: Ditto.
11633 * mem-break.c: Ditto.
11634 * nto-low.c: Ditto.
11635 * regcache.h: Ditto.
11636 * remote-utils.c: Ditto.
11637 * server.c: Ditto.
11638 * server.h: Ditto.
11639 * thread-db.c: Ditto.
11640 * tracepoint.c: Ditto.
11641 * utils.c: Ditto.
11642 * win32-low.h: Ditto.
11643
44944448
JB
116442011-01-05 Joel Brobecker <brobecker@adacore.com>
11645
11646 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11647 update.
11648
71ce852c
JB
116492011-01-01 Joel Brobecker <brobecker@adacore.com>
11650
11651 * server.c (gdbserver_version): Update copyright year in version
11652 output.
11653 * gdbreplay.c (gdbreplay_version): Ditto.
11654
eb826dc6
MF
116552010-12-29 Jie Zhang <jie.zhang@analog.com>
11656
11657 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11658 * linux-bfin-low.c: New file.
11659 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11660 PT_DATA_ADDR for BFIN targets.
11661 * Makefile.in (SFILES): Add linux-bfin-low.c.
11662 (clean): Remove reg-bfin.c.
11663 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11664 * README: Mention supported Blackfin targets.
11665
39ab222a
MF
116662010-12-23 Mike Frysinger <vapier@gentoo.org>
11667
11668 * .gitignore: New file.
11669
a1f2ce7d
MF
116702010-11-16 Mike Frysinger <vapier@gentoo.org>
11671
11672 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11673
f474844c
JZ
116742010-10-22 Jie Zhang <jie@codesourcery.com>
11675
11676 * Makefile.in: Add FLAGS_TO_PASS variable.
11677 (install): Remove dependency of install-only and recursively
11678 invoke make for install-only.
11679
f1048712
DE
116802010-10-04 Doug Evans <dje@google.com>
11681
11682 * Makefile.in (uninstall): Use $(DESTDIR).
11683
b53a1623
PA
116842010-09-24 Pedro Alves <pedro@codesourcery.com>
11685
e6ee044d
PA
11686 PR gdb/11842
11687
b53a1623
PA
11688 * linux-x86-low.c (compat_siginfo_from_siginfo)
11689 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11690 si_code is < 0. Check for si_code == SI_TIMER before checking for
11691 si_code < 0.
11692
fa1bd1e4
JB
116932010-09-13 Joel Brobecker <brobecker@adacore.com>
11694
11695 * lynx-i386-low.c: New file.
11696 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11697
47fac8f8
JB
116982010-09-13 Joel Brobecker <brobecker@adacore.com>
11699
11700 * lynx-low.c (ptrace_request_to_str): Remove handling for
11701 request values that have been removed in LynxOS 5.x.
11702
1adfc54d
JB
117032010-09-13 Joel Brobecker <brobecker@adacore.com>
11704
11705 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11706 <ptrace.h>
11707
c2a66c29
NS
117082010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11709
11710 * configure.ac: Add --enable-inprocess-agent option.
11711 * configure: Rebuilt.
11712
32fcada3
YQ
117132010-09-06 Yao Qi <yao@codesourcery.com>
11714
11715 * linux-low.c (linux_kill): Remove unused variable.
11716 (linux_stabilize_threads): Likewise.
11717 * server.c (start_inferior): Likewise.
11718 (queue_stop_reply_callback): Likewise.
11719 * tracepoint.c (do_action_at_tracepoint): Likewise.
11720
0cccb683
YQ
117212010-09-06 Yao Qi <yao@codesourcery.com>
11722
11723 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11724 on return.
11725
423ec54c
JK
117262010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11727
11728 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11729
12ac6819
PA
117302010-09-06 Pedro Alves <pedro@codesourcery.com>
11731
11732 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11733 "$(IPA_DEPFILES)".
11734
8ed54b31
JB
117352010-09-01 Joel Brobecker <brobecker@adacore.com>
11736
11737 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11738 gdbserver/lynx-ppc-low.c: New files.
11739 * Makefile.in (lynx_low_h): New variable.
11740 (lynx-low.o, lynx-ppc-low.o): New rules.
11741 * configure.ac: On LynxOS, link with -lnetinet.
11742 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11743 * configure: regenerate.
11744
bb0116a4
JB
117452010-09-01 Joel Brobecker <brobecker@adacore.com>
11746
11747 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11748 * configure.ac: Add check for vasprintf and vsnprintf.
11749 * configure, config.in: Regenerate.
11750 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11751
a778ab81 117522010-09-01 Joel Brobecker <brobecker@adacore.com>
11753
11754 * gdbreplay.c: Move include of alloca.h up, next to include of
11755 malloc.h.
11756 * server.h: Add include of malloc.h.
11757 * mem-break.c: Remove include of malloc.h.
11758 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11759
8b034a19 117602010-09-01 Joel Brobecker <brobecker@adacore.com>
11761
11762 * Makefile.in (memmem.o): Build with -Wno-error.
11763
117642010-09-01 Joel Brobecker <brobecker@adacore.com>
11765
11766 * utils.c (xsnprintf): Make non-static.
11767 * server.h: Add xsnprintf declaration.
11768 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11769 replace calls to snprintf by calls to xsnprintf throughout.
11770
117712010-09-01 Joel Brobecker <brobecker@adacore.com>
11772
11773 * configure.ac: Add configure check for alloca.
11774 * configure, config.in: Regenerate.
11775 * server.h: Include alloca.h if it exists.
11776 * gdbreplay.c: Include alloca.h if it exists.
11777
1a981360
PA
117782010-08-28 Pedro Alves <pedro@codesourcery.com>
11779
11780 * linux-low.c (__SIGRTMIN): Define if not already defined.
11781 (linux_create_inferior): Check for __ANDROID__ rather than
11782 __SIGRTMIN.
11783 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11784 are already deferred.
11785 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11786 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11787 stopped and already has a pending signal to report.
11788 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11789 a pending signal to report or is moving out of a jump pad.
11790 (linux_init_signals): Check for __ANDROID__ rather than
11791 __SIGRTMIN.
11792
b4d51a55
PA
117932010-08-28 Pedro Alves <pedro@codesourcery.com>
11794
11795 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11796 debug_threads check. Avoid a linear search when not doing debug
11797 output.
11798
ec48365d
PA
117992010-08-27 Pedro Alves <pedro@codesourcery.com>
11800
11801 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11802 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11803 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11804 (process_event): Change local fd's type to gdb_fildes_t.
11805 (create_file_handler): Adjust prototype.
11806 (delete_file_handler): Adjust prototype.
11807 (handle_file_event): Adjust prototype. Use pfildes.
11808 (create_file_event): Adjsut prototype.
11809 * remote-utils.c (remote_desc, listen_desc): Change type to
11810 gdb_fildes_t.
11811 * server.h: New gdb_fildes_t typedef.
11812 [USE_WIN32API]: Include winsock2.h.
11813 (delete_file_handler, add_file_handler): Adjust prototypes.
11814 (pfildes): Declare.
11815 * utils.c (pfildes): New.
11816
854d88f0
PA
118172010-08-27 Pedro Alves <pedro@codesourcery.com>
11818
11819 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11820 * configure: Regenerate.
11821
0146f85b
PA
118222010-08-27 Pedro Alves <pedro@codesourcery.com>
11823
11824 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11825 (linux_done_accessing_memory): ... this.
11826 (linux_target_ops): Adjust.
11827 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11828 * nto-low.c (nto_target_ops): Adjust comment.
11829 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11830 * spu-low.c (spu_target_ops): Adjust comment.
11831 * target.h (target_ops): Rename unprepare_to_access_memory field
11832 to done_accessing_memory.
11833 (unprepare_to_access_memory): Rename to ...
11834 (done_accessing_memory): ... this.
11835
90d74c30
PA
118362010-08-26 Pedro Alves <pedro@codesourcery.com>
11837
11838 * linux-low.c (linux_prepare_to_access_memory): New.
11839 (linux_unprepare_to_access_memory): New.
11840 (linux_target_ops): Install them.
11841 * server.c (read_memory): Rename to ...
11842 (gdb_read_memory): ... this. Use
11843 prepare_to_access_memory/prepare_to_access_memory.
11844 (write_memory): Rename to ...
11845 (gdb_write_memory): ... this. Use
11846 prepare_to_access_memory/prepare_to_access_memory.
11847 (handle_search_memory_1): Adjust.
11848 (process_serial_event): Adjust.
11849 * target.h (struct target_ops): New fields
11850 prepare_to_access_memory and unprepare_to_access_memory.
11851 (prepare_to_access_memory, unprepare_to_access_memory): New.
11852 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11853 prepare_to_access_memory/prepare_to_access_memory.
11854 * nto-low.c (nto_target_ops): Adjust.
11855 * spu-low.c (spu_target_ops): Adjust.
11856 * win32-low.c (win32_target_ops): Adjust.
11857
fd467969
PA
118582010-08-26 Pedro Alves <pedro@codesourcery.com>
11859
11860 * Makefile.in (WARN_CFLAGS): Get it from configure.
11861 (WERROR_CFLAGS): New.
11862 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11863 * configure.ac: Introduce --enable-werror, which adds -Werror to
11864 the compiler command line. Enabled by default. Disable with
11865 --disable-werror. Add -Wdeclaration-after-statement
11866 Wpointer-arith and -Wformat-nonliteral to warning flags.
11867 * configure: Regenerate.
11868
331e2f5f
PA
118692010-08-26 Pedro Alves <pedro@codesourcery.com>
11870
11871 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11872
e581f2b4
PA
118732010-08-26 Pedro Alves <pedro@codesourcery.com>
11874
11875 * gdbreplay.c (remote_error): New.
11876 (gdbchar): New.
11877 (expect): Use gdbchar. Check for error reading from GDB.
11878 Clarify sync error output.
11879 (play): Check for errors writing to GDB.
11880 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11881 * remote-utils.c (getpkt): Check for errors writing to the remote
11882 descriptor.
11883
3c11dd79
PA
118842010-08-25 Pedro Alves <pedro@codesourcery.com>
11885
11886 * linux-low.c (linux_wait_1): Move non-debugging code out of
11887 `debug_threads' control.
11888
d20a8ad9
PA
118892010-08-25 Pedro Alves <pedro@codesourcery.com>
11890
11891 * linux-low.c (linux_wait_1): Don't set last_status here.
11892 * server.c (push_event, queue_stop_reply_callback): Assert we're
11893 not pushing a TARGET_WAITKIND_IGNORE event.
11894 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11895 (myresume, handle_target_event): Set the thread's last_resume_kind
11896 and last_status from the target returned status.
11897
964e4306
PA
118982010-08-25 Pedro Alves <pedro@codesourcery.com>
11899
11900 PR threads/10729
11901
11902 * linux-x86-low.c (update_debug_registers_callback): New.
11903 (i386_dr_low_set_addr): Use it.
11904 (i386_dr_low_get_addr): New.
11905 (i386_dr_low_set_control): Use update_debug_registers_callback.
11906 (i386_dr_low_get_control): New.
11907 (i386_dr_low_get_status): Adjust.
11908 * linux-low.c (linux_stop_lwp): New.
11909 * linux-low.h (linux_stop_lwp): Declare.
11910
11911 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11912 argument instead of a i386_debug_reg_state.
11913 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11914 a i386_debug_reg_state.
11915 (i386_insert_aligned_watchpoint): Adjust.
11916 (i386_remove_aligned_watchpoint): Adjust.
11917 (i386_low_stopped_data_address): Read the debug registers from the
11918 inferior instead of from the mirrors.
11919 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11920 (i386_dr_low_get_addr): Declare.
11921 (i386_dr_low_get_control): Declare.
11922 (i386_dr_low_get_status): Change prototype.
11923
11924 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11925 (i386_dr_low_get_addr): New.
11926 (i386_dr_low_get_control): New.
11927 (i386_dr_low_get_status): Adjust prototype. Return
11928 dr_status_mirror.
11929 (i386_initial_stuff): Clear dr_status_mirror and
11930 dr_control_mirror.
11931 (i386_get_thread_context): Adjust.
11932 (i386_set_thread_context): Adjust.
11933 (i386_thread_added): Adjust.
11934
5f21a75b
PA
119352010-08-24 Pedro Alves <pedro@codesourcery.com>
11936
11937 * linux-low.h (linux_thread_area): Delete declaration.
11938
3e4c1235
TS
119392010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11940
11941 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11942 after its termination.
11943
1971b033
PA
119442010-08-09 Pedro Alves <pedro@codesourcery.com>
11945
11946 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11947 (gdb_wants_all_stopped): Delete.
11948 (linux_wait_1): Don't call them.
11949 * server.c (handle_v_cont): Tag all threads as want-stopped.
11950 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11951 stopped as "client-wants-stopped".
11952
310444ac
PA
119532010-07-31 Pedro Alves <pedro@codesourcery.com>
11954
11955 * Makefile.in (signals_h): New.
11956 (server_h): Depend on it.
11957 (server.o): Don't depend on $(signals_def).
11958 (signals.o): Depend on $(signals_def).
11959
a19cae16
JK
119602010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11961
11962 * Makefile.in (signals_def): New.
11963 (server_h): Append include/gdb/signals.h and signals_def.
11964 (server.o): Append signals_def.
11965
30d50328
JK
119662010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11967
11968 * server.c (handle_target_event): Use target_signal_to_host for
11969 resume_info.sig initialization.
11970 * target.h (struct thread_resume) <sig>: New comment.
11971
5c3216e2
OS
119722010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11973
c6f46ca0
OS
11974 * server.c (handle_query): strcpy() the returned string from paddress()
11975 instead of sprintf().
5c3216e2
OS
11976 * utils.c (paddress): Return phex_nz().
11977
6bd31874
JB
119782010-07-07 Joel Brobecker <brobecker@adacore.com>
11979
11980 * server.c (handle_v_cont): Call mourn_inferior if process
11981 just exited.
11982 (myresume): Likewise.
11983
0fb4aa4b
PA
119842010-07-01 Pedro Alves <pedro@codesourcery.com>
11985
11986 Static tracepoints, and integration with UST.
11987
11988 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11989 * mem-break.c (uninsert_all_breakpoints)
11990 (reinsert_all_breakpoints): New.
11991 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11992 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11993 (gdb_agent_ust_loaded, helper_thread_id)
11994 (gdb_agent_helper_thread_id): New macros.
11995 (struct ipa_sym_addresses): Add addr_ust_loaded,
11996 addr_helper_thread_id, addr_cmd_buf.
11997 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11998 (in_process_agent_loaded_ust): New.
11999 (write_e_ust_not_loaded): New.
12000 (maybe_write_ipa_ust_not_loaded): New.
12001 (struct collect_static_trace_data_action): New.
12002 (enum tracepoint_type) <static_tracepoint>: New.
12003 (struct tracepoint) <handle>: Mention static tracepoints.
12004 (struct static_tracepoint_ctx): New.
12005 (CMD_BUF_SIZE): New.
12006 (add_tracepoint_action): Handle static tracepoint actions.
12007 (unprobe_marker_at): New.
12008 (clear_installed_tracepoints): Handle static tracepoints.
12009 (cmd_qtdp): Handle static tracepoints.
12010 (probe_marker_at): New.
12011 (cmd_qtstart): Handle static tracepoints.
12012 (response_tracepoint): Handle static tracepoints.
12013 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12014 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12015 (get_context_regcache): Handle static tracepoints.
12016 (do_action_at_tracepoint): Handle static tracepoint actions.
12017 (traceframe_find_block_type): Handle static trace data blocks.
12018 (traceframe_read_sdata): New.
12019 (download_tracepoints): Download static tracepoint actions.
12020 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12021 (GDB_PROBE_NAME): New.
12022 (ust_ops): New.
12023 (GET_UST_SYM): New.
12024 (USTF): New.
12025 (dlsym_ust): New.
12026 (ust_marker_to_static_tracepoint): New.
12027 (gdb_probe): New.
12028 (collect_ust_data_at_tracepoint): New.
12029 (gdb_ust_probe): New.
12030 (UNIX_PATH_MAX, SOCK_DIR): New.
12031 (gdb_ust_connect_sync_socket): New.
12032 (resume_thread, stop_thread): New.
12033 (run_inferior_command): New.
12034 (init_named_socket): New.
12035 (gdb_ust_socket_init): New.
12036 (cstr_to_hexstr): New.
12037 (next_st): New.
12038 (first_marker, next_marker): New.
12039 (response_ust_marker): New.
12040 (cmd_qtfstm, cmd_qtsstm): New.
12041 (unprobe_marker_at, probe_marker_at): New.
12042 (cmd_qtstmat, gdb_ust_thread): New.
12043 (gdb_ust_init): New.
12044 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12045 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12046 (ST_REGENTRY): New.
12047 (x86_64_st_collect_regmap): New.
12048 (X86_64_NUM_ST_COLLECT_GREGS): New.
12049 (AMD64_RIP_REGNUM): New.
12050 (supply_static_tracepoint_registers): New.
12051 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12052 (ST_REGENTRY): New.
12053 (i386_st_collect_regmap): New.
12054 (i386_NUM_ST_COLLECT_GREGS): New.
12055 (supply_static_tracepoint_registers): New.
12056 * server.c (handle_query): Handle qXfer:statictrace:read.
12057 <qSupported>: Report support for StaticTracepoints, and
12058 qXfer:statictrace:read features.
12059 * server.h (traceframe_read_sdata)
12060 (supply_static_tracepoint_registers): Declare.
12061 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12062 (unpack_varlen_hex): Include in IPA build.
12063 * Makefile.in (ustlibs, ustinc): New.
12064 (IPA_OBJS): Add remote-utils-ipa.o.
12065 ($(IPA_LIB)): Link -ldl and -lpthread.
12066 (UST_CFLAGS): New.
12067 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12068 * config.in, configure: Regenerate.
12069
9e4344e5
PA
120702010-06-20 Ian Lance Taylor <iant@google.com>
12071 Pedro Alves <pedro@codesourcery.com>
12072
12073 * linux-x86-low.c (always_true): Delete.
12074 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12075 trying to fool the compiler with always_true.
12076
c6beb2cb
PA
120772010-06-20 Pedro Alves <pedro@codesourcery.com>
12078
12079 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12080 conditions in gdbserver.
12081
d2ed6730
UW
120822010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12083
12084 * spu-low.c (spu_read_memory): Wrap around local store limit.
12085 (spu_write_memory): Likewise.
12086
4e29fb54
PA
120872010-06-15 Pedro Alves <pedro@codesourcery.com>
12088
12089 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12090 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12091 LONGEST uses.
12092 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12093 uses.
12094 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12095 uses with LONGEST uses.
12096
6a271cae
PA
120972010-06-14 Stan Shebs <stan@codesourcery.com>
12098 Pedro Alves <pedro@codesourcery.com>
12099
12100 Bytecode compiler.
12101
12102 * linux-x86-low.c: Include limits.h.
12103 (add_insns): New.
12104 (always_true): New.
12105 (EMIT_ASM): New.
12106 (EMIT_ASM32): New.
12107 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12108 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12109 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12110 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12111 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12112 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12113 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12114 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12115 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12116 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12117 (amd64_emit_void_call_2): New.
12118 (amd64_emit_ops): New.
12119 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12120 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12121 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12122 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12123 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12124 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12125 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12126 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12127 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12128 (i386_emit_stack_adjust, i386_emit_int_call_1)
12129 (i386_emit_void_call_2): New.
12130 (i386_emit_ops): New.
12131 (x86_emit_ops): New.
12132 (the_low_target): Install x86_emit_ops.
12133 * server.h (struct emit_ops): New.
12134 (get_raw_reg_func_addr): Declare.
12135 (current_insn_ptr, emit_error): Declare.
12136 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12137 (set_trace_state_variable_value): New defines.
12138 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12139 addr_get_trace_state_variable_value and
12140 addr_set_trace_state_variable_value.
12141 (symbol_list): New fields for get_raw_reg,
12142 get_trace_state_variable_value and set_trace_state_variable_value.
12143 (condfn): New typedef.
12144 (struct tracepoint): New field `compiled_cond'.
12145 (do_action_at_tracepoint): Clear compiled_cond.
12146 (get_trace_state_variable_value, set_trace_state_variable_value):
12147 Export in the IPA.
12148 (condition_true_at_tracepoint): If there's a compiled condition,
12149 run that.
12150 (current_insn_ptr, emit_error): New globals.
12151 (struct bytecode_address): New.
12152 (get_raw_reg_func_addr): New.
12153 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12154 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12155 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12156 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12157 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12158 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12159 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12160 (compile_tracepoint_condition, compile_bytecodes): New.
12161 * target.h (emit_ops): Forward declare.
12162 (struct target_ops): New field emit_ops.
12163 (target_emit_ops): New.
12164 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12165 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12166 * linux-low.c (linux_emit_ops): New.
12167 (linux_target_ops): Install it.
12168 * linux-low.h (struct linux_target_ops): New field emit_ops.
12169
92b72907
UW
121702010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12171
12172 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12173 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12174
fa593d66
PA
121752010-06-01 Pedro Alves <pedro@codesourcery.com>
12176 Stan Shebs <stan@codesourcery.com>
12177
12178 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12179 (all): Depend on $(extra_libraries).
12180 (install-only): Install the IPA.
12181 (IPA_OBJS, IPA_LIB): New.
12182 (clean): Remove the IPA lib.
12183 (IPAGENT_CFLAGS): New.
12184 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12185 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12186 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12187 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12188 * configure.ac: Check for atomic builtins support in the compiler.
12189 (IPA_DEPFILES, extra_libraries): Define.
12190 * configure.srv (ipa_obj): Add description.
12191 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12192 (i[34567]86-*-linux*): Set ipa_obj.
12193 (x86_64-*-linux*): Set ipa_obj.
12194 * linux-low.c (stabilizing_threads): New.
12195 (supports_fast_tracepoints): New.
12196 (linux_detach): Stabilize threads before detaching.
12197 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12198 the lwp is either not stabilizing, or is moving out of a jump pad.
12199 (linux_fast_tracepoint_collecting): New.
12200 (maybe_move_out_of_jump_pad): New.
12201 (enqueue_one_deferred_signal): New.
12202 (dequeue_one_deferred_signal): New.
12203 (linux_wait_for_event_1): If moving out of a jump pad, defer
12204 pending signals to later.
12205 (linux_stabilize_threads): New.
12206 (linux_wait_1): Check if threads need moving out of jump pads, and
12207 do it if so.
12208 (stuck_in_jump_pad_callback): New.
12209 (move_out_of_jump_pad_callback): New.
12210 (lwp_running): New.
12211 (linux_resume_one_lwp): Handle moving out of jump pads.
12212 (linux_set_resume_request): Dequeue deferred signals.
12213 (need_step_over_p): Also step over fast tracepoint jumps.
12214 (start_step_over): Also uninsert fast tracepoint jumps.
12215 (finish_step_over): Also reinsert fast tracepoint jumps.
12216 (linux_install_fast_tracepoint_jump): New.
12217 (linux_target_ops): Install linux_stabilize_threads and
12218 linux_install_fast_tracepoint_jump_pad.
12219 * linux-low.h (linux_target_ops) <get_thread_area,
12220 install_fast_tracepoint_jump_pad>: New fields.
12221 (struct lwp_info) <collecting_fast_tracepoint,
12222 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12223 (linux_get_thread_area): Declare.
12224 * linux-x86-low.c (jump_insn): New.
12225 (x86_get_thread_area): New.
12226 (append_insns): New.
12227 (push_opcode): New.
12228 (amd64_install_fast_tracepoint_jump_pad): New.
12229 (i386_install_fast_tracepoint_jump_pad): New.
12230 (x86_install_fast_tracepoint_jump_pad): New.
12231 (the_low_target): Install x86_get_thread_area and
12232 x86_install_fast_tracepoint_jump_pad.
12233 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12234 (struct fast_tracepoint_jump): New.
12235 (fast_tracepoint_jump_insn): New.
12236 (fast_tracepoint_jump_shadow): New.
12237 (find_fast_tracepoint_jump_at): New.
12238 (fast_tracepoint_jump_here): New.
12239 (delete_fast_tracepoint_jump): New.
12240 (set_fast_tracepoint_jump): New.
12241 (uninsert_fast_tracepoint_jumps_at): New.
12242 (reinsert_fast_tracepoint_jumps_at): New.
12243 (set_breakpoint_at): Use write_inferior_memory.
12244 (uninsert_raw_breakpoint): Use write_inferior_memory.
12245 (check_mem_read): Mask out fast tracepoint jumps.
12246 (check_mem_write): Mask out fast tracepoint jumps.
12247 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12248 (set_fast_tracepoint_jump): Declare.
12249 (delete_fast_tracepoint_jump)
12250 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12251 (reinsert_fast_tracepoint_jumps_at): Declare.
12252 * regcache.c: Don't compile many functions when building the
12253 in-process agent library.
12254 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12255 the register buffer in the heap.
12256 (free_register_cache): If the register buffer isn't owned by the
12257 regcache, don't free it.
12258 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12259 pre-existing register caches.
12260 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12261 type.
12262 (convert_ascii_to_int): : Constify `from' parameter type.
12263 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12264 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12265 the needed buffer in-place.
12266 (relocate_instruction): New.
12267 * server.c (handle_query) <qSymbols>: If the target supports
12268 tracepoints, give it a chance of looking up symbols. Report
12269 support for fast tracepoints.
12270 (handle_status): Stabilize threads.
12271 (process_serial_event): Adjust.
12272 * server.h (struct fast_tracepoint_jump): Forward declare.
12273 (struct process_info) <fast_tracepoint_jumps>: New field.
12274 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12275 (decode_X_packet, decode_M_packet): Adjust.
12276 (relocate_instruction): Declare.
12277 (in_process_agent_loaded): Declare.
12278 (tracepoint_look_up_symbols): Declare.
12279 (struct fast_tpoint_collect_status): Declare.
12280 (fast_tracepoint_collecting): Declare.
12281 (force_unlock_trace_buffer): Declare.
12282 (handle_tracepoint_bkpts): Declare.
12283 (initialize_low_tracepoint)
12284 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12285 * target.h (struct target_ops) <stabilize_threads,
12286 install_fast_tracepoint_jump_pad>: New fields.
12287 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12288 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12289 [HAVE_STDINT_H]: Include stdint.h.
12290 (trace_debug_1): Rename to ...
12291 (trace_vdebug): ... this.
12292 (trace_debug): Rename to ...
12293 (trace_debug_1): ... this. Add `level' parameter.
12294 (trace_debug): New.
12295 (ATTR_USED, ATTR_NOINLINE): New.
12296 (IP_AGENT_EXPORT): New.
12297 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12298 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12299 (about_to_request_buffer_space, trace_buffer_is_full)
12300 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12301 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12302 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12303 (traceframe_write_count, traceframes_created)
12304 (trace_state_variables)
12305 New renaming defines.
12306 (struct ipa_sym_addresses): New.
12307 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12308 (symbol_list): New.
12309 (ipa_sym_addrs): New.
12310 (all_tracepoint_symbols_looked_up): New.
12311 (in_process_agent_loaded): New.
12312 (write_e_ipa_not_loaded): New.
12313 (maybe_write_ipa_not_loaded): New.
12314 (tracepoint_look_up_symbols): New.
12315 (debug_threads) [IN_PROCESS_AGENT]: New.
12316 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12317 (UNKNOWN_SIDE_EFFECTS): New.
12318 (stop_tracing): New.
12319 (flush_trace_buffer): New.
12320 (stop_tracing_bkpt): New.
12321 (flush_trace_buffer_bkpt): New.
12322 (read_inferior_integer): New.
12323 (read_inferior_uinteger): New.
12324 (read_inferior_data_pointer): New.
12325 (write_inferior_data_pointer): New.
12326 (write_inferior_integer): New.
12327 (write_inferior_uinteger): New.
12328 (struct collect_static_trace_data_action): Delete.
12329 (enum tracepoint_type): New.
12330 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12331 <actions_str, step_actions, step_actions_str>: Only include in
12332 GDBserver.
fa593d66
PA
12333 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12334 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12335 (tracepoints): Use IP_AGENT_EXPORT.
12336 (last_tracepoint): Don't include in the IPA.
12337 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12338 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12339 (alloced_trace_state_variables): New.
12340 (trace_state_variables): Use IP_AGENT_EXPORT.
12341 (traceframe_t): Delete unused variable.
12342 (circular_trace_buffer): Don't include in the IPA.
12343 (trace_buffer_start): Delete.
12344 (struct trace_buffer_control): New.
12345 (trace_buffer_free): Delete.
12346 (struct ipa_trace_buffer_control): New.
12347 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12348 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12349 New.
12350 (trace_buffer_ctrl): New.
12351 (TRACE_BUFFER_CTRL_CURR): New.
12352 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12353 Reimplement as macros.
12354 (trace_buffer_wrap): Delete.
12355 (traceframe_write_count, traceframe_read_count)
12356 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12357 (struct tracepoint_hit_ctx) <type>: New field.
12358 (struct fast_tracepoint_ctx): New.
12359 (memory_barrier): New.
12360 (cmpxchg): New.
12361 (record_tracepoint_error): Update atomically in the IPA.
12362 (clear_inferior_trace_buffer): New.
12363 (about_to_request_buffer_space): New.
12364 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12365 updating the same buffer.
12366 (add_tracepoint): Default the tracepoint's type to trap
12367 tracepoint, and orig_size to -1.
12368 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12369 internal variables.
12370 (create_trace_state_variable): New parameter `gdb'. Handle it.
12371 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12372 (cmd_qtdp): Handle fast tracepoints.
12373 (cmd_qtdv): Adjust.
12374 (max_jump_pad_size): New.
12375 (gdb_jump_pad_head): New.
12376 (get_jump_space_head): New.
12377 (claim_jump_space): New.
12378 (sort_tracepoints): New.
12379 (MAX_JUMP_SIZE): New.
12380 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12381 IPA.
12382 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12383 support. Upload fast traceframes, and delete internal IPA
12384 breakpoints.
12385 (stop_tracing_handler): New.
12386 (flush_trace_buffer_handler): New.
12387 (cmd_qtstop): Upload fast tracepoints.
12388 (response_tracepoint): Handle fast tracepoints.
12389 (tracepoint_finished_step): Upload fast traceframes. Set the
12390 tracepoint hit context's tracepoint type.
12391 (handle_tracepoint_bkpts): New.
12392 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12393 type. Add comment about fast tracepoints.
12394 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12395 non-existing action_str field.
12396 (get_context_regcache): Handle fast tracepoints.
12397 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12398 to the regcache.
12399 (fast_tracepoint_from_jump_pad_address): New.
12400 (fast_tracepoint_from_ipa_tpoint_address): New.
12401 (collecting_t): New.
12402 (force_unlock_trace_buffer): New.
12403 (fast_tracepoint_collecting): New.
12404 (collecting): New.
12405 (gdb_collect): New.
12406 (write_inferior_data_ptr): New.
12407 (target_tp_heap): New.
12408 (target_malloc): New.
12409 (download_agent_expr): New.
12410 (UALIGN): New.
12411 (download_tracepoints): New.
12412 (download_trace_state_variables): New.
12413 (upload_fast_traceframes): New.
12414 (IPA_FIRST_TRACEFRAME): New.
12415 (IPA_NEXT_TRACEFRAME_1): New.
12416 (IPA_NEXT_TRACEFRAME): New.
12417 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12418 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12419 (gdb_jump_pad_buffer_end): New.
12420 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12421 (initialize_tracepoint): Adjust.
12422 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12423 buffer. Initialize the low module.
12424 * utils.c (PREFIX, TOOLNAME): New.
12425 (malloc_failure): Use PREFIX.
12426 (error): In the IPA, an error causes an exit.
12427 (fatal, warning): Use PREFIX.
12428 (internal_error): Use TOOLNAME.
12429 (NUMCELLS): Increase to 10.
12430 * configure, config.in: Regenerate.
12431
d149dd1d
PA
124322010-06-01 Pedro Alves <pedro@codesourcery.com>
12433
12434 * server.c (handle_query) <qSupported>: Do two passes over the
12435 qSupported string to avoid nesting strtok.
12436
f6528abd
JK
124372010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12438
12439 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12440 (CDEPS): New.
12441 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12442 -Wl,--dynamic-list.
12443 * configure: Regenerate.
12444 * proc-service.list: New.
12445
ca2a87a0
JK
124462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12447
12448 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12449 New comment.
12450
363a6e9f
OS
124512010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12452
12453 * gdbreplay.c (remote_open): Check error return from socket() call by
12454 its equality to -1 not by it being negative.
12455 * remote-utils.c (remote_open): Likewise.
12456
d23b6cb1
PA
124572010-05-23 Pedro Alves <pedro@codesourcery.com>
12458
12459 * config.h: Regenerate.
12460
28d3cf85
MK
124612010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12462
12463 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12464 doesn't provide PTRACE_GET_THREAD_AREA.
12465
fea36a59
MK
124662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12467
12468 * linux-m68k-low.c: Include <asm/ptrace.h>
12469 (ps_get_thread_area): Implement.
12470
24b066ba
DE
124712010-05-03 Doug Evans <dje@google.com>
12472
12473 * event-loop.c (struct callback_event): New struct.
12474 (callback_list): New global.
12475 (append_callback_event, delete_callback_event): New functions.
12476 (process_callback): New function.
12477 (start_event_loop): Call it.
12478 * remote-utils.c (NOT_SCHEDULED): Define.
12479 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12480 moved out of readchar.
12481 (readchar): Rewrite. Call reschedule before returning.
12482 (reset_readchar): New function.
12483 (remote_close): Call it.
12484 (process_remaining, reschedule): New functions.
12485 * server.h (callback_handler_func): New typedef.
12486 (append_callback_event, delete_callback_event): Declare.
12487
9836d6ea
PA
124882010-05-03 Pedro Alves <pedro@codesourcery.com>
12489
12490 * proc-service.c (ps_pglobal_lookup): Use
12491 thread_db_look_up_one_symbol.
12492 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12493 parameter. Use it instead of all_symbols_looked_up.
12494 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12495 field.
12496 (all_symbols_looked_up): Don't declare.
12497 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12498 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12499 field.
12500 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12501 Set all_symbols_looked_up here.
12502 (thread_db_look_up_one_symbol): New.
12503 (thread_db_get_tls_address): Adjust.
12504 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12505 thread_db object on the heap, and tentatively set it in the
12506 process structure.
12507 (thread_db_init): Don't set all_symbols_looked_up here.
12508 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12509
7984d532
PA
125102010-05-03 Pedro Alves <pedro@codesourcery.com>
12511
12512 * linux-low.c (linux_kill, linux_detach): Adjust.
12513 (status_pending_p_callback): Remove redundant statement. Check
12514 for !TARGET_WAITIKIND_IGNORE, instead of
12515 TARGET_WAITKIND_STOPPED.
12516 (handle_tracepoints): Make sure LWP is locked. Adjust.
12517 (linux_wait_for_event_1): Adjust.
12518 (linux_cancel_breakpoints): New.
12519 (unsuspend_one_lwp): New.
12520 (unsuspend_all_lwps): New.
12521 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12522 (send_sigstop_callback): Change return type to int, add new
12523 `except' parameter and handle it.
12524 (suspend_and_send_sigstop_callback): New.
12525 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12526 pass them down. If SUSPEND, also increment the lwp's suspend
12527 count.
12528 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12529 (need_step_over_p): Don't consider suspended LWPs.
12530 (start_step_over): Adjust.
12531 (proceed_one_lwp): Change return type to int, add new `except'
12532 parameter and handle it.
12533 (unsuspend_and_proceed_one_lwp): New.
12534 (proceed_all_lwps): Use find_inferior instead of
12535 for_each_inferior.
12536 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12537 also decrement the suspend count of LWPs. Pass `except' down,
12538 instead of hacking its suspend count.
12539 (linux_pause_all): Add `freeze' parameter. Adjust.
12540 (linux_unpause_all): New.
12541 (linux_target_ops): Install linux_unpause_all.
12542 * server.c (handle_status): Adjust.
12543 * target.h (struct target_ops): New fields `unpause_all' and
12544 `cancel_breakpoints'. Add new parameter to `pause_all'.
12545 (pause_all): Add new `freeze' parameter.
12546 (unpause_all): New.
12547 (cancel_breakpoints): New.
12548 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12549 cancel breakpoints.
12550 (cmd_qtstart): Pause threads.
12551 (stop_tracing): Pause threads, and cancel breakpoints.
12552 * win32-low.c (win32_target_ops): Adjust.
12553
e471f25b
PA
125542010-05-03 Pedro Alves <pedro@codesourcery.com>
12555
12556 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12557 the inferior right away from here...
12558 (linux_wait_1): ... to here, and adjust to check the thread's
12559 last_resume_kind instead of the lwp's step or stop_expected flags.
12560
1915ef4f
PA
125612010-05-02 Pedro Alves <pedro@codesourcery.com>
12562
12563 * README: Use consistent `GDB' and `GDBserver' spellings.
12564
f9e39928
PA
125652010-05-02 Pedro Alves <pedro@codesourcery.com>
12566
12567 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12568 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12569 (linux_detach_one_lwp): Assume the lwp is stopped.
12570 (any_thread_of): Delete.
12571 (linux_detach): Stop all lwps here. Don't blindly delete all
12572 breakpoints.
12573 (delete_lwp_callback): New.
12574 (linux_mourn): Delete all lwps of the process that is gone.
12575 (linux_wait_1): Don't delete the last lwp of the process here.
12576 * mem-break.h (mark_breakpoints_out): Declare.
12577 * mem-break.c (mark_breakpoints_out): New.
12578 (free_all_breakpoints): Use it.
12579 * server.c (handle_target_event): If the process is gone, mark
12580 breakpoints out.
12581 * thread-db.c (struct thread_db) <create_bp>: New field.
12582 (thread_db_enable_reporting): Fix prototype. Store a thread event
12583 breakpoint reference in the thread_db struct.
12584 (thread_db_load_search): Clear the thread_db object.
12585 (try_thread_db_load_1): Ditto.
12586 (switch_to_process): New.
12587 (disable_thread_event_reporting): Use it.
12588 (remove_thread_event_breakpoints): New.
12589 (thread_db_detach, thread_db_mourn): Use it.
12590
1e7fc18c
PA
125912010-05-01 Pedro Alves <pedro@codesourcery.com>
12592
12593 * linux-low.c (linux_enable_event_reporting): New.
12594 (linux_wait_for_event_1, handle_extended_wait): Use it.
12595
02fc4de7
PA
125962010-04-30 Pedro Alves <pedro@codesourcery.com>
12597
12598 * linux-low.c (linux_kill_one_lwp, linux_kill)
12599 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12600 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12601 SIGSTOP even if the LWP is stopped.
12602 (send_sigstop_callback): New.
12603 (stop_all_lwps): Use send_sigstop_callback instead.
12604 (linux_resume_one_thread): Adjust.
12605 (proceed_one_lwp): Still proceed an LWP that the client has
12606 requested to stop, if we haven't reported it as stopped yet. Make
12607 sure that LWPs the client want stopped, have a pending SIGSTOP.
12608
bc3b5632
DE
126092010-04-26 Doug Evans <dje@google.com>
12610
ae1ada35
DE
12611 * server.c (handle_general_set): Make static.
12612
bc3b5632
DE
12613 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12614 Print received char after testing for error/eof instead of before.
12615 (input_interrupt): Tweak comment.
12616
65730243
DE
126172010-04-23 Doug Evans <dje@google.com>
12618
12619 * server.c (start_inferior): Print inferior argv if --debug.
12620
a8ae7dc0
AR
126212010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12622
12623 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12624 * nto-x86-low.c: Include server.h
12625
1c07cc19
PM
126262010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12627
12628 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12629 be consistent with other sources of this directory.
12630 (init_registers_amd64): Correct name of source file of this function
12631 in the comment.
12632
e0a61e09
PM
126332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12634
12635 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12636 64-bit executables.
12637
54709339
PM
126382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12639
12640 * win32-i386-low.c: Add 64-bit support.
12641 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12642 (init_registers_amd64): Declare.
12643 (mappings): Add 64-bit version of array.
12644 (init_windows_x86): New function.
12645 (the_low_target): Change init_arch field to init_windows_x86.
12646
e8f0053d
PM
126472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12648
12649 * win32-low.c: Adapt to support also 64-bit architecture.
12650 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12651 (get_image_name): Use SIZE_T type for local variable `done'.
12652 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12653 (toolhelp_get_dll_name): Idem.
12654 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12655 Use uintptr_t typecast to avoid warning.
12656 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12657 (handle_exception): Use phex_nz to avoid warning.
12658 (win32_wait): Remove unused local variable `process'.
12659
c481e77e
PM
126602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12661
12662 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12663 `amd64-avx.o'.
12664
12ea4b69
PM
126652010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12666
12667 * configure.ac: Use `ws2_32' library for srv_mingw.
12668 * configure: Regenerate.
12669 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12670 * remote-utils.c: Likewise.
12671
f6d1620c
L
126722010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12673
12674 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12675 if __x86_64__ is defined.
12676
8e642873
PM
126772010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12678
12679 * configure: Regenerate.
12680
711e434b
PM
126812010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12682
12683 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12684 * target.h (target_ops): New get_tib_address field.
12685 * win32-low.h (win32_thread_info): Add thread_local_base field.
12686 * win32-low.c (child_add_thread): Add tlb argument.
12687 Set thread_local_base field to TLB.
12688 (get_child_debug_event): Adapt to child_add_thread change.
12689 (win32_get_tib_address): New function.
12690 (win32_target_ops): Set get_tib_address field to
12691 win32_get_tib_address.
12692 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12693
505106cd
PA
126942010-04-12 Pedro Alves <pedro@codesourcery.com>
12695
505106cd
PA
12696 * linux-low.c (linux_mourn): Also remove the process.
12697 * server.c (handle_target_event): Don't remove the process here.
12698 * nto-low.c (nto_mourn): New.
12699 (nto_target_ops): Install it.
12700 * spu-low.c (spu_mourn): New.
12701 (spu_target_ops): Install it.
12702 * win32-low.c (win32_mourn): New.
12703 (win32_target_ops): Install it.
12704
e8470a06
PA
127052010-04-12 Pedro Alves <pedro@codesourcery.com>
12706
12707 * server.h (buffer_xml_printf): Remove redundant `;'.
12708
45ba0d02
PA
127092010-04-12 Pedro Alves <pedro@codesourcery.com>
12710
12711 * regcache.c (set_register_cache): Invalidate regcaches before
12712 changing the register cache layout.
12713 (regcache_invalidate_one): Allow a NULL regcache.
12714 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12715 regcaches before changing the register cache layout or the target
12716 regsets.
12717
59e04013
L
127182010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12719
12720 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12721 variable warning on Linux/x86-64.
12722
8336d594
PA
127232010-04-11 Pedro Alves <pedro@codesourcery.com>
12724
12725 GDBserver disconnected tracing support.
12726
12727 * linux-low.c (linux_remove_process): Delete.
12728 (add_lwp): Don't set last_resume_kind here.
12729 (linux_kill): Use `mourn'.
12730 (linux_detach): Use `thread_db_detach', and `mourn'.
12731 (linux_mourn): New.
12732 (linux_attach_lwp_1): Adjust comment.
12733 (linux_attach): last_resume_kind moved the thread_info; adjust.
12734 (status_pending_p_callback): Adjust.
12735 (linux_wait_for_event_1): Adjust.
12736 (count_events_callback, select_singlestep_lwp_callback)
12737 (select_event_lwp_callback, cancel_breakpoints_callback)
12738 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12739 (proceed_one_lwp): Adjust.
12740 (linux_async): Add debug output.
12741 (linux_thread_stopped): New.
12742 (linux_pause_all): New.
12743 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12744 linux_pause_all.
12745 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12746 (thread_db_free): Delete declaration.
12747 (thread_db_detach, thread_db_mourn): Declare.
12748 * thread-db.c (thread_db_init): Use thread_db_mourn.
12749 (thread_db_free): Delete, split in two.
12750 (disable_thread_event_reporting): New.
12751 (thread_db_detach): New.
12752 (thread_db_mourn): New.
12753
12754 * server.h (struct thread_info) <last_resume_kind>: New field.
12755 <attached>: Add comment.
12756 <gdb_detached>: New field.
12757 (handler_func): Change return type to int.
12758 (handle_serial_event, handle_target_event): Ditto.
12759 (gdb_connected): Declare.
12760 (tracing): Delete.
12761 (disconnected_tracing): Declare.
12762 (stop_tracing): Declare.
12763
12764 * server.c (handle_query) <qSupported>: Report support for
12765 disconnected tracing.
12766 (queue_stop_reply_callback): Account for running threads.
12767 (gdb_wants_thread_stopped): New.
12768 (gdb_wants_all_threads_stopped): New.
12769 (gdb_reattached_process): New.
12770 (handle_status): Clear the `gdb_detached' flag of all processes.
12771 In all-stop, stop all threads.
12772 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12773 (process_serial_event): If the remote connection breaks, or if an
12774 exit was forced with "monitor exit", force an event loop exit.
12775 Handle disconnected tracing on detach.
12776 (handle_serial_event): Adjust.
12777 (handle_target_event): If GDB isn't connected, forward events back
12778 to the inferior, unless the last process exited, in which case,
12779 exit gdbserver. Adjust interface.
12780
12781 * remote-utils.c (remote_open): Don't block in accept. Instead
12782 register an event loop source on the listen socket file
12783 descriptor. Refactor bits into ...
12784 (listen_desc): ... this new global.
12785 (gdb_connected): ... this new function.
12786 (enable_async_notification): ... this new function.
12787 (handle_accept_event): ... this new function.
12788 (remote_close): Clear remote_desc.
12789
12790 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12791
12792 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12793 New fields.
12794 (mourn_inferior): Define.
12795 (target_process_qsupported): Avoid the dangling else problem.
12796 (thread_stopped): Define.
12797 (pause_all): Define.
12798 (target_waitstatus_to_string): Declare.
12799 * target.c (target_waitstatus_to_string): New.
12800
12801 * tracepoint.c (tracing): Make extern.
12802 (disconnected_tracing): New.
12803 (stop_tracing): Make extern. Handle tracing stops due to GDB
12804 disconnecting.
12805 (cmd_qtdisconnected): New.
12806 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12807 (handle_tracepoint_general_set): Handle QTDisconnected.
12808
12809 * event-loop.c (event_handler_func): Change return type to int.
12810 (process_event): Bail out if the event handler wants the event
12811 loop to stop.
12812 (handle_file_event): Ditto.
12813 (start_event_loop): Bail out if the event handler wants the event
12814 loop to stop.
12815
12816 * nto-low.c (nto_target_ops): Adjust.
12817 * spu-low.c (spu_wait): Don't remove the process here.
12818 (spu_target_ops): Adjust.
12819 * win32-low.c (win32_wait): Don't remove the process here.
12820 (win32_target_ops): Adjust.
12821
5d267c4c
PA
128222010-04-11 Pedro Alves <pedro@codesourcery.com>
12823
12824 * regcache.c (realloc_register_cache): Invalidate inferior's
12825 regcache before recreating it.
12826
623ccd72
PA
128272010-04-09 Pedro Alves <pedro@codesourcery.com>
12828
12829 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12830
219f2f23
PA
128312010-04-09 Stan Shebs <stan@codesourcery.com>
12832 Pedro Alves <pedro@codesourcery.com>
12833
12834 * server.h (LONGEST): New.
12835 (struct thread_info) <while_stepping>: New field.
12836 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12837 Declare.
12838 (initialize_tracepoint, handle_tracepoint_general_set)
12839 (handle_tracepoint_query, tracepoint_finished_step)
12840 (tracepoint_was_hit, release_while_stepping_state_list):
12841 (current_traceframe): Declare.
12842 * server.c (handle_general_set): Handle tracepoint packets.
12843 (read_memory): New.
12844 (write_memory): New.
12845 (handle_search_memory_1): Use read_memory.
12846 (handle_query): Report support for conditional tracepoints, trace
12847 state variables, and tracepoint sources. Handle tracepoint
12848 queries.
12849 (main): Initialize the tracepoints module.
12850 (process_serial_event): Handle traceframe reads/writes.
12851
12852 * linux-low.c (handle_tracepoints): New.
12853 (linux_wait_1): Call it.
12854 (linux_resume_one_lwp): Handle while-stepping.
12855 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12856 (linux_target_ops): Install them.
12857 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12858 New field.
12859 * linux-x86-low.c (x86_supports_tracepoints): New.
12860 (the_low_target). Install it.
12861
12862 * mem-break.h (delete_breakpoint): Declare.
12863 * mem-break.c (delete_breakpoint): Make external.
12864
12865 * target.h (struct target_ops): Add `supports_tracepoints',
12866 `read_pc', and `write_pc' fields.
12867 (target_supports_tracepoints): Define.
12868 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12869 (phex_nz): New.
12870
12871 * regcache.h (struct regcache) <registers_owned>: New field.
12872 (init_register_cache, regcache_cpy): Declare.
12873 (regcache_read_pc, regcache_write_pc): Declare.
12874 (register_cache_size): Declare.
12875 (supply_regblock): Declare.
12876 * regcache.c (init_register_cache): New.
12877 (new_register_cache): Use it.
12878 (regcache_cpy): New.
12879 (register_cache_size): New.
12880 (supply_regblock): New.
12881 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12882
219f2f23
PA
12883 * tracepoint.c: New.
12884
12885 * Makefile.in (OBS): Add tracepoint.o.
12886 (tracepoint.o): New rule.
12887
3a13a53b
L
128882010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12889
12890 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12891 (i386-mmx.o): New.
12892 (i386-mmx.c): Likewise.
12893 (i386-mmx-linux.o): Likewise.
12894 (i386-mmx-linux.c): Likewise.
12895
12896 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12897 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12898 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12899 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12900
12901 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12902 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12903 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12904
1570b33e
L
129052010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12906
12907 * Makefile.in (clean): Updated.
12908 (i386-avx.o): New.
12909 (i386-avx.c): Likewise.
12910 (i386-avx-linux.o): Likewise.
12911 (i386-avx-linux.c): Likewise.
12912 (amd64-avx.o): Likewise.
12913 (amd64-avx.c): Likewise.
12914 (amd64-avx-linux.o): Likewise.
12915 (amd64-avx-linux.c): Likewise.
12916
12917 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12918 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12919 (srv_amd64_regobj): Add amd64-avx.o.
12920 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12921 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12922 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12923 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12924 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12925 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12926 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12927
12928 * i387-fp.c: Include "i386-xstate.h".
12929 (i387_xsave): New.
12930 (i387_cache_to_xsave): Likewise.
12931 (i387_xsave_to_cache): Likewise.
12932 (x86_xcr0): Likewise.
12933
12934 * i387-fp.h (i387_cache_to_xsave): Likewise.
12935 (i387_xsave_to_cache): Likewise.
12936 (x86_xcr0): Likewise.
12937
12938 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12939 * linux-crisv32-low.c (target_regsets): Likewise.
12940 * linux-m68k-low.c (target_regsets): Likewise.
12941 * linux-mips-low.c (target_regsets): Likewise.
12942 * linux-ppc-low.c (target_regsets): Likewise.
12943 * linux-s390-low.c (target_regsets): Likewise.
12944 * linux-sh-low.c (target_regsets): Likewise.
12945 * linux-sparc-low.c (target_regsets): Likewise.
12946 * linux-xtensa-low.c (target_regsets): Likewise.
12947
12948 * linux-low.c: Include <sys/uio.h>.
12949 (regsets_fetch_inferior_registers): Support nt_type.
12950 (regsets_store_inferior_registers): Likewise.
12951 (linux_process_qsupported): New.
12952 (linux_target_ops): Add linux_process_qsupported.
12953
12954 * linux-low.h (regset_info): Add nt_type.
12955 (linux_target_ops): Add process_qsupported.
12956
12957 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12958 and <sys/uio.h>.
12959 (init_registers_i386_avx_linux): New.
12960 (init_registers_amd64_avx_linux): Likewise.
12961 (xmltarget_i386_linux_no_xml): Likewise.
12962 (xmltarget_amd64_linux_no_xml): Likewise.
12963 (PTRACE_GETREGSET): Likewise.
12964 (PTRACE_SETREGSET): Likewise.
12965 (x86_fill_xstateregset): Likewise.
12966 (x86_store_xstateregset): Likewise.
12967 (use_xml): Likewise.
12968 (x86_linux_update_xmltarget): Likewise.
12969 (x86_linux_process_qsupported): Likewise.
12970 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12971 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12972 init_registers_i386_linux here. Call
12973 x86_linux_update_xmltarget.
12974 (the_low_target): Add x86_linux_process_qsupported.
12975
12976 * server.c (handle_query): Call target_process_qsupported.
12977
12978 * target.h (target_ops): Add process_qsupported.
12979 (target_process_qsupported): New.
12980
fc7238bb
PA
129812010-04-03 Pedro Alves <pedro@codesourcery.com>
12982
12983 * inferiors.c (add_thread): Set last_status kind to
12984 TARGET_WAITKIND_IGNORE.
12985 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12986 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12987 (linux_wait_1): Move `thread' local definition to block that uses
12988 it. Don't NULL initialize `event_child'.
12989 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12990 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12991 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12992
bdabb078
PA
129932010-04-01 Pedro Alves <pedro@codesourcery.com>
12994
12995 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12996 an extended waitstatus, or by a watchpoint.
12997 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12998 thread was stepping or has been stopped by a watchpoint.
12999
d3bbe7a0
PA
130002010-04-01 Pedro Alves <pedro@codesourcery.com>
13001
13002 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13003 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13004 of another, then delete the previous, and validate all
13005 breakpoints.
13006 (validate_inserted_breakpoint): New.
13007 (delete_disabled_breakpoints): New.
13008 (validate_breakpoints): New.
13009 (check_mem_read): Validate breakpoints before trusting their
13010 shadow. Delete disabled breakpoints.
13011 (check_mem_write): Validate breakpoints before trusting they
13012 should be inserted. Delete disabled breakpoints.
13013 * mem-break.h (validate_breakpoints):
13014 * server.c (handle_query): Validate breakpoints when we see a
13015 qSymbol query.
13016
8b07ae33
PA
130172010-04-01 Pedro Alves <pedro@codesourcery.com>
13018
13019 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13020 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13021 if we could tell there's a GDB breakpoint at stop_pc.
13022 (need_step_over_p): Don't do a step over if we find a GDB
13023 breakpoint at the resume PC.
13024
13025 * mem-break.c (struct raw_breakpoint): New.
13026 (enum bkpt_type): New type `gdb_breakpoint'.
13027 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13028 fields. New field `raw'.
13029 (find_raw_breakpoint_at): New.
13030 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13031 breakpoint instead.
13032 (set_breakpoint_at): Adjust.
13033 (delete_raw_breakpoint): New.
13034 (release_breakpoint): New.
13035 (delete_breakpoint): Rename to...
13036 (delete_breakpoint_1): ... this. Add proc parameter. Use
13037 release_breakpoint. Return ENOENT.
13038 (delete_breakpoint): Reimplement.
13039 (find_breakpoint_at): Delete.
13040 (find_gdb_breakpoint_at): New.
13041 (delete_breakpoint_at): Delete.
13042 (set_gdb_breakpoint_at): New.
13043 (delete_gdb_breakpoint_at): New.
13044 (gdb_breakpoint_here): New.
13045 (set_reinsert_breakpoint): Use release_breakpoint.
13046 (uninsert_breakpoint): Rename to ...
13047 (uninsert_raw_breakpoint): ... this.
13048 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13049 (reinsert_raw_breakpoint): Change parameter type to
13050 raw_breakpoint.
13051 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13052 instead.
13053 (check_breakpoints): Adjust. Use release_breakpoint.
13054 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13055 (breakpoint_inserted_here): Ditto.
13056 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13057 Don't trust the breakpoint's shadow if it is not inserted.
13058 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13059 (delete_all_breakpoints): Adjust.
13060 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13061 use delete_breakpoint_1.
13062
13063 * mem-break.h (breakpoints_supported): Delete declaration.
13064 (set_gdb_breakpoint_at): Declare.
13065 (gdb_breakpoint_here): Declare.
13066 (delete_breakpoint_at): Delete.
13067 (delete_gdb_breakpoint_at): Declare.
13068
13069 * server.h (struct raw_breakpoint): Forward declare.
13070 (struct process_info): New field `raw_breakpoints'.
13071
13072 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13073 breakpoints.
13074
6bf5e0ba
PA
130752010-03-24 Pedro Alves <pedro@codesourcery.com>
13076
13077 * linux-low.c (status_pending_p_callback): Fix comment.
13078 (linux_wait_for_event_1): Move most of the internal breakpoint
13079 handling from here...
13080 (linux_wait_1): ... to here.
13081 (count_events_callback): New.
13082 (select_singlestep_lwp_callback): New.
13083 (select_event_lwp_callback): New.
13084 (cancel_breakpoints_callback): New.
13085 (select_event_lwp): New.
13086 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13087 priority to all LWPs that have had events that should be reported
13088 to the client. Cancel breakpoints when about to reporting the
13089 event to the client, not while stopping lwps. No longer cancel
13090 finished single-steps here.
13091 (cancel_finished_single_step): Delete.
13092 (cancel_finished_single_steps): Delete.
13093
414a389f
PA
130942010-03-24 Pedro Alves <pedro@codesourcery.com>
13095
13096 * mem-break.c (enum bkpt_type): New.
13097 (struct breakpoint): New field `type'.
13098 (set_breakpoint_at): Change return type to struct breakpoint
13099 pointer. Set type to `other_breakpoint' by default.
13100 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13101 in the breakpoint list.
13102 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13103 (reinsert_breakpoint): Rename to ...
13104 (reinsert_raw_breakpoint): ... this.
13105 (reinsert_breakpoints_at): Adjust.
13106 * mem-break.h (struct breakpoint): Declare.
13107 (set_breakpoint_at): Change return type to struct breakpoint
13108 pointer.
13109
2280c721
PA
131102010-03-24 Pedro Alves <pedro@codesourcery.com>
13111
13112 * server.c (handle_query): Assign, not compare.
13113
d50171e4
PA
131142010-03-24 Pedro Alves <pedro@codesourcery.com>
13115
13116 Teach linux gdbserver to step-over-breakpoints.
13117
13118 * linux-low.c (can_hardware_single_step): New.
13119 (supports_breakpoints): New.
13120 (handle_extended_wait): If stopping threads, read the stop pc of
13121 the new cloned LWP.
13122 (get_pc): New.
13123 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13124 low target doesn't support retrieving the PC.
13125 (add_lwp): Set last_resume_kind to resume_continue.
13126 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13127 (linux_attach): Don't clear stop_expected. Set the lwp's
13128 last_resume_kind to resume_stop.
13129 (linux_detach_one_lwp): Don't check for removed breakpoints.
13130 (check_removed_breakpoint): Delete.
13131 (status_pending_p): Rename to ...
13132 (status_pending_p_callback): ... this. Don't check for removed
13133 breakpoints. Don't consider threads that are stopped from GDB's
13134 perspective.
13135 (linux_wait_for_lwp): Always read the stop_pc here.
13136 (cancel_breakpoint): New.
13137 (step_over_bkpt): New global.
13138 (linux_wait_for_event_1): Implement stepping over breakpoints.
13139 (gdb_wants_lwp_stopped): New.
13140 (gdb_wants_all_stopped): New.
13141 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13142 single-step traps here. Store the thread's last reported target
13143 wait status.
13144 (send_sigstop): Don't clear stop_expected. Always set it,
13145 instead.
13146 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13147 (cancel_finished_single_step): New.
13148 (cancel_finished_single_steps): New.
13149 (wait_for_sigstop): Don't cancel finished single-step traps here.
13150 (linux_resume_one_lwp): Don't check for removed breakpoints.
13151 Don't set `step' on non-hardware step archs.
13152 (linux_set_resume_request): Ignore resume_stop requests if already
13153 stopping or stopped. Set the lwp's last_resume_kind.
13154 (resume_status_pending_p): Don't check for removed breakpoints.
13155 (need_step_over_p): New.
13156 (start_step_over): New.
13157 (finish_step_over): New.
13158 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13159 requests. Clear the thread's last reported target waitstatus.
13160 Don't use the `suspended' flag. Don't consider pending breakpoints.
13161 (linux_resume): Start a step-over if necessary.
13162 (proceed_one_lwp): New.
13163 (proceed_all_lwps): New.
13164 (unstop_all_lwps): New.
13165 * linux-low.h (struct lwp_info): Rewrite comment for the
13166 `suspended' flag. Add the `stop_pc' field. Delete the
13167 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13168 Add `'last_resume_kind' and `need_step_over' fields.
13169 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13170 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13171 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13172 (set_raw_breakpoint_at): New.
13173 (set_breakpoint_at): Rewrite to use it.
13174 (reinsert_breakpoint_handler): Delete.
13175 (set_reinsert_breakpoint): New.
13176 (reinsert_breakpoint_by_bp): Delete.
13177 (delete_reinsert_breakpoints): New.
13178 (uninsert_breakpoint): Rewrite.
13179 (uninsert_breakpoints_at): New.
13180 (reinsert_breakpoint): Rewrite.
13181 (reinsert_breakpoints_at): New.
13182 (check_breakpoints): Rewrite.
13183 (breakpoint_here): New.
13184 (breakpoint_inserted_here): New.
13185 (check_mem_read): Adjust.
13186 * mem-break.h (breakpoints_supported, breakpoint_here)
13187 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13188 (reinsert_breakpoint_by_bp): Delete declaration.
13189 (delete_reinsert_breakpoints): Declare.
13190 (reinsert_breakpoint): Delete declaration.
13191 (reinsert_breakpoints_at): Declare.
13192 (uninsert_breakpoint): Delete declaration.
13193 (uninsert_breakpoints_at): Declare.
13194 (check_breakpoints): Adjust prototype.
13195 * server.h: Adjust include order.
13196 (struct thread_info): Declare here. Add a `last_status' field.
13197
30ba68cb
MS
131982010-03-23 Michael Snyder <msnyder@vmware.com>
13199
13200 * server.c (crc32): New function.
13201 (handle_query): Add handling for 'qCRC:' request.
13202
b9a881c2
PA
132032010-03-23 Pedro Alves <pedro@codesourcery.com>
13204
13205 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13206 lwp had been stopped by a watchpoint.
13207
e92d13d5
PA
132082010-03-16 Pedro Alves <pedro@codesourcery.com>
13209
13210 * server.h (internal_error): Declare.
13211 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13212 * utils.c (internal_error): New function.
13213
64daa791
AS
132142010-03-15 Andreas Schwab <schwab@redhat.com>
13215
13216 * configure.srv: Fix typo setting srv_regobj.
13217
f52cd8cd
PA
132182010-03-15 Pedro Alves <pedro@codesourcery.com>
13219
13220 * linux-low.c (fetch_register): Avoid passing a non string literal
13221 format to `error'.
13222 (usr_store_inferior_registers): Ditto.
13223
93ae6fdc
PA
132242010-03-14 Pedro Alves <pedro@codesourcery.com>
13225
13226 * linux-low.c (linux_write_memory): Bail out early if peeking
13227 memory failed.
13228
c3adc08c
PA
132292010-03-14 Pedro Alves <pedro@codesourcery.com>
13230
13231 * linux-low.h (struct lwp_info): New fields
13232 `stopped_by_watchpoint' and `stopped_data_address'.
13233 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13234 here, and cache them in the lwp object.
13235 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13236 directly.
13237 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13238 field.
13239 (linux_stopped_by_watchpoint): Rewrite.
13240 (linux_stopped_data_address): Rewrite.
13241
bce522a2
PA
132422010-03-06 Simo Melenius <simo.melenius@iki.fi>
13243
13244 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13245 switching the current inferior, not before.
13246
90884b2b
L
132472010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13248
13249 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13250 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13251 i386-linux.c and amd64-linux.c.
13252 (reg-i386.o): Removed.
13253 (reg-i386.c): Likewise.
13254 (reg-i386-linux.o): Likewise.
13255 (reg-i386-linux.c): Likewise.
13256 (reg-x86-64.o): Likewise.
13257 (reg-x86-64.c): Likewise.
13258 (reg-x86-64-linux.o): Likewise.
13259 (reg-x86-64-linux.c): Likewise.
13260 (i386.o): New.
13261 (i386.c): Likewise.
13262 (i386-linux.o): Likewise.
13263 (i386-linux.c): Likewise.
13264 (amd64.o): Likewise.
13265 (amd64.c): Likewise.
13266 (amd64-linux.o): Likewise.
13267 (amd64-linux.c): Likewise.
13268
13269 * configure.srv (srv_i386_regobj): New.
13270 (srv_i386_linux_regobj): Likewise.
13271 (srv_amd64_regobj): Likewise.
13272 (srv_amd64_linux_regobj): Likewise.
13273 (srv_i386_32bit_xmlfiles): Likewise.
13274 (srv_i386_64bit_xmlfiles): Likewise.
13275 (srv_i386_xmlfiles): Likewise.
13276 (srv_amd64_xmlfiles): Likewise.
13277 (srv_i386_linux_xmlfiles): Likewise.
13278 (srv_amd64_linux_xmlfiles): Likewise.
13279 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13280 srv_xmlfiles to $srv_i386_xmlfiles.
13281 (i[34567]86-*-mingw32ce*): Likewise.
13282 (i[34567]86-*-mingw*): Likewise.
13283 (i[34567]86-*-nto*): Likewise.
13284 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13285 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13286 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13287 (x86_64-*-linux*): Likewise.
13288
13289 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13290 (init_registers_amd64_linux): New.
13291 (x86_arch_setup): Replace init_registers_x86_64_linux with
13292 init_registers_amd64_linux.
13293
193f13e6
MK
132942010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13295
13296 * configure.ac: Check for libdl. If it is not available link against
13297 static libthread_db.
13298 * configure: Regenerate.
13299
85d721b8
PA
133002010-02-22 Pedro Alves <pedro@codesourcery.com>
13301
13302 PR9605
13303
13304 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13305 handing a read watchpoint.
13306 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13307
6076632b
DE
133082010-02-12 Doug Evans <dje@google.com>
13309
13310 * linux-low.c (linux_supports_tracefork_flag): Document.
13311 (linux_look_up_symbols): Add comment.
13312
3327ccf7
L
133132010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13314
13315 * regcache.c (supply_register): Clear regcache if buf is NULL.
13316
0718675c 133172010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13318 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13319
13320 * inferiors.c (find_inferior): Add function documentation.
13321 (unloaded_dll): Handle the case where the unloaded dll has not
13322 been previously registered in the dll list.
13323
177321bd
DJ
133242010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13325
13326 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13327 (thumb2_breakpoint): New.
13328 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13329
2b009048
DJ
133302010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13333 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13334 breakpoints.
13335
3be029c7
PA
133362010-01-21 Pedro Alves <pedro@codesourcery.com>
13337
13338 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13339
18f5de3b
JK
133402010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13341
13342 * linux-s390-low.c (s390_collect_ptrace_register)
13343 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13344
3743bb4f
DE
133452010-01-21 Doug Evans <dje@google.com>
13346
14ce3065
DE
13347 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13348 (PTRACE_ARG4_TYPE): New macro.
13349 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13350 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13351 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13352 (usr_store_inferior_registers): Ditto.
13353 (linux_read_memory, linux_write_memory): Ditto.
13354 (linux_test_for_tracefork): Ditto.
13355
3743bb4f
DE
13356 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13357 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13358
8b315be5
PA
133592010-01-21 Pedro Alves <pedro@codesourcery.com>
13360
13361 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13362 target.
13363
85492558
PA
133642010-01-21 Pedro Alves <pedro@codesourcery.com>
13365
13366 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13367 prototype to take a regcache. Adjust.
13368
442ea881
PA
133692010-01-20 Pedro Alves <pedro@codesourcery.com>
13370
13371 * regcache.h (struct thread_info): Forward declare.
13372 (struct regcache): New.
13373 (new_register_cache): Adjust prototype.
13374 (get_thread_regcache): Declare.
13375 (free_register_cache): Adjust prototype.
13376 (registers_to_string, registers_from_string): Ditto.
13377 (supply_register, supply_register_by_name, collect_register)
13378 (collect_register_as_string, collect_register_by_name): Ditto.
13379 * regcache.c (struct inferior_regcache_data): Delete.
13380 (get_regcache): Rename to ...
13381 (get_thread_regcache): ... this. Adjust. Switch inferior before
13382 fetching registers.
13383 (regcache_invalidate_one): Adjust.
13384 (regcache_invalidate): Fix prototype.
13385 (new_register_cache): Return the new register cache.
13386 (free_register_cache): Change prototype.
13387 (realloc_register_cache): Adjust.
13388 (registers_to_string): Change prototype to take a regcache. Adjust.
13389 (registers_from_string): Ditto.
13390 (register_data): Ditto.
13391 (supply_register): Ditto.
13392 (supply_register_by_name): Ditto.
13393 (collect_register): Ditto.
13394 (collect_register_as_string): Ditto.
13395 (collect_register_by_name): Ditto.
13396 * server.c (process_serial_event): Adjust.
13397 * linux-low.h (regset_fill_func, regset_store_func): Change
13398 prototype.
13399 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13400 Change prototype.
13401 * linux-low.c (get_stop_pc): Adjust.
13402 (check_removed_breakpoint): Adjust.
13403 (linux_wait_for_event): Adjust.
13404 (linux_resume_one_lwp): Adjust.
13405 (fetch_register): Add regcache parameter. Adjust.
13406 (usr_store_inferior_registers): Ditto.
13407 (regsets_fetch_inferior_registers): Ditto.
13408 (regsets_store_inferior_registers): Ditto.
13409 (linux_fetch_registers, linux_store_registers): Ditto.
13410 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13411 regcache. Adjust.
43aaf8b6
PA
13412 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13413 Ditto.
442ea881
PA
13414 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13415 prototype to take a regcache.
13416 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13417 * remote-utils.c (convert_ascii_to_int, outreg)
13418 (prepare_resume_reply): Change prototype to take a regcache.
13419 Adjust.
13420 * target.h (struct target_ops) <fetch_registers, store_registers>:
13421 Change prototype to take a regcache.
13422 (fetch_inferior_registers, store_inferior_registers): Change
13423 prototype to take a regcache. Adjust.
13424 * proc-service.c (ps_lgetregs): Adjust.
13425 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13426 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13427 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13428 take a regcache. Adjust.
13429 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13430 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13431 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13432 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13433 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13434 (cris_cannot_fetch_register):
13435 (cris_breakpoint_at): Change prototype to take a regcache.
13436 Adjust.
13437 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13438 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13439 to take a regcache. Adjust.
13440 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13441 Adjust.
13442 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13443 take a regcache. Adjust.
13444 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13445 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13446 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13447 * linux-mips-low.c (mips_get_pc):
13448 (mips_set_pc): Change prototype to take a regcache. Adjust.
13449 (mips_reinsert_addr): Adjust.
13450 (mips_collect_register): Change prototype to take a regcache.
13451 Adjust.
13452 (mips_supply_register):
13453 (mips_collect_register_32bit, mips_supply_register_32bit)
13454 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13455 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13456 * linux-ppc-low.c (ppc_supply_ptrace_register)
13457 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13458 (parse_spufs_run): Adjust.
13459 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13460 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13461 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13462 take a regcache. Adjust.
13463 * linux-s390-low.c (s390_collect_ptrace_register)
13464 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13465 (s390_set_pc): Change prototype to take a regcache. Adjust.
13466 (s390_arch_setup): Adjust.
13467 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13468 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13469 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13470 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13471 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13472 regcache. Adjust.
13473 (sparc_breakpoint_at): Adjust.
13474 * linux-xtensa-low.c (xtensa_fill_gregset):
13475 (xtensa_store_gregset):
13476 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13477 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13478 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13479 prototype to take a regcache. Adjust.
13480 * win32-arm-low.c (arm_fetch_inferior_register)
13481 (arm_store_inferior_register): Change prototype to take a
13482 regcache. Adjust.
13483 * win32-i386-low.c (i386_fetch_inferior_register)
13484 (i386_store_inferior_register): Change prototype to take a
13485 regcache. Adjust.
13486 * win32-low.c (child_fetch_inferior_registers)
13487 (child_store_inferior_registers): Change prototype to take a
13488 regcache. Adjust.
13489 (win32_wait): Adjust.
13490 (win32_fetch_inferior_registers): Change prototype to take a
13491 regcache. Adjust.
13492 (win32_store_inferior_registers): Adjust.
13493 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13494 store_inferior_register>: Change prototype to take a regcache.
13495
60c3d7b0
DE
134962010-01-20 Doug Evans <dje@google.com>
13497
13498 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13499 #ifdef.
13500 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13501 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13502
dc146f7c
VP
135032010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13504
13505 * linux-low.c (linux_core_of_thread): New.
13506 (compare_ints, show_process, list_threads): New.
13507 (linux_qxfer_osdata): Report threads and cores.
13508 (linux_target_op): Register linux_core_of_thread.
13509 * remote-utils.c (prepare_resume_reply): Report the core.
13510 (buffer_xml_printf): Support %d specifier.
13511 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13512 New.
13513 (handle_query): Handle qXfer:threads. Announce availability
13514 thereof.
13515 * target.h (struct target_ops): New field core_of_thread.
13516
7803799a
UW
135172010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13518
13519 * Makefile.in (clean): Remove new generated files.
13520 (reg-s390.o, reg-s390.c): Remove rules.
13521 (reg-s390x.o, reg-s390x.c): Likewise.
13522 (s390-linux32.o, s390-linux32.c): Add rules.
13523 (s390-linux64.o, s390-linux64.c): Likewise.
13524 (s390x-linux64.o, s390x-linux64.c): Likewise.
13525 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13526 * linux-s390-low.c: Include <elf.h>.
13527 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13528 (init_registers_s390): Remove prototype.
13529 (init_registers_s390x): Likewise.
13530 (init_registers_s390_linux32): Add prototype.
13531 (init_registers_s390_linux64): Likewise.
13532 (init_registers_s390x_linux64): Likewise.
13533 (s390_num_regs_3264): New define.
13534 (s390_regmap_3264): New global variable.
13535 (s390_cannot_fetch_register): Remove obsolete check.
13536 (s390_cannot_store_register): Likewise.
13537 (s390_collect_ptrace_register): Handle upper/lower register halves.
13538 (s390_supply_ptrace_register): Likewise.
13539 (s390_fill_gregset): Update to register number changes.
13540 (s390_get_hwcap): New routine.
13541 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13542 Install appropriate regmap and register set.
13543
6e7ffa39
JB
135442010-01-01 Joel Brobecker <brobecker@adacore.com>
13545
13546 * server.c (gdbserver_version): Update copyright year to 2010.
13547 * gdbreplay.c (gdbreplay_version): Likewise.
13548
957f3f49
DE
135492009-12-28 Doug Evans <dje@google.com>
13550
13551 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13552 elf/external.h. Include <elf.h> instead but only if necessary.
13553
ca5c370d
PA
135542009-12-28 Pedro Alves <pedro@codesourcery.com>
13555
13556 * linux-low.c (linux_remove_process): Remove `detaching'
13557 parameter. Don't release/detach from thread_db here.
13558 (linux_kill): Release/detach from thread_db here, ...
13559 (linux_detach): ... and here, before actually detaching.
13560 (linux_wait_1): ... and here, when a process exits.
13561 * thread-db.c (any_thread_of): New.
13562 (thread_db_free): Switch the current inferior to a thread of the
13563 passed in process.
13564
4ee62156
DE
135652009-12-21 Doug Evans <dje@google.com>
13566
d90e6a88
DE
13567 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13568
c5f62d5f
DE
13569 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13570 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13571 warning ifndef __NR_tkill. Move setting of errno there too.
13572 Delete unnecessary resetting of errno after syscall.
13573 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13574
10e86dd7
DE
13575 * configure.ac: Check for dladdr.
13576 * config.in: Regenerate.
13577 * configure: Regenerate.
13578 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13579 (try_thread_db_load): Update.
13580
4ee62156
DE
13581 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13582
00f515da
DE
135832009-12-18 Doug Evans <dje@google.com>
13584
e9464885
DE
13585 * event-loop.c: Include unistd.h if it exists.
13586
07d4f67e
DE
13587 * linux-low.c (my_waitpid): Move definition away from being in
13588 between linux_tracefork_child/linux_test_for_tracefork.
13589
00f515da
DE
13590 * gdb_proc_service.h (psaddr_t): Fix type.
13591 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13592 signature to match glibc.
13593
1de1badb
DE
135942009-12-16 Doug Evans <dje@google.com>
13595
13596 * linux-low.c (linux_read_memory): Fix argument to read.
13597
aeeb81d1
PA
135982009-11-26 Pedro Alves <pedro@codesourcery.com>
13599
13600 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13601 events, don't leave current_inferior pointing at null.
13602
10357975
PA
136032009-11-26 Pedro Alves <pedro@codesourcery.com>
13604
13605 * win32-low.c (LOG): Delete.
13606 (OUTMSG): Output to stderr.
13607 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13608 on compile time LOG macro.
13609 (win32_wait): Fix debug output.
13610
cf6e3471
PA
136112009-11-26 Pedro Alves <pedro@codesourcery.com>
13612
13613 * win32-low.c (win32_add_one_solib): If the dll name is
13614 "ntdll.dll", prepend the system directory to the dll path.
13615
0c85e18e
MK
136162009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13617
13618 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13619
9ac544ce 136202009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13621 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13622
13623 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13624 * configure.ac: Check for __mcoldfire__ and set
13625 gdb_cv_m68k_is_coldfire.
13626 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13627 reg-cf.o and reg-m68k.o.
13628 * configure: Regenerated.
13629
fd7dd3e6
PA
136302009-11-16 Pedro Alves <pedro@codesourcery.com>
13631
13632 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13633 Pass it to thread_db_free.
13634 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13635 proper `detaching' argument to linux_remove_process.
13636 * linux-low.h (thread_db_free): Add `detaching' parameter.
13637 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13638 to thread_db_free.
13639 (thread_db_free): Add `detaching' parameter. Only
13640 call td_ta_clear_event if detaching from process.
13641
75aa492e
MK
136422009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13643
13644 * thread-db.c (thread_db_free): Fix typo.
13645
21e1bee4
PP
136462009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13647
13648 PR gdb/10838
13649 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13650
8838b45e
NS
136512009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13652
13653 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13654 with an i686 compiler.
13655 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13656 needed.
13657 * configure: Rebuilt.
13658
8a35fb51
SL
136592009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13660
13661 PR gdb/10783
13662
13663 * server.c (handle_search_memory_1): Correct read_addr initialization
13664 in loop for searching subsequent chunks.
13665
96f15937
PP
136662009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13667
13668 * configure.ac: New --with-libthread-db option.
13669 * thread-db.c: Allow direct dependence on libthread_db.
13670 (thread_db_free): Adjust.
13671 * config.in: Regenerate.
13672 * configure: Likewise.
889bf7c5 13673
5f7d1694
PP
136742009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13675
13676 PR gdb/10757
13677 * thread-db.c (attach_thread): New function.
13678 (maybe_attach_thread): Return success/failure.
13679 (find_new_threads_callback): Adjust.
889bf7c5
PA
13680 (thread_db_find_new_threads): Loop until no new threads.
13681
88e3b899
PA
136822009-10-13 Pedro Alves <pedro@codesourcery.com>
13683
13684 * proc-service.c (ps_lgetregs): Formatting.
13685
cdbfd419
PP
136862009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13687
13688 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13689 * configure.ac: Adjust.
13690 * linux-low.h (struct process_info_private): Move members to struct
13691 thread_db.
13692 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13693 * linux-low.c (linux_remove_process): Adjust.
13694 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13695 * server.c (handle_query): Move code ...
13696 (handle_monitor_command): ... here. New function.
13697 * target.h (struct target_ops): New member.
13698 * thread-db.c (struct thread_db): New.
13699 (libthread_db_search_path): New variable.
13700 (thread_db_create_event, thread_db_enable_reporting)
13701 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13702 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13703 (try_thread_db_load_1, dladdr_to_soname): New functions.
13704 (try_thread_db_load, thread_db_load_search): New functions.
13705 (thread_db_init): Search for libthread_db.
13706 (thread_db_free): New function.
13707 (thread_db_handle_monitor_command): Likewise.
13708 * config.in: Regenerate.
13709 * configure: Regenerate.
889bf7c5 13710
4168d2d6
UW
137112009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13712
13713 * spu-low.c (spu_kill): Wait for inferior to terminate.
13714 Call clear_inferiors.
13715 (spu_detach): Call clear_inferiors.
13716
81ecdfbb
RW
137172009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13718
13719 * aclocal.m4: Regenerate.
13720 * config.in: Likewise.
13721 * configure: Likewise.
13722
0b9ff2c0
UW
137232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13724
13725 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13726 (parse_spufs_run): New function.
13727 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13728 (ppc_breakpoint_at): Handle SPU breakpoints.
13729
efcbbd14
UW
137302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13731
13732 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13733 (SPUFS_MAGIC): Define.
13734 (spu_enumerate_spu_ids): New function.
13735 (linux_qxfer_spu): New function.
13736 (linux_target_ops): Install linux_qxfer_spu.
13737
f4d9bade
UW
137382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13739
13740 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13741 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13742 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13743 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13744 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13745 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13746 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13747 (init_registers_powerpc_cell32l): Add prototype.
13748 (init_registers_powerpc_cell64l): Likewise.
13749 (ppc_arch_setup): Detect Cell/B.E. architecture.
13750
96e946ca
RW
137512009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13752
13753 * Makefile.in (datarootdir): New variable.
13754
58d6951d
DJ
137552009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13756
13757 * linux-low.c (linux_write_memory): Update debugging output.
13758 * Makefile.in (clean): Add new descriptions.
13759 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13760 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13761 * configure.srv: Add new files for arm*-*-linux*.
13762 * linux-arm-low.c: Add new declarations.
13763 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13764 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13765 (HWCAP_VFPv3D16): New.
13766 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13767 instead of __IWMMXT__.
13768 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13769 (arm_arch_setup): New.
13770 (target_regsets): Remove #ifdef. Add VFP regset.
13771 (the_low_target): Use arm_arch_setup.
13772
12b42a12
DJ
137732009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13774
13775 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13776 the main thread again.
13777
ac8c974e
AR
137782009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13779
13780 Adding Neutrino gdbserver.
13781 * configure: Regenerated.
13782 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13783 * configure.srv (i[34567]86-*-nto*): New target.
13784 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13785 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13786 (nto_comctrl) [__QNX__]: New function.
13787 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13788
4424e0c3 137892009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13790
13791 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13792 srv_tgtobj.
13793
912cf4ba
PA
137942009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13795 Pedro Alves <pedro@codesourcery.com>
13796
13797 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13798 don't support CONTEXT_EXTENDED_REGISTERS.
13799 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13800 (the_low_target): Install them.
13801 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13802 failing with ERROR_PIPE_NOT_CONNECTED.
13803
aa5ca48f
DE
138042009-06-30 Doug Evans <dje@google.com>
13805 Pierre Muller <muller@ics.u-strasbg.fr>
13806
13807 Add h/w watchpoint support to x86-linux, win32-i386.
13808 * Makefile.in (SFILES): Add i386-low.c
13809 (i386_low_h): Define.
13810 (i386-low.o): Add dependencies.
13811 (linux-x86-low.o): Add i386-low.h dependency.
13812 (win32-i386-low.o): Ditto.
13813 * i386-low.c: New file.
13814 * i386-low.h: New file.
13815 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13816 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13817 * linux-low.c (linux_add_process): Initialize arch_private.
13818 (linux_remove_process): Free arch_private.
13819 (add_lwp): Initialize arch_private.
13820 (delete_lwp): Free arch_private.
13821 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13822 provided.
13823 * linux-low.h (process_info_private): New member arch_private.
13824 (lwp_info): New member arch_private.
13825 (linux_target_ops): New members new_process, new_thread,
13826 prepare_to_resume.
13827 (ptid_of): New macro.
13828 * linux-x86-low.c: Include stddef.h, i386-low.h.
13829 (arch_process_info): New struct.
13830 (arch_lwp_info): New struct.
13831 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13832 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13833 (i386_dr_low_get_status): New function.
13834 (x86_insert_point, x86_remove_point): New functions.
13835 (x86_stopped_by_watchpoint): New function.
13836 (x86_stopped_data_address): New function.
13837 (x86_linux_new_process, x86_linux_new_thread): New functions.
13838 (x86_linux_prepare_to_resume): New function.
13839 (the_low_target): Add entries for insert_point, remove_point,
13840 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13841 prepare_to_resume.
13842 * server.c (debug_hw_points): New global.
13843 (monitor_show_help): Document set debug-hw-points.
13844 (handle_query): Process "set debug-hw-points".
13845 * server.h (debug_hw_points): Declare.
13846 (paddress): Declare.
13847 * utils.c (NUMCELLS, CELLSIZE): New macros.
13848 (get_sell, xsnprintf, paddress): New functions.
13849 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13850 remove_point, stopped_by_watchpoint, stopped_data_address.
13851 * win32-i386-low.c: Include i386-low.h.
13852 (debug_reg_state): Replaces dr.
13853 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13854 (i386_dr_low_get_status): New function.
13855 (i386_insert_point, i386_remove_point): New functions.
13856 (i386_stopped_by_watchpoint): New function.
13857 (i386_stopped_data_address): New function.
13858 (i386_initial_stuff): Update.
13859 (get_thread_context,set_thread_context,i386_thread_added): Update.
13860 (the_low_target): Add entries for insert_point,
13861 remove_point, stopped_by_watchpoint, stopped_data_address.
13862 * win32-low.c (win32_insert_watchpoint): New function.
13863 (win32_remove_watchpoint): New function.
13864 (win32_stopped_by_watchpoint): New function.
13865 (win32_stopped_data_address): New function.
13866 (win32_target_ops): Add entries for insert_watchpoint,
13867 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13868 * win32-low.h (win32_target_ops): New members insert_point,
13869 remove_point, stopped_by_watchpoint, stopped_data_address.
13870
d993e290
PA
138712009-06-25 Pedro Alves <pedro@codesourcery.com>
13872
13873 * server.c (process_serial_event): Re-return unsupported, not
13874 error, if the type isn't recognized. Re-allow supporting only
13875 insert or remove packets. Also call require_running for
13876 breakpoints. Add missing break statement to default case. Tidy.
13877 * target.h (struct target_ops): Rename insert_watchpoint to
13878 insert_point, and remove_watchpoint to remove_point.
13879
13880 * linux-low.h (struct linux_target_ops): Likewise.
13881 * linux-low.c (linux_insert_watchpoint): Rename to ...
13882 (linux_insert_point): ... this. Adjust.
13883 (linux_remove_watchpoint): Rename to ...
13884 (linux_remove_point): ... this. Adjust.
13885 (linux_target_ops): Adjust.
13886 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13887 (cris_insert_point): ... this.
13888 (cris_remove_watchpoint): Rename to ...
13889 (cris_remove_point): ... this.
13890 (the_low_target): Adjust.
13891
0f54c268
PM
138922009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13893
13894 * server.c (handle_v_kill): Pass signal_pid to
13895 kill_inferior if multi_process is zero.
13896
c6314022
AR
138972009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13898
13899 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13900 * target.h (target_ops): Comment for *_watchpoint to make it clear
13901 the functions can get types '0' and '1'.
13902
4463ce24
AR
139032009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13904
13905 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13906 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13907 * regcache.c (get_regcache): Likewise.
13908 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13909 * win32-low.c (child_fetch_inferior_registers): Remove check for
13910 regno 0.
13911
cf8fd78b
PA
139122009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13913 Pedro Alves <pedro@codesourcery.com>
13914
13915 * target.h (struct target_ops) <supports_multi_process>: New
13916 callback.
13917 (target_supports_multi_process): New.
13918 * server.c (handle_query): Even if GDB reports support, only
13919 enable multi-process if the target also supports it. Report
13920 multi-process support only if the target backend supports it.
13921 * linux-low.c (linux_supports_multi_process): New function.
13922 (linux_target_ops): Install it as target_supports_multi_process
13923 callback.
13924
47c0c975
DE
139252009-05-24 Doug Evans <dje@google.com>
13926
e09875d4
DE
13927 Global renaming of find_thread_pid to find_thread_ptid.
13928 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13929 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13930 All callers updated.
13931
e27d73f6
DE
13932 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13933 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13934 directly.
13935
47c0c975
DE
13936 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13937 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13938 (linux_resume_one_lwp): Ditto.
13939
2acc282a
DE
139402009-05-23 Doug Evans <dje@google.com>
13941
13942 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13943 from struct inferior_list_entry * to struct lwp_info *.
13944 All callers updated.
13945
9f1036c1
DE
139462009-05-13 Doug Evans <dje@google.com>
13947
13948 * linux-x86-low.c: Don't include assert.h.
13949 (x86_siginfo_fixup): Use fatal, not assert.
13950 (x86_arch_setup): Fix comment.
13951
d0722149
DE
139522009-05-12 Doug Evans <dje@google.com>
13953
13954 Biarch support for i386/amd64 gdbserver.
13955 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13956 Add linux-x86-low.c.
13957 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13958 (linux-x86-low.o): Add.
13959 * linux-x86-64-low.c: Delete.
13960 * linux-i386-low.c: Delete.
13961 * linux-x86-low.c: New file.
13962 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13963 linux-x86-low.o.
13964 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13965 linux-x86-low.o.
13966 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13967 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13968 (linux_child_pid_to_exec_file): New function.
13969 (elf_64_header_p, elf_64_file_p): New functions.
13970 (siginfo_fixup): New function.
13971 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13972 give target a chance to convert layout.
13973 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13974 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13975
fdeb2a12
DE
139762009-05-07 Doug Evans <dje@google.com>
13977
13978 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13979 (regsets_store_inferior_registers): Ditto.
13980
a6dbe5df
PA
139812009-05-06 Pedro Alves <pedro@codesourcery.com>
13982
13983 PR server/10048
13984
13985 * linux-low.c (must_set_ptrace_flags): Delete.
13986 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13987 of the global.
13988 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13989 `lwp->must_set_ptrace_flags' instead.
ba42693b 13990 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13991 (linux_wait_1): ... not here.
13992
5091eb23
DE
139932009-04-30 Doug Evans <dje@google.com>
13994
9f767825
DE
13995 * inferiors.c (started_inferior_callback): New function.
13996 (attached_inferior_callback): New function.
13997 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13998 * server.c (print_started_pid, print_attached_pid): New functions.
13999 (detach_or_kill_for_exit): New function.
14000 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14001 * server.h (have_started_inferiors_p): Declare.
14002 (have_attached_inferiors_p): Declare.
14003
5091eb23
DE
14004 * inferiors.c (remove_process): Fix memory leak, free process.
14005 * linux-low.c (linux_remove_process): New function.
14006 (linux_kill): Call it instead of remove_process.
14007 (linux_detach, linux_wait_1): Ditto.
14008
155c8968
PA
140092009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14010
14011 * configure.srv: Add x86 Windows CE target.
14012
7fe519cb
UW
140132009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14014
14015 * inferiors.c (get_thread_process): Make global.
14016 * server.h (get_thread_process): Add prototype.
14017 * thread-db.c (find_one_thread): Use get_thread_process
14018 instead of current_process.
14019 (thread_db_get_tls_address): Do not crash if called when
14020 thread layer is not yet initialized.
14021
5472f405
UW
140222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14023
14024 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14025 * spu-low.c (current_tid): Rename to ...
14026 (current_ptid): ... this.
14027 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14028 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14029 ptid_get_lwp (current_ptid) instead of current_tid.
14030 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14031 instead of current_tid. Use find_process_pid to verify pid
14032 argument is valid. Pass proper argument to remove_process.
14033 (spu_thread_alive): Compare current_ptid instead of current_tid.
14034 (spu_resume): Likewise.
14035
55ac2b99
PA
140362009-04-02 Pedro Alves <pedro@codesourcery.com>
14037
14038 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14039 variable.
14040
95954743
PA
140412009-04-01 Pedro Alves <pedro@codesourcery.com>
14042
14043 Implement the multiprocess extensions, and add linux multiprocess
14044 support.
14045
14046 * server.h (ULONGEST): Declare.
14047 (struct ptid, ptid_t): New.
14048 (minus_one_ptid, null_ptid): Declare.
14049 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14050 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14051 (struct inferior_list_entry): Change `id' type from unsigned from
14052 to ptid_t.
14053 (struct sym_cache, struct breakpoint, struct
14054 process_info_private): Forward declare.
14055 (struct process_info): Declare.
14056 (current_process): Declare.
14057 (all_processes): Declare.
14058 (initialize_inferiors): Declare.
14059 (add_thread): Adjust to use ptid_t.
14060 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14061 (add_process, remove_process, find_thread_pid): Declare.
14062 (find_inferior_id): Adjust to use ptid_t.
14063 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14064 (multi_process): Declare.
14065 (push_event): Adjust to use ptid_t.
14066 (read_ptid, write_ptid): Declare.
14067 (prepare_resume_reply): Adjust to use ptid_t.
14068 (clear_symbol_cache): Declare.
14069 * inferiors.c (all_processes): New.
14070 (null_ptid, minus_one_ptid): New.
14071 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14072 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14073 (add_thread): Change unsigned long to ptid. Remove gdb_id
14074 parameter. Adjust.
14075 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14076 (gdb_id_to_thread): Rename to ...
14077 (find_thread_pid): ... this. Change unsigned long to ptid.
14078 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14079 (loaded_dll, pull_pid_from_list): Adjust.
14080 (add_process, remove_process, find_process_pid)
14081 (get_thread_process, current_process, initialize_inferiors): New.
14082 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14083 (struct target_waitstatus) <related_pid>: Ditto.
14084 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14085 return type to int.
14086 (struct target_ops) <join>: Add `pid' argument.
14087 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14088 (struct target_ops) <wait>: Add `ptid' field. Change return type
14089 to ptid.
14090 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14091 (mywait): Add `ptid' argument. Change return type to ptid_t.
14092 (target_pid_to_str): Declare.
14093 * target.c (set_desired_inferior): Adjust to use ptids.
14094 (mywait): Add new `ptid' argument. Adjust.
14095 (target_pid_to_str): New.
14096 * mem-break.h (free_all_breakpoints): Declare.
14097 * mem-break.c (breakpoints): Delelete.
14098 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14099 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14100 to use per-process breakpoint list.
14101 (free_all_breakpoints): New.
14102 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14103 (symbol_cache, all_symbols_looked_up): Delete.
14104 (hexchars): New.
14105 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14106 read_ptid): New.
14107 (prepare_resume_reply): Change ptid argument's type from unsigned
14108 long to ptid_t. Adjust. Implement W;process and X;process.
14109 (free_sym_cache, clear_symbol_cache): New.
14110 (look_up_one_symbol): Adjust to per-process symbol cache. *
14111 * server.c (cont_thread, general_thread, step_thread): Change type
14112 to ptid_t.
14113 (attached): Delete.
14114 (multi_process): New.
14115 (last_ptid): Change type to ptid_t.
14116 (struct vstop_notif) <ptid>: Change type to ptid_t.
14117 (queue_stop_reply, push_event): Change `ptid' argument's type to
14118 ptid_t.
14119 (discard_queued_stop_replies): Add `pid' argument.
14120 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14121 changes. Don't reference the `attached' global.
14122 (attach_inferior): Adjust to mywait interface changes.
14123 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14124 features. Handle and report "multiprocess+". Handle
14125 "qAttached:PID".
14126 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14127 changes.
14128 (handle_v_kill): New.
14129 (handle_v_stopped): Adjust to use target_pid_to_str.
14130 (handle_v_requests): Allow multiple attaches and runs when
14131 multiprocess extensions are in effect. Handle "vKill".
14132 (myresume): Adjust to use ptids.
14133 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14134 (handle_status): Adjust to discard_queued_stop_replies interface
14135 change.
14136 (first_thread_of, kill_inferior_callback)
14137 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14138 (main): Call initialize_inferiors. Adjust to use ptids, killing
14139 and detaching from all inferiors. Handle multiprocess packet
14140 variants.
14141 * linux-low.h: Include gdb_proc_service.h.
14142 (struct process_info_private): New.
14143 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14144 <lwpid_of>: Use ptid_get_lwp.
14145 (get_lwp_thread): Adjust.
14146 (struct lwp_info): Add `dead' member.
14147 (find_lwp_pid): Declare.
14148 * linux-low.c (thread_db_active): Delete.
14149 (new_inferior): Adjust comment.
14150 (inferior_pid): Delete.
14151 (linux_add_process): New.
14152 (handle_extended_wait): Adjust.
14153 (add_lwp): Change unsigned long to ptid.
14154 (linux_create_inferior): Add process to processes table. Adjust
14155 to use ptids. Don't set new_inferior here.
14156 (linux_attach_lwp): Rename to ...
14157 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14158 it. Adjust to use ptids.
14159 (linux_attach_lwp): New.
14160 (linux_attach): Add process to processes table. Don't set
14161 new_inferior here.
14162 (struct counter): New.
14163 (second_thread_of_pid_p, last_thread_of_process_p): New.
14164 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14165 multiple processes.
14166 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14167 processes. Remove process from process table.
14168 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14169 to multiple processes.
14170 (any_thread_of): New.
14171 (linux_detach): Add `pid' argument, and handle it. Remove process
14172 from processes table.
14173 (linux_join): Add `pid' argument. Handle it.
14174 (linux_thread_alive): Change unsighed long argument to ptid_t.
14175 Consider dead lwps as not being alive.
14176 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14177 threads we're not interested in.
14178 (same_lwp, find_lwp_pid): New.
14179 (linux_wait_for_lwp): Change `pid' argument's type from int to
14180 ptid_t. Adjust.
14181 (linux_wait_for_event): Rename to ...
14182 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14183 from int to ptid_t. Adjust.
14184 (linux_wait_for_event): New.
14185 (linux_wait_1): Add `ptid' argument. Change return type to
14186 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14187 that exit from the process table.
14188 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14189 Adjust.
14190 (mark_lwp_dead): New.
14191 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14192 stopping all threads, mark its main lwp as dead.
14193 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14194 ptids.
14195 (fetch_register, usr_store_inferior_registers)
14196 (regsets_fetch_inferior_registers)
14197 (regsets_store_inferior_registers, linux_read_memory)
14198 (linux_write_memory): Inline `inferior_pid'.
14199 (linux_look_up_symbols): Adjust to use per-process
14200 `thread_db_active'.
14201 (linux_request_interrupt): Adjust to use ptids.
14202 (linux_read_auxv): Inline `inferior_pid'.
14203 (initialize_low): Don't reference thread_db_active.
14204 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14205 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14206 (ps_getpid): Return the pid of the current inferior.
14207 * thread-db.c (proc_handle, thread_agent): Delete.
14208 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14209 per-process data.
14210 (find_one_thread): Change argument type to ptid_t. Adjust to
14211 per-process data.
14212 (maybe_attach_thread): Adjust to per-process data and ptids.
14213 (thread_db_find_new_threads): Ditto.
14214 (thread_db_init): Ditto.
14215 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14216 processes table. Adjust to use ptids.
14217 (spu_kill, spu_detach): Adjust interface. Remove process from
14218 processes table.
14219 (spu_join, spu_thread_alive): Adjust interface.
14220 (spu_wait): Adjust interface. Remove process from processes
14221 table. Adjust to use ptids.
14222 * win32-low.c (current_inferior_tid): Delete.
14223 (current_inferior_ptid): New.
14224 (debug_event_ptid): New.
14225 (thread_rec): Take a ptid. Adjust.
14226 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14227 (child_delete_thread): Ditto.
14228 (do_initial_child_stuff): Add `attached' argument. Add process to
14229 processes table.
14230 (child_fetch_inferior_registers, child_store_inferior_registers):
14231 Adjust.
14232 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14233 (win32_attach): Pass 1 to do_initial_child_stuff.
14234 (win32_kill): Adjust interface. Remove process from processes
14235 table.
14236 (win32_detach): Ditto.
14237 (win32_join): Adjust interface.
14238 (win32_thread_alive): Take a ptid.
14239 (win32_resume): Adjust to use ptids.
14240 (get_child_debug_event): Ditto.
14241 (win32_wait): Adjust interface. Remove exiting process from
14242 processes table.
14243
bd99dc85
PA
142442009-04-01 Pedro Alves <pedro@codesourcery.com>
14245
14246 Non-stop mode support.
14247
14248 * server.h (non_stop): Declare.
14249 (gdb_client_data, handler_func): Declare.
14250 (delete_file_handler, add_file_handler, start_event_loop):
14251 Declare.
14252 (handle_serial_event, handle_target_event, push_event)
14253 (putpkt_notif): Declare.
14254 * target.h (enum resume_kind): New.
14255 (struct thread_resume): Replace `step' field by `kind' field.
14256 (TARGET_WNOHANG): Define.
14257 (struct target_ops) <wait>: Add `options' argument.
14258 <supports_non_stop, async, start_non_stop>: New fields.
14259 (target_supports_non_stop, target_async): New.
14260 (start_non_stop): Declare.
14261 (mywait): Add `options' argument.
14262 * target.c (mywait): Add `options' argument. Print child exit
14263 notifications here.
14264 (start_non_stop): New.
14265 * server.c (non_stop, own_buf, mem_buf): New globals.
14266 (struct vstop_notif): New.
14267 (notif_queue): New global.
14268 (queue_stop_reply, push_event, discard_queued_stop_replies)
14269 (send_next_stop_reply): New.
14270 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14271 interface changes.
14272 (attach_inferior): In non-stop mode, don't wait for the target
14273 here.
14274 (handle_general_set): Handle QNonStop.
14275 (handle_query): When handling qC, return the current general
14276 thread, instead of the first thread of the list.
14277 (handle_query): If the backend supports non-stop mode, include
14278 QNonStop+ in the qSupported query response.
14279 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14280 and non-stop mode.
14281 (handle_v_attach, handle_v_run): Handle non-stop mode.
14282 (handle_v_stopped): New.
14283 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14284 (myresume): Adjust to use resume_kind. Handle non-stop.
14285 (queue_stop_reply_callback): New.
14286 (handle_status): Handle non-stop mode.
14287 (main): Clear non_stop flag on reconnection. Use the event-loop.
14288 Refactor serial protocol handling from here ...
14289 (process_serial_event): ... to this new function. When GDB
14290 selects any thread, select one here. In non-stop mode, wait until
14291 GDB acks all pending events before exiting.
14292 (handle_serial_event, handle_target_event): New.
14293 * remote-utils.c (remote_open): Install remote_desc in the event
14294 loop.
14295 (remote_close): Remove remote_desc from the event loop.
14296 (putpkt_binary): Rename to...
14297 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14298 (putpkt_binary): New as wrapper around putpkt_binary_1.
14299 (putpkt_notif): New.
14300 (prepare_resume_reply): In non-stop mode, don't change the
14301 general_thread.
14302 * event-loop.c: New.
14303 * Makefile.in (OBJ): Add event-loop.o.
14304 (event-loop.o): New rule.
14305
14306 * linux-low.h (pid_of): Moved here.
14307 (lwpid_of): New.
14308 (get_lwp_thread): Use lwpid_of.
14309 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14310 * linux-low.c (pid_of): Delete.
14311 (inferior_pid): Use lwpid_of.
14312 (linux_event_pipe): New.
14313 (target_is_async_p): New.
14314 (delete_lwp): New.
14315 (handle_extended_wait): Use lwpid_of.
14316 (add_lwp): Don't set lwpid field.
14317 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14318 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14319 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14320 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14321 first. Adjust to linux_wait_for_event interface changes. Use
14322 lwpid_of.
14323 (linux_detach): Don't delete the main lwp here.
14324 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14325 (status_pending_p): Don't consider explicitly suspended lwps.
14326 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14327 pointer. Add OPTIONS argument. Change return type to int. Use
14328 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14329 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14330 pointer. Add status pointer argument. Return a pid instead of a
14331 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14332 changes. In non-stop mode, don't switch to a random thread.
14333 (linux_wait): Rename to...
14334 (linux_wait_1): ... this. Add target_options argument, and handle
14335 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14336 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14337 clean exit and signal exit code. Don't stop all threads in
14338 non-stop mode. In all-stop mode, only stop all threads when
14339 reporting a stop to GDB. Handle explicit thread stop requests.
14340 (async_file_flush, async_file_mark): New.
14341 (linux_wait): New.
14342 (send_sigstop): Use lwpid_of.
14343 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14344 interface changes. In non-stop mode, don't switch to a random
14345 thread.
14346 (linux_resume_one_lwp): Use lwpid_of.
14347 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14348 (linux_resume_one_thread): ... this. Handle resume_stop. In
14349 non-stop mode, don't look for pending flag in all threads.
14350 (resume_status_pending_p): Don't consider explicitly suspended
14351 threads.
14352 (my_waitpid): Reimplement. Emulate __WALL.
14353 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14354 Use lwpid_of.
14355 (sigchld_handler, linux_supports_non_stop, linux_async)
14356 (linux_start_non_stop): New.
14357 (linux_target_ops): Register linux_supports_non_stop, linux_async
14358 and linux_start_non_stop.
14359 (initialize_low): Install SIGCHLD handler.
14360 * thread-db.c (thread_db_create_event, find_one_thread)
14361 (thread_db_get_tls_address): Use lwpid_of.
14362 * win32-low.c (win32_detach): Adjust to use resume_kind.
14363 (win32_wait): Add `options' argument.
14364 * spu-low.c (spu_resume): Adjust to use resume_kind.
14365 (spu_wait): Add `options' argument.
14366
5b1c542e
PA
143672009-04-01 Pedro Alves <pedro@codesourcery.com>
14368
14369 Decouple target code from remote protocol.
14370
14371 * target.h (enum target_waitkind): New.
14372 (struct target_waitstatus): New.
14373 (struct target_ops) <wait>: Return an unsigned long. Take a
14374 target_waitstatus pointer instead of a char pointer.
14375 (mywait): Likewise.
14376 * target.c (mywait): Change prototype to return an unsigned long.
14377 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14378 * server.h (thread_from_wait, old_thread_from_wait): Delete
14379 declarations.
14380 (prepare_resume_reply): Change prototype to take a
14381 target_waitstatus.
14382 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14383 (last_status, last_ptid): New.
14384 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14385 pid instead of a signal.
14386 (attach_inferior): Remove "status" and "signal" parameters.
14387 Adjust.
14388 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14389 not as an address.
14390 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14391 (handle_v_requests, myresume): Remove "status" and "signal"
14392 parameters. Adjust.
14393 (handle_status): New.
14394 (main): Delete local `status'. Adjust.
14395 * remote-utils.c: Include target.h.
14396 (prepare_resume_reply): Change prototype to take a
14397 target_waitstatus. Adjust.
14398
14399 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14400 interface.
14401 * spu-low.c (spu_wait): Adjust.
14402 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14403 Delete.
14404 (win32_wait): Adjust.
14405
2bd7c093
PA
144062009-04-01 Pedro Alves <pedro@codesourcery.com>
14407
14408 * target.h (struct thread_resume): Delete leave_stopped member.
14409 (struct target_ops): Add a `n' argument to the `resume' callback.
14410 * server.c (start_inferior): Adjust.
14411 (handle_v_cont, myresume): Adjust.
14412 * linux-low.c (check_removed_breakpoint): Adjust to resume
14413 interface change, and to removed leave_stopped field.
14414 (resume_ptr): Delete.
14415 (struct thread_resume_array): New.
14416 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14417 resume interface change.
14418 (linux_continue_one_thread, linux_queue_one_thread)
14419 (resume_status_pending_p): Check if the resume field is NULL
14420 instead of checking the leave_stopped member.
14421 (linux_resume): Adjust to the target resume interface change.
14422 * spu-low.c (spu_resume): Adjust to the target resume interface
14423 change.
14424 * win32-low.c (win32_detach, win32_resume): Ditto.
14425
c35fafde
PA
144262009-04-01 Pedro Alves <pedro@codesourcery.com>
14427
14428 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14429 flag.
14430 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14431 pending.
14432 (linux_continue_one_thread): Only preserve the stepping flag if
14433 there's a pending breakpoint.
14434
0a59d50b
PA
144352009-03-31 Pedro Alves <pedro@codesourcery.com>
14436
14437 * server.c (main): After the inferior having exited, call
14438 remote_close before exiting gdbserver.
14439
f04c6d38
TJB
144402009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14441
14442 Fix size of FPSCR in Power 7 processors.
14443 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14444 (PPC_FEATURE_HAS_DFP): New #define.
14445 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14446 size of the FPSCR.
14447
78e5cee6
PA
144482009-03-23 Pedro Alves <pedro@codesourcery.com>
14449
14450 * server.c (handle_query) Whitespace and formatting.
14451
1b3f6016
PA
144522009-03-22 Pedro Alves <pedro@codesourcery.com>
14453
14454 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14455 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14456 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14457 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14458 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14459 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14460 Makefile.in, configure.ac: Fix whitespace throughout.
14461 * configure: Regenerate.
14462
a07b2135
PA
144632009-03-22 Pedro Alves <pedro@codesourcery.com>
14464
14465 * inferiors.c (find_inferior): Make it safe for the callback
14466 function to delete the currently iterated inferior.
14467
67cc2626
PA
144682009-03-22 Pedro Alves <pedro@codesourcery.com>
14469
14470 * Makefile.in (linuw_low_h): Move higher.
14471 (thread-db.o): Depend on $(linux_low_h).
14472
54a0b537
PA
144732009-03-17 Pedro Alves <pedro@codesourcery.com>
14474
14475 Rename "process" to "lwp" throughout.
14476
14477 * linux-low.c (all_processes): Rename to...
14478 (all_lwps): ... this.
14479 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14480 (add_process): Rename to ...
14481 (add_lwp): ... this. Adjust.
14482 (linux_create_inferior): Adjust.
14483 (linux_attach_lwp): Adjust.
14484 (linux_attach): Adjust.
14485 (linux_kill_one_process): Rename to ...
14486 (linux_kill_one_lwp): ... this. Adjust.
14487 (linux_kill): Adjust.
14488 (linux_detach_one_process): Rename to ...
14489 (linux_detach_one_lwp): ... this. Adjust.
14490 (linux_detach): Adjust.
14491 (check_removed_breakpoint): Adjust.
14492 (status_pending_p): Adjust.
14493 (linux_wait_for_process): Rename to ...
14494 (linux_wait_for_lwp): ... this. Adjust.
14495 (linux_wait_for_event): Adjust.
14496 (send_sigstop): Adjust.
14497 (wait_for_sigstop): Adjust.
14498 (stop_all_processes): Rename to ...
14499 (stop_all_lwps): ... this.
14500 (linux_resume_one_process): Rename to ...
14501 (linux_resume_one_lwp): ... this. Adjust.
14502 (linux_set_resume_request, linux_continue_one_thread)
14503 (linux_queue_one_thread, resume_status_pending_p)
14504 (usr_store_inferior_registers, regsets_store_inferior_registers)
14505 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14506 Adjust.
14507 * linux-low.h (get_process): Rename to ...
14508 (get_lwp): ... this. Adjust.
14509 (get_thread_process): Rename to ...
14510 (get_thread_lwp): ... this. Adjust.
14511 (get_process_thread): Rename to ...
14512 (get_lwp_thread): ... this. Adjust.
14513 (struct process_info): Rename to ...
14514 (struct lwp_info): ... this.
14515 (all_processes): Rename to ...
14516 (all_lwps): ... this.
14517 * proc-service.c (ps_lgetregs): Adjust.
14518 * thread-db.c (thread_db_create_event, find_one_thread)
14519 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14520
0b16c5cf
PA
145212009-03-14 Pedro Alves <pedro@codesourcery.com>
14522
14523 * server.c (handle_query): Handle "qAttached".
14524
32de4b9d
NS
145252009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14526
14527 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14528 GPLv3, update license URL.
14529
2aecd87f
DE
145302009-03-01 Doug Evans <dje@google.com>
14531
93efd302 14532 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14533 (server_h): Add gdb_signals.h.
14534 (signals.o): Update.
14535 * server.h (target_signal_from_host,target_signal_to_host_p)
14536 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14537
86b1f9c5
PM
145382009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14539
14540 * remote-utils.c (getpkt): Also generate remote-debug
14541 information if noack_mode is set.
14542
4aa995e1
PA
145432009-02-06 Pedro Alves <pedro@codesourcery.com>
14544
14545 * server.c (handle_query): Report qXfer:siginfo:read and
14546 qXfer:siginfo:write as supported and handle them.
14547 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14548 * linux-low.c (linux_xfer_siginfo): New.
14549 (linux_target_ops): Set it.
14550
62709adf
PA
145512009-01-26 Pedro Alves <pedro@codesourcery.com>
14552
14553 * server.c (gdbserver_usage): Mention --remote-debug.
14554 (main): Accept '--remote-debug' switch.
14555
aef93bd7
DE
145562009-01-18 Doug Evans <dje@google.com>
14557
14558 * regcache.c (new_register_cache): No need to check result of xcalloc.
14559 * server.c (handle_search_memory): Back out calls to xmalloc,
14560 result is checked and error is returned to user upon failure.
14561 (handle_query): Ditto. Add more checks for result of malloc.
14562 (handle_v_cont): Check result of malloc, report error back to
14563 user upon failure.
14564 (handle_v_run): Ditto. Call freeargv.
14565 * server.h (freeargv): Declare.
14566 * utils.c (freeargv): New fn.
14567
54363045
DE
145682009-01-15 Doug Evans <dje@google.com>
14569
f626972c
DE
14570 * gdbreplay.c (perror_with_name): Make arg const char *.
14571 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14572 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14573 * utils.c (perror_with_name): Make arg const char *.
54363045 14574
18aae699
PA
145752009-01-14 Pedro Alves <pedro@codesourcery.com>
14576
14577 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14578 when handling a EXIT_PROCESS_DEBUG_EVENT.
14579
ff703abe
JB
145802009-01-06 Joel Brobecker <brobecker@adacore.com>
14581
14582 * gdbreplay.c (gdbreplay_version): Update copyright year.
14583 * server.c (gdbserver_version): Likewise.
14584
f21cc1a2 145852009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14586
14587 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14588 (handle_extended_wait): Improve comment.
0e21c1ec 14589
bca929d3
DE
145902008-12-13 Doug Evans <dje@google.com>
14591
14592 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14593 * server.h (ATTR_MALLOC): New macro.
14594 (xmalloc,xcalloc,xstrdup): Declare.
14595 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14596 * inferiors.c: Ditto.
14597 * linux-low.c: Ditto.
14598 * mem-break.c: Ditto.
14599 * regcache.c: Ditto.
14600 * remote-utils.c: Ditto.
14601 * server.c: Ditto.
14602 * target.c: Ditto.
14603 * win32-low.c: Ditto.
14604
97438e3f
DE
146052008-12-12 Doug Evans <dje@google.com>
14606
896c7fbb
DE
14607 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14608 in debugging printf.
14609
97438e3f
DE
14610 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14611
e3b886f8
DE
146122008-12-09 Doug Evans <dje@google.com>
14613
14614 * linux-low.h (struct process_info): Delete member tid, unused.
14615 * thread-db.c (find_one_thread): Update.
14616 (maybe_attach_thread): Update.
14617
07e059b5
VP
146182008-12-02 Pedro Alves <pedro@codesourcery.com>
14619
889bf7c5
PA
14620 * target.h (struct target_ops): Add qxfer_osdata member.
14621 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14622 and dirent.h.
14623 (linux_qxfer_osdata): New functions.
14624 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14625 callback.
14626 * server.c (handle_query): Handle "qXfer:osdata:read:".
14627 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14628 (buffer_xml_printf): New functions.
14629 * server.h (struct buffer): New.
14630 (buffer_grow_str, buffer_grow_str0): New macros.
14631 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14632 (buffer_xml_printf): Declare.
07e059b5 14633
4cab47ab
DE
146342008-11-24 Doug Evans <dje@google.com>
14635
14636 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14637
f142445f
DJ
146382008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14639
14640 * server.c (handle_v_run): Always use the supplied argument list.
14641
d0107bb6 146422008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14643
d0107bb6
BW
14644 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14645 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14646
2c4ad781
TJB
146472008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14648
14649 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14650 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14651 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14652 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14653 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14654 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14655 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14656 XML target descriptions.
14657 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14658 when inferior is running on an ISA 2.05 or later processor. Add
14659 special case to return offset for full 64-bit slot of FPSCR when
14660 in 32-bits.
14661
dfb64f85
DJ
146622008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14663
14664 * Makefile.in (SFILES, clean): Added sparc64 files.
14665 (reg-sparc64.o, reg-sparc64.c): New.
14666 * configure.srv (sparc*-*-linux*): New configuration.
14667 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14668 syscall arguments for SPARC.
14669 (regsets_store_inferior_registers): Likewise.
14670 * linux-sparc-low.c: New file.
14671
66b6e1dd
DE
146722008-10-21 Doug Evans <dje@google.com>
14673
14674 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14675 (READLINE_DIR,READLINE_DEP): Delete.
14676 (INTERNAL_CFLAGS): Update.
14677 (LINTFLAGS): Update.
14678
9b710a42
PA
146792008-10-10 Pedro Alves <pedro@codesourcery.com>
14680
14681 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14682 whole argv from the last run, not just argv[0].
14683
5822d809
PA
146842008-09-08 Pedro Alves <pedro@codesourcery.com>
14685
14686 * regcache.c (new_register_cache): Return NULL if the register
14687 cache size isn't known yet.
14688 (free_register_cache): Avoid dereferencing a NULL regcache.
14689
74aac56f
DJ
146902008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14691
14692 * configure.srv: Merge MIPS and MIPS64.
14693
400b20f5
MR
146942008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14695
14696 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14697
677c5bb1
LM
146982008-08-18 Luis Machado <luisgpm@br.ibm.com>
14699
14700 * Makefile.in: Add required vsx dependencies.
14701
14702 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14703 Declare init_registers_powerpc_vsx32l.
14704 Declare init_registers_powerpc_vsx64l.
14705 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14706 (ppc_arch_setup): Check for VSX in hwcap.
14707 (ppc_fill_vsxregset): New function.
14708 (ppc_store_vsxregset): New function.
14709 Add new VSX entry in regset_info target_regsets.
14710
14711 * configure.srv: Add new VSX dependencies.
14712
a6f3e723
SL
147132008-08-12 Pedro Alves <pedro@codesourcery.com>
14714
14715 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14716 (remote_open): Set or clear transport_is_reliable.
14717 (putpkt_binary): Don't expect acks in noack mode.
14718 (getpkt): Don't send ack/nac in noack mode.
14719 * server.c (handle_general_set): Handle QStartNoAckMode.
14720 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14721 qSupported.
14722 (main): Reset noack_mode on every connection.
14723 * server.h (noack_mode): Declare.
14724
a417dc56
RW
147252008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14726
14727 * Makefile.in (GDBREPLAY_OBS): New variable.
14728 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14729
3221518c
UW
147302008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14731 Daniel Jacobowitz <dan@codesourcery.com>
14732
14733 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14734 (usr_store_inferior_registers): Likewise.
14735 (regsets_store_inferior_registers): Likewise.
14736
ec56be1b
PA
147372008-07-31 Rolf Jansen <rj@surtec.com>
14738 Pedro Alves <pedro@codesourcery.com>
14739
14740 * configure.ac: Check for memmem declaration.
14741 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14742 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14743 (disable_packet_qfThreadInfo): Unconditionally compile.
14744 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14745 * configure, config.in: Regenerate.
14746
2fe5e3ff
DE
147472008-07-28 Doug Kwan <dougkwan@google.com>
14748
14749 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14750 (linux_write_memory): Remove declaration of errno.
14751
836acd6d
UW
147522008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14753
14754 * linux-low.c (handle_extended_wait): Do not use "status"
14755 variable uninitialized.
14756
aeba519e
PA
147572008-07-07 Pedro Alves <pedro@codesourcery.com>
14758
14759 * server.c (handle_v_attach): Inhibit reporting dll changes.
14760
db42f210
PA
147612008-06-27 Pedro Alves <pedro@codesourcery.com>
14762
14763 * remote-utils.c (prepare_resume_reply): If requested, don't
14764 output "thread:TID" in the T stop reply.
14765
14766 * server.c (disable_packet_vCont, disable_packet_Tthread)
14767 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14768 (handle_query): If requested, disable support for qC, qfThreadInfo
14769 and qsThreadInfo.
14770 (handle_v_requests): If requested, disable support for vCont.
14771 (gdbserver_show_disableable): New.
14772 (main): Handle --disable-packet and --disable-packet=LIST.
14773
14774 * server.h (disable_packet_vCont, disable_packet_Tthread)
14775 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14776
8e4c5421
CD
147772008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14778
14779 * server.c (gdbserver_usage): Mention --version.
14780
6e23a804
DJ
147812008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14782
14783 * Makefile.in (gdbreplay.o): New rule.
14784
90aa6a40
JM
147852008-06-06 Joseph Myers <joseph@codesourcery.com>
14786
14787 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14788 message, not gdbserver.
14789
c16158bc 147902008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14791 Nathan Sidwell <nathan@codesourcery.com>
14792 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14793
14794 * acinclude.m4: Include ../../config/acx.m4.
14795 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14796 * configure, config.in: Regenerate.
14797 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14798 * server.c (gdbserver_version): Print PKGVERSION.
14799 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14800 (main): Adjust gdbserver_usage calls.
14801 * gdbreplay.c (version, host_name): Add declarations.
14802 (gdbreplay_version, gdbreplay_usage): New.
14803 (main): Accept --version and --help options.
14804
aeb75bf5
DJ
148052008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14806
14807 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14808 (arm_breakpoint_at): Handle Thumb.
14809 (the_low_target): Add comment.
14810
76b233dd
UW
148112008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14812
14813 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14814
08388c79
DE
148152008-05-09 Doug Evans <dje@google.com>
14816
a3c83fae
DE
14817 * server.h (decode_search_memory_packet): Declare.
14818 * remote-utils.c (decode_search_memory_packet): New fn.
14819 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14820 (handle_search_memory): New fn.
14821 (handle_query): Process qSearch:memory packets.
14822
bb9c3d36
UW
148232008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14824
14825 * regcache.c (registers_length): Remove.
14826 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14827 full register packet.
14828 * regcache.h (registers_length): Remove prototype.
14829 * server.h (PBUFSIZ): Define to 16384.
14830
7284e1be
UW
148312008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14832
14833 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14834 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14835 powerpc-64l.o, and powerpc-altivec64l.o.
14836 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14837 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14838 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14839 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14840 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14841 to srv_xmlfiles.
14842
14843 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14844 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14845 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14846 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14847 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14848 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14849 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14850 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14851 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14852 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14853 (clean): Update.
14854
14855 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14856 (init_registers_powerpc_32l): ... this new prototype.
14857 (init_registers_powerpc_32): Remove, replace by ...
14858 (init_registers_powerpc_altivec32l): ... this new prototype.
14859 (init_registers_powerpc_e500): Remove, replace by ...
14860 (init_registers_powerpc_e500l): ... this new prototype.
14861 (init_registers_ppc64): Remove, replace by ...
14862 (init_registers_powerpc_64l): ... this new prototype.
14863 (init_registers_powerpc_64): Remove, replace by ...
14864 (init_registers_powerpc_altivec64l): ... this new prototype.
14865 (ppc_num_regs): Set to 73.
14866 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14867 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14868 (ppc_cannot_store_register): Handle orig_r3 and trap.
14869 (ppc_arch_setup): Update init_registers_... calls.
14870 (ppc_fill_gregset): Handle orig_r3 and trap.
14871
14872 * inferiors.c (clear_inferiors): Reset current_inferior.
14873
fdc59709
PB
148742008-04-23 Paolo Bonzini <bonzini@gnu.org>
14875
889bf7c5
PA
14876 * acinclude.m4: Add override.m4.
14877 * configure: Regenerate.
fdc59709 14878
c9b2f845
UW
148792008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14880
14881 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14882 initial call to init_register_ppc64.
14883
550512b8
UW
148842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14885
43aaf8b6
PA
14886 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14887 single powerpc*-*-linux* case.
550512b8
UW
14888 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14889
b6430ec3
UW
148902008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14891
14892 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14893 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14894 from reg_xmlfiles.
14895 * linux-ppc-low.c: Include <elf.h>.
14896 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14897 (ppc_hwcap): New global variable.
14898 (ppc_regmap): Remove __SPE__ #ifdef sections.
14899 (ppc_regmap_e500): New global variable.
14900 (ppc_cannot_store_register): Update __SPE__ special case.
14901 (ppc_get_hwcap): New function.
14902 (ppc_arch_setup): Use it to determine whether inferior supports
14903 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14904 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14905 Do not access registers if target does not support AltiVec.
14906 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14907 Do not access registers if target does not support SPE.
14908 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14909
52fa2412
UW
149102008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * linux-low.c (disabled_regsets, num_regsets): New.
14913 (use_regsets_p): Delete.
14914 (linux_wait_for_process): Clear disabled_regsets.
14915 (regsets_fetch_inferior_registers): Check and set it.
14916 (regsets_store_inferior_registers): Likewise.
14917 (linux_fetch_registers, linux_store_registers): Do not use
14918 use_regsets_p.
14919 (initialize_low): Allocate disabled_regsets.
14920
e28b3332
DJ
149212008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * Makefile.in (LIBOBJS): New.
14924 (OBS): Use LIBOBJS.
14925 (memmem.o): New rule.
14926 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14927 * configure: Regenerated.
14928
4536995d
UW
149292008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14930
14931 * server.c (handle_query): Never return "unsupported" for
14932 qXfer:features:read queries.
14933
221c031f
UW
149342008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14935
14936 * server.c (get_features_xml): Fix inverted condition.
14937 (handle_query): Always support qXfer:feature:read.
14938
ccd213ac
DJ
149392008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14940
14941 * server.c (wrapper_argv): New.
14942 (start_inferior): Handle wrapper_argv. If set, expect an extra
14943 trap.
14944 (gdbserver_usage): Document --wrapper.
14945 (main): Parse --wrapper.
14946
6fe305f7
UW
149472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14948
14949 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14950 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14951 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14952 (ppc_set_pc): Likewise.
14953 (ppc_arch_setup): New function.
14954 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14955 of collect_register.
889bf7c5 14956 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14957
5b0a002e
UW
149582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14959
14960 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14961 instead of linux-ppc64-low.o.
14962 * linux-ppc64-low.c: Remove file.
14963 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14964 (linux-ppc64-low.o): Remove rule.
14965
14966 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14967 (init_registers_powerpc_64): Likewise.
14968 (ppc_regmap): Conditionally define depending on __powerpc64__.
14969 (ppc_cannot_store_register): Do not special-case "fpscr" when
14970 compiled on __powerpc64__.
14971 (ppc_collect_ptrace_register): New function.
14972 (ppc_supply_ptrace_register): New function.
14973 (ppc_breakpoint): Change type to "unsigned int".
14974 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14975 (the_low_target): Conditionally provide initializers for the
889bf7c5 14976 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14977 collect_ptrace_register and supply_ptrace_register members.
14978
9b4b61c8
UW
149792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14980
14981 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14982 * server.c (gdbserver_xmltarget): Define.
14983 (get_features_xml): Use it to replace "target.xml" and arch_string.
14984
14985 * configure.srv: Remove srv_xmltarget. Add XML files that were
14986 mentioned there to srv_xmlfiles instead. Remove conditional tests
14987 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14988 srv_xmlfiles and srv_regobj to include all possible choices.
14989 * configure.ac (srv_xmltarget): Remove.
14990 (srv_xmlfiles): Do not add "target.xml".
14991 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14992 checks for supplementary target information.
14993 * configure: Regenerate.
14994 * Makefile.in (XML_TARGET): Remove.
14995 (target.xml): Remove rule.
14996 (clean): Do not clean up target.xml.
14997 (.PRECIOUS): Do not mention target.xml.
14998
14999 * target.h (struct target_ops): Remove arch_string member.
15000 * linux-low.c (linux_arch_string): Remove.
15001 (linux_target_ops): Remove arch_string initializer.
15002 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15003 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15004 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15005 * spu-low.c (spu_arch_string): Remove.
15006 (spu_target_ops): Remove arch_string initializer.
15007 * win32-low.c (win32_arch_string): Remove.
15008 (win32_target_ops): Remove arch_string initializer.
15009 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15010 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15011 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15012
ee1a7ae4
UW
150132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15014
15015 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15016 by collect_ptrace_register and supply_ptrace_register hooks.
15017 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15018 instead of checking for the_low_target.left_pad_xfer.
15019 (usr_store_inferior_registers): Use collect_ptrace_register callback
15020 instead of checking for the_low_target.left_pad_xfer.
15021
15022 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15023 (s390_supply_ptrace_register): Likewise.
15024 (s390_fill_gregset): Call s390_collect_ptrace_register.
15025 (the_low_target): Update.
15026
15027 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15028 (ppc_supply_ptrace_register): Likewise.
15029 (the_low_target): Update.
15030
15031 * linux-i386-low.c (the_low_target): Update.
15032 * linux-x86-64-low.c (the_low_target): Update.
15033
d61ddec4
UW
150342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15035
15036 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15037 reg-s390.o and reg-s390x.o.
15038
15039 * linux-low.c (new_inferior): New global variable.
15040 (linux_create_inferior, linux_attach): Set it.
15041 (linux_wait_for_process): Call the_low_target.arch_setup after the
15042 target has stopped for the first time.
15043 (initialize_low): Do not call the_low_target.arch_setup.
15044
15045 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15046 (s390_set_pc): Likewise.
15047 (s390_arch_setup): New function.
15048 (the_low_target): Use s390_arch_setup as arch_setup routine.
15049
15050 * regcache.c (realloc_register_cache): New function.
15051 (set_register_cache): Call it for each existing regcache.
15052
d05b4ac3
UW
150532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15054
15055 * server.h (init_registers): Remove prototype.
15056
15057 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15058 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15059 instead of init_registers ().
15060 * linux-arm-low.c (init_registers_arm): Add prototype.
15061 (init_registers_arm_with_iwmmxt): Likewise.
15062 (the_low_target): Add initializer for arch_setup field.
15063 * linux-cris-low.c (init_registers_cris): Add prototype.
15064 (the_low_target): Add initializer for arch_setup field.
15065 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15066 (the_low_target): Add initializer for arch_setup field.
15067 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15068 (the_low_target): Add initializer for arch_setup field.
15069 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15070 (the_low_target): Add initializer for arch_setup field.
15071 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15072 (the_low_target): Add initializer for arch_setup field.
15073 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15074 (the_low_target): Add initializer for arch_setup field.
15075 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15076 (init_registers_mips64_linux): Likewise.
15077 (the_low_target): Add initializer for arch_setup field.
15078 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15079 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15080 (the_low_target): Add initializer for arch_setup field.
15081 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15082 (init_registers_powerpc_64): Likewise.
15083 (the_low_target): Add initializer for arch_setup field.
15084 * linux-s390-low.c (init_registers_s390): Add prototype.
15085 (init_registers_s390x): Likewise.
15086 (the_low_target): Add initializer for arch_setup field.
15087 * linux-sh-low.c (init_registers_sh): Add prototype.
15088 (the_low_target): Add initializer for arch_setup field.
15089 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15090 (the_low_target): Add initializer for arch_setup field.
15091 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15092 (the_low_target): Add initializer for arch_setup field.
15093
15094 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15095 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15096 instead of init_registers ().
15097 * win32-arm-low.c (init_registers_arm): Add prototype.
15098 (the_low_target): Add initializer for arch_setup field.
15099 * win32-i386-low.c (init_registers_i386): Add prototype.
15100 (the_low_target): Add initializer for arch_setup field.
15101
15102 * spu-low.c (init_registers_spu): Add prototype.
15103 (initialize_low): Call initialie_registers_spu () instead of
15104 initialize_registers ().
15105
fd96d250
PA
151062008-02-19 Pedro Alves <pedro@codesourcery.com>
15107
15108 * server.c (handle_v_requests): When handling the vRun and vAttach
15109 packets, if already debugging a process, don't kill it. Return an
15110 error instead.
15111
d41b6bb4
DJ
151122008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15113
15114 * server.c (handle_query): Correct length check.
15115
5ac588cf
PA
151162008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15117
15118 * win32-low.c (do_initial_child_stuff): Add process handle
15119 parameter. Set current_process_handle and current_process_id from the
15120 parameters. Clear globals.
15121 (win32_create_inferior): Don't set current_process_handle and
15122 current_process_id here. Instead pass them on the call to
15123 do_initial_child_stuff.
15124 (win32_attach): Likewise.
15125 (win32_clear_inferiors): New.
15126 (win32_kill): Don't close the current process handle or the
15127 current thread handle here. Instead call win32_clear_inferiors.
15128 (win32_detach): Don't open a new handle to the process. Call
15129 win32_clear_inferiors.
15130 (win32_join): Don't rely on current_process_handle; open a new
15131 handle using the process id.
15132 (win32_wait): Call win32_clear_inferiors when the inferior process
15133 has exited.
15134
ecd7ecbc
DJ
151352008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * server.c (monitor_show_help): Add "exit".
15138
1525d545
MG
151392008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15140
ecd7ecbc 15141 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15142 (clean): Add reg-xtensa.c.
15143 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15144 * configure.srv (xtensa*-*-linux*) New target.
15145 * linux-xtensa-low.c: New.
15146 * xtensa-xtregs.c: New.
1525d545 15147
59a016f0
PA
151482008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15149
15150 * hostio.c: Don't include errno.h.
15151 (errno_to_fileio_errno): Move to hostio-errno.
15152 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15153 error number outputting to the target->hostio_last_error callback.
15154 (hostio_packet_error): Use FILEIO_EINVAL directly.
15155 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15156 calls to hostio_error.
15157 * hostio-errno.c: New.
15158 * server.h (hostio_last_error_from_errno): Declare.
15159 * target.h (target_ops): Add hostio_last_error member.
15160 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15161 as hostio_last_error handler.
889bf7c5 15162 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15163 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15164 (wince_hostio_last_error): New functions.
15165 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15166 as hostio_last_error handler.
15167 (win32_target_ops) [!_WIN32_WCE]: Register
15168 hostio_last_error_from_errno as hostio_last_error handler.
15169 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15170 (hostio-errno.o): New rule.
15171 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15172 * configure.srv (srv_hostio_err_objs): New variable. Default to
15173 hostio-errno.o.
15174 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15175 * configure: Regenerate.
15176
2d717e4f
DJ
151772008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15178
15179 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15180 (linux_kill, linux_detach): Clean up the process list.
15181 * remote-utils.c (remote_open): Improve port number parsing.
15182 (putpkt_binary, input_interrupt): Only send interrupts if the target
15183 is running.
15184 * server.c (extended_protocol): Make static.
15185 (attached): Define earlier.
15186 (exit_requested, response_needed, program_argv): New variables.
15187 (target_running): New.
15188 (start_inferior): Clear attached here.
15189 (attach_inferior): Set attached here.
15190 (require_running): Define.
15191 (handle_query): Use require_running and target_running. Implement
15192 "monitor exit".
15193 (handle_v_attach, handle_v_run): New.
15194 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15195 (gdbserver_usage): Update.
15196 (main): Redo argument parsing. Handle --debug and --multi. Handle
15197 --attach along with other options or after the port. Save
15198 program_argv. Support no initial program. Resynchronize
15199 communication with GDB after an error. Handle "monitor exit".
15200 Use require_running and target_running. Always allow the extended
15201 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15202 restart in extended mode.
15203 * README: Refer to the GDB manual. Update --attach usage.
15204
7407e2de
AS
152052007-12-20 Andreas Schwab <schwab@suse.de>
15206
15207 * linux-low.c (STACK_SIZE): Define.
15208 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15209 (linux_test_for_tracefork): Likewise.
15210
b65d95c5
DJ
152112007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * linux-low.c (linux_wait_for_event): Update messages. Do not
15214 reinsert auto-delete breakpoints.
15215 * mem-break.c (struct breakpoint): Change return type of handler to
15216 int.
15217 (set_breakpoint_at): Update handler type.
15218 (reinsert_breakpoint_handler): Return 1 instead of calling
15219 delete_breakpoint.
15220 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15221 setting a new one.
15222 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15223 * mem-break.h (set_breakpoint_at): Update handler type.
15224 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15225 * win32-low.c (auto_delete_breakpoint): New.
15226 (get_child_debug_event): Use it.
15227
4e799345
DJ
152282007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15229
15230 * configure.ac: Check for pread and pwrite.
15231 * hostio.c (handle_pread): Fall back to lseek and read.
15232 (handle_pwrite): Fall back to lseek and write.
15233 * config.in, configure: Regenerated.
15234
27524b67
DJ
152352007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15236
15237 * server.c (myresume): Add own_buf argument.
15238 (main): Update calls.
15239
a20d5e98
DJ
152402007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15243 * remote-utils.c (remote_open): Do not call disable_async_io.
15244 (block_async_io): Delete.
15245 (unblock_async_io): Make static.
15246 (initialize_async_io): New.
15247 * server.c (handle_v_cont): Handle async I/O here.
15248 (myresume): Likewise. Move other common resume tasks here...
15249 (main): ... from here. Call initialize_async_io. Disable async
15250 I/O before the main loop.
15251 * server.h (initialize_async_io): Declare.
15252 (block_async_io, unblock_async_io): Delete prototypes.
15253 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15254
b79d787e
DJ
152552007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15256
15257 * remote-utils.c (readchar): Allow binary data in received messages.
15258
d97903b2
PA
152592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15260
15261 * win32-low.c (attaching): New global.
15262 (win32_create_inferior): Clear the `attaching' global.
15263 (win32_attach): Set the `attaching' global.
15264 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15265 attaching. Only set a breakpoint at the entry point if not
15266 attaching.
15267
311de423
PA
152682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15269
15270 * server.c (main): Don't report dll events on the initial
15271 connection on attaches.
15272
6c2d16d2
PA
152732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15274
15275 * server.c (main): Relax numerical bases supported for the pid of
15276 the --attach command line argument.
15277
5ca906e6
PA
152782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15279
15280 * win32-low.c (win32_attach): Call OpenProcess before
15281 DebugActiveProcess, not after. Add last error output to error
15282 call.
15283
9c6c8194
PA
152842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15285
15286 * win32-low.c (win32_get_thread_context)
15287 (win32_set_thread_context): New functions.
15288 (thread_rec): Use win32_get_thread_context.
15289 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15290 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15291 field.
15292
4d5d1aaa
PA
152932007-12-03 Leo Zayas
15294 Pedro Alves <pedro_alves@portugalmail.pt>
15295
15296 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15297 global variables.
15298 (child_add_thread): Minor cleanup.
15299 (child_continue): Resume artificially suspended threads before
15300 calling ContinueDebugEvent.
15301 (suspend_one_thread): New.
15302 (fake_breakpoint_event): New.
15303 (get_child_debug_event): Change return type to int. Check here if
15304 gdb sent an interrupt request. If a soft interrupt was requested,
15305 fake a breakpoint event. Return 0 if there is no event to handle,
15306 and 1 otherwise.
15307 (win32_wait): Don't check here if gdb sent an interrupt request.
15308 Ensure there is a valid event to handle.
15309 (win32_request_interrupt): Add soft interruption method as last
15310 resort.
15311
c436e841
PA
153122007-12-03 Leo Zayas
15313 Pedro Alves <pedro_alves@portugalmail.pt>
15314
15315 * win32-low.h (win32_thread_info): Add descriptions to the
15316 structure members. Replace `suspend_count' counter by a
15317 `suspended' flag.
15318 * win32-low.c (thread_rec): Update condition of when to get the
15319 context from the inferior. Rely on ContextFlags being set if it
15320 has already been retrieved. Only suspend the inferior thread if
15321 we haven't already. Warn if that fails.
15322 (continue_one_thread): s/suspend_count/suspended/. Only call
15323 ResumeThread once. Warn if that fails.
15324
e7b5fa67
PA
153252007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15326
15327 * win32-low.c (win32_wait): Don't read from the inferior when it
15328 has already exited.
15329
a385171d
PA
153302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15331
15332 * Makefile.in (win32_low_h): New variable.
15333 (win32-low.o): Add dependency on $(win32_low_h).
15334 (win32-arm-low.o, win32-i386-low.o): New rules.
15335
f80c84b3
DJ
153362007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * hostio.c: Correct copyright year.
15339
a6b151f1
DJ
153402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15341
15342 * Makefile.in (OBS): Add hostio.o.
15343 (hostio.o): New rule.
15344 * server.h (handle_vFile): Declare.
15345 * hostio.c: New file.
15346 * server.c (handle_v_requests): Take packet_len and new_packet_len
15347 for binary packets. Call handle_vFile.
15348 (main): Update call to handle_v_requests.
15349
f9387fc3
DJ
153502007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15351
15352 * linux-low.c: Include <sched.h>.
15353
51c2684e
DJ
153542007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15355
15356 * linux-low.c (linux_tracefork_grandchild): New.
15357 (linux_tracefork_child): Use clone.
15358 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15359
75f83163
JB
153602007-10-31 Joel Brobecker <brobecker@adacore.com>
15361
15362 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15363
da5898ce
DJ
153642007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15365
15366 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15367
24a09b5f
DJ
153682007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15369
15370 * inferiors.c (change_inferior_id): Delete.
15371 (add_pid_to_list, pull_pid_from_list): New.
15372 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15373 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15374 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15375 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15376 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15377 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15378 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15379 (using_threads): Always set to 1.
15380 (handle_extended_wait): New.
15381 (add_process): Do not set TID.
15382 (linux_create_inferior): Set must_set_ptrace_flags.
15383 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15384 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15385 (linux_thread_alive): Rename TID argument to LWPID.
15386 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15387 (linux_wait_for_event): Do not use TID or check using_threads. Update
15388 call to dead_thread_notify. Call handle_extended_wait.
15389 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15390 (send_sigstop): Delete sigstop_sent.
15391 (wait_for_sigstop): Avoid TID.
15392 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15393 (linux_test_for_tracefork): New.
15394 (linux_lookup_signals): Use thread_db_active and
15395 linux_supports_tracefork_flag.
15396 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15397 * linux-low.h (get_process_thread): Avoid TID.
15398 (struct process_ifo): Move thread_known and tid to the end. Remove
15399 sigstop_sent.
15400 (linux_attach_lwp, thread_db_init): Update prototypes.
15401 * server.h (change_inferior_id): Delete prototype.
15402 (add_pid_to_list, pull_pid_from_list): New prototypes.
15403 * thread-db.c (thread_db_use_events): New.
15404 (find_first_thread): Rename to...
15405 (find_one_thread): ...this. Update callers and messages. Do not
15406 call fatal. Check thread_db_use_events. Do not call
15407 change_inferior_id or new_thread_notify.
15408 (maybe_attach_thread): Update. Do not call new_thread_notify.
15409 (thread_db_init): Set thread_db_use_events. Check use_events.
15410 * utils.c (fatal, warning): Correct message prefix.
15411
30ed0a8f
DJ
154122007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * Makefile.in (clean): Remove new files.
15415 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15416 (powerpc-64.o, powerpc-64.c): New rules.
15417 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15418 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15419 with SPE.
15420 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15421 SPE targets.
15422 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15423 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15424 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15425 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15426 (target_regsets): Add AltiVec and SPE register sets.
15427 * configure.ac: Check for AltiVec and SPE.
15428 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15429 (ppc_fill_vrregset, ppc_store_vrregset): New.
15430 (target_regsets): Add AltiVec register set.
15431 * configure: Regenerated.
15432
fd462a61
DJ
154332007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15434
15435 * linux-low.c (O_LARGEFILE): Define.
15436 (linux_read_memory): Use /proc/PID/mem.
15437 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15438 * configure, config.in: Regenerated.
15439
69f223ed
DJ
154402007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15441
15442 * linux-low.c (linux_wait_for_event): Do not pass signals while
15443 single-stepping.
15444
aec18585
PA
154452007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15446
15447 * win32-low.c (create_process): New.
15448 (win32_create_inferior): Use create_process instead of
15449 CreateProcess. If create_process failed retry appending an ".exe"
15450 suffix. Store the GetLastError result immediatelly after
15451 create_process calls and use it on the call to error.
15452
34d86ddd
PA
154532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15454
15455 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15456
5a0e3bd0
JB
154572007-08-23 Joel Brobecker <brobecker@adacore.com>
15458
15459 * configure.ac: Switch license to GPLv3.
15460
f88c79e6
MS
154612007-08-01 Michael Snyder <msnyder@access-company.com>
15462
15463 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15464
6b3d9b83
PA
154652007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15466
15467 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15468 typedef.
15469 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15470 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15471 CloseToolhelp32Snapshot.
15472 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15473 CloseToolhelp32Snapshot.
15474
c588c53c
MS
154752007-07-27 Michael Snyder <michael.snyder@access-company.com>
15476
15477 * server.c (main): Check for inferior exit before main loop.
15478
aa0403d9
PA
154792007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15480
15481 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15482 instead of on tmp_desc.
15483
255e7678
DJ
154842007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15485 Daniel Jacobowitz <dan@codesourcery.com>
15486
15487 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15488 (add_thread): Minor cleanups.
15489 (clear_inferiors): Move lower in the file. Clear the DLL
15490 list.
15491 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15492 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15493 (xml_escape_text): New.
15494 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15495 for qSupported.
15496 (handle_v_cont): Report errors.
15497 (gdbserver_version): Update.
15498 (main): Correct size of own_buf. Do not report initial DLL events.
15499 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15500 (unloaded_dll, xml_escape_text): New.
15501 * win32-low.c (enum target_waitkind): Update comments.
15502 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15503 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15504 (win32_EnumProcessModules, win32_GetModuleInformation)
15505 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15506 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15507 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15508 (win32_Module32First, win32_Module32Next, load_toolhelp)
15509 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15510 (get_child_debug_event): Handle DLL events.
15511 (win32_wait): Likewise.
15512
0d37add9
DJ
155132007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15514
15515 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15516 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15517
45e2715e
PA
155182007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15519
15520 * win32-low.c (handle_output_debug_string): Ignore event if not
15521 waiting.
15522
c5674cf1
PA
155232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15524
15525 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15526
2bbe3cc1
DJ
155272007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15528
15529 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15530
ae13219e
DJ
155312007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15532
15533 * inferiors.c (change_inferior_id): Add comment.
15534 * linux-low.c (check_removed_breakpoint): Add an early
15535 prototype. Improve debug output.
15536 (linux_attach): Doc update.
15537 (linux_detach_one_process, linux_detach): Clean up before releasing
15538 each process.
15539 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15540 * linux-low.h (struct process_info): Doc improvement.
15541 * mem-break.c (delete_all_breakpoints): New.
15542 * mem-break.h (delete_all_breakpoints): New prototype.
15543 * thread-db.c (find_first_thread): New.
15544 (thread_db_create_event): Call it instead of
15545 thread_db_find_new_threads. Clean up unused variables.
15546 (maybe_attach_thread): Remove first thread handling.
15547 (thread_db_find_new_threads): Use find_first_thread.
15548 (thread_db_get_tls_address): Likewise.
15549
4105de34
DJ
155502007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15551
15552 * thread-db.c (thread_db_find_new_threads): Add prototype.
15553 (thread_db_create_event): Check for the main thread before adding
15554 a new thread.
15555 (maybe_attach_thread): Only enable event reporting if TID == 0.
15556 (thread_db_get_tls_address): Check for new threads.
15557
2b876972
DJ
155582007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15559
15560 * linux-low.c (linux_create_inferior): Try execv before execvp.
15561 * spu-low.c (spu_create_inferior): Likewise.
15562
7a245884
DJ
155632007-06-13 Mike Frysinger <vapier@gentoo.org>
15564
15565 * linux-low.c (linux_create_inferior): Change execv to execvp.
15566 * spu-low.c (spu_create_inferior): Likewies.
15567
117ce543
DJ
155682007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15569
15570 * Makefile.in (clean): Clean new files instead of deleted ones.
15571 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15572 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15573 rules.
15574 * configure.srv: Specify XML files and new regformats for MIPS and
15575 MIPS64 GNU/Linux.
15576 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15577 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15578 an entry for the restart register.
15579 (mips_cannot_fetch_register, mips_cannot_store_register)
15580 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15581 register names to match the XML descriptions.
15582 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15583 restart register instead of $0.
15584
0e7f50da
UW
155852007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15586 Markus Deuling <deuling@de.ibm.com>
15587
15588 * remote-utils.c (decode_xfer_write): New function.
15589 * server.h (decode_xfer_write): Add prototype.
15590 * server.c (handle_query): Add PACKET_LEN argument. Support
15591 qXfer:spu:read and qXfer:spu:write packets.
15592 (main): Pass packet_len to handle_query.
15593 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15594 * target.h (target_ops): Add qxfer_spu.
15595
374c1d38
UW
155962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15599 accessing non-seekable spufs files.
15600
bb63802a
UW
156012007-05-16 Markus Deuling <deuling@de.ibm.com>
15602
889bf7c5 15603 * server.c (handle_query): Add reply for qC packet.
bb63802a 15604
7390519e
PA
156052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15606 Leo Zayas <lerele@champenstudios@com>
15607
15608 * server.h (check_remote_input_interrupt_request): New function.
15609 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15610 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15611 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15612 (check_remote_input_interrupt_request): New function.
15613 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15614 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15615 winapi_GenerateConsoleCtrlEvent): New typedefs.
15616 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15617 to 250 ms.
15618 (win32_wait): Check for remote interrupt request
15619 with check_remote_input_interrupt_request.
15620 (win32_request_interrupt): New function.
15621 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15622
34b34921
PA
156232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15624
15625 * win32-low.c (debug_registers_changed,
15626 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15627 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15628 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15629 (thread_rec): Get context using the low target.
15630 (child_add_thread): Call thread_added on the low target,
15631 which does the same thing.
15632 (regptr): Delete.
15633 (do_initial_child_stuff): Remove debug registers references.
15634 Set context using the low target. Resume threads after
15635 setting the contexts.
15636 (child_continue): Remove dead variable. Remove debug
15637 registers references.
15638 (child_fetch_inferior_registers): Go through the low target.
15639 (do_child_store_inferior_registers): Remove.
15640 (child_store_inferior_registers): Go through the low target.
15641 (win32_resume): Remove debug registers references.
15642 Set context using the low target.
15643 (handle_exception): Change return type to void. Don't record
15644 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15645 first chance exception.
889bf7c5 15646 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15647 goto loop. Always return after waiting for debug event.
15648 (win32_wait): Convert to switch statement. Handle spurious
15649 events.
15650
15651 * win32-i386-low.c (debug_registers_changed,
15652 debug_registers_used): New.
15653 (initial_stuff): Rename to ...
15654 (i386_initial_stuff): ... this. Clear debug registers
15655 state variables.
15656 (store_debug_registers): Delete.
15657 (i386_get_thread_context): New.
15658 (load_debug_registers): Delete.
15659 (i386_set_thread_context): New.
15660 (i386_thread_added): New.
15661 (single_step): Rename to ...
15662 (i386_single_step): ... this.
15663 (do_fetch_inferior_registers): Rename to ...
15664 (i386_fetch_inferior_register): ... this.
15665 (i386_store_inferior_register): New.
15666 (the_low_target): Adapt to new interface.
15667
15668 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15669 (arm_get_thread_context): New.
15670 (arm_set_thread_context): New.
15671 (regptr): New.
15672 (do_fetch_inferior_registers): Rename to ...
15673 (arm_fetch_inferior_register): ... this.
15674 (arm_store_inferior_register): New.
15675 (arm_wince_breakpoint): Reimplement as unsigned long.
15676 (arm_wince_breakpoint_len): Define.
15677 (the_low_target): Adapt to new interface.
15678
15679 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15680 load_debug_registers. Add get_thread_context, set_thread_context,
15681 thread_added and store_inferior_register. Rename
15682 fetch_inferior_registers to fetch_inferior_register.
15683 (regptr): Remove declaration.
15684
dd6953e1
PA
156852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15686
15687 * linux-low.c (linux_detach): Change return type to int. Return 0.
15688 * spu-low.c (spu_detach): Likewise.
15689
444d6139
PA
156902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15691
15692 * target.h (target_ops): Change return type of detach to int.
15693 Add join.
15694 (join_inferior): New.
15695 * server.c (main): Don't skip detach support on mingw32.
15696 If the inferior doesn't support detaching return error.
15697 Call join_inferior instead of using waitpid.
15698 * linux-low.c (linux_join): New.
15699 (linux_target_op): Add linux_join.
15700 * spu-low.c (spu_join): New.
15701 (spu_target_ops): Add spu_join.
15702 * win32-low.c (win32_detach): Adapt to new interface.
15703 Reopen current_process_handle before detaching. Issue a child
15704 resume before detaching.
15705 (win32_join): New.
15706 (win32_target_op): Add win32_join.
15707
1d5315fe
PA
157082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15709
15710 * win32-low.c (win32-attach): Fix return value.
15711 * target.h (target_ops): Describe ATTACH return values.
15712
bf914831
PA
157132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15714
15715 * win32-low.c (GETPROCADDRESS): Define.
15716 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15717 (winapi_DebugSetProcessKillOnExit): Likewise.
15718 (win32_create_inferior): Force usage of ansi CreateProcessA.
15719 (win32_attach): Use GETPROCADDRESS.
15720 (win32_detach): Likewise.
15721
f72f3e60
PA
157222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15723
15724 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15725
ed50f18f
PA
157262007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15727
15728 * win32-low.c: Commit leftover changes from 2007-03-29.
15729
0c2ead7e
DJ
157302007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15733 fields short instead of int. Add explicit padding.
15734 (i387_cache_to_fsave): Remove unnecessary casts.
15735 (i387_fsave_to_cache): Doc fix.
15736 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15737
73725ff3
DJ
157382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15739
15740 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15741 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15742
d99f33d8
PA
157432007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15744
15745 * configure.srv (arm*-*-mingw32ce*): Move near the other
15746 arm targets.
15747
68070c10
PA
157482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15749
2482afc6 15750 * configure.ac: Add errno checking.
68070c10
PA
15751 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15752 sys/file.h and malloc.h.
15753 (AC_CHECK_DECLS): Add perror.
15754 (srv_mingwce): Handle.
2482afc6 15755 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15756 win32-i386-low.o to srv_tgtobj.
15757 (i[34567]86-*-mingw*): Likewise.
15758 (arm*-*-mingw32ce*): Add case.
15759 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15760 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15761 [__MINGW32CE__] (strerror): New function.
15762 [__MINGW32CE__] (errno): Define to GetLastError.
15763 [__MINGW32CE__] (COUNTOF): New macro.
15764 (remote_open): Remove extra close call.
15765 * mem-break.c (delete_breakpoint_at): New function.
15766 * mem-break.h (delete_breakpoint_at): Declare.
15767 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15768 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15769 [USE_WIN32API] (read, write): Add char* casts.
15770 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15771 * server.h: Include wincecompat.h on Windows CE.
15772 [HAVE_ERRNO_H]: Check.
15773 (perror): Declare if not declared.
15774 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15775 (perror_with_name): Remove errno declaration.
15776 * wincecompat.h: New.
15777 * wincecompat.c: New.
15778 * win32-low.h: New.
15779 * win32-arm-low.c: New.
15780 * win32-i386-low.c: New.
15781 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15782 (OUTMSG2): Make it safe.
15783 (_T): New macro.
15784 (COUNTOF): New macro.
15785 (NUM_REGS): Get it from the low target.
15786 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15787 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15788 (thread_rec): Let low target handle debug registers.
15789 (child_add_thread): Likewise.
15790 (child_init_thread_list): Likewise.
15791 (continue_one_thread): Likewise.
15792 (regptr): New.
15793 (do_child_fetch_inferior_registers): Move to ...
15794 * win32-i386-low.c: ... here, and rename to ...
15795 (do_fetch_inferior_registers): ... this.
889bf7c5 15796 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15797 Go through the low target.
15798 (do_child_store_inferior_registers): Use regptr.
15799 (strwinerror): New function.
15800 (win32_create_inferior): Handle Windows CE.
15801 Use strwinerror instead of strerror on Windows error
15802 codes. Add program to the error output.
15803 Don't close the main thread handle on Windows CE.
15804 (win32_attach): Use coredll.dll on Windows CE.
15805 (win32_kill): Close current process and current
15806 thread handles.
15807 (win32_detach): Use coredll.dll on Windows CE.
15808 (win32_resume): Let low target handle debug registers, and
15809 step request.
15810 (handle_exception): Add/Remove initial breakpoint. Avoid
15811 non-existant WSTOPSIG on Windows CE.
15812 (win32_read_inferior_memory): Cast to remove warning.
15813 (win32_arch_string): Go through the low target.
15814 (initialize_low): Call set_breakpoint_data with the low
15815 target's breakpoint.
15816 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15817 FOP_REGNUM, mappings): Move to ...
15818 * win32-i386-low.c: ... here.
15819 * win32-low.c (win32_thread_info): Move to ...
15820 * win32-low.h: ... here.
15821 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15822 win32-arm-low.c and wincecompat.c.
15823 (all:): Add $EXEEXT.
15824 (install-only:): Likewise.
15825 (gdbserver:): Likewise.
15826 (gdbreplay:): Likewise.
15827 * config.in: Regenerate.
15828 * configure: Regenerate.
15829
41093d81
PA
158302007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15831
15832 * win32-low.c: Rename typedef thread_info to
15833 win32_thread_info throughout.
15834
544afa54
PA
158352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15836
15837 * win32-i386-low.c: Rename to ...
15838 * win32-low.c: ... this.
15839 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15840 * Makefile.in: Likewise.
15841
bce7165d
PA
158422007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15843
15844 * remote-utils.c (monitor_output): Constify msg parameter.
15845 * server.h (monitor_output): Likewise.
15846 * win32-i386-low.c (handle_output_debug_string): New.
15847 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15848 handle_output_debug_string.
15849 (get_child_debug_event): Likewise.
15850
506c7aa0
DJ
158512007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15852
15853 * server.c (main): Correct strtoul check.
15854
42c81e2a
DJ
158552007-03-27 Jon Ringle <jon@ringle.org>
15856
15857 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15858
9453113a
DJ
158592007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15860
15861 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15862
64a69107
DJ
158632007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15864
15865 * terminal.h: Check HAVE_SGTTY_H.
15866
158672007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15868
15869 * remote-utils.c (remote_open): Print out the assigned port number.
15870
c74d0ad8
DJ
158712007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15872
15873 * remote-utils.c (monitor_output): New function.
15874 * server.c (debug_threads): Define here.
15875 (monitor_show_help): New function.
15876 (handle_query): Handle qRcmd.
15877 (main): Do not handle 'd' packet.
15878 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15879 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15880 of debug_threads.
15881
de7c3b4a
PA
158822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15883
15884 * Makefile.in (EXEEXT): New.
15885 (clean): Use $(EXEEXT).
15886
ef57601b
PA
158872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15888
15889 * target.h (target_ops): Rename send_signal to request_interrupt,
15890 and remove enum target_signal parameter.
15891 * linux-low.c (linux_request_interrupt): Rename from
15892 linux_send_signal, and always send SIGINT.
15893 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15894 and always send SIGINT.
15895 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15896 of send_signal.
15897 (input_interrupt): Likewise.
15898
820f2bda
PA
158992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15900
15901 * server.c (get_features_xml): Check if target implemented
15902 arch_string.
15903 * win32-i386-low.c (win32_arch_string): New.
15904 (win32_target_ops): Add win32_arch_string as arch_string member.
15905
ab39bf24
UW
159062007-02-22 Markus Deuling <deuling@de.ibm.com>
15907
15908 * spu-low.c (spu_arch_string): New.
15909 (spu_target_ops): Add spu_arch_string.
15910
61ff6e04
DJ
159112007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15912
15913 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15914 * configure.ac: Do not check for terminal.h.
15915 * configure, config.in: Regenerated.
15916
fb1e4ffc
DJ
159172007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15918
15919 * Makefile.in (OBS): Add $(XML_BUILTIN).
15920 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15921 (clean): Update.
15922 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15923 (arm-with-iwmmxt.c): New.
15924 * config.in, configure: Regenerate.
15925 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15926 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15927 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15928 (arm*-*-linux*): Add iWMMXt and regset support.
15929 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15930 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15931 (arm_store_wmmxregset, target_regsets): New.
15932 * server.c (get_features_xml): Take annex argument. Check builtin
15933 XML documents.
15934 (handle_query): Handle multiple annexes.
15935
0f48aa01
DJ
159362007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15937
15938 * remote-utils.c [USE_WIN32API] (read, write): Define.
15939 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15940 write.
15941
23181151
DJ
159422007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * linux-i386-low.c (the_low_target): Set arch_string.
15945 * linux-x86-64-low.c (the_low_target): Likewise.
15946 * linux-low.c (linux_arch_string): New.
15947 (linux_target_ops): Add it.
15948 * linux-low.h (struct linux_target_ops): Add arch_string.
15949 * server.c (write_qxfer_response): Use const void * for DATA.
15950 (get_features_xml): New.
15951 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15952 * target.h (struct target_ops): Add arch_string method.
15953
9d606399
DJ
159542007-01-03 Denis Pilat <denis.pilat@st.com>
15955 Daniel Jacobowitz <dan@codesourcery.com>
15956
15957 * linux-low.c (linux_kill): Handle being called with no threads.
15958 * win32-i386-low.c (win32_kill): Likewise.
15959 (get_child_debug_event): Clear current_process_handle.
15960
159612006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15962 Daniel Jacobowitz <dan@codesourcery.com>
15963
15964 * remote-utils.c (remote_open): Check the type of specified
15965 serial port devices before opening them.
15966 * server.c (main): Kill the inferior if an error occurs during
15967 the first remote_open.
15968
a5e13d24
DJ
159692006-12-05 Markus Deuling <deuling@de.ibm.com>
15970
15971 * README: Update supported targets.
15972
186947f7
DJ
159732006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15974
15975 * Makefile.in (clean): Remove reg-mips64.c.
15976 (reg-mips64.c, reg-mips64.o): New rules.
15977 * configure.srv: Handle mips64. Include regset support for mips.
15978 * linux-mips-low.c (union mips_register): New.
15979 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15980 (mips_breakpoint, mips_breakpoint_at): Use int.
15981 (mips_collect_register, mips_supply_register)
15982 (mips_collect_register_32bit, mips_supply_register_32bit)
15983 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15984 (mips_store_fpregset, target_regsets): New.
15985 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15986
a13e2c95
UW
159872006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15988
15989 * configure.srv: Add target "spu*-*-*".
15990 * Makefile.in (clean): Remove reg-spu.c.
15991 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15992 * spu-low.c: New file.
15993
cb7283db
DJ
159942006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15995
15996 * configure.ac: Correct td_thr_tls_get_addr test.
15997 * configure: Regenerated.
15998
89be2091
DJ
159992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * linux-low.c (linux_wait_for_event): Reformat. Use the
16002 pass_signals array.
16003 * remote-utils.c (decode_address_to_semicolon): New.
16004 * server.c (pass_signals, handle_general_set): New.
16005 (handle_query): Mention QPassSignals for qSupported.
16006 (main): Call handle_general_set.
16007 * server.h (pass_signals, decode_address_to_semicolon): New.
16008
000ef4f0
DJ
160092006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * server.c (handle_query): Correct error handling for read_auxv.
16012
b7149293
UW
160132005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16014
16015 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16016 and srv_linux_thread_db to yes.
16017 * linux-s390-low.c (s390_fill_gregset): New function.
16018 (target_regsets): Define data structure.
16019
dae5f5cf
DJ
160202006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16021
16022 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16023 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16024 * config.in, configure: Regenerated.
16025 * inferiors.c (gdb_id_to_thread): New function.
16026 (gdb_id_to_thread_id): Use it.
16027 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16028 * linux-low.h (struct process_info): Add th member.
16029 (thread_db_get_tls_address): New prototype.
16030 * remote-utils.c (decode_address): Make non-static.
16031 * server.c (handle_query): Handle qGetTLSAddr.
16032 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16033 * target.h (struct target_ops): Add get_tls_address.
16034 * thread-db.c (maybe_attach_thread): Save the thread handle.
16035 (thread_db_get_tls_address): New.
16036
32ca6d61
DJ
160372006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16038
16039 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16040 (linux_resume_one_process): Take a siginfo_t *. Update all
16041 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16042 (struct pending_signals): Add a siginfo_t.
16043 (linux_wait_for_process): Always set last_status.
16044 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16045 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16046 * linux-low.h (struct process_info): Add last_status.
16047
5ffff7c1
DJ
160482006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16049
16050 * remote-utils.c (try_rle): New function.
16051 (putpkt_binary): Use it.
16052
8695c747
DJ
160532006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16054
16055 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16056 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16057 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16058 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16059 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16060 point registers.
16061
290fadea
RS
160622006-08-08 Richard Sandiford <richard@codesourcery.com>
16063
16064 * server.c (terminal_fd): New variable.
16065 (old_foreground_pgrp): Likewise.
16066 (restore_old_foreground_pgrp): New function.
16067 (start_inferior): Record the terminal file descriptor in terminal_fd
16068 and its original foreground group in old_foreground_pgrp. Register
16069 restore_old_foreground_pgrp with atexit().
16070
9f2e1e63
DJ
160712006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16072
16073 * server.c (handle_query): Correct qPart to qXfer.
16074
b80864fb
DJ
160752006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16076
16077 * configure.ac: Check for more headers which are missing on
16078 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16079 * configure.srv: Add Cygwin and mingw32.
16080 * remote-utils.c: Don't include headers unconditionally which
16081 are missing on mingw32. Include <winsock.h> for mingw32.
16082 (remote_open): Adjust for mingw32 support. Flush
16083 standard error after writing to it.
16084 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16085 (unblock_async_io, enable_async_io, disable_async_io)
16086 (readchar, getpkt): Update for Winsock support.
16087 (prepare_resume_reply): Expect a protocol signal number.
16088 * server.c: Disable <sys/wait.h> on mingw32.
16089 (start_inferior): Adjust for mingw32 support. Flush
16090 standard error after writing to it.
16091 (attach_inferior): Likewise. Use protocol signal
16092 numbers.
16093 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16094 and names.
16095 * win32-i386-low.c: New file.
16096 * Makefile.in (XM_CLIBS): Set.
16097 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16098 (win32-i386-low.o): New dependency rule.
16099 * linux-low.c (linux_wait): Use target signal numbers.
16100 * target.h (struct target_ops): Doc fix.
16101 * server.h (target_signal_to_name): New prototype.
16102 * gdbreplay.c: Don't include headers unconditionally which
16103 are missing on mingw32. Include <winsock.h> for mingw32.
16104 (remote_close, remote_open): Adjust for Winsock support.
16105 * configure, config.in: Regenerated.
16106
0876f84a
DJ
161072006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16108
16109 * server.c (decode_xfer_read, write_qxfer_response): New.
16110 (handle_query): Take a packet length argument. Handle
16111 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16112 the qSupported response.
16113 (main): Update call to handle_query.
16114
01f9e8fa
DJ
161152006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16116
16117 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16118 (putpkt_binary): Renamed from putpkt and adjusted for binary
16119 data.
16120 (putpkt): New wrapper for putpkt_binary.
16121 (readchar): Don't mask off the high bit.
16122 (decode_X_packet): New function.
16123 * server.c (main): Call putpkt_binary if a handler sets the packet
16124 length. Save the length of the incoming packet. Handle 'X'.
16125 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16126
be2a5f71
DJ
161272006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16128
16129 * server.c (handle_query): Handle qSupported.
16130
ea025f5f
DJ
161312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16132
16133 * remote-utils.c (all_symbols_looked_up): New variable.
16134 (look_up_one_symbol): Check it.
16135 * server.h (look_up_one_symbol): New declaration.
16136 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16137
9308fc88
DJ
161382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16141 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16142 (PTRACE_GET_THREAD_AREA): Define.
16143 (ps_get_thread_area): New function.
16144
52fb6437
NS
161452006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16146
16147 * configure.srv (m68k*-*-uclinux*): New target.
16148 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16149 (linux_resume_one_process): Remove extraneous cast.
16150 (linux_read_offsets): New.
16151 (linux_target_op): Add linux_read_offsets on mmuless systems.
16152 * server.c (handle_query): Add qOffsets logic.
16153 * target.h (struct target_ops): Add read_offsets.
16154
21b0f40c
DJ
161552006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16156
16157 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16158 (PTRACE_GET_THREAD_AREA): Define.
16159 (ps_get_thread_area): New function.
16160 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16161 (linux-x86-64-low.o): Update.
16162
0050a760
DJ
161632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16164
16165 * configure.ac: Remove checks for prfpregset_t.
16166 * gdb_proc_service.h: New file.
16167 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16168 new "gdb_proc_service.h".
16169 * proc-service.c: Likewise.
16170 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16171 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16172 * Makefile.in (gdb_proc_service_h): Updated.
16173 * configure, config.in: Regenerated.
16174
b92a518e
DJ
161752006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * remote-utils.c (prepare_resume_reply): Move declaration
16178 of gdb_id_from_wait to the top of the block.
16179
545587ee
DJ
161802006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * linux-low.c (regsets_store_inferior_registers): Read the regset
16183 from the target before filling it.
16184
9db87ebd
DJ
161852006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16186
16187 * server.c (attach_inferior): Return SIGTRAP for a successful
16188 attach.
16189
dd24457d
DJ
161902006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16191
16192 * Makefile.in (OBS): Add version.o.
16193 (STAGESTUFF): Delete.
16194 (version.o): Add dependencies.
16195 (version.c): Replace rule.
16196 (clean): Remove version.c.
16197 * server.c (gdbserver_version): New.
16198 (gdbserver_usage): Use printf.
16199 (main): Handle --version and --help.
16200 * server.h (version, host_name): Add declarations.
16201
6f0f660e
EZ
162022005-12-23 Eli Zaretskii <eliz@gnu.org>
16203
889bf7c5
PA
16204 * linux-arm-low.c:
16205 * linux-arm-low.c:
16206 * inferiors.c:
16207 * i387-fp.h:
16208 * i387-fp.c:
16209 * gdbreplay.c:
16210 * regcache.c:
16211 * proc-service.c:
16212 * mem-break.h:
16213 * mem-break.c:
16214 * linux-x86-64-low.c:
16215 * linux-sh-low.c:
16216 * linux-s390-low.c:
16217 * linux-ppc64-low.c:
16218 * linux-ppc-low.c:
16219 * linux-mips-low.c:
16220 * linux-m68k-low.c:
16221 * linux-m32r-low.c:
16222 * linux-low.h:
16223 * linux-low.c:
16224 * linux-ia64-low.c:
16225 * linux-i386-low.c:
16226 * linux-crisv32-low.c:
16227 * thread-db.c:
16228 * terminal.h:
16229 * target.h:
16230 * target.c:
16231 * server.h:
16232 * server.c:
16233 * remote-utils.c:
16234 * regcache.h:
16235 * utils.c:
16236 * Makefile.in:
16237 * configure.ac:
6f0f660e
EZ
16238 * gdbserver.1: Add (C) after Copyright. Update the FSF
16239 address.
16240
9d1fb177
DJ
162412005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16242
16243 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16244 (arm_breakpoint_at): Recognize both breakpoints.
16245 (the_low_target): Use the correct breakpoint instruction.
16246
011a70c2
DJ
162472005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16248
16249 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16250 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16251 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16252 (the_low_target): Update.
16253
7fb85e41
AS
162542005-10-25 Andreas Schwab <schwab@suse.de>
16255
16256 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16257
16258 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16259 (ia64_num_regs): Reduce to 462.
16260
3db0444b
DJ
162612005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * acinclude.m4: Correct quoting.
16264 * aclocal.m4: Regenerated.
16265
16266 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16267 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16268 (thread_db_init): Call thread_db_err_str.
16269 * configure.ac: Check for TD_VERSION.
16270 * config.in, configure: Regenerated.
16271
bee0189a
DJ
162722005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16273
16274 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16275
e9d25b98
DJ
162762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16277
16278 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16279 is not available. Define HAVE_PTRACE_GETREGS if it is.
16280 * config.in, configure: Regenerated.
16281 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16282 * linux-i386-low.c, linux-m68k-low.c: Update to use
16283 HAVE_PTRACE_GETREGS.
16284 * linux-low.c (regsets_fetch_inferior_registers)
16285 (regsets_store_inferior_registers): Only return 0 if we processed
16286 GENERAL_REGS.
16287 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16288 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16289
a06660f7
DJ
162902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16291
16292 * inferiors.c (struct thread_info): Add gdb_id.
16293 (add_thread): Add gdb_id argument.
16294 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16295 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16296 calls to add_thread.
16297 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16298 * server.c (handle_query): Use thread_to_gdb_id.
16299 (handle_v_cont, main): Use gdb_id_to_thread_id.
16300 * server.h (add_thread): Update prototype.
16301 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16302 prototypes.
16303
5a1f5858
DJ
163042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16305
16306 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16307 left-padded registers.
16308 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16309 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16310
e122f1f5
SE
163112005-07-01 Steve Ellcey <sje@cup.hp.com>
16312
16313 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16314 * configure: Regenerate.
16315 * config.in: Regenerate.
16316 * server.h (NEED_DECLARATION_STRERROR):
16317 Replace with !HAVE_DECL_STRERROR.
16318
d592fa2f
DJ
163192005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16320
16321 * linux-low.c (linux_wait, linux_send_signal): Don't test
16322 an unsigned long variable for > 0 if it could be MAX_ULONG.
16323 * server.c (myresume): Likewise.
16324 * target.c (set_desired_inferior): Likewise.
16325
ccbd4912
MK
163262005-06-13 Mark Kettenis <kettenis@gnu.org>
16327
16328 * configure.ac: Simplify and improve check for socklen_t.
16329 * configure, config.in: Regenerate.
16330
f450004a
DJ
163312005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16332
16333 * acconfig.h: Remove.
16334 * configure.ac: Add a test for socklen_t. Use three-argument
16335 AC_DEFINE throughout.
16336 * config.in: Regenerated using autoheader 2.59.
16337 * configure: Regenerated.
16338
16339 * gdbreplay.c (socklen_t): Provide a default.
16340 (remote_open): Use socklen_t.
16341 * remote-utils.c (socklen_t): Provide a default.
16342 (remote_open): Use socklen_t.
16343 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16344 unsigned char.
16345
16346 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16347 char for buffers.
16348 * linux-low.c (linux_read_memory, linux_write_memory)
16349 (linux_read_auxv): Likewise.
16350 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16351 (check_mem_write): Likewise.
16352 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16353 Likewise.
16354 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16355 (registers_from_string, register_data): Likewise.
16356 * server.c (handle_query, main): Likewise.
16357 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16358 (decode_M_packet): Likewise.
16359 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16360 * target.h (struct target_ops): Update read_memory, write_memory,
16361 and read_auxv.
16362 (read_inferior_memory, write_inferior_memory): Update.
16363 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16364 to unsigned char *.
16365 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16366 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16367 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16368 linux-s390-low.c, linux-sh-low.c: Update for changes in
16369 read_inferior_memory and the_low_target->breakpoint.
16370
eee84df1
DJ
163712005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16372
16373 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16374 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16375 * configure.srv: Add powerpc64-*-linux*.
16376 * linux-ppc64-low.c: New file.
16377
45b134e5
OF
163782005-05-23 Orjan Friberg <orjanf@axis.com>
16379
16380 * linux-cris-low.c: New file with support for CRIS.
16381 * linux-crisv32-low.c: Ditto for CRISv32.
16382 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16383 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16384 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16385 reg-crisv32.o, and reg-crisv32.c to make rules.
16386 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16387 recognized targets.
16388
48d93c75
UW
163892005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16390
16391 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16392 of sizeof (PTRACE_XFER_TYPE).
16393 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16394
e013ee27
OF
163952005-05-12 Orjan Friberg <orjanf@axis.com>
16396
889bf7c5 16397 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16398 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16399 pointers for hardware watchpoint support.
16400 * linux-low.h (struct linux_target_ops): Ditto.
16401 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16402 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16403 to linux_target_ops.
16404 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16405 reply packet.
16406 * server.c (main): Recognize 'Z' and 'z' packets.
16407
b0ded00b
UW
164082005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16409
16410 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16411 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16412 (the_low_target): Add new members.
16413
8643e2ad
DJ
164142005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16415
16416 * proc-service.c (ps_lgetregs): Search all_processes instead of
16417 all_threads.
16418
fc620387
DJ
164192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16420
16421 * server.c (start_inferior): Change return type to int.
16422 (attach_inferior): Change sigptr to int *.
16423 (handle_v_cont, handle_v_requests): Change signal to int *.
16424 (main): Change signal to int.
16425
164262005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16427
16428 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16429 * configure.srv: Add m32r*-*-linux*.
16430 * linux-m32r-low.c: New file.
16431
e0e76420
DJ
164322005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16433
16434 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16435
a1928bad
DJ
164362005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16439 Take unsigned long arguments for PIDs.
16440 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16441 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16442 (wait_for_sigstop, linux_resume_one_process)
16443 (regsets_fetch_inferior_registers, linux_send_signal)
16444 (linux_read_auxv): Likewise. Update the types of variables holding
16445 PIDs. Update format string specifiers.
16446 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16447 * remote-utils.c (prepare_resume_reply): Likewise.
16448 * server.c (cont_thread, general_thread, step_thread)
16449 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16450 unsigned long.
16451 (handle_query): Update format specifiers.
16452 (handle_v_cont, main): Use strtoul for thread IDs.
16453 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16454 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16455 (general_thread, step_thread, thread_from_wait)
16456 (old_thread_from_wait): Update.
16457 * target.h (struct thread_resume): Use unsigned long for THREAD.
16458 (struct target_ops): Use unsigned long for arguments to attach and
16459 thread_alive.
16460
dcdb98d2
DJ
164612005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16462
16463 * acinclude.m4: Include bfd/bfd.m4 directly.
16464 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16465 <agriffis@toolchain.org>.
16466 * aclocal.m4, configure: Regenerated.
16467
bec39cab
AC
164682005-01-07 Andrew Cagney <cagney@gnu.org>
16469
16470 * configure.ac: Rename configure.in, require autoconf 2.59.
16471 * configure: Re-generate.
16472
434c4c77
DJ
164732004-12-08 Daniel Jacobowitz <dan@debian.org>
16474
16475 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16476 LIBS when finished.
16477 * aclocal.m4: Regenerated.
16478 * configure: Regenerated.
16479
db1d3e1b
AS
164802004-11-21 Andreas Schwab <schwab@suse.de>
16481
16482 * linux-m68k-low.c (m68k_num_gregs): Define.
16483 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16484 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16485 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16486 (m68k_breakpoint_at): New. Add to the_low_target.
16487
16488 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16489 srv_linux_thread_db to yes.
16490
43360365
JB
164912004-10-20 Joel Brobecker <brobecker@gnat.com>
16492
16493 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16494 (ARCH_SET_FS): Likewise.
16495 (ARCH_GET_FS): Likewise.
16496 (ARCH_GET_GS): Likewise.
16497
fd500816
DJ
164982004-10-16 Daniel Jacobowitz <dan@debian.org>
16499
16500 * linux-i386-low.c (ps_get_thread_area): New.
16501 * linux-x86-64-low.c (ps_get_thread_area): New.
16502 * linux-low.c: Include <sys/syscall.h>.
16503 (linux_kill_one_process): Don't kill the first thread here.
16504 (linux_kill): Kill the first thread here.
16505 (kill_lwp): New function.
16506 (send_sigstop, linux_send_signal): Use it.
16507 * proc-service.c: Clean up #ifdefs.
16508 (fpregset_info): Delete.
16509 (ps_lgetregs): Update and enable implementation.
16510 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16511 implementations.
16512 * remote-utils.c (struct sym_cache, symbol_cache): New.
16513 (input_interrupt): Print a clearer message.
16514 (async_io_enabled): New variable.
16515 (enable_async_io, disable_async_io): Use it. Update comments.
16516 (look_up_one_symbol): Use the symbol cache.
16517 * thread-db.c (thread_db_look_up_symbols): New function.
16518 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16519
f6de3c42
DJ
165202004-10-16 Daniel Jacobowitz <dan@debian.org>
16521
16522 * configure.in: Test for -rdynamic.
16523 * configure: Regenerated.
16524 * Makefile (INTERNAL_LDFLAGS): New.
16525 (gdbserver, gdbreplay): Use it.
16526
2c0fc042
AC
165272004-09-02 Andrew Cagney <cagney@gnu.org>
16528
16529 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16530
075b3282
DJ
165312004-03-23 Daniel Jacobowitz <drow@mvista.com>
16532
16533 * linux-low.c (linux_wait): Clear all_processes list also.
16534
fa6a77dc
DJ
165352004-03-12 Daniel Jacobowitz <drow@mvista.com>
16536
16537 * linux-low.c: Include <errno.h>. Remove extern declaration of
16538 errno.
16539
6d782a97
DJ
165402004-03-12 Daniel Jacobowitz <drow@mvista.com>
16541
16542 * gdbreplay.c, server.h, utils.c: Update copyright years.
16543
3a7fb99b
DJ
165442004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16545
16546 * server.c (main): Print child status or termination signal from
16547 variable 'signal', not 'sig'.
16548
c3e735a6
DJ
165492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16550
16551 * linux-low.c (linux_read_memory): Change return type to
16552 int. Check for and return error from ptrace().
16553 * target.c (read_inferior_memory): Change return type to int. Pass
16554 back return status from the_target->read_memory().
16555 * target.h (struct target_ops): Adapt *read_memory() prototype.
16556 Update comment.
16557 (read_inferior_memory): Adapt prototype.
16558 * server.c (main): Return an error packet if
16559 read_inferior_memory() returns an error.
16560
a59d1c82
DJ
165612004-03-04 Daniel Jacobowitz <drow@mvista.com>
16562
16563 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16564 Unify with other clean targets.
16565
dc3f8883
DJ
165662004-02-29 Daniel Jacobowitz <drow@mvista.com>
16567
16568 * server.c (handle_v_cont): Call set_desired_inferior.
16569
89a208da
DJ
165702004-02-29 Daniel Jacobowitz <drow@mvista.com>
16571
16572 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16573
62ea82f5
DJ
165742004-02-29 Daniel Jacobowitz <drow@mvista.com>
16575
16576 * linux-low.c (linux_wait): Unblock async I/O.
16577 (linux_resume): Block and enable async I/O.
16578 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16579 * server.h (block_async_io, unblock_async_io): Add prototypes.
16580
6910d122
DJ
165812004-02-29 Daniel Jacobowitz <drow@mvista.com>
16582
16583 * remote-utils.c (remote_open): Print a status notice after
16584 opening a TCP port.
16585 * server.c (attach_inferior): Print a status notice after
16586 attaching.
16587
165882004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16589
16590 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16591
c89dc5d4
DJ
165922004-02-26 Daniel Jacobowitz <drow@mvista.com>
16593
16594 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16595 error packet.
16596 * server.c, target.h: Update copyright years.
16597
4b8dad4a
RM
165982004-02-25 Roland McGrath <roland@redhat.com>
16599
16600 * target.h (struct target_ops): New member `read_auxv'.
16601 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16602 * linux-low.c (linux_read_auxv): New function.
16603 (linux_target_ops): Initialize `read_auxv' member to that.
16604
d7446758
JB
166052004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16606
16607 Committed by Jim Blandy <jimb@redhat.com>.
16608
16609 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16610 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16611 instead of GPR_SIZE to distiguish s390 and s390x targets.
16612
5544ad89
DJ
166132004-01-31 Daniel Jacobowitz <drow@mvista.com>
16614
16615 * linux-low.c: Update copyright year.
16616 (check_removed_breakpoint): Clear pending_is_breakpoint.
16617 (linux_set_resume_request, linux_queue_one_thread)
16618 (resume_status_pending_p): New functions.
16619 (linux_continue_one_thread): Use process->resume.
16620 (linux_resume): Only resume threads if there are no pending events.
16621 * linux-low.h (struct process_info): Add resume request
16622 pointer.
16623
2a68b70e
DJ
166242004-01-30 Daniel Jacobowitz <drow@mvista.com>
16625
16626 * regcache.c (new_register_cache): Clear the allocated register
16627 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16628
64386c31
DJ
166292003-10-13 Daniel Jacobowitz <drow@mvista.com>
16630
16631 * linux-low.c (linux_resume): Take a struct thread_resume *
16632 argument.
16633 (linux_wait): Update call.
16634 (resume_ptr): New static variable.
16635 (linux_continue_one_thread): Renamed from
16636 linux_continue_one_process. Use resume_ptr.
16637 (linux_resume): Use linux_continue_one_thread.
16638 * server.c (handle_v_cont, handle_v_requests): New functions.
16639 (myresume): New function.
16640 (main): Handle 'v' case.
16641 * target.h (struct thread_resume): New type.
16642 (struct target_ops): Change argument of "resume" to struct
16643 thread_resume *.
16644 (myresume): Delete macro.
16645
c938e9b0
L
166462003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16647
16648 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16649 (uninstall): Support DESTDIR.
16650
7f313d07
BC
16651Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16652
16653 * configure.srv: Add xscale*linux copy of arm*linux entry.
16654
3b2fc2ea
DJ
166552003-07-24 Daniel Jacobowitz <drow@mvista.com>
16656
16657 * linux-arm-low.c (arm_reinsert_addr): New function.
16658 (the_low_target): Add arm_reinsert_addr.
16659
1c0a559e
MK
166602003-07-08 Mark Kettenis <kettenis@gnu.org>
16661
16662 * mem-break.c: Remove whitespace at end of file.
16663
43d5792c
DJ
166642003-06-28 Daniel Jacobowitz <drow@mvista.com>
16665
16666 * configure.in: Check whether we need to prototype strerror.
16667 * server.h: Optionally prototype strerror.
16668 * gdbreplay.c (perror_with_name): Use strerror.
16669 * linux-low.c (linux_attach_lwp): Use strerror.
16670 * utils.c (perror_with_name): Use strerror.
16671 * config.in, configure: Regenerated.
16672
c8a86edf
DJ
166732003-06-28 Daniel Jacobowitz <drow@mvista.com>
16674
16675 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16676 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16677
73d37363
DJ
166782003-06-20 Daniel Jacobowitz <drow@mvista.com>
16679
16680 * Makefile.in (SFILES): Update.
16681 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16682 low-sun3.c: Remove files.
16683
6ad8ae5c
DJ
166842003-06-17 Daniel Jacobowitz <drow@mvista.com>
16685
16686 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16687 (linux_detach_one_process, linux_detach): New functions.
16688 (linux_target_ops): Add linux_detach.
16689 * server.c (main): Handle 'D' packet.
16690 * target.h (struct target_ops): Add "detach" member.
16691 (detach_inferior): Define.
16692
1581182a
MK
166932003-06-13 Mark Kettenis <kettenis@gnu.org>
16694
16695 From Kelley Cook <kelleycook@wideopenwest.com>:
16696 * configure.srv: Accept i[34567]86 variants.
16697
e5379b03
DJ
166982003-06-05 Daniel Jacobowitz <drow@mvista.com>
16699
16700 * linux-low.c (linux_wait_for_event): Correct comment typos.
16701 (linux_resume_one_process): Call check_removed_breakpoint.
16702 (linux_send_signal): New function.
16703 (linux_target_ops): Add linux_send_signal.
16704 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16705 of kill.
16706 * target.h (struct target_ops): Add send_signal.
16707
2ff29de4
JB
167082003-05-29 Jim Blandy <jimb@redhat.com>
16709
16710 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16711 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16712 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16713 away part of the register's value.
16714
254787d4
DJ
167152003-03-26 Daniel Jacobowitz <drow@mvista.com>
16716
16717 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16718 (linux_wait_for_event, linux_init_signals): Likewise.
16719
94e10508
DJ
167202003-03-17 Daniel Jacobowitz <drow@mvista.com>
16721
16722 * configure.in: Check for stdlib.h.
16723 * configure: Regenerated.
16724 * config.in: Regenerated.
16725
4c0711e0
DJ
167262003-01-04 Andreas Schwab <schwab@suse.de>
16727
16728 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16729
ef66e766
AC
167302003-01-02 Andrew Cagney <ac131313@redhat.com>
16731
16732 * Makefile.in: Remove obsolete code.
16733
a1358604
DJ
167342002-11-20 Daniel Jacobowitz <drow@mvista.com>
16735
16736 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16737 defined(PT_FPR0_HI).
16738
23ce3b1c
DJ
167392002-11-17 Stuart Hughes <seh@zee2.com>
16740
16741 * linux-arm-low.c (arm_num_regs): Increase.
16742 (arm_regmap): Include status register.
16743
167442002-11-17 Daniel Jacobowitz <drow@mvista.com>
16745
16746 * linux-low.c (register_addr): Remove incorrect -1 check.
16747
a9fa9f7d
DJ
167482002-08-29 Daniel Jacobowitz <drow@mvista.com>
16749
16750 * linux-low.c (linux_create_inferior): Call setpgid. Return
16751 the new PID.
16752 (unstopped_p, linux_signal_pid): Remove.
16753 (linux_target_ops): Remove linux_signal_pid.
16754 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16755 global instead of target method.
16756 * target.h (struct target_ops): Remove signal_pid. Update comment
16757 for create_inferior.
16758 * server.c (signal_pid): New variable.
16759 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16760 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16761 (attach_inferior): Set signal_pid.
16762
17574093
DJ
167632002-08-23 Daniel Jacobowitz <drow@mvista.com>
16764
16765 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16766
167672002-08-20 Jim Blandy <jimb@redhat.com>
16768
16769 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16770 default for this.
16771
167722002-08-01 Andrew Cagney <cagney@redhat.com>
16773
16774 * Makefile.in: Make chill references obsolete.
16775
167762002-07-24 Kevin Buettner <kevinb@redhat.com>
16777
16778 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16779 * configure: Regenerate.
16780 * config.in: Regenerate.
16781
167822002-07-09 David O'Brien <obrien@FreeBSD.org>
16783
16784 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16785 (perror_with_name, remote_close, remote_open, expect, play): Static.
16786
167872002-07-04 Michal Ludvig <mludvig@suse.cz>
16788
4b8dad4a 16789 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16790 byte offsets instead of an array of indexes.
16791 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16792
167932002-06-13 Daniel Jacobowitz <drow@mvista.com>
16794
16795 * regcache.c: Add comment.
16796
167972002-06-11 Daniel Jacobowitz <drow@mvista.com>
16798
16799 * thread-db.c: New file.
16800 * proc-service.c: New file.
16801 * acinclude.m4: New file.
16802 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16803 proc-service.o, and thread-db.o.
16804 (linux-low.o): Add USE_THREAD_DB.
16805 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16806 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16807 * aclocal.m4: Regenerated.
16808 * config.in: Regenerated.
16809 * configure: Regenerated.
16810 * configure.in: Check for proc_service.h, sys/procfs.h,
16811 thread_db.h, and linux/elf.h headrs.
16812 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16813 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16814 Check for -lthread_db and thread support.
16815 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16816 PowerPC, and SuperH.
16817 * i387-fp.c: Constify arguments.
16818 * i387-fp.h: Likewise.
16819 * inferiors.c: (struct thread_info): Renamed from
16820 `struct inferior_info'. Remove PID member. Use generic inferior
16821 list header. All uses updated.
16822 (inferiors, signal_pid): Removed.
16823 (all_threads): New variable.
16824 (get_thread): Define.
16825 (add_inferior_to_list): New function.
16826 (for_each_inferior): New function.
16827 (change_inferior_id): New function.
16828 (add_inferior): Removed.
16829 (remove_inferior): New function.
16830 (add_thread): New function.
16831 (free_one_thread): New function.
16832 (remove_thread): New function.
16833 (clear_inferiors): Use for_each_inferior and free_one_thread.
16834 (find_inferior): New function.
16835 (find_inferior_id): New function.
16836 (inferior_target_data): Update argument type.
16837 (set_inferior_target_data): Likewise.
16838 (inferior_regcache_data): Likewise.
16839 (set_inferior_regcache_data): Likewise.
16840 * linux-low.c (linux_bp_reinsert): Remove.
16841 (all_processes, stopping_threads, using_thrads)
16842 (struct pending_signals, debug_threads, pid_of): New.
16843 (inferior_pid): Replace with macro.
16844 (struct inferior_linux_data): Remove.
16845 (get_stop_pc, add_process): New functions.
16846 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16847 Use add_process and add_thread.
16848 (linux_attach_lwp): New function, based on old linux_attach. Use
16849 add_process and add_thread. Set stop_expected for new threads.
16850 (linux_attach): New function.
16851 (linux_kill_one_process): New function.
16852 (linux_kill): Kill all LWPs.
16853 (linux_thread_alive): Use find_inferior_id.
16854 (check_removed_breakpoints, status_pending_p): New functions.
16855 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16856 Update. Use WNOHANG. Wait for cloned processes also. Update process
16857 struct for the found process.
16858 (linux_wait_for_event): New function.
16859 (linux_wait): Use it. Support LWPs.
16860 (send_sigstop, wait_for_sigstop, stop_all_processes)
16861 (linux_resume_one_process, linux_continue_one_process): New functions.
16862 (linux_resume): Support LWPs.
16863 (REGISTER_RAW_SIZE): Remove.
16864 (fetch_register): Use register_size instead. Call supply_register.
16865 (usr_store_inferior_registers): Likewise. Call collect_register.
16866 Fix recursive case.
16867 (regsets_fetch_inferior_registers): Improve error message.
16868 (regsets_store_inferior_registers): Add debugging.
16869 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16870 (unstopped_p, linux_signal_pid): New functions.
16871 (linux_target_ops): Add linux_signal_pid.
16872 (linux_init_signals): New function.
16873 (initialize_low): Call it. Initialize using_threads.
16874 * regcache.c (inferior_regcache_data): Add valid
16875 flag.
16876 (get_regcache): Fetch registers lazily. Add fetch argument
16877 and update all callers.
16878 (regcache_invalidate_one, regcache_invalidate): New
16879 functions.
16880 (new_register_cache): Renamed from create_register_cache.
16881 Return the new regcache.
16882 (free_register_cache): Change argument to a void *.
16883 (registers_to_string, registers_from_string): Call get_regcache
16884 with fetch flag set.
16885 (register_data): Make static. Pass fetch flag to get_regcache.
16886 (supply_register): Call get_regcache with fetch flag clear.
16887 (collect_register): Call get_regcache with fetch flag set.
16888 (collect_register_as_string): New function.
16889 * regcache.h: Update.
16890 * remote-utils.c (putpkt): Flush after debug output and use
16891 stderr.
16892 Handle input interrupts while waiting for an ACK.
16893 (input_interrupt): Use signal_pid method.
16894 (getpkt): Flush after debug output and use stderr.
16895 (outreg): Use collect_register_as_string.
16896 (new_thread_notify, dead_thread_notify): New functions.
16897 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16898 and general_thread.
16899 (look_up_one_symbol): Flush after debug output.
16900 * server.c (step_thread, server_waiting): New variables.
16901 (start_inferior): Don't use signal_pid. Update call to mywait.
16902 (attach_inferior): Update call to mywait.
16903 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16904 (main): Don't fetch/store registers explicitly. Use
16905 set_desired_inferior. Support proposed ``Hs'' packet. Update
16906 calls to mywait.
16907 * server.h: Update.
16908 (struct inferior_list, struct_inferior_list_entry): New.
16909 * target.c (set_desired_inferior): New.
16910 (write_inferior_memory): Constify.
16911 (mywait): New function.
16912 * target.h: Update.
16913 (struct target_ops): New signal_pid method.
16914 (mywait): Removed macro, added prototype.
16915
16916 * linux-low.h (regset_func): Removed.
16917 (regset_fill_func, regset_store_func): New.
16918 (enum regset_type): New.
16919 (struct regset_info): Add type field. Use new operation types.
16920 (struct linux_target_ops): stop_pc renamed to get_pc.
16921 Add decr_pc_after_break and breakpoint_at.
16922 (get_process, get_thread_proess, get_process_thread)
16923 (strut process_info, all_processes, linux_attach_lwp)
16924 (thread_db_init): New.
16925
16926 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16927 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16928 (the_low_target): Add new members.
16929 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16930 (i386_store_fpxregset): Constify.
16931 (target_regsets): Add new kind identifier.
16932 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16933 (i386_set_pc): Add debugging.
16934 (i386_breakpoint_at): New function.
16935 (the_low_target): Add new members.
16936 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16937 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16938 (mips_breakpoint_at): New.
16939 (the_low_target): Add new members.
16940 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16941 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16942 (the_low_target): Add new members.
16943 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16944 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16945 (the_low_target): Add new members.
16946 * linux-x86-64-low.c (target_regsets): Add new kind
16947 identifier.
16948
169492002-05-15 Daniel Jacobowitz <drow@mvista.com>
16950
16951 From Martin Pool <mbp@samba.org>:
16952 * server.c (gdbserver_usage): New function.
16953 (main): Call it.
16954
169552002-05-14 Daniel Jacobowitz <drow@mvista.com>
16956
16957 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16958 stop_at -> stop_pc.
16959
169602002-05-04 Andrew Cagney <ac131313@redhat.com>
16961
16962 * Makefile.in: Remove obsolete code.
16963
169642002-04-24 Michal Ludvig <mludvig@suse.cz>
16965
16966 * linux-low.c (regsets_fetch_inferior_registers),
16967 (regsets_store_inferior_registers): Removed cast to int from
16968 ptrace() calls.
16969 * regcache.h: Added declaration of struct inferior_info.
16970
169712002-04-20 Daniel Jacobowitz <drow@mvista.com>
16972
16973 * inferiors.c (struct inferior_info): Add regcache_data.
16974 (add_inferior): Call create_register_cache.
16975 (clear_inferiors): Call free_register_cache.
16976 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16977 * regcache.c (struct inferior_regcache_data): New.
16978 (registers): Remove.
16979 (get_regcache): New function.
16980 (create_register_cache, free_register_cache): New functions.
16981 (set_register_cache): Don't initialize the register cache here.
16982 (registers_to_string, registers_from_string, register_data): Call
16983 get_regcache.
16984 * regcache.h: Add prototypes.
16985 * server.h: Likewise.
16986
169872002-04-20 Daniel Jacobowitz <drow@mvista.com>
16988
16989 * mem-break.c: New file.
16990 * mem-break.h: New file.
16991 * Makefile.in: Add mem-break.o rule; update server.h
16992 dependencies.
16993 * inferiors.c (struct inferior_info): Add target_data
16994 member.
16995 (clear_inferiors): Free target_data member if set.
16996 (inferior_target_data, set_inferior_target_data): New functions.
16997 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16998 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16999 * linux-low.c (linux_bp_reinsert): New variable.
17000 (struct inferior_linux_data): New.
17001 (linux_create_inferior): Use set_inferior_target_data.
17002 (linux_attach): Likewise. Call add_inferior.
17003 (linux_wait_for_one_inferior): New function.
17004 (linux_wait): Call it.
17005 (linux_write_memory): Add const.
17006 (initialize_low): Call set_breakpoint_data.
17007 * linux-low.h (struct linux_target_ops): Add breakpoint
17008 handling members.
17009 * server.c (attach_inferior): Remove extra add_inferior
17010 call.
17011 * server.h: Include mem-break.h. Update inferior.c
17012 prototypes.
17013 * target.c (read_inferior_memory)
17014 (write_inferior_memory): New functions.
17015 * target.h (read_inferior_memory)
17016 (write_inferior_memory): Change macros to prototypes.
17017 (struct target_ops): Update comments. Add const to write_memory
17018 definition.
17019
170202002-04-11 Daniel Jacobowitz <drow@mvista.com>
17021
17022 * linux-low.c (usr_store_inferior_registers): Support
17023 registers which are allowed to fail to store.
17024 * linux-low.h (linux_target_ops): Likewise.
17025 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17026 (ppc_cannot_store_register): FPSCR may not be storable.
17027
170282002-04-09 Daniel Jacobowitz <drow@mvista.com>
17029
17030 * server.h: Include <string.h> if HAVE_STRING_H.
17031 * ChangeLog: Correct paths in last ChangeLog entry.
17032
170332002-04-09 Daniel Jacobowitz <drow@mvista.com>
17034
17035 * linux-low.h: Remove obsolete prototypes.
17036 (struct linux_target_ops): New.
17037 (extern the_low_target): New.
17038 * linux-low.c (num_regs, regmap): Remove declarations.
17039 (register_addr): Use the_low_target explicitly.
17040 (fetch_register): Likewise.
17041 (usr_fetch_inferior_registers): Likewise.
17042 (usr_store_inferior_registers): Likewise.
17043 * linux-arm-low.c (num_regs): Remove.
17044 (arm_num_regs): Define.
17045 (arm_regmap): Renamed from regmap, made static.
17046 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17047 made static.
17048 (arm_cannot_store_register): Renamed from cannot_store_register,
17049 made static.
17050 (the_low_target): New.
17051 * linux-i386-low.c (num_regs): Remove.
17052 (i386_num_regs): Define.
17053 (i386_regmap): Renamed from regmap, made static.
17054 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17055 made static.
17056 (i386_cannot_store_register): Renamed from cannot_store_register,
17057 made static.
17058 (the_low_target): New.
17059 * linux-ia64-low.c (num_regs): Remove.
17060 (ia64_num_regs): Define.
17061 (ia64_regmap): Renamed from regmap, made static.
17062 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17063 made static.
17064 (ia64_cannot_store_register): Renamed from cannot_store_register,
17065 made static.
17066 (the_low_target): New.
17067 * linux-m68k-low.c (num_regs): Remove.
17068 (m68k_num_regs): Define.
17069 (m68k_regmap): Renamed from regmap, made static.
17070 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17071 made static.
17072 (m68k_cannot_store_register): Renamed from cannot_store_register,
17073 made static.
17074 (the_low_target): New.
17075 * linux-mips-low.c (num_regs): Remove.
17076 (mips_num_regs): Define.
17077 (mips_regmap): Renamed from regmap, made static.
17078 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17079 made static.
17080 (mips_cannot_store_register): Renamed from cannot_store_register,
17081 made static.
17082 (the_low_target): New.
17083 * linux-ppc-low.c (num_regs): Remove.
17084 (ppc_num_regs): Define.
17085 (ppc_regmap): Renamed from regmap, made static.
17086 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17087 made static.
17088 (ppc_cannot_store_register): Renamed from cannot_store_register,
17089 made static.
17090 (the_low_target): New.
17091 * linux-s390-low.c (num_regs): Remove.
17092 (s390_num_regs): Define.
17093 (s390_regmap): Renamed from regmap, made static.
17094 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17095 made static.
17096 (s390_cannot_store_register): Renamed from cannot_store_register,
17097 made static.
17098 (the_low_target): New.
17099 * linux-sh-low.c (num_regs): Remove.
17100 (sh_num_regs): Define.
17101 (sh_regmap): Renamed from regmap, made static.
17102 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17103 made static.
17104 (sh_cannot_store_register): Renamed from cannot_store_register,
17105 made static.
17106 (the_low_target): New.
17107 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17108 (the_low_target): New.
17109
171102002-04-09 Daniel Jacobowitz <drow@mvista.com>
17111
17112 * Makefile.in: Add stamp-h target.
17113 * configure.in: Create stamp-h.
17114 * configure: Regenerated.
17115
171162002-04-09 Daniel Jacobowitz <drow@mvista.com>
17117
17118 * inferiors.c: New file.
17119 * target.c: New file.
17120 * target.h: New file.
17121 * Makefile.in: Add target.o and inferiors.o. Update
17122 dependencies.
17123 * linux-low.c (inferior_pid): New static variable,
17124 moved from server.c.
17125 (linux_create_inferior): Renamed from create_inferior.
17126 Call add_inferior. Return 0 on success instead of a PID.
17127 (linux_attach): Renamed from myattach.
17128 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17129 (linux_thread_alive): Renamed from mythread_alive.
17130 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17131 child dies.
17132 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17133 (regsets_store_inferior_registers): Correct error message.
17134 Add missing ``return 0''.
17135 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17136 (linux_store_registers): Renamed from store_inferior_registers.
17137 (linux_read_memory): Renamed from read_inferior_memory.
17138 (linux_write_memory): Renamed from write_inferior_memory.
17139 (linux_target_ops): New structure.
17140 (initialize_low): Call set_target_ops ().
17141 * remote-utils.c (unhexify): New function.
17142 (hexify): New function.
17143 (input_interrupt): Send signals to ``signal_pid''.
17144 * server.c (inferior_pid): Remove.
17145 (start_inferior): Update create_inferior call.
17146 (attach_inferior): Call add_inferior.
17147 (handle_query): New function.
17148 (main): Call handle_query for `q' packets.
17149 * server.h: Include "target.h". Remove obsolete prototypes.
17150 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17151
171522002-04-09 Daniel Jacobowitz <drow@mvista.com>
17153
17154 * Makefile.in: Add WARN_CFLAGS. Update configury
17155 dependencies.
17156 * configure.in: Check for <string.h>
17157 * configure: Regenerate.
17158 * config.in: Regenerate.
17159 * gdbreplay.c: Include needed system headers.
17160 (remote_open): Remove strchr prototype.
17161 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17162 * regcache.c (supply_register): Change buf argument to const void *.
17163 (supply_register_by_name): Likewise.
17164 (collect_register): Change buf argument to void *.
17165 (collect_register_by_name): Likewise.
17166 * regcache.h: Add missing prototypes.
17167 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17168 * server.c (handle_query): New function.
17169 (attached): New static variable, moved out of main.
17170 (main): Quiet longjmp clobber warnings.
17171 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17172 * utils.c (error): Remove NORETURN.
17173 (fatal): Likewise.
This page took 3.712685 seconds and 4 git commands to generate.