]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[PowerPC] Add support for PPR and DSCR
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7ca18ed6
EBM
12018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3
4 * configure.srv (ipa_ppc_linux_regobj): Add
5 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
6 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
7 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
8 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
9 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
10 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
11 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
12 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
13 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
14 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
15 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
16 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
17 (ppc_hwcap): Add comment.
18 (ppc_hwcap2): New global.
19 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
20 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
21 (ppc_regsets): Add entries for the DSCR and PPR regsets.
22 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
23 when needed. Set sizes for the the DSCR and PPR regsets.
24 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
25 (initialize_low_arch): Call
26 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
27 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
28 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
29 PPC_TDESC_ISA205_PPR_DSCR_VSX.
30 (initialize_low_tracepoint): Call
31 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
32 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
33
5c849b22
PFC
342018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
35
36 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
37
8ecfd7bd
SDJ
382018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
39 Simon Marchi <simark@simark.ca>
40
41 * acinclude.m4: Include "../selftest.m4".
42 * configure: Regenerate.
43 * configure.ac: Use "GDB_AC_SELFTEST".
44 * configure.srv: Use "$enable_unittests" instead of
45 "$development" when checking whether unit tests have been
46 enabled.
47 * server.c (captured_main): Update message informing that
48 selftests have been disabled.
49
96643e35
TT
502018-10-04 Tom Tromey <tom@tromey.com>
51
52 * configure: Rebuild.
53
da4ae14a
TT
542018-10-04 Tom Tromey <tom@tromey.com>
55
56 * server.c (handle_status): Rename inner "thread".
57 (process_serial_event): Declare "res" in 'm' case.
58 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
59 (iterate_over_lwps): Rename inner "thread".
60 (linux_qxfer_libraries_svr4): Rename inner "len".
61 * gdbthread.h (find_thread_in_random): Rename inner "thread".
62
7c619dbd
GB
632018-10-01 Gary Benson <gbenson@redhat.com>
64
65 * gdb_proc_service.h: Moved common code to
66 common/gdb_proc_service.h.
67
3795e814
GB
682018-10-01 Gary Benson <gbenson@redhat.com>
69
70 * gdb_proc_service.h: Synchronize comments and whitespace with
71 GDB's version of this file.
72
49b036f1
TT
732018-09-25 Tom Tromey <tom@tromey.com>
74
75 * configure: Rebuild.
76 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
77
8ff03f0b
SM
782018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
79
80 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
81 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
82 ($(IPA_LIB)): Sort IPA_OBJS.
83
a1cd91dc
SM
842018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * Makefile.in: Remove references to $(ADD_DEPS).
87
752312ba
TT
882018-09-16 Tom Tromey <tom@tromey.com>
89
90 * remote-utils.c (remote_open): Use GNU style for metasyntactic
91 variables.
92 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
93 variables.
94
f1628857
TT
952018-09-05 Tom Tromey <tom@tromey.com>
96
97 * configure: Rebuild.
98
ad202fcc
SM
992018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
100
101 PR build/23399
102 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
103
d3d8724a
TT
1042018-08-27 Tom Tromey <tom@tromey.com>
105
106 PR build/23087:
107 * configure: Rebuild.
108
b4f183d2
TT
1092018-08-27 Tom Tromey <tom@tromey.com>
110
111 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
112 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
113 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
114 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
115 (s390x_emit_stack_adjust): Add casts to unsigned char.
116
4e2aa472
SM
1172018-08-22 Simon Marchi <simon.marchi@ericsson.com>
118
119 PR gdb/23374
120 PR gdb/23375
121 * server.h (struct client_state) <disable_randomization>:
122 Initialize to 1.
123
cf4088a9
SM
1242018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
125
126 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
127 variable.
128 (mips_supply_ptrace_register): Likewise.
129
a0de763e
TT
1302018-07-22 Tom Tromey <tom@tromey.com>
131
132 * configure: Rebuild.
133
b0a7723d
TT
1342018-07-22 Tom Tromey <tom@tromey.com>
135
136 * win32-low.c (win32_create_inferior): Remove unused variables.
137 * gdbreplay.c (remote_open): Remove unused variable.
138 * remote-utils.c (remote_prepare): Remove unused variable.
139 * x86-tdesc.h (X86_TDESC_H): Define.
140 (amd64_expedite_regs): Define conditionally.
141 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
142 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
143 * remote-utils.c (readchar): Remove unused variable.
144
a780ef4f
PA
1452018-07-13 Pedro Alves <palves@redhat.com>
146
147 * linux-low.c (linux_kill): Change parameter to process_info
148 pointer instead of pid. Adjust.
149 * lynx-low.c (lynx_kill): Likewise.
150 * nto-low.c (nto_kill): Likewise.
151 * spu-low.c (spu_kill): Likewise.
152 * win32-low.c (win32_kill): Likewise.
153 * server.c (handle_v_kill, kill_inferior_callback)
154 (detach_or_kill_for_exit): Adjust.
155 * target.c (kill_inferior): Change parameter to process_info
156 pointer instead of pid. Adjust.
157 * target.h (struct target_ops) <kill>: Change parameter to
158 process_info pointer instead of pid. Adjust all implementations
159 and callers.
160 (kill_inferior): Likewise.
161
ef2ddb33
PA
1622018-07-13 Pedro Alves <palves@redhat.com>
163
164 * linux-low.c (linux_detach, linux_join): Change parameter to
165 process_info pointer instead of pid. Adjust.
166 * lynx-low.c (lynx_detach, lynx_join): Likewise.
167 * nto-low.c (nto_detach): Likewise.
168 * spu-low.c (spu_detach, spu_join): Likewise.
169 * win32-low.c (win32_detach, win32_join): Likewise.
170 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
171 * target.h (struct target_ops) <detach, join>: Change parameter to
172 process_info pointer instead of pid. Adjust all implementations
173 and callers.
174 (detach_inferior, join_inferior): Rename 'pid' parameter to
175 'proc'.
176
c7ab0aef
SDJ
1772018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
178 Jan Kratochvil <jan.kratochvil@redhat.com>
179 Paul Fertser <fercerpav@gmail.com>
180 Tsutomu Seki <sekiriki@gmail.com>
181
182 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
183 (OBS): Add 'common/netstuff.o'.
184 (GDBREPLAY_OBS): Likewise.
185 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
186 (remote_open): Implement support for IPv6
187 connections.
188 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
189 and 'wspiapi.h'.
190 (handle_accept_event): Accept connections from IPv6 sources.
191 (remote_prepare): Handle IPv6-style hostnames; implement
192 support for IPv6 connections.
193 (remote_open): Implement support for printing connections from
194 IPv6 sources.
195
31445d10
PA
1962018-07-11 Pedro Alves <palves@redhat.com>
197
198 PR gdb/23377
199 * mem-break.c (any_persistent_commands): Add process_info
200 parameter and use it instead of relying on the current process.
201 Change return type to bool.
202 * mem-break.h (any_persistent_commands): Add process_info
203 parameter and change return type to bool.
204 * server.c (handle_detach): Remove require_running_or_return call.
205 Look up the process_info for the process we're about to detach.
206 If not found, return back error to GDB. Adjust
207 any_persistent_commands call to pass down a process pointer.
208
cb197132
PA
2092018-07-11 Pedro Alves <palves@redhat.com>
210
211 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
212 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
213 instead of collect_register_by_name.
214 * regcache.c (regcache_raw_get_unsigned_by_name): New.
215 * regcache.h (regcache_raw_get_unsigned_by_name): New.
216
1b919490
VB
2172018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
218 Pedro Alves <palves@redhat.com>
219
220 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
221
d7e15655
TT
2222018-07-03 Tom Tromey <tom@tromey.com>
223
224 * linux-low.c: Update.
225 * lynx-low.c: Update.
226 * mem-break.c: Update.
227 * nto-low.c: Update.
228 * remote-utils.c: Update.
229 * server.c: Update.
230 * spu-low.c: Update.
231 * target.c: Update.
232 * win32-low.c: Update.
233
26a57c92
TT
2342018-07-03 Tom Tromey <tom@tromey.com>
235
236 * server.c: Update.
237
0e998d96
TT
2382018-07-03 Tom Tromey <tom@tromey.com>
239
240 * linux-low.c: Update.
241
cc6bcb54
TT
2422018-07-03 Tom Tromey <tom@tromey.com>
243
244 * target.c: Update.
245
e38504b3
TT
2462018-07-03 Tom Tromey <tom@tromey.com>
247
248 * linux-low.c: Update.
249 * linux-mips-low.c: Update.
250 * lynx-low.c: Update.
251 * nto-low.c: Update.
252 * remote-utils.c: Update.
253 * server.c: Update.
254 * spu-low.c: Update.
255 * target.c: Update.
256 * thread-db.c: Update.
257
e99b03dc
TT
2582018-07-03 Tom Tromey <tom@tromey.com>
259
260 * linux-low.c: Update.
261 * linux-mips-low.c: Update.
262 * lynx-low.c: Update.
263 * mem-break.c: Update.
264 * nto-low.c: Update.
265 * remote-utils.c: Update.
266 * server.c: Update.
267 * spu-low.c: Update.
268 * target.c: Update.
269 * tracepoint.c: Update.
270
f2907e49
TT
2712018-07-03 Tom Tromey <tom@tromey.com>
272
273 * linux-low.c: Update.
274 * linux-ppc-low.c: Update.
275 * linux-x86-low.c: Update.
276 * proc-service.c: Update.
277 * server.c: Update.
278 * spu-low.c: Update.
279 * thread-db.c: Update.
280 * win32-low.c: Update.
281
fd79271b
TT
2822018-07-03 Tom Tromey <tom@tromey.com>
283
284 * linux-low.c: Update.
285 * lynx-low.c: Update.
286 * nto-low.c: Update.
287 * remote-utils.c: Update.
288 * spu-low.c: Update.
289 * thread-db.c: Update.
290 * win32-low.c: Update.
291
c0867626
SDJ
2922018-06-29 Joel Brobecker <brobecker@adacore.com>
293
294 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
295 parameter in call to 'amd64_create_target_description'.
296
2512d7ef
JK
2972018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
298
299 * x86-tdesc.h: Remove executable permission flag.
300
d0ac1c44
SM
3012018-06-19 Simon Marchi <simon.marchi@ericsson.com>
302
303 * configure.ac: Remove AC_PREREQ, add missing quoting.
304 * configure: Re-generate.
305 * config.in: Re-generate.
306 * aclocal.m4: Re-generate.
307
c4eb05ff
SM
3082018-06-18 Simon Marchi <simon.marchi@ericsson.com>
309
310 * tracepoint.h (current_traceframe): Remove declaration.
311
02895270
AH
3122018-06-18 Alan Hayward <alan.hayward@arm.com>
313
314 * linux-aarch64-low.c (is_sve_tdesc): New function.
315 (aarch64_sve_regs_copy_to_regcache): Likewise.
316 (aarch64_sve_regs_copy_from_regcache): Likewise.
317 (aarch64_regs_info): Add SVE checks.
318 (initialize_low_arch): Initialize SVE.
319
e9902bfc
AH
3202018-06-18 Alan Hayward <alan.hayward@arm.com>
321
322 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
323
fefa175e
AH
3242018-06-11 Alan Hayward <alan.hayward@arm.com>
325
326 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
327 (initialize_low_tracepoint): Likewise
328 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
329 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
330 param.
331 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
332 checks.
333 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
334
b91ad3ff
AH
3352018-06-11 Alan Hayward <alan.hayward@arm.com>
336
337 * server.h (PBUFSIZ): Increase size
338
f868386e
AH
3392018-06-11 Alan Hayward <alan.hayward@arm.com>
340
341 * regcache.c (regcache::raw_compare): New function.
342 * regcache.h (regcache::raw_compare): New declaration.
343
9c861883
AH
3442018-06-11 Alan Hayward <alan.hayward@arm.com>
345
346 * regcache.c (new_register_cache): Use new.
347 (free_register_cache): Use delete.
348 (register_data): Use const.
349 (supply_register): Move body inside regcache.
350 (regcache::raw_supply): New override function.
351 (collect_register): Move body inside regcache.
352 (regcache::raw_collect): New override function.
353 (regcache::get_register_status): New override function.
354 * regcache.h (struct regcache): Inherit from reg_buffer_common.
355
40591844
TT
3562018-06-09 Tom Tromey <tom@tromey.com>
357
358 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
359 declare queue.
360 (event_queue): Use std::queue.
361 (gdb_event_xfree): Remove.
362 (initialize_event_loop, process_event, wait_for_event): Update.
363
6341380d
SC
3642018-06-08 Stan Cox <scox@redhat.com>
365
366 * win32-low.c (win32_create_inferior): last_ptid and last_status
367 moved to client_state.
368
03349c93
PA
3692018-06-08 Pedro Alves <palves@redhat.com>
370
371 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
372 common/common-exceptions.o, common/common-utils.o,
373 common/errors.o, common/print-utils.o and utils.o.
374 * gdbreplay.c: Include "common-defs.h" instead of the two
375 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
376 string.h or alloca.h.
377 (perror_with_name): Delete.
378 (remote_open): Use xstrdup instead of strdup.
379 (main): Rename to ...
380 (captured_main): ... this.
381 (main): New.
382
8dcc53b3
TT
3832018-06-08 Tom Tromey <tom@tromey.com>
384
385 * linux-low.c (linux_low_read_btrace): Update.
386
c12a5089
SC
3872018-06-04 Stan Cox <scox@redhat.com>
388
389 * server.h (struct client_state): New.
390 * server.c (cont_thread, general_thread, multi_process)
391 (report_fork_events, report_vfork_events, report_exec_events)
392 (report_thread_events, swbreak_feature, hwbreak_feature)
393 (vCont_supported, disable_randomization, pass_signals)
394 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
395 Moved to client_state.
396 * remote-utils.c (remote_debug, noack_mode)
397 (transport_is_reliable): Moved to client_state.
398 * tracepoint.c (current_traceframe): Moved to client_state.
399
400 Update all callers.
401 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
402 linux-low.c, remote-utils.h, target.c: Use client_state.
403
122394f1
AH
4042018-05-31 Alan Hayward <alan.hayward@arm.com>
405
406 * configure.srv: Add new c/h file.
407
95228a0d
AH
4082018-05-31 Alan Hayward <alan.hayward@arm.com>
409
410 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
411 null VQ.
412
d8dab6c3
MR
4132018-05-25 Maciej W. Rozycki <macro@mips.com>
414
415 * gdb.arch/mips-fpregset-core.exp: New test.
416 * gdb.arch/mips-fpregset-core.c: New test source.
417
81e25b7c
EK
4182018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
419
420 PR server/23198
421 * hostio.c (require_int): Do not report overflow for integers
422 between 0xfffffff and 0x7fffffff.
423
7e947ad3
MR
4242018-05-22 Maciej W. Rozycki <macro@mips.com>
425
426 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
427 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
428 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
429 functions.
430 (the_low_target): Wire them.
431
1d75a658
PFC
4322018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
433
434 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
435 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
436 mode. Call collect_register_by_name with vscr using
437 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
438 (ppc_store_vrregset): Add and set vscr_offset variable as in
439 ppc_fill_vrregset. Call supply_register_by_name with vscr using
440 vscr_offset.
441
d078308a
PFC
4422018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
443
444 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
445 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
446 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
447
7273b5fc
PFC
4482018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
449
450 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
451 (ppc_store_vsxregset): Likewise.
452 (ppc_fill_vrregset): Likewise.
453 (ppc_store_vrregset): Likewise.
454 (ppc_fill_evrregset): Likewise.
455 (ppc_store_evrregset): Likewise.
456 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
457 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
458 needed.
459
2e077f5e
PFC
4602018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
461
462 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
463 wordsize of the inferior. Call ppc_linux_target_wordsize.
464
bd64614e
PFC
4652018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
466
467 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
468 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
469 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
470 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
471 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
472 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
473 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
474 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
475 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
476 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
477 (tdesc_powerpc_e500l): Remove.
478 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
479 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
480 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
481 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
482 linux-ppc-tdesc.h.
483 (ppc_arch_setup): Remove target description matching code. Fill a
484 ppc_linux_features struct and call ppc_linux_match_description
485 with it.
486
75d74cca
MR
4872018-05-22 Maciej W. Rozycki <macro@mips.com>
488
489 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
490 width of the requested register exceeds the width of the
491 `ptrace' data type.
492 (mips_cannot_store_register): Likewise.
493
e4439e43
MR
4942018-05-21 Maciej W. Rozycki <macro@mips.com>
495
496 * linux-mips-low.c (mips_fetch_register): New function. Update
497 preceding comment.
498 (mips_store_gregset): Supply 0 rather than $restart for $zero.
499 (the_low_target): Wire `mips_fetch_register'.
500
55271bf9
JB
5012018-05-10 Joel Brobecker <brobecker@adacore.com>
502
503 * lynx-i386-low.c (LYNXOS_178): New macro.
504 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
505 the layout on LynxOS-178.
506 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
507 handle floating point registers that are not supported by
508 LynxOS-178.
509
1a34f210
TT
5102018-05-10 Tom Tromey <tom@tromey.com>
511
512 * configure: Rebuild.
513
190852c8
JB
5142018-05-10 Joel Brobecker <brobecker@adacore.com>
515
516 PR server/23158:
517 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
518 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
519 Use it to set the expedite_regs field in the given tdesc.
520 * x86-tdesc.h: New file.
521 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
522 Adjust following the addition of the new expedite_regs parameter
523 to init_target_desc.
524 * linux-tic6x-low.c (tic6x_read_description): Likewise.
525 * linux-x86-tdesc.c: #include "x86-tdesc.h".
526 (i386_linux_read_description, amd64_linux_read_description):
527 Adjust following the addition of the new expedite_regs parameter
528 to init_target_desc.
529 * lynx-i386-low.c: #include "x86-tdesc.h".
530 (lynx_i386_arch_setup): Adjust following the addition of the new
531 expedite_regs parameter to init_target_desc.
532 * nto-x86-low.c: #include "x86-tdesc.h".
533 (nto_x86_arch_setup): Adjust following the addition of the new
534 expedite_regs parameter to init_target_desc.
535 * win32-i386-low.c: #include "x86-tdesc.h".
536 (i386_arch_setup): Adjust following the addition of the new
537 expedite_regs parameter to init_target_desc.
538
7dbac825
JB
5392018-05-10 Joel Brobecker <brobecker@adacore.com>
540
541 PR server/23158:
542 * win32-low.c (win32_create_inferior): Add call to my_wait
543 setting last_status global.
544
906994d9
JB
5452018-05-10 Joel Brobecker <brobecker@adacore.com>
546
547 PR server/23158:
548 * win32-low.c (create_process): Only call gdb_tilde_expand if
549 inferior_cwd is not NULL.
550
8ee22052
AB
5512018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
552
553 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
554 registers to the cache if their values have changed.
555 (i387_xsave_to_cache): Provide default values for x87 control
556 registers when these features are available, but disabled.
557 * regcache.c (supply_register_by_name_zeroed): New function.
558 * regcache.h (supply_register_by_name_zeroed): Declare new
559 function.
560
aff689d3
TT
5612018-05-07 Tom Tromey <tom@tromey.com>
562
563 * configure: Rebuild.
564
85e26832
TT
5652018-05-04 Tom Tromey <tom@tromey.com>
566
567 * configure: Rebuild.
568
a3b60e45
JK
5692018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
570 Pedro Alves <palves@redhat.com>
571
572 * linux-aarch64-low.c (aarch64_stopped_data_address):
573 Likewise.
574
632e107b
TT
5752018-04-27 Tom Tromey <tom@tromey.com>
576
577 * configure: Rebuild.
578
458412c3
TT
5792018-04-23 Tom Tromey <tom@tromey.com>
580
581 * configure: Rebuild.
582
f31c089e
SM
5832018-04-19 Simon Marchi <simon.marchi@ericsson.com>
584
585 * Makefile.in (depcomp): Add "..".
586 (all_deps_files): New and use it.
587
b319b098
AH
5882018-04-18 Alan Hayward <alan.hayward@arm.com>
589
590 * configure.srv (aarch64*-*-linux*): Don't include xml.
591 (i[34567]86-*-cygwin*): Likewise.
592 (i[34567]86-*-linux*): Likewise.
593 (i[34567]86-*-lynxos*): Likewise.
594 (i[34567]86-*-mingw32ce*): Likewise.
595 (i[34567]86-*-mingw*): Likewise.
596 (i[34567]86-*-nto*): Likewise.
597 (tic6x-*-uclinux): Likewise.
598 (x86_64-*-linux*): Likewise.
599 (x86_64-*-mingw*): Likewise.
600 (x86_64-*-cygwin*): Likewise.
601
3b74854b
AH
6022018-04-18 Alan Hayward <alan.hayward@arm.com>
603
604 * tdesc.c: Remove xml parameter.
605
e98577a9
AH
6062018-04-18 Alan Hayward <alan.hayward@arm.com>
607
608 * server.c (get_features_xml): Remove cast.
609 * tdesc.c (void target_desc::accept): Fill in function.
610 (tdesc_get_features_xml): Remove old xml creation.
611 (print_xml_feature::visit_pre): Add xml vistor.
612 * tdesc.h (struct target_desc): Make xmltarget mutable.
613 (tdesc_get_features_xml): Remove declaration.
614
d278f585
AH
6152018-04-18 Alan Hayward <alan.hayward@arm.com>
616
617 * tdesc.c (tdesc_architecture_name): Add new function.
618 (tdesc_osabi_name): Likewise.
619 (tdesc_get_features_xml): Use new functions.
620
eee8a18d
AH
6212018-04-18 Alan Hayward <alan.hayward@arm.com>
622
623 * tdesc.c (tdesc_create_flags): Remove.
624 (tdesc_add_flag): Likewise.
625 (tdesc_named_type): Likewise.
626 (tdesc_create_union): Likewise.
627 (tdesc_create_struct): Likewise.
628 (tdesc_create_vector): Likewise.
629 (tdesc_add_bitfield): Likewise.
630 (tdesc_add_field): Likewise.
631 (tdesc_set_struct_size): Likewise.
632
82ec9bc7
AH
6332018-04-18 Alan Hayward <alan.hayward@arm.com>
634
635 * tdesc.c (~target_desc): Remove implictly deleted items.
636 (init_target_desc): Iterate all features.
637 (tdesc_get_features_xml): Use vector.
638 (tdesc_create_feature): Create feature.
639 * tdesc.h (tdesc_feature) Remove
640 (target_desc): Add features.
641
ea3e7d71
AH
6422018-04-18 Alan Hayward <alan.hayward@arm.com>
643
644 * Makefile.in: Add common/tdesc.c
645 * tdesc.c (init_target_desc): init all reg_defs from register
646 vector.
647 (tdesc_create_reg): Create tdesc_reg.
648 * tdesc.h (tdesc_feature): Add register vector.
649
17d08cd4
SM
6502018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
651
652 * tdesc.h (struct target_desc) <features>: Change type to
653 std::vector<std::string>.
654 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
655 changes.
656 (tdesc_get_features_xml): Likewise.
657 (tdesc_create_feature): Likewise.
658
5cd3e386
AH
6592018-03-26 Alan Hayward <alan.hayward@arm.com>
660
661 * regcache.c (find_register_by_number): Return a ref.
662 (find_regno): Use references.
663 (register_size): Likewise.
664 (register_data): Likewise.
665 * tdesc.c (target_desc::~target_desc): Remove free calls.
666 (target_desc::operator==): Use std::vector compare.
667 (init_target_desc): Use reference.
668 (tdesc_create_reg): Use reg constructors.
669 * tdesc.h (struct target_desc): Replace pointer with object.
670
dff7492c
AH
6712018-03-23 Alan Hayward <alan.hayward@arm.com>
672
673 * regcache.c (find_register_by_number): Make static.
674 (find_regno): Use find_register_by_number
675 * regcache.h (struct reg): Remove declaration.
676
d80e5242
AH
6772018-03-23 Alan Hayward <alan.hayward@arm.com>
678
679 * tdesc.c (target_desc::~target_desc): Move to here.
680 (target_desc::operator==): Likewise.
681 * tdesc.h (target_desc::~target_desc): Move from here.
682 (target_desc::operator==): Likewise.
683
f69c5afb
AA
6842018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
685
686 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
687
ce29f843
AA
6882018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
689
690 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
691 S390_TDESC_GS.
692 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
693 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
694 and init_registers_s390_gs_linux64.
695
c49bd90b
AA
6962018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
697
698 * linux-s390-low.c (s390_fill_gs): Remove function.
699 (s390_fill_gsbc): Remove function.
700 (s390_regsets): Set fill functions for the guarded storage regsets
701 to NULL.
702
7edb9bd3
AA
7032018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
704
705 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
706 the word size. Add comment.
707 (s390_get_wordsize): New function.
708 (s390_arch_setup): No longer select a temporary tdesc to fetch the
709 pswm with it. Instead, use s390_get_wordsize to determine the
710 word size first and derive the correct tdesc from that directly.
711
39be3c7e
SM
7122018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
713
714 * Makefile.in: Include silent-rules.mk.
715 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
716 (COMPILE): Add ECHO_CXX.
717 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
718 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
719 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
720 (version-generated.c): Add ECHO_GEN.
721 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
722 (IPAGENT_COMPILE): Add ECHO_CXX.
723 (%-generated.c): Add ECHO_REGDAT.
724
3ae9ce5d
TT
7252018-03-14 Tom Tromey <tom@tromey.com>
726
727 PR cli/14977:
728 * ax.c (ax_printf): Special case for NULL.
729
e6a58aa8
SM
7302018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
731
732 * linux-low.c (linux_qxfer_libraries_svr4): Use
733 xml_escape_text_append.
734
f6e8a41e
SM
7352018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
736
737 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
738
b9671caf
SM
7392018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
740
741 * server.c (handle_general_set): Remove unnecessary xstrdup.
742
e80aaf61
SM
7432018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
744
745 * server.c (parse_debug_format_options): Adjust to
746 delim_string_to_char_ptr_vec changes.
747 * thread-db.c (thread_db_load_search): Adjust to
748 dirnames_to_char_ptr_vec changes.
749
b1223e78
MM
7502018-03-01 Markus Metzger <markus.t.metzger@intel.com>
751
752 * target.h (target_enable_btrace, target_disable_btrace)
753 (target_read_btrace, target_read_btrace_conf): Turn macro into
754 inline function. Throw error if target method is not defined.
755 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
756 check for btrace target method. Be prepared to handle exceptions
757 from btrace target methods.
758
81561546
SDJ
7592018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
760
761 * server.c (captured_main): Change order of error message printed
762 when the current working directory cannot be found.
763
25e3c82c
SDJ
7642018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
765
766 * server.c: Include "filenames.h" and "pathstuff.h".
767 (program_name): Delete variable.
768 (program_path): New anonymous class.
769 (get_exec_wrapper): Use "program_path" instead of
770 "program_name".
771 (handle_v_run): Likewise.
772 (captured_main): Likewise.
773 (process_serial_event): Likewise.
774
b4987c95
SDJ
7752018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
776
777 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
778 (OBJS): Add "pathstuff.o".
779 * server.c (current_directory): New global variable.
780 (captured_main): Initialize "current_directory".
781
f46cd62a
AH
7822018-02-26 Alan Hayward <alan.hayward@arm.com>
783
784 * tdesc.c: Use common/tdesc.h.
785 * tdesc.h: Likewise.
786
a543c5ca
AH
7872018-02-20 Alan Hayward <alan.hayward@arm.com>
788 Simon Marchi <simon.marchi@ericsson.com>
789
790 * Makefile.in: Switch order of make rules.
791
b5884fa7
AH
7922018-02-19 Alan Hayward <alan.hayward@arm.com>
793
794 * Makefile.in: Add common directory in build.
795 * configure.ac: Add common reference.
796 * configure: Regenerate.
797
de6242d3
MM
7982018-02-09 Markus Metzger <markus.t.metzger@intel.com>
799
800 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
801 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
802 * spu-low.c (spu_target_ops): Likewise.
803 * win32-low.c (win32_target_ops): Likewise.
804 * server.c (supported_btrace_packets): Report packets unconditionally.
805 * target.h (target_ops) <supports_btrace>: Remove.
806 (target_supports_btrace): Remove.
807
9ee23a85
MM
8082018-02-09 Markus Metzger <markus.t.metzger@intel.com>
809
810 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
811 (handle_btrace_disable): Change return type to void. Use exceptions
812 to report errors.
813 (handle_btrace_general_set): Catch exception and copy message to
814 return message.
815
8ce47547
TT
8162018-02-08 Tom Tromey <tom@tromey.com>
817
818 * linux-low.c (install_software_single_step_breakpoints): Use
819 make_scoped_restore.
820 * inferiors.c (make_cleanup_restore_current_thread): Remove.
821 (do_restore_current_thread_cleanup): Remove.
822 * gdbthread.h (make_cleanup_restore_current_thread): Don't
823 declare.
824
45dd3607
TT
8252018-02-08 Tom Tromey <tom@tromey.com>
826
827 * mem-break.c (set_raw_breakpoint_at): Use
828 gdb::unique_xmalloc_ptr.
829
e671cd59
PA
8302018-01-30 Pedro Alves <palves@redhat.com>
831
832 PR gdb/13211
833 * target.c (target_terminal::terminal_state): Rename to ...
834 (target_terminal::m_terminal_state): ... this.
835
a0aad537
JC
8362018-01-19 James Clarke <jrtc27@jrtc27.com>
837
838 * linux-low.c (handle_extended_wait): Surround call to
839 thread_db_notice_clone with #ifdef USE_THREAD_DB.
840
4d9b86e1
SM
8412018-01-17 Simon Marchi <simon.marchi@ericsson.com>
842
843 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
844 linux_ptrace_attach_fail_reason_string now returning an
845 std::string.
846 (linux_attach): Likewise.
847 * thread-db.c (attach_thread): Likewise.
848
f517c180
EA
8492018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
850
851 PR gdb/21559
852 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
853 checking for fs_base/gs_base fields in struct user_regs_struct.
854 * configure: Regenerate.
855
9a70f35c
YQ
8562018-01-16 Yao Qi <yao.qi@linaro.org>
857
858 PR gdb/18749
859 * linux-low.c (fetch_register): Call supply_register instead of
860 error.
861
605fd3c6
YQ
8622018-01-08 Yao Qi <yao.qi@linaro.org>
863 Simon Marchi <simon.marchi@ericsson.com>
864
865 * Makefile.in (OBS): Remove selftest.o.
866 * configure.ac: Set srv_selftest_objs if $development is true.
867 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
868 * configure: Re-generated.
869 * server.c (captured_main): Wrap variable selftest_filter with
870 GDB_SELF_TEST.
871
2cc05030
SM
8722018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
873
874 * server.c (parse_debug_format_options): Return std::string.
875 (handle_monitor_command, captured_main): Adjust.
876
e379cee6
PA
8772018-01-05 Pedro Alves <palves@redhat.com>
878
879 PR gdb/18653
880 * server.c (captured_main): Pass quiet=false to
881 save_original_signals_state.
882
82e1e79a
JB
8832018-01-01 Joel Brobecker <brobecker@adacore.com>
884
885 * gdbreplay.c (gdbreplay_version): Update copyright year in
886 version message.
887 * server.c (gdbserver_version): Likewise.
888
8e481c3b
TT
8892017-12-08 Tom Tromey <tom@tromey.com>
890
891 * ax.c (ax_printf): Update.
892
a8806230
YQ
8932017-12-07 Yao Qi <yao.qi@linaro.org>
894
895 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
896 aarch64_linux_read_description.
897 * linux-amd64-ipa.c (idx2mask): New array.
898 (get_ipa_tdesc): Move idx2mask out.
899 (initialize_low_tracepoint): Initialize target descriptions.
900 * linux-i386-ipa.c (idx2mask): New array.
901 (get_ipa_tdesc): Move idx2mask out.
902 (initialize_low_tracepoint): Initialize target descriptions.
903
d4a0e8b5
SM
9042017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * tdesc.c (struct tdesc_type): Change return type.
907 (tdesc_add_flag): Change parameter type.
908 (tdesc_add_bitfield): Likewise.
909 (tdesc_add_field): Likewise.
910 (tdesc_set_struct_size): Likewise.
911
798a7429
SM
9122017-12-05 Simon Marchi <simon.marchi@ericsson.com>
913
914 * regcache.c (registers_to_string): Remove unused variable.
915
c0e15c9b
SM
9162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
917
918 * inferiors.c (for_each_inferior_with_data): Remove.
919 * inferiors.h (for_each_inferior_with_data): Remove.
920 * server.c (handle_qxfer_threads_worker): Change parameter type.
921 (handle_qxfer_threads_proper): Use for_each_thread.
922
f0045347
SM
9232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
924
925 * inferiors.c (for_each_inferior): Remove.
926 (clear_inferiors): Use for_each_thread.
927 * inferiors.h (for_each_inferior): Remove.
928 * linux-low.c (linux_wait_for_event_filtered): Use
929 for_each_thread.
930 (linux_stabilize_threads): Likewise.
931 * regcache.c (regcache_release): Likewise.
932 * server.c (gdb_wants_all_threads_stopped): Likewise.
933 (clear_pending_status_callback): Remove.
934 (handle_status): Use for_each_thread.
935 (captured_main): Likewise.
936 * win32-low.c (child_init_thread_list): Likewise.
937 (win32_clear_inferiors): Likewise.
938 (fake_breakpoint_event): Likewise.
939
9521758b
SM
9402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
941
942 * inferiors.h (find_inferior): Remove.
943 * inferiors.c (find_inferior): Remove.
944
8f86d7aa
SM
9452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
946
947 * linux-low.c (resume_status_pending_p): Update comment.
948 (need_step_over_p): Update comment.
949
e2b44075
SM
9502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * linux-low.c (proceed_one_lwp): Return void, change parameter
953 type.
954 (unsuspend_and_proceed_one_lwp): Likewise.
955 (proceed_all_lwps): Use for_each_thread.
956 (unstop_all_lwps): Likewise.
957
c80825ff
SM
9582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
959
960 * linux-low.c (linux_resume_one_thread): Return void, take
961 parameter directly.
962 (linux_resume): Use for_each_thread.
963
df3e4dbe
SM
9642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
965
966 * linux-low.c (send_sigstop_callback): Return void, change
967 parameter type. Rename to...
968 (send_sigstop): ... this.
969 (suspend_and_send_sigstop_callback): Return void, change parameter
970 type. Rename to...
971 (suspend_and_send_sigstop): ... this.
972 (stop_all_lwps): Use for_each_thread.
973
5a6b0a41
SM
9742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * linux-low.c (lwp_running): Return bool, remove unused
977 argument.
978 (linux_stabilize_threads): Use find_thread.
979
39a64da5
SM
9802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
981
982 * linux-low.c (select_singlestep_lwp_callback): Remove.
983 (count_events_callback): Remove.
984 (select_event_lwp_callback): Remove.
985 (select_event_lwp): Use find_thread/for_each_thread.
986
a1385b7b
SM
9872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
988
989 * linux-low.c (not_stopped_callback): Return bool, take filter
990 argument directly.
991 (linux_wait_for_event_filtered): Use find_thread.
992 (linux_wait_1): Likewise.
993
454296a2
SM
9942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
995
996 * linux-low.c (same_lwp): Remove.
997 (find_lwp_pid): Use find_thread.
998
6b2a85da
SM
9992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1000
1001 * linux-low.c (delete_lwp_callback): Remove.
1002 (linux_mourn): Use for_each_thread.
1003
798a38e8
SM
10042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1005
1006 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1007 args parameter, don't check for pid.
1008 (linux_detach): Use for_each_thread.
1009
e4eb0dec
SM
10102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1011
1012 * linux-low.c (struct counter): Remove.
1013 (second_thread_of_pid_p): Remove.
1014 (last_thread_of_process_p): Use find_thread.
1015
83e1b6c1
SM
10162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1017
1018 * inferiors.c (find_inferior_in_random): Remove.
1019 * inferiors.h (find_inferior_in_random): Remove.
1020 * linux-low.c (status_pending_p_callback): Return bool, accept
1021 parameter ptid directly.
1022 (linux_wait_for_event_filtered): Use find_thread_in_random.
1023 (linux_wait_1): Likewise.
1024
8dc7b443
SM
10252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1026
1027 * inferiors.c (find_inferior_id): Remove.
1028 (find_thread_ptid): Move implemention from find_inferior_id to
1029 here.
1030 * inferiors.h (find_inferior_id): Remove.
1031 * server.c (handle_status): Use find_thread_ptid.
1032 (process_serial_event): Likewise.
1033 * thread-db.c (find_one_thread): Likewise.
1034 (thread_db_thread_handle): Likewise.
1035 * win32-low.c (thread_rec): Likewise.
1036 (child_delete_thread): Likewise.
1037 (win32_thread_alive): Likewise.
1038 (get_child_debug_event): Likewise.
1039
da25033c
SM
10402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1041
1042 * linux-mips-low.c (update_watch_registers_callback): Return
1043 void, remove pid_p parameter, don't check for pid.
1044 (mips_insert_point, mips_remove_point): Use for_each_thread.
1045
c91bb56b
SM
10462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1047
1048 * lynx.low (lynx_delete_thread_callback): Remove.
1049 (lynx_mourn): Use for_each_thread.
1050
634a3254
SM
10512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1052
1053 * regcache.c (regcache_invalidate_one): Remove.
1054 (regcache_invalidate_pid): use for_each_thread.
1055
41272101
TT
10562017-11-26 Tom Tromey <tom@tromey.com>
1057
1058 * linux-low.c (linux_create_inferior): Update.
1059
f5291a6f
UW
10602017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1061
1062 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1063
6654d750
AH
10642017-11-24 Alan Hayward <alan.hayward@arm.com>
1065
1066 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1067 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1068 * linux-aarch64-tdesc-selftest.c: New file.
1069 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1070
10712017-11-24 Alan Hayward <alan.hayward@arm.com>
1072
1073 * configure.srv: Add new file.
1074 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1075 * linux-aarch64-tdesc-selftest.c: New file.
1076 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1077
49bdb7ee
AH
10782017-11-24 Alan Hayward <alan.hayward@arm.com>
1079
1080 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1081 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1082 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1083
d6d7ce56
AH
10842017-11-24 Alan Hayward <alan.hayward@arm.com>
1085
1086 * configure.srv: Add new files.
1087 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1088 aarch64_linux_read_description.
1089 * linux-aarch64-low.c (aarch64_linux_read_description):
1090 Merge with aarch64_arch_setup.
1091 (aarch64_arch_setup): Call aarch64_linux_read_description.
1092 * linux-aarch64-tdesc.c: New file.
1093 * linux-aarch64-tdesc.h: New file.
1094
506fe5f4
YQ
10952017-11-24 Yao Qi <yao.qi@linaro.org>
1096
1097 * configure.srv: Set $srv_regobj for tic6x-linux.
1098 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1099 (tic6x_read_description): Move some code to tic6x_arch_setup.
1100 (tic6x_tdesc_test): New function.
1101 (initialize_low_arch): Call selftests::register_test.
1102
29f9a567
YQ
11032017-11-22 Yao Qi <yao.qi@linaro.org>
1104
1105 * remote-utils.c (prepare_resume_reply): Use memcpy.
1106
578290ec
SM
11072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * linux-low.c (kill_one_lwp_callback): Return void, take
1110 argument directly, don't filter on pid.
1111 (linux_kill): Use for_each_thread.
1112
eca55aec
SM
11132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1114
1115 * linux-low.c (need_step_over_p): Return bool, remove dummy
1116 argument.
1117 (linux_resume, proceed_all_lwps): Use find_thread.
1118
25c28b4d
SM
11192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1120
1121 * linux-low.c (resume_status_pending_p): Return bool, remove
1122 flag_p argument.
1123 (linux_resume): Use find_thread.
1124
5fdda392
SM
11252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1126
1127 * linux-low.c (struct thread_resume_array): Remove.
1128 (linux_set_resume_request): Return void, take arguments
1129 directly.
1130 (linux_resume): Use for_each_thread.
1131
fcb056a5
SM
11322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1133
1134 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1135 return bool, remove data argument.
1136 (linux_stabilize_threads): Use find_thread.
1137
139720c5
SM
11382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1139
1140 * linux-low.c (unsuspend_one_lwp): Remove.
1141 (unsuspend_all_lwps): Use for_each_thread, inline code from
1142 unsuspend_one_lwp.
1143
6d1e5673
SM
11442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1145
1146 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1147 * linux-low.c (struct iterate_over_lwps_args): Remove.
1148 (iterate_over_lwps_filter): Remove.
1149 (iterate_over_lwps): Use find_thread.
1150
bbf550d5
SM
11512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1152
1153 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1154 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1155 code from reset_lwp_ptrace_options_callback.
1156
00192f77
SM
11572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1158
1159 * linux-arm-low.c (struct update_registers_data): Remove.
1160 (update_registers_callback): Return void, take arguments
1161 directly, don't check thread's pid.
1162 (arm_insert_point, arm_remove_point): Use for_each_thread.
1163
2bee2b6c
SM
11642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * win32-low.c (continue_one_thread): Return void, take argument
1167 directly.
1168 (child_continue): Use for_each_thread.
1169
0b360f19
SM
11702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1171
1172 * win32-i386-low.c (update_debug_registers_callback): Rename
1173 to ...
1174 (update_debug_registers): ... this, return void, remove pid_p arg.
1175 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1176
f27866ba
SM
11772017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1178
1179 * inferiors.h (struct process_info): Add constructor, initialize
1180 fields..
1181 <syscalls_to_catch>: Change type to std::vector<int>.
1182 * inferiors.c (add_process): Allocate process_info with new.
1183 (remove_process): Free process_info with delete.
1184 * linux-low.c (handle_extended_wait): Adjust.
1185 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1186 * server.c (handle_general_set): Adjust.
1187
e849ea89
PA
11882017-11-16 Pedro Alves <palves@redhat.com>
1189
1190 * remote-utils.c (remote_close): Block SIGIO signals instead of
1191 uninstalling the SIGIO handler.
1192
1d0aa65c
AH
11932017-11-16 Alan Hayward <alan.hayward@arm.com>
1194
1195 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1196
3491a34c
YQ
11972017-11-16 Yao Qi <yao.qi@linaro.org>
1198
1199 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1200 (tic6x_store_gregset): Likewise.
1201 (tic6x_usrregs_info): Move it up.
1202
a602f924
AH
12032017-11-15 Alan Hayward <alan.hayward@arm.com>
1204
1205 * Makefile.in: Update arch rules.
1206 * configure.srv: Explicitly mark arch/ files.
1207
5616b6c3
AS
12082017-11-13 Andreas Schwab <schwab@suse.de>
1209
1210 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1211 function.
1212 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1213
d1928160
PA
12142017-11-06 Pedro Alves <palves@redhat.com>
1215
1216 * config.in, configure: Regenerate.
1217
bac608e7
SM
12182017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * target.c (struct thread_search): Remove.
1221 (thread_search_callback): Remove.
1222 (prepare_to_access_memory): Use for_each_thread instead of
1223 find_inferior. Inline code from thread_search_callback.
1224
eaddb425
SM
12252017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1226
1227 * server.c (struct visit_actioned_threads_data): Remove.
1228 (visit_actioned_threads): Change prototype to take arguments
1229 directly.
1230 (resume): Use find_thread instead of find_inferior.
1231
99078d34
SM
12322017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1233
1234 * server.c (queue_stop_reply_callback): Change prototype, return
1235 void.
1236 (find_status_pending_thread_callback): Remove.
1237 (handle_status): Replace find_inferior with find_thread and
1238 for_each_thread.
1239
cc628f3d
AH
12402017-10-25 Alan Hayward <alan.hayward@arm.com>
1241
1242 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1243 with REGNO.
1244 (aarch64_store_gregset): Likewise.
1245 (aarch64_fill_fpregset): Likewise.
1246 (aarch64_store_fpregset): Likewise.
1247
4d3bb80e
SM
12482017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1249
1250 * gdbthread.h (find_thread, for_each_thread): New functions.
1251 * inferiors.c (thread_of_pid): Remove.
1252 (find_any_thread_of_pid): Use find_thread.
1253 * linux-low.c (num_lwps): Use for_each_thread.
1254
7a7cdfa0
YQ
12552017-10-17 Yao Qi <yao.qi@linaro.org>
1256
1257 * Makefile.in: Remove one rule.
1258 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1259
e675d170
YQ
12602017-10-17 Yao Qi <yao.qi@linaro.org>
1261
1262 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1263 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1264
7eb4e0f9
YQ
12652017-10-17 Yao Qi <yao.qi@linaro.org>
1266
1267 * configure.srv: Rename arm.o with arch/arm.o.
1268
60d6cfc9
YQ
12692017-10-17 Yao Qi <yao.qi@linaro.org>
1270
1271 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1272 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1273 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1274 (arch-i386.o, arch-amd64.o): Remove rules.
1275 (arch/%.o): New rule.
1276 Update POSTCOMPILE and COMPILE.pre.
1277 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1278 * configure: Re-generated.
1279 * configure.srv: Replace arch-i386.o with arch/i386.o.
1280 Replace arch-amd64.o with arch/amd64.o.
1281
5bfda255
YQ
12822017-10-16 Yao Qi <yao.qi@linaro.org>
1283
1284 * configure: Regenerated.
1285
9c80ecd6
SM
12862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1287
1288 * inferiors.h: (struct inferior_list): Remove.
1289 (struct inferior_list_entry); Remove.
1290 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1291 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1292 get_first_inferior): Remove.
1293 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1294 find_inferior_id, find_inferior_in_random): Change signature.
1295 * inferiors.c (all_threads): Change type to
1296 std::list<thread_info *>.
1297 (get_thread): Remove macro.
1298 (find_inferior, find_inferior_id): Change signature, implement
1299 using find_thread.
1300 (find_inferior_in_random): Change signature, implement using
1301 find_thread_in_random.
1302 (for_each_inferior, for_each_inferior_with_data): Change
1303 signature, implement using for_each_thread.
1304 (add_inferior_to_list, remove_inferior): Remove.
1305 (add_thread, get_first_thread, thread_of_pid,
1306 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1307 (get_first_inferior, one_inferior_p, clear_inferior_list):
1308 Remove.
1309 (clear_inferiors, get_thread_process): Update.
1310 * gdbthread.h: Include <list>.
1311 (struct thread_info) <entry>: Remove field.
1312 <id>: New field.
1313 (all_threads): Change type to std::list<thread_info *>.
1314 (get_first_inferior): Add doc.
1315 (find_thread, for_each_thread, find_thread_in_random): New
1316 functions.
1317 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1318 * linux-arm-low.c (update_registers_callback): Update.
1319 * linux-low.c (second_thread_of_pid_p): Update.
1320 (kill_one_lwp_callback, linux_detach_lwp_callback,
1321 delete_lwp_callback, status_pending_p_callback, same_lwp,
1322 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1323 iterate_over_lwps, not_stopped_callback,
1324 resume_stopped_resumed_lwps, count_events_callback,
1325 select_singlestep_lwp_callback, select_event_lwp_callback,
1326 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1327 suspend_and_send_sigstop_callback, wait_for_sigstop,
1328 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1329 lwp_running, linux_set_resume_request, resume_status_pending_p,
1330 need_step_over_p, start_step_over, linux_resume_one_thread,
1331 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1332 reset_lwp_ptrace_options_callback): Update.
1333 * linux-mips-low.c (update_watch_registers_callback): Update.
1334 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1335 Update.
1336 (free_register_cache_thread_one): Remove.
1337 (regcache_release): Update.
1338 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1339 handle_qxfer_threads_worker): Update.
1340 (handle_query): Update, use list iterator.
1341 (visit_actioned_threads, handle_pending_status,
1342 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1343 clear_pending_status_callback, set_pending_status_callback,
1344 find_status_pending_thread_callback, handle_status,
1345 process_serial_event): Update.
1346 * target.c (thread_search_callback): Update.
1347 * thread-db.c (thread_db_get_tls_address): Update.
1348 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1349 Update.
1350 * win32-i386-low.c (update_debug_registers_callback): Update.
1351 * win32-low.c (delete_thread_info, child_delete_thread,
1352 continue_one_thread, suspend_one_thread,
1353 get_child_debug_event): Adjust.
1354
9179355e
SM
13552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1356
1357 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1358 * inferiors.h: Include <list>.
1359 (struct process_info) <entry>: Remove field.
1360 <pid>: New field.
1361 (pid_of): Change macro to function.
1362 (ptid_of, lwpid_of): Remove macro.
1363 (all_processes): Change type to std::list<process_info *>.
1364 (ALL_PROCESSES): Remove macro.
1365 (for_each_process, find_process): New function.
1366 * inferiors.c (all_processes): Change type to
1367 std::list<process_info *>.
1368 (find_thread_process): Adjust.
1369 (add_process): Likewise.
1370 (remove_process): Likewise.
1371 (find_process_pid): Likewise.
1372 (get_first_process): Likewise.
1373 (started_inferior_callback): Remove.
1374 (have_started_inferiors_p): Adjust.
1375 (attached_inferior_callback): Remove.
1376 (have_attached_inferiors_p): Adjust.
1377 * linux-low.c (check_zombie_leaders): Likewise.
1378 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1379 (x86_linux_update_xmltarget): Adjust.
1380 * server.c (handle_query): Likewise.
1381 (gdb_reattached_process): Remove.
1382 (handle_status): Adjust.
1383 (kill_inferior_callback): Likewise.
1384 (detach_or_kill_inferior): Remove.
1385 (print_started_pid): Likewise.
1386 (print_attached_pid): Likewise.
1387 (detach_or_kill_for_exit): Update.
1388 (process_serial_event): Likewise.
1389 * linux-arm-low.c (arm_new_fork): Likewise.
1390
c9cb8905
SM
13912017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1392
1393 * dll.h: Include <list>.
1394 (struct dll_info): Add constructor.
1395 <entry>: Remove field.
1396 (all_dlls): Change type to std::list<dll_info>.
1397 * dll.c: Include <algorithm>.
1398 (get_dll): Remove macro.
1399 (all_dlls): Change type to std::list<dll_info *>.
1400 (free_one_dll): Remove.
1401 (match_dll): Likewise.
1402 (loaded_dll): Adjust.
1403 (unloaded_dll): Adjust to all_dlls type change, use
1404 std::find_if. Inline code from match_dll.
1405 (clear_dlls): Adjust to all_dlls type change.
1406 * server.c (emit_dll_description): Remove.
1407 (handle_qxfer_libraries): Adjust to all_dlls type change,
1408 integrate emit_dll_description's functionality.
1409
04ec7890
SM
14102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1411
1412 * linux-low.h (struct linux_target_ops) <delete_process>: New
1413 field.
1414 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1415 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1416 (struct linux_target_ops): Add delete_process callback.
1417 * linux-arm-low.c (arm_delete_process): New.
1418 (struct linux_target_ops): Add delete_process callback.
1419 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1420 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1421 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1422 * linux-mips-low.c (mips_linux_delete_process): New.
1423 (struct linux_target_ops): Add delete_process callback.
1424 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1425 * linux-s390-low.c (struct linux_target_ops): Likewise.
1426 * linux-sh-low.c (struct linux_target_ops): Likewise.
1427 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1428 * linux-tile-low.c (struct linux_target_ops): Likewise.
1429 * linux-x86-low.c (x86_linux_delete_process): New.
1430 (struct linux_target_ops): Add delete_process callback.
1431 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1432
466eecee
SM
14332017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1434
1435 * linux-aarch64-low.c (the_low_target): Add thread delete
1436 callback.
1437 * linux-arm-low.c (arm_delete_thread): New function.
1438 (the_low_target): Add thread delete callback.
1439 * linux-bfin-low.c (the_low_target): Likewise.
1440 * linux-crisv32-low.c (the_low_target): Likewise.
1441 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1442 set.
1443 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1444 field.
1445 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1446 * linux-mips-low.c (mips_linux_delete_thread): New function.
1447 (the_low_target): Add thread delete callback.
1448 * linux-ppc-low.c (the_low_target): Likewise.
1449 * linux-s390-low.c (the_low_target): Likewise.
1450 * linux-sh-low.c (the_low_target): Likewise.
1451 * linux-tic6x-low.c (the_low_target): Likewise.
1452 * linux-tile-low.c (the_low_target): Likewise.
1453 * linux-x86-low.c (the_low_target): Likewise.
1454 * linux-xtensa-low.c (the_low_target): Likewise.
1455
b79f7801
YZ
14562017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1457
1458 * win32-low.c: Include "common-inferior.h".
1459
bc3b087d
SDJ
14602017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1461
1462 * inferiors.c (set_inferior_cwd): New function.
1463 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1464 (handle_query): Inform that QSetWorkingDir is supported.
1465 * win32-low.c (create_process): Pass the inferior's cwd to
1466 CreateProcess.
1467
d092c5a2
SDJ
14682017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1469
1470 * inferiors.c (current_inferior_cwd): New global variable.
1471 (get_inferior_cwd): New function.
1472 * inferiors.h (struct process_info) <cwd>: New field.
1473
7da0a886
SDJ
14742017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1475
1476 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1477 (OBS): Add gdb_tilde_expand.o.
1478
289a6840
SM
14792017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1480
1481 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1482 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1483
256642e8
PA
14842017-09-29 Pedro Alves <palves@redhat.com>
1485
1486 * ax.c (gdb_parse_agent_expr): Constify.
1487 * ax.h (gdb_parse_agent_expr): Constify.
1488 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1489 Constify.
1490 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1491 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1492 * remote-utils.h (read_ptid): Constify.
1493 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1494 (process_point_options, process_serial_event): Constify.
1495 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1496 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1497 (cmd_qtbuffer): Constify.
1498
5b9ca4d4
PA
14992017-09-29 Pedro Alves <palves@redhat.com>
1500
1501 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1502 fails.
1503
94c207e0
PA
15042017-09-29 Pedro Alves <palves@redhat.com>
1505
1506 * linux-low.c (handle_extended_wait): Pass parent thread instead
1507 of process to thread_db_notice_clone.
1508 * linux-low.h (thread_db_notice_clone): Replace parent process
1509 parameter with parent thread parameter.
1510 * thread-db.c (find_one_thread): Add comment.
1511 (thread_db_notice_clone): Replace parent process parameter with
1512 parent thread parameter. Temporarily switch to the parent thread.
1513
75352e28
SDJ
15142017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1515
1516 * gdbthread.h: Include "common-gdbthread.h".
1517 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1518 "if" when validating the ptid.
1519 * remote-utils.c: Include "gdbthread.h".
1520 (prepare_resume_reply): Use "switch_to_thread".
1521 * target.c (done_accessing_memory): Likewise.
1522
ad339634
AA
15232017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1524
1525 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1526 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1527 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1528 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1529 s390x-gs-linux64-ipa.o to ipa_obj.
1530 * linux-s390-low.c (HWCAP_S390_GS): New define.
1531 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1532 New functions.
1533 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1534 (s390_arch_setup): Check for guarded-storage support and choose
1535 appropriate tdesc.
1536 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1537 init_registers_s390x_gs_linux64.
1538 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1539 enum value.
1540 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1541 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1542
cc4d742f
SM
15432017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1544
1545 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1546
f6327dcb
KB
15472017-09-21 Kevin Buettner <kevinb@redhat.com>
1548
1549 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1550 (thread_db_thread_handle): Declare.
1551 * linux-low.c (linux_target_ops): Initialize thread_handle.
1552 * server.c (handle_qxfer_threads_worker): Add support for
1553 "handle" attribute.
1554 * target.h (struct target_ops): Add new function pointer,
1555 thread_handle.
1556 (target_thread_handle): Define.
1557 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1558 field in lwp.
1559 (thread_db_thread_handle): New function.
1560
86299109
KB
15612017-09-21 Kevin Buettner <kevinb@redhat.com>
1562
1563 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1564 * linux-low.h (thread_db_notice_clone): Declare.
1565 * thread-db.c (thread_db_notice_clone): New function.
1566
f557a88a
PA
15672017-09-21 Pedro Alves <palves@redhat.com>
1568
1569 * server.c (gdb_read_memory, handle_status, process_serial_event)
1570 (handle_serial_event, handle_target_event): Adjust to
1571 set_desired_thread prototype change.
1572 * target.c (set_desired_thread): Remove 'use_general' parameter
1573 and adjust.
1574 * target.h (set_desired_thread): Remove 'use_general' parameter.
1575
223ffa71
TT
15762017-09-20 Tom Tromey <tom@tromey.com>
1577
1578 * target.c (target_terminal::terminal_state): Define.
1579 (target_terminal::init): Rename from target_terminal_init.
1580 (target_terminal::inferior): Rename from
1581 target_terminal_inferior.
1582 (target_terminal::ours): Rename from target_terminal_ours.
1583 (target_terminal::ours_for_output, target_terminal::info): New.
1584
04fd3ba9
SM
15852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * server.c (accumulate_file_name_length): Remove.
1588 (emit_dll_description): Adjust to std::string change.
1589 (handle_qxfer_libraries): Use std::string to hold document.
1590
5e187554
SM
15912017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1592
1593 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1594 return type of xml_escape_text.
1595 * server.c (emit_dll_description): Likewise.
1596
1526853e
SM
15972017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * server.c (captured_main): Accept argument for --selftest.
1600 Update run_tests call.
1601 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1602 when registering selftests.
1603
c4dfafab
SDJ
16042017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1607 instead of "VEC" for "target_desc.reg_defs".
1608 (regcache_cpy): Likewise.
1609 (registers_to_string): Likewise.
1610 (registers_from_string): Likewise.
1611 (find_regno): Likewise.
1612 (supply_regblock): Likewise.
1613 (regcache_raw_read_unsigned): Likewise.
1614 * tdesc.c (init_target_desc): Likewise.
1615 (tdesc_create_reg): Likewise.
1616 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1617 (struct target_desc) <reg_defs>: Convert to "std::vector".
1618 (target_desc): Do not initialize "reg_defs".
1619 (~target_desc): Update code to use "std::vector" instead of "VEC"
1620 for "target_desc.reg_defs".
1621 (operator==): Likewise.
1622
124aceb4
SM
16232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1624
1625 * inferiors.h (thread_to_gdb_id): Remove.
1626 * inferiors.c (thread_to_gdb_id): Remove.
1627 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1628 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1629 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1630 Likewise.
1631 * nto-low.c (nto_fetch_registers, nto_store_registers,
1632 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1633
96cde54f
SM
16342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * inferiors.h (gdb_id_to_thread_id): Remove.
1637 * inferiors.c (gdb_id_to_thread_id): Remove.
1638 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1639 removal. Move pid declaration closer to where it's used.
1640
e8ca139e
SM
16412017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * server.c (handle_detach): New function.
1644 (process_serial_event): Move code out, call handle_detach.
1645
f8a4e119
SM
16462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * server.c (require_running): Rename to ...
1649 (require_running_or_return): ... this ...
1650 (require_running_or_break): ... and this.
1651 (handle_query, process_serial_event): Adjust.
1652
0eb0a407
SM
16532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * linux-low.c (linux_set_resume_request): Remove unused
1656 variables.
1657
785922a5
SM
16582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * server.c (first_thread_of): Remove.
1661 (process_serial_event): Replace usage of first_thread_of with
1662 find_any_thread_of_pid.
1663 * tracepoint.c (same_process_p): Remove.
1664 (gdb_agent_about_to_close): Replace usage of same_process_p with
1665 find_any_thread_of_pid.
1666 * linux-x86-low.c (same_process_callback): Remove.
1667 (x86_arch_setup_process_callback): Replace usage of
1668 same_process_callback with find_any_thread_of_pid.
1669 * thread-db.c (any_thread_of): Remove.
1670 (switch_to_process): Replace usage of any_thread_of with
1671 find_any_thread_of_pid.
1672 * inferiors.c (thread_pid_matches_callback): Remove.
1673 (find_thread_process): Adjust to use find_any_thread_of_pid.
1674
a059f00c
SDJ
16752017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1676
1677 * regcache.c (get_thread_regcache): Guard calls to "memset"
1678 with "!VEC_empty".
1679
cc397f3a
SDJ
16802017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1681
1682 * linux-low.c (handle_extended_wait): Use
1683 "allocate_target_description" instead of "XNEW".
1684 * linux-x86-low.c (initialize_low_arch): Likewise.
1685
22916b07
YQ
16862017-09-05 Yao Qi <yao.qi@linaro.org>
1687
1688 * configure.srv (srv_i386_regobj): Remove.
1689 (srv_amd64_regobj): Remove.
1690 (srv_regobj): Set it to "" for x86 non-linux targets.
1691 * linux-x86-tdesc.c (i386_linux_read_description):
1692 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1693 (init_registers_i386): Remove the declaration.
1694 (tdesc_i386): Remove the declaration.
1695 (lynx_i386_arch_setup): Call i386_create_target_description.
1696 * nto-x86-low.c: Likewise.
1697 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1698 [!__x86_64__]: include arch/i386.h.
1699 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1700
38602d55
YQ
17012017-09-05 Yao Qi <yao.qi@linaro.org>
1702
1703 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1704 i386/amd64-XXX-linux from it.
1705
44b886ff
YQ
17062017-09-05 Yao Qi <yao.qi@linaro.org>
1707
1708 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1709 false.
1710 (ipa_amd64_linux_regobj): Remove.
1711 (ipa_x32_linux_regobj): Remove.
1712
b4570e4b
YQ
17132017-09-05 Yao Qi <yao.qi@linaro.org>
1714
1715 * Makefile.in (arch-amd64.o): New rule.
1716 * configure.srv: Append arch-amd64.o.
1717 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1718 (get_ipa_tdesc): Call amd64_linux_read_description.
1719 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1720 and init_registers_amd64_XXX.
1721 * linux-x86-low.c (x86_linux_read_description): Call
1722 amd64_linux_read_description.
1723 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1724 (initialize_low_arch): Don't call init_registers_x32_XXX and
1725 init_registers_amd64_XXX.
1726 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1727 and tdesc_amd64_XXX.
1728 [__x86_64__] (amd64_tdesc_test): New function.
1729 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1730 and init_registers_amd64_XXX.
1731 * linux-x86-tdesc.c: Include arch/amd64.h.
1732 (xcr0_to_tdesc_idx): New function.
1733 (i386_linux_read_description): New function.
1734 (amd64_get_ipa_tdesc_idx): New function.
1735 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1736 (amd64_get_ipa_tdesc): Declare.
1737
d1f28ea2
YQ
17382017-09-05 Yao Qi <yao.qi@linaro.org>
1739
1740 * configure.srv (srv_i386_linux_xmlfiles): Remove
1741 i386/i386-XXX-linux.xml from it.
1742
25a93583
YQ
17432017-09-05 Yao Qi <yao.qi@linaro.org>
1744
1745 * configure.srv: Set srv_i386_linux_regobj empty if $development
1746 is false.
1747 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1748 initialize_low_tdesc.
1749 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1750 with #if initialize_low_tdesc.
1751 * linux-x86-tdesc-selftest.c: New file.
1752 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1753
5f035c07
YQ
17542017-09-05 Yao Qi <yao.qi@linaro.org>
1755
1756 * Makefile.in (arch-i386.o): New rule.
1757 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1758 (x86_64-*-linux*): Likewise.
1759 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1760 include arch/i386.h.
1761 (i386_linux_read_description): Remove code and call
1762 i386_create_target_description.
1763 * tdesc.c (allocate_target_description): New function.
1764 * tdesc.h (set_tdesc_architecture): Remove declaration.
1765 (set_tdesc_osabi): Likewise.
1766
0abe8a89
YQ
17672017-09-05 Yao Qi <yao.qi@linaro.org>
1768
1769 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1770 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1771 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1772 .xmltarget.
1773 * server.c (get_features_xml): Call tdesc_get_features_xml.
1774 * tdesc.c (set_tdesc_architecture): New function.
1775 (set_tdesc_osabi): New function.
1776 (tdesc_get_features_xml): New function.
1777 (tdesc_create_feature): Add an argument.
1778 * tdesc.h (struct target_desc) <features>: New field.
1779 <arch, osabi>: New field.
1780 (~target_desc): xfree features, arch, and osabi.
1781 (target_desc::oerator==): Don't compare .xmltarget.
1782 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1783 (set_tdesc_osabi): Likewise.
1784 (tdesc_get_features_xml): Likewise.
1785
0a188386
YQ
17862017-09-05 Yao Qi <yao.qi@linaro.org>
1787
1788 * linux-x86-tdesc.c: Include selftest.h.
1789 (i386_tdesc_test): New function.
1790 (initialize_low_tdesc): Call selftests::register_test.
1791 * tdesc.h: Include regdef.h.
1792 (target_desc): Override operator == and !=.
1793
f49ff000
YQ
17942017-09-05 Yao Qi <yao.qi@linaro.org>
1795
1796 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1797 (ipa_obj): Likewise.
1798 * linux-i386-ipa.c: Include common/x86-xstate.h
1799 (get_ipa_tdesc): Call i386_linux_read_description.
1800 (initialize_low_tracepoint): Don't call init_registers_XXX
1801 functions, call initialize_low_tdesc instead.
1802 * linux-x86-low.c (x86_linux_read_description): Call
1803 i386_linux_read_description.
1804 (initialize_low_arch): Don't call init_registers_i386_XXX
1805 functions, call initialize_low_tdesc.
1806 * linux-x86-tdesc.c: New file.
1807 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1808 (i386_get_ipa_tdesc_idx): Declare.
1809 (i386_get_ipa_tdesc): Declare.
1810 (initialize_low_tdesc): Declare.
1811
2b68ef2f
YQ
18122017-09-05 Yao Qi <yao.qi@linaro.org>
1813
1814 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1815 instead of 0.
1816
f7000548
YQ
18172017-09-05 Yao Qi <yao.qi@linaro.org>
1818
1819 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1820 * regcache.c (get_thread_regcache): Use VEC_length.
1821 (init_register_cache): Likewise.
1822 (regcache_cpy): Likewise.
1823 (registers_to_string): Iterate reg_defs via VEC_iterate.
1824 (find_regno): Likewise.
1825 (find_register_by_number): Use VEC_index.
1826 (register_size): Call find_register_by_number.
1827 (register_data): Call find_register_by_number.
1828 (supply_regblock): Use VEC_length.
1829 (regcache_raw_read_unsigned): Likewise.
1830 * tdesc.c (init_target_desc): Iterate reg_defs via
1831 VEC_iterate.
1832 (default_description): Update initializer.
1833 (copy_target_description): Don't update field num_registers.
1834 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1835 <num_registers>: Remove.
1836
50a421ac
SM
18372017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1838
1839 * Makefile.in (.SECONDARY): Define target.
1840
23fdd69e
SM
18412017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1842
1843 * linux-low.c (linux_wait_1): Adjust.
1844 * server.c (queue_stop_reply_callback): Adjust.
1845
0a2dde4a
SDJ
18462017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1847
1848 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1849 QEnvironmentUnset and QEnvironmentReset packets.
1850 (handle_query): Inform remote that QEnvironmentHexEncoded,
1851 QEnvironmentUnset and QEnvironmentReset are supported.
1852
6afd337d
SM
18532017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * inferiors.h (inferior_target_data): Rename to ...
1856 (thread_target_data): ... this.
1857 (inferior_regcache_data): Rename to ...
1858 (thread_regcache_data): ... this.
1859 (set_inferior_regcache_data): Rename to ...
1860 (set_thread_regcache_data): ... this.
1861 * inferiors.c (inferior_target_data): Rename to ...
1862 (thread_target_data): ... this.
1863 (inferior_regcache_data): Rename to ...
1864 (thread_regcache_data): ... this.
1865 (set_inferior_regcache_data): Rename to ...
1866 (set_thread_regcache_data): ... this.
1867 (free_one_thread): Update.
1868 * linux-low.h (get_thread_lwp): Update.
1869 * regcache.c (get_thread_regcache): Update.
1870 (regcache_invalidate_thread): Update.
1871 (free_register_cache_thread): Update.
1872 * win32-i386-low.c (update_debug_registers_callback): Update.
1873 (win32_get_current_dr): Update.
1874 * win32-low.c (thread_rec): Update.
1875 (delete_thread_info): Update.
1876 (continue_one_thread): Update.
1877 (suspend_one_thread): Update.
1878
a160cc46
SM
18792017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1880
1881 * inferiors.c (set_inferior_target_data): Remove.
1882 * inferiors.h (set_inferior_target_data): Remove.
1883
6d580b63
YQ
18842017-08-18 Yao Qi <yao.qi@linaro.org>
1885
1886 * Makefile.in (OBS): Add selftest.o.
1887 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1888 * configure, config.in: Re-generated.
1889 * server.c: Include common/sefltest.h.
1890 (captured_main): Handle option --selftest.
1891
f5a29eb0
YQ
18922017-08-09 Yao Qi <yao.qi@linaro.org>
1893
1894 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1895 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1896 i386-avx-mpx.o and i386-mmx.o.
1897 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1898 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1899 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1900 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1901 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1902 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1903 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1904 i386/amd64-avx-mpx.xml.
1905
57757c2f
YQ
19062017-08-09 Yao Qi <yao.qi@linaro.org>
1907
1908 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1909 and x32-avx-avx512.o.
1910 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1911 i386/x32-avx-avx512.xml.
1912
229d26fc
SM
19132017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1914
1915 * tracepoint.h (enum class fast_tpoint_collect_result): New
1916 enumeration.
1917 (fast_tracepoint_collecting): Change return type to
1918 fast_tpoint_collect_result.
1919 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1920 * linux-low.h: Include tracepoint.h.
1921 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1922 fast_tpoint_collect_result.
1923 * linux-low.c (handle_tracepoints): Adjust.
1924 (linux_fast_tracepoint_collecting): Change return type to
1925 fast_tpoint_collect_result.
1926 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1927 linux_wait_1, stuck_in_jump_pad_callback,
1928 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1929 proceed_one_lwp): Adjust to type change.
1930
2e1e43e1
YQ
19312017-07-10 Yao Qi <yao.qi@linaro.org>
1932
1933 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1934
adc764e7
YQ
19352017-06-29 Yao Qi <yao.qi@linaro.org>
1936
1937 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1938 Remove.
1939 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1940
a206891a
SM
19412017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1942
1943 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1944
9a6c7d9c
SDJ
19452017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1946
1947 * linux-low.c (linux_create_inferior): Adjust code to access the
1948 environment information via 'gdb_environ' class.
1949 * lynx-low.c (lynx_create_inferior): Likewise.
1950 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1951 (get_environ): Return a pointer to 'our_environ'.
1952 (captured_main): Initialize 'our_environ'.
1953 * server.h (get_environ): Adjust prototype.
1954 * spu-low.c (spu_create_inferior): Adjust code to access the
1955 environment information via 'gdb_environ' class.
1956
ae3e2ccf
SM
19572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1960 usage of "register" keyword.
1961
3e019bdc
SM
19622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * configure: Re-generate.
1965
8465943a
SM
19662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1967
1968 * configure: Re-generate.
1969
cf0dd6f0
SM
19702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1971
1972 * Makefile.in (COMPILE.pre): Add "-x c++".
1973
9845682b
SDJ
19742017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1975
1976 * fork-child.c: Conditionally include <signal.h>.
1977
aefd8b33
SDJ
19782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1979
1980 * server.c (handle_general_set): Handle new packet
1981 "QStartupWithShell".
1982 (handle_query): Add "QStartupWithShell" to the list of supported
1983 packets.
1984 (gdbserver_usage): Add help text explaining the
1985 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1986 options.
1987 (captured_main): Recognize and act upon the presence of the new
1988 CLI options.
1989
2090129c
SDJ
19902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1991 Pedro Alves <palves@redhat.com>
1992
1993 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1994 * configure: Regenerate.
1995 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1996 "fork-inferior.o".
1997 (i[34567]86-*-lynxos*): Likewise.
1998 (spu*-*-*): Likewise.
1999 * fork-child.c: New file.
2000 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2001 and "environ.h".
2002 (linux_ptrace_fun): New function.
2003 (linux_create_inferior): Adjust function prototype to reflect
2004 change on "target.h". Adjust function code to use
2005 "fork_inferior".
2006 (linux_request_interrupt): Delete "signal_pid".
2007 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2008 (lynx_ptrace_fun): New function.
2009 (lynx_create_inferior): Adjust function prototype to reflect
2010 change on "target.h". Adjust function code to use
2011 "fork_inferior".
2012 * nto-low.c (nto_create_inferior): Adjust function prototype and
2013 code to reflect change on "target.h". Update comments.
2014 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2015 "common-terminal.h" and "environ.h".
2016 (terminal_fd): Moved to fork-child.c.
2017 (old_foreground_pgrp): Likewise.
2018 (restore_old_foreground_pgrp): Likewise.
2019 (last_status): Make it global.
2020 (last_ptid): Likewise.
2021 (our_environ): New variable.
2022 (startup_with_shell): Likewise.
2023 (program_name): Likewise.
2024 (program_argv): Rename to...
2025 (program_args): ...this.
2026 (wrapper_argv): New variable.
2027 (start_inferior): Delete function.
2028 (get_exec_wrapper): New function.
2029 (get_exec_file): Likewise.
2030 (get_environ): Likewise.
2031 (prefork_hook): Likewise.
2032 (post_fork_inferior): Likewise.
2033 (postfork_hook): Likewise.
2034 (postfork_child_hook): Likewise.
2035 (handle_v_run): Update code to deal with arguments coming from the
2036 remote host. Update calls from "start_inferior" to
2037 "create_inferior".
2038 (captured_main): Likewise. Initialize environment variable. Call
2039 "have_job_control".
2040 * server.h (post_fork_inferior): New prototype.
2041 (get_environ): Likewise.
2042 (last_status): Declare.
2043 (last_ptid): Likewise.
2044 (signal_pid): Likewise.
2045 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2046 (spu_ptrace_fun): New function.
2047 (spu_create_inferior): Adjust function prototype to reflect change
2048 on "target.h". Adjust function code to use "fork_inferior".
2049 * target.c (target_terminal_init): New function.
2050 (target_terminal_inferior): Likewise.
2051 (target_terminal_ours): Likewise.
2052 * target.h: Include <vector>.
2053 (struct target_ops) <create_inferior>: Update prototype.
2054 (create_inferior): Update macro.
2055 * utils.c (gdb_flush_out_err): New function.
2056 * win32-low.c (win32_create_inferior): Adjust function prototype
2057 and code to reflect change on "target.h".
2058
043a4934
SDJ
20592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2060
2061 * inferiors.c (switch_to_thread): New function.
2062
15652511
SDJ
20632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2064
2065 * Makefile.in (SFILE): Add "common/job-control.c".
2066 (OBS): Add "job-control.o".
2067
21ea5acd
SDJ
20682017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2069
2070 * Makefile: Remove "@host_makefile_frag@".
2071
e13cb306
PA
20722017-05-05 Pedro Alves <palves@redhat.com>
2073
2074 * configure: Regenerate.
2075
c94fee56
SDJ
20762017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2077
2078 * configure: Regenerate.
2079
a0ff9e1a
SM
20802017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2081
2082 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2083 software_single_step change of return type to
2084 std::vector<CORE_ADDR>.
2085 * linux-low.c (install_software_single_step_breakpoints):
2086 Likewise.
2087 * linux-low.h (install_software_single_step_breakpoints):
2088 Likewise.
2089
be628ab8
SDJ
20902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2091
2092 * remote-utils.c: Include "gdb_termios.h" instead of
2093 "terminal.h".
2094 * terminal.h: Delete file.
2095
7c5ded6a
SDJ
20962017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2097
2098 * server.c: Include <vector>.
2099 <program_argv, wrapper_argv>: Convert to std::vector.
2100 (start_inferior): Rewrite function to use C++.
2101 (handle_v_run): Likewise. Update code that calculates the argv
2102 based on the vRun packet; use C++.
2103 (captured_main): Likewise.
2104
436252de
SM
21052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2106
2107 * server.c (handle_v_cont): Initialize thread_resume::thread
2108 with null_ptid.
2109
9bf2a700
PA
21102017-04-05 Pedro Alves <palves@redhat.com>
2111
2112 * configure: Regenerate.
2113
a121b7c1
PA
21142017-04-05 Pedro Alves <palves@redhat.com>
2115
2116 * gdbreplay.c (sync_error): Constify.
2117 * linux-x86-low.c (push_opcode): Constify.
2118
21c8a587
PA
21192017-04-05 Pedro Alves <palves@redhat.com>
2120
2121 * win32-low.c (get_child_debug_event)
2122 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2123 Report TARGET_WAITKIND_SPURIOUS instead.
2124
fb32b4f7
PA
21252017-04-05 Pedro Alves <palves@redhat.com>
2126
2127 * remote-utils.c (remote_prepare, remote_open): Constify.
2128 * remote-utils.h (remote_prepare, remote_open): Constify.
2129 * server.c (captured_main): Constify 'port' handling.
2130
65dd1e59
SM
21312017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2132
2133 * Makefile.in (clean): Clear .deps.
2134
8fa5b777
SM
21352017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2136
2137 * .gitignore: Remove generated files, replace with wildcard.
2138 * (clean): Replace removal of generated files with wildcard.
2139 (version.c): Replace with...
2140 (version-generated.c): ...this.
2141 (xml-builtin.c): Replace with...
2142 (xml-builtin-generated.c): ...this.
2143 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2144 (%.c: *regformats*): Replace with...
2145 (%-generated.c: *regformats*): ...this.
2146
a12e714b
MF
21472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2148
2149 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2150 (xtensa_fill_gregset): Call collect_register_by_name for
2151 threadptr register.
2152 (xtensa_store_gregset): Call supply_register_by_name for
2153 threadptr register.
2154
1a09b50a
MF
21552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2156
2157 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2158 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2159 (xtensa_store_gregset): Call supply_register for all registers in
2160 a0_regnum..a0_regnum + C0_NREGS range.
2161
1a01e7c6
SM
21622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2163
2164 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2165 (ax-ipa.o: ax.c): Remove.
2166 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2167 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2168 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2169 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2170 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2171
36bc18a8
SM
21722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2173
2174 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2175 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2176 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2177 (errors-ipa.o: ../common/errors.c): Remove.
2178 (format-ipa.o: ../common/format.c): Remove.
2179 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2180
a8ebe3d5
SM
21812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2182
2183 * Makefile.in (%-ipa.o: %.c): New rule.
2184 (tracepoint-ipa.o: tracepoint.c): Remove.
2185 (utils-ipa.o: utils.c): Remove.
2186 (remote-utils-ipa.o: remote-utils.c): Remove.
2187 (regcache-ipa.o: regcache.c): Remove.
2188 (i386-linux-ipa.o: i386-linux.c): Remove.
2189 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2190 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2191 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2192 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2193 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2194 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2195 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2196 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2197 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2198 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2199 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2200 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2201 (aarch64-ipa.o: aarch64.c): Remove.
2202 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2203 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2204 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2205 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2206 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2207 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2208 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2209 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2210 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2211 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2212 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2213 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2214 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2215 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2216 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2217 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2218 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2219 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2220 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2221 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2222 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2223 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2224 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2225 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2226 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2227 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2228 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2229 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2230 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2231 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2232 (tdesc-ipa.o: tdesc.c): Remove.
2233 (x32-linux-ipa.o: x32-linux.c): Remove.
2234 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2235 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2236
50cfacb7
SM
22372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2238
2239 * Makefile.in (%.o: ../arch/%.c): New rule.
2240 (arm.o: ../arch/arm.c): Remove.
2241 (arm-linux.o: ../arch/arm-linux.c): Remove.
2242 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2243 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2244
c5a22423
SM
22452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2246
2247 * Makefile.in (%.o: ../nat/%.c): New rule.
2248 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2249 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2250 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2251 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2252 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2253 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2254 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2255 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2256 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2257 (linux-personality.o: ../nat/linux-personality.c): Remove.
2258 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2259 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2260 (x86-linux.o: ../nat/x86-linux.c): Remove.
2261 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2262 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2263
6bda016b
SM
22642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2265
2266 * Makefile.in (%.o: ../common/%.c): New rule.
2267 (signals.o: ../common/signals.c): Remove.
2268 (print-utils.o: ../common/print-utils.c): Remove.
2269 (rsp-low.o: ../common/rsp-low.c): Remove.
2270 (common-utils.o: ../common/common-utils.c): Remove.
2271 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2272 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2273 (vec.o: ../common/vec.c): Remove.
2274 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2275 (xml-utils.o: ../common/xml-utils.c): Remove.
2276 (ptid.o: ../common/ptid.c): Remove.
2277 (buffer.o: ../common/buffer.c): Remove.
2278 (format.o: ../common/format.c): Remove.
2279 (filestuff.o: ../common/filestuff.c): Remove.
2280 (agent.o: ../common/agent.c): Remove.
2281 (errors.o: ../common/errors.c): Remove.
2282 (environ.o: ../common/environ.c): Remove.
2283 (common-debug.o: ../common/common-debug.c): Remove.
2284 (cleanups.o: ../common/cleanups.c): Remove.
2285 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2286 (fileio.o: ../common/fileio.c): Remove.
2287 (common-regcache.o: ../common/common-regcache.c): Remove.
2288 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2289 (new-op.o: ../common/new-op.c): Remove.
2290 (btrace-common.o: ../common/btrace-common.c): Remove.
2291
21122961
SM
22922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2293
2294 * Makefile.in (%.o: ../target/%.c): New rule.
2295 (waitstatus.o: ../target/waitstatus.c): Remove.
2296
c362e621
SM
22972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * Makefile.in
2300 (%.c: ../regformats/%.dat,
2301 (%.c: ../regformats/arm/%.dat,
2302 (%.c: ../regformats/i386/%.dat,
2303 (%.c: ../regformats/rs6000/%.dat): New rules.
2304 (aarch64.c): Remove.
2305 (reg-arm.c): Remove.
2306 (arm-with-iwmmxt.c): Remove.
2307 (arm-with-vfpv2.c): Remove.
2308 (arm-with-vfpv3.c): Remove.
2309 (arm-with-neon.c): Remove.
2310 (reg-bfin.c): Remove.
2311 (reg-cris.c): Remove.
2312 (reg-crisv32.c): Remove.
2313 (i386.c): Remove.
2314 (i386-linux.c): Remove.
2315 (i386-avx.c): Remove.
2316 (i386-avx-linux.c): Remove.
2317 (i386-avx-avx512.c): Remove.
2318 (i386-avx-avx512-linux.c): Remove.
2319 (i386-mpx.c): Remove.
2320 (i386-mpx-linux.c): Remove.
2321 (i386-avx-mpx-avx512-pku.c): Remove.
2322 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2323 (i386-avx-mpx.c): Remove.
2324 (i386-avx-mpx-linux.c): Remove.
2325 (i386-mmx.c): Remove.
2326 (i386-mmx-linux.c): Remove.
2327 (reg-ia64.c): Remove.
2328 (reg-m32r.c): Remove.
2329 (reg-m68k.c): Remove.
2330 (reg-cf.c): Remove.
2331 (mips-linux.c): Remove.
2332 (mips-dsp-linux.c): Remove.
2333 (mips64-linux.c): Remove.
2334 (mips64-dsp-linux.c): Remove.
2335 (nios2-linux.c): Remove.
2336 (powerpc-32.c): Remove.
2337 (powerpc-32l.c): Remove.
2338 (powerpc-altivec32l.c): Remove.
2339 (powerpc-cell32l.c): Remove.
2340 (powerpc-vsx32l.c): Remove.
2341 (powerpc-isa205-32l.c): Remove.
2342 (powerpc-isa205-altivec32l.c): Remove.
2343 (powerpc-isa205-vsx32l.c): Remove.
2344 (powerpc-e500l.c): Remove.
2345 (powerpc-64l.c): Remove.
2346 (powerpc-altivec64l.c): Remove.
2347 (powerpc-cell64l.c): Remove.
2348 (powerpc-vsx64l.c): Remove.
2349 (powerpc-isa205-64l.c): Remove.
2350 (powerpc-isa205-altivec64l.c): Remove.
2351 (powerpc-isa205-vsx64l.c): Remove.
2352 (s390-linux32.c): Remove.
2353 (s390-linux32v1.c): Remove.
2354 (s390-linux32v2.c): Remove.
2355 (s390-linux64.c): Remove.
2356 (s390-linux64v1.c): Remove.
2357 (s390-linux64v2.c): Remove.
2358 (s390-te-linux64.c): Remove.
2359 (s390-vx-linux64.c): Remove.
2360 (s390-tevx-linux64.c): Remove.
2361 (s390x-linux64.c): Remove.
2362 (s390x-linux64v1.c): Remove.
2363 (s390x-linux64v2.c): Remove.
2364 (s390x-te-linux64.c): Remove.
2365 (s390x-vx-linux64.c): Remove.
2366 (s390x-tevx-linux64.c): Remove.
2367 (tic6x-c64xp-linux.c): Remove.
2368 (tic6x-c64x-linux.c): Remove.
2369 (tic6x-c62x-linux.c): Remove.
2370 (reg-sh.c): Remove.
2371 (reg-sparc64.c): Remove.
2372 (reg-spu.c): Remove.
2373 (amd64.c): Remove.
2374 (amd64-linux.c): Remove.
2375 (amd64-avx.c): Remove.
2376 (amd64-avx-linux.c): Remove.
2377 (amd64-avx-avx512.c): Remove.
2378 (amd64-avx-avx512-linux.c): Remove.
2379 (amd64-mpx.c): Remove.
2380 (amd64-mpx-linux.c): Remove.
2381 (amd64-avx-mpx-avx512-pku.c): Remove.
2382 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2383 (amd64-avx-mpx.c): Remove.
2384 (amd64-avx-mpx-linux.c): Remove.
2385 (x32.c): Remove.
2386 (x32-linux.c): Remove.
2387 (x32-avx.c): Remove.
2388 (x32-avx-linux.c): Remove.
2389 (x32-avx-avx512.c): Remove.
2390 (x32-avx-avx512-linux.c): Remove.
2391 (reg-xtensa.c): Remove.
2392 (reg-tilegx.c): Remove.
2393 (reg-tilegx32.c): Remove.
2394
1672e0d9
SDJ
23952017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2396
2397 * Makefile.in (SFILES): Add "common/environ.c".
2398 (OBJS): Add "common/environ.h".
2399
239b6d10
WT
24002017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2401
2402 * configure.ac: Check if the fs_base and gs_base members of
2403 `struct user_regs_struct' exist.
2404 * config.in: Regenerated.
2405 * configure: Likewise.
2406
694b382c
AT
24072017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2408
2409 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2410 target_read_memory.
2411 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2412 (get_next_pcs_syscall_next_pc): Likewise.
2413
7dc53023
LM
24142016-12-23 Luis Machado <lgustavo@codesourcery.com>
2415
2416 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2417 * nto-x86-low.c: Likewise.
2418
ad02e4fe
SM
24192016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2420
2421 * Makefile.in: Include disable-implicit-rules.mk.
2422
dcb07cfa
PA
24232016-11-23 Pedro Alves <palves@redhat.com>
2424
2425 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2426 (debug_vprintf): Use std::chrono::steady_clock instead of
2427 gettimeofday. Use '.' instead of ':'.
2428 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2429 (get_timestamp): Use std::chrono::steady_clock instead of
2430 gettimeofday.
2431
8629c02c
SM
24322016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2433
2434 * Makefile.in: Fix whitespace formatting.
2435
b593ecca
SM
24362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2437
2438 * Makefile.in (SFILES, OBS): Flatten list and order
2439 alphabetically.
2440
9986ba08
PA
24412016-11-23 Pedro Alves <palves@redhat.com>
2442
2443 * event-loop.c (handle_file_event): Use warning.
2444 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2445 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2446 Use warning.
2447
4eefa7bc
PA
24482016-11-23 Pedro Alves <palves@redhat.com>
2449
2450 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2451 output.
2452 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2453 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2454 debug_printf and debug_flush for debug output.
2455 * server.c (handle_general_set): Likewise.
2456 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2457 output.
2458
5443506e
SM
24592016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2460
2461 * Makefile.in (.c.o): Replace rule with ...
2462 (%.o: %.c): ... this one.
2463
3b165252
SM
24642016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2465
2466 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2467 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2468 make.
2469 * configure.ac: Remove checks for the make program.
2470 * configure: Re-generate.
2471
0bcda685
PA
24722016-10-28 Pedro Alves <palves@redhat.com>
2473
2474 * Makefile.in (CXX_DIALECT): Get from configure.
2475 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2476 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2477 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2478 * config.in: Regenerate.
2479 * configure: Regenerate.
2480
c3805894
YQ
24812016-10-27 Yao Qi <yao.qi@linaro.org>
2482
2483 * linux-low.c (linux_supports_range_stepping): Return true if
2484 can_software_single_step return true.
2485
89342618
YQ
24862016-10-27 Yao Qi <yao.qi@linaro.org>
2487
2488 * inferiors.c (find_inferior_in_random): New function.
2489 * inferiors.h (find_inferior_in_random): Declare.
2490 * linux-low.c (linux_wait_for_event_filtered): Call
2491 find_inferior_in_random instead of find_inferior.
2492
e3652c84
YQ
24932016-10-27 Yao Qi <yao.qi@linaro.org>
2494
2495 * linux-low.c (linux_wait_1): If single-step breakpoints are
2496 inserted, remove them.
2497
5a04c4cf
PA
24982016-10-26 Pedro Alves <palves@redhat.com>
2499
2500 * linux-low.c (handle_extended_wait): Link parent/child fork
2501 threads.
2502 (linux_wait_1): Unlink them.
2503 (linux_set_resume_request): Ignore resume requests for
2504 already-resumed and unhandled fork child threads.
2505 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2506 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2507 New functions.
2508 (handle_v_requests) <vCont>: Don't call require_running.
2509 * server.h (in_queued_stop_replies): New declaration.
2510
cb93dc7f
YQ
25112016-10-24 Yao Qi <yao.qi@linaro.org>
2512
2513 PR server/20733
2514 * linux-aarch64-low.c (append_insns): Cast the return value to
2515 'uint32_t *'.
2516
a1078bea
YQ
25172016-10-10 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2520
1fb77080
SDJ
25212016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2522
2523 * target.c (target_supports_multi_process): New function, moved
2524 from...
2525 * target.h (target_supports_multi_process): ... here. Remove
2526 macro.
2527
39b5a3b9
TT
25282016-10-05 Tom Tromey <tom@tromey.com>
2529
2530 PR remote/20655:
2531 * tracepoint.c (handle_tracepoint_bkpts): Check
2532 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2533
c1d0b70a
YQ
25342016-10-05 Yao Qi <yao.qi@linaro.org>
2535
2536 * configure.srv: Update the path of arm-*.xml files.
2537
0a69eedb
YQ
25382016-10-05 Terry Guo <terry.guo@arm.com>
2539 Yao Qi <yao.qi@linaro.org>
2540
2541 * Makefile.in: Adjust the path of rules.
2542 * configure.srv: Update the path of xml files.
2543 * regformats/arm-with-iwmmxt.dat: Regenerated.
2544 * regformats/arm-with-neon.dat: Likewise.
2545 * regformats/arm-with-vfpv2.dat: Likewise.
2546 * regformats/arm-with-vfpv3.dat Likewise.
2547
17e16485
YQ
25482016-09-30 Yao Qi <yao.qi@linaro.org>
2549
2550 PR gdbserver/20627
2551 * target.c (target_stop_and_wait): Don't call
2552 target_continue_no_signal, use resume_stop instead.
2553
edeeb602
YQ
25542016-09-26 Yao Qi <yao.qi@linaro.org>
2555
2556 * linux-low.c (linux_wait_1): Call debug_exit.
2557
503b1c39
PA
25582016-09-23 Pedro Alves <palves@redhat.com>
2559
2560 * Makefile.in (SFILES): Add common/new-op.c.
2561 (OBS): Add common/new-op.o.
2562 (new-op.o): New rule.
2563
74172ecf
SM
25642016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2565
2566 * .gitinore: Ignore more files.
2567
fc6cda2e
YQ
25682016-09-21 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2571 23.
2572
bc1e6c81
SDJ
25732016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2574
2575 * server.c (start_inferior): Call target_mourn_inferior instead of
2576 mourn_inferior; pass ptid_t argument to it.
2577 (resume): Likewise.
2578 (handle_target_event): Likewise.
2579 * target.c (target_mourn_inferior): New function.
2580 * target.h (mourn_inferior): Delete macro.
2581
0e00e962
AA
25822016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2583
2584 * linux-low.c (lwp_is_stepping): New function.
2585
1d8cb77d
CL
25862016-09-06 Carl Love <cel@us.ibm.com>
2587
2588 * server.c (start_inferior): Fixed comment, requested comment change
2589 didn't get updated correctly. Removed reference to ptrace () call as
2590 it is only true on Linux systems.
2591
7313bced
CL
25922016-09-06 Carl Love <cel@us.ibm.com>
2593
2594 * server.c (start_inferior): Do not call
2595 function target_post_create_inferior () if the
2596 inferior process has already exited.
2597
cf6de44d
PA
25982016-09-05 Pedro Alves <palves@redhat.com>
2599
2600 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2601 (COMPILE.pre, CC_LD): Use CXX directly.
2602 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2603 * acinclude.m4: Don't include build-with-cxx.m4.
2604 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2605 * configure: Regenerate.
2606
c1da6748
AT
26072016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2608
2609 PR gdb/19495
2610 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2611 call writing data to own_buf.
2612
f2b9e3df
SDJ
26132016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2614
2615 * target.c (mywait): Call target_wait instead of
2616 the_target->wait.
2617 (target_wait): New function.
2618
049a8570
SDJ
26192016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2620
2621 * server.c (start_inferior): New variable 'ptid'. Replace calls
2622 to the_target->resume by target_continue{,_no_signal}, depending
2623 on the case.
2624 * target.c (target_stop_and_wait): Call target_continue_no_signal
2625 instead of the_target->resume.
2626 (target_continue): New function.
2627
3aa5cfa0
AT
26282016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2629
2630 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2631
754653a7
AZ
26322016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2633
2634 PR server/20491
2635 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2636 ps_prochandle.
2637 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2638 * linux-arm-low.c (ps_get_thread_area): Likewise.
2639 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2640 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2641 * linux-mips-low.c (ps_get_thread_area): Likewise.
2642 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2643 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2644 * linux-x86-low.c (ps_get_thread_area): Likewise.
2645 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2646
ed036b40
PA
26472016-08-19 Pedro Alves <palves@redhat.com>
2648
2649 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2650
c8ef42ee
PA
26512016-08-19 Pedro Alves <palves@redhat.com>
2652
2653 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2654 comment. Use memcpy instead of casting through unsigned long.
2655
9c235a72
PA
26562016-08-19 Pedro Alves <palves@redhat.com>
2657
2658 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2659 allocating around 0x80000000.
2660
201506da
PA
26612016-08-19 Pedro Alves <palves@redhat.com>
2662
2663 PR gdb/20415
2664 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2665 (x32-avx512-linux-ipa.o): New rules.
2666 * configure.ac (x86_64-*-linux*): New x32 check.
2667 * configure.srv (ipa_x32_linux_regobj): New.
2668 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2669 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2670 descriptions.
2671 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2672 descriptions.
2673 * configure: Regenerate.
2674
f348d89a
PA
26752016-08-09 Pedro Alves <palves@redhat.com>
2676
2677 PR gdb/18653
2678 * Makefile.in (OBS): Add signals-state-save-restore.o.
2679 (signals-state-save-restore.o): New rule.
2680 * config.in: Regenerate.
2681 * configure: Regenerate.
2682 * linux-low.c: Include "signals-state-save-restore.h".
2683 (linux_create_inferior): Call
2684 restore_original_signals_state.
2685 * server.c: Include "dispositions-save-restore.h".
2686 (captured_main): Call save_original_signals_state.
2687
1baf5149
PA
26882016-08-05 Pedro Alves <palves@redhat.com>
2689
2690 * configure: Regenerate.
2691
fcd4a73d
YQ
26922016-08-04 Yao Qi <yao.qi@linaro.org>
2693
2694 * linux-low.c (regsets_fetch_inferior_registers): Check
2695 errno is ESRCH or not.
2696
979659d0
YQ
26972016-08-02 Yao Qi <yao.qi@linaro.org>
2698
2699 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2700 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2701 (thread_db_load_search): Update.
2702 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2703 td_ta_set_event and td_ta_event_getmsg.
2704
6598661d
PA
27052016-07-26 Pedro Alves <palves@redhat.com>
2706
2707 PR server/20414
2708 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2709 of unsigned long for 64-bit registers and use uint32_t instead of
2710 unsigned int for 32-bit registers.
2711
9cf12d57
PA
27122016-07-26 Pedro Alves <palves@redhat.com>
2713
2714 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2715 to 'ptrace'.
2716
305450ed
TT
27172016-07-21 Tom Tromey <tom@tromey.com>
2718
2719 * configure: Rebuild.
2720
2583da7c
YQ
27212016-07-21 Yao Qi <yao.qi@linaro.org>
2722
2723 * mem-break.c (find_gdb_breakpoint): Cast bp to
2724 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2725
21536b36
YQ
27262016-07-21 Yao Qi <yao.qi@linaro.org>
2727
2728 * server.c (handle_v_requests): Support s and S actions
2729 if target_supports_software_single_step return true.
2730
8901d193
YQ
27312016-07-21 Yao Qi <yao.qi@linaro.org>
2732
2733 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2734 is resume_step, call maybe_hw_step.
2735 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2736 and unstop them.
2737 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2738 breakpoints or not.
2739 (proceed_one_lwp): If resume request is resume_step, install
2740 reinsert breakpoints and call maybe_hw_step.
2741
0e9a339e
YQ
27422016-07-21 Yao Qi <yao.qi@linaro.org>
2743
2744 * linux-low.c (proceed_one_lwp): Declare.
2745 (linux_resume_one_thread): Remove local variable 'step'.
2746 Lift code enqueue signal. Call proceed_one_lwp instead of
2747 linux_resume_one_lwp.
2748
4281b351
YQ
27492016-07-21 Yao Qi <yao.qi@linaro.org>
2750
2751 * linux-low.c (linux_resume_one_thread): Call
2752 enqueue_pending_signal.
2753
984a2c04
YQ
27542016-07-21 Yao Qi <yao.qi@linaro.org>
2755
2756 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2757 * inferiors.c (do_restore_current_thread_cleanup): New function.
2758 (make_cleanup_restore_current_thread): Likewise.
2759 * linux-low.c (install_software_single_step_breakpoints): Call
2760 make_cleanup_restore_current_thread. Switch current_thread to
2761 thread.
2762
bec903c9
YQ
27632016-07-21 Yao Qi <yao.qi@linaro.org>
2764
2765 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2766 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2767 (clone_one_breakpoint): Likewise.
2768 (delete_reinsert_breakpoints): Change parameter to thread.
2769 Callers updated.
2770 (has_reinsert_breakpoints): Likewise.
2771 (uninsert_reinsert_breakpoints): Likewise.
2772 (reinsert_reinsert_breakpoints): Likewise.
2773 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2774 (delete_reinsert_breakpoints): Likewise.
2775 (reinsert_reinsert_breakpoints): Likewise.
2776 (uninsert_reinsert_breakpoints): Likewise.
2777 (has_reinsert_breakpoints): Likewise.
2778
63c40ec7
YQ
27792016-07-21 Yao Qi <yao.qi@linaro.org>
2780
2781 * inferiors.c (get_thread_process): Make parameter const.
2782 * inferiors.h (get_thread_process): Update declaration.
2783 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2784 Add new parameters child_thread and parent_thread. Callers
2785 updated.
2786 * mem-break.h (clone_all_breakpoints): Update declaration.
2787
9aa76cd0
YQ
27882016-07-21 Yao Qi <yao.qi@linaro.org>
2789
2790 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2791 <command_list, handler>: Remove.
2792 (struct gdb_breakpoint): New.
2793 (struct other_breakpoint): New.
2794 (struct reinsert_breakpoint): New.
2795 (is_gdb_breakpoint): New function.
2796 (any_persistent_commands): Update command_list if
2797 is_gdb_breakpoint returns true.
2798 (set_breakpoint): Create breakpoints according to their types.
2799 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2800 (set_gdb_breakpoint_1): Likewise.
2801 (set_gdb_breakpoint): Likewise.
2802 (clear_breakpoint_conditions): Change parameter type to
2803 'struct gdb_breakpoint *'.
2804 (clear_breakpoint_commands): Likewise.
2805 (clear_breakpoint_conditions_and_commands): Likewise.
2806 (add_condition_to_breakpoint): Likewise.
2807 (add_breakpoint_condition): Likewise.
2808 (add_commands_to_breakpoint): Likewise.
2809 (check_breakpoints): Check other_breakpoint.
2810 (clone_one_breakpoint): Clone breakpopint according to its type.
2811 * mem-break.h (struct gdb_breakpoint): Declare.
2812 (set_gdb_breakpoint): Update declaration.
2813 (clear_breakpoint_conditions_and_commands): Likewise.
2814 (add_breakpoint_condition): Likewise.
2815 (add_breakpoint_commands): Likewise.
2816 * server.c (process_point_options): Change parameter type to
2817 'struct gdb_breakpoint *'.
2818
811f8301
YQ
28192016-07-21 Yao Qi <yao.qi@linaro.org>
2820
2821 * mem-break.c (set_breakpoint_at): Rename it to ...
2822 (set_breakpoint_type_at): ... it.
2823 (set_breakpoint_at): Call set_breakpoint_type_at.
2824 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2825 * mem-break.h (set_breakpoint_at): Update comments.
2826
b1c51e36
CLT
28272016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2828
2829 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2830 to buf parameter.
2831 (nios2_store_gregset): Likewise.
2832
ced2dffb
PA
28332016-07-01 Pedro Alves <palves@redhat.com>
2834 Antoine Tremblay <antoine.tremblay@ericsson.com>
2835
2836 * linux-low.c: Change interface to take the target lwp_info
2837 pointer directly and return void. Handle detaching from a zombie
2838 thread.
2839 (linux_detach_lwp_callback): New function.
2840 (linux_detach): Detach from the leader thread after detaching from
2841 the clone threads.
2842
2ac09a5b
YQ
28432016-06-28 Yao Qi <yao.qi@linaro.org>
2844
2845 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2846 for variable new_offset.
2847 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2848 (aarch64_ftrace_insn_reloc_cb): Likewise.
2849 (aarch64_ftrace_insn_reloc_tb): Likewise.
2850 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2851 PRIx64 instead of PRIx32.
2852
79e7fd4f
YQ
28532016-06-28 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2856 (the_low_target): Install arm_get_syscall_trapinfo.
2857
061fc021
YQ
28582016-06-28 Yao Qi <yao.qi@linaro.org>
2859
2860 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2861 function.
2862 (the_low_target): Install aarch64_get_syscall_trapinfo.
2863
4cc32bec
YQ
28642016-06-28 Yao Qi <yao.qi@linaro.org>
2865
2866 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2867 Callers updated.
2868 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2869 Remove parameter sysno.
2870 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2871 sysret.
2872
782c1122
AA
28732016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2874
2875 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2876 (s390_emit_ne_goto): Likewise.
2877 (s390_emit_lt_goto): Likewise.
2878 (s390_emit_le_goto): Likewise.
2879 (s390_emit_gt_goto): Likewise.
2880 (s390_emit_ge_goto): Likewise.
2881 (s390x_emit_eq_goto): Likewise.
2882 (s390x_emit_ne_goto): Likewise.
2883 (s390x_emit_lt_goto): Likewise.
2884 (s390x_emit_le_goto): Likewise.
2885 (s390x_emit_gt_goto): Likewise.
2886 (s390x_emit_ge_goto): Likewise.
2887 (s390_emit_ops_impl): Mark variable static.
2888 (s390x_emit_ops): Likewise.
2889
2e7b624b
YQ
28902016-06-17 Yao Qi <yao.qi@linaro.org>
2891
2892 * linux-low.c (handle_extended_wait): Call
2893 uninsert_reinsert_breakpoints for the parent process. Remove
2894 reinsert breakpoints from the child process. Reinsert them to
2895 the parent process when vfork is done.
2896 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2897 (reinsert_reinsert_breakpoints): New function.
2898 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2899 (reinsert_reinsert_breakpoints): Declare.
2900
8a81c5d7
YQ
29012016-06-17 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-low.c (handle_extended_wait): If the parent is doing
2904 step-over, remove the reinsert breakpoints from the forked child.
2905
f50bf8e5
YQ
29062016-06-17 Yao Qi <yao.qi@linaro.org>
2907
2908 * linux-low.c (unsuspend_all_lwps): Declare.
2909 (linux_low_filter_event): If thread exited, call finish_step_over.
2910 If step-over is finished, unsuspend other threads.
2911
8376a3cb
YQ
29122016-06-17 Yao Qi <yao.qi@linaro.org>
2913
2914 * linux-low.c (linux_resume_one_lwp_throw): Assert
2915 has_reinsert_breakpoints returns false.
2916 * mem-break.c (delete_disabled_breakpoints): Assert
2917 bp type isn't reinsert_breakpoint.
2918
f79b145d
YQ
29192016-06-17 Yao Qi <yao.qi@linaro.org>
2920
2921 * linux-low.c (maybe_hw_step): New function.
2922 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2923 (finish_step_over): Switch current_thread to lwp temporarily,
2924 and assert has_reinsert_breakpoints returns true.
2925 (proceed_one_lwp): Call maybe_hw_step.
2926 * mem-break.c (has_reinsert_breakpoints): New function.
2927 * mem-break.h (has_reinsert_breakpoints): Declare.
2928
0ae534d2
JT
29292016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2930
2931 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2932
fcdad592
YQ
29332016-05-17 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2936 instead of find_inferior.
2937
9e784964
YQ
29382016-05-05 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2941 Initialize res to zero.
2942
cf2ebb6e
YQ
29432016-05-05 Yao Qi <yao.qi@linaro.org>
2944
2945 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2946 to uint32_t.
2947
c1aebf87
UW
29482016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2949
2950 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2951 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2952 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2953
35fd2deb 29542016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2955 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2956
2957 * tracepoint.c (write_inferior_int8): New function.
2958 (cmd_qtenable_disable): Write enable flag using
2959 write_inferior_int8.
2960
484b3c32
YQ
29612016-04-25 Yao Qi <yao.qi@linaro.org>
2962
2963 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2964 (need_step_over_p): Return zero if the LWP has pending signals
2965 can be delivered on software single step target.
2966
85ba7d86
YQ
29672016-04-25 Yao Qi <yao.qi@linaro.org>
2968
2969 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2970 return instead of error.
2971
3539aa13
YQ
29722016-04-22 Yao Qi <yao.qi@linaro.org>
2973
2974 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2975 to 23.
2976
5b061e98
YQ
29772016-04-22 Yao Qi <yao.qi@linaro.org>
2978
2979 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2980 signal when stepping over breakpoint with software single
2981 step.
2982
3451269c
PA
29832016-04-21 Pedro Alves <palves@redhat.com>
2984
2985 * linux-s390-low.c (s390_collect_ptrace_register)
2986 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2987 add casts.
2988 (s390_check_regset): Use void * instead of gdb_byte *.
2989
a2358508
PA
29902016-04-20 Pedro Alves <palves@redhat.com>
2991
2992 * configure: Renegerate.
2993
6885166d
YQ
29942016-04-20 Yao Qi <yao.qi@linaro.org>
2995
2996 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2997 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2998 number 16.
2999 (arm_store_gregset): Likewise.
3000
2b863f51
WT
30012016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3002
3003 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3004 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3005 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3006 (amd64-avx-mpx-linux.c): New rules.
3007 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3008 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3009 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3010 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3011 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3012 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3013 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3014 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3015 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3016 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3017 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3018 * linux-x86-low.c (x86_linux_read_description): Add case for
3019 X86_XSTATE_AVX_MPX_MASK.
3020 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3021 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3022 init_registers_i386_avx_mpx_linux.
3023 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3024 (initialize_low_tracepoint): Call
3025 init_registers_i386_avx_mpx_linux.
3026 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3027 (initialize_low_tracepoint): Call
3028 init_registers_amd64_avx_mpx_linux.
3029 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3030 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3031 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3032 declarations.
3033
9b30624b
PA
30342016-04-18 Pedro Alves <palves@redhat.com>
3035
3036 * configure: Regenerate.
3037
45e3745e
AT
30382016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3039
3040 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3041 (aarch64_emit_sub): Likewise.
3042
2afc13ff
PA
30432016-04-12 Pedro Alves <palves@redhat.com>
3044
3045 * utils.c (prepare_to_throw_exception): Delete.
3046
6e774b13
SM
30472016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3048
3049 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3050
4dca19f8
MK
30512016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3052
3053 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3054
d0a9981f
MK
30552016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3056
3057 * linux-aarch64-ipa.c: Add <elf.h> include.
3058 * linux-ppc-ipa.c: Add <elf.h> include.
3059 * linux-s390-ipa.c: Add <elf.h> include.
3060
252db07e
MK
30612016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3062
3063 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3064 (get_raw_reg_ptr): Likewise.
3065 (get_trace_state_variable_value_ptr): Likewise.
3066 (set_trace_state_variable_value_ptr): Likewise.
3067 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3068 char *.
3069
14e2b6d9
MK
30702016-03-31 Wei-cheng Wang <cole945@gmail.com>
3071 Marcin Kościelnicki <koriakin@0x04.net>
3072
3073 PR/17221
3074 * linux-ppc-low.c (emit_insns): New function.
3075 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3076 (ppc_emit_prologue): New function.
3077 (ppc_emit_epilogue): New function.
3078 (ppc_emit_add): New function.
3079 (ppc_emit_sub): New function.
3080 (ppc_emit_mul): New function.
3081 (ppc_emit_lsh): New function.
3082 (ppc_emit_rsh_signed): New function.
3083 (ppc_emit_rsh_unsigned): New function.
3084 (ppc_emit_ext): New function.
3085 (ppc_emit_zero_ext): New function.
3086 (ppc_emit_log_not): New function.
3087 (ppc_emit_bit_and): New function.
3088 (ppc_emit_bit_or): New function.
3089 (ppc_emit_bit_xor): New function.
3090 (ppc_emit_bit_not): New function.
3091 (ppc_emit_equal): New function.
3092 (ppc_emit_less_signed): New function.
3093 (ppc_emit_less_unsigned): New function.
3094 (ppc_emit_ref): New function.
3095 (ppc_emit_const): New function.
3096 (ppc_emit_reg): New function.
3097 (ppc_emit_pop): New function.
3098 (ppc_emit_stack_flush): New function.
3099 (ppc_emit_swap): New function.
3100 (ppc_emit_stack_adjust): New function.
3101 (ppc_emit_call): New function.
3102 (ppc_emit_int_call_1): New function.
3103 (ppc_emit_void_call_2): New function.
3104 (ppc_emit_if_goto): New function.
3105 (ppc_emit_goto): New function.
3106 (ppc_emit_eq_goto): New function.
3107 (ppc_emit_ne_goto): New function.
3108 (ppc_emit_lt_goto): New function.
3109 (ppc_emit_le_goto): New function.
3110 (ppc_emit_gt_goto): New function.
3111 (ppc_emit_ge_goto): New function.
3112 (ppc_write_goto_address): New function.
3113 (ppc_emit_ops_impl): New static variable.
3114 (ppc64v1_emit_prologue): New function.
3115 (ppc64v2_emit_prologue): New function.
3116 (ppc64_emit_epilogue): New function.
3117 (ppc64_emit_add): New function.
3118 (ppc64_emit_sub): New function.
3119 (ppc64_emit_mul): New function.
3120 (ppc64_emit_lsh): New function.
3121 (ppc64_emit_rsh_signed): New function.
3122 (ppc64_emit_rsh_unsigned): New function.
3123 (ppc64_emit_ext): New function.
3124 (ppc64_emit_zero_ext): New function.
3125 (ppc64_emit_log_not): New function.
3126 (ppc64_emit_bit_and): New function.
3127 (ppc64_emit_bit_or): New function.
3128 (ppc64_emit_bit_xor): New function.
3129 (ppc64_emit_bit_not): New function.
3130 (ppc64_emit_equal): New function.
3131 (ppc64_emit_less_signed): New function.
3132 (ppc64_emit_less_unsigned): New function.
3133 (ppc64_emit_ref): New function.
3134 (ppc64_emit_const): New function.
3135 (ppc64v1_emit_reg): New function.
3136 (ppc64v2_emit_reg): New function.
3137 (ppc64_emit_pop): New function.
3138 (ppc64_emit_stack_flush): New function.
3139 (ppc64_emit_swap): New function.
3140 (ppc64v1_emit_call): New function.
3141 (ppc64v2_emit_call): New function.
3142 (ppc64v1_emit_int_call_1): New function.
3143 (ppc64v2_emit_int_call_1): New function.
3144 (ppc64v1_emit_void_call_2): New function.
3145 (ppc64v2_emit_void_call_2): New function.
3146 (ppc64_emit_if_goto): New function.
3147 (ppc64_emit_eq_goto): New function.
3148 (ppc64_emit_ne_goto): New function.
3149 (ppc64_emit_lt_goto): New function.
3150 (ppc64_emit_le_goto): New function.
3151 (ppc64_emit_gt_goto): New function.
3152 (ppc64_emit_ge_goto): New function.
3153 (ppc64v1_emit_ops_impl): New static variable.
3154 (ppc64v2_emit_ops_impl): New static variable.
3155 (ppc_emit_ops): New function.
3156 (linux_low_target): Wire in ppc_emit_ops.
3157
a2174ba4
MK
31582016-03-31 Wei-cheng Wang <cole945@gmail.com>
3159 Marcin Kościelnicki <koriakin@0x04.net>
3160
3161 PR/17221
3162 * Makefile.in: Add powerpc-*-ipa.o
3163 * configure.srv: Add ipa_obj for powerpc*-linux.
3164 * linux-ppc-ipa.c: New file.
3165 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3166 includes.
3167 (PPC_FIELD): New macro.
3168 (PPC_SEXT): New macro.
3169 (PPC_OP6): New macro.
3170 (PPC_BO): New macro.
3171 (PPC_LI): New macro.
3172 (PPC_BD): New macro.
3173 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3174 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3175 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3176 (ppc_get_thread_area): New function.
3177 (is_elfv2_inferior): New function.
3178 (gen_ds_form): New function.
3179 (GEN_STD): New macro.
3180 (GEN_STDU): New macro.
3181 (GEN_LD): New macro.
3182 (GEN_LDU): New macro.
3183 (gen_d_form): New function.
3184 (GEN_ADDI): New macro.
3185 (GEN_ADDIS): New macro.
3186 (GEN_LI): New macro.
3187 (GEN_LIS): New macro.
3188 (GEN_ORI): New macro.
3189 (GEN_ORIS): New macro.
3190 (GEN_LWZ): New macro.
3191 (GEN_STW): New macro.
3192 (GEN_STWU): New macro.
3193 (gen_xfx_form): New function.
3194 (GEN_MFSPR): New macro.
3195 (GEN_MTSPR): New macro.
3196 (GEN_MFCR): New macro.
3197 (GEN_MTCR): New macro.
3198 (GEN_SYNC): New macro.
3199 (GEN_LWSYNC): New macro.
3200 (gen_x_form): New function.
3201 (GEN_OR): New macro.
3202 (GEN_MR): New macro.
3203 (GEN_LWARX): New macro.
3204 (GEN_STWCX): New macro.
3205 (GEN_CMPW): New macro.
3206 (gen_md_form): New function.
3207 (GEN_RLDICL): New macro.
3208 (GEN_RLDICR): New macro.
3209 (gen_i_form): New function.
3210 (GEN_B): New macro.
3211 (GEN_BL): New macro.
3212 (gen_b_form): New function.
3213 (GEN_BNE): New macro.
3214 (GEN_LOAD): New macro.
3215 (GEN_STORE): New macro.
3216 (gen_limm): New function.
3217 (gen_atomic_xchg): New function.
3218 (gen_call): New function.
3219 (ppc_relocate_instruction): New function.
3220 (ppc_install_fast_tracepoint_jump_pad): New function.
3221 (ppc_get_min_fast_tracepoint_insn_len): New function.
3222 (ppc_get_ipa_tdesc_idx): New function.
3223 (the_low_target): Wire in the new functions.
3224 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3225 tdescs.
3226 * linux-ppc-tdesc.h: New file.
3227
a13c4696
MK
32282016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3229
3230 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3231 (alloc_jump_pad_buffer): New function.
3232 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3233 (alloc_jump_pad_buffer): New function.
3234 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3235 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3236 (alloc_jump_pad_buffer): New function.
3237 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3238 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3239 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3240 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3241
1cda1512
MK
32422016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3243
3244 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3245 * linux-amd64-ipa.c: Likewise.
3246 * linux-i386-ipa.c: Likewise.
3247 * linux-s390-ipa.c: Likewise.
3248 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3249 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3250 set_trace_state_variable_value_ptr.
3251 (struct ipa_sym_addresses): Likewise.
3252 (symbol_list): Likewise.
3253 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3254 accessing gdb_collect directly.
3255 (gdb_collect_ptr_type): New typedef.
3256 (get_raw_reg_ptr_type): New typedef.
3257 (get_trace_state_variable_value_ptr_type): New typedef.
3258 (set_trace_state_variable_value_ptr_type): New typedef.
3259 (gdb_collect_ptr): New global.
3260 (get_raw_reg_ptr): New global.
3261 (get_trace_state_variable_value_ptr): New global.
3262 (set_trace_state_variable_value_ptr): New global.
3263 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3264 accessing get_raw_reg directly.
3265 (get_get_tsv_func_addr): Likewise for
3266 get_trace_state_variable_value_ptr.
3267 (get_set_tsv_func_addr): Likewise for
3268 set_trace_state_variable_value_ptr.
3269 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3270
72fb5488
SM
32712016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3272
3273 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3274
28170b88
MK
32752016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3276
3277 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3278 packets.
3279 (relocate_instruction): Remove own_buf.
3280 * server.c (own_buf): Make global.
3281 (handle_v_requests): Make global.
3282 * server.h (own_buf): New declaration.
3283 (handle_v_requests): New prototype.
3284
f39e8743
MK
32852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3286
3287 PR 18377
3288 * linux-s390-low.c (add_insns): New function.
3289 (s390_emit_prologue): New function.
3290 (s390_emit_epilogue): New function.
3291 (s390_emit_add): New function.
3292 (s390_emit_sub): New function.
3293 (s390_emit_mul): New function.
3294 (s390_emit_lsh): New function.
3295 (s390_emit_rsh_signed): New function.
3296 (s390_emit_rsh_unsigned): New function.
3297 (s390_emit_ext): New function.
3298 (s390_emit_log_not): New function.
3299 (s390_emit_bit_and): New function.
3300 (s390_emit_bit_or): New function.
3301 (s390_emit_bit_xor): New function.
3302 (s390_emit_bit_not): New function.
3303 (s390_emit_equal): New function.
3304 (s390_emit_less_signed): New function.
3305 (s390_emit_less_unsigned): New function.
3306 (s390_emit_ref): New function.
3307 (s390_emit_if_goto): New function.
3308 (s390_emit_goto): New function.
3309 (s390_write_goto_address): New function.
3310 (s390_emit_litpool): New function.
3311 (s390_emit_const): New function.
3312 (s390_emit_call): New function.
3313 (s390_emit_reg): New function.
3314 (s390_emit_pop): New function.
3315 (s390_emit_stack_flush): New function.
3316 (s390_emit_zero_ext): New function.
3317 (s390_emit_swap): New function.
3318 (s390_emit_stack_adjust): New function.
3319 (s390_emit_set_r2): New function.
3320 (s390_emit_int_call_1): New function.
3321 (s390_emit_void_call_2): New function.
3322 (s390_emit_eq_goto): New function.
3323 (s390_emit_ne_goto): New function.
3324 (s390_emit_lt_goto): New function.
3325 (s390_emit_le_goto): New function.
3326 (s390_emit_gt_goto): New function.
3327 (s390_emit_ge_goto): New function.
3328 (s390x_emit_prologue): New function.
3329 (s390x_emit_epilogue): New function.
3330 (s390x_emit_add): New function.
3331 (s390x_emit_sub): New function.
3332 (s390x_emit_mul): New function.
3333 (s390x_emit_lsh): New function.
3334 (s390x_emit_rsh_signed): New function.
3335 (s390x_emit_rsh_unsigned): New function.
3336 (s390x_emit_ext): New function.
3337 (s390x_emit_log_not): New function.
3338 (s390x_emit_bit_and): New function.
3339 (s390x_emit_bit_or): New function.
3340 (s390x_emit_bit_xor): New function.
3341 (s390x_emit_bit_not): New function.
3342 (s390x_emit_equal): New function.
3343 (s390x_emit_less_signed): New function.
3344 (s390x_emit_less_unsigned): New function.
3345 (s390x_emit_ref): New function.
3346 (s390x_emit_if_goto): New function.
3347 (s390x_emit_const): New function.
3348 (s390x_emit_call): New function.
3349 (s390x_emit_reg): New function.
3350 (s390x_emit_pop): New function.
3351 (s390x_emit_stack_flush): New function.
3352 (s390x_emit_zero_ext): New function.
3353 (s390x_emit_swap): New function.
3354 (s390x_emit_stack_adjust): New function.
3355 (s390x_emit_int_call_1): New function.
3356 (s390x_emit_void_call_2): New function.
3357 (s390x_emit_eq_goto): New function.
3358 (s390x_emit_ne_goto): New function.
3359 (s390x_emit_lt_goto): New function.
3360 (s390x_emit_le_goto): New function.
3361 (s390x_emit_gt_goto): New function.
3362 (s390x_emit_ge_goto): New function.
3363 (s390_emit_ops): New function.
3364 (struct linux_target_ops): Fill in emit_ops hook.
3365
abd9baf9
MK
33662016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3367
3368 PR 18377
3369 * Makefile.in: Add s390 IPA files.
3370 * configure.srv: Build IPA for s390.
3371 * linux-s390-ipa.c: New file.
3372 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3373 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3374 (tdesc_s390_linux32): Likewise.
3375 (init_registers_s390_linux32v1): Likewise.
3376 (tdesc_s390_linux32v1): Likewise.
3377 (init_registers_s390_linux32v2): Likewise.
3378 (tdesc_s390_linux32v2): Likewise.
3379 (init_registers_s390_linux64): Likewise.
3380 (tdesc_s390_linux64): Likewise.
3381 (init_registers_s390_linux64v1): Likewise.
3382 (tdesc_s390_linux64v1): Likewise.
3383 (init_registers_s390_linux64v2): Likewise.
3384 (tdesc_s390_linux64v2): Likewise.
3385 (init_registers_s390_te_linux64): Likewise.
3386 (tdesc_s390_te_linux64): Likewise.
3387 (init_registers_s390_vx_linux64): Likewise.
3388 (tdesc_s390_vx_linux64): Likewise.
3389 (init_registers_s390_tevx_linux64): Likewise.
3390 (tdesc_s390_tevx_linux64): Likewise.
3391 (init_registers_s390x_linux64): Likewise.
3392 (tdesc_s390x_linux64): Likewise.
3393 (init_registers_s390x_linux64v1): Likewise.
3394 (tdesc_s390x_linux64v1): Likewise.
3395 (init_registers_s390x_linux64v2): Likewise.
3396 (tdesc_s390x_linux64v2): Likewise.
3397 (init_registers_s390x_te_linux64): Likewise.
3398 (tdesc_s390x_te_linux64): Likewise.
3399 (init_registers_s390x_vx_linux64): Likewise.
3400 (tdesc_s390x_vx_linux64): Likewise.
3401 (init_registers_s390x_tevx_linux64): Likewise.
3402 (tdesc_s390x_tevx_linux64): Likewise.
3403 (have_hwcap_s390_vx): New static variable.
3404 (s390_arch_setup): Fill have_hwcap_s390_vx.
3405 (s390_get_thread_area): New function.
3406 (s390_ft_entry_gpr_esa): New const.
3407 (s390_ft_entry_gpr_zarch): New const.
3408 (s390_ft_entry_misc): New const.
3409 (s390_ft_entry_fr): New const.
3410 (s390_ft_entry_vr): New const.
3411 (s390_ft_main_31): New const.
3412 (s390_ft_main_64): New const.
3413 (s390_ft_exit_fr): New const.
3414 (s390_ft_exit_vr): New const.
3415 (s390_ft_exit_misc): New const.
3416 (s390_ft_exit_gpr_esa): New const.
3417 (s390_ft_exit_gpr_zarch): New const.
3418 (append_insns): New function.
3419 (s390_relocate_instruction): New function.
3420 (s390_install_fast_tracepoint_jump_pad): New function.
3421 (s390_get_min_fast_tracepoint_insn_len): New function.
3422 (s390_get_ipa_tdesc_idx): New function.
3423 (struct linux_target_ops): Wire in the above functions.
3424 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3425 * linux-s390-tdesc.h: New file.
3426
a4105d04
MK
34272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3428
3429 * linux-s390-low.c (s390_supports_tracepoints): New function.
3430 (struct linux_target_ops): Fill supports_tracepoints hook.
3431
35ac8b3e
YQ
34322016-03-18 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-low.c (lwp_signal_can_be_delivered): New function.
3435 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3436
94610ec4
YQ
34372016-03-18 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3440 0 if signal is enqueued. Remove 'signal' from one debugging
3441 message. Move one debugging message to some lines below.
3442 Remove code setting 'signal' to 0.
3443
80aea927
YQ
34442016-03-18 Yao Qi <yao.qi@linaro.org>
3445
3446 * linux-low.c (linux_low_filter_event): Remove redundant
3447 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3448
b04fd3be
MK
34492016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3450
3451 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3452 (struct linux_target_ops): Wire in the above.
3453
c40c8d4b
YQ
34542016-03-03 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-low.c: Update comments to start_step_over.
3457
0f8288ae
YQ
34582016-03-03 Yao Qi <yao.qi@linaro.org>
3459
3460 PR server/19736
3461 * linux-low.c (handle_extended_wait): Set child suspended
3462 if event_lwp->bp_reinsert isn't zero.
3463
fdbd04a8
YQ
34642016-03-02 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3467 enqueue_pending_signal.
3468
6896a8fa
MK
34692016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3470
3471 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3472 is actually loaded.
3473
ab503087
MK
34742016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3475
3476 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3477 (s390_regmap_3264) [!__s390x__]: New global.
3478 (s390_collect_ptrace_register): Skip map entries containing -1.
3479 (s390_supply_ptrace_register): Ditto.
3480 (s390_fill_gprs_high): New function.
3481 (s390_store_gprs_high): New function.
3482 (s390_regsets): Add NT_S390_HIGH_GPRS.
3483 (s390_get_hwcap): Enable on 31-bit.
3484 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3485 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3486 Detect NT_S390_HIGH_GPRS.
3487 (s390_usrregs_info_3264): Enable on 31-bit.
3488 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3489 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3490
ae91f625
MK
34912016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3492
3493 PR gdb/13808
3494 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3495 * configure.srv: Ditto.
3496 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3497 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3498 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3499 (init_registers_amd64_linux): Remove prototype.
3500 (tdesc_amd64_linux): Remove declaration.
3501 (get_ipa_tdesc): New function.
3502 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3503 initialize remaining tdescs.
3504 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3505 (init_registers_i386_linux): Remove prototype.
3506 (tdesc_i386_linux): Remove declaration.
3507 (get_ipa_tdesc): New function.
3508 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3509 initialize remaining tdescs.
3510 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3511 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3512 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3513 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3514 (x86_get_ipa_tdesc_idx): New function.
3515 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3516 * linux-x86-tdesc.h: New file.
3517 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3518 (target_get_ipa_tdesc_idx): New macro.
3519 * tracepoint.c (ipa_tdesc_idx): New macro.
3520 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3521 (symbol_list): Add ipa_tdesc_idx.
3522 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3523 (ipa_tdesc): Remove.
3524 (ipa_tdesc_idx): New variable.
3525 (get_context_regcache): Use get_ipa_tdesc.
3526 (gdb_collect): Ditto.
3527 (gdb_probe): Ditto.
3528 * tracepoint.h (get_ipa_tdesc): New prototype.
3529 (ipa_tdesc): Remove.
3530
e7ad2f14
PA
35312016-02-24 Pedro Alves <palves@redhat.com>
3532
3533 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3534 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3535 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3536 Factor out common code between the USE_SIGTRAP_SIGINFO and
3537 !USE_SIGTRAP_SIGINFO blocks.
3538 (linux_low_filter_event): Call save_stop_reason instead of
3539 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3540 Update comments.
3541 (linux_wait_1): Update comments.
3542
657f9cde
WW
35432016-02-24 Wei-cheng Wang <cole945@gmail.com>
3544
3545 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3546 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3547 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3548 ppc_insert_point, ppc_remove_point.
3549
b00b61e1
MK
35502016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3551
3552 * linux-s390-low.c (s390_supports_z_point_type): New function.
3553 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3554
553cb527
YQ
35552016-02-16 Yao Qi <yao.qi@linaro.org>
3556
3557 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3558 PC. Get pc from regcache_read_pc.
3559
a5652c21
YQ
35602016-02-12 Yao Qi <yao.qi@linaro.org>
3561
3562 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3563 or linux_get_pc_32bit.
3564 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3565
ed443b61
YQ
35662016-02-12 Yao Qi <yao.qi@linaro.org>
3567
3568 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3569 arm_linux_get_next_pcs_fixup.
3570
020ecd38
MK
35712016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3572
3573 * tracepoint.c (x_tracepoint_action_download): Change
3574 write_inferior_data_ptr to write_inferior_data_pointer.
3575 (cmd_qtstart): Likewise.
3576 (write_inferior_data_ptr): Remove.
3577 (download_agent_expr): Change write_inferior_data_ptr to
3578 write_inferior_data_pointer.
3579 (download_tracepoint_1): Likewise.
3580 (download_tracepoint): Likewise.
3581 (download_trace_state_variables): Likewise.
3582
7cae9051
WW
35832016-02-11 Wei-cheng Wang <cole945@gmail.com>
3584 Marcin Kościelnicki <koriakin@0x04.net>
3585
3586 * tracepoint.c (struct tracepoint_action_ops): Remove.
3587 (struct tracepoint_action): Remove ops.
3588 (m_tracepoint_action_download, r_tracepoint_action_download)
3589 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3590 size and offset accordingly.
3591 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3592 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3593 (tracepoint_action_send, tracepoint_action_download): New functions.
3594 Helpers for trace action handlers.
3595 (add_tracepoint_action): Remove setup actions ops.
3596 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3597
9f6a71b4
YQ
35982016-02-10 Yao Qi <yao.qi@linaro.org>
3599
3600 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3601
1e94266c
SM
36022016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3603
3604 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3605 to AC_OUTPUT.
3606 * configure: Regenerate.
3607
8adce034
SM
36082016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3609
3610 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3611 void * to gdb_byte *.
3612 * linux-low.c (siginfo_fixup): Likewise.
3613 (linux_xfer_siginfo): Likewise.
3614 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3615 Likewise.
3616 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3617
93813b37
WT
36182016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3619
3620 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3621 to srv_tgtobj.
3622 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3623 to srv_tgtobj.
3624 * linux-x86-low.c [__x86_64__]: Include
3625 "nat/amd64-linux-siginfo.h".
3626 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3627 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3628 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3629 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3630 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3631 (cpt_si_fd, si_timerid, si_overrun): Move from
3632 nat/amd64-linux-siginfo.c.
3633 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3634
8424cc97
SM
36352016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3636
3637 * server.c (skip_to_semicolon): Remove.
3638 (process_point_options): Use strchrnul instead of
3639 skip_to_semicolon.
3640
4d18591b
YQ
36412016-01-26 Yao Qi <yao.qi@linaro.org>
3642
3643 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3644 * linux-low.c (install_software_single_step_breakpoints): Don't
3645 call regcache_read_pc.
3646 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3647 argument pc.
3648
d8020970
YQ
36492016-01-26 Yao Qi <yao.qi@linaro.org>
3650
3651 * linux-low.c (install_software_single_step_breakpoints): Call
3652 regcache_read_pc instead of get_pc.
3653
8b207339
YQ
36542016-01-26 Yao Qi <yao.qi@linaro.org>
3655
3656 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3657 (unblock_async_io): Rename to ...
3658 (block_unblock_async_io): ... it. New function.
3659 (enable_async_io): Don't install SIGIO handler. Unblock it
3660 instead.
3661 (disable_async_io): Don't ignore SIGIO. Block it instead.
3662 (initialize_async_io): Install SIGIO handler. Don't call
3663 unblock_async_io.
3664
18879fef
YQ
36652016-01-26 Yao Qi <yao.qi@linaro.org>
3666
3667 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3668 first character is '\003', call *the_target->request_interrupt.
3669
a0f8e08a
YQ
36702016-01-25 Yao Qi <yao.qi@linaro.org>
3671
3672 * remote-utils.c (new_thread_notify): Remove.
3673 (dead_thread_notify): Likewise.
3674 * remote-utils.h (new_thread_notify): Remove declaration.
3675 (dead_thread_notify): Likewise.
3676
cc5fd9ab
MK
36772016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3678
3679 * gdb.trace/pending.exp: Fix expected message on continue.
3680
99e8eb11
MK
36812016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3682
3683 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3684 it works properly on big-endian machines where sizeof (CORE_ADDR)
3685 != sizeof (void *).
3686
a994041d
PA
36872016-01-21 Pedro Alves <palves@redhat.com>
3688
3689 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3690 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3691 * configure: Regenerate.
3692
f7a6a40d
YQ
36932016-01-21 Yao Qi <yao.qi@linaro.org>
3694
3695 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3696 is_thumb and set it according to CPSR saved on the stack.
3697 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3698 arm_sigreturn_next_pc.
3699
6f69e520
YQ
37002016-01-18 Yao Qi <yao.qi@linaro.org>
3701
3702 * linux-low.c (linux_set_pc_64bit): New function.
3703 (linux_get_pc_64bit): New function.
3704 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3705 Declare.
3706 * linux-sparc-low.c (debug_threads): Remove declaration.
3707 (sparc_get_pc): Remove.
3708 (the_low_target): Use linux_get_pc_64bit instead of
3709 sparc_get_pc.
3710 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3711 (the_low_target): Use linux_get_pc_64bit and
3712 linux_set_pc_64bit.
3713
276d4552
YQ
37142016-01-18 Yao Qi <yao.qi@linaro.org>
3715
3716 * linux-arm-low.c (debug_threads): Remove declaration.
3717 (arm_get_pc, arm_set_pc): Remove.
3718 (the_low_target): Use linux_get_pc_32bit and
3719 linux_set_pc_32bit.
3720 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3721 (the_low_target): Use linux_get_pc_32bit and
3722 linux_set_pc_32bit.
3723 * linux-cris-low.c (debug_threads): Remove declaration.
3724 (cris_get_pc, cris_set_pc,): Remove.
3725 (the_low_target): Use linux_get_pc_32bit and
3726 linux_set_pc_32bit.
3727 * linux-crisv32-low.c (debug_threads): Remove declaration.
3728 (cris_get_pc, cris_set_pc): Remove.
3729 (the_low_target): Use linux_get_pc_32bit and
3730 linux_set_pc_32bit.
3731 * linux-low.c: Include inttypes.h.
3732 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3733 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3734 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3735 (the_low_target): Use linux_get_pc_32bit and
3736 linux_set_pc_32bit.
3737 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3738 (the_low_target): Use linux_get_pc_32bit and
3739 linux_set_pc_32bit.
3740 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3741 (the_low_target): Use linux_get_pc_32bit and
3742 linux_set_pc_32bit.
3743 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3744 (the_low_target): Use linux_get_pc_32bit and
3745 linux_set_pc_32bit.
3746 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3747 (the_low_target): Use linux_get_pc_32bit and
3748 linux_set_pc_32bit.
3749
eb0edac8
GB
37502016-01-18 Gary Benson <gbenson@redhat.com>
3751
3752 * configure.ac (AC_FUNC_FORK): New check.
3753 * config.in: Regenerate.
3754 * configure: Likewise.
3755
1b451dda
YQ
37562016-01-14 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3759 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3760 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3761 arm_get_next_pcs_ctor.
3762
82075af2
JS
37632016-01-12 Josh Stone <jistone@redhat.com>
3764 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3765
3766 * inferiors.h: Include "gdb_vecs.h".
3767 (struct process_info): Add syscalls_to_catch.
3768 * inferiors.c (remove_process): Free syscalls_to_catch.
3769 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3770 syscall_return stops.
3771 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3772 * server.c (handle_general_set): Handle QCatchSyscalls.
3773 (handle_query): Report support for QCatchSyscalls.
3774 * target.h (struct target_ops): Add supports_catch_syscall.
3775 (target_supports_catch_syscall): New macro.
3776 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3777 (struct lwp_info): Add syscall_state.
3778 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3779 Maintain syscall_state and syscalls_to_catch across exec.
3780 (get_syscall_trapinfo): New function, proxy to the_low_target.
3781 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3782 (linux_low_filter_event): Toggle syscall_state entry/return for
3783 syscall traps, and set it ignored for all others.
3784 (gdb_catching_syscalls_p): New function.
3785 (gdb_catch_this_syscall_p): New function.
3786 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3787 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3788 (linux_supports_catch_syscall): New function.
3789 (linux_target_ops): Install it.
3790 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3791 (the_low_target): Install it.
3792
8f13a3ce
MF
37932016-01-12 Mike Frysinger <vapier@gentoo.org>
3794
3795 * acinclude.m4: Include new ../warning.m4 file.
3796 * configure: Regenerated.
3797 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3798
5b3da067
MF
37992016-01-12 Mike Frysinger <vapier@gentoo.org>
3800
3801 * ax.c (is_goto_target): Mark static.
3802 * linux-low.c (register_addr): Likewise.
3803 (linux_fetch_registers, linux_store_registers): Likewise.
3804 * mem-break.c (any_persistent_commands): Fix old prototype.
3805 (add_commands_to_breakpoint): Mark static.
3806 * regcache.c (find_register_by_name): Delete unused func.
3807 * remote-utils.c (hex_or_minus_one): Mark static.
3808 * server.c (monitor_show_help): Mark static.
3809 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3810 handle_v_requests): Likewise.
3811
bc504a31
PA
38122016-01-12 Pedro Alves <palves@redhat.com>
3813
3814 Remove use of the registered trademark symbol throughout.
3815
5a0dd67a
YQ
38162016-01-08 Yao Qi <yao.qi@linaro.org>
3817
3818 * remote-utils.c (getpkt): If c is '\003', call target hook
3819 request_interrupt.
3820
b2ca446f
YQ
38212016-01-06 Yao Qi <yao.qi@linaro.org>
3822
3823 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3824 linux-aarch32-low.c.
3825 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3826 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3827 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3828 (thumb2_breakpoint): Declare.
3829 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3830 linux-aarch32-low.h.
3831 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3832 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3833 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3834
edd88788
JB
38352016-01-01 Joel Brobecker <brobecker@adacore.com>
3836
3837 * gdbreplay.c (gdbreplay_version): Change copyright year in
3838 version message.
3839 * server.c (gdbserver_version): Likewise.
3840
65da7f14
PP
38412015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3842
3843 * server.c (crc32_table): Delete.
3844 (crc32): Use libiberty's xcrc32 function.
3845
4abd5ed2
JB
38462015-12-22 Joel Brobecker <brobecker@adacore.com>
3847
3848 * lynx-low.c (lynx_delete_thread_callback): New function.
3849 (lynx_mourn): Properly delete our process and all of its
3850 threads. Remove call to clear_inferiors.
3851
0e50fe5c
JB
38522015-12-22 Joel Brobecker <brobecker@adacore.com>
3853
3854 * target.c (thread_search_callback): Add check that
3855 the thread_stopped target callback is not NULL before
3856 calling it.
3857
35adc03f
YQ
38582015-12-21 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3861 arm breakpoint.
3862
bd2b2909
AT
38632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3864
3865 * server.c (handle_query): Call target_supports_software_single_step.
3866
7fe5e27e
AT
38672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3868
3869 * linux-low.c (single_step): New function.
3870 (linux_resume_one_lwp_throw): Call single_step.
3871 (start_step_over): Likewise.
3872
d9311bfa
AT
38732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3874
3875 * Makefile.in (SFILES): Append arch/arm-linux.c,
3876 arch/arm-get-next-pcs.c.
3877 (arm-linux.o): New rule.
3878 (arm-get-next-pcs.o): New rule.
3879 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3880 arm-linux.o.
3881 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3882 to linux-aarch32-low.c.
3883 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3884 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3885 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3886 (thumb2_breakpoint_len): Likewise.
3887 (arm_is_thumb_mode): Make non-static.
3888 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3889 from linux-aarch32-low.c.
3890 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3891 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3892 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3893 (thumb2_breakpoint_len): Likewise.
3894 (arm_is_thumb_mode): New declaration.
3895 * linux-arm-low.c: Include arch/arm-linux.h
3896 aarch/arm-get-next-pcs.h, sys/syscall.h.
3897 (get_next_pcs_ops): New struct.
3898 (get_next_pcs_addr_bits_remove): New function.
3899 (get_next_pcs_is_thumb): New function.
3900 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3901 (arm_sigreturn_next_pc): Likewise.
3902 (get_next_pcs_syscall_next_pc): Likewise.
3903 (arm_gdbserver_get_next_pcs): Likewise.
3904 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3905 Initialize.
3906 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3907 * server.h: Include gdb_vecs.h.
3908
68ce2059
AT
39092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3910
3911 * Makefile.in (SFILES): Append common/common-regcache.c.
3912 (OBS): Append common-regcache.o.
3913 (common-regcache.o): New rule.
3914 * regcache.c (init_register_cache): Initialize cache to
3915 REG_UNAVAILABLE.
3916 (regcache_raw_read_unsigned): New function.
3917 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3918 register_status enum.
3919
fa5308bd
AT
39202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3921
3922 * linux-aarch64-low.c (the_low_targets): Rename
3923 breakpoint_reinsert_addr to get_next_pcs.
3924 * linux-arm-low.c (the_low_targets): Likewise.
3925 * linux-bfin-low.c (the_low_targets): Likewise.
3926 * linux-cris-low.c (the_low_targets): Likewise.
3927 * linux-crisv32-low.c (the_low_targets): Likewise.
3928 * linux-low.c (can_software_single_step): Likewise.
3929 (install_software_single_step_breakpoints): New function.
3930 (start_step_over): Use install_software_single_step_breakpoints.
3931 * linux-low.h: New CORE_ADDR vector.
3932 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3933 get_next_pcs.
3934 * linux-mips-low.c (the_low_targets): Likewise.
3935 * linux-nios2-low.c (the_low_targets): Likewise.
3936 * linux-sparc-low.c (the_low_targets): Likewise.
3937
4a6ed09b
PA
39382015-12-17 Pedro Alves <palves@redhat.com>
3939
3940 * linux-low.c (linux_kill_one_lwp): Remove references to
3941 LinuxThreads.
3942 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3943 to 'kill'.
3944 (linux_init_signals): Delete.
3945 (initialize_low): Adjust.
3946 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3947
7544db95
PA
39482015-12-16 Pedro Alves <palves@redhat.com>
3949
3950 * configure.ac (compiler warning flags): When testing a
3951 -Wno-foo option, check whether -Wfoo works instead.
3952 * configure: Regenerate.
3953
8020350c
DB
39542015-12-11 Don Breazeal <donb@codesourcery.com>
3955
3956 * server.c (process_serial_event): Don't exit from gdbserver
3957 in remote mode if there are still active inferiors.
3958
db91f502
YQ
39592015-12-11 Yao Qi <yao.qi@linaro.org>
3960
3961 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3962 arm_breakpoint_at if the process is 32-bit.
3963
b37a6290
YQ
39642015-12-11 Yao Qi <yao.qi@linaro.org>
3965
3966 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3967 arm breakpoint.
3968
17b1509a
YQ
39692015-12-07 Yao Qi <yao.qi@linaro.org>
3970
3971 * configure.srv: Append arm.o to srv_tgtobj for
3972 aarch64*-*-linux* target.
3973 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3974 from linux-arm-low.c.
3975 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3976 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3977 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3978 (thumb2_breakpoint_len): Likewise.
3979 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3980 (arm_breakpoint_kinds): Likewise.
3981 (arm_breakpoint_kind_from_pc): Likewise.
3982 (arm_sw_breakpoint_from_kind): Likewise.
3983 (arm_breakpoint_kind_from_current_state): Likewise.
3984 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3985 (arm_sw_breakpoint_from_kind): Declare.
3986 (arm_breakpoint_kind_from_current_state): Declare.
3987 (arm_breakpoint_at): Declare.
3988 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3989 arm_sw_breakpoint_from_kind if process is 32-bit.
3990 (aarch64_breakpoint_kind_from_pc): New function.
3991 (aarch64_breakpoint_kind_from_current_state): New function.
3992 (the_low_target): Initialize fields breakpoint_kind_from_pc
3993 and breakpoint_kind_from_current_state.
3994 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3995 linux-aarch32-low.c.
3996 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3997 (arm_breakpoint, arm_breakpoint_len): Likewise.
3998 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3999 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4000 (arm_is_thumb_mode): Likewise.
4001 (arm_breakpoint_at): Likewise.
4002 (arm_breakpoint_kind_from_pc): Likewise.
4003 (arm_sw_breakpoint_from_kind): Likewise.
4004 (arm_breakpoint_kind_from_current_state): Likewise.
4005
4006 Revert:
4007 2015-08-04 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4010 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4011 * server.c (extended_protocol): Remove "static".
4012 * server.h (extended_protocol): Declare it.
4013
ece66d65
JS
40142015-12-04 Josh Stone <jistone@redhat.com>
4015
4016 * target.h (struct target_ops) <arch_setup>: Rename to ...
4017 (struct target_ops) <post_create_inferior>: ... this.
4018 (target_arch_setup): Rename to ...
4019 (target_post_create_inferior): ... this, calling post_create_inferior.
4020 * server.c (start_inferior): Update target_arch_setup calls to
4021 target_post_create_inferior.
4022 * linux-low.c (linux_low_ptrace_options): Forward declare.
4023 (linux_arch_setup): Update its comment for general use.
4024 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4025 (struct linux_target_ops): Use linux_post_create_inferior.
4026 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4027 to post_create_inferior.
4028 * nto-low.c (struct nto_target_ops): Likewise.
4029 * spu-low.c (struct spu_target_ops): Likewise.
4030 * win32-low.c (struct win32_target_ops): Likewise.
4031
e58c48b4
AT
40322015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4033
4034 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4035
fbec8956
AT
40362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4037
4038 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4039 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4040 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4041 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4042 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4043 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4044 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4045 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4046 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4047 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4048 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4049 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4050
9b4c5f87
AT
40512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4052
4053 * linux-low.c (linux_look_up_symbols): Don't call
4054 linux_supports_traceclone.
4055 * linux-low.h (thread_db_init): Remove use_events argument.
4056 * thread-db.c (thread_db_use_event): Remove global variable.
4057 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4058 (struct thread_db) <td_create_bp>: Remove field.
4059 (thread_db_create_event): Remove function.
4060 (thread_db_enable_reporting): Likewise.
4061 (find_one_thread): Don't check for thread_db_use_events.
4062 (attach_thread): Likewise.
4063 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4064 (try_thread_db_load_1): Don't check for thread_db_use_events.
4065 (thread_db_init): Remove use_events argument and thread events
4066 handling.
4067 (remove_thread_event_breakpoints): Remove function.
4068 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4069
7d00775e
AT
40702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4071
4072 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4073 New function.
4074 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4075 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4077 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4078 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4079 Initialize.
4080 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4081 New function.
4082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4083 * linux-low.c (can_hardware_single_step): Use
4084 supports_hardware_single_step.
4085 (can_software_single_step): New function.
4086 (start_step_over): Call can_software_single_step.
4087 (linux_supports_hardware_single_step): New function.
4088 (struct target_ops) <supports_software_single_step>: Initialize.
4089 * linux-low.h (struct linux_target_ops)
4090 <supports_hardware_single_step>: Initialize.
4091 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4092 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4093 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4094 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4095 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4096 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4097 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4099 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4100 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4101 Initialize.
4102 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4103 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4104 Initialize.
4105 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4106 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4107 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4108 New function.
4109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4110 * target.h (struct target_ops): <supports_software_single_step>:
4111 New field.
4112 (target_supports_software_single_step): New macro.
4113
2d97cd35
AT
41142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4115
4116 * linux-low.c (linux_wait_1): Fix pc advance condition.
4117 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4118 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4119
769ef81f
AT
41202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4121
4122 * linux-arm-low.c (arm_is_thumb_mode): New function.
4123 (arm_breakpoint_at): Use arm_is_thumb_mode.
4124 (arm_breakpoint_kind_from_current_state): New function.
4125 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4126 Initialize.
4127 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4128 (linux_breakpoint_kind_from_current_state): New function.
4129 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4130 * linux-low.h (struct linux_target_ops)
4131 <breakpoint_kind_from_current_state>: New field.
4132 * target.h (struct target_ops): Likewise.
4133 (target_breakpoint_kind_from_current_state): New macro.
4134
1bebeeca
PA
41352015-11-30 Pedro Alves <palves@redhat.com>
4136
4137 * linux-low.c (linux_resume): Wake up the event loop before
4138 returning.
4139
a67a9fae
PA
41402015-11-30 Pedro Alves <palves@redhat.com>
4141
4142 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4143 check.
4144 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4145 to -1.
4146 * target.c (struct thread_search): New structure.
4147 (thread_search_callback): New function.
4148 (prev_general_thread): New global.
4149 (prepare_to_access_memory, done_accessing_memory): New functions.
4150 * target.h (prepare_to_access_memory, done_accessing_memory):
4151 Replace macros with function declarations.
4152
f2faf941
PA
41532015-11-30 Pedro Alves <palves@redhat.com>
4154
4155 PR 14618
4156 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4157 report TARGET_WAITKIND_NO_RESUMED.
4158 * remote-utils.c (prepare_resume_reply): Handle
4159 TARGET_WAITKIND_NO_RESUMED.
4160 * server.c (report_no_resumed): New global.
4161 (handle_query) <qSupported>: Handle "no-resumed+". Report
4162 "no-resumed+" support.
4163 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4164 return error if the client doesn't support no-resumed events.
4165 (push_stop_notification): New function.
4166 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4167 events if the client supports them.
4168
a681f9c9
PA
41692015-11-30 Pedro Alves <palves@redhat.com>
4170
4171 * linux-low.c (thread_still_has_status_pending_p): Don't check
4172 vCont;t here.
4173 (lwp_resumed): New function.
4174 (status_pending_p_callback): Return early if the LWP is not
4175 supposed to be resumed.
4176
65706a29
PA
41772015-11-30 Pedro Alves <palves@redhat.com>
4178
4179 * linux-low.c (handle_extended_wait): Assert that the LWP's
4180 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4181 thread create events, leave the new child's status pending.
4182 (linux_low_filter_event): If GDB wants to hear about thread exit
4183 events, leave the LWP marked dead and don't delete it.
4184 (linux_wait_for_event_filtered): Don't check for thread exit.
4185 (filter_exit_event): New function.
4186 (linux_wait_1): Use it, when returning an exit event.
4187 (linux_resume_one_lwp_throw): Assert that the LWP's
4188 waitstatus is TARGET_WAITKIND_IGNORE.
4189 * remote-utils.c (prepare_resume_reply): Handle
4190 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4191 * server.c (report_thread_events): New global.
4192 (handle_general_set): Handle QThreadEvents.
4193 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4194 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4195 TARGET_WAITKIND_THREAD_EXITED.
4196 * server.h (report_thread_events): Declare.
4197
56cf4bed
PA
41982015-11-30 Pedro Alves <palves@redhat.com>
4199
4200 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4201 the thread's last_resume_kind was resume_stop.
4202
500c1d85
PA
42032015-11-30 Pedro Alves <palves@redhat.com>
4204
4205 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4206 before returning.
4207
de979965
PA
42082015-11-30 Pedro Alves <palves@redhat.com>
4209
4210 * server.c (handle_v_requests): Handle vCtrlC.
4211
34c65914
PA
42122015-11-30 Pedro Alves <palves@redhat.com>
4213
4214 * gdbthread.h (find_any_thread_of_pid): Declare.
4215 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4216 functions.
4217 * server.c (handle_query): If current_thread is NULL, look for
4218 another thread of the selected process.
4219
79efa585 42202015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4221 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4222
4223 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4224 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4225 name in reply.
4226 * target.h (struct target_ops) <thread_name>: New field.
4227 (target_thread_name): New macro.
4228
80d82c19
JB
42292015-11-23 Joel Brobecker <brobecker@adacore.com>
4230
4231 * regcache.h (regcache_invalidate_pid): Add declaration.
4232 * regcache.c (regcache_invalidate_pid): New function, extracted
4233 from regcache_invalidate.
4234 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4235 Add trivial documentation comment.
4236 * lynx-low.c: Use regcache_invalidate_pid instead of
4237 regcache_invalidate.
4238
64da5dd5
JB
42392015-11-23 Joel Brobecker <brobecker@adacore.com>
4240
4241 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4242 and Elf64_auxv_t if the target is Android.
4243
37ce4055
DE
42442015-11-22 Doug Evans <xdje42@gmail.com>
4245
4246 * target.h: #include <sys/types.h>.
4247
06e03fff
PA
42482015-11-19 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (linux_process_qsupported): Change prototype.
4251 Adjust.
4252 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4253 Change prototype.
4254 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4255 and adjust to loop over all features.
4256 * server.c (handle_query) <qSupported>: Adjust to call
4257 target_process_qsupported once, passing it a vector of unprocessed
4258 features.
4259 * target.h (struct target_ops) <process_qsupported>: Change
4260 prototype.
4261 (target_process_qsupported): Adjust.
4262
9a084706
PA
42632015-11-19 Pedro Alves <palves@redhat.com>
4264
4265 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4266 mode.
4267 * configure: Regenerate.
4268
dad44a1f
PA
42692015-11-19 Pedro Alves <palves@redhat.com>
4270
4271 * configure: Regenerate.
4272
231c0592
YQ
42732015-11-19 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4276 type to uint32_t.
4277
6c1c9a8b
YQ
42782015-11-19 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4281 (struct aarch64_operand): Move enum out.
4282
9caa3311
YQ
42832015-11-19 Yao Qi <yao.qi@linaro.org>
4284
4285 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4286 struct user_fpsimd_state *.
4287 (aarch64_store_fpregset): Likewise.
4288
6a69a054
YQ
42892015-11-19 Yao Qi <yao.qi@linaro.org>
4290
4291 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4292 struct user_pt_regs *.
4293 (aarch64_store_gregset): Likewise.
4294
1798301e
PA
42952015-11-18 Pedro Alves <palves@redhat.com>
4296
4297 * Makefile.in (all_object_files): Add $IPA_OBJS.
4298
ce7715e2
PA
42992015-11-17 Pedro Alves <palves@redhat.com>
4300
4301 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4302 GDB_SIGNAL_0 and gdb_signal_to_string.
4303
c0879059
PA
43042015-11-17 Pedro Alves <palves@redhat.com>
4305
4306 * win32-low.c (handle_output_debug_string): Remove parameter.
4307 (win32_kill): Remove our_status local and adjust call to
4308 handle_output_debug_string.
4309 (get_child_debug_event): Adjust call to
4310 handle_output_debug_string.
4311
1996e237
SM
43122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4313
4314 * linux-mips-low.c (mips_fill_gregset): Add cast.
4315 (mips_store_gregset): Likewise.
4316 (mips_fill_fpregset): Likewise.
4317 (mips_store_fpregset): Likewise.
4318
cbec665b
SM
43192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4320
4321 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4322 priv.
4323
eb3e3c67
SM
43242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4325
4326 * linux-mips-low.c (mips_linux_new_thread): Change type of
4327 watch_type to enum target_hw_bp_type.
4328
171de4b8
SM
43292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4330
4331 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4332 Change return type to arm_hwbp_type.
4333
04248ead
SM
43342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4335
4336 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4337 (arm_store_gregset): Likewise.
4338 * linux-arm-low.c (arm_get_hwcap): Likewise.
4339 (arm_read_description): Likewise.
4340
04b3479c
SM
43412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4342
4343 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4344
2bc84e8a
SM
43452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4346
4347 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4348 (ppc_fill_vsxregset): Likewise.
4349 (ppc_store_vsxregset): Likewise.
4350 (ppc_fill_vrregset): Likewise.
4351 (ppc_store_vrregset): Likewise.
4352 (ppc_fill_evrregset): Likewise.
4353 (ppc_store_evrregset): Likewise.
4354
e6c5bb05
SM
43552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4356
4357 * linux-ppc-low.c (ppc_usrregs_info): Remove
4358 forward-declaration.
4359 (ppc_arch_setup): Move lower in file.
4360
7ea45d72
SM
43612015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4362
4363 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4364 (ps_pdwrite): Likewise.
4365
69291610
HW
43662015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4367
4368 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4369 to after assert checks.
4370
b42945fd
SM
43712015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4372
4373 * proc-service.c (ps_pdread): Add/adjust casts.
4374 (ps_pdwrite): Add/adjust casts.
4375
d6f85c84
SM
43762015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4377
4378 * server.c (handle_search_memory_1): Cast return value of
4379 memmem.
4380
f98cd059
SM
43812015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4382
4383 * server.c (write_qxfer_response): Change type of data to
4384 gdb_byte *.
4385
d2412fa5
PA
43862015-10-29 Pedro Alves <palves@redhat.com>
4387
4388 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4389
c17414a2
PA
43902015-10-29 Pedro Alves <palves@redhat.com>
4391
4392 * tracepoint.c (clear_installed_tracepoints): Add casts.
4393
e053fbc4
PA
43942015-10-29 Pedro Alves <palves@redhat.com>
4395
4396 * server.c (handle_v_cont, process_serial_event): Add enum
4397 gdb_signal casts to signal parsing code.
4398
add67df8
PA
43992015-10-29 Pedro Alves <palves@redhat.com>
4400
4401 * linux-low.h (NULL_REGSET): Define.
4402 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4403 * linux-arm-low.c (arm_regsets): Likewise.
4404 * linux-crisv32-low.c (cris_regsets): Likewise.
4405 * linux-m68k-low.c (m68k_regsets): Likewise.
4406 * linux-mips-low.c (mips_regsets): Likewise.
4407 * linux-nios2-low.c (nios2_regsets): Likewise.
4408 * linux-ppc-low.c (ppc_regsets): Likewise.
4409 * linux-s390-low.c (s390_regsets): Likewise.
4410 * linux-sh-low.c (sh_regsets): Likewise.
4411 * linux-sparc-low.c (sparc_regsets): Likewise.
4412 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4413 * linux-tile-low.c (tile_regsets): Likewise.
4414 * linux-x86-low.c (x86_regsets): Likewise.
4415 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4416
50bc912a
PA
44172015-10-29 Pedro Alves <palves@redhat.com>
4418
4419 * linux-low.h (NULL_REGSET): Define.
4420 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4421 * linux-arm-low.c (arm_regsets): Likewise.
4422 * linux-crisv32-low.c (cris_regsets): Likewise.
4423 * linux-m68k-low.c (m68k_regsets): Likewise.
4424 * linux-mips-low.c (mips_regsets): Likewise.
4425 * linux-nios2-low.c (nios2_regsets): Likewise.
4426 * linux-ppc-low.c (ppc_regsets): Likewise.
4427 * linux-s390-low.c (s390_regsets): Likewise.
4428 * linux-sh-low.c (sh_regsets): Likewise.
4429 * linux-sparc-low.c (sparc_regsets): Likewise.
4430 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4431 * linux-tile-low.c (tile_regsets): Likewise.
4432 * linux-x86-low.c (x86_regsets): Likewise.
4433 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4434
682b2546
DE
44352015-10-26 Doug Evans <dje@google.com>
4436
4437 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4438
963843d4
DE
44392015-10-26 Doug Evans <dje@google.com>
4440
4441 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4442
d41401ac
DE
44432015-10-26 Doug Evans <dje@google.com>
4444
4445 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4446 for debug_printf.
4447 (attach_thread, find_new_threads_callback): Ditto.
4448
3db28855
AT
44492015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4450
4451 * mem-break.h (set_breakpoint_data): Remove.
4452
fb78e89c
AT
44532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4454
4455 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4456 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4457 (initialize_low): Remove set_breakpoint_data call.
4458 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4459 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4460 (initialize_low): Remove set_breakpoint_data call.
4461 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4462 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4463 (initialize_low): Remove set_breakpoint_data call.
4464
2e6ee069
AT
44652015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4466
4467 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4468 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4469 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4470 * target.h (target_breakpoint_kind_from_pc): New macro.
4471
1652a986
AT
44722015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4473
4474 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4475 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4476 the default breakpoint kind.
4477
abeead09
AT
44782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4479
4480 * linux-arm-low.c (arm_supports_z_point_type): Add software
4481 breakpoint support.
4482
b0b4b501
AT
44832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4484
4485 * linux-arm-low.c: Refactor breakpoint definitions.
4486 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4487 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4488
8689682c
AT
44892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4490
4491 * Makefile.in: Add arm.c/o.
4492 * configure.srv: Likewise.
4493 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4494 (arm_breakpoint_kind_from_pc): New function.
4495 (arm_sw_breakpoint_from_kind): Return proper kind.
4496 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4497
27165294
AT
44982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4499
4500 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4501 removal.
4502 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4503 (struct raw_breakpoint) <size>: Remove.
4504 (struct raw_breakpoint) <kind>: Add.
4505 (bp_size): New function.
4506 (bp_opcode): Likewise.
4507 (find_raw_breakpoint_at): Adjust for kind.
4508 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4509 (remove_memory_breakpoint): Adjust for kind call bp_size.
4510 (set_raw_breakpoint_at): Adjust for kind.
4511 (set_breakpoint): Likewise.
4512 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4513 (delete_raw_breakpoint): Adjust for kind.
4514 (delete_breakpoint): Likewise.
4515 (find_gdb_breakpoint): Likewise.
4516 (set_gdb_breakpoint_1): Likewise.
4517 (set_gdb_breakpoint): Likewise.
4518 (delete_gdb_breakpoint_1): Likewise.
4519 (delete_gdb_breakpoint): Likewise.
4520 (uninsert_raw_breakpoint): Likewise.
4521 (reinsert_raw_breakpoint): Likewise.
4522 (set_breakpoint_data): Remove.
4523 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4524 (check_mem_read): Adjust for kind call bp_size.
4525 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4526 (clone_one_breakpoint): Adjust for kind.
4527 * mem-break.h (set_gdb_breakpoint): Likewise.
4528 (delete_gdb_breakpoint): Likewise.
4529 * server.c (process_serial_event): Likewise.
4530
dd373349
AT
45312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4532
4533 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4534 (struct linux_target_ops) <breakpoint>: Remove.
4535 (struct linux_target_ops) <breakpoint_len>: Remove.
4536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4538 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4539 (arm_sw_breakpoint_from_kind): New function.
4540 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4541 (struct linux_target_ops) <breakpoint>: Remove.
4542 (struct linux_target_ops) <breakpoint_len>: Remove.
4543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4545 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4546 (struct linux_target_ops) <breakpoint>: Remove.
4547 (struct linux_target_ops) <breakpoint_len>: Remove.
4548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4550 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4551 (struct linux_target_ops) <breakpoint>: Remove.
4552 (struct linux_target_ops) <breakpoint_len>: Remove.
4553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4555 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4556 and sw_breakpoint_from_kind to increment the pc.
4557 (linux_breakpoint_kind_from_pc): New function.
4558 (linux_sw_breakpoint_from_kind): New function.
4559 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4560 (initialize_low): Call breakpoint_kind_from_pc and
4561 sw_breakpoint_from_kind to replace breakpoint_data/len.
4562 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4563 New field.
4564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4565 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4566 (struct linux_target_ops) <breakpoint>: Remove.
4567 (struct linux_target_ops) <breakpoint_len>: Remove.
4568 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4569 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4570 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4571 (struct linux_target_ops) <breakpoint>: Remove.
4572 (struct linux_target_ops) <breakpoint_len>: Remove.
4573 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4574 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4575 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4576 (struct linux_target_ops) <breakpoint>: Remove.
4577 (struct linux_target_ops) <breakpoint_len>: Remove.
4578 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4579 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4580 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4581 (struct linux_target_ops) <breakpoint>: Remove.
4582 (struct linux_target_ops) <breakpoint_len>: Remove.
4583 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4584 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4585 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4586 (struct linux_target_ops) <breakpoint>: Remove.
4587 (struct linux_target_ops) <breakpoint_len>: Remove.
4588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4590 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4591 (struct linux_target_ops) <breakpoint>: Remove.
4592 (struct linux_target_ops) <breakpoint_len>: Remove.
4593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4595 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4596 (struct linux_target_ops) <breakpoint>: Remove.
4597 (struct linux_target_ops) <breakpoint_len>: Remove.
4598 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4599 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4600 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4601 (struct linux_target_ops) <breakpoint>: Remove.
4602 (struct linux_target_ops) <breakpoint_len>: Remove.
4603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4605 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4606 (struct linux_target_ops) <breakpoint>: Remove.
4607 (struct linux_target_ops) <breakpoint_len>: Remove.
4608 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4609 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4610 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4611 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4612 (struct linux_target_ops) <breakpoint>: Remove.
4613 (struct linux_target_ops) <breakpoint_len>: Remove.
4614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4616 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4617 (struct linux_target_ops) <breakpoint>: Remove.
4618 (struct linux_target_ops) <breakpoint_len>: Remove.
4619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4621
4cd98a19
AT
46222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4623
4624 * linux-cris-low.c (cris_get_pc): Remove void arg.
4625
774ee6d2
AR
46262015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4627
4628 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4629 variable name.
4630
833dcd29
AR
46312015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4632
4633 * inferiors.c (thread_pid_matches_callback): New function.
4634 (find_thread_process): New function.
4635 (remove_thread): Reset current_thread.
4636 (remove_process): Assert threads have been removed first.
4637
8d689ee5
YQ
46382015-10-15 Yao Qi <yao.qi@linaro.org>
4639
4640 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4641 if it is 3.
4642 (aarch64_remove_point): Likewise.
4643 * regcache.c (regcache_register_size): New function.
4644
1c2e1515
YQ
46452015-10-12 Yao Qi <yao.qi@linaro.org>
4646
4647 * linux-aarch64-low.c: Update all callers as emit_load_store
4648 is renamed to aarch64_emit_load_store.
4649
e1c587c3
YQ
46502015-10-12 Yao Qi <yao.qi@linaro.org>
4651
4652 * linux-aarch64-low.c: Update all callers of function renaming
4653 from emit_insn to aarch64_emit_insn.
4654
b6542f81
YQ
46552015-10-12 Yao Qi <yao.qi@linaro.org>
4656
4657 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4658 arch/aarch64-insn.h.
4659 (struct aarch64_memory_operand): Likewise.
4660 (ENCODE): Likewise.
4661 (emit_insn): Move to arch/aarch64-insn.c.
4662 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4663 (emit_load_store): Move to arch/aarch64-insn.c.
4664 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4665 (can_encode_int32): Remove.
4666
246994ce
YQ
46672015-10-12 Yao Qi <yao.qi@linaro.org>
4668
4669 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4670 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4671 (aarch64_relocate_instruction): Likewise.
4672 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4673 (struct aarch64_insn_visitor): Likewise.
4674
0badd99f
YQ
46752015-10-12 Yao Qi <yao.qi@linaro.org>
4676
4677 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4678 (struct aarch64_insn_visitor): New.
4679 (struct aarch64_insn_relocation_data): New.
4680 (aarch64_ftrace_insn_reloc_b): New function.
4681 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4682 (aarch64_ftrace_insn_reloc_cb): Likewise.
4683 (aarch64_ftrace_insn_reloc_tb): Likewise.
4684 (aarch64_ftrace_insn_reloc_adr): Likewise.
4685 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4686 (aarch64_ftrace_insn_reloc_others): Likewise.
4687 (visitor): New.
4688 (aarch64_relocate_instruction): Use visitor.
4689
dfaffe9d
YQ
46902015-10-12 Yao Qi <yao.qi@linaro.org>
4691
4692 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4693 int. Add argument buf.
4694 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4695 aarch64_relocate_instruction.
4696
70b439f0
YQ
46972015-10-12 Yao Qi <yao.qi@linaro.org>
4698
4699 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4700 argument insn. Remove local variable insn. Don't call
4701 target_read_uint32.
4702 (aarch64_install_fast_tracepoint_jump_pad): Call
4703 target_read_uint32.
4704
7781c06f
YQ
47052015-09-30 Yao Qi <yao.qi@linaro.org>
4706
4707 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4708 (emit_load_store_pair): Likewise.
4709
9a3c8263
SM
47102015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4711
4712 * dll.c (match_dll): Add cast(s).
4713 (unloaded_dll): Likewise.
4714 * linux-low.c (second_thread_of_pid_p): Likewise.
4715 (delete_lwp_callback): Likewise.
4716 (count_events_callback): Likewise.
4717 (select_event_lwp_callback): Likewise.
4718 (linux_set_resume_request): Likewise.
4719 * server.c (accumulate_file_name_length): Likewise.
4720 (emit_dll_description): Likewise.
4721 (handle_qxfer_threads_worker): Likewise.
4722 (visit_actioned_threads): Likewise.
4723 * thread-db.c (any_thread_of): Likewise.
4724 * tracepoint.c (same_process_p): Likewise.
4725 (match_blocktype): Likewise.
4726 (build_traceframe_info_xml): Likewise.
4727
224c3ddb
SM
47282015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4729
4730 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4731 assignment.
4732 (gdb_unparse_agent_expr): Likewise.
4733 * hostio.c (require_data): Likewise.
4734 (handle_pread): Likewise.
4735 * linux-low.c (disable_regset): Likewise.
4736 (fetch_register): Likewise.
4737 (store_register): Likewise.
4738 (get_dynamic): Likewise.
4739 (linux_qxfer_libraries_svr4): Likewise.
4740 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4741 (set_fast_tracepoint_jump): Likewise.
4742 (uninsert_fast_tracepoint_jumps_at): Likewise.
4743 (reinsert_fast_tracepoint_jumps_at): Likewise.
4744 (validate_inserted_breakpoint): Likewise.
4745 (clone_agent_expr): Likewise.
4746 * regcache.c (init_register_cache): Likewise.
4747 * remote-utils.c (putpkt_binary_1): Likewise.
4748 (decode_M_packet): Likewise.
4749 (decode_X_packet): Likewise.
4750 (look_up_one_symbol): Likewise.
4751 (relocate_instruction): Likewise.
4752 (monitor_output): Likewise.
4753 * server.c (handle_search_memory): Likewise.
4754 (handle_qxfer_exec_file): Likewise.
4755 (handle_qxfer_libraries): Likewise.
4756 (handle_qxfer): Likewise.
4757 (handle_query): Likewise.
4758 (handle_v_cont): Likewise.
4759 (handle_v_run): Likewise.
4760 (captured_main): Likewise.
4761 * target.c (write_inferior_memory): Likewise.
4762 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4763 * tracepoint.c (init_trace_buffer): Likewise.
4764 (add_tracepoint_action): Likewise.
4765 (add_traceframe): Likewise.
4766 (add_traceframe_block): Likewise.
4767 (cmd_qtdpsrc): Likewise.
4768 (cmd_qtdv): Likewise.
4769 (cmd_qtstatus): Likewise.
4770 (response_source): Likewise.
4771 (response_tsv): Likewise.
4772 (cmd_qtnotes): Likewise.
4773 (gdb_collect): Likewise.
4774 (initialize_tracepoint): Likewise.
4775
afbe19f8
PL
47762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4777
4778 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4779 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4780 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4781 <NOP>: New.
4782 (enum aarch64_condition_codes): New enum.
4783 (w0): New static global.
4784 (fp): Likewise.
4785 (lr): Likewise.
4786 (struct aarch64_memory_operand) <type>: New
4787 MEMORY_OPERAND_POSTINDEX type.
4788 (postindex_memory_operand): New helper function.
4789 (emit_ret): New function.
4790 (emit_load_store_pair): New function, factored out of emit_stp
4791 with support for MEMORY_OPERAND_POSTINDEX.
4792 (emit_stp): Rewrite using emit_load_store_pair.
4793 (emit_ldp): New function.
4794 (emit_load_store): Likewise.
4795 (emit_ldr): Mention post-index instruction in comment.
4796 (emit_ldrh): New function.
4797 (emit_ldrb): New function.
4798 (emit_ldrsw): Mention post-index instruction in comment.
4799 (emit_str): Likewise.
4800 (emit_subs): New function.
4801 (emit_cmp): Likewise.
4802 (emit_and): Likewise.
4803 (emit_orr): Likewise.
4804 (emit_orn): Likewise.
4805 (emit_eor): Likewise.
4806 (emit_mvn): Likewise.
4807 (emit_lslv): Likewise.
4808 (emit_lsrv): Likewise.
4809 (emit_asrv): Likewise.
4810 (emit_mul): Likewise.
4811 (emit_sbfm): Likewise.
4812 (emit_sbfx): Likewise.
4813 (emit_ubfm): Likewise.
4814 (emit_ubfx): Likewise.
4815 (emit_csinc): Likewise.
4816 (emit_cset): Likewise.
4817 (emit_nop): Likewise.
4818 (emit_ops_insns): New helper function.
4819 (emit_pop): Likewise.
4820 (emit_push): Likewise.
4821 (aarch64_emit_prologue): New function.
4822 (aarch64_emit_epilogue): Likewise.
4823 (aarch64_emit_add): Likewise.
4824 (aarch64_emit_sub): Likewise.
4825 (aarch64_emit_mul): Likewise.
4826 (aarch64_emit_lsh): Likewise.
4827 (aarch64_emit_rsh_signed): Likewise.
4828 (aarch64_emit_rsh_unsigned): Likewise.
4829 (aarch64_emit_ext): Likewise.
4830 (aarch64_emit_log_not): Likewise.
4831 (aarch64_emit_bit_and): Likewise.
4832 (aarch64_emit_bit_or): Likewise.
4833 (aarch64_emit_bit_xor): Likewise.
4834 (aarch64_emit_bit_not): Likewise.
4835 (aarch64_emit_equal): Likewise.
4836 (aarch64_emit_less_signed): Likewise.
4837 (aarch64_emit_less_unsigned): Likewise.
4838 (aarch64_emit_ref): Likewise.
4839 (aarch64_emit_if_goto): Likewise.
4840 (aarch64_emit_goto): Likewise.
4841 (aarch64_write_goto_address): Likewise.
4842 (aarch64_emit_const): Likewise.
4843 (aarch64_emit_call): Likewise.
4844 (aarch64_emit_reg): Likewise.
4845 (aarch64_emit_pop): Likewise.
4846 (aarch64_emit_stack_flush): Likewise.
4847 (aarch64_emit_zero_ext): Likewise.
4848 (aarch64_emit_swap): Likewise.
4849 (aarch64_emit_stack_adjust): Likewise.
4850 (aarch64_emit_int_call_1): Likewise.
4851 (aarch64_emit_void_call_2): Likewise.
4852 (aarch64_emit_eq_goto): Likewise.
4853 (aarch64_emit_ne_goto): Likewise.
4854 (aarch64_emit_lt_goto): Likewise.
4855 (aarch64_emit_le_goto): Likewise.
4856 (aarch64_emit_gt_goto): Likewise.
4857 (aarch64_emit_ge_got): Likewise.
4858 (aarch64_emit_ops_impl): New static global variable.
4859 (aarch64_emit_ops): New target function, return
4860 &aarch64_emit_ops_impl.
4861 (struct linux_target_ops): Install it.
4862
bb903df0
PL
48632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4864
4865 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4866 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4867 aarch64-ipa.o.
4868 * linux-aarch64-ipa.c: New file.
4869 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4870 and endian.h.
4871 (aarch64_get_thread_area): New target method.
4872 (extract_signed_bitfield): New helper function.
4873 (aarch64_decode_ldr_literal): New function.
4874 (enum aarch64_opcodes): New enum.
4875 (struct aarch64_register): New struct.
4876 (struct aarch64_operand): New struct.
4877 (x0): New static global.
4878 (x1): Likewise.
4879 (x2): Likewise.
4880 (x3): Likewise.
4881 (x4): Likewise.
4882 (w2): Likewise.
4883 (ip0): Likewise.
4884 (sp): Likewise.
4885 (xzr): Likewise.
4886 (aarch64_register): New helper function.
4887 (register_operand): Likewise.
4888 (immediate_operand): Likewise.
4889 (struct aarch64_memory_operand): New struct.
4890 (offset_memory_operand): New helper function.
4891 (preindex_memory_operand): Likewise.
4892 (enum aarch64_system_control_registers): New enum.
4893 (ENCODE): New macro.
4894 (emit_insn): New helper function.
4895 (emit_b): New function.
4896 (emit_bcond): Likewise.
4897 (emit_cb): Likewise.
4898 (emit_tb): Likewise.
4899 (emit_blr): Likewise.
4900 (emit_stp): Likewise.
4901 (emit_ldp_q_offset): Likewise.
4902 (emit_stp_q_offset): Likewise.
4903 (emit_load_store): Likewise.
4904 (emit_ldr): Likewise.
4905 (emit_ldrsw): Likewise.
4906 (emit_str): Likewise.
4907 (emit_ldaxr): Likewise.
4908 (emit_stxr): Likewise.
4909 (emit_stlr): Likewise.
4910 (emit_data_processing_reg): Likewise.
4911 (emit_data_processing): Likewise.
4912 (emit_add): Likewise.
4913 (emit_sub): Likewise.
4914 (emit_mov): Likewise.
4915 (emit_movk): Likewise.
4916 (emit_mov_addr): Likewise.
4917 (emit_mrs): Likewise.
4918 (emit_msr): Likewise.
4919 (emit_sevl): Likewise.
4920 (emit_wfe): Likewise.
4921 (append_insns): Likewise.
4922 (can_encode_int32_in): New helper function.
4923 (aarch64_relocate_instruction): New function.
4924 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4925 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4926 (struct linux_target_ops): Install aarch64_get_thread_area,
4927 aarch64_install_fast_tracepoint_jump_pad and
4928 aarch64_get_min_fast_tracepoint_insn_len.
4929
787749ea
PL
49302015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4931
4932 * Makefile.in (aarch64-insn.o): New rule.
4933 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4934
9812b2e6
YQ
49352015-09-21 Yao Qi <yao.qi@linaro.org>
4936
4937 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4938
18fe412b
YQ
49392015-09-21 Yao Qi <yao.qi@linaro.org>
4940
4941 * tracepoint.c (max_jump_pad_size): Remove.
4942
a0cc84cd
YQ
49432015-09-18 Yao Qi <yao.qi@linaro.org>
4944
4945 * linux-aarch64-low.c: Don't include sys/uio.h.
4946 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4947
d78908cf
WW
49482015-09-16 Wei-cheng Wang <cole945@gmail.com>
4949
4950 * tracepoint.c (eval_result_type): Change prototype.
4951 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4952
d57e0d50
PA
49532015-09-15 Pedro Alves <palves@redhat.com>
4954
4955 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4956 Check whether to report exec events instead of checking whether
4957 multiprocess is enabled.
4958
5a676acc
PA
49592015-09-15 Pedro Alves <palves@redhat.com>
4960
4961 PR remote/18965
4962 * remote-utils.c (prepare_resume_reply): Merge
4963 TARGET_WAITKIND_VFORK_DONE switch case with the
4964 TARGET_WAITKIND_FORKED case.
4965
7c5d0fad
YQ
49662015-09-15 Yao Qi <yao.qi@linaro.org>
4967
4968 * server.c (handle_query): Check string comparison using
4969 "else if" instead of "if".
4970
750ce8d1
YQ
49712015-09-15 Yao Qi <yao.qi@linaro.org>
4972
4973 * server.c (vCont_supported): New global variable.
4974 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4975 matches. Append ";vContSupported+" to own_buf.
4976 (handle_v_requests): Append ";s;S" to own_buf if target supports
4977 hardware single step or vCont_supported is false.
4978 (capture_main): Set vCont_supported to zero.
4979
70b90b91
YQ
49802015-09-15 Yao Qi <yao.qi@linaro.org>
4981
4982 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4983 it to ...
4984 (linux_supports_hardware_single_step): ... New function.
4985 (linux_target_ops): Update.
4986 * lynx-low.c (lynx_target_ops): Set field
4987 supports_hardware_single_step to target_can_do_hardware_single_step.
4988 * nto-low.c (nto_target_ops): Likewise.
4989 * spu-low.c (spu_target_ops): Likewise.
4990 * win32-low.c (win32_target_ops): Likewise.
4991 * target.c (target_can_do_hardware_single_step): New function.
4992 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4993 Remove. <supports_hardware_single_step>: New field.
4994 (target_supports_conditional_breakpoints): Remove.
4995 (target_supports_hardware_single_step): New macro.
4996 (target_can_do_hardware_single_step): Declare.
4997 * server.c (handle_query): Use target_supports_hardware_single_step
4998 instead of target_supports_conditional_breakpoints.
4999
ade90bde
YQ
50002015-09-15 Yao Qi <yao.qi@linaro.org>
5001
5002 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5003 function.
5004 (struct linux_target_ops the_low_target): Install
5005 aarch64_linux_siginfo_fixup.
5006
94585166
DB
50072015-09-11 Don Breazeal <donb@codesourcery.com>
5008 Luis Machado <lgustavo@codesourcery.com>
5009
5010 * linux-low.c (linux_mourn): Static declaration.
5011 (linux_arch_setup): Move in front of
5012 handle_extended_wait.
5013 (linux_arch_setup_thread): New function.
5014 (handle_extended_wait): Handle exec events. Call
5015 linux_arch_setup_thread. Make event_lwp argument a
5016 pointer-to-a-pointer.
5017 (check_zombie_leaders): Do not check stopped threads.
5018 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5019 (linux_low_filter_event): Add lwp and thread for exec'ing
5020 non-leader thread if leader thread has been deleted.
5021 Refactor code into linux_arch_setup_thread and call it.
5022 Pass child lwp pointer by reference to handle_extended_wait.
5023 (linux_wait_for_event_filtered): Update comment.
5024 (linux_wait_1): Prevent clobbering exec event status.
5025 (linux_supports_exec_events): New function.
5026 (linux_target_ops) <supports_exec_events>: Initialize new member.
5027 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5028 new member.
5029 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5030 * server.c (report_exec_events): New global variable.
5031 (handle_query): Handle qSupported query for exec-events feature.
5032 (captured_main): Initialize report_exec_events.
5033 * server.h (report_exec_events): Declare new global variable.
5034 * target.h (struct target_ops) <supports_exec_events>: New
5035 member.
5036 (target_supports_exec_events): New macro.
5037 * win32-low.c (win32_target_ops) <supports_exec_events>:
5038 Initialize new member.
5039
0568462b
MM
50402015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5041
5042 * linux-low.c (linux_low_enable_btrace): Remove.
5043 (linux_target_ops): Replace linux_low_enable_btrace with
5044 linux_enable_btrace.
5045
39edd165
YQ
50462015-09-03 Yao Qi <yao.qi@linaro.org>
5047
5048 * linux-aarch64-low.c (aarch64_insert_point): Call
5049 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5050 returns true.
5051
1db33b5a
UW
50522015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5053
5054 * linux-low.c (check_stopped_by_breakpoint): Use
5055 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5056
ab290430
PA
50572015-08-27 Pedro Alves <palves@redhat.com>
5058
5059 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5060
8d749320
SM
50612015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5062
6711b7f8
SM
5063 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5064 the XNEW-family equivalent.
8d749320
SM
5065 (compile_bytecodes): Likewise.
5066 * dll.c (loaded_dll): Likewise.
5067 * event-loop.c (append_callback_event): Likewise.
5068 (create_file_handler): Likewise.
5069 (create_file_event): Likewise.
5070 * hostio.c (handle_open): Likewise.
5071 * inferiors.c (add_thread): Likewise.
5072 (add_process): Likewise.
5073 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5074 * linux-arm-low.c (arm_new_process): Likewise.
5075 (arm_new_thread): Likewise.
5076 * linux-low.c (add_to_pid_list): Likewise.
5077 (linux_add_process): Likewise.
5078 (handle_extended_wait): Likewise.
5079 (add_lwp): Likewise.
5080 (enqueue_one_deferred_signal): Likewise.
5081 (enqueue_pending_signal): Likewise.
5082 (linux_resume_one_lwp_throw): Likewise.
5083 (linux_resume_one_thread): Likewise.
5084 (linux_read_memory): Likewise.
5085 (linux_write_memory): Likewise.
5086 * linux-mips-low.c (mips_linux_new_process): Likewise.
5087 (mips_linux_new_thread): Likewise.
5088 (mips_add_watchpoint): Likewise.
5089 * linux-x86-low.c (initialize_low_arch): Likewise.
5090 * lynx-low.c (lynx_add_process): Likewise.
5091 * mem-break.c (set_raw_breakpoint_at): Likewise.
5092 (set_breakpoint): Likewise.
5093 (add_condition_to_breakpoint): Likewise.
5094 (add_commands_to_breakpoint): Likewise.
5095 (clone_agent_expr): Likewise.
5096 (clone_one_breakpoint): Likewise.
5097 * regcache.c (new_register_cache): Likewise.
5098 * remote-utils.c (look_up_one_symbol): Likewise.
5099 * server.c (queue_stop_reply): Likewise.
5100 (start_inferior): Likewise.
5101 (queue_stop_reply_callback): Likewise.
5102 (handle_target_event): Likewise.
5103 * spu-low.c (fetch_ppc_memory): Likewise.
5104 (store_ppc_memory): Likewise.
5105 * target.c (set_target_ops): Likewise.
5106 * thread-db.c (thread_db_load_search): Likewise.
5107 (try_thread_db_load_1): Likewise.
5108 * tracepoint.c (add_tracepoint): Likewise.
5109 (add_tracepoint_action): Likewise.
5110 (create_trace_state_variable): Likewise.
5111 (cmd_qtdpsrc): Likewise.
5112 (cmd_qtro): Likewise.
5113 (add_while_stepping_state): Likewise.
5114 * win32-low.c (child_add_thread): Likewise.
5115 (get_image_name): Likewise.
5116
ed8b7b42
YQ
51172015-08-25 Yao Qi <yao.qi@linaro.org>
5118
5119 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5120
db3cb7cb
YQ
51212015-08-25 Yao Qi <yao.qi@linaro.org>
5122
5123 * Makefile.in (aarch64-linux.o): New rule.
5124 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5125 srv_tgtobj.
5126 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5127 (aarch64_init_debug_reg_state): Make it extern.
5128 (aarch64_linux_prepare_to_resume): Remove.
5129
f6011a1c
YQ
51302015-08-25 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5133 lwp_arch_private_info and ptid_of_lwp.
5134
88e2cf7e
YQ
51352015-08-25 Yao Qi <yao.qi@linaro.org>
5136
5137 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5138 Find proc_info by find_process_pid. All callers updated.
5139
5e35436e
YQ
51402015-08-25 Yao Qi <yao.qi@linaro.org>
5141
5142 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5143 Remove.
5144 (debug_reg_change_callback): Remove.
5145 (aarch64_notify_debug_reg_change): Remove.
5146
4a8a7965
YQ
51472015-08-25 Yao Qi <yao.qi@linaro.org>
5148
5149 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5150 Call current_lwp_ptid.
5151
32a271ee
YQ
51522015-08-25 Yao Qi <yao.qi@linaro.org>
5153
5154 * linux-aarch64-low.c (debug_reg_change_callback): Use
5155 debug_printf.
5156
0d51c8d7
YQ
51572015-08-25 Yao Qi <yao.qi@linaro.org>
5158
5159 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5160
31a43dd5
YQ
51612015-08-25 Yao Qi <yao.qi@linaro.org>
5162
5163 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5164
8ee52567
YQ
51652015-08-25 Yao Qi <yao.qi@linaro.org>
5166
5167 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5168 the code.
5169
ff3f0f45
YQ
51702015-08-25 Yao Qi <yao.qi@linaro.org>
5171
5172 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5173 Remove.
5174 (debug_reg_change_callback): Remove argument entry and add argument
5175 lwp. Remove local variable thread. Don't print thread id in the
5176 debugging output. Don't check whether pid of thread equals to pid.
5177 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5178 iterate_over_lwps instead find_inferior.
5179
3d40fbb5
PA
51802015-08-24 Pedro Alves <palves@redhat.com>
5181
5182 * inferiors.c (get_first_process): New function.
5183 * inferiors.h (get_first_process): New declaration.
5184 * remote-utils.c (read_ptid): Default to the first process in the
5185 list, instead of to the current thread's process.
5186
438e1e42
PA
51872015-08-24 Pedro Alves <palves@redhat.com>
5188
5189 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5190 * event-loop.c: Likewise.
5191 * remote-utils.c: Likewise.
5192 * tracepoint.c: Likewise.
5193
a8c6d4fc
PA
51942015-08-24 Pedro Alves <palves@redhat.com>
5195
5196 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5197 ptid_get_lwp.
5198
99b0bb12
PA
51992015-08-21 Pedro Alves <palves@redhat.com>
5200
5201 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5202 instead of literal 1.
5203
f8904751
PA
52042015-08-21 Pedro Alves <palves@redhat.com>
5205
5206 * tdesc.c (default_description): Explicitly zero-initialize.
5207
465a859e
PA
52082015-08-21 Pedro Alves <palves@redhat.com>
5209
5210 PR gdb/18749
5211 * inferiors.c (remove_thread): Discard any pending stop reply for
5212 this thread.
5213 * server.c (remove_all_on_match_pid): Rename to ...
5214 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5215 instead of a pid.
5216 (discard_queued_stop_replies): Change parameter to a ptid. Now
5217 extern.
5218 (handle_v_kill, kill_inferior_callback, captured_main)
5219 (process_serial_event): Adjust.
5220 * server.h (discard_queued_stop_replies): Declare.
5221
f0db101d
PA
52222015-08-21 Pedro Alves <palves@redhat.com>
5223
5224 * linux-low.c (wait_for_sigstop): Always switch to no thread
5225 selected if the previously current thread dies.
5226 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5227 process instead of the current thread's.
5228 * remote-utils.c (input_interrupt): Don't check if there's no
5229 current thread.
5230 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5231 current thread to the general thread fails, error out.
5232 (handle_qxfer_auxv, handle_qxfer_libraries)
5233 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5234 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5235 (handle_query): Check if there's a thread selected instead of
5236 checking whether there's any thread in the thread list.
5237 (handle_qxfer_threads, handle_qxfer_btrace)
5238 (handle_qxfer_btrace_conf): Don't error out early if there's no
5239 thread in the thread list.
5240 (handle_v_cont, myresume): Don't set the current thread to the
5241 continue thread.
5242 (process_serial_event) <Hg handling>: Also set thread_id if the
5243 previous general thread is still alive.
5244 (process_serial_event) <g/G handling>: If setting the current
5245 thread to the general thread fails, error out.
5246 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5247 thread's lwp instead of the current thread's.
5248 * target.c (set_desired_thread): If the desired thread was not
5249 found, leave the current thread pointing to NULL. Return an int
5250 (boolean) indicating success.
5251 * target.h (set_desired_thread): Change return type to int.
5252
40045d91
MF
52532015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5254
5255 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5256 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5257 #includes.
5258 (ps_get_thread_area): New function.
5259
45face3b
GB
52602015-08-19 Gary Benson <gbenson@redhat.com>
5261
5262 * hostio.c (handle_pread): Do not attempt to read more data
5263 than hostio_reply_with_data can fit in a packet.
5264
16d5f642
JB
52652015-08-18 Joel Brobecker <brobecker@adacore.com>
5266
5267 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5268
a738da3a
MF
52692015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5270
5271 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5272
33ebda9d
PA
52732015-08-06 Pedro Alves <palves@redhat.com>
5274
5275 * tracepoint.c (expr_eval_result): Now an int.
5276
a44892be
PA
52772015-08-06 Pedro Alves <palves@redhat.com>
5278
5279 * gdbthread.h (struct regcache): Forward declare.
5280 (struct thread_info) <regcache_data>: Now a struct regcache
5281 pointer.
5282 * inferiors.c (inferior_regcache_data)
5283 (set_inferior_regcache_data): Now work with struct regcache
5284 pointers.
5285 * inferiors.h (struct regcache): Forward declare.
5286 (inferior_regcache_data, set_inferior_regcache_data): Now work
5287 with struct regcache pointers.
5288 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5289 (free_register_cache_thread): Remove struct regcache pointer
5290 casts.
5291
608a1e46
PA
52922015-08-06 Pedro Alves <palves@redhat.com>
5293
5294 * server.c (captured_main): On error, print the exception message
5295 to stderr, and if run_once is set, throw a quit.
5296
f0ce0d3a
PA
52972015-08-06 Pedro Alves <palves@redhat.com>
5298
5299 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5300 the current thread.
5301
bf47e248
PA
53022015-08-06 Pedro Alves <palves@redhat.com>
5303
5304 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5305 reading beyond the passed in buffer length.
5306
b6b9ffcc
PL
53072015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5308
5309 * tracepoint.c (symbol_list) <required>: Remove.
5310
863d01bd
PA
53112015-08-06 Pedro Alves <palves@redhat.com>
5312
5313 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5314 count if stopping and suspending threads.
5315 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5316 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5317 (linux_detach): Complete an ongoing step-over.
5318 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5319 throughout.
5320 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5321 (linux_wait_1): If passing a signal to the inferior after
5322 finishing a step-over, unsuspend and re-resume all lwps. If we
5323 see a single-step event but the thread should be continuing, don't
5324 pass the trap to gdb.
5325 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5326 internal_error instead of gdb_assert.
5327 (enqueue_pending_signal): New function.
5328 (check_ptrace_stopped_lwp_gone): Add debug output.
5329 (start_step_over): Use internal_error instead of gdb_assert.
5330 (complete_ongoing_step_over): New function.
5331 (linux_resume_one_thread): Don't resume a suspended thread.
5332 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5333 it stepping.
5334
00db26fa
PA
53352015-08-06 Pedro Alves <palves@redhat.com>
5336
5337 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5338 (linux_thread_alive): Use lwp_is_marked_dead.
5339 (extended_event_reported): Delete.
5340 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5341 instead of extended_event_reported.
5342 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5343 as well.
5344 (lwp_is_marked_dead): New function.
5345 (lwp_running): Use lwp_is_marked_dead.
5346 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5347 comment.
5348
ad071a30
PA
53492015-08-06 Pedro Alves <palves@redhat.com>
5350
5351 * linux-low.c (linux_wait_1): Move fork event output out of the
5352 !report_to_gdb check. Pass event_child->waitstatus to
5353 target_waitstatus_to_string instead of ourstatus.
5354
524b57e6
YQ
53552015-08-04 Yao Qi <yao.qi@linaro.org>
5356
5357 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5358 if current_thread is 32 bit.
5359
6085d6f6
YQ
53602015-08-04 Yao Qi <yao.qi@linaro.org>
5361
5362 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5363 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5364 * server.c (extended_protocol): Remove "static".
5365 * server.h (extended_protocol): Declare it.
5366
8a7e4587
YQ
53672015-08-04 Yao Qi <yao.qi@linaro.org>
5368
5369 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5370 both aarch64 and aarch32.
5371 (aarch64_set_pc): Likewise.
5372
3b53ae99
YQ
53732015-08-04 Yao Qi <yao.qi@linaro.org>
5374
5375 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5376 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5377 arm-with-neon.xml to srv_xmlfiles.
5378 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5379 (is_64bit_tdesc): New function.
5380 (aarch64_linux_read_description): New function.
5381 (aarch64_arch_setup): Call aarch64_linux_read_description.
5382 (regs_info): Rename to regs_info_aarch64.
5383 (aarch64_regs_info): Return right regs_info.
5384 (initialize_low_arch): Call initialize_low_arch_aarch32.
5385
bd9e6534
YQ
53862015-08-04 Yao Qi <yao.qi@linaro.org>
5387
5388 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5389 * linux-aarch32-low.c: New file.
5390 * linux-aarch32-low.h: New file.
5391 * linux-arm-low.c (arm_fill_gregset): Move it to
5392 linux-aarch32-low.c.
5393 (arm_store_gregset): Likewise.
5394 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5395 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5396 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5397 (regs_info): Rename to regs_info_arm.
5398 (arm_regs_info): Return regs_info_aarch32 if
5399 have_ptrace_getregset is 1 and target description is
5400 arm_with_neon or arm_with_vfpv3.
5401 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5402 Call initialize_low_arch_aarch32 instead.
5403
ded48a5e
YQ
54042015-08-04 Yao Qi <yao.qi@linaro.org>
5405
5406 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5407 * linux-low.c: ... here.
5408 * linux-low.h (have_ptrace_getregset): Declare it.
5409
96e9210f
PA
54102015-08-04 Pedro Alves <palves@redhat.com>
5411
5412 * thread-db.c (struct thread_db): Use new typedefs.
5413 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5414 CHK calls.
5415 (disable_thread_event_reporting): Cast result of dlsym to
5416 destination function pointer type.
5417 (thread_db_mourn): Use td_ta_delete_ftype.
5418
af60a1ef
SL
54192015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5420
5421 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5422 arch variant.
5423 (CDX_BREAKPOINT): Define for R2.
5424 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5425 (the_low_target): Add comments.
5426
e8b41681
YQ
54272015-07-30 Yao Qi <yao.qi@linaro.org>
5428
5429 * linux-arm-low.c (arm_hwcap): Remove it.
5430 (arm_read_description): New local variable arm_hwcap. Don't
5431 set arm_hwcap to zero.
5432
89abb039
YQ
54332015-07-30 Yao Qi <yao.qi@linaro.org>
5434
5435 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5436 Use regcache->tdesc instead.
5437 (arm_store_wmmxregset): Likewise.
5438 (arm_fill_vfpregset): Likewise.
5439 (arm_store_vfpregset): Likewise.
5440
deca266c
YQ
54412015-07-30 Yao Qi <yao.qi@linaro.org>
5442
5443 * linux-arm-low.c: Include arch/arm.h.
5444 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5445 (arm_store_gregset): Likewise.
5446
aa58a496
SM
54472015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5448
5449 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5450 ptrace's 4th parameter.
5451
50904b25
YQ
54522015-07-27 Yao Qi <yao.qi@linaro.org>
5453
5454 * configure.srv (case aarch64*-*-linux*): Don't set
5455 srv_linux_usrregs.
5456
5826e159
PA
54572015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5458
5459 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5460 sys/ptrace.h.
5461 * linux-arm-low.c: Likewise.
5462 * linux-cris-low.c: Likewise.
5463 * linux-crisv32-low.c: Likewise.
5464 * linux-low.c: Likewise.
5465 * linux-m68k-low.c: Likewise.
5466 * linux-mips-low.c: Likewise.
5467 * linux-nios2-low.c: Likewise.
5468 * linux-s390-low.c: Likewise.
5469 * linux-sparc-low.c: Likewise.
5470 * linux-tic6x-low.c: Likewise.
5471 * linux-tile-low.c: Likewise.
5472 * linux-x86-low.c: Likewise.
5473
54019719
PA
54742015-07-24 Pedro Alves <palves@redhat.com>
5475
5476 * config.in: Regenerate.
5477 * configure: Regenerate.
5478
eb7aa561
PA
54792015-07-24 Pedro Alves <palves@redhat.com>
5480
5481 * acinclude.m4: Include ../ptrace.m4.
5482 * configure.ac: Call GDB_AC_PTRACE.
5483 * config.in, configure: Regenerate.
5484
55d7b841
YQ
54852015-07-24 Yao Qi <yao.qi@linaro.org>
5486
5487 * linux-low.c (linux_create_inferior): Remove setting to
5488 proc->priv->new_inferior.
5489 (linux_attach): Likewise.
5490 (linux_low_filter_event): Likewise.
5491 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5492
c06cbd92
YQ
54932015-07-24 Yao Qi <yao.qi@linaro.org>
5494
5495 * linux-low.c (linux_arch_setup): New function.
5496 (linux_low_filter_event): If proc->tdesc is NULL and
5497 proc->attached is true, call the_low_target.arch_setup.
5498 Otherwise, keep status pending, and return.
5499 (linux_resume_one_lwp_throw): Don't call get_pc if
5500 thread->while_stepping isn't NULL. Don't call
5501 get_thread_regcache if proc->tdesc is NULL.
5502 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5503 (linux_target_ops): Install arch_setup.
5504 * server.c (start_inferior): Call the_target->arch_setup.
5505 * target.h (struct target_ops) <arch_setup>: New field.
5506 (target_arch_setup): New marco.
5507 * lynx-low.c (lynx_target_ops): Update.
5508 * nto-low.c (nto_target_ops): Update.
5509 * spu-low.c (spu_target_ops): Update.
5510 * win32-low.c (win32_target_ops): Update.
5511
5ae3ebba
YQ
55122015-07-24 Yao Qi <yao.qi@linaro.org>
5513
5514 * linux-low.c (linux_add_process): Don't set
5515 proc->priv->new_inferior.
5516 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5517 (linux_attach): Likewise.
5518
eb97750b
YQ
55192015-07-24 Yao Qi <yao.qi@linaro.org>
5520
5521 * server.c (start_inferior): Code refactor.
5522
51aee833
YQ
55232015-07-24 Yao Qi <yao.qi@linaro.org>
5524
5525 * server.c (process_serial_event): Set general_thread.
5526
af1b22f3
YQ
55272015-07-21 Yao Qi <yao.qi@linaro.org>
5528
5529 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5530 aarch64_linux_get_debug_reg_capacity.
5531
554717a3
YQ
55322015-07-17 Yao Qi <yao.qi@linaro.org>
5533
5534 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5535 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5536 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5537 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5538 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5539 (AARCH64_HWP_ALIGNMENT): Likewise.
5540 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5541 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5542 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5543 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5544 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5545 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5546 (struct aarch64_debug_reg_state): Likewise.
5547 (struct arch_lwp_info): Likewise.
5548 (aarch64_align_watchpoint): Likewise.
5549 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5550 (aarch64_watchpoint_length): Likewise.
5551 (aarch64_point_encode_ctrl_reg): Likewise
5552 (aarch64_point_is_aligned): Likewise.
5553 (aarch64_align_watchpoint): Likewise.
5554 (aarch64_linux_set_debug_regs):
5555 (aarch64_dr_state_insert_one_point): Likewise.
5556 (aarch64_dr_state_remove_one_point): Likewise.
5557 (aarch64_handle_breakpoint): Likewise.
5558 (aarch64_handle_aligned_watchpoint): Likewise.
5559 (aarch64_handle_unaligned_watchpoint): Likewise.
5560 (aarch64_handle_watchpoint): Likewise.
5561
c67ca4de
YQ
55622015-07-17 Yao Qi <yao.qi@linaro.org>
5563
5564 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5565 and don't aarch64_get_debug_reg_state. All callers update.
5566 (aarch64_handle_aligned_watchpoint): Likewise.
5567 (aarch64_handle_unaligned_watchpoint): Likewise.
5568 (aarch64_handle_watchpoint): Likewise.
5569 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5570 (aarch64_remove_point): Likewise.
5571
25abf979
YQ
55722015-07-17 Yao Qi <yao.qi@linaro.org>
5573
5574 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5575 debug_printf.
5576 (aarch64_handle_unaligned_watchpoint): Likewise.
5577
db1ff28b
JK
55782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5579
5580 Revert the previous 3 commits:
5581 Move gdb_regex* to common/
5582 Move linux_find_memory_regions_full & co.
5583 gdbserver build-id attribute generator
5584
700ca40f
JK
55852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5586 Jan Kratochvil <jan.kratochvil@redhat.com>
5587
5588 gdbserver build-id attribute generator.
5589 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5590 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5591 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5592 (find_phdr): New.
5593 (get_dynamic): Use find_pdhr to traverse program headers.
5594 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5595 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5596 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5597 (get_hex_build_id): New.
5598 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5599 to reply XML document.
5600
9904185c
JK
56012015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5602 Jan Kratochvil <jan.kratochvil@redhat.com>
5603
5604 * target.c: Include target/target-utils.h and fcntl.h.
5605 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5606 (target_fileio_read_stralloc): New functions.
5607
6e5b4429
JK
56082015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5609
5610 * Makefile.in (OBS): Add gdb_regex.o.
5611 (gdb_regex.o): New.
5612 * config.in: Rebuilt.
5613 * configure: Rebuilt.
5614
ddc98fbf
JK
56152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5616 Jan Kratochvil <jan.kratochvil@redhat.com>
5617
5618 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5619 * Makefile.in (OBS): Add target-utils.o.
5620 (linux-maps.o, target-utils.o): New.
5621 * configure.srv (srv_linux_obj): Add linux-maps.o.
5622
e57bb7a0
PL
56232015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5624
5625 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5626 function, return 1.
5627 (the_low_target): Install it.
5628
586b02a9
PA
56292015-07-14 Pedro Alves <palves@redhat.com>
5630
5631 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5632 Instead, ignore ECHILD, and throw an error for other errnos.
5633
58c1b36c
PA
56342015-07-10 Pedro Alves <palves@redhat.com>
5635
5636 * event-loop.c (struct callback_event) <data>: Change type to
5637 gdb_client_data instance instead of gdb_client_data pointer.
5638 (append_callback_event): Adjust.
5639
421530db
PL
56402015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5641
5642 * linux-aarch64-low.c: Add comments for each linux_target_ops
5643 method. Remove comments already covered in target_ops and
5644 linux_target_ops definitions.
5645 (the_low_target): Add comments for each unimplemented method.
5646
c2d65f38
YQ
56472015-07-09 Yao Qi <yao.qi@linaro.org>
5648
5649 * linux-aarch64-low.c (aarch64_regmap): Remove.
5650 (aarch64_usrregs_info): Remove.
5651 (regs_info): Set field usrregs to NULL.
5652
b20a6524
MM
56532015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5654
5655 * linux-low.c: Include "rsp-low.h"
5656 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5657 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5658 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5659 (handle_btrace_enable_pt): New.
5660 (handle_btrace_general_set): Support "pt".
5661 (handle_btrace_conf_general_set): Support "pt:size".
5662
96c97461
PL
56632015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5664
5665 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5666 Z_PACKET_SW_BP.
5667
37d66942
PL
56682015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5669
5670 * linux-aarch64-low.c: Remove comment about endianness.
5671 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5672 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5673 memcmp.
5674
dc06243f
GB
56752015-06-24 Gary Benson <gbenson@redhat.com>
5676
5677 * linux-i386-ipa.c (stdint.h): Do not include.
5678 * lynx-i386-low.c (stdint.h): Likewise.
5679 * lynx-ppc-low.c (stdint.h): Likewise.
5680 * mem-break.c (stdint.h): Likewise.
5681 * thread-db.c (stdint.h): Likewise.
5682 * tracepoint.c (stdint.h): Likewise.
5683 * win32-low.c (stdint.h): Likewise.
5684
124e13d9
SM
56852015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5686
5687 * server.c (write_qxfer_response): Update call to
5688 remote_escape_output.
5689
909c2cda
JK
56902015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5691 Jan Kratochvil <jan.kratochvil@redhat.com>
5692
5693 Merge multiple hex conversions.
5694 * gdbreplay.c (tohex): Rename to 'fromhex'.
5695 (logchar): Use fromhex.
5696
24c05f46
JK
56972015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5698
5699 * server.c (handle_qxfer_libraries): Set `version' attribute for
5700 <library-list>.
5701
14d2069a
GB
57022015-06-10 Gary Benson <gbenson@redhat.com>
5703
5704 * target.h (struct target_ops) <multifs_open>: New field.
5705 <multifs_unlink>: Likewise.
5706 <multifs_readlink>: Likewise.
5707 * linux-low.c (nat/linux-namespaces.h): New include.
5708 (linux_target_ops): Initialize the_target->multifs_open,
5709 the_target->multifs_unlink and the_target->multifs_readlink.
5710 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5711 * hostio.c (hostio_fs_pid): New static variable.
5712 (hostio_handle_new_gdb_connection): New function.
5713 (handle_setfs): Likewise.
5714 (handle_open): Use the_target->multifs_open as appropriate.
5715 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5716 (handle_readlink): Use the_target->multifs_readlink as
5717 appropriate.
5718 (handle_vFile): Handle vFile:setfs packets.
5719 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5720 after target_handle_new_gdb_connection.
5721
4b8b5e72
GB
57222015-06-10 Gary Benson <gbenson@redhat.com>
5723
5724 * configure.ac (AC_CHECK_FUNCS): Add setns.
5725 * config.in: Regenerate.
5726 * configure: Likewise.
5727 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5728 (linux-namespaces.o): New rule.
5729 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5730
3ac2e371
GB
57312015-06-09 Gary Benson <gbenson@redhat.com>
5732
5733 * hostio.c (handle_open): Process mode argument with
5734 fileio_to_host_mode.
5735
ca9b78ce
YQ
57362015-06-01 Yao Qi <yao.qi@linaro.org>
5737
5738 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5739 * linux-x86-low.c: Likewise.
5740
bfacd19d
DB
57412015-05-28 Don Breazeal <donb@codesourcery.com>
5742
5743 * linux-low.c (handle_extended_wait): Initialize
5744 thread_info.last_resume_kind for new fork children.
5745
452003ef
PA
57462015-05-15 Pedro Alves <palves@redhat.com>
5747
5748 * target.h (target_handle_new_gdb_connection): Rewrite using if
5749 wrapped in do/while.
5750
1041a03c
JB
57512015-05-14 Joel Brobecker <brobecker@adacore.com>
5752
5753 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5754 * configure, config.in: Regenerate.
5755 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5756 Declare typedef.
5757
c269dbdb
DB
57582015-05-12 Don Breazeal <donb@codesourcery.com>
5759
5760 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5761 PTRACE_EVENT_VFORK_DONE.
5762 (linux_low_ptrace_options, extended_event_reported): Add vfork
5763 events.
5764 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5765 and "vforkdone" for RSP 'T' Stop Reply Packet.
5766 * server.h (report_vfork_events): Declare
5767 global variable.
5768
3a8a0396
DB
57692015-05-12 Don Breazeal <donb@codesourcery.com>
5770
5771 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5772 (the_low_target) <new_fork>: Initialize new member.
5773 * linux-arm-low.c (arm_new_fork): New function.
5774 (the_low_target) <new_fork>: Initialize new member.
5775 * linux-low.c (handle_extended_wait): Call new target function
5776 new_fork.
5777 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5778 * linux-mips-low.c (mips_add_watchpoint): New function
5779 extracted from mips_insert_point.
5780 (the_low_target) <new_fork>: Initialize new member.
5781 (mips_linux_new_fork): New function.
5782 (mips_insert_point): Call mips_add_watchpoint.
5783 * linux-x86-low.c (x86_linux_new_fork): New function.
5784 (the_low_target) <new_fork>: Initialize new member.
5785
de0d863e
DB
57862015-05-12 Don Breazeal <donb@codesourcery.com>
5787
5788 * linux-low.c (handle_extended_wait): Implement return value,
5789 rename argument 'event_child' to 'event_lwp', handle
5790 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5791 (linux_low_ptrace_options): New function.
5792 (linux_low_filter_event): Call linux_low_ptrace_options,
5793 use different argument fo linux_enable_event_reporting,
5794 use return value from handle_extended_wait.
5795 (extended_event_reported): New function.
5796 (linux_wait_1): Call extended_event_reported and set
5797 status to report fork events.
5798 (linux_write_memory): Add pid to debug message.
5799 (reset_lwp_ptrace_options_callback): New function.
5800 (linux_handle_new_gdb_connection): New function.
5801 (linux_target_ops): Initialize new structure member.
5802 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5803 * lynx-low.c: Initialize new structure member.
5804 * remote-utils.c (prepare_resume_reply): Implement stop reason
5805 "fork" for "T" stop message.
5806 * server.c (handle_query): Call handle_new_gdb_connection.
5807 * server.h (report_fork_events): Declare global flag.
5808 * target.h (struct target_ops) <handle_new_gdb_connection>:
5809 New member.
5810 (target_handle_new_gdb_connection): New macro.
5811 * win32-low.c: Initialize new structure member.
5812
ddcbc397
DB
58132015-05-12 Don Breazeal <donb@codesourcery.com>
5814
5815 * mem-break.c (APPEND_TO_LIST): Define macro.
5816 (clone_agent_expr): New function.
5817 (clone_one_breakpoint): New function.
5818 (clone_all_breakpoints): New function.
5819 * mem-break.h: Declare new functions.
5820
89245bc0
DB
58212015-05-12 Don Breazeal <donb@codesourcery.com>
5822
5823 * linux-low.c (linux_supports_fork_events): New function.
5824 (linux_supports_vfork_events): New function.
5825 (linux_target_ops): Initialize new structure members.
5826 (initialize_low): Call linux_check_ptrace_features.
5827 * lynx-low.c (lynx_target_ops): Initialize new structure
5828 members.
5829 * server.c (report_fork_events, report_vfork_events):
5830 New global flags.
5831 (handle_query): Add new features to qSupported packet and
5832 response.
5833 (captured_main): Initialize new global variables.
5834 * target.h (struct target_ops) <supports_fork_events>:
5835 New member.
5836 <supports_vfork_events>: New member.
5837 (target_supports_fork_events): New macro.
5838 (target_supports_vfork_events): New macro.
5839 * win32-low.c (win32_target_ops): Initialize new structure
5840 members.
5841
835205d0
GB
58422015-05-12 Gary Benson <gbenson@redhat.com>
5843
5844 * server.c (handle_qxfer_exec_file): Use current process
5845 if annex is empty.
5846
21e94bd9
SL
58472015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5848
5849 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5850 Remove HAVE_PTRACE_GETREGS conditionals.
5851 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5852 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5853
45614f15
YQ
58542015-05-08 Yao Qi <yao.qi@linaro.org>
5855
5856 * linux-low.c (linux_supports_conditional_breakpoints): New
5857 function.
5858 (linux_target_ops): Install new target method.
5859 * lynx-low.c (lynx_target_ops): Install NULL hook for
5860 supports_conditional_breakpoints.
5861 * nto-low.c (nto_target_ops): Likewise.
5862 * spu-low.c (spu_target_ops): Likewise.
5863 * win32-low.c (win32_target_ops): Likewise.
5864 * server.c (handle_query): Check
5865 target_supports_conditional_breakpoints.
5866 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5867 New field.
5868 (target_supports_conditional_breakpoints): New macro.
5869
80ad801e
PA
58702015-05-06 Pedro Alves <palves@redhat.com>
5871
5872 PR server/18081
5873 * server.c (start_inferior): If the process exits, mourn it.
5874
819843c7
GB
58752015-04-21 Gary Benson <gbenson@redhat.com>
5876
5877 * hostio.c (fileio_open_flags_to_host): Factored out to
5878 fileio_to_host_openflags in common/fileio.c. Single use
5879 updated.
5880
a2d5a9d7
MF
58812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5882
5883 * linux-xtensa-low.c (xtensa_fill_gregset)
5884 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5885 XCHAL_HAVE_LOOP.
5886
deb44829
MF
58872015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5888
5889 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5890 (regs_info): Replace usrregs pointer with NULL.
5891
e57f1de3
GB
58922015-04-17 Gary Benson <gbenson@redhat.com>
5893
5894 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5895 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5896 * server.c (handle_qxfer_exec_file): New function.
5897 (qxfer_packets): Add exec-file entry.
5898 (handle_query): Report qXfer:exec-file:read as supported packet.
5899
62828379
RN
59002015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5901
5902 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5903
b88bb450
GB
59042015-04-09 Gary Benson <gbenson@redhat.com>
5905
5906 * hostio-errno.c (errno_to_fileio_error): Remove function.
5907 Update caller to use remote_fileio_to_fio_error.
5908
c8f4bfdd
YQ
59092015-04-09 Yao Qi <yao.qi@linaro.org>
5910
5911 * linux-low.c (linux_insert_point): Call
5912 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5913 (linux_remove_point): Call remove_memory_breakpoint if type is
5914 raw_bkpt_type_sw.
5915 * linux-x86-low.c (x86_insert_point): Don't call
5916 insert_memory_breakpoint.
5917 (x86_remove_point): Don't call remove_memory_breakpoint.
5918
41f98f02
PA
59192015-04-01 Pedro Alves <palves@redhat.com>
5920 Cleber Rosa <crosa@redhat.com>
5921
5922 * server.c (gdbserver_usage): Reorganize and extend the usage
5923 message.
5924
2bf6fb9d
PA
59252015-03-24 Pedro Alves <palves@redhat.com>
5926
5927 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5928 output. Also dump TRAP_TRACE.
5929 (linux_low_filter_event): In debug output, distinguish a
5930 resume_stop SIGSTOP from a delayed SIGSTOP.
5931
369f6daa
GB
59322015-03-24 Gary Benson <gbenson@redhat.com>
5933
5934 * linux-x86-low.c (x86_linux_new_thread): Moved to
5935 nat/x86-linux.c.
5936 (x86_linux_prepare_to_resume): Likewise.
5937
8e5d4070
GB
59382015-03-24 Gary Benson <gbenson@redhat.com>
5939
5940 * Makefile.in (x86-linux-dregs.o): New rule.
5941 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5942 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5943 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5944 (x86_linux_dr_get): Likewise.
5945 (x86_linux_dr_set): Likewise.
5946 (update_debug_registers_callback): Likewise.
5947 (x86_linux_dr_set_addr): Likewise.
5948 (x86_linux_dr_get_addr): Likewise.
5949 (x86_linux_dr_set_control): Likewise.
5950 (x86_linux_dr_get_control): Likewise.
5951 (x86_linux_dr_get_status): Likewise.
5952 (x86_linux_update_debug_registers): Likewise.
5953
2b95d440
GB
59542015-03-24 Gary Benson <gbenson@redhat.com>
5955
5956 * linux-x86-low.c (x86_linux_update_debug_registers):
5957 New function, factored out from...
5958 (x86_linux_prepare_to_resume): ...this.
5959
14b0bc68
GB
59602015-03-24 Gary Benson <gbenson@redhat.com>
5961
5962 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5963 (x86_linux_dr_set): Likewise.
5964 (update_debug_registers_callback): Likewise.
5965 (x86_linux_dr_set_addr): Likewise.
5966 (x86_linux_dr_get_addr): Likewise.
5967 (x86_linux_dr_set_control): Likewise.
5968 (x86_linux_dr_get_control): Likewise.
5969 (x86_linux_dr_get_status): Likewise.
5970 (x86_linux_prepare_to_resume): Likewise.
5971
5dfe6ca8
GB
59722015-03-24 Gary Benson <gbenson@redhat.com>
5973
5974 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5975 Use perror_with_name. Pass string through gettext.
5976 (x86_linux_dr_set): Likewise.
5977
d33472ad
GB
59782015-03-24 Gary Benson <gbenson@redhat.com>
5979
5980 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5981 (x86_linux_dr_set_addr): ...this.
5982 (x86_dr_low_get_addr): Rename to...
5983 (x86_linux_dr_get_addr): ...this.
5984 (x86_dr_low_set_control): Rename to...
5985 (x86_linux_dr_set_control): ...this.
5986 (x86_dr_low_get_control): Rename to...
5987 (x86_linux_dr_get_control): ...this.
5988 (x86_dr_low_get_status): Rename to...
5989 (x86_linux_dr_get_status): ...this.
5990 (x86_dr_low): Update with new function names.
5991
4b134ca1
GB
59922015-03-24 Gary Benson <gbenson@redhat.com>
5993
5994 * Makefile.in (x86-linux.o): New rule.
5995 * configure.srv: Add x86-linux.o to relevant targets.
5996 * linux-low.c (lwp_set_arch_private_info): New function.
5997 (lwp_arch_private_info): Likewise.
5998 * linux-x86-low.c: Include nat/x86-linux.h.
5999 (arch_lwp_info): Removed structure.
6000 (update_debug_registers_callback):
6001 Use lwp_set_debug_registers_changed.
6002 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6003 and lwp_set_debug_registers_changed.
6004 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6005
34c703da
GB
60062015-03-24 Gary Benson <gbenson@redhat.com>
6007
6008 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6009 * linux-arm-low.c (arm_new_thread): Likewise.
6010 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6011 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6012 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6013 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6014
cff068da
GB
60152015-03-24 Gary Benson <gbenson@redhat.com>
6016
6017 * linux-low.c (ptid_of_lwp): New function.
6018 (lwp_is_stopped): Likewise.
6019 (lwp_stop_reason): Likewise.
6020 * linux-x86-low.c (update_debug_registers_callback):
6021 Use lwp_is_stopped.
6022 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6023 lwp_stop_reason.
6024
b2f7c7e8
GB
60252015-03-24 Gary Benson <gbenson@redhat.com>
6026
6027 * linux-low.h (linux_stop_lwp): Remove declaration.
6028
6d4ee8c6
GB
60292015-03-24 Gary Benson <gbenson@redhat.com>
6030
6031 * linux-low.h: Include nat/linux-nat.h.
6032 * linux-low.c (iterate_over_lwps_args): New structure.
6033 (iterate_over_lwps_filter): New function.
6034 (iterate_over_lwps): Likewise.
6035 * linux-x86-low.c (update_debug_registers_callback):
6036 Update signature to what iterate_over_lwps expects.
6037 Remove PID check that iterate_over_lwps now performs.
6038 (x86_dr_low_set_addr): Use iterate_over_lwps.
6039 (x86_dr_low_set_control): Likewise.
6040
70a0bb6b
GB
60412015-03-24 Gary Benson <gbenson@redhat.com>
6042
6043 * linux-x86-low.c (x86_debug_reg_state): New function.
6044 (x86_linux_prepare_to_resume): Use the above.
6045
7b669087
GB
60462015-03-24 Gary Benson <gbenson@redhat.com>
6047
6048 * linux-low.c (current_lwp_ptid): New function.
6049 * linux-x86-low.c: Include nat/linux-nat.h.
6050 (x86_dr_low_get_addr): Use current_lwp_ptid.
6051 (x86_dr_low_get_control): Likewise.
6052 (x86_dr_low_get_status): Likewise.
6053
eef49a3d
PA
60542015-03-20 Pedro Alves <palves@redhat.com>
6055
6056 * tracepoint.c (cmd_qtstatus): Make "str" const.
6057
b2333d22
PA
60582015-03-20 Pedro Alves <palves@redhat.com>
6059
6060 * server.c (handle_general_set): Make "req_str" const.
6061
23f238d3
PA
60622015-03-19 Pedro Alves <palves@redhat.com>
6063
6064 * linux-low.c (linux_resume_one_lwp): Rename to ...
6065 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6066 instead call perror_with_name.
6067 (check_ptrace_stopped_lwp_gone): New function.
6068 (linux_resume_one_lwp): Reimplement as wrapper around
6069 linux_resume_one_lwp_throw that swallows errors if the LWP is
6070 gone.
6071
91baf43f
PA
60722015-03-19 Pedro Alves <palves@redhat.com>
6073
6074 * linux-low.c (count_events_callback, select_event_lwp_callback):
6075 No longer check whether the thread has resume_stop as last resume
6076 kind.
6077
8bf3b159
PA
60782015-03-19 Pedro Alves <palves@redhat.com>
6079
6080 * linux-low.c (count_events_callback, select_event_lwp_callback):
6081 Use the lwp's status_pending_p field, not the thread's.
6082
b90fc188
PA
60832015-03-19 Pedro Alves <palves@redhat.com>
6084
6085 * linux-low.c (select_event_lwp_callback): Update comments to
6086 no longer mention SIGTRAP.
6087
464b0089
GB
60882015-03-18 Gary Benson <gbenson@redhat.com>
6089
6090 * server.c (handle_query): Do not report vFile:fstat as supported.
6091
aa9e327f
GB
60922015-03-11 Gary Benson <gbenson@redhat.com>
6093
6094 * hostio.c (sys/types.h): New include.
6095 (sys/stat.h): Likewise.
6096 (common-remote-fileio.h): Likewise.
6097 (handle_fstat): New function.
6098 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6099
791c0056
GB
61002015-03-11 Gary Benson <gbenson@redhat.com>
6101
6102 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6103 struct stat.st_blocks and struct stat.st_blksize.
6104 * configure: Regenerate.
6105 * config.in: Likewise.
6106 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6107 (OBS): Add common-remote-fileio.o.
6108 (common-remote-fileio.o): New rule.
6109
9a9df970
PA
61102015-03-09 Pedro Alves <palves@redhat.com>
6111
6112 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6113 'struct sockaddr' pointer in 'accept' call.
6114
9eb1356e
PA
61152015-03-09 Pedro Alves <palves@redhat.com>
6116
6117 Revert:
6118 2015-03-07 Pedro Alves <palves@redhat.com>
6119 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6120 or <winsock2.h> here. Instead include "gdb_socket.h".
6121 (remote_open): Use union gdb_sockaddr_u.
6122 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6123 or <winsock2.h> here. Instead include "gdb_socket.h".
6124 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6125 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6126 or <sys/un.h>.
6127 (init_named_socket, gdb_agent_helper_thread): Use union
6128 gdb_sockaddr_u.
6129
aac331e4
PA
61302015-03-07 Pedro Alves <palves@redhat.com>
6131
6132 * configure.ac (build_warnings): Move
6133 -Wdeclaration-after-statement to the C-specific set.
6134 * configure: Regenerate.
6135
366c75fc
PA
61362015-03-07 Pedro Alves <palves@redhat.com>
6137
6138 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6139 or <winsock2.h> here. Instead include "gdb_socket.h".
6140 (remote_open): Use union gdb_sockaddr_u.
6141 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6142 or <winsock2.h> here. Instead include "gdb_socket.h".
6143 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6144 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6145 or <sys/un.h>.
6146 (init_named_socket, gdb_agent_helper_thread): Use union
6147 gdb_sockaddr_u.
6148
492d29ea
PA
61492015-03-07 Pedro Alves <palves@redhat.com>
6150
6151 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6152 instead.
6153
60a191ed
YQ
61542015-03-06 Yao Qi <yao.qi@linaro.org>
6155
6156 * linux-aarch64-low.c (aarch64_insert_point): Use
6157 show_debug_regs as a boolean.
6158 (aarch64_remove_point): Likewise.
6159
f5771b1d
PA
61602015-03-05 Pedro Alves <palves@redhat.com>
6161
6162 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6163 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6164 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6165 * nto-low.c (nto_target_ops): Likewise.
6166 * spu-low.c (spu_target_ops): Likewise.
6167 * win32-low.c (win32_target_ops): Likewise.
6168
3e572f71
PA
61692015-03-04 Pedro Alves <palves@redhat.com>
6170
72f4393d 6171 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6172 Decide whether a breakpoint triggered based on the SIGTRAP's
6173 siginfo.si_code.
72f4393d
L
6174 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6175 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6176 (linux_low_filter_event): Check for breakpoints before checking
6177 watchpoints.
6178 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6179 siginfo.si_code.
72f4393d
L
6180 (linux_stopped_by_sw_breakpoint)
6181 (linux_supports_stopped_by_sw_breakpoint)
6182 (linux_stopped_by_hw_breakpoint)
6183 (linux_supports_stopped_by_hw_breakpoint): New functions.
6184 (linux_target_ops): Install new target methods.
3e572f71 6185
1ec68e26
PA
61862015-03-04 Pedro Alves <palves@redhat.com>
6187
6188 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6189 * server.c (swbreak_feature, hwbreak_feature): New globals.
6190 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6191 (captured_main): Clear swbreak_feature and hwbreak_feature.
6192 * server.h (swbreak_feature, hwbreak_feature): Declare.
6193 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6194 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6195 supports_stopped_by_hw_breakpoint>: New fields.
6196 (target_supports_stopped_by_sw_breakpoint)
6197 (target_stopped_by_sw_breakpoint)
6198 (target_supports_stopped_by_hw_breakpoint)
6199 (target_stopped_by_hw_breakpoint): Declare.
6200
15c66dd6
PA
62012015-03-04 Pedro Alves <palves@redhat.com>
6202
6203 enum lwp_stop_reason -> enum target_stop_reason
6204 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6205 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6206 (linux_wait_1, stuck_in_jump_pad_callback)
6207 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6208 (linux_stopped_by_watchpoint):
6209 * linux-low.h (enum lwp_stop_reason): Delete.
6210 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6211 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6212
98fc70d6
YQ
62132015-03-04 Yao Qi <yao.qi@linaro.org>
6214
6215 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6216
dd2ac174
GB
62172015-03-03 Gary Benson <gbenson@redhat.com>
6218
6219 * hostio.c (handle_vFile): Fix prefix lengths.
6220
d68e53f4
MM
62212015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6222
6223 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6224 ptr_bits.
6225
bf2d68ab
AA
62262015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6227
6228 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6229 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6230 (clean): Add "rm -f" for above C files.
6231 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6232 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6233 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6234 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6235 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6236 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6237 (init_registers_s390x_vx_linux64)
6238 (init_registers_s390x_tevx_linux64)
6239 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6240 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6241 declarations.
6242 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6243 (s390_store_vxrs_high): New functions.
6244 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6245 NT_S390_VXRS_HIGH.
6246 (s390_arch_setup): Add logic for selecting one of the new target
6247 descriptions. Activate the new vector regsets if applicable.
6248 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6249 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6250 and init_registers_s390x_tevx_linux64.
6251
c966a859
PA
62522015-03-01 Pedro Alves <palves@redhat.com>
6253
6254 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6255 parameter.
6256
4180215b
PA
62572015-02-27 Pedro Alves <palves@redhat.com>
6258
6259 * linux-x86-low.c (u_debugreg_offset): New function.
6260 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6261
749bab01
PA
62622015-02-27 Pedro Alves <palves@redhat.com>
6263
6264 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6265 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6266 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6267 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6268 (ps_lsetfpregs, ps_getpid)
6269 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6270 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6271 (ps_lsetxregs, ps_plog): Declare.
6272
3c14e5a3
PA
62732015-02-27 Pedro Alves <palves@redhat.com>
6274
6275 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6276 IP_AGENT_EXPORT_FUNC.
6277 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6278 IP_AGENT_EXPORT_FUNC.
6279 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6280 (IP_AGENT_EXPORT): Delete.
6281 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6282 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6283 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6284 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6285 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6286 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6287 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6288 (traceframe_read_count, traceframe_write_count)
6289 (traceframes_created, trace_state_variables, get_raw_reg)
6290 (get_trace_state_variable_value, set_trace_state_variable_value)
6291 (ust_loaded, helper_thread_id, cmd_buf): Use
6292 IPA_SYM_EXPORTED_NAME.
6293 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6294 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6295 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6296 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6297 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6298 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6299 EXTERN_C_PUSH/EXTERN_C_POP.
6300 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6301 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6302 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6303 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6304 (traceframe_write_count, traceframe_read_count)
6305 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6306 (about_to_request_buffer_space, get_trace_state_variable_value)
6307 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6308 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6309 EXTERN_C_PUSH/EXTERN_C_POP.
6310 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6311 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6312 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6313 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6314 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6315 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6316 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6317 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6318 Define.
6319 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6320 (IP_AGENT_EXPORT_VAR_DECL): Define.
6321 (tracing): Declare.
6322 (gdb_agent_get_raw_reg): Declare.
6323
fe978cb0
PA
63242015-02-27 Tom Tromey <tromey@redhat.com>
6325 Pedro Alves <palves@redhat.com>
6326
6327 Rename symbols whose names are reserved C++ keywords throughout.
6328
3bc3d82a
PA
63292015-02-27 Pedro Alves <palves@redhat.com>
6330
6331 * Makefile.in (COMPILER): New, get it from autoconf.
6332 (CXX): Get from autoconf instead.
6333 (COMPILE.pre): Use COMPILER.
6334 (CC-LD): Rename to ...
6335 (CC_LD): ... this. Use COMPILER.
6336 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6337 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6338 * acinclude.m4: Include build-with-cxx.m4.
6339 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6340 Disable -Werror by default if building in C++ mode.
6341 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6342 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6343 the C++ compiler. Save/restore CXXFLAGS too.
6344 * configure: Regenerate.
6345
07697489
PA
63462015-02-27 Pedro Alves <palves@redhat.com>
6347
6348 * acinclude.m4: Include libiberty.m4.
6349 * configure.ac: Call libiberty_INIT.
6350 * config.in, configure: Regenerate.
6351
9beb7c4e
PA
63522015-02-26 Pedro Alves <palves@redhat.com>
6353
6354 * linux-low.c (linux_wait_1): When incrementing the PC past a
6355 program breakpoint always use the_low_target.breakpoint_len as
6356 increment, rather than the maximum between that and
6357 the_low_target.decr_pc_after_break.
6358
8090aef2
PA
63592015-02-23 Pedro Alves <palves@redhat.com>
6360
6361 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6362 thread was doing a step-over; always adjust the PC if
6363 we stepped over a permanent breakpoint.
6364 (linux_wait_1): If we stepped over breakpoint that was on top of a
6365 permanent breakpoint, manually advance the PC past it.
6366
bc9540e8
PA
63672015-02-23 Pedro Alves <palves@redhat.com>
6368
6369 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6370 modes.
6371 (x86_fill_gregset, x86_store_gregset): Use it when handling
6372 $orig_eax.
6373
2db9a427
PA
63742015-02-20 Pedro Alves <palves@redhat.com>
6375
6376 * thread-db.c: Include "nat/linux-procfs.h".
6377 (thread_db_init): Skip listing new threads if the kernel supports
6378 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6379
afa8d396
PA
63802015-02-20 Pedro Alves <palves@redhat.com>
6381
6382 * linux-low.c (status_pending_p_callback): Use ptid_match.
6383
c9587f88
AT
63842015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6385
6386 PR breakpoints/16812
6387 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6388 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6389 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6390
b05ec7a5
AT
63912015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6392
6393 PR breakpoints/15956
6394 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6395
d33501a5
MM
63962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6397
6398 * linux-low.c (linux_low_btrace_conf): Print size.
6399 * server.c (handle_btrace_conf_general_set): New.
6400 (hanle_general_set): Call handle_btrace_conf_general_set.
6401 (handle_query): Report Qbtrace-conf:bts:size as supported.
6402
f4abbc16
MM
64032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6404
6405 * linux-low.c (linux_low_enable_btrace): Update parameters.
6406 (linux_low_btrace_conf): New.
6407 (linux_target_ops)<to_btrace_conf>: Initialize.
6408 * server.c (current_btrace_conf): New.
6409 (handle_btrace_enable): Rename to ...
6410 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6411 to target_enable_btrace. Update comment. Update users.
6412 (handle_qxfer_btrace_conf): New.
6413 (qxfer_packets): Add btrace-conf entry.
6414 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6415 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6416 (target_ops)<read_btrace_conf>: New.
6417 (target_enable_btrace): Update parameters.
6418 (target_read_btrace_conf): New.
6419
043c3577
MM
64202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6421
6422 * server.c (handle_btrace_general_set): Remove call to
6423 target_supports_btrace.
6424 (supported_btrace_packets): New.
6425 (handle_query): Call supported_btrace_packets.
6426 * target.h: include btrace-common.h.
6427 (btrace_target_info): Removed.
6428 (supports_btrace, target_supports_btrace): Update parameters.
6429
734b0e4b
MM
64302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6431
6432 * Makefile.in (SFILES): Add common/btrace-common.c.
6433 (OBS): Add common/btrace-common.o.
6434 (btrace-common.o): Add build rules.
6435 * linux-low: Include btrace-common.h.
6436 (linux_low_read_btrace): Use struct btrace_data. Call
6437 btrace_data_init and btrace_data_fini.
6438
d6c146e9
PA
64392015-02-06 Pedro Alves <palves@redhat.com>
6440
6441 * thread-db.c (find_new_threads_callback): Add debug output.
6442
20ba1ce6
PA
64432015-02-04 Pedro Alves <palves@redhat.com>
6444
6445 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6446 (resume_stopped_resumed_lwps): New function.
6447 (linux_wait_for_event_filtered): Use it.
6448
8cc73a39
SDJ
64492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6450
6451 * Makefile.in (SFILES): Add linux-personality.c.
6452 (linux-personality.o): New rule.
6453 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6454 list of objects to be built.
6455 * linux-low.c: Include nat/linux-personality.h.
6456 (linux_create_inferior): Remove code to disable address space
6457 randomization (moved to ../nat/linux-personality.c). Create
6458 cleanup to disable address space randomization.
6459
fb23d554
SDJ
64602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6461
6462 * Makefile.in (posix-strerror.o): New rule.
6463 (mingw-strerror.o): Likewise.
6464 * configure: Regenerated.
6465 * configure.ac: Source file ../common/common.host. Initialize new
6466 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6467
cdf43629
YQ
64682015-01-14 Yao Qi <yao@codesourcery.com>
6469
6470 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6471 (ppc-linux.o): New rule.
6472 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6473 * configure.ac: AC_CHECK_FUNCS(getauxval).
6474 * config.in: Re-generated.
6475 * configure: Re-generated.
6476 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6477 ppc64_64bit_inferior_p
6478
514c5338
YQ
64792015-01-14 Yao Qi <yao@codesourcery.com>
6480
6481 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6482 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6483 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6484 (PT_ORIG_R3, PT_TRAP): Likewise.
6485 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6486 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6487 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6488
3368c1e5
JB
64892015-01-10 Joel Brobecker <brobecker@adacore.com>
6490
6491 * i387-fp.c (i387_cache_to_xsave): In look over
6492 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6493 zmmh_low_space field by use of zmmh_high_space.
6494
582511be
PA
64952015-01-09 Pedro Alves <palves@redhat.com>
6496
6497 * linux-low.c (step_over_bkpt): Move higher up in the file.
6498 (handle_extended_wait): Don't store the stop_pc here.
6499 (get_stop_pc): Adjust comments and rename to ...
6500 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6501 stopped for a software breakpoint or hardware breakpoint.
6502 (thread_still_has_status_pending_p): New function.
6503 (status_pending_p_callback): Use
6504 thread_still_has_status_pending_p. If the event is no longer
6505 interesting, resume the LWP.
6506 (handle_tracepoints): Add assert.
6507 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6508 (wstatus_maybe_breakpoint): New function.
6509 (cancel_breakpoint): Delete function.
6510 (check_stopped_by_watchpoint): New function, factored out from
6511 linux_low_filter_event.
6512 (lp_status_maybe_breakpoint): Delete function.
6513 (linux_low_filter_event): Remove filter_ptid argument.
6514 Leave thread group exits pending here. Store the LWP's stop PC.
6515 Always leave events pending.
6516 (linux_wait_for_event_filtered): Pull all events out of the
6517 kernel, and leave them all pending.
6518 (count_events_callback, select_event_lwp_callback): Consider all
6519 events.
6520 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6521 (select_event_lwp): Only give preference to the stepping LWP in
6522 all-stop mode. Adjust comments.
6523 (ignore_event): New function.
6524 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6525 references to cancel_breakpoints. Adjust to renames. Also give
6526 equal priority to all LWPs that have had events in non-stop mode.
6527 If reporting a software breakpoint event, unadjust the LWP's PC.
6528 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6529 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6530 Adjust.
6531 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6532 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6533 (linux_stopped_by_watchpoint): Adjust.
6534 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6535 * linux-low.h (enum lwp_stop_reason): New.
6536 (struct lwp_info) <stop_pc>: Adjust comment.
6537 <stopped_by_watchpoint>: Delete field.
6538 <stop_reason>: New field.
6539 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6540 * mem-break.c (software_breakpoint_inserted_here)
6541 (hardware_breakpoint_inserted_here): New function.
6542 * mem-break.h (software_breakpoint_inserted_here)
6543 (hardware_breakpoint_inserted_here): Declare.
6544 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6545 (cancel_breakpoints): Delete.
6546 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6547 (upload_fast_traceframes): Remove references to
6548 cancel_breakpoints.
6549
a33e3959
PA
65502015-01-09 Pedro Alves <palves@redhat.com>
6551
6552 * thread-db.c (find_new_threads_callback): Ignore thread if the
6553 kernel thread ID is -1.
6554
8784d563
PA
65552015-01-09 Pedro Alves <palves@redhat.com>
6556
6557 * linux-low.c (linux_attach_fail_reason_string): Move to
6558 nat/linux-ptrace.c, and rename.
6559 (linux_attach_lwp): Update comment.
6560 (attach_proc_task_lwp_callback): New function.
6561 (linux_attach): Adjust to rename and use
6562 linux_proc_attach_tgid_threads.
6563 (linux_attach_fail_reason_string): Delete declaration.
6564
76f2b779
JB
65652015-01-01 Joel Brobecker <brobecker@adacore.com>
6566
6567 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6568 * server.c (gdbserver_version): Likewise.
6569
fafcc06a
SDJ
65702014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6571
6572 * remote-utils.c: Include ctype.h.
6573 (input_interrupt): Explicitly handle the case when the char
6574 received is the NUL byte. Improve the printing of non-ASCII
6575 characters.
6576
beed38b8
JB
65772014-12-16 Joel Brobecker <brobecker@adacore.com>
6578
6579 * linux-low.c (linux_low_filter_event): Update call to
6580 linux_enable_event_reporting following the addition of
6581 a new parameter to that function.
6582
bf330350
CU
65832014-12-16 Catalin Udma <catalin.udma@freescale.com>
6584
6585 PR server/17457
6586 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6587 (AARCH64_FPCR_REGNO): Likewise.
6588 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6589 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6590 (aarch64_store_fpregset): Likewise.
6591
5227d625
JB
65922014-12-15 Joel Brobecker <brobecker@adacore.com>
6593
6594 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6595 Remove FIXME comment about assumption about N.
6596
f93b65a0
JB
65972014-12-13 Joel Brobecker <brobecker@adacore.com>
6598
6599 * configure.ac: If large-file support is disabled in GDBserver,
6600 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6601 * configure: Regenerate.
6602
e5a9158d
AA
66032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6604
6605 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6606 warning upon ENODATA from ptrace.
6607 * linux-s390-low.c (s390_store_tdb): New.
6608 (s390_regsets): Add regset for NT_S390_TDB.
6609
feea5f36
AA
66102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6611
6612 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6613 without a fill_function.
6614 * linux-s390-low.c (s390_fill_last_break): Remove.
6615 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6616 (s390_arch_setup): Use regset's size instead of fill_function for
6617 loop end condition.
6618
098dbe61
AA
66192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6620
6621 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6622 the regset's store function when ptrace returned an error.
6623 * regcache.c (get_thread_regcache): Invalidate register cache
6624 before fetching inferior's registers.
6625
28eef672
AA
66262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6627
6628 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6629 while-loop as for-loop.
6630 (regsets_store_inferior_registers): Likewise.
6631
bdca27a2
YQ
66322014-11-28 Yao Qi <yao@codesourcery.com>
6633
6634 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6635 * config.in, configure: Re-generate.
6636 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6637 is defined.
6638
9c232dda
YQ
66392014-11-21 Yao Qi <yao@codesourcery.com>
6640
6641 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6642 (AC_CHECK_HEADERS): Remove malloc.h.
6643 * configure: Re-generated.
6644 * config.in: Re-generated.
6645 * server.h: Don't include alloca.h and malloc.h.
6646 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6647 Don't include malloc.h.
6648
43968415
JB
66492014-11-17 Joel Brobecker <brobecker@adacore.com>
6650
6651 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6652 corresponding ERRNO check in same block.
6653
40e91bc7
PA
66542014-11-12 Pedro Alves <palves@redhat.com>
6655
6656 * server.c (cont_thread): Update comment.
6657 (start_inferior, attach_inferior): No longer clear cont_thread.
6658 (handle_v_cont): No longer set cont_thread.
6659 (captured_main): Clear cont_thread each time a GDB connects.
6660
c2c118cf
PA
66612014-11-12 Pedro Alves <palves@redhat.com>
6662
6663 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6664 thread, and don't resume all threads if the Hc thread has exited.
6665
78708b7c
PA
66662014-11-12 Pedro Alves <palves@redhat.com>
6667
6668 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6669 the process group instead of to a specific LWP.
6670
a2abc7de
PA
66712014-10-15 Pedro Alves <palves@redhat.com>
6672
6673 PR server/17487
6674 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6675 parameter.
6676 (arm_set_thread_context): Delete.
6677 (the_low_target): Adjust.
6678 * win32-i386-low.c (debug_registers_changed)
6679 (debug_registers_used): Delete.
6680 (update_debug_registers_callback): New function.
6681 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6682 needing to update their debug registers.
6683 (win32_get_current_dr): New function.
6684 (x86_dr_low_get_addr, x86_dr_low_get_control)
6685 (x86_dr_low_get_status): Fetch the debug register from the thread
6686 record's context.
6687 (i386_initial_stuff): Adjust.
6688 (i386_get_thread_context): Remove current_event parameter. Don't
6689 clear debug_registers_changed nor copy DR values to
6690 debug_reg_state.
6691 (i386_set_thread_context): Delete.
6692 (i386_prepare_to_resume): New function.
6693 (i386_thread_added): Mark the thread as needing to update irs
6694 debug registers.
6695 (the_low_target): Remove i386_set_thread_context and install
6696 i386_prepare_to_resume.
6697 * win32-low.c (win32_get_thread_context): Adjust.
6698 (win32_set_thread_context): Use SetThreadContext
6699 directly.
6700 (win32_prepare_to_resume): New function.
6701 (win32_require_context): New function, factored out from ...
6702 (thread_rec): ... this.
6703 (continue_one_thread): Call win32_prepare_to_resume on each thread
6704 we're about to continue.
6705 (win32_resume): Call win32_prepare_to_resume on the event thread.
6706 * win32-low.h (struct win32_thread_info)
6707 <debug_registers_changed>: New field.
6708 (struct win32_target_ops): Change prototype of set_thread_context,
6709 delete set_thread_context and add prepare_to_resume.
6710 (win32_require_context): New declaration.
6711
a442d071
GB
67122014-10-08 Gary Benson <gbenson@redhat.com>
6713
6714 * server.h: Do not include common-exceptions.h.
6715
6f1947e8
GB
67162014-10-08 Gary Benson <gbenson@redhat.com>
6717
6718 * server.h: Do not include cleanups.h.
6719
63b434a4
JH
67202014-09-30 James Hogan <james.hogan@imgtec.com>
6721
6722 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6723 mips64-dsp-linux.c.
6724
c4d9ceb6
YQ
67252014-09-23 Yao Qi <yao@codesourcery.com>
6726
6727 * linux-low.c (lp_status_maybe_breakpoint): New function.
6728 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6729 (count_events_callback): Likewise.
6730 (select_event_lwp_callback): Likewise.
6731 (cancel_breakpoints_callback): Likewise.
6732
89a5711c
DB
67332014-09-19 Don Breazeal <donb@codesourcery.com>
6734
6735 * linux-low.c (handle_extended_wait): Call
6736 linux_ptrace_get_extended_event.
6737 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6738 linux_is_extended_waitstatus.
6739
bffc0964
JB
67402014-09-16 Joel Brobecker <brobecker@adacore.com>
6741
6742 * Makefile.in (CPPFLAGS): Define.
6743 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6744 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6745
0bfdf32f
GB
67462014-09-16 Gary Benson <gbenson@redhat.com>
6747
6748 * inferiors.h (current_inferior): Renamed as...
6749 (current_thread): New variable. All uses updated.
6750 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6751 (maybe_move_out_of_jump_pad): Likewise.
6752 (cancel_breakpoint): Likewise.
6753 (linux_low_filter_event): Likewise.
6754 (wait_for_sigstop): Likewise.
6755 (linux_resume_one_lwp): Likewise.
6756 (need_step_over_p): Likewise.
6757 (start_step_over): Likewise.
6758 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6759 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6760 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6761 and save_inferior as saved_thread.
6762 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6763 saved_thread.
6764 (regcache_invalidate_thread): Likewise.
6765 * remote-utils.c (prepare_resume_reply): Likewise.
6766 * thread-db.c (thread_db_get_tls_address): Likewise.
6767 (disable_thread_event_reporting): Likewise.
6768 (remove_thread_event_breakpoints): Likewise.
6769 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6770 as saved_thread.
6771 * target.h (set_desired_inferior): Renamed as...
6772 (set_desired_thread): New declaration. All uses updated.
6773 * server.c (myresume): Updated comment to reference thread instead
6774 of inferior.
6775 (handle_serial_event): Likewise.
6776 (handle_target_event): Likewise.
6777
361c8ade
GB
67782014-09-12 Tom Tromey <tromey@redhat.com>
6779 Gary Benson <gbenson@redhat.com>
6780
6781 * regcache.h: Include common-regcache.h.
6782 (regcache_read_pc): Don't declare.
6783 * regcache.c (get_thread_regcache_for_ptid): New function.
6784
bd9269f7
GB
67852014-09-11 Tom Tromey <tromey@redhat.com>
6786 Gary Benson <gbenson@redhat.com>
6787
6788 * symbol.c: New file.
6789 * Makefile.in (SFILES): Add symbol.c.
6790 (OBS): Add symbol.o.
6791
f8c1d06b
GB
67922014-09-11 Gary Benson <gbenson@redhat.com>
6793
6794 * target.c (target_stop_ptid, target_continue_ptid): New
6795 functions.
6796
721ec300
GB
67972014-09-11 Tom Tromey <tromey@redhat.com>
6798 Gary Benson <gbenson@redhat.com>
6799
6800 * target.h: Include target/target.h.
6801 * target.c (target_read_memory, target_read_uint32)
6802 (target_write_memory): New functions.
6803
c5e92cca
GB
68042014-09-11 Gary Benson <gbenson@redhat.com>
6805
6806 * server.h (debug_hw_points): Don't declare.
6807 * server.c (debug_hw_points): Don't define. Replace all uses
6808 with show_debug_regs.
6809 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6810 all uses with show_debug_regs.
6811
2e4bb98a
EBM
68122014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6813
6814 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6815 endianness into account.
6816 (ppc_supply_ptrace_register): Likewise.
6817
ac740bc7
JH
68182014-09-03 James Hogan <james.hogan@imgtec.com>
6819
6820 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6821 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6822
97ea6506
GB
68232014-09-03 Gary Benson <gbenson@redhat.com>
6824
6825 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6826 ALL_DEBUG_ADDRESS_REGISTERS.
6827
df7e5265
GB
68282014-09-02 Gary Benson <gbenson@redhat.com>
6829
6830 * i386-low.h: Renamed as...
6831 * x86-low.h: New file. All type, function and variable name
6832 prefixes changed from "i386_" to "x86_". All references updated.
6833 * i386-low.c: Renamed as...
6834 * x86-low.c: New file. All type, function and variable name
6835 prefixes changed from "i386_" to "x86_". All references updated.
6836
ed859da7
GB
68372014-09-02 Gary Benson <gbenson@redhat.com>
6838
6839 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6840 (x86_linux_new_thread): Likewise.
6841
860789c7
GB
68422014-08-29 Gary Benson <gbenson@redhat.com>
6843
6844 * server.h (setjmp.h): Do not include.
6845 (toplevel): Do not declare.
6846 (common-exceptions.h): Include.
6847 (cleanups.h): Likewise.
6848 * server.c (toplevel): Do not define.
6849 (exit_code): New static global.
6850 (detach_or_kill_for_exit_cleanup): New function.
6851 (main): New function. Original main renamed to...
6852 (captured_main): New function.
6853 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6854
ff55e1b5
GB
68552014-08-29 Gary Benson <gbenson@redhat.com>
6856
6857 * Makefile.in (SFILES): Add common/common-exceptions.c.
6858 (OBS): Add common-exceptions.o.
6859 (common-exceptions.o): New rule.
6860 * utils.c (prepare_to_throw_exception): New function.
6861
e9bcb658
GB
68622014-08-29 Gary Benson <gbenson@redhat.com>
6863
6864 * config.in: Regenerate.
6865 * configure: Likewise.
6866
e3180625
GB
68672014-08-29 Gary Benson <gbenson@redhat.com>
6868
6869 * Makefile.in (SFILES): Add common/cleanups.c.
6870 (OBS): cleanups.o.
6871 (cleanups.o): New rule.
6872
e3d6ba5d
GB
68732014-08-29 Gary Benson <gbenson@redhat.com>
6874
6875 * utils.c (internal_vwarning): New function.
6876
7096e886
GB
68772014-08-28 Gary Benson <gbenson@redhat.com>
6878
6879 * utils.h (fatal): Remove declaration.
6880 * utils.c (fatal): Remove function.
6881
14ce3192
GB
68822014-08-28 Gary Benson <gbenson@redhat.com>
6883
6884 * tracepoint.c (gdb_agent_init): Replace fatal with
6885 perror_with_name.
6886 (initialize_tracepoint): Likewise.
6887
50278d59
GB
68882014-08-28 Gary Benson <gbenson@redhat.com>
6889
6890 * remote-utils.c (remote_prepare): Replace fatal with error.
6891
aa96c426
GB
68922014-08-28 Gary Benson <gbenson@redhat.com>
6893
6894 * linux-low.c (linux_async): Replace fatal with warning.
6895 Tidy up and return.
6896 (linux_start_non_stop): Return -1 if linux_async failed.
6897
f7160e97
GB
68982014-08-28 Gary Benson <gbenson@redhat.com>
6899
6900 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6901 gdb_assert.
6902 (i386_dr_low_get_addr): Remove vague comment.
6903 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6904 gdb_assert.
6905
38e08fca
GB
69062014-08-28 Gary Benson <gbenson@redhat.com>
6907
6908 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6909 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6910 internal_error.
6911 (linux_resume_one_lwp): Likewise.
6912 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6913 gdb_assert.
6914 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6915 with internal_error.
6916 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6917 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6918 (find_register_by_name): Replace fatal with internal_error.
6919 (find_regno): Likewise.
6920 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6921 * thread-db.c (thread_db_create_event): Likewise.
6922 (thread_db_load_search): Likewise.
6923 (try_thread_db_load_1): Likewise.
6924 * tracepoint.c (get_jump_space_head): Replace fatal with
6925 internal_error.
6926 (claim_trampoline_space): Likewise.
6927 (have_fast_tracepoint_trampoline_buffer): Likewise.
6928 (cmd_qtstart): Likewise.
6929 (stop_tracing): Likewise.
6930 (fast_tracepoint_collecting): Likewise.
6931 (target_malloc): Likewise.
6932 (download_tracepoint): Likewise.
6933 (download_trace_state_variables): Replace check with gdb_assert.
6934 (upload_fast_traceframes): Replace fatal with internal_error.
6935
34abf635
GB
69362014-08-19 Tom Tromey <tromey@redhat.com>
6937 Gary Benson <gbenson@redhat.com>
6938
6939 * Makefile.in (SFILES): Add common/common-debug.c.
6940 (OBS): Add common-debug.o.
6941 (common-debug.o): New rule.
6942 * debug.h (debug_printf): Don't declare.
6943 * debug.c (debug_printf): Renamed and rewritten as...
6944 (debug_vprintf): New function.
6945
f6e94d78
GB
69462014-08-19 Gary Benson <gbenson@redhat.com>
6947
6948 * utils.h: Do not include print-utils.h.
6949
9239eeab
GB
69502014-08-19 Tom Tromey <tromey@redhat.com>
6951 Gary Benson <gbenson@redhat.com>
6952
6953 * server.h: Add static assertion.
6954 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6955
ef87c8bb
GB
69562014-08-19 Tom Tromey <tromey@redhat.com>
6957 Gary Benson <gbenson@redhat.com>
6958
6959 * Makefile.in (SFILES): Add common/errors.c.
6960 (OBS): Add errors.o.
6961 (IPA_OBS): Add errors-ipa.o.
6962 (errors.o): New rule.
6963 (errors-ipa.o): Likewise.
6964 * utils.h (perror_with_name, error, warning): Don't declare.
6965 * utils.c (warning): Renamed and rewritten as...
6966 (vwarning): New function.
6967 (error): Renamed and rewritten as...
6968 (verror): New function.
6969 (internal_error): Renamed and rewritten as...
6970 (internal_verror): New function.
6971
bb974a24
GB
69722014-08-07 Gary Benson <gbenson@redhat.com>
6973
6974 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6975 * configure: Regenerate.
6976 * config.in: Likewise.
6977 * server.h: Do not include errno.h.
6978 * event-loop.c: Likewise.
6979 * hostio-errno.c: Likewise.
6980 * linux-low.c: Likewise.
6981 * remote-utils.c: Likewise.
6982 * spu-low.c: Likewise.
6983 * utils.c: Likewise.
6984 * gdbreplay.c: Unconditionally include errno.h.
6985
6d3d12eb
GB
69862014-08-07 Gary Benson <gbenson@redhat.com>
6987
6988 * server.h: Do not include string.h.
6989 * event-loop.c: Likewise.
6990 * linux-low.c: Likewise.
6991 * regcache.c: Likewise.
6992 * remote-utils.c: Likewise.
6993 * spu-low.c: Likewise.
6994 * utils.c: Likewise.
6995
dccbb609
GB
69962014-08-07 Gary Benson <gbenson@redhat.com>
6997
6998 * server.h: Do not include gdb_assert.h.
6999
e76df0d0
GB
70002014-08-07 Gary Benson <gbenson@redhat.com>
7001
7002 * server.h: Do not include common-utils.h.
7003
4cb9c816
GB
70042014-08-07 Gary Benson <gbenson@redhat.com>
7005
7006 * server.h: Do not include ptid.h.
7007 * notif.h: Likewise.
7008
3995eeee
GB
70092014-08-07 Gary Benson <gbenson@redhat.com>
7010
7011 * server.h: Do not include gdb_locale.h.
7012
cb9f1a9b
GB
70132014-08-07 Gary Benson <gbenson@redhat.com>
7014
7015 * server.h: Do not include gdb/signals.h.
7016 * win32-low.c: Likewise.
7017
a5fceff8
GB
70182014-08-07 Gary Benson <gbenson@redhat.com>
7019
7020 * server.h: Do not include pathmax.h.
7021
b9391142
GB
70222014-08-07 Gary Benson <gbenson@redhat.com>
7023
7024 * server.h: Do not include libiberty.h.
7025 * linux-bfin-low.c: Likewise.
7026
0e443c87
GB
70272014-08-07 Gary Benson <gbenson@redhat.com>
7028
7029 * server.h: Do not include ansidecl.h.
7030
8ebb3f56
GB
70312014-08-07 Gary Benson <gbenson@redhat.com>
7032
7033 * linux-x86-low.c: Do not include stddef.h.
7034 * lynx-ppc-low.c: Likewise.
7035 * tracepoint.c: Likewise.
7036
8980bdf6
GB
70372014-08-07 Gary Benson <gbenson@redhat.com>
7038
7039 * server.h: Do not include stdarg.h.
7040 * nto-low.c: Likewise.
7041
d7096f71
GB
70422014-08-07 Gary Benson <gbenson@redhat.com>
7043
7044 * server.h: Do not include stdlib.h.
7045 * inferiors.c: Likewise.
7046 * linux-low.c: Likewise.
7047 * regcache.c: Likewise.
7048 * spu-low.c: Likewise.
7049 * tracepoint.c: Likewise.
7050 * utils.c: Likewise.
7051
d02f550d
GB
70522014-08-07 Gary Benson <gbenson@redhat.com>
7053
7054 * server.h: Do not include stdio.h.
7055 * linux-low.c: Likewise.
7056 * remote-utils.c: Likewise.
7057 * spu-low.c: Likewise.
7058 * utils.c: Likewise.
7059 * wincecompat.c: Likewise.
7060
87f6c4e3
GB
70612014-08-06 Gary Benson <gbenson@redhat.com>
7062
7063 * regcache.c (init_register_cache): Move conditionals inside if.
7064
7089dca4
GB
70652014-08-06 Gary Benson <gbenson@redhat.com>
7066
7067 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7068
462f517e
GB
70692014-07-31 Gary Benson <gbenson@redhat.com>
7070
7071 * ax.h: Do not include server.h.
7072 * gdbthread.h: Likewise.
7073 * lynx-low.h: Likewise.
7074 * notif.h: Likewise.
7075
976411d6
GB
70762014-07-30 Gary Benson <gbenson@redhat.com>
7077
7078 * server.h: Include common-defs.h.
7079 Do not include config.h or build-gnulib-gdbserver/config.h.
7080
d41f6d8e
GB
70812014-07-30 Gary Benson <gbenson@redhat.com>
7082
7083 * hostio-errno.c: Move server.h to top of includes list.
7084 * inferiors.c: Likewise.
7085 * linux-x86-low.c: Likewise.
7086 * notif.c: Include server.h.
7087
314c6a35
TT
70882014-07-24 Tom Tromey <tromey@redhat.com>
7089 Gary Benson <gbenson@redhat.com>
7090
7091 * server.h (CORE_ADDR): Now unsigned.
7092
69ff6be5
PA
70932014-07-16 Pedro Alves <palves@redhat.com>
7094
7095 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7096
ce9e3fe7
PA
70972014-07-15 Pedro Alves <palves@redhat.com>
7098
7099 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7100 copy.
7101
e76126e8
PA
71022014-07-11 Pedro Alves <palves@redhat.com>
7103
7104 * linux-low.c (kill_wait_lwp): New function, based on
7105 kill_one_lwp_callback, but use my_waitpid directly.
7106 (kill_one_lwp_callback, linux_kill): Use it.
7107
8e9db26e
PA
71082014-06-23 Pedro Alves <palves@redhat.com>
7109
7110 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7111 before setting DR0..DR3.
7112
698b3e08
GB
71132014-06-20 Gary Benson <gbenson@redhat.com>
7114
7115 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7116 * configure: Regenerated.
7117 * config.in: Likewise.
7118
125f8a3d
GB
71192014-06-20 Gary Benson <gbenson@redhat.com>
7120
7121 * Makefile.in (SFILES): Update locations for files moved
7122 from common to nat.
7123 (object file files): Reordered.
7124
42995dbd
GB
71252014-06-20 Gary Benson <gbenson@redhat.com>
7126
7127 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7128 (i386_dr_low_set_addr): Likewise.
7129 (i386_dr_low_get_addr): Likewise.
7130 (i386_dr_low_can_set_control): Likewise.
7131 (i386_dr_low_set_control): Likewise.
7132 (i386_dr_low_get_control): Likewise.
7133 (i386_dr_low_get_status): Likewise.
7134 (i386_get_debug_register_length): Likewise.
7135 * linux-x86-low.c (i386_dr_low_set_addr):
7136 Changed signature. Made static.
7137 (i386_dr_low_get_addr): Likewise.
7138 (i386_dr_low_set_control): Likewise.
7139 (i386_dr_low_get_control): Likewise.
7140 (i386_dr_low_get_status): Likewise.
7141 (i386_dr_low): New global variable.
7142 * win32-i386-low.c (i386_dr_low_set_addr):
7143 Changed signature. Made static.
7144 (i386_dr_low_get_addr): Likewise.
7145 (i386_dr_low_set_control): Likewise.
7146 (i386_dr_low_get_control): Likewise.
7147 (i386_dr_low_get_status): Likewise.
7148 (i386_dr_low): New global variable.
7149
e1d2394b
MS
71502014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7151
7152 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7153 * Makefile.in (AR, AR_FLAGS): Define.
7154 * configure: Regenerate.
7155
3a8ee006
GB
71562014-06-19 Gary Benson <gbenson@redhat.com>
7157
7158 * Makefile.in (i386-dregs.o): New rule.
7159 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7160 * i386-low.c (target.h): Remove include.
7161 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7162 (DR_CONTROL_SHIFT): Likewise.
7163 (DR_CONTROL_SIZE): Likewise.
7164 (DR_RW_EXECUTE): Likewise.
7165 (DR_RW_WRITE): Likewise.
7166 (DR_RW_READ): Likewise.
7167 (DR_RW_IORW): Likewise.
7168 (DR_LEN_1): Likewise.
7169 (DR_LEN_2): Likewise.
7170 (DR_LEN_4): Likewise.
7171 (DR_LEN_8): Likewise.
7172 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7173 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7174 (DR_ENABLE_SIZE): Likewise.
7175 (DR_LOCAL_SLOWDOWN): Likewise.
7176 (DR_GLOBAL_SLOWDOWN): Likewise.
7177 (DR_CONTROL_RESERVED): Likewise.
7178 (I386_DR_CONTROL_MASK): Likewise.
7179 (I386_DR_VACANT): Likewise.
7180 (I386_DR_LOCAL_ENABLE): Likewise.
7181 (I386_DR_GLOBAL_ENABLE): Likewise.
7182 (I386_DR_DISABLE): Likewise.
7183 (I386_DR_SET_RW_LEN): Likewise.
7184 (I386_DR_GET_RW_LEN): Likewise.
7185 (I386_DR_WATCH_HIT): Likewise.
7186 (i386_wp_op_t): Likewise.
7187 (i386_show_dr): Likewise.
7188 (i386_length_and_rw_bits): Likewise.
7189 (i386_insert_aligned_watchpoint): Likewise.
7190 (i386_remove_aligned_watchpoint): Likewise.
7191 (i386_handle_nonaligned_watchpoint): Likewise.
7192 i386_update_inferior_debug_regs(): Likewise.
7193 (i386_dr_insert_watchpoint): Likewise.
7194 (i386_dr_remove_watchpoint): Likewise.
7195 (i386_dr_region_ok_for_watchpoint): Likewise.
7196 (i386_dr_stopped_data_address): Likewise.
7197 (i386_dr_stopped_by_watchpoint): Likewise.
7198
8f26655c
GB
71992014-06-19 Gary Benson <gbenson@redhat.com>
7200
7201 * i386-low.c (i386_dr_show): Renamed to
7202 i386_show_dr and made static. All uses updated.
7203 (i386_dr_length_and_rw_bits): Renamed to
7204 i386_length_and_rw_bits and made static.
7205 All uses updated.
7206 (i386_dr_insert_aligned_watchpoint): Renamed to
7207 i386_insert_aligned_watchpoint and made static.
7208 All uses updated.
7209 (i386_dr_remove_aligned_watchpoint): Renamed to
7210 i386_remove_aligned_watchpoint and made static.
7211 All uses updated.
7212 (i386_dr_update_inferior_debug_regs): Renamed to
7213 i386_update_inferior_debug_regs and made static.
7214 All uses updated.
7215
b9228891
GB
72162014-06-18 Gary Benson <gbenson@redhat.com>
7217
5171def3
GB
7218 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7219 (i386_dr_low_can_set_control): Likewise.
7220 (i386_get_debug_register_length): Likewise.
7221 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7222 (i386_dr_low_can_set_control): Likewise.
7223 (i386_get_debug_register_length): Likewise.
7224
72252014-06-17 Gary Benson <gbenson@redhat.com>
7226
b9228891
GB
7227 * i386-low.h (i386-dregs.h): New include.
7228 (DR_FIRSTADDR): Now in i386-dregs.h.
7229 (DR_LASTADDR): Likewise.
7230 (DR_NADDR): Likewise.
7231 (DR_STATUS): Likewise.
7232 (DR_CONTROL): Likewise.
7233 (i386_debug_reg_state): Likewise.
7234 (i386_dr_insert_watchpoint): Likewise.
7235 (i386_dr_remove_watchpoint): Likewise.
7236 (i386_dr_region_ok_for_watchpoint): Likewise.
7237 (i386_dr_stopped_data_address): Likewise.
7238 (i386_dr_stopped_by_watchpoint): Likewise.
7239 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7240
4be83cc2
GB
72412014-06-18 Gary Benson <gbenson@redhat.com>
7242
7243 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7244 i386_dr_insert_watchpoint.
7245 (i386_low_remove_watchpoint): Renamed to
7246 i386_dr_remove_watchpoint.
7247 (i386_low_region_ok_for_watchpoint): Renamed to
7248 i386_dr_region_ok_for_watchpoint.
7249 (i386_low_stopped_data_address): Renamed to
7250 i386_dr_stopped_data_address.
7251 (i386_low_stopped_by_watchpoint): Renamed to
7252 i386_dr_stopped_by_watchpoint.
7253 * i386-low.c (i386_show_dr): Renamed to
7254 i386_dr_show and made nonstatic. All uses updated.
7255 (i386_length_and_rw_bits): Renamed to
7256 i386_dr_length_and_rw_bits and made nonstatic.
7257 All uses updated.
7258 (i386_insert_aligned_watchpoint): Renamed to
7259 i386_dr_insert_aligned_watchpoint and made nonstatic.
7260 All uses updated.
7261 (i386_remove_aligned_watchpoint): Renamed to
7262 i386_dr_remove_aligned_watchpoint and made nonstatic.
7263 All uses updated.
7264 (i386_update_inferior_debug_regs): Renamed to
7265 i386_dr_update_inferior_debug_regs and made nonstatic.
7266 All uses updated.
7267 (i386_low_insert_watchpoint): Renamed to
7268 i386_dr_insert_watchpoint. All uses updated.
7269 (i386_low_remove_watchpoint): Renamed to
7270 i386_dr_remove_watchpoint. All uses updated.
7271 (i386_low_region_ok_for_watchpoint): Renamed to
7272 i386_dr_region_ok_for_watchpoint. All uses updated.
7273 (i386_low_stopped_data_address): Renamed to
7274 i386_dr_stopped_data_address. All uses updated.
7275 (i386_low_stopped_by_watchpoint): Renamed to
7276 i386_dr_stopped_by_watchpoint. All uses updated.
7277
131aa0d4
GB
72782014-06-18 Gary Benson <gbenson@redhat.com>
7279
7280 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7281 (i386_dr_low_can_set_control): Likewise.
7282 (i386_insert_aligned_watchpoint): New check.
7283
d9305f7f
GB
72842014-06-18 Gary Benson <gbenson@redhat.com>
7285
7286 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7287 Renamed to state.
7288
e927c9fc
GB
72892014-06-18 Gary Benson <gbenson@redhat.com>
7290
7291 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7292 instead of fatal and error.
7293 (i386_handle_nonaligned_watchpoint): Likewise.
7294
1b6d4134
GB
72952014-06-18 Gary Benson <gbenson@redhat.com>
7296
7297 * i386-low.c (i386_get_debug_register_length): New macro.
7298 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7299 (i386_show_dr): Use debug_printf instead of fprintf. Use
7300 phex to format values.
7301
6e62758f
GB
73022014-06-18 Gary Benson <gbenson@redhat.com>
7303
7304 * i386-low.h: Comment changes.
7305 * i386-low.c: Likewise.
7306
fc6e2f03
GB
73072014-06-18 Gary Benson <gbenson@redhat.com>
7308
7309 * i386-low.c: Whitespace changes.
7310
f9d1eeed
TT
73112014-06-12 Tom Tromey <tromey@redhat.com>
7312
7313 * utils.c (freeargv): Remove.
7314
0b04e523
TT
73152014-06-12 Tom Tromey <tromey@redhat.com>
7316
7317 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7318 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7319 (parse_debug_format_options): Likewise.
7320 (gdbserver_usage): Likewise.
7321 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7322 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7323 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7324 against libiberty.
7325 ($(LIBGNU)): Depend on libiberty.
7326 (all-lib): Recurse into all subdirs.
7327 (install-only): Invoke "install" target in subdirs.
7328 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7329 targets.
7330 * configure: Rebuild.
7331 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7332 for vasprintf, vsnprintf, or gettimeofday.
7333 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7334 srv_tgtobj.
7335
270c9937
JB
73362014-06-05 Joel Brobecker <brobecker@adacore.com>
7337
7338 * development.sh: Delete.
7339 * Makefile.in (config.status): Adjust dependency on development.sh.
7340 * configure.ac: Adjust development.sh source call.
7341 * configure: Regenerate.
7342
0a261ed8
PA
73432014-06-02 Pedro Alves <palves@redhat.com>
7344
7345 * ax.c (gdb_free_agent_expr): New function.
7346 * ax.h (gdb_free_agent_expr): New declaration.
7347 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7348 list.
7349 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7350 static.
7351 (clear_breakpoint_conditions_and_commands): New function.
7352 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7353 (clear_breakpoint_conditions_and_commands): New declaration.
7354
e9dae05e
RR
73552014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7356
7357 * linux-aarch64-low.c (asm/ptrace.h): Include.
7358
5876f503
JK
73592014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7360
7361 Fix TLS access for -static -pthread.
7362 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7363 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7364 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7365
802e8e6d
PA
73662014-05-20 Pedro Alves <palves@redhat.com>
7367
7368 * linux-aarch64-low.c (aarch64_insert_point)
7369 (aarch64_remove_point): No longer check whether the type is
7370 supported here. Adjust to new interface.
7371 (the_low_target): Install aarch64_supports_z_point_type as
7372 supports_z_point_type method.
7373 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7374 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7375 instead of a Z packet char. Adjust.
7376 (arm_supports_z_point_type): New function.
7377 (arm_insert_point, arm_remove_point): Adjust to new interface.
7378 (the_low_target): Install arm_supports_z_point_type.
7379 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7380 (cris_insert_point, cris_remove_point): Adjust to new interface.
7381 Don't check whether the type is supported here.
7382 (the_low_target): Install cris_supports_z_point_type.
7383 * linux-low.c (linux_supports_z_point_type): New function.
7384 (linux_insert_point, linux_remove_point): Adjust to new interface.
7385 * linux-low.h (struct linux_target_ops) <insert_point,
7386 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7387 raw_breakpoint pointer parameter.
7388 <supports_z_point_type>: New method.
7389 * linux-mips-low.c (mips_supports_z_point_type): New function.
7390 (mips_insert_point, mips_remove_point): Adjust to new interface.
7391 Use mips_supports_z_point_type.
7392 (the_low_target): Install mips_supports_z_point_type.
7393 * linux-ppc-low.c (the_low_target): Install NULL as
7394 supports_z_point_type method.
7395 * linux-s390-low.c (the_low_target): Install NULL as
7396 supports_z_point_type method.
7397 * linux-sparc-low.c (the_low_target): Install NULL as
7398 supports_z_point_type method.
7399 * linux-x86-low.c (x86_supports_z_point_type): New function.
7400 (x86_insert_point): Adjust to new insert_point interface. Use
7401 insert_memory_breakpoint. Adjust to new
7402 i386_low_insert_watchpoint interface.
7403 (x86_remove_point): Adjust to remove_point interface. Use
7404 remove_memory_breakpoint. Adjust to new
7405 i386_low_remove_watchpoint interface.
7406 (the_low_target): Install x86_supports_z_point_type.
7407 * lynx-low.c (lynx_target_ops): Install NULL as
7408 supports_z_point_type callback.
7409 * nto-low.c (nto_supports_z_point_type): New.
7410 (nto_insert_point, nto_remove_point): Adjust to new interface.
7411 (nto_target_ops): Install nto_supports_z_point_type.
7412 * mem-break.c: Adjust intro comment.
7413 (struct raw_breakpoint) <raw_type, size>: New fields.
7414 <inserted>: Update comment.
7415 <shlib_disabled>: Delete field.
7416 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7417 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7418 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7419 (raw_bkpt_type_to_target_hw_bp_type): New function.
7420 (find_enabled_raw_code_breakpoint_at): New function.
7421 (find_raw_breakpoint_at): New type and size parameters. Use them.
7422 (insert_memory_breakpoint): New function, based off
7423 set_raw_breakpoint_at.
7424 (remove_memory_breakpoint): New function.
7425 (set_raw_breakpoint_at): Reimplement.
7426 (set_breakpoint): New, based on set_breakpoint_at.
7427 (set_breakpoint_at): Reimplement.
7428 (delete_raw_breakpoint): Go through the_target->remove_point
7429 instead of assuming memory breakpoints.
7430 (find_gdb_breakpoint_at): Delete.
7431 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7432 (find_gdb_breakpoint): New function.
7433 (set_gdb_breakpoint_at): Delete.
7434 (z_type_supported): New function.
7435 (set_gdb_breakpoint_1): New function, loosely based off
7436 set_gdb_breakpoint_at.
7437 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7438 (delete_gdb_breakpoint_at): Delete.
7439 (delete_gdb_breakpoint_1): New function, loosely based off
7440 delete_gdb_breakpoint_at.
7441 (delete_gdb_breakpoint): New function.
7442 (clear_gdb_breakpoint_conditions): Rename to ...
7443 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7444 breakpoint.
7445 (add_condition_to_breakpoint): Make static.
7446 (add_breakpoint_condition): Take a struct breakpoint pointer
7447 instead of an address. Adjust.
7448 (gdb_condition_true_at_breakpoint): Rename to ...
7449 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7450 z_type parameter.
7451 (gdb_condition_true_at_breakpoint): Reimplement.
7452 (add_breakpoint_commands): Take a struct breakpoint pointer
7453 instead of an address. Adjust.
7454 (gdb_no_commands_at_breakpoint): Rename to ...
7455 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7456 parameter. Return true if no breakpoint was found. Change debug
7457 output.
7458 (gdb_no_commands_at_breakpoint): Reimplement.
7459 (run_breakpoint_commands): Rename to ...
7460 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7461 and change return type to boolean.
7462 (run_breakpoint_commands): New function.
7463 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7464 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7465 breakpoint. Go through the_target->remove_point instead of
7466 assuming memory breakpoint.
7467 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7468 software and hardware breakpoints.
7469 (reinsert_raw_breakpoint): Go through the_target->insert_point
7470 instead of assuming memory breakpoint.
7471 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7472 software and hardware breakpoints.
7473 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7474 Check both software and hardware breakpoints.
7475 (validate_inserted_breakpoint): Assert the breakpoint is a
7476 software breakpoint. Set the inserted flag to -1 instead of
7477 setting shlib_disabled.
7478 (delete_disabled_breakpoints): Adjust.
7479 (validate_breakpoints): Only validate software breakpoints.
7480 Adjust to inserted flag change.
7481 (check_mem_read, check_mem_write): Skip breakpoint types other
7482 than software breakpoints. Adjust to inserted flag change.
7483 * mem-break.h (enum raw_bkpt_type): New enum.
7484 (raw_breakpoint, struct process_info): Forward declare.
7485 (Z_packet_to_target_hw_bp_type): Delete declaration.
7486 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7487 (set_gdb_breakpoint, delete_gdb_breakpoint)
7488 (clear_breakpoint_conditions): New declarations.
7489 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7490 (breakpoint_inserted_here): Update comment.
7491 (add_breakpoint_condition, add_breakpoint_commands): Replace
7492 address parameter with a breakpoint pointer parameter.
7493 (gdb_breakpoint_here): Update comment.
7494 (delete_gdb_breakpoint_at): Delete.
7495 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7496 * server.c (process_point_options): Take a struct breakpoint
7497 pointer instead of an address. Adjust.
7498 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7499 delete_gdb_breakpoint.
7500 * spu-low.c (spu_target_ops): Install NULL as
7501 supports_z_point_type method.
7502 * target.h: Include mem-break.h.
7503 (struct target_ops) <prepare_to_access_memory>: Update comment.
7504 <supports_z_point_type>: New field.
7505 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7506 instead of a char. Also take a raw breakpoint pointer.
7507 * win32-arm-low.c (the_low_target): Install NULL as
7508 supports_z_point_type.
7509 * win32-i386-low.c (i386_supports_z_point_type): New function.
7510 (i386_insert_point, i386_remove_point): Adjust to new interface.
7511 (the_low_target): Install i386_supports_z_point_type.
7512 * win32-low.c (win32_supports_z_point_type): New function.
7513 (win32_insert_point, win32_remove_point): Adjust to new interface.
7514 (win32_target_ops): Install win32_supports_z_point_type.
7515 * win32-low.h (struct win32_target_ops):
7516 <supports_z_point_type>: New method.
7517 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7518 instead of a char. Also take a raw breakpoint pointer.
7519
932539e3
PA
75202014-05-20 Pedro Alves <palves@redhat.com>
7521
7522 * mem-break.h: Include break-common.h.
7523 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7524 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7525 (Z_packet_to_target_hw_bp_type): New declaration.
7526 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7527 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7528 (Z_PACKET_ACCESS_WP): Delete macros.
7529 (Z_packet_to_hw_type): Delete function.
7530 * i386-low.h: Don't include break-common.h here.
7531 (Z_packet_to_hw_type): Delete declaration.
7532 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7533 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7534 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7535 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7536 * linux-aarch64-low.c: Don't include break-common.h here.
7537 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7538 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7539 (Z_packet_to_target_hw_bp_type): Delete function.
7540 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7541 function.
7542 (mips_insert_point, mips_remove_point): Use
7543 Z_packet_to_target_hw_bp_type.
7544
4ff0d3d8
PA
75452014-05-20 Pedro Alves <palves@redhat.com>
7546
7547 * linux-aarch64-low.c: Include break-common.h.
7548 (enum target_point_type): Delete.
7549 (Z_packet_to_point_type): Rename to ...
7550 (Z_packet_to_target_hw_bp_type): ... this, and return a
7551 target_hw_bp_type instead.
7552 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7553 instead of an enum target_point_type.
7554 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7555 breakpoint type.
7556 (aarch64_dr_state_insert_one_point)
7557 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7558 (aarch64_handle_aligned_watchpoint)
7559 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7560 Take an enum target_hw_bp_type instead of an enum
7561 target_point_type.
7562 (aarch64_supports_z_point_type): New function.
7563 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7564 use Z_packet_to_target_hw_bp_type.
7565
786dc519
JB
75662014-05-20 Joel Brobecker <brobecker@adacore.com>
7567
7568 * configure.ac: Only use -Werror by default when DEVELOPMENT
7569 is true.
7570 * configure: Regenerate.
7571
9e0aa64f
JK
75722014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7573
7574 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7575 * linux-x86-low.c (X86_64_USER_REGS): New.
7576 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7577
2b577b92
YQ
75782014-04-28 Yao Qi <yao@codesourcery.com>
7579
7580 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7581 name.
7582
94611da2
PA
75832014-04-25 Pedro Alves <palves@redhat.com>
7584
7585 PR server/16255
7586 * linux-low.c (linux_attach_fail_reason_string): New function.
7587 (linux_attach_lwp): Delete.
7588 (linux_attach_lwp_1): Rename to ...
7589 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7590 argument. Remove "initial" parameter. Return int instead of
7591 void. Don't error or warn here.
7592 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7593 failure to attach to the tgid. Call warning when failing to
7594 attach to an lwp.
7595 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7596 argument. Remove "initial" parameter. Return int instead of
7597 void. Don't error or warn here.
7598 (linux_attach_fail_reason_string): New declaration.
7599 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7600 interface change. Use linux_attach_fail_reason_string.
7601
01f9f808
MS
76022014-04-24 Michael Sturm <michael.sturm@mintel.com>
7603 Walfred Tedeschi <walfred.tedeschi@intel.com>
7604
7605 * Makefile.in: Added rules to handle new files
7606 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7607 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7608 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7609 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7610 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7611 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7612 x32-avx512-linux.o.
7613 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7614 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7615 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7616 i386/x32-avx512.xml.
7617 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7618 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7619 i386/x32-avx512-linux.xml.
7620 * i387-fp.c (num_avx512_k_registers): New constant for number
7621 of K registers.
7622 (num_avx512_zmmh_low_registers): New constant for number of
7623 lower ZMM registers (0-15).
7624 (num_avx512_zmmh_high_registers): New constant for number of
7625 higher ZMM registers (16-31).
7626 (num_avx512_ymmh_registers): New contant for number of higher
7627 YMM registers (ymm16-31 added by avx521 on x86_64).
7628 (num_avx512_xmm_registers): New constant for number of higher
7629 XMM registers (xmm16-31 added by AVX512 on x86_64).
7630 (struct i387_xsave): Add space for AVX512 registers.
7631 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7632 Add code to handle AVX512 registers.
7633 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7634 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7635 prototypei from generated file.
7636 (tdesc_amd64_avx512_linux): Likewise.
7637 (init_registers_x32_avx512_linux): Likewise.
7638 (tdesc_x32_avx512_linux): Likewise.
7639 (init_registers_i386_avx512_linux): Likewise.
7640 (tdesc_i386_avx512_linux): Likewise.
7641 (x86_64_regmap): Add AVX512 registers.
7642 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7643 mask.
7644 (initialize_low_arch): Add code to initialize AVX512 registers.
7645
51aa91f9
PA
76462014-04-23 Pedro Alves <palves@redhat.com>
7647
7648 * mem-break.c (find_gdb_breakpoint_at): Make static.
7649 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7650
a4165e94
PA
76512014-04-23 Pedro Alves <palves@redhat.com>
7652
7653 * i386-low.c: Don't include break-common.h here.
7654 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7655 prototype to take target_hw_bp_type as argument instead of a Z
7656 packet char.
7657 * i386-low.h: Include break-common.h here.
7658 (Z_packet_to_hw_type): Declare.
7659 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7660 prototypes.
7661 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7662 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7663 (x86_remove_point): Convert the packet number to a
7664 target_hw_bp_type before calling i386_low_remove_watchpoint.
7665 * win32-i386-low.c (i386_insert_point): Convert the packet number
7666 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7667 (i386_remove_point): Convert the packet number to a
7668 target_hw_bp_type before calling i386_low_remove_watchpoint.
7669
b8acf843
PA
76702014-04-23 Pedro Alves <palves@redhat.com>
7671
7672 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7673
d708bcd1
PA
76742014-04-10 Pedro Alves <palves@redhat.com>
7675
7676 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7677 Check if the condition or command is NULL before checking if the
7678 breakpoint is known. On success, return true.
7679 * mem-break.h (add_breakpoint_condition): Document return.
7680 (add_breakpoint_commands): Add describing comment.
7681 * server.c (skip_to_semicolon): New function.
7682 (process_point_options): Use it.
7683
2eec7d5b
PA
76842014-04-09 Pedro Alves <palves@redhat.com>
7685
7686 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7687 to lwpid_of.
7688
fa96cb38
PA
76892014-02-27 Pedro Alves <palves@redhat.com>
7690
7691 PR 12702
7692 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7693 macros.
7694 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7695 output.
7696 (last_thread_of_process_p): Take a PID argument instead of a
7697 thread pointer.
7698 (linux_wait_for_lwp): Delete.
7699 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7700 functions.
7701 (linux_low_filter_event): New function, party factored out from
7702 linux_wait_for_event.
7703 (linux_wait_for_event): Rename to ...
7704 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7705 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7706 sigsuspend. Check for zombie leaders.
7707 (linux_wait_for_event): Reimplement as wrapper around
7708 linux_wait_for_event_filtered.
7709 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7710 a normal or signal exit is seen, it's the whole process exiting.
7711 (wait_for_sigstop): No longer a for_each_inferior callback.
7712 Rewrite on top of linux_wait_for_event_filtered.
7713 (stop_all_lwps): Call wait_for_sigstop directly.
7714 * server.c (resume, handle_target_event): Handle
7715 TARGET_WAITKIND_NO_RESUMED.
7716
d763de10
JB
77172014-02-26 Joel Brobecker <brobecker@adacore.com>
7718
7719 * win32-low.c (psapi_get_dll_name,
7720 * win32_CreateToolhelp32Snapshot): Delete.
7721 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7722 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7723 Delete.
7724 (handle_load_dll): Add function description.
7725 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7726
850a0f76
JB
77272014-02-26 Joel Brobecker <brobecker@adacore.com>
7728
7729 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7730 Add comment.
7731 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7732 base address when calling win32_add_one_solib.
7733 (handle_load_dll): Delete local variable load_addr.
7734 Remove 0x1000 offset applied to DLL base address when calling
7735 win32_add_one_solib.
7736 (handle_unload_dll): Add comment.
7737
f25b3fc3
JB
77382014-02-26 Joel Brobecker <brobecker@adacore.com>
7739
7740 * win32-low.c (win32_add_all_dlls): Renames
7741 win32_ensure_ntdll_loaded. Rewrite function documentation.
7742 Adjust implementation to always load all DLLs.
7743 Add 0x1000 offset to DLL base address when calling
7744 win32_add_one_solib.
7745 (child_initialization_done): New static global.
7746 (do_initial_child_stuff): Set child_initialization_done to
7747 zero during child initialization, and 1 after. Replace call
7748 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7749 Add comment.
7750 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7751 (handle_unload_dll): Add function documentation.
7752 (get_child_debug_event): Ignore load and unload DLL events
7753 during child initialization.
7754
d86d4aaf
DE
77552014-02-20 Doug Evans <dje@google.com>
7756
3bc32da3 7757 Remove global all_lwps.
d86d4aaf
DE
7758 * inferiors.h (ptid_of): Move here from linux-low.h.
7759 (pid_of, lwpid_of): Ditto.
7760 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7761 parameter is a struct thread_info * now.
7762 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7763 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7764 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7765 directly.
7766 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7767 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7768 * linux-arm-low.c (update_registers_callback): Update, "entry"
7769 parameter is a struct thread_info * now.
7770 Fetch lwpid from current_inferior directly.
7771 (arm_insert_point): Pass &all_threads to find_inferior instead of
7772 &all_lwps.
7773 (arm_remove_point): Ditto.
7774 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7775 (arm_prepare_to_resume): Fetch pid from thread.
7776 (arm_read_description): Fetch lwpid from current_inferior directly.
7777 * linux-low.c (all_lwps): Delete.
7778 (delete_lwp): Delete call to remove_inferior.
7779 (handle_extended_wait): Fetch lwpid from thread.
7780 (add_lwp): Don't set lwp->entry.id. Remove call to
7781 add_inferior_to_list.
7782 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7783 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7784 (kill_one_lwp_callback): Ditto.
7785 (linux_kill): Don't dereference NULL pointer.
7786 Fetch ptid,lwpid from thread.
7787 (get_detach_signal): Fetch ptid from thread.
7788 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7789 Simplify call to regcache_invalidate_thread.
7790 (delete_lwp_callback): Update, "entry" parameter is a
7791 struct thread_info * now. Fetch pid from thread.
7792 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7793 (status_pending_p_callback): Update, "entry" parameter is a
7794 struct thread_info * now. Fetch ptid from thread.
7795 (find_lwp_pid): Update, "entry" parameter is a
7796 struct thread_info * now.
7797 (linux_wait_for_lwp): Fetch pid from thread.
7798 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7799 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7800 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7801 (dequeue_one_deferred_signal): Ditto.
7802 (cancel_breakpoint): Fetch ptid from current_inferior.
7803 (linux_wait_for_event): Pass &all_threads to find_inferior,
7804 not &all_lwps. Fetch ptid, lwpid from thread.
7805 (count_events_callback): Update, "entry" parameter is a
7806 struct thread_info * now.
7807 (select_singlestep_lwp_callback): Ditto.
7808 (select_event_lwp_callback): Ditto.
7809 (cancel_breakpoints_callback): Ditto.
7810 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7811 not &all_lwps.
7812 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7813 (unsuspend_one_lwp): Update, "entry" parameter is a
7814 struct thread_info * now.
7815 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7816 not &all_lwps.
7817 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7818 Fetch lwpid from thread, not lwp.
7819 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7820 Pass &all_threads to find_inferior, not &all_lwps.
7821 (send_sigstop): Fetch lwpid from thread, not lwp.
7822 (send_sigstop_callback): Update, "entry" parameter is a
7823 struct thread_info * now.
7824 (suspend_and_send_sigstop_callback): Ditto.
7825 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7826 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7827 struct thread_info * now.
7828 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7829 from thread, lwp.
7830 (lwp_running): Update, "entry" parameter is a
7831 struct thread_info * now.
7832 (stop_all_lwps): Fetch ptid from thread.
7833 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7834 (linux_resume_one_lwp): Fetch lwpid from thread.
7835 (linux_set_resume_request): Update, "entry" parameter is a
7836 struct thread_info * now. Fetch pid, lwpid from thread.
7837 (resume_status_pending_p): Update, "entry" parameter is a
7838 struct thread_info * now.
7839 (need_step_over_p): Ditto. Fetch lwpid from thread.
7840 (start_step_over): Fetch lwpid from thread.
7841 (linux_resume_one_thread): Update, "entry" parameter is a
7842 struct thread_info * now. Fetch lwpid from thread.
7843 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7844 (proceed_one_lwp): Update, "entry" parameter is a
7845 struct thread_info * now. Fetch lwpid from thread.
7846 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7847 struct thread_info * now.
7848 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7849 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7850 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7851 directly.
7852 (regsets_store_inferior_registers): Ditto.
7853 (fetch_register, store_register): Ditto.
7854 (linux_read_memory, linux_write_memory): Ditto.
7855 (linux_request_interrupt): Ditto.
7856 (linux_read_auxv): Ditto.
7857 (linux_xfer_siginfo): Ditto.
7858 (linux_qxfer_spu): Ditto.
7859 (linux_qxfer_libraries_svr4): Ditto.
7860 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7861 moved to inferiors.h.
7862 (get_lwp): Delete.
7863 (get_thread_lwp): Update.
7864 (struct lwp_info): Delete member "entry". Simplify comment for
7865 member "thread".
7866 (all_lwps): Delete.
7867 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7868 current_inferior directly.
7869 (update_watch_registers_callback): Update, "entry" parameter is a
7870 struct thread_info * now. Fetch pid from thread.
7871 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7872 (mips_insert_point): Fetch lwpid from current_inferior.
7873 Pass &all_threads to find_inferior, not &all_lwps.
7874 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7875 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7876 directly.
7877 (mips_stopped_data_address): Ditto.
7878 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7879 directly.
7880 * linux-tile-low.c (tile_arch_setup): Ditto.
7881 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7882 (update_debug_registers_callback): Update, "entry" parameter is a
7883 struct thread_info * now. Fetch pid from thread.
7884 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7885 Pass &all_threads to find_inferior, not &all_lwps.
7886 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7887 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7888 Pass &all_threads to find_inferior, not &all_lwps.
7889 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7890 (i386_dr_low_get_status): Ditto.
7891 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7892 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7893 (x86_linux_read_description): Ditto.
7894 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7895
3b8361aa
DE
78962014-02-20 Doug Evans <dje@google.com>
7897
7898 * inferiors.c (get_first_inferior): Fix buglet.
7899
f7667f0d
DE
79002014-02-19 Doug Evans <dje@google.com>
7901
7902 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7903 * inferiors.c (add_thread): Change result type to struct thread_info *.
7904 All callers updated.
7905 (add_lwp): Call add_thread here instead of in callers.
7906 All callers updated.
7907 * linux-low.h (get_lwp_thread): Rewrite.
7908 (struct lwp_info): New member "thread".
7909
b3312d80
DE
79102014-02-19 Doug Evans <dje@google.com>
7911
7912 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7913 All callers updated.
7914
ecc6f45c
DE
79152014-02-19 Doug Evans <dje@google.com>
7916
7917 * inferiors.c (add_thread): Fix whitespace.
7918
649ebbca
DE
79192014-02-19 Doug Evans <dje@google.com>
7920
7921 * dll.c (clear_dlls): Replace accessing list implemention details
7922 with API function.
7923 * gdbthread.h (get_first_thread): Declare.
7924 * inferiors.c (for_each_inferior_with_data): New function.
7925 (get_first_thread): New function.
7926 (find_thread_ptid): Simplify.
7927 (get_first_inferior): New function.
7928 (clear_list): Delete.
7929 (one_inferior_p): New function.
7930 (clear_inferior_list): New function.
7931 (clear_inferiors): Update.
7932 * inferiors.h (for_each_inferior_with_data): Declare.
7933 (clear_inferior_list): Declare.
7934 (one_inferior_p): Declare.
7935 (get_first_inferior): Declare.
7936 * linux-low.c (linux_wait_for_event): Replace accessing list
7937 implemention details with API function.
7938 * server.c (target_running): Ditto.
7939 (accumulate_file_name_length): New function.
7940 (emit_dll_description): New function.
7941 (handle_qxfer_libraries): Replace accessing list implemention
7942 details with API function.
7943 (handle_qxfer_threads_worker): New function.
7944 (handle_qxfer_threads_proper): Replace accessing list implemention
7945 details with API function.
7946 (handle_query): Ditto.
7947 (visit_actioned_threads_callback_ftype): New typedef.
7948 (visit_actioned_threads_data): New struct.
7949 (visit_actioned_threads): Rewrite to be find_inferior callback.
7950 (resume): Call find_inferior.
7951 (handle_status): Replace accessing list implemention
7952 details with API function.
7953 (process_serial_event): Replace accessing list implemention details
7954 with API function.
7955 * target.c (set_desired_inferior): Replace accessing list implemention
7956 details with API function.
7957 * tracepoint.c (same_process_p): New function.
7958 (gdb_agent_about_to_close): Replace accessing list implemention
7959 details with API function.
7960 * win32-low.c (child_delete_thread): Replace accessing list
7961 implemention details with API function.
7962 (match_dll_by_basename): New function.
7963 (dll_is_loaded_by_basename): New function.
7964 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7965 details call to dll_is_loaded_by_basename.
7966
80894984
DE
79672014-02-19 Doug Evans <dje@google.com>
7968
7969 * dll.h (struct dll_info): Add comment.
7970 * gdbthread.h (struct thread_info): Add comment.
7971 (current_ptid): Simplify.
7972 * inferiors.c (add_process): Update.
7973 (remove_process): Update.
7974 * inferiors.h (struct process_info): Rename member "head" to "entry".
7975 * linux-low.c (delete_lwp): Update.
7976 (add_lwp): Update.
7977 (last_thread_of_process_p): Update.
7978 (kill_one_lwp_callback, linux_kill): Update.
7979 (status_pending_p_callback): Update.
7980 (wait_for_sigstop): Update. Simplify read of ptid.
7981 (start_step_over): Update.
7982 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7983 (get_lwp_thread): Update.
7984 (struct lwp_info): Rename member "head" to "entry".
7985 * regcache.h (inferior_list_entry): Delete.
7986 * server.c (kill_inferior_callback): Update.
7987 (detach_or_kill_inferior_callback): Update.
7988 (print_started_pid): Update.
7989 (print_attached_pid): Update.
7990 (process_serial_event): Simplify read of ptid.
7991 * thread-db.c (thread_db_create_event): Update.
7992 (thread_db_get_tls_address): Update.
7993 * win32-low.c (current_inferior_ptid): Simplify.
7994
46917d26
TT
79952014-02-19 Tom Tromey <tromey@redhat.com>
7996
7997 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7998 argument.
7999 (target_supports_btrace): Update.
8000
0759a81e
YQ
80012014-02-14 Yao Qi <yao@codesourcery.com>
8002
8003 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8004 (rsp-low-ipa.o): New target.
8005
a7191e8b
TT
80062014-02-12 Tom Tromey <tromey@redhat.com>
8007
8008 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8009 convert_ascii_to_int.
8010 * regcache.c (registers_to_string): Likewise.
8011 * remote-utils.c (decode_M_packet): Likewise.
8012 * server.c (process_serial_event): Likewise.
8013
ff0e980e
TT
80142014-02-12 Tom Tromey <tromey@redhat.com>
8015
8016 * server.c (handle_query, handle_v_run): Use hex2bin, not
8017 unhexify.
8018 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8019
e9371aff
TT
80202014-02-12 Tom Tromey <tromey@redhat.com>
8021
8022 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8023 convert_int_to_ascii.
8024 * regcache.c (registers_to_string, collect_register_as_string):
8025 Likewise.
8026 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8027 Likewise.
8028 * server.c (process_serial_event): Likewise.
8029 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8030 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8031
971dc0b8
TT
80322014-02-12 Tom Tromey <tromey@redhat.com>
8033
8034 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8035 bin2hex, not hexify.
8036 * tracepoint.c (cmd_qtstatus): Likewise.
8037
0a822afb
TT
80382014-02-12 Tom Tromey <tromey@redhat.com>
8039
8040 * remote-utils.c (monitor_output): Pass explicit length to
8041 hexify.
8042
9c3d6531
TT
80432014-02-12 Tom Tromey <tromey@redhat.com>
8044
8045 * tracepoint.c: Include rsp-low.h.
8046 * server.c: Include rsp-low.h.
8047 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8048 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8049 declare.
8050 * remote-utils.c: Include rsp-low.h.
8051 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8052 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8053 (convert_int_to_ascii, convert_ascii_to_int): Move to
8054 common/rsp-low.c.
8055 * regcache.c: Include rsp-low.h.
8056 * ax.c: Include rsp-low.h.
8057 * Makefile.in (SFILES): Add common/rsp-low.c.
8058 (OBS): Add rsp-low.o.
8059 (rsp-low.o): New target.
8060
01fd3ea5
TT
80612014-02-12 Tom Tromey <tromey@redhat.com>
8062
8063 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8064 Include print-utils.h.
8065 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8066 (plongest, thirty_two, phex_nz): Remove.
8067 * Makefile.in (SFILES): Add common/print-utils.c.
8068 (OBS): Add print-utils.o.
8069 (print-utils-ipa.o): New target.
8070 (print-utils.o): New target.
8071 (IPA_OBJS): Add print-utils-ipa.o.
8072
e99dc820
TT
80732014-02-06 Tom Tromey <tromey@redhat.com>
8074
8075 * Makefile.in (SFILES): Fix indentation.
8076
ee1e2d4f
DE
80772014-02-05 Doug Evans <dje@google.com>
8078
8079 * linux-low.c (linux_wait_for_event): Improve comment.
8080 (linux_wait_1): Keep current_inferior in sync with event_child.
8081
f5a02773
DE
80822014-01-22 Doug Evans <dje@google.com>
8083
8084 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8085
87ce2a04
DE
80862014-01-22 Doug Evans <dje@google.com>
8087
8088 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8089 * configure: Regenerate.
8090 * config.in: Regenerate.
8091 * Makefile.in (SFILES): Add debug.c.
8092 (OBS): Add debug.o.
8093 * debug.c: New file.
8094 * debug.h: New file.
8095 * linux-aarch64-low.c (*): Update all debugging printfs to use
8096 debug_printf instead of fprintf.
8097 * linux-arm-low.c (*): Ditto.
8098 * linux-cris-low.c (*): Ditto.
8099 * linux-crisv32-low.c (*): Ditto.
8100 * linux-m32r-low.c (*): Ditto.
8101 * linux-sparc-low.c (*): Ditto.
8102 * linux-x86.c (*): Ditto.
8103 * linux-low.c (*): Ditto.
8104 (linux_wait_1): Add calls to debug_enter, debug_exit.
8105 (linux_wait): Remove redundant debugging printf.
8106 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8107 (linux_resume, unstop_all_lwps): Ditto.
8108 * mem-break.c (*): Update all debugging printfs to use
8109 debug_printf instead of fprintf.
8110 * remote-utils.c (*): Ditto.
8111 * thread-db.c (*): Ditto.
8112 * server.c #include <ctype.h>, "gdb_vecs.h".
8113 (debug_threads): Moved to debug.c.
8114 (*): Update all debugging printfs to use debug_printf instead of
8115 fprintf.
8116 (start_inferior): Replace call to fflush with call to debug_flush.
8117 (monitor_show_help): Mention set debug-format.
8118 (parse_debug_format_options): New function.
8119 (handle_monitor_command): Handle "monitor set debug-format".
8120 (gdbserver_usage): Mention --debug-format.
8121 (main): Parse --debug-format.
8122 * server.h (debug_threads): Declaration moved to debug.h.
8123 #include "debug.h".
8124 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8125 trace_debug_1 that uses debug_printf.
8126 (tracepoint_look_up_symbols): Update all debugging printfs to use
8127 debug_printf instead of fprintf.
8128
e671835b
BS
81292014-01-20 Baruch Siach <baruch@tkos.co.il>
8130
8131 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8132 sys/ptrace.h.
8133
b5737fa9
PA
81342014-01-17 Pedro Alves <palves@redhat.com>
8135
ea38d2a9 8136 PR build/16445
c7faa97a
PA
8137 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8138 defined after including gdb_proc_service.h.
b5737fa9 8139
40ed484e
DE
81402014-01-16 Doug Evans <dje@google.com>
8141
8142 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8143 (match_dll): Use it.
8144
969c39fb
MM
81452014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8146
8147 * target.h (target_ops) <read_btrace>: Change parameters and
8148 return type to allow error reporting.
8149 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8150 trace reading errors on.
8151 * linux-low.c (linux_low_read_btrace): Pass trace reading
8152 errors on.
8153 (linux_low_disable_btrace): New.
8154
ab7f45ba
DE
81552014-01-15 Doug Evans <dje@google.com>
8156
8157 * inferiors.c (thread_id_to_gdb_id): Delete.
8158 * inferiors.h (thread_id_to_gdb_id): Delete.
8159
66af0f44
EZ
81602014-01-13 Eli Zaretskii <eliz@gnu.org>
8161
8162 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8163 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8164 versions.
8165
9939e131
PA
81662014-01-08 Pedro Alves <palves@redhat.com>
8167
8168 * server.c (handle_status): Don't discard previous queued stop
8169 replies or thread's pending status here.
8170 (main) <disconnection>: Do it here instead.
8171
b7ea362b
PA
81722014-01-08 Pedro Alves <palves@redhat.com>
8173
8174 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8175 * server.c (visit_actioned_threads, handle_pending_status): New
8176 function.
8177 (handle_v_cont): Factor out parts to ...
8178 (resume): ... this new function. If in all-stop, and a thread
8179 being resumed has a pending status, report it without actually
8180 resuming.
8181 (myresume): Adjust to use the new 'resume' function.
8182 (clear_pending_status_callback, set_pending_status_callback)
8183 (find_status_pending_thread_callback): New functions.
8184 (handle_status): Handle the case of multiple threads having
8185 interesting statuses to report. Report threads' real last signal
8186 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8187 with an interesting thread to report the status for, instead of
8188 always reporting the status of the first thread.
8189
28498c42
JB
81902014-01-01 Joel Brobecker <brobecker@adacore.com>
8191
8192 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8193 * gdbreplay.c (gdbreplay_version): Likewise.
8194
f45c82da
YZ
81952013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8196
8197 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8198 iov.iov_len with the real length in use.
8199
379a5e2d
JB
82002013-12-13 Joel Brobecker <brobecker@adacore.com>
8201
8202 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8203 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8204 for all targets that use win32-low.c.
8205 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8206 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8207
4210d83e
PA
82082013-12-13 Pedro Alves <palves@redhat.com>
8209
8210 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8211 if equal to TARGET_WAITKIND_LOADED.
8212 * win32-low.c (cached_status): New static global.
8213 (win32_wait): Add declaration.
8214 (do_initial_child_stuff): Flush all initial pending debug events
8215 up to the initial breakpoint.
8216 (win32_wait): If CACHED_STATUS was set, return that instead
8217 of doing a real wait. Remove the code resuming the execution
8218 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8219 during the initial phase. Also remove the code changing
8220 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8221 TARGET_WAITKIND_STOPPED.
8222
e7f0d979
YQ
82232013-12-11 Yao Qi <yao@codesourcery.com>
8224
8225 * notif.c (handle_notif_ack): Return 0 if no notification
8226 matches.
8227
ebcf782c
DE
82282013-11-20 Doug Evans <dje@google.com>
8229
8230 * linux-low.c (linux_set_resume_request): Fix comment.
8231
20ad9378
DE
82322013-11-20 Doug Evans <dje@google.com>
8233
8234 * linux-low.c (resume_status_pending_p): Tweak comment.
8235
a196ebeb
WT
82362013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8237
8238 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8239 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8240 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8241 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8242 (srv_amd64_regobj): Add amd64-mpx.o.
8243 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8244 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8245 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8246 * i387-fp.c (num_pl_bnd_register) Added constant.
8247 (num_pl_bnd_cfg_registers) Added constant.
8248 (struct i387_xsave) Added reserved area and MPX fields.
8249 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8250 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8251 function.
8252 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8253 (init_registers_amd64_mpx_linux): Declare new function.
8254 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8255 (x86_64_regmap): Add MPX registers.
8256 (x86_linux_read_description): Add MPX case.
8257 (initialize_low_arch): Initialize MPX targets.
8258
0080a2f6
TT
82592013-11-18 Tom Tromey <tromey@redhat.com>
8260
8261 * configure: Rebuild.
8262 * configure.ac: Don't check for stdlib.h.
8263 * gdbreplay.c: Unconditionally include stdlib.h.
8264
2978b111
TT
82652013-11-18 Tom Tromey <tromey@redhat.com>
8266
8267 * config.in: Rebuild.
8268 * configure: Rebuild.
8269 * configure.ac: Don't use AC_HEADER_DIRENT.
8270
a3d08894
TT
82712013-11-18 Tom Tromey <tromey@redhat.com>
8272
8273 * server.h: Don't check HAVE_STRING_H.
8274 * gdbreplay.c: Don't check HAVE_STRING_H.
8275 * configure: Rebuild.
8276
0a5dd17d
TT
82772013-11-18 Tom Tromey <tromey@redhat.com>
8278
8279 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8280 LIBGNU.
8281
1bd2f0ba
TT
82822013-11-08 Tom Tromey <tromey@redhat.com>
8283
8284 * configure, config.in: Rebuild.
8285 * configure.ac: Remove unused configury.
8286
3266f10b
TT
82872013-11-08 Tom Tromey <tromey@redhat.com>
8288
8289 * acinclude.m4: Include common.m4, codeset.m4.
8290 * configure, config.in: Rebuild.
8291 * configure.ac: Use GDB_AC_COMMON.
8292
6682d959
AA
82932013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8294
8295 * linux-s390-low.c (HWCAP_S390_TE): New define.
8296 (s390_arch_setup): Consider the TE field in the HWCAP for
8297 determining 'have_regset_tdb'.
8298
fd0a4d76
SDJ
82992013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8300
8301 PR gdb/16014
8302 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8303 call to sizeof.
8304
1a3d890b
PA
83052013-10-02 Pedro Alves <palves@redhat.com>
8306
8307 * server.c (process_serial_event): Don't output "GDBserver
8308 exiting" if GDB is connected through stdio.
8309 * target.c (mywait): Likewise, be silent if GDB is connected
8310 through stdio.
8311
97ad4581
JB
83122013-10-01 Joel Brobecker <brobecker@adacore.com>
8313
8314 * lynx-low.c (lynx_add_threads_after_attach): New function.
8315 (lynx_attach): Remove call to add_thread. Add call to
8316 lynx_add_threads_after_attach instead.
8317
5b4e221c
MF
83182013-09-28 Mike Frysinger <vapier@gentoo.org>
8319
8320 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8321 * config.in, configure: Regenerated.
8322
ee47b2f8
YQ
83232013-09-18 Yao Qi <yao@codesourcery.com>
8324
8325 PR server/15959
8326 * server.c (start_inferior): Clear 'resume_info'.
8327
d6707650 83282013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8329
d6707650
JW
8330 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8331 for each register.
8332
9243dd0e 83332013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8334
9243dd0e
JW
8335 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8336 linux-tile-low.o to srv_tgtobj.
8337
c623a6ef
WN
83382013-09-16 Will Newton <will.newton@linaro.org>
8339
8340 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8341 out regs.
8342
fb71d39e
PA
83432013-09-06 Pedro Alves <palves@redhat.com>
8344
8345 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8346 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8347 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8348 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8349 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8350 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8351
8e7e9910
PA
83522013-09-06 Pedro Alves <palves@redhat.com>
8353
8354 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8355 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8356
7c3a12ca
PA
83572013-09-06 Pedro Alves <palves@redhat.com>
8358
8359 * linux-amd64-ipa.c: Include tracepoint.h.
8360 * linux-i386-ipa.c: Include tracepoint.h.
8361
8eb3d7b6
RW
83622013-09-06 Ricard Wanderlof <ricardw@axis.com>
8363
8364 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8365 (ps_get_thread_area): New function.
8366
eddddb9d
RW
83672013-09-06 Ricard Wanderlof <ricardw@axis.com>
8368
8369 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8370 (initialize_low_arch): Call init_registers_crisv32 rather than
8371 init_register_crisv32.
8372
533b0600
PA
83732013-09-05 Pedro Alves <palves@redhat.com>
8374
8375 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8376 to ...
8377 * hostio.h: ... this new file.
8378 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8379 win32-low.c: Include hostio.h.
8380
0ce3d3b5
PA
83812013-09-05 Pedro Alves <palves@redhat.com>
8382
8383 * server.h (gdb_client_data, handler_func, callback_handler_func)
8384 (delete_file_handler, add_file_handler, append_callback_event)
8385 (delete_callback_event, start_event_loop, initialize_event_loop):
8386 Move to event-loop.h and include it.
8387 * event-loop.h: New file.
8388
799cdc37
PA
83892013-09-05 Pedro Alves <palves@redhat.com>
8390
8391 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8392 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8393 (loaded_dll, unloaded_dll): Move to ...
8394 * dll.h: ... this new file.
8395 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8396
6a6bbd9d
PA
83972013-09-05 Pedro Alves <palves@redhat.com>
8398
8399 * server.h (current_process, get_thread_process, all_processes)
8400 (add_inferior_to_list, for_each_inferior, current_inferior)
8401 (remove_inferior, add_process, remove_process, find_process_pid)
8402 (have_started_inferiors_p, have_attached_inferiors_p)
8403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8404 (clear_inferiors, find_inferior, find_inferior_id)
8405 (inferior_target_data, set_inferior_target_data)
8406 (inferior_regcache_data, set_inferior_regcache_data): Move to
8407 inferiors.h, and include it.
8408 * inferiors.h: New file.
8409
f699aaba
PA
84102013-09-05 Pedro Alves <palves@redhat.com>
8411
8412 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8413 Move ...
72f4393d 8414 * ax.h: ... here.
f699aaba 8415
c144c7a0
PA
84162013-09-05 Pedro Alves <palves@redhat.com>
8417
8418 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8419 tracepoint.h.
8420 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8421 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8422 (handle_tracepoint_general_set, handle_tracepoint_query)
8423 (tracepoint_finished_step, tracepoint_was_hit)
8424 (release_while_stepping_state_list, current_traceframe)
8425 (in_readonly_region, traceframe_read_mem)
8426 (fetch_traceframe_registers, traceframe_read_sdata)
8427 (traceframe_read_info, struct fast_tpoint_collect_status)
8428 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8429 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8430 (supply_fast_tracepoint_registers)
8431 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8432 (ipa_tdesc, claim_trampoline_space)
8433 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8434 (agent_mem_read, agent_get_trace_state_variable_value)
8435 (agent_set_trace_state_variable_value, agent_tsv_read)
8436 (agent_mem_read_string, get_raw_reg_func_addr)
8437 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8438 * tracepoint.h: ... this new file.
8439
ff42e6ab
PA
84402013-09-05 Pedro Alves <palves@redhat.com>
8441
8442 * server.h (perror_with_name, error, fatal, warning, paddress)
8443 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8444 include it.
8445 * utils.h: New file.
8446
541af0f4
PA
84472013-09-05 Pedro Alves <palves@redhat.com>
8448
8449 * server.h (remote_debug, noack_mode, transport_is_reliable)
8450 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8451 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8452 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8453 (write_enn, initialize_async_io, enable_async_io)
8454 (disable_async_io, check_remote_input_interrupt_request)
8455 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8456 (dead_thread_notify, prepare_resume_reply)
8457 (decode_address_to_semicolon, decode_address, decode_m_packet)
8458 (decode_M_packet, decode_X_packet, decode_xfer_write)
8459 (decode_search_memory_packet, unhexify, hexify)
8460 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8461 (look_up_one_symbol, relocate_instruction)
8462 (monitor_output): Move to remote-utils.h, and include it.
8463 * remote-utils.h: New file.
8464
eebdf26b
PA
84652013-09-05 Pedro Alves <palves@redhat.com>
8466
8467 * server.h (_): Delete.
8468
3aafd2ff
PA
84692013-09-02 Pedro Alves <palves@redhat.com>
8470
8471 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8472 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8473 allocated.
8474 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8475
cee83bcb
PM
84762013-09-02 Pierre Muller <muller@sourceware.org>
8477
8478 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8479 or WriteProcessMemory complete successfully and handle
8480 ERROR_PARTIAL_COPY error.
8481
9a13b2fa
PA
84822013-09-02 Pedro Alves <palves@redhat.com>
8483
8484 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8485 error instead of EIO.
8486
602e3198
JK
84872013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8488
8489 PR server/15604
8490 * linux-low.c: Include filestuff.h.
8491 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8492 * lynx-low.c: Include filestuff.h.
8493 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8494 * server.c: Include filestuff.h.
8495 (main): Call notice_open_fds.
8496 * spu-low.c: Include filestuff.h.
8497 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8498
96d7229d
LM
84992013-08-22 Luis Machado <lgustavo@codesourcery.com>
8500
8501 * Makefile.in: Explain why ../target and ../nat are not
8502 listed as include file search paths.
8503 (linux-waitpid.o): New object file rule.
8504 * configure.srv (srv_native_linux_obj): New variable.
8505 Replace all occurrences of linux native object files with
8506 $srv_native_linux_obj.
8507 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8508 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8509 (linux_enable_event_reporting): Remove declaration.
8510 (my_waitpid): Moved to common/linux-waitpid.c.
8511 (linux_wait_for_event): Pass ptid when calling
8512 linux_enable_event_reporting.
8513 (linux_supports_tracefork_flag): Remove.
8514 (linux_enable_event_reporting): Likewise.
8515 (linux_tracefork_grandchild): Remove.
8516 (STACK_SIZE): Moved to common/linux-ptrace.c.
8517 (linux_tracefork_child): Remove.
8518 (linux_test_for_tracefork): Remove.
8519 (linux_look_up_symbols): Call linux_supports_traceclone.
8520 (initialize_low): Remove call to linux_test_for_tracefork.
8521 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8522 common/linux-ptrace.h.
8523 (PTRACE_TYPE_ARG4): Likewise.
8524 Include linux-ptrace.h.
8525
32940073
PA
85262013-08-21 Pedro Alves <palves@redhat.com>
8527
8528 * config.in: Renegerate.
8529
33b60d58 85302013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8531
33b60d58
LM
8532 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8533 (SFILES): Remove $(srcdir)/common/target-common.c and
8534 add $(srcdir)/target/waitstatus.c.
8535 (OBS): Remove target-common.o and add waitstatus.o.
8536 (server_h): Remove $(srcdir)/../common/target-common.h and
8537 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8538 and $(srcdir)/../target/waitstatus.h.
8539 (target-common.o): Remove.
8540 (waitstatus.o): New target object file.
8541 * target.h: Do not include target-common.h and
8542 include target/resume.h, target/wait.h and
8543 target/waitstatus.h.
8544
b8e1b30e
LM
85452013-08-13 Luis Machado <lgustavo@codesourcery.com>
8546
8547 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8548 to PTRACE_TYPE_ARG3.
8549 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8550 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8551 PTRACE_TYPE_ARG4.
8552 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8553 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8554
7a60ad40
YQ
85552013-07-27 Jie Zhang <jie@codesourcery.com>
8556 Daniel Jacobowitz <dan@codesourcery.com>
8557 Yao Qi <yao@codesourcery.com>
8558
8559 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8560 (mips-linux-watch.o): New rule.
8561 (mips_linux_watch_h): New variable.
8562 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8563 srv_tgtobj.
8564 * linux-mips-low.c: Include mips-linux-watch.h.
8565 (struct arch_process_info, struct arch_lwp_info): New.
8566 (update_watch_registers_callback): New function.
8567 (mips_linux_new_process, mips_linux_new_thread) New functions.
8568 (mips_linux_prepare_to_resume, mips_insert_point): New
8569 functions.
8570 (mips_remove_point, mips_stopped_by_watchpoint): New
8571 functions.
8572 (rsp_bp_type_to_target_hw_bp_type): New function.
8573 (mips_stopped_data_address): New function.
8574 (the_low_target): Add watchpoint support functions.
8575
de6f69ad
YQ
85762013-07-27 Yao Qi <yao@codesourcery.com>
8577
8578 * i386-low.c: Include break-common.h.
8579 (enum target_hw_bp_type): Remove.
8580
3360c0bf
LM
85812013-07-24 Luis Machado <lgustavo@codesourcery.com>
8582
8583 * Makefile.in (SFILES): /common/target-common.c.
8584 (OBS): Add target-common.o.
8585 (server_h): Add $(srcdir)/../common/target-common.h.
8586 (target-common.o): New target.
8587 * server.c (queue_stop_reply_callback): Free
8588 status string after use.
8589 * target.c (target_waitstatus_to_string): Remove.
8590 * target.h: Include target-common.h.
8591 (resume_kind): Likewise.
8592 (target_waitkind): Likewise.
8593 (target_waitstatus): Likewise.
8594 (TARGET_WNOHANG): Likewise.
8595
bd885420
YQ
85962013-07-04 Yao Qi <yao@codesourcery.com>
8597
8598 * Makefile.in (host_alias): Use @host_noncanonical@.
8599 (target_alias): Use @target_noncanonical@.
8600 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8601 ACX_NONCANONICAL_HOST.
8602 * configure: Regenerated.
8603
8604 Revert:
8605 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8606
8607 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8608 * configure: Rebuild.
8609 * Makefile.in (version_host, version_target): Get from configure.
8610 (version.c): Use $(version_host) and $(version_target).
8611
17ef446e
PA
86122013-07-03 Pedro Alves <palves@redhat.com>
8613
8614 * Makefile.in (config.status): Depend on development.sh.
8615 * acinclude.m4: Include libmcheck.m4.
8616 * configure: Regenerate.
8617
7a9a7487
MG
86182013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8619
8620 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8621 attribute inside the parentheses.
8622 (winapi_DebugSetProcessKillOnExit): Ditto.
8623 (winapi_DebugBreakProcess): Ditto.
8624 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8625
49b64de6
MG
86262013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8627
8628 * notif.h (notif_event): Add a dummy member to avoid compiler
8629 errors.
8630
d5749ee7
PA
86312013-07-01 Pedro Alves <palves@redhat.com>
8632
8633 * hostio.c (HOSTIO_PATH_MAX): Define.
8634 (require_filename, handle_open, handle_unlink, handle_readlink):
8635 Use it.
8636
d8d2a3ee
PA
86372013-07-01 Pedro Alves <palves@redhat.com>
8638
8639 * server.h: Include "pathmax.h".
8640 * linux-low.c: Don't include sys/param.h.
8641 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8642 MAXPATHLEN.
8643 * win32-low.c: Don't include sys/param.h.
8644 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8645
bc7dea8d
PA
86462013-07-01 Pedro Alves <palves@redhat.com>
8647
8648 * event-loop.c: Don't check HAVE_UNISTD_H before including
8649 <unistd.h>.
8650 * gdbreplay.c: Likewise.
8651 * remote-utils.c: Likewise.
8652 * server.c: Likewise.
8653 * configure.ac: Don't check for unistd.h.
8654 * configure: Regenerate.
8655
d6c2da54
TT
86562013-06-28 Tom Tromey <tromey@redhat.com>
8657
8658 * Makefile.in (version.c): Use version.in, not
8659 common/version.in.
8660
257b6bec
MG
86612013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8662
8663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8664 * configure: Rebuild.
8665 * Makefile.in (version_host, version_target): Get from configure.
8666 (version.c): Use $(version_host) and $(version_target).
8667
86ebe149
DK
86682013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8669
8670 Fix trace-status to output user name without trailing colon.
8671 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8672
f30aa5af
DK
86732013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8674
8675 Fix trace-status to output proper start-time and stop-time.
8676 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8677 output start time and stop time in hex as gdb expects.
8678
28a93511
YQ
86792013-06-26 Pedro Alves <pedro@codesourcery.com>
8680
8681 * tracepoint.c (build_traceframe_info_xml): Output trace state
8682 variables present in the trace buffer.
8683
01208463
TT
86842013-06-24 Tom Tromey <tromey@redhat.com>
8685
8686 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8687 create-version.sh.
8688 (version.o): Remove.
8689 * gdbreplay.c: Include version.h.
8690 (version, host_name): Don't declare.
8691 * server.h: Include version.h.
8692 (version, host_name): Don't declare.
8693
760256f9
PA
86942013-06-12 Pedro Alves <palves@redhat.com>
8695
8696 * linux-x86-low.c (linux_is_elf64): Delete global.
8697 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8698 with local linux_pid_exe_is_elf_64_file use.
8699
030031ee
PA
87002013-06-11 Pedro Alves <palves@redhat.com>
8701
8702 * linux-low.c (regset_disabled, disable_regset): New functions.
8703 (regsets_fetch_inferior_registers)
8704 (regsets_store_inferior_registers): Use them.
8705 (initialize_regsets_info); Don't allocate the disabled_regsets
8706 array here.
8707 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8708 comment.
8709
5da6eb0a
PA
87102013-06-11 Pedro Alves <palves@redhat.com>
8711
8712 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8713 xmalloc.
8714
7e5aaa09
PA
87152013-06-11 Pedro Alves <palves@redhat.com>
8716
8717 * linux-x86-low.c (initialize_low_arch): Call
8718 init_registers_x32_avx_linux.
8719
d878444c
JK
87202013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8721
8722 Fix compatibility with Android Bionic.
8723 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8724 it is not empty.
8725
3aee8918
PA
87262013-06-07 Pedro Alves <palves@redhat.com>
8727
5f2b57b5 8728 PR server/14823
3aee8918
PA
8729 * Makefile.in (OBS): Add tdesc.o.
8730 (IPA_OBJS): Add tdesc-ipa.o.
8731 (tdesc-ipa.o): New rule.
8732 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8733 interface.
8734 * linux-low.c (new_inferior): Delete.
8735 (disabled_regsets, num_regsets): Delete.
8736 (linux_add_process): Adjust to set the new per-process
8737 new_inferior flag.
8738 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8739 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8740 was a stop. When calling arch_setup, switch the current inferior
8741 to the thread that got an event.
8742 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8743 (regsets_fetch_inferior_registers)
8744 (regsets_store_inferior_registers): New regsets_info parameter.
8745 Adjust to use it.
8746 (linux_register_in_regsets): New regs_info parameter. Adjust to
8747 use it.
8748 (register_addr, fetch_register, store_register): New usrregs_info
8749 parameter. Adjust to use it.
8750 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8751 parameter regs_info. Adjust to use it.
8752 (linux_fetch_registers): Get the current inferior's regs_info, and
8753 adjust to use it.
8754 (linux_store_registers): Ditto.
8755 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8756 (initialize_low): Don't initialize the target_regsets here. Call
8757 initialize_low_arch.
8758 * linux-low.h (target_regsets): Delete declaration.
8759 (struct regsets_info): New.
8760 (struct usrregs_info): New.
8761 (struct regs_info): New.
8762 (struct process_info_private) <new_inferior>: New field.
8763 (struct linux_target_ops): Delete the num_regs, regmap, and
8764 regset_bitmap fields. New field regs_info.
8765 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8766 * i387-fp.c (num_xmm_registers): Delete.
8767 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8768 calls to new interface.
8769 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8770 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8771 Infer the number of xmm registers from the regcache's target
8772 description.
8773 * i387-fp.h (num_xmm_registers): Delete.
8774 * inferiors.c (add_thread): Don't install the thread's regcache
8775 here.
8776 * proc-service.c (gregset_info): Fetch the current inferior's
8777 regs_info. Adjust to use it.
8778 * regcache.c: Include tdesc.h.
8779 (register_bytes, reg_defs, num_registers)
8780 (gdbserver_expedite_regs): Delete.
8781 (get_thread_regcache): If the thread doesn't have a regcache yet,
8782 create one, instead of aborting gdbserver.
8783 (regcache_invalidate_one): Rename to ...
8784 (regcache_invalidate_thread): ... this.
8785 (regcache_invalidate_one): New.
8786 (regcache_invalidate): Only invalidate registers of the current
8787 process.
8788 (init_register_cache): Add target_desc parameter, and use it.
8789 (new_register_cache): Ditto. Assert the target description has a
8790 non zero registers_size.
8791 (regcache_cpy): Add assertions. Adjust.
8792 (realloc_register_cache, set_register_cache): Delete.
8793 (registers_to_string, registers_from_string): Adjust.
8794 (find_register_by_name, find_regno, find_register_by_number)
8795 (register_cache_size): Add target_desc parameter, and use it.
8796 (free_register_cache_thread, free_register_cache_thread_one)
8797 (regcache_release, register_cache_size): New.
8798 (register_size): Add target_desc parameter, and use it.
8799 (register_data, supply_register, supply_register_zeroed)
8800 (supply_regblock, supply_register_by_name, collect_register)
8801 (collect_register_as_string, collect_register_by_name): Adjust.
8802 * regcache.h (struct target_desc): Forward declare.
8803 (struct regcache) <tdesc>: New field.
8804 (init_register_cache, new_register_cache): Add target_desc
8805 parameter.
8806 (regcache_invalidate_thread): Declare.
8807 (regcache_invalidate_one): Delete declaration.
8808 (regcache_release): Declare.
8809 (find_register_by_number, register_cache_size, register_size)
8810 (find_regno): Add target_desc parameter.
8811 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8812 declarations.
8813 * remote-utils.c: Include tdesc.h.
8814 (outreg, prepare_resume_reply): Adjust.
8815 * server.c: Include tdesc.h.
8816 (gdbserver_xmltarget): Delete declaration.
8817 (get_features_xml, process_serial_event): Adjust.
8818 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8819 declare.
8820 (struct process_info) <tdesc>: New field.
8821 (ipa_tdesc): Declare.
8822 * tdesc.c: New file.
8823 * tdesc.h: New file.
8824 * tracepoint.c: Include tdesc.h.
8825 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8826 (get_context_regcache): Adjust to pass ipa_tdesc down.
8827 (do_action_at_tracepoint): Adjust to get the register cache size
8828 from the context regcache's description.
8829 (traceframe_walk_blocks): Adjust to get the register cache size
8830 from the current trace frame's description.
8831 (traceframe_get_pc): Adjust to get current trace frame's
8832 description and pass it down.
8833 (gdb_collect): Adjust to get the register cache size from the
8834 IPA's description.
8835 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8836 (gdbserver_xmltarget): Delete.
8837 (initialize_low_tracepoint): Set the ipa's target description.
8838 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8839 (initialize_low_tracepoint): Set the ipa's target description.
8840 * linux-x86-low.c: Include tdesc.h.
8841 [__x86_64__] (is_64bit_tdesc): New.
8842 (ps_get_thread_area, x86_get_thread_area): Use it.
8843 (i386_cannot_store_register): Rename to ...
8844 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8845 (i386_cannot_fetch_register): Rename to ...
8846 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8847 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8848 to new interface.
8849 (target_regsets): Rename to ...
8850 (x86_regsets): ... this.
8851 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8852 interface.
8853 (x86_siginfo_fixup): Use is_64bit_tdesc.
8854 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8855 (tdesc_x32_avx_linux, tdesc_x32_linux)
8856 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8857 Declare.
8858 (x86_linux_update_xmltarget): Delete.
8859 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8860 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8861 (AMD64_LINUX_USER64_CS): New.
8862 (x86_linux_read_description): New, based on
8863 x86_linux_update_xmltarget.
8864 (same_process_callback): New.
8865 (x86_arch_setup_process_callback): New.
8866 (x86_linux_update_xmltarget): New.
8867 (x86_regsets_info): New.
8868 (amd64_linux_regs_info): New.
8869 (i386_linux_usrregs_info): New.
8870 (i386_linux_regs_info): New.
8871 (x86_linux_regs_info): New.
8872 (x86_arch_setup): Reimplement.
8873 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8874 (x86_emit_ops): Ditto.
8875 (the_low_target): Adjust. Install x86_linux_regs_info,
8876 x86_cannot_fetch_register, and x86_cannot_store_register.
8877 (initialize_low_arch): New.
8878 * linux-ia64-low.c (tdesc_ia64): Declare.
8879 (ia64_fetch_register): Adjust.
8880 (ia64_usrregs_info, regs_info): New globals.
8881 (ia64_regs_info): New function.
8882 (the_low_target): Adjust.
8883 (initialize_low_arch): New function.
8884 * linux-sparc-low.c (tdesc_sparc64): Declare.
8885 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8886 Adjust.
8887 (sparc_arch_setup): New function.
8888 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8889 (the_low_target): Adjust.
8890 (initialize_low_arch): New function.
8891 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8892 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8893 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8894 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8895 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8896 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8897 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8898 (tdesc_powerpc_isa205_vsx64l): Declare.
8899 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8900 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8901 (ppc_set_pc, ppc_get_hwcap): Adjust.
8902 (ppc_usrregs_info): Forward declare.
8903 (!__powerpc64__) ppc_regmap_adjusted: New global.
8904 (ppc_arch_setup): Adjust to the current process'es target
8905 description.
8906 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8907 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8908 (ppc_store_evrregset): Adjust.
8909 (target_regsets): Rename to ...
8910 (ppc_regsets): ... this, and make static.
8911 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8912 (ppc_regs_info): New function.
8913 (the_low_target): Adjust.
8914 (initialize_low_arch): New function.
8915 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8916 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8917 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8918 (tdesc_s390x_linux64v2): Declare.
8919 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8920 (s390_fill_gregset, s390_store_last_break): Adjust.
8921 (target_regsets): Rename to ...
8922 (s390_regsets): ... this, and make static.
8923 (s390_get_pc, s390_set_pc): Adjust.
8924 (s390_get_hwcap): New target_desc parameter, and use it.
8925 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8926 (s390_arch_setup): Adjust to set the current process'es target
8927 description. Don't adjust the regmap.
8928 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8929 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8930 (regs_info_3264): New globals.
8931 (s390_regs_info): New function.
8932 (the_low_target): Adjust.
8933 (initialize_low_arch): New function.
8934 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8935 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8936 [__mips64] (init_registers_mips_linux)
8937 (init_registers_mips_dsp_linux): Delete defines.
8938 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8939 (have_dsp): New global.
8940 (mips_read_description): New, based on mips_arch_setup.
8941 (mips_arch_setup): Reimplement.
8942 (get_usrregs_info): New function.
8943 (mips_cannot_fetch_register, mips_cannot_store_register)
8944 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8945 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8946 (target_regsets): Rename to ...
8947 (mips_regsets): ... this, and make static.
8948 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8949 (dsp_regs_info, regs_info): New globals.
8950 (mips_regs_info): New function.
8951 (the_low_target): Adjust.
8952 (initialize_low_arch): New function.
8953 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8954 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8955 Declare.
8956 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8957 (arm_read_description): New, with bits factored from
8958 arm_arch_setup.
8959 (arm_arch_setup): Reimplement.
8960 (target_regsets): Rename to ...
8961 (arm_regsets): ... this, and make static.
8962 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8963 (arm_regs_info): New function.
8964 (the_low_target): Adjust.
8965 (initialize_low_arch): New function.
8966 * linux-m68k-low.c (tdesc_m68k): Declare.
8967 (target_regsets): Rename to ...
8968 (m68k_regsets): ... this, and make static.
8969 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8970 (m68k_regs_info): New function.
8971 (m68k_arch_setup): New function.
8972 (the_low_target): Adjust.
8973 (initialize_low_arch): New function.
8974 * linux-sh-low.c (tdesc_sharch): Declare.
8975 (target_regsets): Rename to ...
8976 (sh_regsets): ... this, and make static.
8977 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8978 (sh_regs_info, sh_arch_setup): New functions.
8979 (the_low_target): Adjust.
8980 (initialize_low_arch): New function.
8981 * linux-bfin-low.c (tdesc_bfin): Declare.
8982 (bfin_arch_setup): New function.
8983 (bfin_usrregs_info, regs_info): New globals.
8984 (bfin_regs_info): New function.
8985 (the_low_target): Adjust.
8986 (initialize_low_arch): New function.
8987 * linux-cris-low.c (tdesc_cris): Declare.
8988 (cris_arch_setup): New function.
8989 (cris_usrregs_info, regs_info): New globals.
8990 (cris_regs_info): New function.
8991 (the_low_target): Adjust.
8992 (initialize_low_arch): New function.
8993 * linux-cris-low.c (tdesc_crisv32): Declare.
8994 (cris_arch_setup): New function.
8995 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8996 (cris_regs_info): New function.
8997 (the_low_target): Adjust.
8998 (initialize_low_arch): New function.
8999 * linux-m32r-low.c (tdesc_m32r): Declare.
9000 (m32r_arch_setup): New function.
9001 (m32r_usrregs_info, regs_info): New globals.
9002 (m32r_regs_info): Adjust.
9003 (initialize_low_arch): New function.
9004 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9005 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9006 (tic6x_usrregs_info): Forward declare.
9007 (tic6x_read_description): New function, based on ...
9008 (tic6x_arch_setup): ... this. Reimplement.
9009 (target_regsets): Rename to ...
9010 (tic6x_regsets): ... this, and make static.
9011 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9012 (tic6x_regs_info): New function.
9013 (the_low_target): Adjust.
9014 (initialize_low_arch): New function.
9015 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9016 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9017 (target_regsets): Rename to ...
9018 (xtensa_regsets): ... this, and make static.
9019 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9020 globals.
9021 (xtensa_arch_setup, xtensa_regs_info): New functions.
9022 (the_low_target): Adjust.
9023 (initialize_low_arch): New function.
9024 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9025 (nios2_arch_setup): Set the current process'es tdesc.
9026 (target_regsets): Rename to ...
9027 (nios2_regsets): ... this.
9028 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9029 (nios2_regs_info): New function.
9030 (the_low_target): Adjust.
9031 (initialize_low_arch): New function.
a261b8f5
PA
9032 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9033 (aarch64_arch_setup): Set the current process'es tdesc.
9034 (target_regsets): Rename to ...
9035 (aarch64_regsets): ... this.
9036 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9037 (aarch64_regs_info): New function.
9038 (the_low_target): Adjust.
9039 (initialize_low_arch): New function.
3aee8918
PA
9040 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9041 globals.
9042 (target_regsets): Rename to ...
9043 (tile_regsets): ... this.
9044 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9045 (tile_regs_info): New function.
9046 (tile_arch_setup): Set the current process'es tdesc.
9047 (the_low_target): Adjust.
9048 (initialize_low_arch): New function.
9049 * spu-low.c (tdesc_spu): Declare.
9050 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9051 * win32-arm-low.c (tdesc_arm): Declare.
9052 (arm_arch_setup): New function.
9053 (the_low_target): Install arm_arch_setup instead of
9054 init_registers_arm.
9055 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9056 (init_windows_x86): Rename to ...
9057 (i386_arch_setup): ... this. Set `win32_tdesc'.
9058 (the_low_target): Adjust.
9059 * win32-low.c (win32_tdesc): New global.
9060 (child_add_thread): Don't create the thread cache here.
9061 (do_initial_child_stuff): Set the new process'es tdesc.
9062 * win32-low.h (struct target_desc): Forward declare.
9063 (win32_tdesc): Declare.
9064 * lynx-i386-low.c (tdesc_i386): Declare global.
9065 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9066 * lynx-low.c (lynx_tdesc): New global.
9067 (lynx_add_process): Set the new process'es tdesc.
9068 * lynx-low.h (struct target_desc): Forward declare.
9069 (lynx_tdesc): Declare global.
9070 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9071 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9072 * nto-low.c (nto_tdesc): New global.
9073 (do_attach): Set the new process'es tdesc.
9074 * nto-low.h (struct target_desc): Forward declare.
9075 (nto_tdesc): Declare.
9076 * nto-x86-low.c (tdesc_i386): Declare.
9077 (nto_x86_arch_setup): Set `nto_tdesc'.
9078
b1fbec62
GB
90792013-06-04 Gary Benson <gbenson@redhat.com>
9080
9081 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9082 to qSupported response when appropriate.
9083 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9084 with nonzero-length annex.
9085 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9086 arguments supplied in annex.
9087
d1ec4ce7
DE
90882013-05-31 Doug Evans <dje@google.com>
9089
ac44adcb 9090 PR server/15594
d1ec4ce7
DE
9091 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9092 64 bits in 64-cross-32 environment.
9093
9b25f2d3
PA
90942013-05-28 Pedro Alves <palves@redhat.com>
9095
9096 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9097 (aarch64-without-fpu.c): Delete rule.
9098 * configure.srv (aarch64*-*-linux*): Remove references to
9099 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9100 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9101 declaration.
9102
6740dc9c
PA
91032013-05-24 Pedro Alves <palves@redhat.com>
9104
9105 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9106 instead of strchr/decode_address. Error if the range isn't split
9107 with a ','. Don't assume there's be a ':' in the action.
9108
c2d6af84
PA
91092013-05-23 Yao Qi <yao@codesourcery.com>
9110 Pedro Alves <palves@redhat.com>
9111
9112 * linux-low.c (lwp_in_step_range): New function.
9113 (linux_wait_1): If the thread was range stepping and stopped
9114 outside the stepping range, report the stop to GDB. Otherwise,
9115 continue stepping. Add range stepping debug output.
9116 (linux_set_resume_request): Copy the step range from the resume
9117 request to the lwp.
9118 (linux_supports_range_stepping): New.
9119 (linux_target_ops) <supports_range_stepping>: Set to
9120 linux_supports_range_stepping.
9121 * linux-low.h (struct linux_target_ops)
9122 <supports_range_stepping>: New field.
9123 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9124 * linux-x86-low.c (x86_supports_range_stepping): New.
9125 (the_low_target) <supports_range_stepping>: Set to
9126 x86_supports_range_stepping.
9127 * server.c (handle_v_cont): Handle 'r' action.
9128 (handle_v_requests): Append ";r" if the target supports range
9129 stepping.
9130 * target.h (struct thread_resume) <step_range_start,
9131 step_range_end>: New fields.
9132 (struct target_ops) <supports_range_stepping>:
9133 New field.
9134 (target_supports_range_stepping): New macro.
9135
58794e1a
JB
91362013-05-17 Joel Brobecker <brobecker@adacore.com>
9137
9138 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9139 confusion in comment.
9140
d631c5a7
JB
91412013-05-17 Joel Brobecker <brobecker@adacore.com>
9142
9143 * lynx-low.c (struct process_info_private): New type.
9144 (lynx_add_process): New function.
9145 (lynx_create_inferior, lynx_attach): Replace calls to
9146 add_process by calls to lynx_add_process.
9147 (lynx_resume): If PTID is null, then try using
9148 current_process()->private->last_wait_event_ptid.
9149 Add comments.
9150 (lynx_clear_inferiors): Delete. The contents of that function
9151 has been inlined in lynx_mourn;
9152 (lynx_wait_1): Save the ptid in the process's private data.
9153 (lynx_mourn): Free the process' private data. Replace call
9154 to lynx_clear_inferiors by call to clear_inferiors.
9155
96f7a20f
YQ
91562013-05-17 Yao Qi <yao@codesourcery.com>
9157
9158 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9159 the right place.
9160
db0dfaa0
LM
91612013-05-16 Luis Machado <lgustavo@codesourcery.com>
9162
9163 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9164 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9165 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9166 PT_TEXT_END_ADDR guards. Update comments.
9167 (linux_target_op) <read_offsets>: Conditionally define to
9168 linux_read_offsets if the target is UCLIBC and if it defines
9169 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9170
68f5f838
SL
91712013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9172 Andrew Jenner <andrew@codesourcery.com>
9173
9174 * Makefile.in (SFILES): Add linux-nios2-low.c.
9175 (clean): Add action to delete nios2-linux.c.
9176 (nios2-linux.c): New rule.
9177 * configure.srv: Add nios2*-*-linux*.
9178 * linux-nios2-low.c: New.
9179
1ebff1fd
HAQ
91802013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9181
9182 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9183
f6150862
HZ
91842013-04-25 Hui Zhu <hui@codesourcery.com>
9185
9186 PR gdb/15186
f6150862
HZ
9187 * ax.c (ax_printf): Add fflush.
9188
614c279d
TT
91892013-04-22 Tom Tromey <tromey@redhat.com>
9190
9191 * Makefile.in (SFILES): Add filestuff.c.
9192 (OBS): Add filestuff.o.
9193 (filestuff.o): New target.
9194 * config.in, configure: Rebuild.
9195 * configure.ac: Check for fdwalk, pipe2.
9196
7d4e5717
PA
91972013-04-17 Pedro Alves <palves@redhat.com>
9198
9199 * configure.ac (USE_THREAD_DB): Delete variable.
9200 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9201 Don't AC_SUBST USE_THREAD_DB.
9202 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9203 * config.in, configure: Regenerate.
9204
d5c93e41
PA
92052013-04-16 Pedro Alves <palves@redhat.com>
9206
9207 * linux-low.h (struct lwp_info) <thread_known>: Move under
9208 the USE_THREAD_DB #ifdef.
9209
04f5fe89
PA
92102013-04-16 Pedro Alves <palves@redhat.com>
9211
9212 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9213 (linux-low.o): Delete rule.
9214 * linux-low.h: Always include "gdb_thread_db.h" instead of
9215 conditionally including thread_db.h.
9216 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9217 HAVE_THREAD_DB_H.
9218
480b27bf
JK
92192013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9220
9221 * Makefile.in (install-only): Fix make install regression.
9222
43662968
JK
92232013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9224
9225 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9226 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9227 installation.
9228 * gdbserver.1: Remove.
9229
3e74e146
PA
92302013-03-22 Pedro Alves <palves@redhat.com>
9231
9232 * linux-low.c (handle_extended_wait): Don't call
9233 linux_enable_event_reporting.
9234
a8347a2a
TT
92352013-03-15 Tony Theodore <tonyt@logyst.com>
9236
9237 PR build/9098:
9238 * Makefile.in (SHELL): Use @SHELL@.
9239
eeb56fa7
SDJ
92402013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9241
9242 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9243 compiler warning.
9244
4fa7e2ff
JB
92452013-03-13 Joel Brobecker <brobecker@adacore.com>
9246
9247 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9248 Remove extraneous NULL element.
9249
8ddb1965
YQ
92502013-03-13 Yao Qi <yao@codesourcery.com>
9251
9252 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9253 'V' block in trace frame.
9254
9accd112
MM
92552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9256
9257 * target.h (struct target_ops): Add btrace ops.
9258 (target_supports_btrace): New macro.
9259 (target_enable_btrace): New macro.
9260 (target_disable_btrace): New macro.
9261 (target_read_btrace): New macro.
9262 * gdbthread.h (struct thread_info): Add btrace field.
9263 * server.c: Include btrace-common.h.
9264 (handle_btrace_general_set): New function.
9265 (handle_btrace_enable): New function.
9266 (handle_btrace_disable): New function.
9267 (handle_general_set): Call handle_btrace_general_set.
9268 (handle_qxfer_btrace): New function.
9269 (struct qxfer qxfer_packets[]): Add btrace entry.
9270 * inferiors.c (remove_thread): Disable btrace.
9271 * linux-low: Include linux-btrace.h.
9272 (linux_low_enable_btrace): New function.
9273 (linux_low_read_btrace): New function.
9274 (linux_target_ops): Add btrace ops.
9275 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9276 Add srv_linux_btrace=yes.
9277 (x86_64-*-linux*): Add linux-btrace.o.
9278 Add srv_linux_btrace=yes.
9279 * configure.ac: Define HAVE_LINUX_BTRACE.
9280 * config.in: Regenerated.
9281 * configure: Regenerated.
9282
5cc22e4c
MM
92832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9284
9285 * server.c (handle_qxfer): Preserve error message if -3 is
9286 returned.
9287 (qxfer): Document the -3 return value.
9288
7c97f91e
MM
92892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9290
9291 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9292 (linux_btrace_h): New variable.
9293 (linux-btrace.o): New rule.
9294
be9a119c 92952013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9296 Hafiz Abid Qadeer <abidh@codesourcery.com>
9297
9298 * tracepoint.c (trace_buffer_size): New global.
9299 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9300 (init_trace_buffer): Change to one-argument function. Allocate
9301 trace buffer memory.
9302 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9303 handle QTBuffer:size packet.
9304 (cmd_bigqtbuffer_size): New function.
9305 (initialize_tracepoint): Call init_trace_buffer with
9306 DEFAULT_TRACE_BUFFER_SIZE.
9307 * server.c (handle_query): Add QTBuffer:size in the
9308 supported packets.
9309
e64f7499
YQ
93102013-03-07 Yao Qi <yao@codesourcery.com>
9311
9312 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9313 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9314 of -1.
9315 (cmd_qtsp): Adjust condition. Do post increment.
9316 Set cur_action and cur_step_action back to 0.
9317
f0ae6fc3
PA
93182013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9319
9320 PR server/15236
9321 * linux-low.c (linux_write_memory): Return early success if LEN is
9322 zero.
9323
b5b0b0af
CV
93242013-03-05 Corinna Vinschen <vinschen@redhat.de>
9325
334ad4a8 9326 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9327
589bc927
TT
93282013-02-28 Tom Tromey <tromey@redhat.com>
9329
9330 * configure.ac: Invoke AC_SYS_LARGEFILE.
9331 * configure, config.in: Rebuild.
9332
dfe07582
CV
93332013-02-28 Corinna Vinschen <vinschen@redhat.com>
9334
9335 * win32-low.c: Throughout, fix format strings and casts of
9336 printf-like functions to avoid type related warnings on all
9337 platforms.
9338 (get_child_debug_event): Print dwDebugEventCode as hex since
9339 that's how it's usually documented.
9340
736cd585
YQ
93412013-02-28 Yao Qi <yao@codesourcery.com>
9342
9343 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9344 pulongest.
9345
e1f58301
JW
93462013-02-27 Jiong Wang <jiwang@tilera.com>
9347
9348 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9349 (reg-tilegx32.c): New rule.
9350 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9351 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9352 different register info initializer according to elf class.
9353 (init_registers_tilgx32): New function. The tilegx32 register info
9354 initializer.
9355 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9356 (tile_store_gregset): Likewise.
9357
d171ca78
YQ
93582013-02-27 Yao Qi <yao@codesourcery.com>
9359
9360 * server.c (process_point_options): Print debug message when
9361 debug_threads is true.
9362
282bbdf3
YQ
93632013-02-26 Yao Qi <yao@codesourcery.com>
9364
9365 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9366
aca22551
PA
93672013-02-19 Pedro Alves <palves@redhat.com>
9368 Kai Tietz <ktietz@redhat.com>
9369
9370 PR gdb/15161
9371
9372 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9373 instead of strtoul to extract address from packet.
9374 (process_serial_event) <'z'>: Likewise.
9375
4f3cee1c
YQ
93762013-02-18 Yao Qi <yao@codesourcery.com>
9377
9378 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9379
8e1d55a3
PA
93802013-02-14 Pedro Alves <palves@redhat.com>
9381
9382 Plug memory leak.
9383
9384 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9385 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9386
458820da
PA
93872013-02-14 Pedro Alves <palves@redhat.com>
9388
9389 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9390
baea0dae
PA
93912013-02-14 Pedro Alves <palves@redhat.com>
9392
9393 * tracepoint.c (save_string): Delete.
9394 (add_tracepoint_action): Use savestring instead of save_string.
9395
0b1afbb3
PA
93962013-02-12 Pedro Alves <palves@redhat.com>
9397
9398 * linux-xtensa-low.c: Ditto.
9399 * xtensa-xtregs.c: Ditto.
9400
8a4ac37e
PA
94012013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9402
9403 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9404 thread_db.
9405
148de6bb
MS
94062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9407
9408 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9409 aarch64_num_wp_regs and aarch64_num_bp_regs to
9410 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9411
55fac6e0
MS
94122013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9413
9414 * linux-aarch64-low.c (ps_get_thread_area): Replace
9415 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9416
176eb98c
MS
94172013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9418 Marcus Shawcroft <marcus.shawcroft@arm.com>
9419 Nigel Stephens <nigel.stephens@arm.com>
9420 Yufeng Zhang <yufeng.zhang@arm.com>
9421
9422 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9423 (aarch64.c, aarch64-without-fpu.c): New targets.
9424 * configure.srv (aarch64*-*-linux*): New.
9425 * linux-aarch64-low.c: New file.
9426
56f7af9c
MS
94272013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9428
43aaf8b6 9429 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9430 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9431 (dequeue_one_deferred_signal, linux_resume_one_thread)
9432 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9433 (linux_tracefork_grandchild, linux_test_for_tracefork)
9434 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9435 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9436 where the argument is 0.
9437
60f662b0
YQ
94382013-01-25 Yao Qi <yao@codesourcery.com>
9439
9440 * event-loop.c: Include "queue.h".
9441 (gdb_event_p): New typedef.
9442 (struct gdb_event) <next_event>: Remove.
9443 (event_queue): Change to QUEUE(gdb_event_p).
9444 (async_queue_event): Remove.
9445 (gdb_event_xfree): New.
9446 (initialize_event_loop): New.
9447 (process_event): Use API from QUEUE.
9448 (wait_for_event): Likewise.
9449 * server.c (main): Call initialize_event_loop.
9450 * server.h (initialize_event_loop): Declare.
9451
5ae4861a
YQ
94522013-01-18 Yao Qi <yao@codesourcery.com>
9453
9454 * ax.h (struct eval_agent_expr_context): New.
9455 (gdb_eval_agent_expr): Update declaration.
9456 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9457 TFRAME. Add new argument CTX.
9458 * server.h (struct eval_agent_expr_context): Declare.
9459 (agent_mem_read, agent_tsv_read): Update declaration.
9460 (agent_mem_read_string): Likewise.
9461 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9462 (add_traceframe_block): Add new argument TPOINT.
9463 Increase TPOINT->traceframe_usage.
9464 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9465 eval_tracepoint_agent_expr.
9466 (condition_true_at_tracepoint): Likewise.
9467 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9468 (agent_mem_read_string, agent_tsv_read): Likewise.
9469
85e00e85
YQ
94702013-01-16 Yao Qi <yao@codesourcery.com>
9471
9472 * linux-low.c (linux_resume_one_lwp): Don't check
9473 'lwp->bp_reinsert != 0'.
9474
4039cf45
JB
94752013-01-07 Joel Brobecker <brobecker@adacore.com>
9476 Pedro Alves <palves@redhat.com>
9477
9478 * lynx-low.c (ptrace_request_to_str): Define a temporary
9479 macro and use it to simplify this function's implementation.
9480
9044dee2
JB
94812013-01-07 Joel Brobecker <brobecker@adacore.com>
9482
9483 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9484 sets errno.
9485
e6352c8f
JB
94862013-01-07 Joel Brobecker <brobecker@adacore.com>
9487
9488 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9489
50681a27
JB
94902013-01-07 Joel Brobecker <brobecker@adacore.com>
9491
9492 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9493
3f6e77ef
JB
94942013-01-07 Joel Brobecker <brobecker@adacore.com>
9495
9496 * lynx-low.c (lynx_resume): Use the resume_info parameter
9497 to determine the ptid for the lynx_ptrace call, unless
9498 it is equal to minus_one_ptid, in which case we use the
9499 ptid of the current_inferior.
9500 (lynx_wait_1): After having received a thread create/exit
9501 event, resume the inferior's execution using the signaling
9502 thread's ptid, rather than the old ptid.
9503
7fda33ae
JB
95042013-01-07 Joel Brobecker <brobecker@adacore.com>
9505
9506 * lynx-low.c (lynx_resume): Delete variable ret.
9507
b9786c74
JB
95082013-01-01 Joel Brobecker <brobecker@adacore.com>
9509
9510 * gdbreplay.c (gdbreplay_version): Update copyright year.
9511 * server.c (gdbserver_version): Likewise.
9512
8b93d60f
JB
95132012-12-17 Joel Brobecker <brobecker@adacore.com>
9514
9515 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9516 new thread.
9517
037335a7
JB
95182012-12-17 Joel Brobecker <brobecker@adacore.com>
9519
9520 * lynx-low.c (ptrace_request_to_str): Add handling for
9521 PTRACE_GETTRACESIG.
9522
52d4cbd8
JB
95232012-12-17 Joel Brobecker <brobecker@adacore.com>
9524
9525 * lynx-low.c (lynx_attach): Delete variable new_process.
9526
ab8f6ca9
JB
95272012-12-17 Joel Brobecker <brobecker@adacore.com>
9528
9529 * lynx-low.c (lynx_create_inferior): Delete variable
9530 new_process.
9531
78cbc024
JB
95322012-12-17 Joel Brobecker <brobecker@adacore.com>
9533
9534 * lynx-low.c (ptrace_request_to_str): Do not handle
9535 PTRACE_GETTHREADLIST if this macro does not exist.
9536
14a00470
YQ
95372012-12-15 Yao Qi <yao@codesourcery.com>
9538
9539 * Makefile.in (OBS): Add notif.o.
9540 * notif.c, notif.h: New.
9541 * server.c: Include "notif.h".
9542 (struct vstop_notif) <next>: Remove.
9543 <base>: New field.
9544 (queue_stop_reply): Update.
9545 (push_event, send_next_stop_reply): Remove.
9546 (discard_queued_stop_replies): Update.
9547 (notif_stop): New variable.
9548 (handle_v_stopped): Remove.
9549 (handle_v_requests): Don't call handle_v_stopped. Call
9550 handle_ack_notif instead.
9551 (queue_stop_reply_callback): Call notif_event_enque instead
9552 of queue_stop_reply.
9553 (handle_status): Don't call send_next_stop_reply, call
9554 notif_write_event instead.
9555 (kill_inferior_callback): Likewise.
9556 (detach_or_kill_inferior_callback): Likewise.
9557 (main): Call initialize_notif.
9558 (process_serial_event): Call QUEUE_is_empty.
9559 (handle_target_event): Call notif_push instead of push event.
9560 * server.h (push_event): Remove declaration.
9561
61c125b9
TT
95622012-12-10 Tom Tromey <tromey@redhat.com>
9563
9564 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9565 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9566 macros.
9567 (.c.o): Rewrite.
9568 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9569 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9570 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9571 (amd64-linux-ipa.o, ax.o): Rewrite.
9572 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9573 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9574 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9575 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9576 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9577 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9578 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9579 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9580 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9581 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9582 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9583 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9584 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9585 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9586 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9587 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9588 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9589 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9590 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9591 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9592 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9593 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9594 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9595 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9596 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9597 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9598 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9599 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9600 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9601 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9602 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9603 (reg-tilegx.o): Remove.
9604 (all_object_files): New macro.
9605 Include .deps files.
9606 * aclocal.m4, configure: Rebuild.
9607 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9608 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9609 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9610
e90e9ad9
TT
96112012-12-05 Tom Tromey <tromey@redhat.com>
9612
9613 PR gdb/14917:
9614 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9615
02d403bf 96162012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9617
9618 * configure.ac: Check for linux/perf_event.h.
9619 * config.in: Regenerated.
9620 * configure: Regenerated.
9621
0270a750
PA
96222012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9623
9624 * hostio.c (handle_readlink): Decrease buffer size
9625 parameter passed to readlink by one byte.
9626
8c29b58e
YQ
96272012-11-26 Yao Qi <yao@codesourcery.com>
9628
9629 * configure.ac (build_warnings): Append '-Wempty-body'.
9630 * configure: Regenerated.
9631 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9632 body.
9633
8bdce1ff
PM
96342012-11-15 Pierre Muller <muller@sourceware.org>
9635
9636 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9637 * config.in: Regenerate.
9638 * configure: Regenerate.
9639 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9640 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9641 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9642 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9643 header.
9644 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9645 instead of <sys/wait.h> header.
9646 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9647
02d403bf 96482012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9649
9650 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9651 (various make rules): Remove -DGDBSERVER
9652
fbd5db48
YQ
96532012-11-09 Yao Qi <yao@codesourcery.com>
9654
9655 * spu-low.c (current_ptid): Move it to ..
9656 * gdbthread.h: ... here. New.
9657 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9658 * server.c (myresume, process_serial_event): Likewise.
9659 * thread-db.c (thread_db_find_new_threads): Likewise.
9660 * tracepoint.c (run_inferior_command): Likewise.
9661
b3dc46ff
AB
96622012-10-01 Andrew Burgess <aburgess@broadcom.com>
9663
9664 * server.c (handle_search_memory_1): Include access length in
9665 warning message.
9666
07c04788
HPN
96672012-09-05 Michael Brandt <michael.brandt@axis.com>
9668
9669 * linux-crisv32-low.c: Fix compile errors.
9670
918d227b
YQ
96712012-09-04 Yao Qi <yao@codesourcery.com>
9672
9673 * tracepoint.c (cmd_qtsv): Adjust debug message.
9674 Don't check CUR_TPOINT.
9675
18c1b81a
YQ
96762012-08-28 Yao Qi <yao@codesourcery.com>
9677
9678 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9679 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9680 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9681 Remove declarations of xmalloc, xreallloc, xstrdup and
9682 freeargv.
9683 * Makefile.in (libiberty_h): New.
9684 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9685 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9686
dc82f37b
YQ
96872012-08-23 Yao Qi <yao@codesourcery.com>
9688
9689 * server.h: Remove declaration of 'xsnprintf'.
9690
406b1477
KS
96912012-08-22 Keith Seitz <keiths@redhat.com>
9692
9693 * server.h: Include build-gnulib-gbserver/config.h.
9694 * gdbreplay.c: Likewise.
9695
e6712ff1
DE
96962012-08-08 Doug Evans <dje@google.com>
9697
9698 * Makefile.in (SFILES): Add gdb_vecs.c.
9699 (OBS): Add gdb_vecs.o.
9700 (gdb_vecs_h, host_defs_h): New variables.
9701 (thread-db.o): Add $(gdb_vecs_h) dependency.
9702 (gdb_vecs.o): New rule.
9703 * thread-db.c: #include "gdb_vecs.h".
9704 (thread_db_load_search): Use a vector to iterate over path elements.
9705 Handle text appearing after "$pdir".
9706
9707 * configure.ac: Add check for strstr.
9708 * config.in: Regenerate.
9709 * configure: Regenerate.
9710
7c3270ae
UW
97112012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9712
9713 * hostio.c (handle_pread): If pread fails, fall back to attempting
9714 lseek/read.
9715 (handle_pwrite): Likewise for pwrite.
9716
b62e2b27
UW
97172012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9718
9719 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9720 between unsupported TYPE and unimplementable ADDR/LEN combination.
9721 (arm_insert_point): Act on new return value.
9722
78a99e91
PA
97232012-07-31 Pedro Alves <palves@redhat.com>
9724
9725 * server.c (process_point_options): Only skip tokens if we find
9726 one that is unrecognized. Don't treat 'X' specially while
9727 skipping unrecognized tokens.
9728
fcf303ab
UW
97292012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9730
9731 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9732 to 4-byte-align HW breakpoint addresses for Thumb.
9733
7255706c
YQ
97342012-07-27 Yao Qi <yao@codesourcery.com>
9735
9736 PR remote/14161.
9737
9738 * server.h: Declare gdb_agent_about_to_close.
9739 * target.c (kill_inferior): Include "agent.h".
9740 New. Send command 'kill'.
9741 * target.h (kill_inferior): Removed macro.
9742 * tracepoint.c (gdb_agent_about_to_close): New.
9743 (gdb_agent_helper_thread): Handle command 'close'.
9744 Wait endlessly until the inferior stops.
9745 Install gdb_agent_remove_socket to atexit hook.
9746 (agent_socket_name): New static variable.
9747 (gdb_agent_socket_init): Replace local variable 'name' with
9748 'agent_socket_name'.
9749 (gdb_agent_remove_socket): New.
9750
5a3f286f
YQ
97512012-07-27 Yao Qi <yao@codesourcery.com>
9752
9753 * server.c (process_point_options): Stop at 'X' when parsing.
9754
961bd387
ME
97552012-07-19 Michael Eager <eager@eagercon.com>
9756
a261b8f5 9757 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9758 to hw_execute.
9759 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9760 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9761 hardware breakpoint.
9762
aa7c7447
JK
97632012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9764
9765 * gdbserver/linux-low.c (initialize_low): Call
9766 linux_ptrace_init_warnings.
9767
7f216e7c
DE
97682012-07-02 Doug Evans <dje@google.com>
9769
9770 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9771 pointer to int.
9772
d3ce09f5
SS
97732012-07-02 Stan Shebs <stan@codesourcery.com>
9774
9775 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9776 (ax.o): Add it to build rule.
9777 (ax-ipa.o): Ditto.
9778 (OBS): Add format.o.
9779 (IPA_OBS): Add format.o.
9780 * server.c (handle_query): Claim support for breakpoint commands.
9781 (process_point_options): Add command case.
9782 (process_serial_event): Leave running if there are printfs in
9783 effect.
9784 * mem-break.h (any_persistent_commands): Declare.
9785 (add_breakpoint_commands): Declare.
9786 (gdb_no_commands_at_breakpoint): Declare.
9787 (run_breakpoint_commands): Declare.
9788 * mem-break.c (struct point_command_list): New struct.
9789 (struct breakpoint): New field command_list.
9790 (any_persistent_commands): New function.
9791 (add_commands_to_breakpoint): New function.
9792 (add_breakpoint_commands): New function.
9793 (gdb_no_commands_at_breakpoint): New function.
9794 (run_breakpoint_commands): New function.
9795 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9796 locally.
9797 * ax.c: Include format.h.
9798 (ax_printf): New function.
9799 (gdb_eval_agent_expr): Add printf opcode.
9800
2f8f6aed
YQ
98012012-06-13 Yao Qi <yao@codesourcery.com>
9802
9803 * server.c (start_inferior): Remove duplicated writes to fields
9804 'last_resume_kind' and 'last_status' of 'current_inferior'.
9805
0c9070b3
YQ
98062012-06-12 Yao Qi <yao@codesourcery.com>
9807 Pedro Alves <palves@redhat.com>
9808
9809 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9810 comment.
9811 * server.c (handle_v_cont): Extend comment.
9812
c52daf70
YQ
98132012-06-11 Yao Qi <yao@codesourcery.com>
9814
9815 * linux-low.c (linux_attach): Add 'static'.
9816
d38bbb0a
YQ
98172012-06-06 Yao Qi <yao@codesourcery.com>
9818
9819 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9820
89dc0afd
JK
98212012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9822
9823 Fix gcc -flto compilation warning.
9824 * server.c (main): Make variable multi_mode and attach volatile.
9825
75f62ce7
TJB
98262012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9827
9828 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9829 if the platform doesn't know about it.
9830
65f479b6
PA
98312012-05-30 Jeff Kenton <jkenton@tilera.com>
9832
9833 * Makefile.in (SFILES): Add linux-tile-low.c.
9834 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9835 * configure.srv: Handle tilegx-*-linux*.
9836 * linux-tile-low.c: New file.
9837
0c5bf5a9
JK
98382012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9839
9840 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9841
a493e3e2
PA
98422012-05-24 Pedro Alves <palves@redhat.com>
9843
9844 PR gdb/7205
9845
43aaf8b6 9846 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9847
2ea28649
PA
98482012-05-24 Pedro Alves <palves@redhat.com>
9849
9850 PR gdb/7205
9851
9852 Replace target_signal with gdb_signal throughout.
9853
8d409d16
MR
98542012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9855
9856 * linux-low.c (linux_store_registers): Avoid the copying sequence
9857 when no data has been retrieved by ptrace.
9858
23512c01
MGD
98592012-05-22 Will Deacon <will.deacon@arm.com>
9860
9861 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9862 Include asm/ptrace.h.
9863 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9864 already defined.
9865
4934b29e
MR
98662012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9867
9868 * linux-low.c (linux_store_registers): Don't re-retrieve data
9869 with ptrace that has already been obtained from /proc. Always
9870 copy any data retrieved with ptrace to the buffer supplied.
9871
bde24c0a
PA
98722012-05-11 Yao Qi <yao@codesourcery.com>
9873 Pedro Alves <palves@redhat.com>
9874
9875 * linux-low.c (enum stopping_threads_kind): New.
9876 (stopping_threads): Change type to `enum stopping_threads_kind'.
9877 (handle_extended_wait): If stopping and suspending threads, leave
9878 the new_lwp suspended too.
9879 (linux_wait_for_event): Adjust.
9880 (stop_all_lwps): Set `stopping_threads' to
9881 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9882 whether we're suspending threads or just stopping them. Assert no
9883 recursion happens.
9884
623b6bdf
YQ
98852012-04-29 Yao Qi <yao@codesourcery.com>
9886
9887 * server.h: Move some code to ...
9888 * gdbthread.h: ... here. New.
9889 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9890 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9891 (nto-low.o, win32-low.o): Likewise.
9892 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9893 * regcache.c, remote-utils.c, server.c: Likewise.
9894 * target.c, tracepoint.c, win32-low.c: Likewise.
9895
f15f9948
TJB
98962012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9897
9898 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9899 (PTRACE_ARG4_TYPE): Likewise.
9900 (PTRACE_XFER_TYPE): Likewise.
9901 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9902 ptrace to PTRACE_ARG3_TYPE.
9903 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9904 (PTRACE_ARG4_TYPE): Likewise.
9905 (PTRACE_XFER_TYPE): Likewise.
9906 (linux_detach_one_lwp): Cast fourth argument of
9907 ptrace to long then PTRACE_ARG4_TYPE.
9908 (regsets_fetch_inferior_registers): Cast third argument of
9909 ptrace to long then PTRACE_ARG3_TYPE.
9910 (regsets_store_inferior_registers): Likewise.
9911
38ea300a
PA
99122012-04-20 Pedro Alves <palves@redhat.com>
9913
9914 * configure: Regenerate.
9915
c971b7fa
PA
99162012-04-19 Pedro Alves <palves@redhat.com>
9917
43aaf8b6 9918 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9919 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9920 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9921 (all, install-only, uninstall, clean-info, all-lib, clean): No
9922 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9923 (maintainer-clean realclean distclean): Use subdir_do.
9924 (subdir_do): New.
9925 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9926 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9927 * acinclude.m4: Include acx_configure_dir.m4.
9928 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9929 calls. Call AC_PROG_RANLIB. Configure gnulib using
9930 ACX_CONFIGURE_DIR.
9931 (GNULIB): New.
9932 (GNULIB_STDINT_H): Adjust.
9933 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9934 * gdbreplay.c: Include build-gnulib/config.h.
9935 * server.h: Likewise.
9936 * aclocal.m4: Regenerate.
9937 * config.in: Regenerate.
9938 * configure: Regenerate.
c971b7fa 9939
809277f8
PA
99402012-04-19 Pedro Alves <palves@redhat.com>
9941
9942 * Makefile.in (LIBGNU, INCGNU): Adjust.
9943 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9944 (all, install-only, uninstall, clean-info, all-lib, clean)
9945 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9946 * configure.ac: Adjust AC_OUTPUT output.
9947 * aclocal.m4: Regenerate.
9948 * configure: Regenerate.
9949
fd9bb8b8
PA
99502012-04-19 Pedro Alves <palves@redhat.com>
9951
9952 * Makefile.in (generated_files): New.
9953 (server_h): Remove the explicit dependency on config.h, and depend
9954 on $generated_files.
9955
1c298c66
PA
99562012-04-19 Pedro Alves <palves@redhat.com>
9957
9958 * Makefile.in (INCGNU): Add -Ignulib.
9959
57c4b50b
PA
99602012-04-19 Pedro Alves <palves@redhat.com>
9961
9962 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9963 (INCGNU): ... this, and spell out -I here.
9964 (GNULIB_LIB): Rename to ...
9965 (LIBGNU): ... this.
9966 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9967
1030e047
PA
99682012-04-19 Pedro Alves <palves@redhat.com>
9969
9970 * config.in: Regenerate.
9971
447d4319
PA
99722012-04-19 Pedro Alves <palves@redhat.com>
9973
9974 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9975 * server.h (memmem): Remove declaration.
9976 * config.in: Regenerate.
9977 * configure: Regenerate.
9978
aad9eab9
YQ
99792012-04-19 Yao Qi <yao@codesourcery.com>
9980
9981 * Makefile.in (SFILES): Add common/vec.c.
9982 (OBS): Add vec.o.
9983 (vec.o): New rule.
9984
3e10640f
YQ
99852012-04-19 Yao Qi <yao@codesourcery.com>
9986
9987 * remote-utils.c (prepare_resume_reply): Replace with macro
9988 target_core_of_thread.
9989 * server.c (handle_qxfer_threads_proper): Likewise.
9990 * target.h (traget_core_of_thread): New macro.
9991
71622373
PA
99922012-04-18 Pedro Alves <palves@redhat.com>
9993
9994 * aclocal.m4: Regenerate.
9995 * configure: Regenerate.
9996
80d26939
YQ
99972012-04-16 Yao Qi <yao@codesourcery.com>
9998
9999 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10000 duplicated on address.
10001
42476b70
YQ
100022012-04-16 Yao Qi <yao@codesourcery.com>
10003
10004 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10005 (struct tracepoint_action_ops) <send>: New field.
10006 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10007 (agent_expr_send, x_tracepoint_action_send): New.
10008 (l_tracepoint_action_send): New.
10009 (cmd_qtdp): Download and install tracepoint
10010 according to `use_agent'.
10011 (run_inferior_command): Add one more parameter `len'.
10012 Update callers.
10013 (tracepoint_send_agent): New.
10014 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10015
7bc83639
YQ
100162012-04-16 Yao Qi <yao@codesourcery.com>
10017
10018 * tracepoint.c (download_tracepoints): Moved to ...
10019 (cmd_qtstart): ... here.
10020
5f18041e
YQ
100212012-04-14 Yao Qi <yao@codesourcery.com>
10022
10023 * tracepoint.c: Include inttypes.h.
10024 (struct collect_memory_action): Use sized types.
10025 (struct tracepoint): Likewise.
10026 (cmd_qtdp, stop_tracing): Update print specifiers.
10027 (cmd_qtp, response_tracepoint): Likewise.
10028 (collect_data_at_tracepoint): Likewise.
10029 (collect_data_at_step): Likewise.
10030
55a8c076
YQ
100312012-04-14 Yao Qi <yao@codesourcery.com>
10032
10033 Import gnulib module inttypes.
10034 * aclocal.m4, config.in, configure: Regenerated.
10035
dc750257
YQ
100362012-04-14 Yao Qi <yao@codesourcery.com>
10037
10038 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10039 Makefile and config.status at last.
10040
0ab5faf9
YQ
100412012-04-13 Yao Qi <yao@codesourcery.com>
10042
10043 * tracepoint.c: Include stdint.h unconditionally.
10044
18f5fd81
TJB
100452012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10046
10047 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10048 on BFD_HAVE_SYS_PROCFS_TYPE.
10049 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10050 * configure: Regenerate.
10051 * config.in: Likewise.
10052
4d47af5c
L
100532012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10054
10055 * Makefile.in (clean): Also remove x32.c x32-linux.c
10056 x32-avx.c x32-avx-linux.c.
10057 (x32.o): New target.
10058 (x32.c): Likewise.
10059 (x32-linux.o): Likewise.
10060 (x32-linux.c): Likewise.
10061 (x32-avx.o): Likewise.
10062 (x32-avx.c): Likewise.
10063 (x32-avx-linux.o): Likewise.
10064 (x32-avx-linux.c): Likewise.
10065
10066 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10067 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10068 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10069 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10070 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10071 i386/x32-avx-linux.xml.
10072
10073 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10074 (init_registers_x32_avx_linux): Likwise.
10075 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10076 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10077
ecedbe58
PA
100782012-04-13 Pedro Alves <palves@redhat.com>
10079
10080 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10081 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10082 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10083 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10084 the sub-make.
10085
c92b5177
L
100862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10087
10088 * linux-x86-low.c (compat_x32_clock_t): New.
10089 (compat_x32_siginfo_t): Likewise.
10090 (compat_x32_siginfo_from_siginfo): Likewise.
10091 (siginfo_from_compat_x32_siginfo): Likewise.
10092 (linux_is_elf64): Likewise.
10093 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10094 and siginfo_from_compat_x32_siginfo for x32.
10095 (x86_arch_setup): Set linux_is_elf64.
10096
214d508e
L
100972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10098
10099 PR gdb/13969
10100 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10101 e_machine field.
10102 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10103 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10104 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10105 compatible with process.
10106
c9a1864a
YQ
101072012-04-12 Yao Qi <yao@codesourcery.com>
10108
10109 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10110 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10111 (install-only, install-info, clean): Handle sub dir gnulib.
10112 (all-lib, am--refresh): New targets.
10113 (memmem.o): Remove target.
10114 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10115 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10116 (AC_REPLACE_FUNCS): Remove memmem.
10117 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10118 (AC_OUTPUT): Generate Makefile in gnulib/.
10119 * aclocal.m4, config.in, configure: Regenerated.
10120
367ba2c2
MR
101212012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10122
10123 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10124
9d236627
PA
101252012-04-05 Pedro Alves <palves@redhat.com>
10126
10127 -Werror=strict-aliasing
10128
10129 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10130 pointer.
10131
111217b3
PA
101322012-04-04 Pedro Alves <palves@redhat.com>
10133
10134 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10135 (sparc_store_gregset_from_stack, sparc_store_gregset)
10136 (sparc_breakpoint_at): Fix formatting.
10137
8365dcf5
TJB
101382012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10139
10140 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10141 are available.
10142 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10143 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10144 * config.in: Regenerate.
10145 * configure: Likewise.
10146
689cc2ae
PA
101472012-03-29 Pedro Alves <palves@redhat.com>
10148
10149 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10150 Correct ptrace arguments.
10151
c14dfd32
PA
101522012-03-28 Pedro Alves <palves@redhat.com>
10153
10154 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10155 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10156 (IA64_FR1_REGNUM): New defines.
10157 (ia64_fetch_register): New.
10158 (the_low_target): Install it.
10159 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10160 field.
10161 * linux-low.c (linux_fetch_registers): Try the
10162 the_low_target.fetch_register hook first.
10163
10164 * linux-arm-low.c (the_low_target): Adjust.
10165 * linux-bfin-low.c (the_low_target): Adjust.
10166 * linux-cris-low.c (the_low_target): Adjust.
10167 * linux-crisv32-low.c (the_low_target): Adjust.
10168 * linux-m32r-low.c (the_low_target): Adjust.
10169 * linux-m68k-low.c (the_low_target): Adjust.
10170 * linux-mips-low.c (the_low_target): Adjust.
10171 * linux-ppc-low.c (the_low_target): Adjust.
10172 * linux-s390-low.c (the_low_target): Adjust.
10173 * linux-sh-low.c (the_low_target): Adjust.
10174 * linux-sparc-low.c (the_low_target): Adjust.
10175 * linux-tic6x-low.c (the_low_target): Adjust.
10176 * linux-x86-low.c (the_low_target): Adjust.
10177 * linux-xtensa-low.c (the_low_target): Adjust.
10178
63c88e13
PA
101792012-03-26 Pedro Alves <palves@redhat.com>
10180
10181 * server.c (handle_qxfer_libraries): Don't bail early if
10182 the_target->qxfer_libraries_svr4 is not NULL.
10183
fb723180
PA
101842012-03-26 Pedro Alves <palves@redhat.com>
10185
10186 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10187
0afae3cf
PA
101882012-03-23 Pedro Alves <palves@redhat.com>
10189
10190 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10191 "library-list-svr4" element's start tag when the the DSO list is
10192 empty.
10193
485f1ee4
PA
101942012-03-23 Pedro Alves <palves@redhat.com>
10195
10196 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10197 a variable whose type size is the same as the inferior's pointer
10198 size.
10199
a5362b9a
TS
102002012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10201
10202 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10203 struct siginfo.
10204 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10205 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10206 * linux-low.h: Include <signal.h>.
10207 (struct siginfo): Remove forward declaration.
10208 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10209 struct siginfo.
10210
d226c142
MF
102112012-03-21 Mike Frysinger <vapier@gentoo.org>
10212
10213 * .gitignore: Ignore more files.
10214
122f36ef
PA
102152012-03-19 Pedro Alves <palves@redhat.com>
10216 Jan Kratochvil <jan.kratochvil@redhat.com>
10217
10218 * server.c (cont_thread, general_thread): Add describing comments.
10219 (start_inferior): Clear `cont_thread'.
10220 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10221 of a process.
10222
fc3e5175
YQ
102232012-03-15 Yao Qi <yao@codesourcery.com>
10224
10225 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10226 handling to ...
10227 (cmd_qtdp): ... here.
10228
8d0d92cd
YQ
102292012-03-15 Yao Qi <yao@codesourcery.com>
10230
10231 * tracepoint.c (struct tracepoint_action_ops): New.
10232 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10233 (m_tracepoint_action_download): New.
10234 (r_tracepoint_action_download): New.
10235 (x_tracepoint_action_download): New.
10236 (l_tracepoint_action_download): New.
10237 (add_tracepoint_action): Install `action->ops' according type.
10238 (download_tracepoint_1): Move code `download' function pointer
10239 of various tracepoint_action_ops.
10240
87b0bb13
JK
102412012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10242
10243 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10244 linux_ptrace_attach_warnings.
10245
5f572dec
JK
102462012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10247
10248 * Makefile.in (linux-ptrace.o): New.
10249 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10250 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10251 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10252 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10253 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10254 of these targets.
10255 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10256
f4647387
YQ
102572012-03-08 Yao Qi <yao@codesourcery.com>
10258 Pedro Alves <palves@redhat.com>
10259
10260 Fix PR server/13392.
10261 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10262 offset of JMP insn.
10263 * tracepoint.c (remove_tracepoint): New.
10264 (cmd_qtdp): Call remove_tracepoint when failed to install.
10265
9b224c5e
PA
102662012-03-07 Pedro Alves <palves@redhat.com>
10267
10268 * linux-low.c (get_detach_signal): New.
10269 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10270 Pass on pending signals to PTRACE_DETACH. Check the result of the
10271 ptrace call.
10272 * server.c (program_signals, program_signals_p): New.
10273 (handle_general_set): Handle QProgramSignals.
10274 * server.h (program_signals, program_signals_p): Declare.
10275
e237a7e2
JK
102762012-03-05 Pedro Alves <palves@redhat.com>
10277 Jan Kratochvil <jan.kratochvil@redhat.com>
10278
10279 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10280 New comment why.
10281
5808517f
YQ
102822012-03-03 Yao Qi <yao@codesourcery.com>
10283
10284 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10285 agent_look_up_symbols.
10286
58b4daa5
YQ
102872012-03-03 Yao Qi <yao@codesourcery.com>
10288
10289 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10290 (linux-x86-low.o): Likewise.
10291 * server.h: Remove in_process_agent_loaded.
10292 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10293 common/agent.c.
10294 Update callers.
10295
8ffcbaaf
YQ
102962012-03-03 Yao Qi <yao@codesourcery.com>
10297
10298 * tracepoint.c (gdb_agent_capability): New global.
10299 (in_process_agent_loaded_ust): Renamed to
10300 `in_process_agent_supports_ust'.
10301 Update callers.
10302 (in_process_agent_supports_ust): Call agent_capability_check.
10303 (clear_installed_tracepoints): Assert that agent supports
10304 agent.
10305
d1feda86
YQ
103062012-03-03 Yao Qi <yao@codesourcery.com>
10307
10308 * linux-low.c (linux_supports_agent): New.
10309 (linux_target_ops): Initialize field `supports_agent' with
10310 linux_supports_agent.
10311 * target.h (struct target_ops) <supports_agent>: New.
10312 (target_supports_agent): New macro.
10313 * server.c (handle_general_set): Handle packet 'QAgent'.
10314 (handle_query): Send `QAgent+'.
10315 * Makefile.in (server.o): Depends on agent.h.
10316
2fa291ac
YQ
103172012-03-03 Yao Qi <yao@codesourcery.com>
10318
10319 * Makefile.in (OBS): Add agent.o.
10320 Add new rule for agent.o.
10321 Track dependence of tracepoint.c on agent.h.
10322 * tracepoint.c (run_inferior_command_1):
10323 (run_inferior_command): Call agent_run_command.
10324 (gdb_ust_connect_sync_socket): Deleted. Move it to
10325 common/agent.c.
10326 (resume_thread, stop_thread): Likewise.
10327 (gdb_ust_socket_init): Renamed to ...
10328 (gdb_agent_socket_init): ... New.
10329 (gdb_ust_thread): Renamed to ...
10330 (gdb_agent_helper_thread): ... New.
10331 (gdb_ust_init): Move some code to ...
10332 (gdb_agent_init): ... here. New.
10333 [HAVE_UST]: Call gdb_ust_init.
10334 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10335 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10336 * config.in, configure: Regenerated.
10337
05044653
PA
103382012-03-02 Pedro Alves <palves@redhat.com>
10339
10340 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10341 * linux-low.c (struct simple_pid_list): New.
10342 (stopped_pids): New a struct simple_pid_list pointer.
10343 (add_to_pid_list, pull_pid_from_list): New.
10344 (handle_extended_wait): Don't assume the first signal new children
10345 report is SIGSTOP. Adjust call to pull_pid_from_list.
10346 (linux_wait_for_lwp): Adjust.
10347
8d00225b
YQ
103482012-03-02 Yao Qi <yao@codesourcery.com>
10349
10350 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10351 debug log.
10352
19560ba5
YQ
103532012-03-02 Yao Qi <yao@codesourcery.com>
10354
10355 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10356 `stop_pc' and `tpoint'. Update caller.
10357
1faeff08
MR
103582012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10359
10360 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10361 * linux-low.c (use_linux_regsets): New macro.
10362 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10363 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10364 (linux_register_in_regsets): New function.
10365 (usr_fetch_inferior_registers): Skip registers covered by
10366 regsets.
10367 (usr_store_inferior_registers): Likewise.
10368 (usr_fetch_inferior_registers): New macro.
10369 (usr_store_inferior_registers): Likewise.
10370 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10371 (linux_store_registers): Likewise.
10372 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10373 prototype.
10374 (init_registers_mips64_dsp_linux): Likewise.
10375 (init_registers_mips_linux): New macro.
10376 (init_registers_mips_dsp_linux): Likewise.
10377 (mips_dsp_num_regs): Likewise.
10378 (DSP_BASE, DSP_CONTROL): New fallback macros.
10379 (mips_base_regs): New macro.
10380 (mips_regmap): Use it. Fix the size.
10381 (mips_dsp_regmap): New variable.
10382 (mips_dsp_regset_bitmap): Likewise.
10383 (mips_arch_setup): New function.
10384 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10385 than mips_regmap.
10386 (mips_cannot_store_register): Likewise.
10387 (the_low_target): Update .arch_setup, .num_regs and .regmap
10388 initializers. Add .regset_bitmap initializer.
10389 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10390 initializer.
10391 * linux-bfin-low.c (the_low_target): Likewise.
10392 * linux-cris-low.c (the_low_target): Likewise.
10393 * linux-crisv32-low.c (the_low_target): Likewise.
10394 * linux-ia64-low.c (the_low_target): Likewise.
10395 * linux-m32r-low.c (the_low_target): Likewise.
10396 * linux-m68k-low.c (the_low_target): Likewise.
10397 * linux-ppc-low.c (the_low_target): Likewise.
10398 * linux-s390-low.c (the_low_target): Likewise.
10399 * linux-sh-low.c (the_low_target): Likewise.
10400 * linux-sparc-low.c (the_low_target): Likewise.
10401 * linux-tic6x-low.c (the_low_target): Likewise.
10402 * linux-x86-low.c (the_low_target): Likewise.
10403 * linux-xtensa-low.c (the_low_target): Likewise.
10404 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10405 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10406 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10407 srv_xmlfiles.
10408 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10409 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10410
c03e6ccc
YQ
104112012-02-29 Yao Qi <yao@codesourcery.com>
10412 Pedro Alves <palves@redhat.com>
10413
10414 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10415 `step_over_finished' is true.
10416
644cebc9
PA
104172012-02-27 Pedro Alves <palves@redhat.com>
10418
10419 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10420 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10421
c14d7ab2
PA
104222012-02-27 Pedro Alves <palves@redhat.com>
10423
10424 PR server/9684
10425 * linux-low.c (pid_is_stopped): New.
10426 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10427
412c89dd
LM
104282012-02-25 Luis Machado <lgustavo@codesourcery.com>
10429
10430 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10431 of conditions.
10432
b745defe
MR
104332012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10434
10435 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10436
9f3a5c85
LM
104372012-02-24 Luis Machado <lgustavo@codesourcery>
10438
10439 * server.c (handle_query): Advertise support for target-side
10440 breakpoint condition evaluation.
10441 (process_point_options): New function.
10442 (process_serial_event): When inserting a breakpoint, check for
10443 a target-side condition that should be evaluated.
10444
10445 * mem-break.c: Include regcache.h and ax.h.
10446 (point_cond_list_t): New data structure.
10447 (breakpoint) <cond_list>: New field.
10448 (find_gdb_breakpoint_at): Make non-static.
10449 (delete_gdb_breakpoint_at): Clear any target-side
10450 conditions.
10451 (clear_gdb_breakpoint_conditions): New function.
10452 (add_condition_to_breakpoint): Likewise.
10453 (add_breakpoint_condition): Likewise.
10454 (gdb_condition_true_at_breakpoint): Likewise.
10455 (gdb_breakpoint_here): Return result directly instead
10456 of going through a local variable.
10457
10458 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10459 (clear_gdb_breakpoint_conditions): Likewise.
10460 (add_breakpoint_condition): Likewise.
10461 (gdb_condition_true_at_breakpoint): Likewise.
10462
10463 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10464 (need_step_over_p): Take target-side breakpoint condition into
10465 consideration.
10466
5e1dc496
LM
104672012-02-24 Luis Machado <lgustavo@codesourcery>
10468
10469 * server.h: Include tracepoint.h.
10470 (agent_mem_read, agent_get_trace_state_variable_value,
10471 agent_set_trace_state_variable_value,
10472 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10473 get_set_tsv_func_addr): New prototypes.
10474
10475 * ax.h: New include file.
10476 * ax.c: New source file.
10477
10478 * tracepoint.c: Include ax.h.
10479 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10480 agent_expr, eval_result_type): Move to ax.h.
10481 (parse_agent_expr): Rename to ...
10482 (gdb_parse_agent_expr): ... this, make it non-static and move
10483 to ax.h.
10484 (unparse_agent_expr) Rename to ...
10485 (gdb_unparse_agent_expr): ... this, make it non-static and move
10486 to ax.h.
10487 (eval_agent_expr): Rename to ...
10488 (eval_tracepoint_agent_expr): ... this.
10489 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10490 forward declarations.
10491 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10492 (agent_get_trace_state_variable_value): New function.
10493 (agent_set_trace_state_variable_value): New function.
10494 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10495 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10496 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10497 (condition_true_at_tracepoint): Likewise.
10498 (parse_agent_expr): Rename to ...
10499 (gdb_parse_agent_expr): ... this and move to ax.c.
10500 (unparse_agent_expr): Rename to ...
10501 (gdb_unparse_agent_expr): ... this and move to ax.c.
10502 (gdb_agent_op_name): Move to ax.c.
10503 (eval_agent_expr): Rename to ...
10504 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10505 and move to ax.c.
10506 (eval_tracepoint_agent_expr): New function.
10507 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10508 non-static.
5e1dc496
LM
10509 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10510 ax.c.
10511 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10512 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10513 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10514 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10515 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10516 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10517 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10518 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10519 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10520 (compile_bytecodes): Remove forward declaration.
10521 (is_goto_target): Move to ax.c.
10522 (compile_bytecodes): Move to ax.c and call
10523 agent_get_trace_state_variable_value (...) and
10524 agent_set_trace_state_variable_value (...).
10525
10526 * Makefile.in: Update ax.c and IPA dependencies.
10527
277e4e52
PA
105282012-02-24 Pedro Alves <palves@redhat.com>
10529
10530 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10531 (cmd_bigqtbuffer_circular): ... this. Only handle
10532 'QTBuffer:circular:'.
10533 (handle_tracepoint_general_set): Adjust.
10534
bf4c19f7
YQ
105352012-02-16 Yao Qi <yao@codesourcery.com>
10536
10537 * inferiors.c: Move code to ...
10538 * dll.c: .... here. New.
10539 * server.h: Declare clear_dlls.
10540 * Makefile.in (SFILES): Add dll.c.
10541 (OBS): Add dll.o
10542 (dll.o): New rule.
10543
d73f2619
YQ
105442012-02-11 Yao Qi <yao@codesourcery.com>
10545
10546 * server.c: (handle_monitor_command): Add a new parameter
10547 `own_buf'.
10548 (handle_query): Update caller.
10549
f8255c2a
JB
105502012-02-09 Joel Brobecker <brobecker@adacore.com>
10551
10552 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10553 * configure, config.in: Regenerate.
10554 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10555 is not defined.
10556
da84f473
PA
105572012-02-02 Pedro Alves <palves@redhat.com>
10558
10559 Try SIGKILL first, then PTRACE_KILL.
10560 * linux-low.c (linux_kill_one_lwp): New.
10561 (linux_kill_one_lwp): Rename to ...
10562 (kill_one_lwp_callback): ... this. Use the new
10563 linux_kill_one_lwp.
10564
e886a173
PA
105652012-02-02 Pedro Alves <palves@redhat.com>
10566
10567 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10568 inferior.
10569
be07f1a2
PA
105702012-01-27 Pedro Alves <palves@redhat.com>
10571
10572 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10573 (elf_64_file_p): Make static.
10574 (linux_pid_exe_is_elf_64_file): New.
10575 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10576 Delete declarations.
10577 (linux_pid_exe_is_elf_64_file): Declare.
10578 * linux-x86-low.c (x86_arch_setup): Use
10579 linux_pid_exe_is_elf_64_file.
10580
d8301ad1
JK
105812012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10582
10583 * linux-low.c (linux_wait_for_event_1): Rename to ...
10584 (linux_wait_for_event): ... here and merge it with former
10585 linux_wait_for_event - new variable wait_ptid, use it.
10586 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10587
01b17894
PA
105882012-01-23 Pedro Alves <palves@redhat.com>
10589
10590 * server.c (main): Avoid yet another case of infinite loop while
10591 detaching/killing after a longjmp.
10592
e825046f
JK
105932012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10594
10595 Code cleanup.
10596 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10597
b9e7b9c3
UW
105982012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10599
10600 * hostio.c (handle_readlink): New function.
10601 (handle_vFile): Call it to handle "vFile:readlink" packets.
10602
901f9912
UW
106032012-01-20 Pedro Alves <palves@redhat.com>
10604 Ulrich Weigand <ulrich.weigand@linaro.org>
10605
10606 * server.c (handle_v_requests): Only support vAttach and vRun to
10607 start multiple processes when in extended protocol mode.
10608
fc1ab1a0
PA
106092012-01-17 Pedro Alves <palves@redhat.com>
10610
10611 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10612 memalign plus mprotect to allocate the scratch buffer.
10613
7d5d4e98
PA
106142012-01-13 Pedro Alves <palves@redhat.com>
10615
10616 * server.c (attach_inferior): Clear `cont_thread'.
10617
f128d5e9
PA
106182012-01-13 Pedro Alves <palves@redhat.com>
10619
10620 * server.c (main): Avoid infinite loop while detaching/killing
10621 after a longjmp.
10622
06db92f0
DE
106232012-01-09 Doug Evans <dje@google.com>
10624
10625 * server.c (start_inferior): Set last_ptid in --wrapper case.
10626
32d92999
YQ
106272012-01-06 Yao Qi <yao@codesourcery.com>
10628
10629 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10630 defined.
10631 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10632
5e0a92a9
YQ
106332012-01-04 Yao Qi <yao@codesourcery.com>
10634
10635 * tracepoint.c (cmd_qtdp): Print debug message
10636 for static tracepoint.
10637
ae639e8c
YQ
106382012-01-04 Yao Qi <yao@codesourcery.com>
10639
10640 * tracepoint.c (trace_vdebug): Differentiate debug message
10641 between gdbserver and IPA.
10642
f72429c5
YQ
106432012-01-03 Yao Qi <yao@codesourcery.com>
10644
10645 * tracepoint.c (tracepoint_was_hit): Don't collect for
10646 static tracepoint.
10647
12c3e59c
JB
106482012-01-02 Joel Brobecker <brobecker@adacore.com>
10649
10650 * terminal.h: Reformat copyright header.
10651
67827812
JB
106522012-01-02 Joel Brobecker <brobecker@adacore.com>
10653
10654 * server.c (gdbserver_version): Update copyright year.
10655 * gdbreplay.c (gdbreplay_version): Likewise.
10656
3e52c33d
JK
106572011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10658
10659 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10660
10661 Revert:
10662 2011-12-18 Hui Zhu <teawater@gmail.com>
10663 * linux-low.c (linux_create_inferior): Save return value to ret.
10664
66f1260e
HZ
106652011-12-18 Hui Zhu <teawater@gmail.com>
10666
10667 * linux-low.c (linux_create_inferior): Save return value to ret.
10668
e77616d7
DE
106692011-12-16 Doug Evans <dje@google.com>
10670
e7b06c57
DE
10671 * linux-low.c (linux_create_inferior): If stdio connection,
10672 redirect stdin from /dev/null, stdout to stderr.
10673 * remote-utils.c (remote_is_stdio): New static global.
10674 (remote_connection_is_stdio): New function.
10675 (remote_prepare): Handle stdio connection.
10676 (remote_open): Ditto.
10677 (remote_close): Don't close stdin for stdio connections.
10678 (read_prim,write_prim): New functions. Replace all calls to
10679 read/write to these.
10680 * server.c (main): Watch for "-" argument. Move call to
10681 remote_prepare before start_inferior.
10682 * server.h (STDIO_CONNECTION_NAME): New macro.
10683 (remote_connection_is_stdio): Declare.
10684
e77616d7
DE
10685 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10686 in debugging output.
10687
82067193
YQ
106882011-12-15 Yao Qi <yao@codesourcery.com>
10689
10690 * tracepoint.c: Include sys/syscall.h.
10691 (gdb_ust_thread): Remove preprocessor conditional.
10692
82bfbe7e
PA
106932011-12-14 Pedro Alves <pedro@codesourcery.com>
10694
10695 * linux-low.c (linux_detach_one_lwp): Call
10696 the_low_target.prepare_to_resume before detaching.
10697
712c6575
YQ
106982011-12-14 Yao Qi <yao@codesourcery.com>
10699
10700 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10701 of write.
10702
d54d1edf
YQ
107032011-12-14 Yao Qi <yao@codesourcery.com>
10704
10705 * i386-low.c (i386_low_stopped_data_address): Initialize local
10706 variable `control'.
10707
6210a125
PA
107082011-12-13 Pedro Alves <pedro@codesourcery.com>
10709
10710 PR remote/13492
10711
10712 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10713 DR_CONTROL unless necessary. Extend comments.
10714 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10715 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10716
2ece8244
YQ
107172011-12-13 Yao Qi <yao@codesourcery.com>
10718
10719 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10720 macros.
10721 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10722
784867a5
JK
107232011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10724
10725 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10726 Print new debug message for such case.
10727
6bf36717
JK
107282011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10729
10730 Fix overlapping memcpy.
10731 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10732 the read_inferior_memory transfer.
10733 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10734 write_inferior_memory transfer.
10735 (set_fast_tracepoint_jump): New variable buf. Use it for the
10736 read_inferior_memory and write_inferior_memory transfers.
10737 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10738 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10739 Use it for the write_inferior_memory transfer.
10740 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10741 buffers.
10742
50275556
MR
107432011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10744
10745 * linux-low.c (fetch_register, store_register): Make code
10746 consistent, fix formatting.
10747
7325beb4
MR
107482011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10749
10750 * linux-low.c (usr_store_inferior_registers): Factor out code
10751 to handle individual registers into...
10752 (store_register): ... this new function.
10753
c642a434
UW
107542011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10755
10756 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10757 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10758 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10759 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10760 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10761 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10762 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10763 (srv_xmlfiles): Add new XML files.
10764
10765 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10766 and <sys/uio.h>.
10767 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10768 (init_registers_s390_linux32v1): Add prototype.
10769 (init_registers_s390_linux32v2): Likewise.
10770 (init_registers_s390_linux64v1): Likewise.
10771 (init_registers_s390_linux64v2): Likewise.
10772 (init_registers_s390x_linux64v1): Likewise.
10773 (init_registers_s390x_linux64v2): Likewise.
10774 (s390_num_regs): Increment to 52.
10775 (s390_regmap): Add orig_r2 register.
10776 (s390_num_regs_3264): Increment to 68.
10777 (s390_regmap_3264): Add orig_r2 register.
10778 (s390_collect_ptrace_register): Handle orig_r2 register.
10779 (s390_supply_ptrace_register): Likewise.
10780 (s390_fill_last_break): New function.
10781 (s390_store_last_break): Likewise.
10782 (s390_fill_system_call): New function.
10783 (s390_store_system_call): Likewise.
10784 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10785 register sets.
10786 (s390_check_regset): New function.
10787 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10788 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10789 Update target_regsets for available register sets.
10790
2268b414
JK
107912011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10792 Jan Kratochvil <jan.kratochvil@redhat.com>
10793
10794 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10795 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10796 New.
10797 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10798 * linux-low.h (struct process_info_private): New member r_debug.
10799 * server.c (handle_qxfer_libraries): Call
10800 the_target->qxfer_libraries_svr4.
10801 (handle_qxfer_libraries_svr4): New function.
10802 (qxfer_packets): New entry "libraries-svr4".
10803 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10804 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10805 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10806 PACKET_qXfer_libraries_svr4.
10807
d6db1fab
UW
108082011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10809
10810 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10811 PSW address/mask between 8-byte and 16-byte formats.
10812 (s390_supply_ptrace_register): Likewise.
10813 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10814 basic addressing mode bit.
10815
242f5f1c
SS
108162011-11-24 Stan Shebs <stan@codesourcery.com>
10817
10818 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10819
f196051f
SS
108202011-11-17 Stan Shebs <stan@codesourcery.com>
10821
10822 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10823 (tracing_start_time): New global.
10824 (tracing_stop_time): New global.
10825 (tracing_user_name): New global.
10826 (tracing_notes): New global.
10827 (tracing_stop_note): New global.
10828 (cmd_qtstart): Set traceframe_usage, start_time.
10829 (stop_tracing): Set stop_time.
10830 (cmd_qtstatus): Report additional status.
10831 (cmd_qtp): New function.
10832 (handle_tracepoint_query): Call it.
10833 (cmd_qtnotes): New function.
10834 (handle_tracepoint_general_set): Call it.
10835 (get_timestamp): Rename from tsv_get_timestamp.
10836
405f8e94
SS
108372011-11-14 Stan Shebs <stan@codesourcery.com>
10838 Kwok Cheung Yeung <kcy@codesourcery.com>
10839
10840 * linux-x86-low.c (small_jump_insn): New.
10841 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10842 trampoline and error message, build a trampoline and issue a small
10843 jump instruction to it.
10844 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10845 trampoline and error message.
10846 (x86_get_min_fast_tracepoint_insn_len): New.
10847 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10848 * linux-low.h (struct linux_target_ops): Add arguments to
10849 install_fast_tracepoint_jump_pad operation, add new operation.
10850 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10851 arguments.
10852 (linux_get_min_fast_tracepoint_insn_len): New function.
10853 (linux_target_op): Add new operation.
10854 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10855 (gdb_trampoline_buffer_end): Ditto.
10856 (gdb_trampoline_buffer_error): Ditto.
10857 (struct ipa_sym_addresses): Add fields for new IPA variables.
10858 (symbol_list): Add entries for new IPA variables.
10859 (struct tracepoint): Add fields to hold the address range of the
10860 trampoline used by the tracepoint.
10861 (trampoline_buffer_head): New static variable.
10862 (trampoline_buffer_tail): Ditto.
10863 (claim_trampoline_space): New function.
10864 (have_fast_tracepoint_trampoline_buffer): New function.
10865 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10866 structure.
10867 (install_fast_tracepoint): Ditto, also add error buffer argument.
10868 (cmd_qtminftpilen): New function.
10869 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10870 (fast_tracepoint_from_trampoline_address): New function.
10871 (fast_tracepoint_collecting): Handle trampoline as part of jump
10872 pad space.
10873 (set_trampoline_buffer_space): New function.
10874 (initialize_tracepoint): Initialize new IPA variables.
10875 * target.h (struct target_ops): Add arguments to
10876 install_fast_tracepoint_jump_pad operation, add new
10877 get_min_fast_tracepoint_insn_len operation.
10878 (target_get_min_fast_tracepoint_insn_len): New.
10879 (install_fast_tracepoint_jump_pad): Add arguments.
10880 * server.h (IPA_BUFSIZ): Define.
10881 * linux-i386-ipa.c: Include extra header files.
10882 (initialize_fast_tracepoint_trampoline_buffer): New function.
10883 (initialize_low_tracepoint): Call it.
10884 * server.h (set_trampoline_buffer_space): Declare.
10885 (claim_trampoline_space): Ditto.
10886 (have_fast_tracepoint_trampoline_buffer): Ditto.
10887
1e4d1764
YQ
108882011-11-14 Yao Qi <yao@codesourcery.com>
10889
10890 * server.c (handle_query): Handle InstallInTrace for qSupported.
10891 * tracepoint.c (add_tracepoint): Sort list.
10892 (install_tracepoint, download_tracepoint): New.
10893 (cmd_qtdp): Call them to install and download tracepoints.
10894 (sort_tracepoints): Removed.
10895 (cmd_qtstart): Update.
10896
5c73ff4e
YQ
108972011-11-14 Yao Qi <yao@codesourcery.com>
10898
10899 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10900 * mem-break.h: Declare.
10901 * tracepoint.c (cmd_qtstart): Move some code to ...
10902 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10903 New.
10904 (download_tracepoints): Move some code to ...
10905 (download_tracepoint_1): ... here. New.
10906
86a30030
YQ
109072011-11-08 Yao Qi <yao@codesourcery.com>
10908
10909 * remote-utils.c (relocate_instruction): A comment fix.
10910
8d26e50c
JB
109112011-11-07 Joel Brobecker <brobecker@adacore.com>
10912
10913 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10914 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10915 dr_status_mirror and dr_control_mirror from debug_reg_state.
10916 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10917 (i386_initial_stuff): Remove use of deleted globals.
10918 (i386_get_thread_context, i386_set_thread_context,
10919 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10920 from debug_reg_state.
10921
a59306a3
YQ
109222011-11-05 Yao Qi <yao@codesourcery.com>
10923
10924 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10925 address as TPOINT's.
10926
3065dfb6
SS
109272011-11-02 Stan Shebs <stan@codesourcery.com>
10928
10929 * tracepoint.c (agent_mem_read_string): New function.
10930 (eval_agent_expr): Call it for tracenz.
10931 * server.c (handle_query): Report support for tracenz.
10932
fd0d8c7c
YQ
109332011-11-02 Yao Qi <yao@codesourcery.com>
10934
10935 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10936
609086b1
YQ
109372011-11-02 Yao Qi <yao@codesourcery.com>
10938
10939 * target.h: Fix a typo in comment.
10940
b9fd1791
PA
109412011-10-31 Pedro Alves <pedro@codesourcery.com>
10942
10943 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10944 clobber the breakpoints' shadows with fast tracepoint jumps.
10945 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10946 * target.c (write_inferior_memory): Also pass MYADDR down to
10947 check_mem_write.
10948
03583c20
UW
109492011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10950
10951 * configure.ac: Check support for personality routine.
10952 * configure: Regenerate.
10953 * config.in: Likewise.
10954 * linux-low.c: Include <sys/personality.h>.
10955 Define ADDR_NO_RANDOMIZE if necessary.
10956 (linux_create_inferior): Disable address space randomization when
10957 forking inferior, if requested.
10958 (linux_supports_disable_randomization): New function.
10959 (linux_target_ops): Install it.
10960 * server.h (disable_randomization): Declare.
10961 * server.c (disable_randomization): New global variable.
10962 (handle_general_set): Handle QDisableRandomization.
10963 (handle_query): Likewise for qSupported.
10964 (main): Support --disable-randomization and --no-disable-randomization
10965 command line arguments.
10966 * target.h (struct target_ops): Add supports_disable_randomization.
10967 (target_supports_disable_randomization): New macro.
10968
723b724b
MF
109692011-09-29 Mike Frysinger <vapier@gentoo.org>
10970
10971 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10972 ifdef check.
10973 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10974 [!PT_GETDSBT] (target_loadmap): New definition.
10975 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10976 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10977 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10978 and PT_GETDSBT to LINUX_LOADMAP.
10979 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10980 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10981
55329a5c 109822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10983
10984 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10985 (arm_linux_hwbp_cap): New static variable.
10986 (arm_linux_get_hwbp_cap): Replace by ...
10987 (arm_linux_init_hwbp_cap): ... this new function.
10988 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10989 (arm_linux_get_hw_watchpoint_count): Likewise.
10990 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10991 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10992 (arm_prepare_to_resume): Use perror_with_name instead of error.
10993
55329a5c 109942011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10995
10996 * linux-arm-low.c: Include <signal.h>.
10997 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10998 (struct arm_linux_hwbp_cap): New data type.
10999 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11000 (struct arm_linux_hw_breakpoint): New data type.
11001 (MAX_BPTS, MAX_WPTS): Define.
11002 (struct arch_process_info, struct arch_lwp_info): New data types.
11003 (arm_linux_get_hwbp_cap): New function.
11004 (arm_linux_get_hw_breakpoint_count): Likewise.
11005 (arm_linux_get_hw_watchpoint_count): Likewise.
11006 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11007 (arm_hwbp_control_initialize): Likewise.
11008 (arm_hwbp_control_is_enabled): Likewise.
11009 (arm_hwbp_control_is_initialized): Likewise.
11010 (arm_hwbp_control_disable): Likewise.
11011 (arm_linux_hw_breakpoint_equal): Likewise.
11012 (arm_linux_hw_point_initialize): Likewise.
11013 (struct update_registers_data): New data structure.
11014 (update_registers_callback: New function.
11015 (arm_insert_point): Likewise.
11016 (arm_remove_point): Likewise.
11017 (arm_stopped_by_watchpoint): Likewise.
11018 (arm_stopped_data_address): Likewise.
11019 (arm_new_process): Likewise.
11020 (arm_new_thread): Likewise.
11021 (arm_prepare_to_resume): Likewise.
11022 (the_low_target): Register arm_insert_point, arm_remove_point,
11023 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11024 arm_new_thread, and arm_prepare_to_resume.
11025
6b9801d4
SS
110262011-09-15 Stan Shebs <stan@codesourcery.com>
11027
11028 * server.h (struct emit_ops): Add compare-goto fields.
11029 * tracepoint.c (gdb_agent_op_sizes): New table.
11030 (emit_eq_goto): New function.
11031 (emit_ne_goto): New function.
11032 (emit_lt_goto): New function.
11033 (emit_le_goto): New function.
11034 (emit_gt_goto): New function.
11035 (emit_ge_goto): New function.
11036 (is_goto_target): New function.
11037 (compile_bytecodes): Recognize special cases of compare-goto
11038 combinations and call specialized emitters for them.
11039 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11040 (amd64_emit_ne_goto): New function.
11041 (amd64_emit_lt_goto): New function.
11042 (amd64_emit_le_goto): New function.
11043 (amd64_emit_gt_goto): New function.
11044 (amd64_emit_ge_goto): New function.
11045 (amd64_emit_ops): Add the new functions.
11046 (i386_emit_eq_goto): New function.
11047 (i386_emit_ne_goto): New function.
11048 (i386_emit_lt_goto): New function.
11049 (i386_emit_le_goto): New function.
11050 (i386_emit_gt_goto): New function.
11051 (i386_emit_ge_goto): New function.
11052 (i386_emit_ops): Add the new functions.
11053
bf15cbda
SS
110542011-09-08 Stan Shebs <stan@codesourcery.com>
11055
11056 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11057 (i386_emit_epilogue): Restore %ebx.
11058
943ca1dd
JZ
110592011-08-31 Jie Zhang <jzhang918@gmail.com>
11060
11061 * server.c (step_thread): Remove definition.
11062 (process_serial_event): Don't handle Hs.
11063 * server.h (step_thread): Remove declaration.
11064 * target.c (set_desired_inferior): Remove use of step_thread.
11065
e3deef73
LM
110662011-08-24 Luis Machado <lgustavo@codesourcery.com>
11067
11068 * linux-low.c: Include linux-procfs.h.
11069 (linux_attach_lwp_1): Update comments.
11070 (linux_attach): Scan for existing threads when attaching to a
11071 process that is the tgid.
11072 * Makefile.in: Update dependencies.
11073
13da1c97
LM
110742011-08-24 Luis Machado <lgustavo@codesourcery.com>
11075
11076 * configure.srv: Add linux-procfs.o dependencies.
11077
881127c9
YQ
110782011-08-14 Yao Qi <yao@codesourcery.com>
11079
11080 * target.h (struct target_ops): Fix indent.
11081 * win32-low.c (win32_target_ops): Fix comment.
11082
58dbd541
YQ
110832011-08-14 Andrew Jenner <andrew@codesourcery.com>
11084 Yao Qi <yao@codesourcery.com>
11085
11086 * Makefile.in (clean): Remove tic6x-*.c files.
11087 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11088 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11089 (tic6x-c64xp-linux.c): Likewise.
11090 * configure.srv: Add support for tic6x-*-uclinux.
11091 * linux-tic6x-low.c: New.
11092 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11093
78d85199
YQ
110942011-08-14 Andrew Stubbs <ams@codesourcery.com>
11095 Yao Qi <yao@codesourcery.com>
11096
11097 * target.h (struct target_ops): Add read_loadmap.
11098 * linux-low.c (struct target_loadseg): New type.
11099 (struct target_loadmap): New type.
11100 (linux_read_loadmap): New function.
11101 (linux_target_ops): Add linux_read_loadmap.
11102 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11103 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11104 to NULL.
78d85199 11105
a959a88d
EZ
111062011-08-05 Eli Zaretskii <eliz@gnu.org>
11107
11108 * win32-low.c: Include <stdint.h>.
11109
1ced966e
PA
111102011-07-22 Pedro Alves <pedro@codesourcery.com>
11111
11112 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11113 to the inferior here.
11114 (i386_remove_aligned_watchpoint): Ditto.
11115 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11116 fit part of the watchpoint in the debug registers.
11117 (i386_update_inferior_debug_regs): New.
11118 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11119 registers, and only update the inferior on success.
11120 (i386_low_remove_watchpoint): Ditto.
11121
d26e3629
KY
111222011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11123
11124 * linux-low.c (compare_ints, unique, list_threads, show_process,
11125 linux_core_of_thread): Delete.
11126 (linux_target_ops): Change linux_core_of_thread to
11127 linux_common_core_of_thread.
11128 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11129 * utils.c (malloc_failure): Change type of argument.
11130 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11131 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11132 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11133 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11134 (IPA_OBJS): Add common-utils-ipa.o.
11135 (ptid_h, linux_osdata_h): New macros.
11136 (server_h): Add common/common-utils.h, common/xml-utils.h,
11137 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11138 common/ptid.h.
11139 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11140 ptid.o, buffer.o): New rules.
11141 (linux-low.o): Add common/linux-osdata.h as a dependency.
11142 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11143 * configure.ac: Add AC_HEADER_DIRENT check.
11144 * config.in: Regenerate.
11145 * configure: Regenerate.
11146 * remote-utils.c (xml_escape_text): Delete.
11147 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11148 buffer_xml_printf): Move to common/buffer.c.
11149 * server.c (main): Remove call to initialize_inferiors.
11150 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11151 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11152 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11153 internal_error, gdb_assert, gdb_assert_fail): Delete.
11154 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11155 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11156 common/buffer.h.
11157 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11158 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11159 initialize_inferiors): Delete.
11160
2275a1a7
PA
111612011-07-20 Pedro Alves <pedro@codesourcery.com>
11162
11163 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11164 symbol error.
11165
0a5b1e09
PA
111662011-05-31 Pedro Alves <pedro@codesourcery.com>
11167
11168 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11169 assertion.
11170 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11171
6938fd34
YQ
111722011-05-26 Yao Qi <yao@codesourcery.com>
11173
11174 * Makefile.in (thread-db.o): Track dependence to
11175 common/gdb_thread_db.h.
11176 * thread-db.c: include gdb_thread_db.h from right place.
11177
b481f9e0
TT
111782011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11179
11180 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11181 __FILE__ and __LINE__ to internal_error.
11182
98a5dd13
DE
111832011-05-13 Doug Evans <dje@google.com>
11184
11185 * thread-db.c (try_thread_db_load_from_sdir): New function.
11186 (try_thread_db_load_from_dir): New function.
11187 (thread_db_load_search): Handle $sdir, ignore $pdir.
11188 Remove trying of system directories if search of
11189 libthread-db-search-path fails, that is now done via $sdir.
11190
d248b706
KY
111912011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11192
11193 * server.c (handle_query): Add EnableDisableTracepoints to the list
11194 of supported features.
43aaf8b6 11195 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11196 tracepoints.
43aaf8b6
PA
11197 (cmd_qtenable_disable): New.
11198 (cmd_qtstart): Install tracepoints even if disabled.
11199 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11200 receiving a QTEnable or QTDisable packet.
11201 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11202 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11203 tracepoints.
11204 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11205
84e578fb
DE
112062011-05-10 Doug Evans <dje@google.com>
11207
11208 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11209
71f55dd8
DE
112102011-05-04 Doug Evans <dje@google.com>
11211
11212 * linux-low.c (linux_join): Skip process lookup.
11213 * spu-low.c (spu_join): Ditto.
11214 * server.c (join_inferiors_callback): Delete.
11215 (process_serial_event): For 'D' packet (detach) call join_inferior
11216 directly.
11217
4d393d60
JM
112182011-05-04 Joseph Myers <joseph@codesourcery.com>
11219
11220 * README: Don't mention xscale*-*-linux*.
11221 * configure.srv (xscale*-*-linux*): Don't handle target.
11222
b00ad6ff
NF
112232011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11224
11225 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11226 casting pointers.
11227 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11228 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11229 (i386_emit_void_call_2): Likewise.
11230
af96c192
YQ
112312011-04-26 Yao Qi <yao@codesourcery.com>
11232
43aaf8b6
PA
11233 * linux-low.c: Move common macros to linux-ptrace.h.
11234 Include linux-ptrace.h.
af96c192
YQ
11235 * Makefile.in (linux_ptrace_h): New.
11236 (linux-low.o): Depends on linux-ptrace.h.
11237
03f2bd59
JK
112382011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11239
11240 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11241 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11242 (remote_prepare): New function with most of the TCP code from ...
11243 (remote_open): ... here. Detect PORT here unconditionally. Move also
11244 setting transport_is_reliable.
11245 * server.c (run_once): New variable.
11246 (gdbserver_usage): Document it.
11247 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11248 the first run if RUN_ONCE.
11249 * server.h (run_once, remote_prepare): New declarations.
11250
7a9dd1b2
TT
112512011-04-19 Tom Tromey <tromey@redhat.com>
11252
11253 * win32-low.c (handle_load_dll): Remove duplicate "the".
11254
81239425
PM
112552011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11256
11257 Remove support for old Cygwin 1.5 versions.
11258 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11259 function to avoid warning.
11260 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11261 warning.
11262
9e0627f1
PM
112632011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11264
11265 * gdbserver/server.h (Macro _): Define it if not available.
11266
588eebee
MS
112672011-03-14 Michael Snyder <msnyder@vmware.com>
11268
348af9f7 11269 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11270
43f70d4c
JB
112712011-03-10 Joel Brobecker <brobecker@adacore.com>
11272
11273 * Makefile.in (maintainer-clean realclean distclean): Remove
11274 "make ... subdir_do" command.
11275
348af9f7
MS
112762011-03-10 Michael Snyder <msnyder@vmware.com>
11277
11278 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11279
11280 * server.c (handle_v_run): Free alloced buffer on early return.
11281
e637a4f5
YQ
112822011-03-09 Yao Qi <yao@codesourcery.com>
11283
11284 Revert:
11285 2011-03-04 Yao Qi <yao@codesourcery.com>
11286
11287 * Makefile.in: Remove GNU make feature --directory.
11288
11289 2011-03-05 Yao Qi <yao@codesourcery.com>
11290
11291 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11292 (subdir_do): New make target. Copied from gdb/Makefile.
11293 (maintainer-clean, realclean, distclean, clean): Call corresponding
11294 make targets in common/Makefile.
11295
11296 2011-02-11 Yao Qi <yao@codesourcery.com>
11297
11298 * configure.ac: Call AC_PROG_RANLIB.
11299 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11300 * configure: Regenerate.
11301
e6edda56
JK
113022011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11303
11304 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11305
e5141119
JB
113062011-03-06 Yao Qi <yao@codesourcery.com>
11307
11308 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11309
64794aa4
JB
113102011-03-05 Yao Qi <yao@codesourcery.com>
11311
11312 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11313 (subdir_do): New make target. Copied from gdb/Makefile.
11314 (maintainer-clean, realclean, distclean, clean): Call corresponding
11315 make targets in common/Makefile.
11316
7a762829
YQ
113172011-03-04 Yao Qi <yao@codesourcery.com>
11318
11319 * Makefile.in: Remove GNU make feature --directory.
11320
348af9f7
MS
113212011-03-04 Michael Snyder <msnyder@vmware.com>
11322
11323 * server.c (queue_stop_reply): Call xmalloc not malloc.
11324
113252011-03-02 Michael Snyder <msnyder@vmware.com>
11326
11327 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11328
9f72fee2
MS
113292011-02-28 Michael Snyder <msnyder@vmware.com>
11330
588eebee
MS
11331 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11332 (cmd_qtframe): Ditto.
11333 (cmd_qtbuffer): Ditto.
11334 (cmd_bigqtbuffer): Ditto.
11335
9f72fee2
MS
11336 * utils.c (decimal2str): Initialize 'width' to nine, then
11337 don't mess with it.
11338
8040bd49
UW
113392011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11340
11341 * hostio.c (require_data): Free *data, not data.
11342
7e52cbd0
JK
113432011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11344
11345 * hostio.c (require_data): Use free, not xfree.
11346
9130f83e
MS
113472011-02-27 Michael Snyder <msnyder@vmware.com>
11348
4b812f4e
MS
11349 * server.c (handle_query): Discard unused value.
11350
9130f83e
MS
11351 * hostio.c (require_data): Free malloc memory before returning
11352 error.
11353
69d37113
MS
113542011-02-26 Michael Snyder <msnyder@vmware.com>
11355
11356 * linux-low.c (list_threads): Call closedir for dirent.
11357
35f5825a
MS
113582011-02-27 Michael Snyder <msnyder@vmware.com>
11359
2a589cef
MS
11360 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11361 a case statement falls through.
11362
0adea5f7
MS
11363 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11364
35f5825a
MS
11365 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11366 in comparison.
11367
238f1c74
MS
113682011-02-26 Michael Snyder <msnyder@vmware.com>
11369
11370 * utils.c (decimal2str): Eliminate dead code and dead param.
11371 (pulongest): Drop dead param from call to decimal2str.
11372 (plongest): Ditto.
11373
633ff500
JB
113742011-02-24 Joel Brobecker <brobecker@adacore.com>
11375
11376 Revert the following patch (not approved yet):
11377 2011-02-21 Hui Zhu <teawater@gmail.com>
11378 * tracepoint.c (tp_printf): New function.
11379 (eval_agent_expr): Handle gdb_agent_op_printf.
11380
f9c6ff72
HZ
113812011-02-21 Hui Zhu <teawater@gmail.com>
11382
11383 * tracepoint.c (tp_printf): New function.
11384 (eval_agent_expr): Handle gdb_agent_op_printf.
11385
94d5e490
TT
113862011-02-18 Tom Tromey <tromey@redhat.com>
11387
11388 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11389 (tracepoint.o): Likewise.
11390 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11391 (gdb_agent_op_names): Likewise.
11392
c7f96d2b
TT
113932011-02-18 Tom Tromey <tromey@redhat.com>
11394
11395 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11396 gdb_agent_op_rot>: New constants.
11397 (gdb_agent_op_names): Add pick and roll.
11398 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11399 cases.
11400
0feedb2c
JK
114012011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11402
11403 * aclocal.m4: Regenerated with aclocal-1.11.1.
11404
b3b9301e
PA
114052011-02-14 Pedro Alves <pedro@codesourcery.com>
11406
11407 * server.c (handle_qxfer_traceframe_info): New.
11408 (qxfer_packets): Register "traceframe-info".
11409 (handle_query): Report support for qXfer:traceframe-info:read+.
11410 * tracepoint.c (match_blocktype): New.
11411 (traceframe_find_block_type): Rename to ...
11412 (traceframe_walk_blocks): ... this. Add callback filter argument,
11413 and use it.
11414 (traceframe_find_block_type): New, reimplemented on top of
11415 traceframe_walk_blocks.
11416 (build_traceframe_info_xml): New.
11417 (traceframe_read_info): New.
11418 * server.h (traceframe_read_info): Declare.
11419
4f3e6fb7
YQ
114202011-02-11 Yao Qi <yao@codesourcery.com>
11421
11422 * configure.ac: Call AC_PROG_RANLIB.
11423 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11424 * configure: Regenerate.
11425
764880b7
PA
114262011-02-07 Pedro Alves <pedro@codesourcery.com>
11427
11428 * server.c (gdb_read_memory): Change return semantics to allow
11429 partial transfers.
11430 (handle_search_memory_1): Adjust.
11431 (process_serial_event) <'m' packet>: Handle partial transfers.
11432 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11433
1c79eb8a
PA
114342011-01-28 Pedro Alves <pedro@codesourcery.com>
11435
11436 * regcache.c (init_register_cache): Initialize
11437 regcache->register_status.
11438 (free_register_cache): Release regcache->register_status.
11439 (regcache_cpy): Copy register_status.
11440 (registers_to_string): Print 'x's for unavailable registers.
11441 (supply_register): Mark the register's status valid or
11442 unavailable, depending on whether a buffer was passed in or not.
11443 (supply_register_zeroed): New.
11444 (supply_regblock): Mark the registers' status valid or
11445 unavailable, depending on whether a buffer was passed in or not.
11446 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11447 (struct regcache): New `register_status' field.
11448 (supply_register_zeroed): Declare.
11449 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11450 supply_register_zeroed, rather than passing a NULL buffer to
11451 supply_register.
11452 * tracepoint.c (fetch_traceframe_registers): Update comment.
11453
85724a0e
PA
114542011-01-28 Pedro Alves <pedro@codesourcery.com>
11455
11456 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11457 buffer explicit.
11458
d08aafef
PA
114592011-01-25 Pedro Alves <pedro@codesourcery.com>
11460
11461 * server.h (decode_xfer_write): Change prototype.
11462 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11463 and don't extract the annex here.
11464 * server.c (decode_xfer_read): Remove `annex' parameter,
11465 and don't extract the annex here.
11466 (decode_xfer): New.
11467 (struct qxfer): New.
11468 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11469 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11470 (handle_qxfer_statictrace): New functions, abstracted out from
11471 handle_query, and made to use the struct qxfer interface.
11472 (handle_threads_qxfer_proper): Rename to ...
11473 (handle_qxfer_threads_proper): ... this.
11474 (handle_threads_qxfer): Rename to ...
11475 (handle_qxfer_threads): ... this. Adjust.
11476 (qxfer_packets): New array.
11477 (handle_qxfer): New function.
11478 (handle_query): Use handle_qxfer.
11479
493e2a69
MS
114802011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11481
11482 * gdbreplay.c: Shorten lines of >= 80 columns.
11483 * linux-low.c: Ditto.
11484 * linux-ppc-low.c: Ditto.
11485 * linux-s390-low.c: Ditto.
11486 * linux-sparc-low.c: Ditto.
11487 * linux-x86-low.c: Ditto.
11488 * linux-xtensa-low.c: Ditto.
11489 * mem-break.c: Ditto.
11490 * nto-low.c: Ditto.
11491 * regcache.h: Ditto.
11492 * remote-utils.c: Ditto.
11493 * server.c: Ditto.
11494 * server.h: Ditto.
11495 * thread-db.c: Ditto.
11496 * tracepoint.c: Ditto.
11497 * utils.c: Ditto.
11498 * win32-low.h: Ditto.
11499
44944448
JB
115002011-01-05 Joel Brobecker <brobecker@adacore.com>
11501
11502 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11503 update.
11504
71ce852c
JB
115052011-01-01 Joel Brobecker <brobecker@adacore.com>
11506
11507 * server.c (gdbserver_version): Update copyright year in version
11508 output.
11509 * gdbreplay.c (gdbreplay_version): Ditto.
11510
eb826dc6
MF
115112010-12-29 Jie Zhang <jie.zhang@analog.com>
11512
11513 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11514 * linux-bfin-low.c: New file.
11515 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11516 PT_DATA_ADDR for BFIN targets.
11517 * Makefile.in (SFILES): Add linux-bfin-low.c.
11518 (clean): Remove reg-bfin.c.
11519 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11520 * README: Mention supported Blackfin targets.
11521
39ab222a
MF
115222010-12-23 Mike Frysinger <vapier@gentoo.org>
11523
11524 * .gitignore: New file.
11525
a1f2ce7d
MF
115262010-11-16 Mike Frysinger <vapier@gentoo.org>
11527
11528 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11529
f474844c
JZ
115302010-10-22 Jie Zhang <jie@codesourcery.com>
11531
11532 * Makefile.in: Add FLAGS_TO_PASS variable.
11533 (install): Remove dependency of install-only and recursively
11534 invoke make for install-only.
11535
f1048712
DE
115362010-10-04 Doug Evans <dje@google.com>
11537
11538 * Makefile.in (uninstall): Use $(DESTDIR).
11539
b53a1623
PA
115402010-09-24 Pedro Alves <pedro@codesourcery.com>
11541
e6ee044d
PA
11542 PR gdb/11842
11543
b53a1623
PA
11544 * linux-x86-low.c (compat_siginfo_from_siginfo)
11545 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11546 si_code is < 0. Check for si_code == SI_TIMER before checking for
11547 si_code < 0.
11548
fa1bd1e4
JB
115492010-09-13 Joel Brobecker <brobecker@adacore.com>
11550
11551 * lynx-i386-low.c: New file.
11552 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11553
47fac8f8
JB
115542010-09-13 Joel Brobecker <brobecker@adacore.com>
11555
11556 * lynx-low.c (ptrace_request_to_str): Remove handling for
11557 request values that have been removed in LynxOS 5.x.
11558
1adfc54d
JB
115592010-09-13 Joel Brobecker <brobecker@adacore.com>
11560
11561 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11562 <ptrace.h>
11563
c2a66c29
NS
115642010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11565
11566 * configure.ac: Add --enable-inprocess-agent option.
11567 * configure: Rebuilt.
11568
32fcada3
YQ
115692010-09-06 Yao Qi <yao@codesourcery.com>
11570
11571 * linux-low.c (linux_kill): Remove unused variable.
11572 (linux_stabilize_threads): Likewise.
11573 * server.c (start_inferior): Likewise.
11574 (queue_stop_reply_callback): Likewise.
11575 * tracepoint.c (do_action_at_tracepoint): Likewise.
11576
0cccb683
YQ
115772010-09-06 Yao Qi <yao@codesourcery.com>
11578
11579 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11580 on return.
11581
423ec54c
JK
115822010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11583
11584 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11585
12ac6819
PA
115862010-09-06 Pedro Alves <pedro@codesourcery.com>
11587
11588 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11589 "$(IPA_DEPFILES)".
11590
8ed54b31
JB
115912010-09-01 Joel Brobecker <brobecker@adacore.com>
11592
11593 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11594 gdbserver/lynx-ppc-low.c: New files.
11595 * Makefile.in (lynx_low_h): New variable.
11596 (lynx-low.o, lynx-ppc-low.o): New rules.
11597 * configure.ac: On LynxOS, link with -lnetinet.
11598 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11599 * configure: regenerate.
11600
bb0116a4
JB
116012010-09-01 Joel Brobecker <brobecker@adacore.com>
11602
11603 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11604 * configure.ac: Add check for vasprintf and vsnprintf.
11605 * configure, config.in: Regenerate.
11606 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11607
a778ab81 116082010-09-01 Joel Brobecker <brobecker@adacore.com>
11609
11610 * gdbreplay.c: Move include of alloca.h up, next to include of
11611 malloc.h.
11612 * server.h: Add include of malloc.h.
11613 * mem-break.c: Remove include of malloc.h.
11614 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11615
8b034a19 116162010-09-01 Joel Brobecker <brobecker@adacore.com>
11617
11618 * Makefile.in (memmem.o): Build with -Wno-error.
11619
116202010-09-01 Joel Brobecker <brobecker@adacore.com>
11621
11622 * utils.c (xsnprintf): Make non-static.
11623 * server.h: Add xsnprintf declaration.
11624 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11625 replace calls to snprintf by calls to xsnprintf throughout.
11626
116272010-09-01 Joel Brobecker <brobecker@adacore.com>
11628
11629 * configure.ac: Add configure check for alloca.
11630 * configure, config.in: Regenerate.
11631 * server.h: Include alloca.h if it exists.
11632 * gdbreplay.c: Include alloca.h if it exists.
11633
1a981360
PA
116342010-08-28 Pedro Alves <pedro@codesourcery.com>
11635
11636 * linux-low.c (__SIGRTMIN): Define if not already defined.
11637 (linux_create_inferior): Check for __ANDROID__ rather than
11638 __SIGRTMIN.
11639 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11640 are already deferred.
11641 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11642 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11643 stopped and already has a pending signal to report.
11644 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11645 a pending signal to report or is moving out of a jump pad.
11646 (linux_init_signals): Check for __ANDROID__ rather than
11647 __SIGRTMIN.
11648
b4d51a55
PA
116492010-08-28 Pedro Alves <pedro@codesourcery.com>
11650
11651 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11652 debug_threads check. Avoid a linear search when not doing debug
11653 output.
11654
ec48365d
PA
116552010-08-27 Pedro Alves <pedro@codesourcery.com>
11656
11657 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11658 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11659 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11660 (process_event): Change local fd's type to gdb_fildes_t.
11661 (create_file_handler): Adjust prototype.
11662 (delete_file_handler): Adjust prototype.
11663 (handle_file_event): Adjust prototype. Use pfildes.
11664 (create_file_event): Adjsut prototype.
11665 * remote-utils.c (remote_desc, listen_desc): Change type to
11666 gdb_fildes_t.
11667 * server.h: New gdb_fildes_t typedef.
11668 [USE_WIN32API]: Include winsock2.h.
11669 (delete_file_handler, add_file_handler): Adjust prototypes.
11670 (pfildes): Declare.
11671 * utils.c (pfildes): New.
11672
854d88f0
PA
116732010-08-27 Pedro Alves <pedro@codesourcery.com>
11674
11675 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11676 * configure: Regenerate.
11677
0146f85b
PA
116782010-08-27 Pedro Alves <pedro@codesourcery.com>
11679
11680 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11681 (linux_done_accessing_memory): ... this.
11682 (linux_target_ops): Adjust.
11683 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11684 * nto-low.c (nto_target_ops): Adjust comment.
11685 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11686 * spu-low.c (spu_target_ops): Adjust comment.
11687 * target.h (target_ops): Rename unprepare_to_access_memory field
11688 to done_accessing_memory.
11689 (unprepare_to_access_memory): Rename to ...
11690 (done_accessing_memory): ... this.
11691
90d74c30
PA
116922010-08-26 Pedro Alves <pedro@codesourcery.com>
11693
11694 * linux-low.c (linux_prepare_to_access_memory): New.
11695 (linux_unprepare_to_access_memory): New.
11696 (linux_target_ops): Install them.
11697 * server.c (read_memory): Rename to ...
11698 (gdb_read_memory): ... this. Use
11699 prepare_to_access_memory/prepare_to_access_memory.
11700 (write_memory): Rename to ...
11701 (gdb_write_memory): ... this. Use
11702 prepare_to_access_memory/prepare_to_access_memory.
11703 (handle_search_memory_1): Adjust.
11704 (process_serial_event): Adjust.
11705 * target.h (struct target_ops): New fields
11706 prepare_to_access_memory and unprepare_to_access_memory.
11707 (prepare_to_access_memory, unprepare_to_access_memory): New.
11708 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11709 prepare_to_access_memory/prepare_to_access_memory.
11710 * nto-low.c (nto_target_ops): Adjust.
11711 * spu-low.c (spu_target_ops): Adjust.
11712 * win32-low.c (win32_target_ops): Adjust.
11713
fd467969
PA
117142010-08-26 Pedro Alves <pedro@codesourcery.com>
11715
11716 * Makefile.in (WARN_CFLAGS): Get it from configure.
11717 (WERROR_CFLAGS): New.
11718 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11719 * configure.ac: Introduce --enable-werror, which adds -Werror to
11720 the compiler command line. Enabled by default. Disable with
11721 --disable-werror. Add -Wdeclaration-after-statement
11722 Wpointer-arith and -Wformat-nonliteral to warning flags.
11723 * configure: Regenerate.
11724
331e2f5f
PA
117252010-08-26 Pedro Alves <pedro@codesourcery.com>
11726
11727 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11728
e581f2b4
PA
117292010-08-26 Pedro Alves <pedro@codesourcery.com>
11730
11731 * gdbreplay.c (remote_error): New.
11732 (gdbchar): New.
11733 (expect): Use gdbchar. Check for error reading from GDB.
11734 Clarify sync error output.
11735 (play): Check for errors writing to GDB.
11736 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11737 * remote-utils.c (getpkt): Check for errors writing to the remote
11738 descriptor.
11739
3c11dd79
PA
117402010-08-25 Pedro Alves <pedro@codesourcery.com>
11741
11742 * linux-low.c (linux_wait_1): Move non-debugging code out of
11743 `debug_threads' control.
11744
d20a8ad9
PA
117452010-08-25 Pedro Alves <pedro@codesourcery.com>
11746
11747 * linux-low.c (linux_wait_1): Don't set last_status here.
11748 * server.c (push_event, queue_stop_reply_callback): Assert we're
11749 not pushing a TARGET_WAITKIND_IGNORE event.
11750 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11751 (myresume, handle_target_event): Set the thread's last_resume_kind
11752 and last_status from the target returned status.
11753
964e4306
PA
117542010-08-25 Pedro Alves <pedro@codesourcery.com>
11755
11756 PR threads/10729
11757
11758 * linux-x86-low.c (update_debug_registers_callback): New.
11759 (i386_dr_low_set_addr): Use it.
11760 (i386_dr_low_get_addr): New.
11761 (i386_dr_low_set_control): Use update_debug_registers_callback.
11762 (i386_dr_low_get_control): New.
11763 (i386_dr_low_get_status): Adjust.
11764 * linux-low.c (linux_stop_lwp): New.
11765 * linux-low.h (linux_stop_lwp): Declare.
11766
11767 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11768 argument instead of a i386_debug_reg_state.
11769 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11770 a i386_debug_reg_state.
11771 (i386_insert_aligned_watchpoint): Adjust.
11772 (i386_remove_aligned_watchpoint): Adjust.
11773 (i386_low_stopped_data_address): Read the debug registers from the
11774 inferior instead of from the mirrors.
11775 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11776 (i386_dr_low_get_addr): Declare.
11777 (i386_dr_low_get_control): Declare.
11778 (i386_dr_low_get_status): Change prototype.
11779
11780 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11781 (i386_dr_low_get_addr): New.
11782 (i386_dr_low_get_control): New.
11783 (i386_dr_low_get_status): Adjust prototype. Return
11784 dr_status_mirror.
11785 (i386_initial_stuff): Clear dr_status_mirror and
11786 dr_control_mirror.
11787 (i386_get_thread_context): Adjust.
11788 (i386_set_thread_context): Adjust.
11789 (i386_thread_added): Adjust.
11790
5f21a75b
PA
117912010-08-24 Pedro Alves <pedro@codesourcery.com>
11792
11793 * linux-low.h (linux_thread_area): Delete declaration.
11794
3e4c1235
TS
117952010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11796
11797 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11798 after its termination.
11799
1971b033
PA
118002010-08-09 Pedro Alves <pedro@codesourcery.com>
11801
11802 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11803 (gdb_wants_all_stopped): Delete.
11804 (linux_wait_1): Don't call them.
11805 * server.c (handle_v_cont): Tag all threads as want-stopped.
11806 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11807 stopped as "client-wants-stopped".
11808
310444ac
PA
118092010-07-31 Pedro Alves <pedro@codesourcery.com>
11810
11811 * Makefile.in (signals_h): New.
11812 (server_h): Depend on it.
11813 (server.o): Don't depend on $(signals_def).
11814 (signals.o): Depend on $(signals_def).
11815
a19cae16
JK
118162010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11817
11818 * Makefile.in (signals_def): New.
11819 (server_h): Append include/gdb/signals.h and signals_def.
11820 (server.o): Append signals_def.
11821
30d50328
JK
118222010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11823
11824 * server.c (handle_target_event): Use target_signal_to_host for
11825 resume_info.sig initialization.
11826 * target.h (struct thread_resume) <sig>: New comment.
11827
5c3216e2
OS
118282010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11829
c6f46ca0
OS
11830 * server.c (handle_query): strcpy() the returned string from paddress()
11831 instead of sprintf().
5c3216e2
OS
11832 * utils.c (paddress): Return phex_nz().
11833
6bd31874
JB
118342010-07-07 Joel Brobecker <brobecker@adacore.com>
11835
11836 * server.c (handle_v_cont): Call mourn_inferior if process
11837 just exited.
11838 (myresume): Likewise.
11839
0fb4aa4b
PA
118402010-07-01 Pedro Alves <pedro@codesourcery.com>
11841
11842 Static tracepoints, and integration with UST.
11843
11844 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11845 * mem-break.c (uninsert_all_breakpoints)
11846 (reinsert_all_breakpoints): New.
11847 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11848 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11849 (gdb_agent_ust_loaded, helper_thread_id)
11850 (gdb_agent_helper_thread_id): New macros.
11851 (struct ipa_sym_addresses): Add addr_ust_loaded,
11852 addr_helper_thread_id, addr_cmd_buf.
11853 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11854 (in_process_agent_loaded_ust): New.
11855 (write_e_ust_not_loaded): New.
11856 (maybe_write_ipa_ust_not_loaded): New.
11857 (struct collect_static_trace_data_action): New.
11858 (enum tracepoint_type) <static_tracepoint>: New.
11859 (struct tracepoint) <handle>: Mention static tracepoints.
11860 (struct static_tracepoint_ctx): New.
11861 (CMD_BUF_SIZE): New.
11862 (add_tracepoint_action): Handle static tracepoint actions.
11863 (unprobe_marker_at): New.
11864 (clear_installed_tracepoints): Handle static tracepoints.
11865 (cmd_qtdp): Handle static tracepoints.
11866 (probe_marker_at): New.
11867 (cmd_qtstart): Handle static tracepoints.
11868 (response_tracepoint): Handle static tracepoints.
11869 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11870 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11871 (get_context_regcache): Handle static tracepoints.
11872 (do_action_at_tracepoint): Handle static tracepoint actions.
11873 (traceframe_find_block_type): Handle static trace data blocks.
11874 (traceframe_read_sdata): New.
11875 (download_tracepoints): Download static tracepoint actions.
11876 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11877 (GDB_PROBE_NAME): New.
11878 (ust_ops): New.
11879 (GET_UST_SYM): New.
11880 (USTF): New.
11881 (dlsym_ust): New.
11882 (ust_marker_to_static_tracepoint): New.
11883 (gdb_probe): New.
11884 (collect_ust_data_at_tracepoint): New.
11885 (gdb_ust_probe): New.
11886 (UNIX_PATH_MAX, SOCK_DIR): New.
11887 (gdb_ust_connect_sync_socket): New.
11888 (resume_thread, stop_thread): New.
11889 (run_inferior_command): New.
11890 (init_named_socket): New.
11891 (gdb_ust_socket_init): New.
11892 (cstr_to_hexstr): New.
11893 (next_st): New.
11894 (first_marker, next_marker): New.
11895 (response_ust_marker): New.
11896 (cmd_qtfstm, cmd_qtsstm): New.
11897 (unprobe_marker_at, probe_marker_at): New.
11898 (cmd_qtstmat, gdb_ust_thread): New.
11899 (gdb_ust_init): New.
11900 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11901 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11902 (ST_REGENTRY): New.
11903 (x86_64_st_collect_regmap): New.
11904 (X86_64_NUM_ST_COLLECT_GREGS): New.
11905 (AMD64_RIP_REGNUM): New.
11906 (supply_static_tracepoint_registers): New.
11907 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11908 (ST_REGENTRY): New.
11909 (i386_st_collect_regmap): New.
11910 (i386_NUM_ST_COLLECT_GREGS): New.
11911 (supply_static_tracepoint_registers): New.
11912 * server.c (handle_query): Handle qXfer:statictrace:read.
11913 <qSupported>: Report support for StaticTracepoints, and
11914 qXfer:statictrace:read features.
11915 * server.h (traceframe_read_sdata)
11916 (supply_static_tracepoint_registers): Declare.
11917 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11918 (unpack_varlen_hex): Include in IPA build.
11919 * Makefile.in (ustlibs, ustinc): New.
11920 (IPA_OBJS): Add remote-utils-ipa.o.
11921 ($(IPA_LIB)): Link -ldl and -lpthread.
11922 (UST_CFLAGS): New.
11923 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11924 * config.in, configure: Regenerate.
11925
9e4344e5
PA
119262010-06-20 Ian Lance Taylor <iant@google.com>
11927 Pedro Alves <pedro@codesourcery.com>
11928
11929 * linux-x86-low.c (always_true): Delete.
11930 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11931 trying to fool the compiler with always_true.
11932
c6beb2cb
PA
119332010-06-20 Pedro Alves <pedro@codesourcery.com>
11934
11935 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11936 conditions in gdbserver.
11937
d2ed6730
UW
119382010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11939
11940 * spu-low.c (spu_read_memory): Wrap around local store limit.
11941 (spu_write_memory): Likewise.
11942
4e29fb54
PA
119432010-06-15 Pedro Alves <pedro@codesourcery.com>
11944
11945 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11946 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11947 LONGEST uses.
11948 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11949 uses.
11950 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11951 uses with LONGEST uses.
11952
6a271cae
PA
119532010-06-14 Stan Shebs <stan@codesourcery.com>
11954 Pedro Alves <pedro@codesourcery.com>
11955
11956 Bytecode compiler.
11957
11958 * linux-x86-low.c: Include limits.h.
11959 (add_insns): New.
11960 (always_true): New.
11961 (EMIT_ASM): New.
11962 (EMIT_ASM32): New.
11963 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11964 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11965 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11966 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11967 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11968 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11969 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11970 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11971 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11972 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11973 (amd64_emit_void_call_2): New.
11974 (amd64_emit_ops): New.
11975 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11976 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11977 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11978 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11979 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11980 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11981 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11982 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11983 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11984 (i386_emit_stack_adjust, i386_emit_int_call_1)
11985 (i386_emit_void_call_2): New.
11986 (i386_emit_ops): New.
11987 (x86_emit_ops): New.
11988 (the_low_target): Install x86_emit_ops.
11989 * server.h (struct emit_ops): New.
11990 (get_raw_reg_func_addr): Declare.
11991 (current_insn_ptr, emit_error): Declare.
11992 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11993 (set_trace_state_variable_value): New defines.
11994 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11995 addr_get_trace_state_variable_value and
11996 addr_set_trace_state_variable_value.
11997 (symbol_list): New fields for get_raw_reg,
11998 get_trace_state_variable_value and set_trace_state_variable_value.
11999 (condfn): New typedef.
12000 (struct tracepoint): New field `compiled_cond'.
12001 (do_action_at_tracepoint): Clear compiled_cond.
12002 (get_trace_state_variable_value, set_trace_state_variable_value):
12003 Export in the IPA.
12004 (condition_true_at_tracepoint): If there's a compiled condition,
12005 run that.
12006 (current_insn_ptr, emit_error): New globals.
12007 (struct bytecode_address): New.
12008 (get_raw_reg_func_addr): New.
12009 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12010 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12011 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12012 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12013 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12014 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12015 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12016 (compile_tracepoint_condition, compile_bytecodes): New.
12017 * target.h (emit_ops): Forward declare.
12018 (struct target_ops): New field emit_ops.
12019 (target_emit_ops): New.
12020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12021 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12022 * linux-low.c (linux_emit_ops): New.
12023 (linux_target_ops): Install it.
12024 * linux-low.h (struct linux_target_ops): New field emit_ops.
12025
92b72907
UW
120262010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12027
12028 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12029 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12030
fa593d66
PA
120312010-06-01 Pedro Alves <pedro@codesourcery.com>
12032 Stan Shebs <stan@codesourcery.com>
12033
12034 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12035 (all): Depend on $(extra_libraries).
12036 (install-only): Install the IPA.
12037 (IPA_OBJS, IPA_LIB): New.
12038 (clean): Remove the IPA lib.
12039 (IPAGENT_CFLAGS): New.
12040 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12041 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12042 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12043 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12044 * configure.ac: Check for atomic builtins support in the compiler.
12045 (IPA_DEPFILES, extra_libraries): Define.
12046 * configure.srv (ipa_obj): Add description.
12047 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12048 (i[34567]86-*-linux*): Set ipa_obj.
12049 (x86_64-*-linux*): Set ipa_obj.
12050 * linux-low.c (stabilizing_threads): New.
12051 (supports_fast_tracepoints): New.
12052 (linux_detach): Stabilize threads before detaching.
12053 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12054 the lwp is either not stabilizing, or is moving out of a jump pad.
12055 (linux_fast_tracepoint_collecting): New.
12056 (maybe_move_out_of_jump_pad): New.
12057 (enqueue_one_deferred_signal): New.
12058 (dequeue_one_deferred_signal): New.
12059 (linux_wait_for_event_1): If moving out of a jump pad, defer
12060 pending signals to later.
12061 (linux_stabilize_threads): New.
12062 (linux_wait_1): Check if threads need moving out of jump pads, and
12063 do it if so.
12064 (stuck_in_jump_pad_callback): New.
12065 (move_out_of_jump_pad_callback): New.
12066 (lwp_running): New.
12067 (linux_resume_one_lwp): Handle moving out of jump pads.
12068 (linux_set_resume_request): Dequeue deferred signals.
12069 (need_step_over_p): Also step over fast tracepoint jumps.
12070 (start_step_over): Also uninsert fast tracepoint jumps.
12071 (finish_step_over): Also reinsert fast tracepoint jumps.
12072 (linux_install_fast_tracepoint_jump): New.
12073 (linux_target_ops): Install linux_stabilize_threads and
12074 linux_install_fast_tracepoint_jump_pad.
12075 * linux-low.h (linux_target_ops) <get_thread_area,
12076 install_fast_tracepoint_jump_pad>: New fields.
12077 (struct lwp_info) <collecting_fast_tracepoint,
12078 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12079 (linux_get_thread_area): Declare.
12080 * linux-x86-low.c (jump_insn): New.
12081 (x86_get_thread_area): New.
12082 (append_insns): New.
12083 (push_opcode): New.
12084 (amd64_install_fast_tracepoint_jump_pad): New.
12085 (i386_install_fast_tracepoint_jump_pad): New.
12086 (x86_install_fast_tracepoint_jump_pad): New.
12087 (the_low_target): Install x86_get_thread_area and
12088 x86_install_fast_tracepoint_jump_pad.
12089 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12090 (struct fast_tracepoint_jump): New.
12091 (fast_tracepoint_jump_insn): New.
12092 (fast_tracepoint_jump_shadow): New.
12093 (find_fast_tracepoint_jump_at): New.
12094 (fast_tracepoint_jump_here): New.
12095 (delete_fast_tracepoint_jump): New.
12096 (set_fast_tracepoint_jump): New.
12097 (uninsert_fast_tracepoint_jumps_at): New.
12098 (reinsert_fast_tracepoint_jumps_at): New.
12099 (set_breakpoint_at): Use write_inferior_memory.
12100 (uninsert_raw_breakpoint): Use write_inferior_memory.
12101 (check_mem_read): Mask out fast tracepoint jumps.
12102 (check_mem_write): Mask out fast tracepoint jumps.
12103 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12104 (set_fast_tracepoint_jump): Declare.
12105 (delete_fast_tracepoint_jump)
12106 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12107 (reinsert_fast_tracepoint_jumps_at): Declare.
12108 * regcache.c: Don't compile many functions when building the
12109 in-process agent library.
12110 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12111 the register buffer in the heap.
12112 (free_register_cache): If the register buffer isn't owned by the
12113 regcache, don't free it.
12114 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12115 pre-existing register caches.
12116 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12117 type.
12118 (convert_ascii_to_int): : Constify `from' parameter type.
12119 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12120 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12121 the needed buffer in-place.
12122 (relocate_instruction): New.
12123 * server.c (handle_query) <qSymbols>: If the target supports
12124 tracepoints, give it a chance of looking up symbols. Report
12125 support for fast tracepoints.
12126 (handle_status): Stabilize threads.
12127 (process_serial_event): Adjust.
12128 * server.h (struct fast_tracepoint_jump): Forward declare.
12129 (struct process_info) <fast_tracepoint_jumps>: New field.
12130 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12131 (decode_X_packet, decode_M_packet): Adjust.
12132 (relocate_instruction): Declare.
12133 (in_process_agent_loaded): Declare.
12134 (tracepoint_look_up_symbols): Declare.
12135 (struct fast_tpoint_collect_status): Declare.
12136 (fast_tracepoint_collecting): Declare.
12137 (force_unlock_trace_buffer): Declare.
12138 (handle_tracepoint_bkpts): Declare.
12139 (initialize_low_tracepoint)
12140 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12141 * target.h (struct target_ops) <stabilize_threads,
12142 install_fast_tracepoint_jump_pad>: New fields.
12143 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12144 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12145 [HAVE_STDINT_H]: Include stdint.h.
12146 (trace_debug_1): Rename to ...
12147 (trace_vdebug): ... this.
12148 (trace_debug): Rename to ...
12149 (trace_debug_1): ... this. Add `level' parameter.
12150 (trace_debug): New.
12151 (ATTR_USED, ATTR_NOINLINE): New.
12152 (IP_AGENT_EXPORT): New.
12153 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12154 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12155 (about_to_request_buffer_space, trace_buffer_is_full)
12156 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12157 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12158 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12159 (traceframe_write_count, traceframes_created)
12160 (trace_state_variables)
12161 New renaming defines.
12162 (struct ipa_sym_addresses): New.
12163 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12164 (symbol_list): New.
12165 (ipa_sym_addrs): New.
12166 (all_tracepoint_symbols_looked_up): New.
12167 (in_process_agent_loaded): New.
12168 (write_e_ipa_not_loaded): New.
12169 (maybe_write_ipa_not_loaded): New.
12170 (tracepoint_look_up_symbols): New.
12171 (debug_threads) [IN_PROCESS_AGENT]: New.
12172 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12173 (UNKNOWN_SIDE_EFFECTS): New.
12174 (stop_tracing): New.
12175 (flush_trace_buffer): New.
12176 (stop_tracing_bkpt): New.
12177 (flush_trace_buffer_bkpt): New.
12178 (read_inferior_integer): New.
12179 (read_inferior_uinteger): New.
12180 (read_inferior_data_pointer): New.
12181 (write_inferior_data_pointer): New.
12182 (write_inferior_integer): New.
12183 (write_inferior_uinteger): New.
12184 (struct collect_static_trace_data_action): Delete.
12185 (enum tracepoint_type): New.
12186 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12187 <actions_str, step_actions, step_actions_str>: Only include in
12188 GDBserver.
fa593d66
PA
12189 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12190 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12191 (tracepoints): Use IP_AGENT_EXPORT.
12192 (last_tracepoint): Don't include in the IPA.
12193 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12194 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12195 (alloced_trace_state_variables): New.
12196 (trace_state_variables): Use IP_AGENT_EXPORT.
12197 (traceframe_t): Delete unused variable.
12198 (circular_trace_buffer): Don't include in the IPA.
12199 (trace_buffer_start): Delete.
12200 (struct trace_buffer_control): New.
12201 (trace_buffer_free): Delete.
12202 (struct ipa_trace_buffer_control): New.
12203 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12204 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12205 New.
12206 (trace_buffer_ctrl): New.
12207 (TRACE_BUFFER_CTRL_CURR): New.
12208 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12209 Reimplement as macros.
12210 (trace_buffer_wrap): Delete.
12211 (traceframe_write_count, traceframe_read_count)
12212 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12213 (struct tracepoint_hit_ctx) <type>: New field.
12214 (struct fast_tracepoint_ctx): New.
12215 (memory_barrier): New.
12216 (cmpxchg): New.
12217 (record_tracepoint_error): Update atomically in the IPA.
12218 (clear_inferior_trace_buffer): New.
12219 (about_to_request_buffer_space): New.
12220 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12221 updating the same buffer.
12222 (add_tracepoint): Default the tracepoint's type to trap
12223 tracepoint, and orig_size to -1.
12224 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12225 internal variables.
12226 (create_trace_state_variable): New parameter `gdb'. Handle it.
12227 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12228 (cmd_qtdp): Handle fast tracepoints.
12229 (cmd_qtdv): Adjust.
12230 (max_jump_pad_size): New.
12231 (gdb_jump_pad_head): New.
12232 (get_jump_space_head): New.
12233 (claim_jump_space): New.
12234 (sort_tracepoints): New.
12235 (MAX_JUMP_SIZE): New.
12236 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12237 IPA.
12238 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12239 support. Upload fast traceframes, and delete internal IPA
12240 breakpoints.
12241 (stop_tracing_handler): New.
12242 (flush_trace_buffer_handler): New.
12243 (cmd_qtstop): Upload fast tracepoints.
12244 (response_tracepoint): Handle fast tracepoints.
12245 (tracepoint_finished_step): Upload fast traceframes. Set the
12246 tracepoint hit context's tracepoint type.
12247 (handle_tracepoint_bkpts): New.
12248 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12249 type. Add comment about fast tracepoints.
12250 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12251 non-existing action_str field.
12252 (get_context_regcache): Handle fast tracepoints.
12253 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12254 to the regcache.
12255 (fast_tracepoint_from_jump_pad_address): New.
12256 (fast_tracepoint_from_ipa_tpoint_address): New.
12257 (collecting_t): New.
12258 (force_unlock_trace_buffer): New.
12259 (fast_tracepoint_collecting): New.
12260 (collecting): New.
12261 (gdb_collect): New.
12262 (write_inferior_data_ptr): New.
12263 (target_tp_heap): New.
12264 (target_malloc): New.
12265 (download_agent_expr): New.
12266 (UALIGN): New.
12267 (download_tracepoints): New.
12268 (download_trace_state_variables): New.
12269 (upload_fast_traceframes): New.
12270 (IPA_FIRST_TRACEFRAME): New.
12271 (IPA_NEXT_TRACEFRAME_1): New.
12272 (IPA_NEXT_TRACEFRAME): New.
12273 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12274 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12275 (gdb_jump_pad_buffer_end): New.
12276 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12277 (initialize_tracepoint): Adjust.
12278 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12279 buffer. Initialize the low module.
12280 * utils.c (PREFIX, TOOLNAME): New.
12281 (malloc_failure): Use PREFIX.
12282 (error): In the IPA, an error causes an exit.
12283 (fatal, warning): Use PREFIX.
12284 (internal_error): Use TOOLNAME.
12285 (NUMCELLS): Increase to 10.
12286 * configure, config.in: Regenerate.
12287
d149dd1d
PA
122882010-06-01 Pedro Alves <pedro@codesourcery.com>
12289
12290 * server.c (handle_query) <qSupported>: Do two passes over the
12291 qSupported string to avoid nesting strtok.
12292
f6528abd
JK
122932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12294
12295 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12296 (CDEPS): New.
12297 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12298 -Wl,--dynamic-list.
12299 * configure: Regenerate.
12300 * proc-service.list: New.
12301
ca2a87a0
JK
123022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12303
12304 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12305 New comment.
12306
363a6e9f
OS
123072010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12308
12309 * gdbreplay.c (remote_open): Check error return from socket() call by
12310 its equality to -1 not by it being negative.
12311 * remote-utils.c (remote_open): Likewise.
12312
d23b6cb1
PA
123132010-05-23 Pedro Alves <pedro@codesourcery.com>
12314
12315 * config.h: Regenerate.
12316
28d3cf85
MK
123172010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12318
12319 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12320 doesn't provide PTRACE_GET_THREAD_AREA.
12321
fea36a59
MK
123222010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12323
12324 * linux-m68k-low.c: Include <asm/ptrace.h>
12325 (ps_get_thread_area): Implement.
12326
24b066ba
DE
123272010-05-03 Doug Evans <dje@google.com>
12328
12329 * event-loop.c (struct callback_event): New struct.
12330 (callback_list): New global.
12331 (append_callback_event, delete_callback_event): New functions.
12332 (process_callback): New function.
12333 (start_event_loop): Call it.
12334 * remote-utils.c (NOT_SCHEDULED): Define.
12335 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12336 moved out of readchar.
12337 (readchar): Rewrite. Call reschedule before returning.
12338 (reset_readchar): New function.
12339 (remote_close): Call it.
12340 (process_remaining, reschedule): New functions.
12341 * server.h (callback_handler_func): New typedef.
12342 (append_callback_event, delete_callback_event): Declare.
12343
9836d6ea
PA
123442010-05-03 Pedro Alves <pedro@codesourcery.com>
12345
12346 * proc-service.c (ps_pglobal_lookup): Use
12347 thread_db_look_up_one_symbol.
12348 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12349 parameter. Use it instead of all_symbols_looked_up.
12350 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12351 field.
12352 (all_symbols_looked_up): Don't declare.
12353 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12354 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12355 field.
12356 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12357 Set all_symbols_looked_up here.
12358 (thread_db_look_up_one_symbol): New.
12359 (thread_db_get_tls_address): Adjust.
12360 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12361 thread_db object on the heap, and tentatively set it in the
12362 process structure.
12363 (thread_db_init): Don't set all_symbols_looked_up here.
12364 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12365
7984d532
PA
123662010-05-03 Pedro Alves <pedro@codesourcery.com>
12367
12368 * linux-low.c (linux_kill, linux_detach): Adjust.
12369 (status_pending_p_callback): Remove redundant statement. Check
12370 for !TARGET_WAITIKIND_IGNORE, instead of
12371 TARGET_WAITKIND_STOPPED.
12372 (handle_tracepoints): Make sure LWP is locked. Adjust.
12373 (linux_wait_for_event_1): Adjust.
12374 (linux_cancel_breakpoints): New.
12375 (unsuspend_one_lwp): New.
12376 (unsuspend_all_lwps): New.
12377 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12378 (send_sigstop_callback): Change return type to int, add new
12379 `except' parameter and handle it.
12380 (suspend_and_send_sigstop_callback): New.
12381 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12382 pass them down. If SUSPEND, also increment the lwp's suspend
12383 count.
12384 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12385 (need_step_over_p): Don't consider suspended LWPs.
12386 (start_step_over): Adjust.
12387 (proceed_one_lwp): Change return type to int, add new `except'
12388 parameter and handle it.
12389 (unsuspend_and_proceed_one_lwp): New.
12390 (proceed_all_lwps): Use find_inferior instead of
12391 for_each_inferior.
12392 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12393 also decrement the suspend count of LWPs. Pass `except' down,
12394 instead of hacking its suspend count.
12395 (linux_pause_all): Add `freeze' parameter. Adjust.
12396 (linux_unpause_all): New.
12397 (linux_target_ops): Install linux_unpause_all.
12398 * server.c (handle_status): Adjust.
12399 * target.h (struct target_ops): New fields `unpause_all' and
12400 `cancel_breakpoints'. Add new parameter to `pause_all'.
12401 (pause_all): Add new `freeze' parameter.
12402 (unpause_all): New.
12403 (cancel_breakpoints): New.
12404 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12405 cancel breakpoints.
12406 (cmd_qtstart): Pause threads.
12407 (stop_tracing): Pause threads, and cancel breakpoints.
12408 * win32-low.c (win32_target_ops): Adjust.
12409
e471f25b
PA
124102010-05-03 Pedro Alves <pedro@codesourcery.com>
12411
12412 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12413 the inferior right away from here...
12414 (linux_wait_1): ... to here, and adjust to check the thread's
12415 last_resume_kind instead of the lwp's step or stop_expected flags.
12416
1915ef4f
PA
124172010-05-02 Pedro Alves <pedro@codesourcery.com>
12418
12419 * README: Use consistent `GDB' and `GDBserver' spellings.
12420
f9e39928
PA
124212010-05-02 Pedro Alves <pedro@codesourcery.com>
12422
12423 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12424 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12425 (linux_detach_one_lwp): Assume the lwp is stopped.
12426 (any_thread_of): Delete.
12427 (linux_detach): Stop all lwps here. Don't blindly delete all
12428 breakpoints.
12429 (delete_lwp_callback): New.
12430 (linux_mourn): Delete all lwps of the process that is gone.
12431 (linux_wait_1): Don't delete the last lwp of the process here.
12432 * mem-break.h (mark_breakpoints_out): Declare.
12433 * mem-break.c (mark_breakpoints_out): New.
12434 (free_all_breakpoints): Use it.
12435 * server.c (handle_target_event): If the process is gone, mark
12436 breakpoints out.
12437 * thread-db.c (struct thread_db) <create_bp>: New field.
12438 (thread_db_enable_reporting): Fix prototype. Store a thread event
12439 breakpoint reference in the thread_db struct.
12440 (thread_db_load_search): Clear the thread_db object.
12441 (try_thread_db_load_1): Ditto.
12442 (switch_to_process): New.
12443 (disable_thread_event_reporting): Use it.
12444 (remove_thread_event_breakpoints): New.
12445 (thread_db_detach, thread_db_mourn): Use it.
12446
1e7fc18c
PA
124472010-05-01 Pedro Alves <pedro@codesourcery.com>
12448
12449 * linux-low.c (linux_enable_event_reporting): New.
12450 (linux_wait_for_event_1, handle_extended_wait): Use it.
12451
02fc4de7
PA
124522010-04-30 Pedro Alves <pedro@codesourcery.com>
12453
12454 * linux-low.c (linux_kill_one_lwp, linux_kill)
12455 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12456 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12457 SIGSTOP even if the LWP is stopped.
12458 (send_sigstop_callback): New.
12459 (stop_all_lwps): Use send_sigstop_callback instead.
12460 (linux_resume_one_thread): Adjust.
12461 (proceed_one_lwp): Still proceed an LWP that the client has
12462 requested to stop, if we haven't reported it as stopped yet. Make
12463 sure that LWPs the client want stopped, have a pending SIGSTOP.
12464
bc3b5632
DE
124652010-04-26 Doug Evans <dje@google.com>
12466
ae1ada35
DE
12467 * server.c (handle_general_set): Make static.
12468
bc3b5632
DE
12469 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12470 Print received char after testing for error/eof instead of before.
12471 (input_interrupt): Tweak comment.
12472
65730243
DE
124732010-04-23 Doug Evans <dje@google.com>
12474
12475 * server.c (start_inferior): Print inferior argv if --debug.
12476
a8ae7dc0
AR
124772010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12478
12479 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12480 * nto-x86-low.c: Include server.h
12481
1c07cc19
PM
124822010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12483
12484 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12485 be consistent with other sources of this directory.
12486 (init_registers_amd64): Correct name of source file of this function
12487 in the comment.
12488
e0a61e09
PM
124892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12490
12491 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12492 64-bit executables.
12493
54709339
PM
124942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12495
12496 * win32-i386-low.c: Add 64-bit support.
12497 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12498 (init_registers_amd64): Declare.
12499 (mappings): Add 64-bit version of array.
12500 (init_windows_x86): New function.
12501 (the_low_target): Change init_arch field to init_windows_x86.
12502
e8f0053d
PM
125032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12504
12505 * win32-low.c: Adapt to support also 64-bit architecture.
12506 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12507 (get_image_name): Use SIZE_T type for local variable `done'.
12508 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12509 (toolhelp_get_dll_name): Idem.
12510 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12511 Use uintptr_t typecast to avoid warning.
12512 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12513 (handle_exception): Use phex_nz to avoid warning.
12514 (win32_wait): Remove unused local variable `process'.
12515
c481e77e
PM
125162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12517
12518 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12519 `amd64-avx.o'.
12520
12ea4b69
PM
125212010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12522
12523 * configure.ac: Use `ws2_32' library for srv_mingw.
12524 * configure: Regenerate.
12525 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12526 * remote-utils.c: Likewise.
12527
f6d1620c
L
125282010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12529
12530 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12531 if __x86_64__ is defined.
12532
8e642873
PM
125332010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12534
12535 * configure: Regenerate.
12536
711e434b
PM
125372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12538
12539 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12540 * target.h (target_ops): New get_tib_address field.
12541 * win32-low.h (win32_thread_info): Add thread_local_base field.
12542 * win32-low.c (child_add_thread): Add tlb argument.
12543 Set thread_local_base field to TLB.
12544 (get_child_debug_event): Adapt to child_add_thread change.
12545 (win32_get_tib_address): New function.
12546 (win32_target_ops): Set get_tib_address field to
12547 win32_get_tib_address.
12548 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12549
505106cd
PA
125502010-04-12 Pedro Alves <pedro@codesourcery.com>
12551
505106cd
PA
12552 * linux-low.c (linux_mourn): Also remove the process.
12553 * server.c (handle_target_event): Don't remove the process here.
12554 * nto-low.c (nto_mourn): New.
12555 (nto_target_ops): Install it.
12556 * spu-low.c (spu_mourn): New.
12557 (spu_target_ops): Install it.
12558 * win32-low.c (win32_mourn): New.
12559 (win32_target_ops): Install it.
12560
e8470a06
PA
125612010-04-12 Pedro Alves <pedro@codesourcery.com>
12562
12563 * server.h (buffer_xml_printf): Remove redundant `;'.
12564
45ba0d02
PA
125652010-04-12 Pedro Alves <pedro@codesourcery.com>
12566
12567 * regcache.c (set_register_cache): Invalidate regcaches before
12568 changing the register cache layout.
12569 (regcache_invalidate_one): Allow a NULL regcache.
12570 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12571 regcaches before changing the register cache layout or the target
12572 regsets.
12573
59e04013
L
125742010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12575
12576 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12577 variable warning on Linux/x86-64.
12578
8336d594
PA
125792010-04-11 Pedro Alves <pedro@codesourcery.com>
12580
12581 GDBserver disconnected tracing support.
12582
12583 * linux-low.c (linux_remove_process): Delete.
12584 (add_lwp): Don't set last_resume_kind here.
12585 (linux_kill): Use `mourn'.
12586 (linux_detach): Use `thread_db_detach', and `mourn'.
12587 (linux_mourn): New.
12588 (linux_attach_lwp_1): Adjust comment.
12589 (linux_attach): last_resume_kind moved the thread_info; adjust.
12590 (status_pending_p_callback): Adjust.
12591 (linux_wait_for_event_1): Adjust.
12592 (count_events_callback, select_singlestep_lwp_callback)
12593 (select_event_lwp_callback, cancel_breakpoints_callback)
12594 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12595 (proceed_one_lwp): Adjust.
12596 (linux_async): Add debug output.
12597 (linux_thread_stopped): New.
12598 (linux_pause_all): New.
12599 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12600 linux_pause_all.
12601 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12602 (thread_db_free): Delete declaration.
12603 (thread_db_detach, thread_db_mourn): Declare.
12604 * thread-db.c (thread_db_init): Use thread_db_mourn.
12605 (thread_db_free): Delete, split in two.
12606 (disable_thread_event_reporting): New.
12607 (thread_db_detach): New.
12608 (thread_db_mourn): New.
12609
12610 * server.h (struct thread_info) <last_resume_kind>: New field.
12611 <attached>: Add comment.
12612 <gdb_detached>: New field.
12613 (handler_func): Change return type to int.
12614 (handle_serial_event, handle_target_event): Ditto.
12615 (gdb_connected): Declare.
12616 (tracing): Delete.
12617 (disconnected_tracing): Declare.
12618 (stop_tracing): Declare.
12619
12620 * server.c (handle_query) <qSupported>: Report support for
12621 disconnected tracing.
12622 (queue_stop_reply_callback): Account for running threads.
12623 (gdb_wants_thread_stopped): New.
12624 (gdb_wants_all_threads_stopped): New.
12625 (gdb_reattached_process): New.
12626 (handle_status): Clear the `gdb_detached' flag of all processes.
12627 In all-stop, stop all threads.
12628 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12629 (process_serial_event): If the remote connection breaks, or if an
12630 exit was forced with "monitor exit", force an event loop exit.
12631 Handle disconnected tracing on detach.
12632 (handle_serial_event): Adjust.
12633 (handle_target_event): If GDB isn't connected, forward events back
12634 to the inferior, unless the last process exited, in which case,
12635 exit gdbserver. Adjust interface.
12636
12637 * remote-utils.c (remote_open): Don't block in accept. Instead
12638 register an event loop source on the listen socket file
12639 descriptor. Refactor bits into ...
12640 (listen_desc): ... this new global.
12641 (gdb_connected): ... this new function.
12642 (enable_async_notification): ... this new function.
12643 (handle_accept_event): ... this new function.
12644 (remote_close): Clear remote_desc.
12645
12646 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12647
12648 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12649 New fields.
12650 (mourn_inferior): Define.
12651 (target_process_qsupported): Avoid the dangling else problem.
12652 (thread_stopped): Define.
12653 (pause_all): Define.
12654 (target_waitstatus_to_string): Declare.
12655 * target.c (target_waitstatus_to_string): New.
12656
12657 * tracepoint.c (tracing): Make extern.
12658 (disconnected_tracing): New.
12659 (stop_tracing): Make extern. Handle tracing stops due to GDB
12660 disconnecting.
12661 (cmd_qtdisconnected): New.
12662 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12663 (handle_tracepoint_general_set): Handle QTDisconnected.
12664
12665 * event-loop.c (event_handler_func): Change return type to int.
12666 (process_event): Bail out if the event handler wants the event
12667 loop to stop.
12668 (handle_file_event): Ditto.
12669 (start_event_loop): Bail out if the event handler wants the event
12670 loop to stop.
12671
12672 * nto-low.c (nto_target_ops): Adjust.
12673 * spu-low.c (spu_wait): Don't remove the process here.
12674 (spu_target_ops): Adjust.
12675 * win32-low.c (win32_wait): Don't remove the process here.
12676 (win32_target_ops): Adjust.
12677
5d267c4c
PA
126782010-04-11 Pedro Alves <pedro@codesourcery.com>
12679
12680 * regcache.c (realloc_register_cache): Invalidate inferior's
12681 regcache before recreating it.
12682
623ccd72
PA
126832010-04-09 Pedro Alves <pedro@codesourcery.com>
12684
12685 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12686
219f2f23
PA
126872010-04-09 Stan Shebs <stan@codesourcery.com>
12688 Pedro Alves <pedro@codesourcery.com>
12689
12690 * server.h (LONGEST): New.
12691 (struct thread_info) <while_stepping>: New field.
12692 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12693 Declare.
12694 (initialize_tracepoint, handle_tracepoint_general_set)
12695 (handle_tracepoint_query, tracepoint_finished_step)
12696 (tracepoint_was_hit, release_while_stepping_state_list):
12697 (current_traceframe): Declare.
12698 * server.c (handle_general_set): Handle tracepoint packets.
12699 (read_memory): New.
12700 (write_memory): New.
12701 (handle_search_memory_1): Use read_memory.
12702 (handle_query): Report support for conditional tracepoints, trace
12703 state variables, and tracepoint sources. Handle tracepoint
12704 queries.
12705 (main): Initialize the tracepoints module.
12706 (process_serial_event): Handle traceframe reads/writes.
12707
12708 * linux-low.c (handle_tracepoints): New.
12709 (linux_wait_1): Call it.
12710 (linux_resume_one_lwp): Handle while-stepping.
12711 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12712 (linux_target_ops): Install them.
12713 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12714 New field.
12715 * linux-x86-low.c (x86_supports_tracepoints): New.
12716 (the_low_target). Install it.
12717
12718 * mem-break.h (delete_breakpoint): Declare.
12719 * mem-break.c (delete_breakpoint): Make external.
12720
12721 * target.h (struct target_ops): Add `supports_tracepoints',
12722 `read_pc', and `write_pc' fields.
12723 (target_supports_tracepoints): Define.
12724 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12725 (phex_nz): New.
12726
12727 * regcache.h (struct regcache) <registers_owned>: New field.
12728 (init_register_cache, regcache_cpy): Declare.
12729 (regcache_read_pc, regcache_write_pc): Declare.
12730 (register_cache_size): Declare.
12731 (supply_regblock): Declare.
12732 * regcache.c (init_register_cache): New.
12733 (new_register_cache): Use it.
12734 (regcache_cpy): New.
12735 (register_cache_size): New.
12736 (supply_regblock): New.
12737 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12738
219f2f23
PA
12739 * tracepoint.c: New.
12740
12741 * Makefile.in (OBS): Add tracepoint.o.
12742 (tracepoint.o): New rule.
12743
3a13a53b
L
127442010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12745
12746 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12747 (i386-mmx.o): New.
12748 (i386-mmx.c): Likewise.
12749 (i386-mmx-linux.o): Likewise.
12750 (i386-mmx-linux.c): Likewise.
12751
12752 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12753 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12754 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12755 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12756
12757 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12758 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12759 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12760
1570b33e
L
127612010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12762
12763 * Makefile.in (clean): Updated.
12764 (i386-avx.o): New.
12765 (i386-avx.c): Likewise.
12766 (i386-avx-linux.o): Likewise.
12767 (i386-avx-linux.c): Likewise.
12768 (amd64-avx.o): Likewise.
12769 (amd64-avx.c): Likewise.
12770 (amd64-avx-linux.o): Likewise.
12771 (amd64-avx-linux.c): Likewise.
12772
12773 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12774 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12775 (srv_amd64_regobj): Add amd64-avx.o.
12776 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12777 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12778 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12779 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12780 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12781 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12783
12784 * i387-fp.c: Include "i386-xstate.h".
12785 (i387_xsave): New.
12786 (i387_cache_to_xsave): Likewise.
12787 (i387_xsave_to_cache): Likewise.
12788 (x86_xcr0): Likewise.
12789
12790 * i387-fp.h (i387_cache_to_xsave): Likewise.
12791 (i387_xsave_to_cache): Likewise.
12792 (x86_xcr0): Likewise.
12793
12794 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12795 * linux-crisv32-low.c (target_regsets): Likewise.
12796 * linux-m68k-low.c (target_regsets): Likewise.
12797 * linux-mips-low.c (target_regsets): Likewise.
12798 * linux-ppc-low.c (target_regsets): Likewise.
12799 * linux-s390-low.c (target_regsets): Likewise.
12800 * linux-sh-low.c (target_regsets): Likewise.
12801 * linux-sparc-low.c (target_regsets): Likewise.
12802 * linux-xtensa-low.c (target_regsets): Likewise.
12803
12804 * linux-low.c: Include <sys/uio.h>.
12805 (regsets_fetch_inferior_registers): Support nt_type.
12806 (regsets_store_inferior_registers): Likewise.
12807 (linux_process_qsupported): New.
12808 (linux_target_ops): Add linux_process_qsupported.
12809
12810 * linux-low.h (regset_info): Add nt_type.
12811 (linux_target_ops): Add process_qsupported.
12812
12813 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12814 and <sys/uio.h>.
12815 (init_registers_i386_avx_linux): New.
12816 (init_registers_amd64_avx_linux): Likewise.
12817 (xmltarget_i386_linux_no_xml): Likewise.
12818 (xmltarget_amd64_linux_no_xml): Likewise.
12819 (PTRACE_GETREGSET): Likewise.
12820 (PTRACE_SETREGSET): Likewise.
12821 (x86_fill_xstateregset): Likewise.
12822 (x86_store_xstateregset): Likewise.
12823 (use_xml): Likewise.
12824 (x86_linux_update_xmltarget): Likewise.
12825 (x86_linux_process_qsupported): Likewise.
12826 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12827 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12828 init_registers_i386_linux here. Call
12829 x86_linux_update_xmltarget.
12830 (the_low_target): Add x86_linux_process_qsupported.
12831
12832 * server.c (handle_query): Call target_process_qsupported.
12833
12834 * target.h (target_ops): Add process_qsupported.
12835 (target_process_qsupported): New.
12836
fc7238bb
PA
128372010-04-03 Pedro Alves <pedro@codesourcery.com>
12838
12839 * inferiors.c (add_thread): Set last_status kind to
12840 TARGET_WAITKIND_IGNORE.
12841 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12842 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12843 (linux_wait_1): Move `thread' local definition to block that uses
12844 it. Don't NULL initialize `event_child'.
12845 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12846 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12847 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12848
bdabb078
PA
128492010-04-01 Pedro Alves <pedro@codesourcery.com>
12850
12851 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12852 an extended waitstatus, or by a watchpoint.
12853 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12854 thread was stepping or has been stopped by a watchpoint.
12855
d3bbe7a0
PA
128562010-04-01 Pedro Alves <pedro@codesourcery.com>
12857
12858 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12859 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12860 of another, then delete the previous, and validate all
12861 breakpoints.
12862 (validate_inserted_breakpoint): New.
12863 (delete_disabled_breakpoints): New.
12864 (validate_breakpoints): New.
12865 (check_mem_read): Validate breakpoints before trusting their
12866 shadow. Delete disabled breakpoints.
12867 (check_mem_write): Validate breakpoints before trusting they
12868 should be inserted. Delete disabled breakpoints.
12869 * mem-break.h (validate_breakpoints):
12870 * server.c (handle_query): Validate breakpoints when we see a
12871 qSymbol query.
12872
8b07ae33
PA
128732010-04-01 Pedro Alves <pedro@codesourcery.com>
12874
12875 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12876 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12877 if we could tell there's a GDB breakpoint at stop_pc.
12878 (need_step_over_p): Don't do a step over if we find a GDB
12879 breakpoint at the resume PC.
12880
12881 * mem-break.c (struct raw_breakpoint): New.
12882 (enum bkpt_type): New type `gdb_breakpoint'.
12883 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12884 fields. New field `raw'.
12885 (find_raw_breakpoint_at): New.
12886 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12887 breakpoint instead.
12888 (set_breakpoint_at): Adjust.
12889 (delete_raw_breakpoint): New.
12890 (release_breakpoint): New.
12891 (delete_breakpoint): Rename to...
12892 (delete_breakpoint_1): ... this. Add proc parameter. Use
12893 release_breakpoint. Return ENOENT.
12894 (delete_breakpoint): Reimplement.
12895 (find_breakpoint_at): Delete.
12896 (find_gdb_breakpoint_at): New.
12897 (delete_breakpoint_at): Delete.
12898 (set_gdb_breakpoint_at): New.
12899 (delete_gdb_breakpoint_at): New.
12900 (gdb_breakpoint_here): New.
12901 (set_reinsert_breakpoint): Use release_breakpoint.
12902 (uninsert_breakpoint): Rename to ...
12903 (uninsert_raw_breakpoint): ... this.
12904 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12905 (reinsert_raw_breakpoint): Change parameter type to
12906 raw_breakpoint.
12907 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12908 instead.
12909 (check_breakpoints): Adjust. Use release_breakpoint.
12910 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12911 (breakpoint_inserted_here): Ditto.
12912 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12913 Don't trust the breakpoint's shadow if it is not inserted.
12914 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12915 (delete_all_breakpoints): Adjust.
12916 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12917 use delete_breakpoint_1.
12918
12919 * mem-break.h (breakpoints_supported): Delete declaration.
12920 (set_gdb_breakpoint_at): Declare.
12921 (gdb_breakpoint_here): Declare.
12922 (delete_breakpoint_at): Delete.
12923 (delete_gdb_breakpoint_at): Declare.
12924
12925 * server.h (struct raw_breakpoint): Forward declare.
12926 (struct process_info): New field `raw_breakpoints'.
12927
12928 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12929 breakpoints.
12930
6bf5e0ba
PA
129312010-03-24 Pedro Alves <pedro@codesourcery.com>
12932
12933 * linux-low.c (status_pending_p_callback): Fix comment.
12934 (linux_wait_for_event_1): Move most of the internal breakpoint
12935 handling from here...
12936 (linux_wait_1): ... to here.
12937 (count_events_callback): New.
12938 (select_singlestep_lwp_callback): New.
12939 (select_event_lwp_callback): New.
12940 (cancel_breakpoints_callback): New.
12941 (select_event_lwp): New.
12942 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12943 priority to all LWPs that have had events that should be reported
12944 to the client. Cancel breakpoints when about to reporting the
12945 event to the client, not while stopping lwps. No longer cancel
12946 finished single-steps here.
12947 (cancel_finished_single_step): Delete.
12948 (cancel_finished_single_steps): Delete.
12949
414a389f
PA
129502010-03-24 Pedro Alves <pedro@codesourcery.com>
12951
12952 * mem-break.c (enum bkpt_type): New.
12953 (struct breakpoint): New field `type'.
12954 (set_breakpoint_at): Change return type to struct breakpoint
12955 pointer. Set type to `other_breakpoint' by default.
12956 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12957 in the breakpoint list.
12958 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12959 (reinsert_breakpoint): Rename to ...
12960 (reinsert_raw_breakpoint): ... this.
12961 (reinsert_breakpoints_at): Adjust.
12962 * mem-break.h (struct breakpoint): Declare.
12963 (set_breakpoint_at): Change return type to struct breakpoint
12964 pointer.
12965
2280c721
PA
129662010-03-24 Pedro Alves <pedro@codesourcery.com>
12967
12968 * server.c (handle_query): Assign, not compare.
12969
d50171e4
PA
129702010-03-24 Pedro Alves <pedro@codesourcery.com>
12971
12972 Teach linux gdbserver to step-over-breakpoints.
12973
12974 * linux-low.c (can_hardware_single_step): New.
12975 (supports_breakpoints): New.
12976 (handle_extended_wait): If stopping threads, read the stop pc of
12977 the new cloned LWP.
12978 (get_pc): New.
12979 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12980 low target doesn't support retrieving the PC.
12981 (add_lwp): Set last_resume_kind to resume_continue.
12982 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12983 (linux_attach): Don't clear stop_expected. Set the lwp's
12984 last_resume_kind to resume_stop.
12985 (linux_detach_one_lwp): Don't check for removed breakpoints.
12986 (check_removed_breakpoint): Delete.
12987 (status_pending_p): Rename to ...
12988 (status_pending_p_callback): ... this. Don't check for removed
12989 breakpoints. Don't consider threads that are stopped from GDB's
12990 perspective.
12991 (linux_wait_for_lwp): Always read the stop_pc here.
12992 (cancel_breakpoint): New.
12993 (step_over_bkpt): New global.
12994 (linux_wait_for_event_1): Implement stepping over breakpoints.
12995 (gdb_wants_lwp_stopped): New.
12996 (gdb_wants_all_stopped): New.
12997 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12998 single-step traps here. Store the thread's last reported target
12999 wait status.
13000 (send_sigstop): Don't clear stop_expected. Always set it,
13001 instead.
13002 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13003 (cancel_finished_single_step): New.
13004 (cancel_finished_single_steps): New.
13005 (wait_for_sigstop): Don't cancel finished single-step traps here.
13006 (linux_resume_one_lwp): Don't check for removed breakpoints.
13007 Don't set `step' on non-hardware step archs.
13008 (linux_set_resume_request): Ignore resume_stop requests if already
13009 stopping or stopped. Set the lwp's last_resume_kind.
13010 (resume_status_pending_p): Don't check for removed breakpoints.
13011 (need_step_over_p): New.
13012 (start_step_over): New.
13013 (finish_step_over): New.
13014 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13015 requests. Clear the thread's last reported target waitstatus.
13016 Don't use the `suspended' flag. Don't consider pending breakpoints.
13017 (linux_resume): Start a step-over if necessary.
13018 (proceed_one_lwp): New.
13019 (proceed_all_lwps): New.
13020 (unstop_all_lwps): New.
13021 * linux-low.h (struct lwp_info): Rewrite comment for the
13022 `suspended' flag. Add the `stop_pc' field. Delete the
13023 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13024 Add `'last_resume_kind' and `need_step_over' fields.
13025 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13026 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13027 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13028 (set_raw_breakpoint_at): New.
13029 (set_breakpoint_at): Rewrite to use it.
13030 (reinsert_breakpoint_handler): Delete.
13031 (set_reinsert_breakpoint): New.
13032 (reinsert_breakpoint_by_bp): Delete.
13033 (delete_reinsert_breakpoints): New.
13034 (uninsert_breakpoint): Rewrite.
13035 (uninsert_breakpoints_at): New.
13036 (reinsert_breakpoint): Rewrite.
13037 (reinsert_breakpoints_at): New.
13038 (check_breakpoints): Rewrite.
13039 (breakpoint_here): New.
13040 (breakpoint_inserted_here): New.
13041 (check_mem_read): Adjust.
13042 * mem-break.h (breakpoints_supported, breakpoint_here)
13043 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13044 (reinsert_breakpoint_by_bp): Delete declaration.
13045 (delete_reinsert_breakpoints): Declare.
13046 (reinsert_breakpoint): Delete declaration.
13047 (reinsert_breakpoints_at): Declare.
13048 (uninsert_breakpoint): Delete declaration.
13049 (uninsert_breakpoints_at): Declare.
13050 (check_breakpoints): Adjust prototype.
13051 * server.h: Adjust include order.
13052 (struct thread_info): Declare here. Add a `last_status' field.
13053
30ba68cb
MS
130542010-03-23 Michael Snyder <msnyder@vmware.com>
13055
13056 * server.c (crc32): New function.
13057 (handle_query): Add handling for 'qCRC:' request.
13058
b9a881c2
PA
130592010-03-23 Pedro Alves <pedro@codesourcery.com>
13060
13061 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13062 lwp had been stopped by a watchpoint.
13063
e92d13d5
PA
130642010-03-16 Pedro Alves <pedro@codesourcery.com>
13065
13066 * server.h (internal_error): Declare.
13067 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13068 * utils.c (internal_error): New function.
13069
64daa791
AS
130702010-03-15 Andreas Schwab <schwab@redhat.com>
13071
13072 * configure.srv: Fix typo setting srv_regobj.
13073
f52cd8cd
PA
130742010-03-15 Pedro Alves <pedro@codesourcery.com>
13075
13076 * linux-low.c (fetch_register): Avoid passing a non string literal
13077 format to `error'.
13078 (usr_store_inferior_registers): Ditto.
13079
93ae6fdc
PA
130802010-03-14 Pedro Alves <pedro@codesourcery.com>
13081
13082 * linux-low.c (linux_write_memory): Bail out early if peeking
13083 memory failed.
13084
c3adc08c
PA
130852010-03-14 Pedro Alves <pedro@codesourcery.com>
13086
13087 * linux-low.h (struct lwp_info): New fields
13088 `stopped_by_watchpoint' and `stopped_data_address'.
13089 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13090 here, and cache them in the lwp object.
13091 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13092 directly.
13093 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13094 field.
13095 (linux_stopped_by_watchpoint): Rewrite.
13096 (linux_stopped_data_address): Rewrite.
13097
bce522a2
PA
130982010-03-06 Simo Melenius <simo.melenius@iki.fi>
13099
13100 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13101 switching the current inferior, not before.
13102
90884b2b
L
131032010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13104
13105 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13106 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13107 i386-linux.c and amd64-linux.c.
13108 (reg-i386.o): Removed.
13109 (reg-i386.c): Likewise.
13110 (reg-i386-linux.o): Likewise.
13111 (reg-i386-linux.c): Likewise.
13112 (reg-x86-64.o): Likewise.
13113 (reg-x86-64.c): Likewise.
13114 (reg-x86-64-linux.o): Likewise.
13115 (reg-x86-64-linux.c): Likewise.
13116 (i386.o): New.
13117 (i386.c): Likewise.
13118 (i386-linux.o): Likewise.
13119 (i386-linux.c): Likewise.
13120 (amd64.o): Likewise.
13121 (amd64.c): Likewise.
13122 (amd64-linux.o): Likewise.
13123 (amd64-linux.c): Likewise.
13124
13125 * configure.srv (srv_i386_regobj): New.
13126 (srv_i386_linux_regobj): Likewise.
13127 (srv_amd64_regobj): Likewise.
13128 (srv_amd64_linux_regobj): Likewise.
13129 (srv_i386_32bit_xmlfiles): Likewise.
13130 (srv_i386_64bit_xmlfiles): Likewise.
13131 (srv_i386_xmlfiles): Likewise.
13132 (srv_amd64_xmlfiles): Likewise.
13133 (srv_i386_linux_xmlfiles): Likewise.
13134 (srv_amd64_linux_xmlfiles): Likewise.
13135 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13136 srv_xmlfiles to $srv_i386_xmlfiles.
13137 (i[34567]86-*-mingw32ce*): Likewise.
13138 (i[34567]86-*-mingw*): Likewise.
13139 (i[34567]86-*-nto*): Likewise.
13140 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13141 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13142 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13143 (x86_64-*-linux*): Likewise.
13144
13145 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13146 (init_registers_amd64_linux): New.
13147 (x86_arch_setup): Replace init_registers_x86_64_linux with
13148 init_registers_amd64_linux.
13149
193f13e6
MK
131502010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13151
13152 * configure.ac: Check for libdl. If it is not available link against
13153 static libthread_db.
13154 * configure: Regenerate.
13155
85d721b8
PA
131562010-02-22 Pedro Alves <pedro@codesourcery.com>
13157
13158 PR9605
13159
13160 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13161 handing a read watchpoint.
13162 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13163
6076632b
DE
131642010-02-12 Doug Evans <dje@google.com>
13165
13166 * linux-low.c (linux_supports_tracefork_flag): Document.
13167 (linux_look_up_symbols): Add comment.
13168
3327ccf7
L
131692010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13170
13171 * regcache.c (supply_register): Clear regcache if buf is NULL.
13172
0718675c 131732010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13174 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13175
13176 * inferiors.c (find_inferior): Add function documentation.
13177 (unloaded_dll): Handle the case where the unloaded dll has not
13178 been previously registered in the dll list.
13179
177321bd
DJ
131802010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13181
13182 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13183 (thumb2_breakpoint): New.
13184 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13185
2b009048
DJ
131862010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13187
13188 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13189 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13190 breakpoints.
13191
3be029c7
PA
131922010-01-21 Pedro Alves <pedro@codesourcery.com>
13193
13194 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13195
18f5de3b
JK
131962010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13197
13198 * linux-s390-low.c (s390_collect_ptrace_register)
13199 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13200
3743bb4f
DE
132012010-01-21 Doug Evans <dje@google.com>
13202
14ce3065
DE
13203 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13204 (PTRACE_ARG4_TYPE): New macro.
13205 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13206 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13207 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13208 (usr_store_inferior_registers): Ditto.
13209 (linux_read_memory, linux_write_memory): Ditto.
13210 (linux_test_for_tracefork): Ditto.
13211
3743bb4f
DE
13212 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13213 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13214
8b315be5
PA
132152010-01-21 Pedro Alves <pedro@codesourcery.com>
13216
13217 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13218 target.
13219
85492558
PA
132202010-01-21 Pedro Alves <pedro@codesourcery.com>
13221
13222 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13223 prototype to take a regcache. Adjust.
13224
442ea881
PA
132252010-01-20 Pedro Alves <pedro@codesourcery.com>
13226
13227 * regcache.h (struct thread_info): Forward declare.
13228 (struct regcache): New.
13229 (new_register_cache): Adjust prototype.
13230 (get_thread_regcache): Declare.
13231 (free_register_cache): Adjust prototype.
13232 (registers_to_string, registers_from_string): Ditto.
13233 (supply_register, supply_register_by_name, collect_register)
13234 (collect_register_as_string, collect_register_by_name): Ditto.
13235 * regcache.c (struct inferior_regcache_data): Delete.
13236 (get_regcache): Rename to ...
13237 (get_thread_regcache): ... this. Adjust. Switch inferior before
13238 fetching registers.
13239 (regcache_invalidate_one): Adjust.
13240 (regcache_invalidate): Fix prototype.
13241 (new_register_cache): Return the new register cache.
13242 (free_register_cache): Change prototype.
13243 (realloc_register_cache): Adjust.
13244 (registers_to_string): Change prototype to take a regcache. Adjust.
13245 (registers_from_string): Ditto.
13246 (register_data): Ditto.
13247 (supply_register): Ditto.
13248 (supply_register_by_name): Ditto.
13249 (collect_register): Ditto.
13250 (collect_register_as_string): Ditto.
13251 (collect_register_by_name): Ditto.
13252 * server.c (process_serial_event): Adjust.
13253 * linux-low.h (regset_fill_func, regset_store_func): Change
13254 prototype.
13255 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13256 Change prototype.
13257 * linux-low.c (get_stop_pc): Adjust.
13258 (check_removed_breakpoint): Adjust.
13259 (linux_wait_for_event): Adjust.
13260 (linux_resume_one_lwp): Adjust.
13261 (fetch_register): Add regcache parameter. Adjust.
13262 (usr_store_inferior_registers): Ditto.
13263 (regsets_fetch_inferior_registers): Ditto.
13264 (regsets_store_inferior_registers): Ditto.
13265 (linux_fetch_registers, linux_store_registers): Ditto.
13266 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13267 regcache. Adjust.
43aaf8b6
PA
13268 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13269 Ditto.
442ea881
PA
13270 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13271 prototype to take a regcache.
13272 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13273 * remote-utils.c (convert_ascii_to_int, outreg)
13274 (prepare_resume_reply): Change prototype to take a regcache.
13275 Adjust.
13276 * target.h (struct target_ops) <fetch_registers, store_registers>:
13277 Change prototype to take a regcache.
13278 (fetch_inferior_registers, store_inferior_registers): Change
13279 prototype to take a regcache. Adjust.
13280 * proc-service.c (ps_lgetregs): Adjust.
13281 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13282 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13283 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13284 take a regcache. Adjust.
13285 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13286 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13287 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13288 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13289 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13290 (cris_cannot_fetch_register):
13291 (cris_breakpoint_at): Change prototype to take a regcache.
13292 Adjust.
13293 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13294 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13295 to take a regcache. Adjust.
13296 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13297 Adjust.
13298 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13299 take a regcache. Adjust.
13300 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13301 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13302 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13303 * linux-mips-low.c (mips_get_pc):
13304 (mips_set_pc): Change prototype to take a regcache. Adjust.
13305 (mips_reinsert_addr): Adjust.
13306 (mips_collect_register): Change prototype to take a regcache.
13307 Adjust.
13308 (mips_supply_register):
13309 (mips_collect_register_32bit, mips_supply_register_32bit)
13310 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13311 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13312 * linux-ppc-low.c (ppc_supply_ptrace_register)
13313 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13314 (parse_spufs_run): Adjust.
13315 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13316 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13317 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13318 take a regcache. Adjust.
13319 * linux-s390-low.c (s390_collect_ptrace_register)
13320 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13321 (s390_set_pc): Change prototype to take a regcache. Adjust.
13322 (s390_arch_setup): Adjust.
13323 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13324 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13325 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13326 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13327 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13328 regcache. Adjust.
13329 (sparc_breakpoint_at): Adjust.
13330 * linux-xtensa-low.c (xtensa_fill_gregset):
13331 (xtensa_store_gregset):
13332 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13333 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13334 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13335 prototype to take a regcache. Adjust.
13336 * win32-arm-low.c (arm_fetch_inferior_register)
13337 (arm_store_inferior_register): Change prototype to take a
13338 regcache. Adjust.
13339 * win32-i386-low.c (i386_fetch_inferior_register)
13340 (i386_store_inferior_register): Change prototype to take a
13341 regcache. Adjust.
13342 * win32-low.c (child_fetch_inferior_registers)
13343 (child_store_inferior_registers): Change prototype to take a
13344 regcache. Adjust.
13345 (win32_wait): Adjust.
13346 (win32_fetch_inferior_registers): Change prototype to take a
13347 regcache. Adjust.
13348 (win32_store_inferior_registers): Adjust.
13349 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13350 store_inferior_register>: Change prototype to take a regcache.
13351
60c3d7b0
DE
133522010-01-20 Doug Evans <dje@google.com>
13353
13354 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13355 #ifdef.
13356 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13357 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13358
dc146f7c
VP
133592010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13360
13361 * linux-low.c (linux_core_of_thread): New.
13362 (compare_ints, show_process, list_threads): New.
13363 (linux_qxfer_osdata): Report threads and cores.
13364 (linux_target_op): Register linux_core_of_thread.
13365 * remote-utils.c (prepare_resume_reply): Report the core.
13366 (buffer_xml_printf): Support %d specifier.
13367 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13368 New.
13369 (handle_query): Handle qXfer:threads. Announce availability
13370 thereof.
13371 * target.h (struct target_ops): New field core_of_thread.
13372
7803799a
UW
133732010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13374
13375 * Makefile.in (clean): Remove new generated files.
13376 (reg-s390.o, reg-s390.c): Remove rules.
13377 (reg-s390x.o, reg-s390x.c): Likewise.
13378 (s390-linux32.o, s390-linux32.c): Add rules.
13379 (s390-linux64.o, s390-linux64.c): Likewise.
13380 (s390x-linux64.o, s390x-linux64.c): Likewise.
13381 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13382 * linux-s390-low.c: Include <elf.h>.
13383 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13384 (init_registers_s390): Remove prototype.
13385 (init_registers_s390x): Likewise.
13386 (init_registers_s390_linux32): Add prototype.
13387 (init_registers_s390_linux64): Likewise.
13388 (init_registers_s390x_linux64): Likewise.
13389 (s390_num_regs_3264): New define.
13390 (s390_regmap_3264): New global variable.
13391 (s390_cannot_fetch_register): Remove obsolete check.
13392 (s390_cannot_store_register): Likewise.
13393 (s390_collect_ptrace_register): Handle upper/lower register halves.
13394 (s390_supply_ptrace_register): Likewise.
13395 (s390_fill_gregset): Update to register number changes.
13396 (s390_get_hwcap): New routine.
13397 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13398 Install appropriate regmap and register set.
13399
6e7ffa39
JB
134002010-01-01 Joel Brobecker <brobecker@adacore.com>
13401
13402 * server.c (gdbserver_version): Update copyright year to 2010.
13403 * gdbreplay.c (gdbreplay_version): Likewise.
13404
957f3f49
DE
134052009-12-28 Doug Evans <dje@google.com>
13406
13407 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13408 elf/external.h. Include <elf.h> instead but only if necessary.
13409
ca5c370d
PA
134102009-12-28 Pedro Alves <pedro@codesourcery.com>
13411
13412 * linux-low.c (linux_remove_process): Remove `detaching'
13413 parameter. Don't release/detach from thread_db here.
13414 (linux_kill): Release/detach from thread_db here, ...
13415 (linux_detach): ... and here, before actually detaching.
13416 (linux_wait_1): ... and here, when a process exits.
13417 * thread-db.c (any_thread_of): New.
13418 (thread_db_free): Switch the current inferior to a thread of the
13419 passed in process.
13420
4ee62156
DE
134212009-12-21 Doug Evans <dje@google.com>
13422
d90e6a88
DE
13423 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13424
c5f62d5f
DE
13425 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13426 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13427 warning ifndef __NR_tkill. Move setting of errno there too.
13428 Delete unnecessary resetting of errno after syscall.
13429 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13430
10e86dd7
DE
13431 * configure.ac: Check for dladdr.
13432 * config.in: Regenerate.
13433 * configure: Regenerate.
13434 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13435 (try_thread_db_load): Update.
13436
4ee62156
DE
13437 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13438
00f515da
DE
134392009-12-18 Doug Evans <dje@google.com>
13440
e9464885
DE
13441 * event-loop.c: Include unistd.h if it exists.
13442
07d4f67e
DE
13443 * linux-low.c (my_waitpid): Move definition away from being in
13444 between linux_tracefork_child/linux_test_for_tracefork.
13445
00f515da
DE
13446 * gdb_proc_service.h (psaddr_t): Fix type.
13447 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13448 signature to match glibc.
13449
1de1badb
DE
134502009-12-16 Doug Evans <dje@google.com>
13451
13452 * linux-low.c (linux_read_memory): Fix argument to read.
13453
aeeb81d1
PA
134542009-11-26 Pedro Alves <pedro@codesourcery.com>
13455
13456 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13457 events, don't leave current_inferior pointing at null.
13458
10357975
PA
134592009-11-26 Pedro Alves <pedro@codesourcery.com>
13460
13461 * win32-low.c (LOG): Delete.
13462 (OUTMSG): Output to stderr.
13463 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13464 on compile time LOG macro.
13465 (win32_wait): Fix debug output.
13466
cf6e3471
PA
134672009-11-26 Pedro Alves <pedro@codesourcery.com>
13468
13469 * win32-low.c (win32_add_one_solib): If the dll name is
13470 "ntdll.dll", prepend the system directory to the dll path.
13471
0c85e18e
MK
134722009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13473
13474 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13475
9ac544ce 134762009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13477 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13478
13479 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13480 * configure.ac: Check for __mcoldfire__ and set
13481 gdb_cv_m68k_is_coldfire.
13482 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13483 reg-cf.o and reg-m68k.o.
13484 * configure: Regenerated.
13485
fd7dd3e6
PA
134862009-11-16 Pedro Alves <pedro@codesourcery.com>
13487
13488 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13489 Pass it to thread_db_free.
13490 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13491 proper `detaching' argument to linux_remove_process.
13492 * linux-low.h (thread_db_free): Add `detaching' parameter.
13493 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13494 to thread_db_free.
13495 (thread_db_free): Add `detaching' parameter. Only
13496 call td_ta_clear_event if detaching from process.
13497
75aa492e
MK
134982009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13499
13500 * thread-db.c (thread_db_free): Fix typo.
13501
21e1bee4
PP
135022009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13503
13504 PR gdb/10838
13505 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13506
8838b45e
NS
135072009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13508
13509 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13510 with an i686 compiler.
13511 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13512 needed.
13513 * configure: Rebuilt.
13514
8a35fb51
SL
135152009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13516
13517 PR gdb/10783
13518
13519 * server.c (handle_search_memory_1): Correct read_addr initialization
13520 in loop for searching subsequent chunks.
13521
96f15937
PP
135222009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13523
13524 * configure.ac: New --with-libthread-db option.
13525 * thread-db.c: Allow direct dependence on libthread_db.
13526 (thread_db_free): Adjust.
13527 * config.in: Regenerate.
13528 * configure: Likewise.
889bf7c5 13529
5f7d1694
PP
135302009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13531
13532 PR gdb/10757
13533 * thread-db.c (attach_thread): New function.
13534 (maybe_attach_thread): Return success/failure.
13535 (find_new_threads_callback): Adjust.
889bf7c5
PA
13536 (thread_db_find_new_threads): Loop until no new threads.
13537
88e3b899
PA
135382009-10-13 Pedro Alves <pedro@codesourcery.com>
13539
13540 * proc-service.c (ps_lgetregs): Formatting.
13541
cdbfd419
PP
135422009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13543
13544 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13545 * configure.ac: Adjust.
13546 * linux-low.h (struct process_info_private): Move members to struct
13547 thread_db.
13548 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13549 * linux-low.c (linux_remove_process): Adjust.
13550 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13551 * server.c (handle_query): Move code ...
13552 (handle_monitor_command): ... here. New function.
13553 * target.h (struct target_ops): New member.
13554 * thread-db.c (struct thread_db): New.
13555 (libthread_db_search_path): New variable.
13556 (thread_db_create_event, thread_db_enable_reporting)
13557 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13558 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13559 (try_thread_db_load_1, dladdr_to_soname): New functions.
13560 (try_thread_db_load, thread_db_load_search): New functions.
13561 (thread_db_init): Search for libthread_db.
13562 (thread_db_free): New function.
13563 (thread_db_handle_monitor_command): Likewise.
13564 * config.in: Regenerate.
13565 * configure: Regenerate.
889bf7c5 13566
4168d2d6
UW
135672009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13568
13569 * spu-low.c (spu_kill): Wait for inferior to terminate.
13570 Call clear_inferiors.
13571 (spu_detach): Call clear_inferiors.
13572
81ecdfbb
RW
135732009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13574
13575 * aclocal.m4: Regenerate.
13576 * config.in: Likewise.
13577 * configure: Likewise.
13578
0b9ff2c0
UW
135792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13580
13581 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13582 (parse_spufs_run): New function.
13583 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13584 (ppc_breakpoint_at): Handle SPU breakpoints.
13585
efcbbd14
UW
135862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13587
13588 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13589 (SPUFS_MAGIC): Define.
13590 (spu_enumerate_spu_ids): New function.
13591 (linux_qxfer_spu): New function.
13592 (linux_target_ops): Install linux_qxfer_spu.
13593
f4d9bade
UW
135942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13595
13596 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13597 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13598 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13599 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13600 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13601 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13602 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13603 (init_registers_powerpc_cell32l): Add prototype.
13604 (init_registers_powerpc_cell64l): Likewise.
13605 (ppc_arch_setup): Detect Cell/B.E. architecture.
13606
96e946ca
RW
136072009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13608
13609 * Makefile.in (datarootdir): New variable.
13610
58d6951d
DJ
136112009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13612
13613 * linux-low.c (linux_write_memory): Update debugging output.
13614 * Makefile.in (clean): Add new descriptions.
13615 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13616 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13617 * configure.srv: Add new files for arm*-*-linux*.
13618 * linux-arm-low.c: Add new declarations.
13619 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13620 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13621 (HWCAP_VFPv3D16): New.
13622 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13623 instead of __IWMMXT__.
13624 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13625 (arm_arch_setup): New.
13626 (target_regsets): Remove #ifdef. Add VFP regset.
13627 (the_low_target): Use arm_arch_setup.
13628
12b42a12
DJ
136292009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13632 the main thread again.
13633
ac8c974e
AR
136342009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13635
13636 Adding Neutrino gdbserver.
13637 * configure: Regenerated.
13638 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13639 * configure.srv (i[34567]86-*-nto*): New target.
13640 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13641 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13642 (nto_comctrl) [__QNX__]: New function.
13643 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13644
4424e0c3 136452009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13646
13647 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13648 srv_tgtobj.
13649
912cf4ba
PA
136502009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13651 Pedro Alves <pedro@codesourcery.com>
13652
13653 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13654 don't support CONTEXT_EXTENDED_REGISTERS.
13655 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13656 (the_low_target): Install them.
13657 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13658 failing with ERROR_PIPE_NOT_CONNECTED.
13659
aa5ca48f
DE
136602009-06-30 Doug Evans <dje@google.com>
13661 Pierre Muller <muller@ics.u-strasbg.fr>
13662
13663 Add h/w watchpoint support to x86-linux, win32-i386.
13664 * Makefile.in (SFILES): Add i386-low.c
13665 (i386_low_h): Define.
13666 (i386-low.o): Add dependencies.
13667 (linux-x86-low.o): Add i386-low.h dependency.
13668 (win32-i386-low.o): Ditto.
13669 * i386-low.c: New file.
13670 * i386-low.h: New file.
13671 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13672 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13673 * linux-low.c (linux_add_process): Initialize arch_private.
13674 (linux_remove_process): Free arch_private.
13675 (add_lwp): Initialize arch_private.
13676 (delete_lwp): Free arch_private.
13677 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13678 provided.
13679 * linux-low.h (process_info_private): New member arch_private.
13680 (lwp_info): New member arch_private.
13681 (linux_target_ops): New members new_process, new_thread,
13682 prepare_to_resume.
13683 (ptid_of): New macro.
13684 * linux-x86-low.c: Include stddef.h, i386-low.h.
13685 (arch_process_info): New struct.
13686 (arch_lwp_info): New struct.
13687 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13688 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13689 (i386_dr_low_get_status): New function.
13690 (x86_insert_point, x86_remove_point): New functions.
13691 (x86_stopped_by_watchpoint): New function.
13692 (x86_stopped_data_address): New function.
13693 (x86_linux_new_process, x86_linux_new_thread): New functions.
13694 (x86_linux_prepare_to_resume): New function.
13695 (the_low_target): Add entries for insert_point, remove_point,
13696 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13697 prepare_to_resume.
13698 * server.c (debug_hw_points): New global.
13699 (monitor_show_help): Document set debug-hw-points.
13700 (handle_query): Process "set debug-hw-points".
13701 * server.h (debug_hw_points): Declare.
13702 (paddress): Declare.
13703 * utils.c (NUMCELLS, CELLSIZE): New macros.
13704 (get_sell, xsnprintf, paddress): New functions.
13705 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13706 remove_point, stopped_by_watchpoint, stopped_data_address.
13707 * win32-i386-low.c: Include i386-low.h.
13708 (debug_reg_state): Replaces dr.
13709 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13710 (i386_dr_low_get_status): New function.
13711 (i386_insert_point, i386_remove_point): New functions.
13712 (i386_stopped_by_watchpoint): New function.
13713 (i386_stopped_data_address): New function.
13714 (i386_initial_stuff): Update.
13715 (get_thread_context,set_thread_context,i386_thread_added): Update.
13716 (the_low_target): Add entries for insert_point,
13717 remove_point, stopped_by_watchpoint, stopped_data_address.
13718 * win32-low.c (win32_insert_watchpoint): New function.
13719 (win32_remove_watchpoint): New function.
13720 (win32_stopped_by_watchpoint): New function.
13721 (win32_stopped_data_address): New function.
13722 (win32_target_ops): Add entries for insert_watchpoint,
13723 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13724 * win32-low.h (win32_target_ops): New members insert_point,
13725 remove_point, stopped_by_watchpoint, stopped_data_address.
13726
d993e290
PA
137272009-06-25 Pedro Alves <pedro@codesourcery.com>
13728
13729 * server.c (process_serial_event): Re-return unsupported, not
13730 error, if the type isn't recognized. Re-allow supporting only
13731 insert or remove packets. Also call require_running for
13732 breakpoints. Add missing break statement to default case. Tidy.
13733 * target.h (struct target_ops): Rename insert_watchpoint to
13734 insert_point, and remove_watchpoint to remove_point.
13735
13736 * linux-low.h (struct linux_target_ops): Likewise.
13737 * linux-low.c (linux_insert_watchpoint): Rename to ...
13738 (linux_insert_point): ... this. Adjust.
13739 (linux_remove_watchpoint): Rename to ...
13740 (linux_remove_point): ... this. Adjust.
13741 (linux_target_ops): Adjust.
13742 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13743 (cris_insert_point): ... this.
13744 (cris_remove_watchpoint): Rename to ...
13745 (cris_remove_point): ... this.
13746 (the_low_target): Adjust.
13747
0f54c268
PM
137482009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13749
13750 * server.c (handle_v_kill): Pass signal_pid to
13751 kill_inferior if multi_process is zero.
13752
c6314022
AR
137532009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13754
13755 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13756 * target.h (target_ops): Comment for *_watchpoint to make it clear
13757 the functions can get types '0' and '1'.
13758
4463ce24
AR
137592009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13760
13761 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13762 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13763 * regcache.c (get_regcache): Likewise.
13764 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13765 * win32-low.c (child_fetch_inferior_registers): Remove check for
13766 regno 0.
13767
cf8fd78b
PA
137682009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13769 Pedro Alves <pedro@codesourcery.com>
13770
13771 * target.h (struct target_ops) <supports_multi_process>: New
13772 callback.
13773 (target_supports_multi_process): New.
13774 * server.c (handle_query): Even if GDB reports support, only
13775 enable multi-process if the target also supports it. Report
13776 multi-process support only if the target backend supports it.
13777 * linux-low.c (linux_supports_multi_process): New function.
13778 (linux_target_ops): Install it as target_supports_multi_process
13779 callback.
13780
47c0c975
DE
137812009-05-24 Doug Evans <dje@google.com>
13782
e09875d4
DE
13783 Global renaming of find_thread_pid to find_thread_ptid.
13784 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13785 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13786 All callers updated.
13787
e27d73f6
DE
13788 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13789 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13790 directly.
13791
47c0c975
DE
13792 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13793 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13794 (linux_resume_one_lwp): Ditto.
13795
2acc282a
DE
137962009-05-23 Doug Evans <dje@google.com>
13797
13798 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13799 from struct inferior_list_entry * to struct lwp_info *.
13800 All callers updated.
13801
9f1036c1
DE
138022009-05-13 Doug Evans <dje@google.com>
13803
13804 * linux-x86-low.c: Don't include assert.h.
13805 (x86_siginfo_fixup): Use fatal, not assert.
13806 (x86_arch_setup): Fix comment.
13807
d0722149
DE
138082009-05-12 Doug Evans <dje@google.com>
13809
13810 Biarch support for i386/amd64 gdbserver.
13811 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13812 Add linux-x86-low.c.
13813 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13814 (linux-x86-low.o): Add.
13815 * linux-x86-64-low.c: Delete.
13816 * linux-i386-low.c: Delete.
13817 * linux-x86-low.c: New file.
13818 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13819 linux-x86-low.o.
13820 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13821 linux-x86-low.o.
13822 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13823 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13824 (linux_child_pid_to_exec_file): New function.
13825 (elf_64_header_p, elf_64_file_p): New functions.
13826 (siginfo_fixup): New function.
13827 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13828 give target a chance to convert layout.
13829 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13830 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13831
fdeb2a12
DE
138322009-05-07 Doug Evans <dje@google.com>
13833
13834 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13835 (regsets_store_inferior_registers): Ditto.
13836
a6dbe5df
PA
138372009-05-06 Pedro Alves <pedro@codesourcery.com>
13838
13839 PR server/10048
13840
13841 * linux-low.c (must_set_ptrace_flags): Delete.
13842 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13843 of the global.
13844 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13845 `lwp->must_set_ptrace_flags' instead.
ba42693b 13846 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13847 (linux_wait_1): ... not here.
13848
5091eb23
DE
138492009-04-30 Doug Evans <dje@google.com>
13850
9f767825
DE
13851 * inferiors.c (started_inferior_callback): New function.
13852 (attached_inferior_callback): New function.
13853 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13854 * server.c (print_started_pid, print_attached_pid): New functions.
13855 (detach_or_kill_for_exit): New function.
13856 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13857 * server.h (have_started_inferiors_p): Declare.
13858 (have_attached_inferiors_p): Declare.
13859
5091eb23
DE
13860 * inferiors.c (remove_process): Fix memory leak, free process.
13861 * linux-low.c (linux_remove_process): New function.
13862 (linux_kill): Call it instead of remove_process.
13863 (linux_detach, linux_wait_1): Ditto.
13864
155c8968
PA
138652009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13866
13867 * configure.srv: Add x86 Windows CE target.
13868
7fe519cb
UW
138692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13870
13871 * inferiors.c (get_thread_process): Make global.
13872 * server.h (get_thread_process): Add prototype.
13873 * thread-db.c (find_one_thread): Use get_thread_process
13874 instead of current_process.
13875 (thread_db_get_tls_address): Do not crash if called when
13876 thread layer is not yet initialized.
13877
5472f405
UW
138782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13879
13880 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13881 * spu-low.c (current_tid): Rename to ...
13882 (current_ptid): ... this.
13883 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13884 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13885 ptid_get_lwp (current_ptid) instead of current_tid.
13886 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13887 instead of current_tid. Use find_process_pid to verify pid
13888 argument is valid. Pass proper argument to remove_process.
13889 (spu_thread_alive): Compare current_ptid instead of current_tid.
13890 (spu_resume): Likewise.
13891
55ac2b99
PA
138922009-04-02 Pedro Alves <pedro@codesourcery.com>
13893
13894 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13895 variable.
13896
95954743
PA
138972009-04-01 Pedro Alves <pedro@codesourcery.com>
13898
13899 Implement the multiprocess extensions, and add linux multiprocess
13900 support.
13901
13902 * server.h (ULONGEST): Declare.
13903 (struct ptid, ptid_t): New.
13904 (minus_one_ptid, null_ptid): Declare.
13905 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13906 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13907 (struct inferior_list_entry): Change `id' type from unsigned from
13908 to ptid_t.
13909 (struct sym_cache, struct breakpoint, struct
13910 process_info_private): Forward declare.
13911 (struct process_info): Declare.
13912 (current_process): Declare.
13913 (all_processes): Declare.
13914 (initialize_inferiors): Declare.
13915 (add_thread): Adjust to use ptid_t.
13916 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13917 (add_process, remove_process, find_thread_pid): Declare.
13918 (find_inferior_id): Adjust to use ptid_t.
13919 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13920 (multi_process): Declare.
13921 (push_event): Adjust to use ptid_t.
13922 (read_ptid, write_ptid): Declare.
13923 (prepare_resume_reply): Adjust to use ptid_t.
13924 (clear_symbol_cache): Declare.
13925 * inferiors.c (all_processes): New.
13926 (null_ptid, minus_one_ptid): New.
13927 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13928 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13929 (add_thread): Change unsigned long to ptid. Remove gdb_id
13930 parameter. Adjust.
13931 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13932 (gdb_id_to_thread): Rename to ...
13933 (find_thread_pid): ... this. Change unsigned long to ptid.
13934 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13935 (loaded_dll, pull_pid_from_list): Adjust.
13936 (add_process, remove_process, find_process_pid)
13937 (get_thread_process, current_process, initialize_inferiors): New.
13938 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13939 (struct target_waitstatus) <related_pid>: Ditto.
13940 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13941 return type to int.
13942 (struct target_ops) <join>: Add `pid' argument.
13943 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13944 (struct target_ops) <wait>: Add `ptid' field. Change return type
13945 to ptid.
13946 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13947 (mywait): Add `ptid' argument. Change return type to ptid_t.
13948 (target_pid_to_str): Declare.
13949 * target.c (set_desired_inferior): Adjust to use ptids.
13950 (mywait): Add new `ptid' argument. Adjust.
13951 (target_pid_to_str): New.
13952 * mem-break.h (free_all_breakpoints): Declare.
13953 * mem-break.c (breakpoints): Delelete.
13954 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13955 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13956 to use per-process breakpoint list.
13957 (free_all_breakpoints): New.
13958 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13959 (symbol_cache, all_symbols_looked_up): Delete.
13960 (hexchars): New.
13961 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13962 read_ptid): New.
13963 (prepare_resume_reply): Change ptid argument's type from unsigned
13964 long to ptid_t. Adjust. Implement W;process and X;process.
13965 (free_sym_cache, clear_symbol_cache): New.
13966 (look_up_one_symbol): Adjust to per-process symbol cache. *
13967 * server.c (cont_thread, general_thread, step_thread): Change type
13968 to ptid_t.
13969 (attached): Delete.
13970 (multi_process): New.
13971 (last_ptid): Change type to ptid_t.
13972 (struct vstop_notif) <ptid>: Change type to ptid_t.
13973 (queue_stop_reply, push_event): Change `ptid' argument's type to
13974 ptid_t.
13975 (discard_queued_stop_replies): Add `pid' argument.
13976 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13977 changes. Don't reference the `attached' global.
13978 (attach_inferior): Adjust to mywait interface changes.
13979 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13980 features. Handle and report "multiprocess+". Handle
13981 "qAttached:PID".
13982 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13983 changes.
13984 (handle_v_kill): New.
13985 (handle_v_stopped): Adjust to use target_pid_to_str.
13986 (handle_v_requests): Allow multiple attaches and runs when
13987 multiprocess extensions are in effect. Handle "vKill".
13988 (myresume): Adjust to use ptids.
13989 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13990 (handle_status): Adjust to discard_queued_stop_replies interface
13991 change.
13992 (first_thread_of, kill_inferior_callback)
13993 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13994 (main): Call initialize_inferiors. Adjust to use ptids, killing
13995 and detaching from all inferiors. Handle multiprocess packet
13996 variants.
13997 * linux-low.h: Include gdb_proc_service.h.
13998 (struct process_info_private): New.
13999 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14000 <lwpid_of>: Use ptid_get_lwp.
14001 (get_lwp_thread): Adjust.
14002 (struct lwp_info): Add `dead' member.
14003 (find_lwp_pid): Declare.
14004 * linux-low.c (thread_db_active): Delete.
14005 (new_inferior): Adjust comment.
14006 (inferior_pid): Delete.
14007 (linux_add_process): New.
14008 (handle_extended_wait): Adjust.
14009 (add_lwp): Change unsigned long to ptid.
14010 (linux_create_inferior): Add process to processes table. Adjust
14011 to use ptids. Don't set new_inferior here.
14012 (linux_attach_lwp): Rename to ...
14013 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14014 it. Adjust to use ptids.
14015 (linux_attach_lwp): New.
14016 (linux_attach): Add process to processes table. Don't set
14017 new_inferior here.
14018 (struct counter): New.
14019 (second_thread_of_pid_p, last_thread_of_process_p): New.
14020 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14021 multiple processes.
14022 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14023 processes. Remove process from process table.
14024 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14025 to multiple processes.
14026 (any_thread_of): New.
14027 (linux_detach): Add `pid' argument, and handle it. Remove process
14028 from processes table.
14029 (linux_join): Add `pid' argument. Handle it.
14030 (linux_thread_alive): Change unsighed long argument to ptid_t.
14031 Consider dead lwps as not being alive.
14032 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14033 threads we're not interested in.
14034 (same_lwp, find_lwp_pid): New.
14035 (linux_wait_for_lwp): Change `pid' argument's type from int to
14036 ptid_t. Adjust.
14037 (linux_wait_for_event): Rename to ...
14038 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14039 from int to ptid_t. Adjust.
14040 (linux_wait_for_event): New.
14041 (linux_wait_1): Add `ptid' argument. Change return type to
14042 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14043 that exit from the process table.
14044 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14045 Adjust.
14046 (mark_lwp_dead): New.
14047 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14048 stopping all threads, mark its main lwp as dead.
14049 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14050 ptids.
14051 (fetch_register, usr_store_inferior_registers)
14052 (regsets_fetch_inferior_registers)
14053 (regsets_store_inferior_registers, linux_read_memory)
14054 (linux_write_memory): Inline `inferior_pid'.
14055 (linux_look_up_symbols): Adjust to use per-process
14056 `thread_db_active'.
14057 (linux_request_interrupt): Adjust to use ptids.
14058 (linux_read_auxv): Inline `inferior_pid'.
14059 (initialize_low): Don't reference thread_db_active.
14060 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14061 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14062 (ps_getpid): Return the pid of the current inferior.
14063 * thread-db.c (proc_handle, thread_agent): Delete.
14064 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14065 per-process data.
14066 (find_one_thread): Change argument type to ptid_t. Adjust to
14067 per-process data.
14068 (maybe_attach_thread): Adjust to per-process data and ptids.
14069 (thread_db_find_new_threads): Ditto.
14070 (thread_db_init): Ditto.
14071 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14072 processes table. Adjust to use ptids.
14073 (spu_kill, spu_detach): Adjust interface. Remove process from
14074 processes table.
14075 (spu_join, spu_thread_alive): Adjust interface.
14076 (spu_wait): Adjust interface. Remove process from processes
14077 table. Adjust to use ptids.
14078 * win32-low.c (current_inferior_tid): Delete.
14079 (current_inferior_ptid): New.
14080 (debug_event_ptid): New.
14081 (thread_rec): Take a ptid. Adjust.
14082 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14083 (child_delete_thread): Ditto.
14084 (do_initial_child_stuff): Add `attached' argument. Add process to
14085 processes table.
14086 (child_fetch_inferior_registers, child_store_inferior_registers):
14087 Adjust.
14088 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14089 (win32_attach): Pass 1 to do_initial_child_stuff.
14090 (win32_kill): Adjust interface. Remove process from processes
14091 table.
14092 (win32_detach): Ditto.
14093 (win32_join): Adjust interface.
14094 (win32_thread_alive): Take a ptid.
14095 (win32_resume): Adjust to use ptids.
14096 (get_child_debug_event): Ditto.
14097 (win32_wait): Adjust interface. Remove exiting process from
14098 processes table.
14099
bd99dc85
PA
141002009-04-01 Pedro Alves <pedro@codesourcery.com>
14101
14102 Non-stop mode support.
14103
14104 * server.h (non_stop): Declare.
14105 (gdb_client_data, handler_func): Declare.
14106 (delete_file_handler, add_file_handler, start_event_loop):
14107 Declare.
14108 (handle_serial_event, handle_target_event, push_event)
14109 (putpkt_notif): Declare.
14110 * target.h (enum resume_kind): New.
14111 (struct thread_resume): Replace `step' field by `kind' field.
14112 (TARGET_WNOHANG): Define.
14113 (struct target_ops) <wait>: Add `options' argument.
14114 <supports_non_stop, async, start_non_stop>: New fields.
14115 (target_supports_non_stop, target_async): New.
14116 (start_non_stop): Declare.
14117 (mywait): Add `options' argument.
14118 * target.c (mywait): Add `options' argument. Print child exit
14119 notifications here.
14120 (start_non_stop): New.
14121 * server.c (non_stop, own_buf, mem_buf): New globals.
14122 (struct vstop_notif): New.
14123 (notif_queue): New global.
14124 (queue_stop_reply, push_event, discard_queued_stop_replies)
14125 (send_next_stop_reply): New.
14126 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14127 interface changes.
14128 (attach_inferior): In non-stop mode, don't wait for the target
14129 here.
14130 (handle_general_set): Handle QNonStop.
14131 (handle_query): When handling qC, return the current general
14132 thread, instead of the first thread of the list.
14133 (handle_query): If the backend supports non-stop mode, include
14134 QNonStop+ in the qSupported query response.
14135 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14136 and non-stop mode.
14137 (handle_v_attach, handle_v_run): Handle non-stop mode.
14138 (handle_v_stopped): New.
14139 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14140 (myresume): Adjust to use resume_kind. Handle non-stop.
14141 (queue_stop_reply_callback): New.
14142 (handle_status): Handle non-stop mode.
14143 (main): Clear non_stop flag on reconnection. Use the event-loop.
14144 Refactor serial protocol handling from here ...
14145 (process_serial_event): ... to this new function. When GDB
14146 selects any thread, select one here. In non-stop mode, wait until
14147 GDB acks all pending events before exiting.
14148 (handle_serial_event, handle_target_event): New.
14149 * remote-utils.c (remote_open): Install remote_desc in the event
14150 loop.
14151 (remote_close): Remove remote_desc from the event loop.
14152 (putpkt_binary): Rename to...
14153 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14154 (putpkt_binary): New as wrapper around putpkt_binary_1.
14155 (putpkt_notif): New.
14156 (prepare_resume_reply): In non-stop mode, don't change the
14157 general_thread.
14158 * event-loop.c: New.
14159 * Makefile.in (OBJ): Add event-loop.o.
14160 (event-loop.o): New rule.
14161
14162 * linux-low.h (pid_of): Moved here.
14163 (lwpid_of): New.
14164 (get_lwp_thread): Use lwpid_of.
14165 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14166 * linux-low.c (pid_of): Delete.
14167 (inferior_pid): Use lwpid_of.
14168 (linux_event_pipe): New.
14169 (target_is_async_p): New.
14170 (delete_lwp): New.
14171 (handle_extended_wait): Use lwpid_of.
14172 (add_lwp): Don't set lwpid field.
14173 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14174 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14175 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14176 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14177 first. Adjust to linux_wait_for_event interface changes. Use
14178 lwpid_of.
14179 (linux_detach): Don't delete the main lwp here.
14180 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14181 (status_pending_p): Don't consider explicitly suspended lwps.
14182 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14183 pointer. Add OPTIONS argument. Change return type to int. Use
14184 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14185 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14186 pointer. Add status pointer argument. Return a pid instead of a
14187 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14188 changes. In non-stop mode, don't switch to a random thread.
14189 (linux_wait): Rename to...
14190 (linux_wait_1): ... this. Add target_options argument, and handle
14191 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14192 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14193 clean exit and signal exit code. Don't stop all threads in
14194 non-stop mode. In all-stop mode, only stop all threads when
14195 reporting a stop to GDB. Handle explicit thread stop requests.
14196 (async_file_flush, async_file_mark): New.
14197 (linux_wait): New.
14198 (send_sigstop): Use lwpid_of.
14199 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14200 interface changes. In non-stop mode, don't switch to a random
14201 thread.
14202 (linux_resume_one_lwp): Use lwpid_of.
14203 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14204 (linux_resume_one_thread): ... this. Handle resume_stop. In
14205 non-stop mode, don't look for pending flag in all threads.
14206 (resume_status_pending_p): Don't consider explicitly suspended
14207 threads.
14208 (my_waitpid): Reimplement. Emulate __WALL.
14209 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14210 Use lwpid_of.
14211 (sigchld_handler, linux_supports_non_stop, linux_async)
14212 (linux_start_non_stop): New.
14213 (linux_target_ops): Register linux_supports_non_stop, linux_async
14214 and linux_start_non_stop.
14215 (initialize_low): Install SIGCHLD handler.
14216 * thread-db.c (thread_db_create_event, find_one_thread)
14217 (thread_db_get_tls_address): Use lwpid_of.
14218 * win32-low.c (win32_detach): Adjust to use resume_kind.
14219 (win32_wait): Add `options' argument.
14220 * spu-low.c (spu_resume): Adjust to use resume_kind.
14221 (spu_wait): Add `options' argument.
14222
5b1c542e
PA
142232009-04-01 Pedro Alves <pedro@codesourcery.com>
14224
14225 Decouple target code from remote protocol.
14226
14227 * target.h (enum target_waitkind): New.
14228 (struct target_waitstatus): New.
14229 (struct target_ops) <wait>: Return an unsigned long. Take a
14230 target_waitstatus pointer instead of a char pointer.
14231 (mywait): Likewise.
14232 * target.c (mywait): Change prototype to return an unsigned long.
14233 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14234 * server.h (thread_from_wait, old_thread_from_wait): Delete
14235 declarations.
14236 (prepare_resume_reply): Change prototype to take a
14237 target_waitstatus.
14238 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14239 (last_status, last_ptid): New.
14240 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14241 pid instead of a signal.
14242 (attach_inferior): Remove "status" and "signal" parameters.
14243 Adjust.
14244 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14245 not as an address.
14246 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14247 (handle_v_requests, myresume): Remove "status" and "signal"
14248 parameters. Adjust.
14249 (handle_status): New.
14250 (main): Delete local `status'. Adjust.
14251 * remote-utils.c: Include target.h.
14252 (prepare_resume_reply): Change prototype to take a
14253 target_waitstatus. Adjust.
14254
14255 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14256 interface.
14257 * spu-low.c (spu_wait): Adjust.
14258 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14259 Delete.
14260 (win32_wait): Adjust.
14261
2bd7c093
PA
142622009-04-01 Pedro Alves <pedro@codesourcery.com>
14263
14264 * target.h (struct thread_resume): Delete leave_stopped member.
14265 (struct target_ops): Add a `n' argument to the `resume' callback.
14266 * server.c (start_inferior): Adjust.
14267 (handle_v_cont, myresume): Adjust.
14268 * linux-low.c (check_removed_breakpoint): Adjust to resume
14269 interface change, and to removed leave_stopped field.
14270 (resume_ptr): Delete.
14271 (struct thread_resume_array): New.
14272 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14273 resume interface change.
14274 (linux_continue_one_thread, linux_queue_one_thread)
14275 (resume_status_pending_p): Check if the resume field is NULL
14276 instead of checking the leave_stopped member.
14277 (linux_resume): Adjust to the target resume interface change.
14278 * spu-low.c (spu_resume): Adjust to the target resume interface
14279 change.
14280 * win32-low.c (win32_detach, win32_resume): Ditto.
14281
c35fafde
PA
142822009-04-01 Pedro Alves <pedro@codesourcery.com>
14283
14284 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14285 flag.
14286 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14287 pending.
14288 (linux_continue_one_thread): Only preserve the stepping flag if
14289 there's a pending breakpoint.
14290
0a59d50b
PA
142912009-03-31 Pedro Alves <pedro@codesourcery.com>
14292
14293 * server.c (main): After the inferior having exited, call
14294 remote_close before exiting gdbserver.
14295
f04c6d38
TJB
142962009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14297
14298 Fix size of FPSCR in Power 7 processors.
14299 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14300 (PPC_FEATURE_HAS_DFP): New #define.
14301 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14302 size of the FPSCR.
14303
78e5cee6
PA
143042009-03-23 Pedro Alves <pedro@codesourcery.com>
14305
14306 * server.c (handle_query) Whitespace and formatting.
14307
1b3f6016
PA
143082009-03-22 Pedro Alves <pedro@codesourcery.com>
14309
14310 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14311 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14312 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14313 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14314 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14315 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14316 Makefile.in, configure.ac: Fix whitespace throughout.
14317 * configure: Regenerate.
14318
a07b2135
PA
143192009-03-22 Pedro Alves <pedro@codesourcery.com>
14320
14321 * inferiors.c (find_inferior): Make it safe for the callback
14322 function to delete the currently iterated inferior.
14323
67cc2626
PA
143242009-03-22 Pedro Alves <pedro@codesourcery.com>
14325
14326 * Makefile.in (linuw_low_h): Move higher.
14327 (thread-db.o): Depend on $(linux_low_h).
14328
54a0b537
PA
143292009-03-17 Pedro Alves <pedro@codesourcery.com>
14330
14331 Rename "process" to "lwp" throughout.
14332
14333 * linux-low.c (all_processes): Rename to...
14334 (all_lwps): ... this.
14335 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14336 (add_process): Rename to ...
14337 (add_lwp): ... this. Adjust.
14338 (linux_create_inferior): Adjust.
14339 (linux_attach_lwp): Adjust.
14340 (linux_attach): Adjust.
14341 (linux_kill_one_process): Rename to ...
14342 (linux_kill_one_lwp): ... this. Adjust.
14343 (linux_kill): Adjust.
14344 (linux_detach_one_process): Rename to ...
14345 (linux_detach_one_lwp): ... this. Adjust.
14346 (linux_detach): Adjust.
14347 (check_removed_breakpoint): Adjust.
14348 (status_pending_p): Adjust.
14349 (linux_wait_for_process): Rename to ...
14350 (linux_wait_for_lwp): ... this. Adjust.
14351 (linux_wait_for_event): Adjust.
14352 (send_sigstop): Adjust.
14353 (wait_for_sigstop): Adjust.
14354 (stop_all_processes): Rename to ...
14355 (stop_all_lwps): ... this.
14356 (linux_resume_one_process): Rename to ...
14357 (linux_resume_one_lwp): ... this. Adjust.
14358 (linux_set_resume_request, linux_continue_one_thread)
14359 (linux_queue_one_thread, resume_status_pending_p)
14360 (usr_store_inferior_registers, regsets_store_inferior_registers)
14361 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14362 Adjust.
14363 * linux-low.h (get_process): Rename to ...
14364 (get_lwp): ... this. Adjust.
14365 (get_thread_process): Rename to ...
14366 (get_thread_lwp): ... this. Adjust.
14367 (get_process_thread): Rename to ...
14368 (get_lwp_thread): ... this. Adjust.
14369 (struct process_info): Rename to ...
14370 (struct lwp_info): ... this.
14371 (all_processes): Rename to ...
14372 (all_lwps): ... this.
14373 * proc-service.c (ps_lgetregs): Adjust.
14374 * thread-db.c (thread_db_create_event, find_one_thread)
14375 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14376
0b16c5cf
PA
143772009-03-14 Pedro Alves <pedro@codesourcery.com>
14378
14379 * server.c (handle_query): Handle "qAttached".
14380
32de4b9d
NS
143812009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14382
14383 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14384 GPLv3, update license URL.
14385
2aecd87f
DE
143862009-03-01 Doug Evans <dje@google.com>
14387
93efd302 14388 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14389 (server_h): Add gdb_signals.h.
14390 (signals.o): Update.
14391 * server.h (target_signal_from_host,target_signal_to_host_p)
14392 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14393
86b1f9c5
PM
143942009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14395
14396 * remote-utils.c (getpkt): Also generate remote-debug
14397 information if noack_mode is set.
14398
4aa995e1
PA
143992009-02-06 Pedro Alves <pedro@codesourcery.com>
14400
14401 * server.c (handle_query): Report qXfer:siginfo:read and
14402 qXfer:siginfo:write as supported and handle them.
14403 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14404 * linux-low.c (linux_xfer_siginfo): New.
14405 (linux_target_ops): Set it.
14406
62709adf
PA
144072009-01-26 Pedro Alves <pedro@codesourcery.com>
14408
14409 * server.c (gdbserver_usage): Mention --remote-debug.
14410 (main): Accept '--remote-debug' switch.
14411
aef93bd7
DE
144122009-01-18 Doug Evans <dje@google.com>
14413
14414 * regcache.c (new_register_cache): No need to check result of xcalloc.
14415 * server.c (handle_search_memory): Back out calls to xmalloc,
14416 result is checked and error is returned to user upon failure.
14417 (handle_query): Ditto. Add more checks for result of malloc.
14418 (handle_v_cont): Check result of malloc, report error back to
14419 user upon failure.
14420 (handle_v_run): Ditto. Call freeargv.
14421 * server.h (freeargv): Declare.
14422 * utils.c (freeargv): New fn.
14423
54363045
DE
144242009-01-15 Doug Evans <dje@google.com>
14425
f626972c
DE
14426 * gdbreplay.c (perror_with_name): Make arg const char *.
14427 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14428 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14429 * utils.c (perror_with_name): Make arg const char *.
54363045 14430
18aae699
PA
144312009-01-14 Pedro Alves <pedro@codesourcery.com>
14432
14433 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14434 when handling a EXIT_PROCESS_DEBUG_EVENT.
14435
ff703abe
JB
144362009-01-06 Joel Brobecker <brobecker@adacore.com>
14437
14438 * gdbreplay.c (gdbreplay_version): Update copyright year.
14439 * server.c (gdbserver_version): Likewise.
14440
f21cc1a2 144412009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14442
14443 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14444 (handle_extended_wait): Improve comment.
0e21c1ec 14445
bca929d3
DE
144462008-12-13 Doug Evans <dje@google.com>
14447
14448 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14449 * server.h (ATTR_MALLOC): New macro.
14450 (xmalloc,xcalloc,xstrdup): Declare.
14451 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14452 * inferiors.c: Ditto.
14453 * linux-low.c: Ditto.
14454 * mem-break.c: Ditto.
14455 * regcache.c: Ditto.
14456 * remote-utils.c: Ditto.
14457 * server.c: Ditto.
14458 * target.c: Ditto.
14459 * win32-low.c: Ditto.
14460
97438e3f
DE
144612008-12-12 Doug Evans <dje@google.com>
14462
896c7fbb
DE
14463 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14464 in debugging printf.
14465
97438e3f
DE
14466 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14467
e3b886f8
DE
144682008-12-09 Doug Evans <dje@google.com>
14469
14470 * linux-low.h (struct process_info): Delete member tid, unused.
14471 * thread-db.c (find_one_thread): Update.
14472 (maybe_attach_thread): Update.
14473
07e059b5
VP
144742008-12-02 Pedro Alves <pedro@codesourcery.com>
14475
889bf7c5
PA
14476 * target.h (struct target_ops): Add qxfer_osdata member.
14477 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14478 and dirent.h.
14479 (linux_qxfer_osdata): New functions.
14480 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14481 callback.
14482 * server.c (handle_query): Handle "qXfer:osdata:read:".
14483 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14484 (buffer_xml_printf): New functions.
14485 * server.h (struct buffer): New.
14486 (buffer_grow_str, buffer_grow_str0): New macros.
14487 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14488 (buffer_xml_printf): Declare.
07e059b5 14489
4cab47ab
DE
144902008-11-24 Doug Evans <dje@google.com>
14491
14492 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14493
f142445f
DJ
144942008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14495
14496 * server.c (handle_v_run): Always use the supplied argument list.
14497
d0107bb6 144982008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14499
d0107bb6
BW
14500 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14501 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14502
2c4ad781
TJB
145032008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14504
14505 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14506 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14507 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14508 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14509 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14510 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14511 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14512 XML target descriptions.
14513 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14514 when inferior is running on an ISA 2.05 or later processor. Add
14515 special case to return offset for full 64-bit slot of FPSCR when
14516 in 32-bits.
14517
dfb64f85
DJ
145182008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14519
14520 * Makefile.in (SFILES, clean): Added sparc64 files.
14521 (reg-sparc64.o, reg-sparc64.c): New.
14522 * configure.srv (sparc*-*-linux*): New configuration.
14523 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14524 syscall arguments for SPARC.
14525 (regsets_store_inferior_registers): Likewise.
14526 * linux-sparc-low.c: New file.
14527
66b6e1dd
DE
145282008-10-21 Doug Evans <dje@google.com>
14529
14530 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14531 (READLINE_DIR,READLINE_DEP): Delete.
14532 (INTERNAL_CFLAGS): Update.
14533 (LINTFLAGS): Update.
14534
9b710a42
PA
145352008-10-10 Pedro Alves <pedro@codesourcery.com>
14536
14537 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14538 whole argv from the last run, not just argv[0].
14539
5822d809
PA
145402008-09-08 Pedro Alves <pedro@codesourcery.com>
14541
14542 * regcache.c (new_register_cache): Return NULL if the register
14543 cache size isn't known yet.
14544 (free_register_cache): Avoid dereferencing a NULL regcache.
14545
74aac56f
DJ
145462008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14547
14548 * configure.srv: Merge MIPS and MIPS64.
14549
400b20f5
MR
145502008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14551
14552 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14553
677c5bb1
LM
145542008-08-18 Luis Machado <luisgpm@br.ibm.com>
14555
14556 * Makefile.in: Add required vsx dependencies.
14557
14558 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14559 Declare init_registers_powerpc_vsx32l.
14560 Declare init_registers_powerpc_vsx64l.
14561 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14562 (ppc_arch_setup): Check for VSX in hwcap.
14563 (ppc_fill_vsxregset): New function.
14564 (ppc_store_vsxregset): New function.
14565 Add new VSX entry in regset_info target_regsets.
14566
14567 * configure.srv: Add new VSX dependencies.
14568
a6f3e723
SL
145692008-08-12 Pedro Alves <pedro@codesourcery.com>
14570
14571 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14572 (remote_open): Set or clear transport_is_reliable.
14573 (putpkt_binary): Don't expect acks in noack mode.
14574 (getpkt): Don't send ack/nac in noack mode.
14575 * server.c (handle_general_set): Handle QStartNoAckMode.
14576 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14577 qSupported.
14578 (main): Reset noack_mode on every connection.
14579 * server.h (noack_mode): Declare.
14580
a417dc56
RW
145812008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14582
14583 * Makefile.in (GDBREPLAY_OBS): New variable.
14584 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14585
3221518c
UW
145862008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14587 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14590 (usr_store_inferior_registers): Likewise.
14591 (regsets_store_inferior_registers): Likewise.
14592
ec56be1b
PA
145932008-07-31 Rolf Jansen <rj@surtec.com>
14594 Pedro Alves <pedro@codesourcery.com>
14595
14596 * configure.ac: Check for memmem declaration.
14597 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14598 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14599 (disable_packet_qfThreadInfo): Unconditionally compile.
14600 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14601 * configure, config.in: Regenerate.
14602
2fe5e3ff
DE
146032008-07-28 Doug Kwan <dougkwan@google.com>
14604
14605 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14606 (linux_write_memory): Remove declaration of errno.
14607
836acd6d
UW
146082008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14609
14610 * linux-low.c (handle_extended_wait): Do not use "status"
14611 variable uninitialized.
14612
aeba519e
PA
146132008-07-07 Pedro Alves <pedro@codesourcery.com>
14614
14615 * server.c (handle_v_attach): Inhibit reporting dll changes.
14616
db42f210
PA
146172008-06-27 Pedro Alves <pedro@codesourcery.com>
14618
14619 * remote-utils.c (prepare_resume_reply): If requested, don't
14620 output "thread:TID" in the T stop reply.
14621
14622 * server.c (disable_packet_vCont, disable_packet_Tthread)
14623 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14624 (handle_query): If requested, disable support for qC, qfThreadInfo
14625 and qsThreadInfo.
14626 (handle_v_requests): If requested, disable support for vCont.
14627 (gdbserver_show_disableable): New.
14628 (main): Handle --disable-packet and --disable-packet=LIST.
14629
14630 * server.h (disable_packet_vCont, disable_packet_Tthread)
14631 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14632
8e4c5421
CD
146332008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14634
14635 * server.c (gdbserver_usage): Mention --version.
14636
6e23a804
DJ
146372008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * Makefile.in (gdbreplay.o): New rule.
14640
90aa6a40
JM
146412008-06-06 Joseph Myers <joseph@codesourcery.com>
14642
14643 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14644 message, not gdbserver.
14645
c16158bc 146462008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14647 Nathan Sidwell <nathan@codesourcery.com>
14648 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14649
14650 * acinclude.m4: Include ../../config/acx.m4.
14651 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14652 * configure, config.in: Regenerate.
14653 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14654 * server.c (gdbserver_version): Print PKGVERSION.
14655 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14656 (main): Adjust gdbserver_usage calls.
14657 * gdbreplay.c (version, host_name): Add declarations.
14658 (gdbreplay_version, gdbreplay_usage): New.
14659 (main): Accept --version and --help options.
14660
aeb75bf5
DJ
146612008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14664 (arm_breakpoint_at): Handle Thumb.
14665 (the_low_target): Add comment.
14666
76b233dd
UW
146672008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14668
14669 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14670
08388c79
DE
146712008-05-09 Doug Evans <dje@google.com>
14672
a3c83fae
DE
14673 * server.h (decode_search_memory_packet): Declare.
14674 * remote-utils.c (decode_search_memory_packet): New fn.
14675 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14676 (handle_search_memory): New fn.
14677 (handle_query): Process qSearch:memory packets.
14678
bb9c3d36
UW
146792008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14680
14681 * regcache.c (registers_length): Remove.
14682 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14683 full register packet.
14684 * regcache.h (registers_length): Remove prototype.
14685 * server.h (PBUFSIZ): Define to 16384.
14686
7284e1be
UW
146872008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14688
14689 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14690 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14691 powerpc-64l.o, and powerpc-altivec64l.o.
14692 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14693 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14694 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14695 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14696 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14697 to srv_xmlfiles.
14698
14699 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14700 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14701 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14702 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14703 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14704 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14705 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14706 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14707 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14708 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14709 (clean): Update.
14710
14711 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14712 (init_registers_powerpc_32l): ... this new prototype.
14713 (init_registers_powerpc_32): Remove, replace by ...
14714 (init_registers_powerpc_altivec32l): ... this new prototype.
14715 (init_registers_powerpc_e500): Remove, replace by ...
14716 (init_registers_powerpc_e500l): ... this new prototype.
14717 (init_registers_ppc64): Remove, replace by ...
14718 (init_registers_powerpc_64l): ... this new prototype.
14719 (init_registers_powerpc_64): Remove, replace by ...
14720 (init_registers_powerpc_altivec64l): ... this new prototype.
14721 (ppc_num_regs): Set to 73.
14722 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14723 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14724 (ppc_cannot_store_register): Handle orig_r3 and trap.
14725 (ppc_arch_setup): Update init_registers_... calls.
14726 (ppc_fill_gregset): Handle orig_r3 and trap.
14727
14728 * inferiors.c (clear_inferiors): Reset current_inferior.
14729
fdc59709
PB
147302008-04-23 Paolo Bonzini <bonzini@gnu.org>
14731
889bf7c5
PA
14732 * acinclude.m4: Add override.m4.
14733 * configure: Regenerate.
fdc59709 14734
c9b2f845
UW
147352008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14736
14737 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14738 initial call to init_register_ppc64.
14739
550512b8
UW
147402008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14741
43aaf8b6
PA
14742 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14743 single powerpc*-*-linux* case.
550512b8
UW
14744 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14745
b6430ec3
UW
147462008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14747
14748 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14749 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14750 from reg_xmlfiles.
14751 * linux-ppc-low.c: Include <elf.h>.
14752 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14753 (ppc_hwcap): New global variable.
14754 (ppc_regmap): Remove __SPE__ #ifdef sections.
14755 (ppc_regmap_e500): New global variable.
14756 (ppc_cannot_store_register): Update __SPE__ special case.
14757 (ppc_get_hwcap): New function.
14758 (ppc_arch_setup): Use it to determine whether inferior supports
14759 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14760 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14761 Do not access registers if target does not support AltiVec.
14762 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14763 Do not access registers if target does not support SPE.
14764 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14765
52fa2412
UW
147662008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14767
14768 * linux-low.c (disabled_regsets, num_regsets): New.
14769 (use_regsets_p): Delete.
14770 (linux_wait_for_process): Clear disabled_regsets.
14771 (regsets_fetch_inferior_registers): Check and set it.
14772 (regsets_store_inferior_registers): Likewise.
14773 (linux_fetch_registers, linux_store_registers): Do not use
14774 use_regsets_p.
14775 (initialize_low): Allocate disabled_regsets.
14776
e28b3332
DJ
147772008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * Makefile.in (LIBOBJS): New.
14780 (OBS): Use LIBOBJS.
14781 (memmem.o): New rule.
14782 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14783 * configure: Regenerated.
14784
4536995d
UW
147852008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14786
14787 * server.c (handle_query): Never return "unsupported" for
14788 qXfer:features:read queries.
14789
221c031f
UW
147902008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14791
14792 * server.c (get_features_xml): Fix inverted condition.
14793 (handle_query): Always support qXfer:feature:read.
14794
ccd213ac
DJ
147952008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * server.c (wrapper_argv): New.
14798 (start_inferior): Handle wrapper_argv. If set, expect an extra
14799 trap.
14800 (gdbserver_usage): Document --wrapper.
14801 (main): Parse --wrapper.
14802
6fe305f7
UW
148032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14804
14805 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14806 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14807 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14808 (ppc_set_pc): Likewise.
14809 (ppc_arch_setup): New function.
14810 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14811 of collect_register.
889bf7c5 14812 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14813
5b0a002e
UW
148142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14815
14816 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14817 instead of linux-ppc64-low.o.
14818 * linux-ppc64-low.c: Remove file.
14819 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14820 (linux-ppc64-low.o): Remove rule.
14821
14822 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14823 (init_registers_powerpc_64): Likewise.
14824 (ppc_regmap): Conditionally define depending on __powerpc64__.
14825 (ppc_cannot_store_register): Do not special-case "fpscr" when
14826 compiled on __powerpc64__.
14827 (ppc_collect_ptrace_register): New function.
14828 (ppc_supply_ptrace_register): New function.
14829 (ppc_breakpoint): Change type to "unsigned int".
14830 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14831 (the_low_target): Conditionally provide initializers for the
889bf7c5 14832 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14833 collect_ptrace_register and supply_ptrace_register members.
14834
9b4b61c8
UW
148352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14836
14837 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14838 * server.c (gdbserver_xmltarget): Define.
14839 (get_features_xml): Use it to replace "target.xml" and arch_string.
14840
14841 * configure.srv: Remove srv_xmltarget. Add XML files that were
14842 mentioned there to srv_xmlfiles instead. Remove conditional tests
14843 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14844 srv_xmlfiles and srv_regobj to include all possible choices.
14845 * configure.ac (srv_xmltarget): Remove.
14846 (srv_xmlfiles): Do not add "target.xml".
14847 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14848 checks for supplementary target information.
14849 * configure: Regenerate.
14850 * Makefile.in (XML_TARGET): Remove.
14851 (target.xml): Remove rule.
14852 (clean): Do not clean up target.xml.
14853 (.PRECIOUS): Do not mention target.xml.
14854
14855 * target.h (struct target_ops): Remove arch_string member.
14856 * linux-low.c (linux_arch_string): Remove.
14857 (linux_target_ops): Remove arch_string initializer.
14858 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14859 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14860 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14861 * spu-low.c (spu_arch_string): Remove.
14862 (spu_target_ops): Remove arch_string initializer.
14863 * win32-low.c (win32_arch_string): Remove.
14864 (win32_target_ops): Remove arch_string initializer.
14865 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14866 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14867 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14868
ee1a7ae4
UW
148692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14870
14871 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14872 by collect_ptrace_register and supply_ptrace_register hooks.
14873 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14874 instead of checking for the_low_target.left_pad_xfer.
14875 (usr_store_inferior_registers): Use collect_ptrace_register callback
14876 instead of checking for the_low_target.left_pad_xfer.
14877
14878 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14879 (s390_supply_ptrace_register): Likewise.
14880 (s390_fill_gregset): Call s390_collect_ptrace_register.
14881 (the_low_target): Update.
14882
14883 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14884 (ppc_supply_ptrace_register): Likewise.
14885 (the_low_target): Update.
14886
14887 * linux-i386-low.c (the_low_target): Update.
14888 * linux-x86-64-low.c (the_low_target): Update.
14889
d61ddec4
UW
148902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14891
14892 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14893 reg-s390.o and reg-s390x.o.
14894
14895 * linux-low.c (new_inferior): New global variable.
14896 (linux_create_inferior, linux_attach): Set it.
14897 (linux_wait_for_process): Call the_low_target.arch_setup after the
14898 target has stopped for the first time.
14899 (initialize_low): Do not call the_low_target.arch_setup.
14900
14901 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14902 (s390_set_pc): Likewise.
14903 (s390_arch_setup): New function.
14904 (the_low_target): Use s390_arch_setup as arch_setup routine.
14905
14906 * regcache.c (realloc_register_cache): New function.
14907 (set_register_cache): Call it for each existing regcache.
14908
d05b4ac3
UW
149092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14910
14911 * server.h (init_registers): Remove prototype.
14912
14913 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14914 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14915 instead of init_registers ().
14916 * linux-arm-low.c (init_registers_arm): Add prototype.
14917 (init_registers_arm_with_iwmmxt): Likewise.
14918 (the_low_target): Add initializer for arch_setup field.
14919 * linux-cris-low.c (init_registers_cris): Add prototype.
14920 (the_low_target): Add initializer for arch_setup field.
14921 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14922 (the_low_target): Add initializer for arch_setup field.
14923 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14924 (the_low_target): Add initializer for arch_setup field.
14925 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14926 (the_low_target): Add initializer for arch_setup field.
14927 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14928 (the_low_target): Add initializer for arch_setup field.
14929 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14930 (the_low_target): Add initializer for arch_setup field.
14931 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14932 (init_registers_mips64_linux): Likewise.
14933 (the_low_target): Add initializer for arch_setup field.
14934 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14935 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14936 (the_low_target): Add initializer for arch_setup field.
14937 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14938 (init_registers_powerpc_64): Likewise.
14939 (the_low_target): Add initializer for arch_setup field.
14940 * linux-s390-low.c (init_registers_s390): Add prototype.
14941 (init_registers_s390x): Likewise.
14942 (the_low_target): Add initializer for arch_setup field.
14943 * linux-sh-low.c (init_registers_sh): Add prototype.
14944 (the_low_target): Add initializer for arch_setup field.
14945 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14946 (the_low_target): Add initializer for arch_setup field.
14947 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14948 (the_low_target): Add initializer for arch_setup field.
14949
14950 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14951 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14952 instead of init_registers ().
14953 * win32-arm-low.c (init_registers_arm): Add prototype.
14954 (the_low_target): Add initializer for arch_setup field.
14955 * win32-i386-low.c (init_registers_i386): Add prototype.
14956 (the_low_target): Add initializer for arch_setup field.
14957
14958 * spu-low.c (init_registers_spu): Add prototype.
14959 (initialize_low): Call initialie_registers_spu () instead of
14960 initialize_registers ().
14961
fd96d250
PA
149622008-02-19 Pedro Alves <pedro@codesourcery.com>
14963
14964 * server.c (handle_v_requests): When handling the vRun and vAttach
14965 packets, if already debugging a process, don't kill it. Return an
14966 error instead.
14967
d41b6bb4
DJ
149682008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * server.c (handle_query): Correct length check.
14971
5ac588cf
PA
149722008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14973
14974 * win32-low.c (do_initial_child_stuff): Add process handle
14975 parameter. Set current_process_handle and current_process_id from the
14976 parameters. Clear globals.
14977 (win32_create_inferior): Don't set current_process_handle and
14978 current_process_id here. Instead pass them on the call to
14979 do_initial_child_stuff.
14980 (win32_attach): Likewise.
14981 (win32_clear_inferiors): New.
14982 (win32_kill): Don't close the current process handle or the
14983 current thread handle here. Instead call win32_clear_inferiors.
14984 (win32_detach): Don't open a new handle to the process. Call
14985 win32_clear_inferiors.
14986 (win32_join): Don't rely on current_process_handle; open a new
14987 handle using the process id.
14988 (win32_wait): Call win32_clear_inferiors when the inferior process
14989 has exited.
14990
ecd7ecbc
DJ
149912008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * server.c (monitor_show_help): Add "exit".
14994
1525d545
MG
149952008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14996
ecd7ecbc 14997 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14998 (clean): Add reg-xtensa.c.
14999 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15000 * configure.srv (xtensa*-*-linux*) New target.
15001 * linux-xtensa-low.c: New.
15002 * xtensa-xtregs.c: New.
1525d545 15003
59a016f0
PA
150042008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15005
15006 * hostio.c: Don't include errno.h.
15007 (errno_to_fileio_errno): Move to hostio-errno.
15008 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15009 error number outputting to the target->hostio_last_error callback.
15010 (hostio_packet_error): Use FILEIO_EINVAL directly.
15011 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15012 calls to hostio_error.
15013 * hostio-errno.c: New.
15014 * server.h (hostio_last_error_from_errno): Declare.
15015 * target.h (target_ops): Add hostio_last_error member.
15016 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15017 as hostio_last_error handler.
889bf7c5 15018 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15019 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15020 (wince_hostio_last_error): New functions.
15021 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15022 as hostio_last_error handler.
15023 (win32_target_ops) [!_WIN32_WCE]: Register
15024 hostio_last_error_from_errno as hostio_last_error handler.
15025 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15026 (hostio-errno.o): New rule.
15027 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15028 * configure.srv (srv_hostio_err_objs): New variable. Default to
15029 hostio-errno.o.
15030 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15031 * configure: Regenerate.
15032
2d717e4f
DJ
150332008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15034
15035 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15036 (linux_kill, linux_detach): Clean up the process list.
15037 * remote-utils.c (remote_open): Improve port number parsing.
15038 (putpkt_binary, input_interrupt): Only send interrupts if the target
15039 is running.
15040 * server.c (extended_protocol): Make static.
15041 (attached): Define earlier.
15042 (exit_requested, response_needed, program_argv): New variables.
15043 (target_running): New.
15044 (start_inferior): Clear attached here.
15045 (attach_inferior): Set attached here.
15046 (require_running): Define.
15047 (handle_query): Use require_running and target_running. Implement
15048 "monitor exit".
15049 (handle_v_attach, handle_v_run): New.
15050 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15051 (gdbserver_usage): Update.
15052 (main): Redo argument parsing. Handle --debug and --multi. Handle
15053 --attach along with other options or after the port. Save
15054 program_argv. Support no initial program. Resynchronize
15055 communication with GDB after an error. Handle "monitor exit".
15056 Use require_running and target_running. Always allow the extended
15057 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15058 restart in extended mode.
15059 * README: Refer to the GDB manual. Update --attach usage.
15060
7407e2de
AS
150612007-12-20 Andreas Schwab <schwab@suse.de>
15062
15063 * linux-low.c (STACK_SIZE): Define.
15064 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15065 (linux_test_for_tracefork): Likewise.
15066
b65d95c5
DJ
150672007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15068
15069 * linux-low.c (linux_wait_for_event): Update messages. Do not
15070 reinsert auto-delete breakpoints.
15071 * mem-break.c (struct breakpoint): Change return type of handler to
15072 int.
15073 (set_breakpoint_at): Update handler type.
15074 (reinsert_breakpoint_handler): Return 1 instead of calling
15075 delete_breakpoint.
15076 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15077 setting a new one.
15078 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15079 * mem-break.h (set_breakpoint_at): Update handler type.
15080 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15081 * win32-low.c (auto_delete_breakpoint): New.
15082 (get_child_debug_event): Use it.
15083
4e799345
DJ
150842007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15085
15086 * configure.ac: Check for pread and pwrite.
15087 * hostio.c (handle_pread): Fall back to lseek and read.
15088 (handle_pwrite): Fall back to lseek and write.
15089 * config.in, configure: Regenerated.
15090
27524b67
DJ
150912007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * server.c (myresume): Add own_buf argument.
15094 (main): Update calls.
15095
a20d5e98
DJ
150962007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15099 * remote-utils.c (remote_open): Do not call disable_async_io.
15100 (block_async_io): Delete.
15101 (unblock_async_io): Make static.
15102 (initialize_async_io): New.
15103 * server.c (handle_v_cont): Handle async I/O here.
15104 (myresume): Likewise. Move other common resume tasks here...
15105 (main): ... from here. Call initialize_async_io. Disable async
15106 I/O before the main loop.
15107 * server.h (initialize_async_io): Declare.
15108 (block_async_io, unblock_async_io): Delete prototypes.
15109 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15110
b79d787e
DJ
151112007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15112
15113 * remote-utils.c (readchar): Allow binary data in received messages.
15114
d97903b2
PA
151152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15116
15117 * win32-low.c (attaching): New global.
15118 (win32_create_inferior): Clear the `attaching' global.
15119 (win32_attach): Set the `attaching' global.
15120 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15121 attaching. Only set a breakpoint at the entry point if not
15122 attaching.
15123
311de423
PA
151242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15125
15126 * server.c (main): Don't report dll events on the initial
15127 connection on attaches.
15128
6c2d16d2
PA
151292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15130
15131 * server.c (main): Relax numerical bases supported for the pid of
15132 the --attach command line argument.
15133
5ca906e6
PA
151342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15135
15136 * win32-low.c (win32_attach): Call OpenProcess before
15137 DebugActiveProcess, not after. Add last error output to error
15138 call.
15139
9c6c8194
PA
151402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15141
15142 * win32-low.c (win32_get_thread_context)
15143 (win32_set_thread_context): New functions.
15144 (thread_rec): Use win32_get_thread_context.
15145 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15146 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15147 field.
15148
4d5d1aaa
PA
151492007-12-03 Leo Zayas
15150 Pedro Alves <pedro_alves@portugalmail.pt>
15151
15152 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15153 global variables.
15154 (child_add_thread): Minor cleanup.
15155 (child_continue): Resume artificially suspended threads before
15156 calling ContinueDebugEvent.
15157 (suspend_one_thread): New.
15158 (fake_breakpoint_event): New.
15159 (get_child_debug_event): Change return type to int. Check here if
15160 gdb sent an interrupt request. If a soft interrupt was requested,
15161 fake a breakpoint event. Return 0 if there is no event to handle,
15162 and 1 otherwise.
15163 (win32_wait): Don't check here if gdb sent an interrupt request.
15164 Ensure there is a valid event to handle.
15165 (win32_request_interrupt): Add soft interruption method as last
15166 resort.
15167
c436e841
PA
151682007-12-03 Leo Zayas
15169 Pedro Alves <pedro_alves@portugalmail.pt>
15170
15171 * win32-low.h (win32_thread_info): Add descriptions to the
15172 structure members. Replace `suspend_count' counter by a
15173 `suspended' flag.
15174 * win32-low.c (thread_rec): Update condition of when to get the
15175 context from the inferior. Rely on ContextFlags being set if it
15176 has already been retrieved. Only suspend the inferior thread if
15177 we haven't already. Warn if that fails.
15178 (continue_one_thread): s/suspend_count/suspended/. Only call
15179 ResumeThread once. Warn if that fails.
15180
e7b5fa67
PA
151812007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15182
15183 * win32-low.c (win32_wait): Don't read from the inferior when it
15184 has already exited.
15185
a385171d
PA
151862007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15187
15188 * Makefile.in (win32_low_h): New variable.
15189 (win32-low.o): Add dependency on $(win32_low_h).
15190 (win32-arm-low.o, win32-i386-low.o): New rules.
15191
f80c84b3
DJ
151922007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15193
15194 * hostio.c: Correct copyright year.
15195
a6b151f1
DJ
151962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15197
15198 * Makefile.in (OBS): Add hostio.o.
15199 (hostio.o): New rule.
15200 * server.h (handle_vFile): Declare.
15201 * hostio.c: New file.
15202 * server.c (handle_v_requests): Take packet_len and new_packet_len
15203 for binary packets. Call handle_vFile.
15204 (main): Update call to handle_v_requests.
15205
f9387fc3
DJ
152062007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * linux-low.c: Include <sched.h>.
15209
51c2684e
DJ
152102007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15211
15212 * linux-low.c (linux_tracefork_grandchild): New.
15213 (linux_tracefork_child): Use clone.
15214 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15215
75f83163
JB
152162007-10-31 Joel Brobecker <brobecker@adacore.com>
15217
15218 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15219
da5898ce
DJ
152202007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15221
15222 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15223
24a09b5f
DJ
152242007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15225
15226 * inferiors.c (change_inferior_id): Delete.
15227 (add_pid_to_list, pull_pid_from_list): New.
15228 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15229 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15230 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15231 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15232 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15233 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15234 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15235 (using_threads): Always set to 1.
15236 (handle_extended_wait): New.
15237 (add_process): Do not set TID.
15238 (linux_create_inferior): Set must_set_ptrace_flags.
15239 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15240 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15241 (linux_thread_alive): Rename TID argument to LWPID.
15242 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15243 (linux_wait_for_event): Do not use TID or check using_threads. Update
15244 call to dead_thread_notify. Call handle_extended_wait.
15245 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15246 (send_sigstop): Delete sigstop_sent.
15247 (wait_for_sigstop): Avoid TID.
15248 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15249 (linux_test_for_tracefork): New.
15250 (linux_lookup_signals): Use thread_db_active and
15251 linux_supports_tracefork_flag.
15252 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15253 * linux-low.h (get_process_thread): Avoid TID.
15254 (struct process_ifo): Move thread_known and tid to the end. Remove
15255 sigstop_sent.
15256 (linux_attach_lwp, thread_db_init): Update prototypes.
15257 * server.h (change_inferior_id): Delete prototype.
15258 (add_pid_to_list, pull_pid_from_list): New prototypes.
15259 * thread-db.c (thread_db_use_events): New.
15260 (find_first_thread): Rename to...
15261 (find_one_thread): ...this. Update callers and messages. Do not
15262 call fatal. Check thread_db_use_events. Do not call
15263 change_inferior_id or new_thread_notify.
15264 (maybe_attach_thread): Update. Do not call new_thread_notify.
15265 (thread_db_init): Set thread_db_use_events. Check use_events.
15266 * utils.c (fatal, warning): Correct message prefix.
15267
30ed0a8f
DJ
152682007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * Makefile.in (clean): Remove new files.
15271 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15272 (powerpc-64.o, powerpc-64.c): New rules.
15273 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15274 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15275 with SPE.
15276 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15277 SPE targets.
15278 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15280 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15281 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15282 (target_regsets): Add AltiVec and SPE register sets.
15283 * configure.ac: Check for AltiVec and SPE.
15284 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15285 (ppc_fill_vrregset, ppc_store_vrregset): New.
15286 (target_regsets): Add AltiVec register set.
15287 * configure: Regenerated.
15288
fd462a61
DJ
152892007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15290
15291 * linux-low.c (O_LARGEFILE): Define.
15292 (linux_read_memory): Use /proc/PID/mem.
15293 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15294 * configure, config.in: Regenerated.
15295
69f223ed
DJ
152962007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15297
15298 * linux-low.c (linux_wait_for_event): Do not pass signals while
15299 single-stepping.
15300
aec18585
PA
153012007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15302
15303 * win32-low.c (create_process): New.
15304 (win32_create_inferior): Use create_process instead of
15305 CreateProcess. If create_process failed retry appending an ".exe"
15306 suffix. Store the GetLastError result immediatelly after
15307 create_process calls and use it on the call to error.
15308
34d86ddd
PA
153092007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15310
15311 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15312
5a0e3bd0
JB
153132007-08-23 Joel Brobecker <brobecker@adacore.com>
15314
15315 * configure.ac: Switch license to GPLv3.
15316
f88c79e6
MS
153172007-08-01 Michael Snyder <msnyder@access-company.com>
15318
15319 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15320
6b3d9b83
PA
153212007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15322
15323 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15324 typedef.
15325 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15326 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15327 CloseToolhelp32Snapshot.
15328 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15329 CloseToolhelp32Snapshot.
15330
c588c53c
MS
153312007-07-27 Michael Snyder <michael.snyder@access-company.com>
15332
15333 * server.c (main): Check for inferior exit before main loop.
15334
aa0403d9
PA
153352007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15336
15337 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15338 instead of on tmp_desc.
15339
255e7678
DJ
153402007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15341 Daniel Jacobowitz <dan@codesourcery.com>
15342
15343 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15344 (add_thread): Minor cleanups.
15345 (clear_inferiors): Move lower in the file. Clear the DLL
15346 list.
15347 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15348 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15349 (xml_escape_text): New.
15350 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15351 for qSupported.
15352 (handle_v_cont): Report errors.
15353 (gdbserver_version): Update.
15354 (main): Correct size of own_buf. Do not report initial DLL events.
15355 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15356 (unloaded_dll, xml_escape_text): New.
15357 * win32-low.c (enum target_waitkind): Update comments.
15358 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15359 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15360 (win32_EnumProcessModules, win32_GetModuleInformation)
15361 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15362 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15363 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15364 (win32_Module32First, win32_Module32Next, load_toolhelp)
15365 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15366 (get_child_debug_event): Handle DLL events.
15367 (win32_wait): Likewise.
15368
0d37add9
DJ
153692007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15370
15371 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15372 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15373
45e2715e
PA
153742007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15375
15376 * win32-low.c (handle_output_debug_string): Ignore event if not
15377 waiting.
15378
c5674cf1
PA
153792007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15380
15381 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15382
2bbe3cc1
DJ
153832007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15384
15385 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15386
ae13219e
DJ
153872007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * inferiors.c (change_inferior_id): Add comment.
15390 * linux-low.c (check_removed_breakpoint): Add an early
15391 prototype. Improve debug output.
15392 (linux_attach): Doc update.
15393 (linux_detach_one_process, linux_detach): Clean up before releasing
15394 each process.
15395 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15396 * linux-low.h (struct process_info): Doc improvement.
15397 * mem-break.c (delete_all_breakpoints): New.
15398 * mem-break.h (delete_all_breakpoints): New prototype.
15399 * thread-db.c (find_first_thread): New.
15400 (thread_db_create_event): Call it instead of
15401 thread_db_find_new_threads. Clean up unused variables.
15402 (maybe_attach_thread): Remove first thread handling.
15403 (thread_db_find_new_threads): Use find_first_thread.
15404 (thread_db_get_tls_address): Likewise.
15405
4105de34
DJ
154062007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * thread-db.c (thread_db_find_new_threads): Add prototype.
15409 (thread_db_create_event): Check for the main thread before adding
15410 a new thread.
15411 (maybe_attach_thread): Only enable event reporting if TID == 0.
15412 (thread_db_get_tls_address): Check for new threads.
15413
2b876972
DJ
154142007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15415
15416 * linux-low.c (linux_create_inferior): Try execv before execvp.
15417 * spu-low.c (spu_create_inferior): Likewise.
15418
7a245884
DJ
154192007-06-13 Mike Frysinger <vapier@gentoo.org>
15420
15421 * linux-low.c (linux_create_inferior): Change execv to execvp.
15422 * spu-low.c (spu_create_inferior): Likewies.
15423
117ce543
DJ
154242007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15425
15426 * Makefile.in (clean): Clean new files instead of deleted ones.
15427 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15428 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15429 rules.
15430 * configure.srv: Specify XML files and new regformats for MIPS and
15431 MIPS64 GNU/Linux.
15432 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15433 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15434 an entry for the restart register.
15435 (mips_cannot_fetch_register, mips_cannot_store_register)
15436 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15437 register names to match the XML descriptions.
15438 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15439 restart register instead of $0.
15440
0e7f50da
UW
154412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15442 Markus Deuling <deuling@de.ibm.com>
15443
15444 * remote-utils.c (decode_xfer_write): New function.
15445 * server.h (decode_xfer_write): Add prototype.
15446 * server.c (handle_query): Add PACKET_LEN argument. Support
15447 qXfer:spu:read and qXfer:spu:write packets.
15448 (main): Pass packet_len to handle_query.
15449 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15450 * target.h (target_ops): Add qxfer_spu.
15451
374c1d38
UW
154522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15453
15454 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15455 accessing non-seekable spufs files.
15456
bb63802a
UW
154572007-05-16 Markus Deuling <deuling@de.ibm.com>
15458
889bf7c5 15459 * server.c (handle_query): Add reply for qC packet.
bb63802a 15460
7390519e
PA
154612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15462 Leo Zayas <lerele@champenstudios@com>
15463
15464 * server.h (check_remote_input_interrupt_request): New function.
15465 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15466 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15467 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15468 (check_remote_input_interrupt_request): New function.
15469 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15470 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15471 winapi_GenerateConsoleCtrlEvent): New typedefs.
15472 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15473 to 250 ms.
15474 (win32_wait): Check for remote interrupt request
15475 with check_remote_input_interrupt_request.
15476 (win32_request_interrupt): New function.
15477 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15478
34b34921
PA
154792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15480
15481 * win32-low.c (debug_registers_changed,
15482 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15483 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15484 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15485 (thread_rec): Get context using the low target.
15486 (child_add_thread): Call thread_added on the low target,
15487 which does the same thing.
15488 (regptr): Delete.
15489 (do_initial_child_stuff): Remove debug registers references.
15490 Set context using the low target. Resume threads after
15491 setting the contexts.
15492 (child_continue): Remove dead variable. Remove debug
15493 registers references.
15494 (child_fetch_inferior_registers): Go through the low target.
15495 (do_child_store_inferior_registers): Remove.
15496 (child_store_inferior_registers): Go through the low target.
15497 (win32_resume): Remove debug registers references.
15498 Set context using the low target.
15499 (handle_exception): Change return type to void. Don't record
15500 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15501 first chance exception.
889bf7c5 15502 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15503 goto loop. Always return after waiting for debug event.
15504 (win32_wait): Convert to switch statement. Handle spurious
15505 events.
15506
15507 * win32-i386-low.c (debug_registers_changed,
15508 debug_registers_used): New.
15509 (initial_stuff): Rename to ...
15510 (i386_initial_stuff): ... this. Clear debug registers
15511 state variables.
15512 (store_debug_registers): Delete.
15513 (i386_get_thread_context): New.
15514 (load_debug_registers): Delete.
15515 (i386_set_thread_context): New.
15516 (i386_thread_added): New.
15517 (single_step): Rename to ...
15518 (i386_single_step): ... this.
15519 (do_fetch_inferior_registers): Rename to ...
15520 (i386_fetch_inferior_register): ... this.
15521 (i386_store_inferior_register): New.
15522 (the_low_target): Adapt to new interface.
15523
15524 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15525 (arm_get_thread_context): New.
15526 (arm_set_thread_context): New.
15527 (regptr): New.
15528 (do_fetch_inferior_registers): Rename to ...
15529 (arm_fetch_inferior_register): ... this.
15530 (arm_store_inferior_register): New.
15531 (arm_wince_breakpoint): Reimplement as unsigned long.
15532 (arm_wince_breakpoint_len): Define.
15533 (the_low_target): Adapt to new interface.
15534
15535 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15536 load_debug_registers. Add get_thread_context, set_thread_context,
15537 thread_added and store_inferior_register. Rename
15538 fetch_inferior_registers to fetch_inferior_register.
15539 (regptr): Remove declaration.
15540
dd6953e1
PA
155412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15542
15543 * linux-low.c (linux_detach): Change return type to int. Return 0.
15544 * spu-low.c (spu_detach): Likewise.
15545
444d6139
PA
155462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15547
15548 * target.h (target_ops): Change return type of detach to int.
15549 Add join.
15550 (join_inferior): New.
15551 * server.c (main): Don't skip detach support on mingw32.
15552 If the inferior doesn't support detaching return error.
15553 Call join_inferior instead of using waitpid.
15554 * linux-low.c (linux_join): New.
15555 (linux_target_op): Add linux_join.
15556 * spu-low.c (spu_join): New.
15557 (spu_target_ops): Add spu_join.
15558 * win32-low.c (win32_detach): Adapt to new interface.
15559 Reopen current_process_handle before detaching. Issue a child
15560 resume before detaching.
15561 (win32_join): New.
15562 (win32_target_op): Add win32_join.
15563
1d5315fe
PA
155642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15565
15566 * win32-low.c (win32-attach): Fix return value.
15567 * target.h (target_ops): Describe ATTACH return values.
15568
bf914831
PA
155692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15570
15571 * win32-low.c (GETPROCADDRESS): Define.
15572 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15573 (winapi_DebugSetProcessKillOnExit): Likewise.
15574 (win32_create_inferior): Force usage of ansi CreateProcessA.
15575 (win32_attach): Use GETPROCADDRESS.
15576 (win32_detach): Likewise.
15577
f72f3e60
PA
155782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15579
15580 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15581
ed50f18f
PA
155822007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15583
15584 * win32-low.c: Commit leftover changes from 2007-03-29.
15585
0c2ead7e
DJ
155862007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15587
15588 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15589 fields short instead of int. Add explicit padding.
15590 (i387_cache_to_fsave): Remove unnecessary casts.
15591 (i387_fsave_to_cache): Doc fix.
15592 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15593
73725ff3
DJ
155942007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15597 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15598
d99f33d8
PA
155992007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15600
15601 * configure.srv (arm*-*-mingw32ce*): Move near the other
15602 arm targets.
15603
68070c10
PA
156042007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15605
2482afc6 15606 * configure.ac: Add errno checking.
68070c10
PA
15607 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15608 sys/file.h and malloc.h.
15609 (AC_CHECK_DECLS): Add perror.
15610 (srv_mingwce): Handle.
2482afc6 15611 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15612 win32-i386-low.o to srv_tgtobj.
15613 (i[34567]86-*-mingw*): Likewise.
15614 (arm*-*-mingw32ce*): Add case.
15615 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15616 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15617 [__MINGW32CE__] (strerror): New function.
15618 [__MINGW32CE__] (errno): Define to GetLastError.
15619 [__MINGW32CE__] (COUNTOF): New macro.
15620 (remote_open): Remove extra close call.
15621 * mem-break.c (delete_breakpoint_at): New function.
15622 * mem-break.h (delete_breakpoint_at): Declare.
15623 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15624 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15625 [USE_WIN32API] (read, write): Add char* casts.
15626 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15627 * server.h: Include wincecompat.h on Windows CE.
15628 [HAVE_ERRNO_H]: Check.
15629 (perror): Declare if not declared.
15630 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15631 (perror_with_name): Remove errno declaration.
15632 * wincecompat.h: New.
15633 * wincecompat.c: New.
15634 * win32-low.h: New.
15635 * win32-arm-low.c: New.
15636 * win32-i386-low.c: New.
15637 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15638 (OUTMSG2): Make it safe.
15639 (_T): New macro.
15640 (COUNTOF): New macro.
15641 (NUM_REGS): Get it from the low target.
15642 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15643 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15644 (thread_rec): Let low target handle debug registers.
15645 (child_add_thread): Likewise.
15646 (child_init_thread_list): Likewise.
15647 (continue_one_thread): Likewise.
15648 (regptr): New.
15649 (do_child_fetch_inferior_registers): Move to ...
15650 * win32-i386-low.c: ... here, and rename to ...
15651 (do_fetch_inferior_registers): ... this.
889bf7c5 15652 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15653 Go through the low target.
15654 (do_child_store_inferior_registers): Use regptr.
15655 (strwinerror): New function.
15656 (win32_create_inferior): Handle Windows CE.
15657 Use strwinerror instead of strerror on Windows error
15658 codes. Add program to the error output.
15659 Don't close the main thread handle on Windows CE.
15660 (win32_attach): Use coredll.dll on Windows CE.
15661 (win32_kill): Close current process and current
15662 thread handles.
15663 (win32_detach): Use coredll.dll on Windows CE.
15664 (win32_resume): Let low target handle debug registers, and
15665 step request.
15666 (handle_exception): Add/Remove initial breakpoint. Avoid
15667 non-existant WSTOPSIG on Windows CE.
15668 (win32_read_inferior_memory): Cast to remove warning.
15669 (win32_arch_string): Go through the low target.
15670 (initialize_low): Call set_breakpoint_data with the low
15671 target's breakpoint.
15672 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15673 FOP_REGNUM, mappings): Move to ...
15674 * win32-i386-low.c: ... here.
15675 * win32-low.c (win32_thread_info): Move to ...
15676 * win32-low.h: ... here.
15677 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15678 win32-arm-low.c and wincecompat.c.
15679 (all:): Add $EXEEXT.
15680 (install-only:): Likewise.
15681 (gdbserver:): Likewise.
15682 (gdbreplay:): Likewise.
15683 * config.in: Regenerate.
15684 * configure: Regenerate.
15685
41093d81
PA
156862007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15687
15688 * win32-low.c: Rename typedef thread_info to
15689 win32_thread_info throughout.
15690
544afa54
PA
156912007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15692
15693 * win32-i386-low.c: Rename to ...
15694 * win32-low.c: ... this.
15695 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15696 * Makefile.in: Likewise.
15697
bce7165d
PA
156982007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15699
15700 * remote-utils.c (monitor_output): Constify msg parameter.
15701 * server.h (monitor_output): Likewise.
15702 * win32-i386-low.c (handle_output_debug_string): New.
15703 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15704 handle_output_debug_string.
15705 (get_child_debug_event): Likewise.
15706
506c7aa0
DJ
157072007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15708
15709 * server.c (main): Correct strtoul check.
15710
42c81e2a
DJ
157112007-03-27 Jon Ringle <jon@ringle.org>
15712
15713 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15714
9453113a
DJ
157152007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15716
15717 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15718
64a69107
DJ
157192007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15720
15721 * terminal.h: Check HAVE_SGTTY_H.
15722
157232007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15724
15725 * remote-utils.c (remote_open): Print out the assigned port number.
15726
c74d0ad8
DJ
157272007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15728
15729 * remote-utils.c (monitor_output): New function.
15730 * server.c (debug_threads): Define here.
15731 (monitor_show_help): New function.
15732 (handle_query): Handle qRcmd.
15733 (main): Do not handle 'd' packet.
15734 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15735 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15736 of debug_threads.
15737
de7c3b4a
PA
157382007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15739
15740 * Makefile.in (EXEEXT): New.
15741 (clean): Use $(EXEEXT).
15742
ef57601b
PA
157432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15744
15745 * target.h (target_ops): Rename send_signal to request_interrupt,
15746 and remove enum target_signal parameter.
15747 * linux-low.c (linux_request_interrupt): Rename from
15748 linux_send_signal, and always send SIGINT.
15749 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15750 and always send SIGINT.
15751 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15752 of send_signal.
15753 (input_interrupt): Likewise.
15754
820f2bda
PA
157552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15756
15757 * server.c (get_features_xml): Check if target implemented
15758 arch_string.
15759 * win32-i386-low.c (win32_arch_string): New.
15760 (win32_target_ops): Add win32_arch_string as arch_string member.
15761
ab39bf24
UW
157622007-02-22 Markus Deuling <deuling@de.ibm.com>
15763
15764 * spu-low.c (spu_arch_string): New.
15765 (spu_target_ops): Add spu_arch_string.
15766
61ff6e04
DJ
157672007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15768
15769 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15770 * configure.ac: Do not check for terminal.h.
15771 * configure, config.in: Regenerated.
15772
fb1e4ffc
DJ
157732007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15774
15775 * Makefile.in (OBS): Add $(XML_BUILTIN).
15776 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15777 (clean): Update.
15778 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15779 (arm-with-iwmmxt.c): New.
15780 * config.in, configure: Regenerate.
15781 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15782 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15783 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15784 (arm*-*-linux*): Add iWMMXt and regset support.
15785 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15786 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15787 (arm_store_wmmxregset, target_regsets): New.
15788 * server.c (get_features_xml): Take annex argument. Check builtin
15789 XML documents.
15790 (handle_query): Handle multiple annexes.
15791
0f48aa01
DJ
157922007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * remote-utils.c [USE_WIN32API] (read, write): Define.
15795 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15796 write.
15797
23181151
DJ
157982007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15799
15800 * linux-i386-low.c (the_low_target): Set arch_string.
15801 * linux-x86-64-low.c (the_low_target): Likewise.
15802 * linux-low.c (linux_arch_string): New.
15803 (linux_target_ops): Add it.
15804 * linux-low.h (struct linux_target_ops): Add arch_string.
15805 * server.c (write_qxfer_response): Use const void * for DATA.
15806 (get_features_xml): New.
15807 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15808 * target.h (struct target_ops): Add arch_string method.
15809
9d606399
DJ
158102007-01-03 Denis Pilat <denis.pilat@st.com>
15811 Daniel Jacobowitz <dan@codesourcery.com>
15812
15813 * linux-low.c (linux_kill): Handle being called with no threads.
15814 * win32-i386-low.c (win32_kill): Likewise.
15815 (get_child_debug_event): Clear current_process_handle.
15816
158172006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15818 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * remote-utils.c (remote_open): Check the type of specified
15821 serial port devices before opening them.
15822 * server.c (main): Kill the inferior if an error occurs during
15823 the first remote_open.
15824
a5e13d24
DJ
158252006-12-05 Markus Deuling <deuling@de.ibm.com>
15826
15827 * README: Update supported targets.
15828
186947f7
DJ
158292006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15830
15831 * Makefile.in (clean): Remove reg-mips64.c.
15832 (reg-mips64.c, reg-mips64.o): New rules.
15833 * configure.srv: Handle mips64. Include regset support for mips.
15834 * linux-mips-low.c (union mips_register): New.
15835 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15836 (mips_breakpoint, mips_breakpoint_at): Use int.
15837 (mips_collect_register, mips_supply_register)
15838 (mips_collect_register_32bit, mips_supply_register_32bit)
15839 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15840 (mips_store_fpregset, target_regsets): New.
15841 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15842
a13e2c95
UW
158432006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15844
15845 * configure.srv: Add target "spu*-*-*".
15846 * Makefile.in (clean): Remove reg-spu.c.
15847 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15848 * spu-low.c: New file.
15849
cb7283db
DJ
158502006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15851
15852 * configure.ac: Correct td_thr_tls_get_addr test.
15853 * configure: Regenerated.
15854
89be2091
DJ
158552006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * linux-low.c (linux_wait_for_event): Reformat. Use the
15858 pass_signals array.
15859 * remote-utils.c (decode_address_to_semicolon): New.
15860 * server.c (pass_signals, handle_general_set): New.
15861 (handle_query): Mention QPassSignals for qSupported.
15862 (main): Call handle_general_set.
15863 * server.h (pass_signals, decode_address_to_semicolon): New.
15864
000ef4f0
DJ
158652006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * server.c (handle_query): Correct error handling for read_auxv.
15868
b7149293
UW
158692005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15870
15871 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15872 and srv_linux_thread_db to yes.
15873 * linux-s390-low.c (s390_fill_gregset): New function.
15874 (target_regsets): Define data structure.
15875
dae5f5cf
DJ
158762006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15879 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15880 * config.in, configure: Regenerated.
15881 * inferiors.c (gdb_id_to_thread): New function.
15882 (gdb_id_to_thread_id): Use it.
15883 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15884 * linux-low.h (struct process_info): Add th member.
15885 (thread_db_get_tls_address): New prototype.
15886 * remote-utils.c (decode_address): Make non-static.
15887 * server.c (handle_query): Handle qGetTLSAddr.
15888 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15889 * target.h (struct target_ops): Add get_tls_address.
15890 * thread-db.c (maybe_attach_thread): Save the thread handle.
15891 (thread_db_get_tls_address): New.
15892
32ca6d61
DJ
158932006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15894
15895 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15896 (linux_resume_one_process): Take a siginfo_t *. Update all
15897 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15898 (struct pending_signals): Add a siginfo_t.
15899 (linux_wait_for_process): Always set last_status.
15900 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15901 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15902 * linux-low.h (struct process_info): Add last_status.
15903
5ffff7c1
DJ
159042006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15905
15906 * remote-utils.c (try_rle): New function.
15907 (putpkt_binary): Use it.
15908
8695c747
DJ
159092006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15910
15911 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15912 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15913 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15914 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15915 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15916 point registers.
15917
290fadea
RS
159182006-08-08 Richard Sandiford <richard@codesourcery.com>
15919
15920 * server.c (terminal_fd): New variable.
15921 (old_foreground_pgrp): Likewise.
15922 (restore_old_foreground_pgrp): New function.
15923 (start_inferior): Record the terminal file descriptor in terminal_fd
15924 and its original foreground group in old_foreground_pgrp. Register
15925 restore_old_foreground_pgrp with atexit().
15926
9f2e1e63
DJ
159272006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15928
15929 * server.c (handle_query): Correct qPart to qXfer.
15930
b80864fb
DJ
159312006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15932
15933 * configure.ac: Check for more headers which are missing on
15934 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15935 * configure.srv: Add Cygwin and mingw32.
15936 * remote-utils.c: Don't include headers unconditionally which
15937 are missing on mingw32. Include <winsock.h> for mingw32.
15938 (remote_open): Adjust for mingw32 support. Flush
15939 standard error after writing to it.
15940 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15941 (unblock_async_io, enable_async_io, disable_async_io)
15942 (readchar, getpkt): Update for Winsock support.
15943 (prepare_resume_reply): Expect a protocol signal number.
15944 * server.c: Disable <sys/wait.h> on mingw32.
15945 (start_inferior): Adjust for mingw32 support. Flush
15946 standard error after writing to it.
15947 (attach_inferior): Likewise. Use protocol signal
15948 numbers.
15949 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15950 and names.
15951 * win32-i386-low.c: New file.
15952 * Makefile.in (XM_CLIBS): Set.
15953 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15954 (win32-i386-low.o): New dependency rule.
15955 * linux-low.c (linux_wait): Use target signal numbers.
15956 * target.h (struct target_ops): Doc fix.
15957 * server.h (target_signal_to_name): New prototype.
15958 * gdbreplay.c: Don't include headers unconditionally which
15959 are missing on mingw32. Include <winsock.h> for mingw32.
15960 (remote_close, remote_open): Adjust for Winsock support.
15961 * configure, config.in: Regenerated.
15962
0876f84a
DJ
159632006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15964
15965 * server.c (decode_xfer_read, write_qxfer_response): New.
15966 (handle_query): Take a packet length argument. Handle
15967 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15968 the qSupported response.
15969 (main): Update call to handle_query.
15970
01f9e8fa
DJ
159712006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15972
15973 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15974 (putpkt_binary): Renamed from putpkt and adjusted for binary
15975 data.
15976 (putpkt): New wrapper for putpkt_binary.
15977 (readchar): Don't mask off the high bit.
15978 (decode_X_packet): New function.
15979 * server.c (main): Call putpkt_binary if a handler sets the packet
15980 length. Save the length of the incoming packet. Handle 'X'.
15981 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15982
be2a5f71
DJ
159832006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15984
15985 * server.c (handle_query): Handle qSupported.
15986
ea025f5f
DJ
159872006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15988
15989 * remote-utils.c (all_symbols_looked_up): New variable.
15990 (look_up_one_symbol): Check it.
15991 * server.h (look_up_one_symbol): New declaration.
15992 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15993
9308fc88
DJ
159942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15995
15996 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15997 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15998 (PTRACE_GET_THREAD_AREA): Define.
15999 (ps_get_thread_area): New function.
16000
52fb6437
NS
160012006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16002
16003 * configure.srv (m68k*-*-uclinux*): New target.
16004 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16005 (linux_resume_one_process): Remove extraneous cast.
16006 (linux_read_offsets): New.
16007 (linux_target_op): Add linux_read_offsets on mmuless systems.
16008 * server.c (handle_query): Add qOffsets logic.
16009 * target.h (struct target_ops): Add read_offsets.
16010
21b0f40c
DJ
160112006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16012
16013 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16014 (PTRACE_GET_THREAD_AREA): Define.
16015 (ps_get_thread_area): New function.
16016 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16017 (linux-x86-64-low.o): Update.
16018
0050a760
DJ
160192006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16020
16021 * configure.ac: Remove checks for prfpregset_t.
16022 * gdb_proc_service.h: New file.
16023 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16024 new "gdb_proc_service.h".
16025 * proc-service.c: Likewise.
16026 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16027 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16028 * Makefile.in (gdb_proc_service_h): Updated.
16029 * configure, config.in: Regenerated.
16030
b92a518e
DJ
160312006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16032
16033 * remote-utils.c (prepare_resume_reply): Move declaration
16034 of gdb_id_from_wait to the top of the block.
16035
545587ee
DJ
160362006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16037
16038 * linux-low.c (regsets_store_inferior_registers): Read the regset
16039 from the target before filling it.
16040
9db87ebd
DJ
160412006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16042
16043 * server.c (attach_inferior): Return SIGTRAP for a successful
16044 attach.
16045
dd24457d
DJ
160462006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16047
16048 * Makefile.in (OBS): Add version.o.
16049 (STAGESTUFF): Delete.
16050 (version.o): Add dependencies.
16051 (version.c): Replace rule.
16052 (clean): Remove version.c.
16053 * server.c (gdbserver_version): New.
16054 (gdbserver_usage): Use printf.
16055 (main): Handle --version and --help.
16056 * server.h (version, host_name): Add declarations.
16057
6f0f660e
EZ
160582005-12-23 Eli Zaretskii <eliz@gnu.org>
16059
889bf7c5
PA
16060 * linux-arm-low.c:
16061 * linux-arm-low.c:
16062 * inferiors.c:
16063 * i387-fp.h:
16064 * i387-fp.c:
16065 * gdbreplay.c:
16066 * regcache.c:
16067 * proc-service.c:
16068 * mem-break.h:
16069 * mem-break.c:
16070 * linux-x86-64-low.c:
16071 * linux-sh-low.c:
16072 * linux-s390-low.c:
16073 * linux-ppc64-low.c:
16074 * linux-ppc-low.c:
16075 * linux-mips-low.c:
16076 * linux-m68k-low.c:
16077 * linux-m32r-low.c:
16078 * linux-low.h:
16079 * linux-low.c:
16080 * linux-ia64-low.c:
16081 * linux-i386-low.c:
16082 * linux-crisv32-low.c:
16083 * thread-db.c:
16084 * terminal.h:
16085 * target.h:
16086 * target.c:
16087 * server.h:
16088 * server.c:
16089 * remote-utils.c:
16090 * regcache.h:
16091 * utils.c:
16092 * Makefile.in:
16093 * configure.ac:
6f0f660e
EZ
16094 * gdbserver.1: Add (C) after Copyright. Update the FSF
16095 address.
16096
9d1fb177
DJ
160972005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16098
16099 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16100 (arm_breakpoint_at): Recognize both breakpoints.
16101 (the_low_target): Use the correct breakpoint instruction.
16102
011a70c2
DJ
161032005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16104
16105 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16106 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16107 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16108 (the_low_target): Update.
16109
7fb85e41
AS
161102005-10-25 Andreas Schwab <schwab@suse.de>
16111
16112 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16113
16114 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16115 (ia64_num_regs): Reduce to 462.
16116
3db0444b
DJ
161172005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16118
16119 * acinclude.m4: Correct quoting.
16120 * aclocal.m4: Regenerated.
16121
16122 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16123 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16124 (thread_db_init): Call thread_db_err_str.
16125 * configure.ac: Check for TD_VERSION.
16126 * config.in, configure: Regenerated.
16127
bee0189a
DJ
161282005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16129
16130 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16131
e9d25b98
DJ
161322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16133
16134 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16135 is not available. Define HAVE_PTRACE_GETREGS if it is.
16136 * config.in, configure: Regenerated.
16137 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16138 * linux-i386-low.c, linux-m68k-low.c: Update to use
16139 HAVE_PTRACE_GETREGS.
16140 * linux-low.c (regsets_fetch_inferior_registers)
16141 (regsets_store_inferior_registers): Only return 0 if we processed
16142 GENERAL_REGS.
16143 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16144 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16145
a06660f7
DJ
161462005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16147
16148 * inferiors.c (struct thread_info): Add gdb_id.
16149 (add_thread): Add gdb_id argument.
16150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16151 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16152 calls to add_thread.
16153 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16154 * server.c (handle_query): Use thread_to_gdb_id.
16155 (handle_v_cont, main): Use gdb_id_to_thread_id.
16156 * server.h (add_thread): Update prototype.
16157 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16158 prototypes.
16159
5a1f5858
DJ
161602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16161
16162 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16163 left-padded registers.
16164 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16165 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16166
e122f1f5
SE
161672005-07-01 Steve Ellcey <sje@cup.hp.com>
16168
16169 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16170 * configure: Regenerate.
16171 * config.in: Regenerate.
16172 * server.h (NEED_DECLARATION_STRERROR):
16173 Replace with !HAVE_DECL_STRERROR.
16174
d592fa2f
DJ
161752005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * linux-low.c (linux_wait, linux_send_signal): Don't test
16178 an unsigned long variable for > 0 if it could be MAX_ULONG.
16179 * server.c (myresume): Likewise.
16180 * target.c (set_desired_inferior): Likewise.
16181
ccbd4912
MK
161822005-06-13 Mark Kettenis <kettenis@gnu.org>
16183
16184 * configure.ac: Simplify and improve check for socklen_t.
16185 * configure, config.in: Regenerate.
16186
f450004a
DJ
161872005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16188
16189 * acconfig.h: Remove.
16190 * configure.ac: Add a test for socklen_t. Use three-argument
16191 AC_DEFINE throughout.
16192 * config.in: Regenerated using autoheader 2.59.
16193 * configure: Regenerated.
16194
16195 * gdbreplay.c (socklen_t): Provide a default.
16196 (remote_open): Use socklen_t.
16197 * remote-utils.c (socklen_t): Provide a default.
16198 (remote_open): Use socklen_t.
16199 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16200 unsigned char.
16201
16202 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16203 char for buffers.
16204 * linux-low.c (linux_read_memory, linux_write_memory)
16205 (linux_read_auxv): Likewise.
16206 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16207 (check_mem_write): Likewise.
16208 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16209 Likewise.
16210 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16211 (registers_from_string, register_data): Likewise.
16212 * server.c (handle_query, main): Likewise.
16213 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16214 (decode_M_packet): Likewise.
16215 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16216 * target.h (struct target_ops): Update read_memory, write_memory,
16217 and read_auxv.
16218 (read_inferior_memory, write_inferior_memory): Update.
16219 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16220 to unsigned char *.
16221 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16222 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16223 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16224 linux-s390-low.c, linux-sh-low.c: Update for changes in
16225 read_inferior_memory and the_low_target->breakpoint.
16226
eee84df1
DJ
162272005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16228
16229 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16230 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16231 * configure.srv: Add powerpc64-*-linux*.
16232 * linux-ppc64-low.c: New file.
16233
45b134e5
OF
162342005-05-23 Orjan Friberg <orjanf@axis.com>
16235
16236 * linux-cris-low.c: New file with support for CRIS.
16237 * linux-crisv32-low.c: Ditto for CRISv32.
16238 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16239 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16240 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16241 reg-crisv32.o, and reg-crisv32.c to make rules.
16242 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16243 recognized targets.
16244
48d93c75
UW
162452005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16246
16247 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16248 of sizeof (PTRACE_XFER_TYPE).
16249 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16250
e013ee27
OF
162512005-05-12 Orjan Friberg <orjanf@axis.com>
16252
889bf7c5 16253 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16254 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16255 pointers for hardware watchpoint support.
16256 * linux-low.h (struct linux_target_ops): Ditto.
16257 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16258 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16259 to linux_target_ops.
16260 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16261 reply packet.
16262 * server.c (main): Recognize 'Z' and 'z' packets.
16263
b0ded00b
UW
162642005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16265
16266 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16267 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16268 (the_low_target): Add new members.
16269
8643e2ad
DJ
162702005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * proc-service.c (ps_lgetregs): Search all_processes instead of
16273 all_threads.
16274
fc620387
DJ
162752005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16276
16277 * server.c (start_inferior): Change return type to int.
16278 (attach_inferior): Change sigptr to int *.
16279 (handle_v_cont, handle_v_requests): Change signal to int *.
16280 (main): Change signal to int.
16281
162822005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16283
16284 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16285 * configure.srv: Add m32r*-*-linux*.
16286 * linux-m32r-low.c: New file.
16287
e0e76420
DJ
162882005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16289
16290 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16291
a1928bad
DJ
162922005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16293
16294 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16295 Take unsigned long arguments for PIDs.
16296 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16297 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16298 (wait_for_sigstop, linux_resume_one_process)
16299 (regsets_fetch_inferior_registers, linux_send_signal)
16300 (linux_read_auxv): Likewise. Update the types of variables holding
16301 PIDs. Update format string specifiers.
16302 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16303 * remote-utils.c (prepare_resume_reply): Likewise.
16304 * server.c (cont_thread, general_thread, step_thread)
16305 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16306 unsigned long.
16307 (handle_query): Update format specifiers.
16308 (handle_v_cont, main): Use strtoul for thread IDs.
16309 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16310 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16311 (general_thread, step_thread, thread_from_wait)
16312 (old_thread_from_wait): Update.
16313 * target.h (struct thread_resume): Use unsigned long for THREAD.
16314 (struct target_ops): Use unsigned long for arguments to attach and
16315 thread_alive.
16316
dcdb98d2
DJ
163172005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16318
16319 * acinclude.m4: Include bfd/bfd.m4 directly.
16320 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16321 <agriffis@toolchain.org>.
16322 * aclocal.m4, configure: Regenerated.
16323
bec39cab
AC
163242005-01-07 Andrew Cagney <cagney@gnu.org>
16325
16326 * configure.ac: Rename configure.in, require autoconf 2.59.
16327 * configure: Re-generate.
16328
434c4c77
DJ
163292004-12-08 Daniel Jacobowitz <dan@debian.org>
16330
16331 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16332 LIBS when finished.
16333 * aclocal.m4: Regenerated.
16334 * configure: Regenerated.
16335
db1d3e1b
AS
163362004-11-21 Andreas Schwab <schwab@suse.de>
16337
16338 * linux-m68k-low.c (m68k_num_gregs): Define.
16339 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16340 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16341 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16342 (m68k_breakpoint_at): New. Add to the_low_target.
16343
16344 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16345 srv_linux_thread_db to yes.
16346
43360365
JB
163472004-10-20 Joel Brobecker <brobecker@gnat.com>
16348
16349 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16350 (ARCH_SET_FS): Likewise.
16351 (ARCH_GET_FS): Likewise.
16352 (ARCH_GET_GS): Likewise.
16353
fd500816
DJ
163542004-10-16 Daniel Jacobowitz <dan@debian.org>
16355
16356 * linux-i386-low.c (ps_get_thread_area): New.
16357 * linux-x86-64-low.c (ps_get_thread_area): New.
16358 * linux-low.c: Include <sys/syscall.h>.
16359 (linux_kill_one_process): Don't kill the first thread here.
16360 (linux_kill): Kill the first thread here.
16361 (kill_lwp): New function.
16362 (send_sigstop, linux_send_signal): Use it.
16363 * proc-service.c: Clean up #ifdefs.
16364 (fpregset_info): Delete.
16365 (ps_lgetregs): Update and enable implementation.
16366 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16367 implementations.
16368 * remote-utils.c (struct sym_cache, symbol_cache): New.
16369 (input_interrupt): Print a clearer message.
16370 (async_io_enabled): New variable.
16371 (enable_async_io, disable_async_io): Use it. Update comments.
16372 (look_up_one_symbol): Use the symbol cache.
16373 * thread-db.c (thread_db_look_up_symbols): New function.
16374 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16375
f6de3c42
DJ
163762004-10-16 Daniel Jacobowitz <dan@debian.org>
16377
16378 * configure.in: Test for -rdynamic.
16379 * configure: Regenerated.
16380 * Makefile (INTERNAL_LDFLAGS): New.
16381 (gdbserver, gdbreplay): Use it.
16382
2c0fc042
AC
163832004-09-02 Andrew Cagney <cagney@gnu.org>
16384
16385 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16386
075b3282
DJ
163872004-03-23 Daniel Jacobowitz <drow@mvista.com>
16388
16389 * linux-low.c (linux_wait): Clear all_processes list also.
16390
fa6a77dc
DJ
163912004-03-12 Daniel Jacobowitz <drow@mvista.com>
16392
16393 * linux-low.c: Include <errno.h>. Remove extern declaration of
16394 errno.
16395
6d782a97
DJ
163962004-03-12 Daniel Jacobowitz <drow@mvista.com>
16397
16398 * gdbreplay.c, server.h, utils.c: Update copyright years.
16399
3a7fb99b
DJ
164002004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16401
16402 * server.c (main): Print child status or termination signal from
16403 variable 'signal', not 'sig'.
16404
c3e735a6
DJ
164052004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16406
16407 * linux-low.c (linux_read_memory): Change return type to
16408 int. Check for and return error from ptrace().
16409 * target.c (read_inferior_memory): Change return type to int. Pass
16410 back return status from the_target->read_memory().
16411 * target.h (struct target_ops): Adapt *read_memory() prototype.
16412 Update comment.
16413 (read_inferior_memory): Adapt prototype.
16414 * server.c (main): Return an error packet if
16415 read_inferior_memory() returns an error.
16416
a59d1c82
DJ
164172004-03-04 Daniel Jacobowitz <drow@mvista.com>
16418
16419 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16420 Unify with other clean targets.
16421
dc3f8883
DJ
164222004-02-29 Daniel Jacobowitz <drow@mvista.com>
16423
16424 * server.c (handle_v_cont): Call set_desired_inferior.
16425
89a208da
DJ
164262004-02-29 Daniel Jacobowitz <drow@mvista.com>
16427
16428 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16429
62ea82f5
DJ
164302004-02-29 Daniel Jacobowitz <drow@mvista.com>
16431
16432 * linux-low.c (linux_wait): Unblock async I/O.
16433 (linux_resume): Block and enable async I/O.
16434 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16435 * server.h (block_async_io, unblock_async_io): Add prototypes.
16436
6910d122
DJ
164372004-02-29 Daniel Jacobowitz <drow@mvista.com>
16438
16439 * remote-utils.c (remote_open): Print a status notice after
16440 opening a TCP port.
16441 * server.c (attach_inferior): Print a status notice after
16442 attaching.
16443
164442004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16445
16446 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16447
c89dc5d4
DJ
164482004-02-26 Daniel Jacobowitz <drow@mvista.com>
16449
16450 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16451 error packet.
16452 * server.c, target.h: Update copyright years.
16453
4b8dad4a
RM
164542004-02-25 Roland McGrath <roland@redhat.com>
16455
16456 * target.h (struct target_ops): New member `read_auxv'.
16457 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16458 * linux-low.c (linux_read_auxv): New function.
16459 (linux_target_ops): Initialize `read_auxv' member to that.
16460
d7446758
JB
164612004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16462
16463 Committed by Jim Blandy <jimb@redhat.com>.
16464
16465 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16466 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16467 instead of GPR_SIZE to distiguish s390 and s390x targets.
16468
5544ad89
DJ
164692004-01-31 Daniel Jacobowitz <drow@mvista.com>
16470
16471 * linux-low.c: Update copyright year.
16472 (check_removed_breakpoint): Clear pending_is_breakpoint.
16473 (linux_set_resume_request, linux_queue_one_thread)
16474 (resume_status_pending_p): New functions.
16475 (linux_continue_one_thread): Use process->resume.
16476 (linux_resume): Only resume threads if there are no pending events.
16477 * linux-low.h (struct process_info): Add resume request
16478 pointer.
16479
2a68b70e
DJ
164802004-01-30 Daniel Jacobowitz <drow@mvista.com>
16481
16482 * regcache.c (new_register_cache): Clear the allocated register
16483 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16484
64386c31
DJ
164852003-10-13 Daniel Jacobowitz <drow@mvista.com>
16486
16487 * linux-low.c (linux_resume): Take a struct thread_resume *
16488 argument.
16489 (linux_wait): Update call.
16490 (resume_ptr): New static variable.
16491 (linux_continue_one_thread): Renamed from
16492 linux_continue_one_process. Use resume_ptr.
16493 (linux_resume): Use linux_continue_one_thread.
16494 * server.c (handle_v_cont, handle_v_requests): New functions.
16495 (myresume): New function.
16496 (main): Handle 'v' case.
16497 * target.h (struct thread_resume): New type.
16498 (struct target_ops): Change argument of "resume" to struct
16499 thread_resume *.
16500 (myresume): Delete macro.
16501
c938e9b0
L
165022003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16503
16504 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16505 (uninstall): Support DESTDIR.
16506
7f313d07
BC
16507Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16508
16509 * configure.srv: Add xscale*linux copy of arm*linux entry.
16510
3b2fc2ea
DJ
165112003-07-24 Daniel Jacobowitz <drow@mvista.com>
16512
16513 * linux-arm-low.c (arm_reinsert_addr): New function.
16514 (the_low_target): Add arm_reinsert_addr.
16515
1c0a559e
MK
165162003-07-08 Mark Kettenis <kettenis@gnu.org>
16517
16518 * mem-break.c: Remove whitespace at end of file.
16519
43d5792c
DJ
165202003-06-28 Daniel Jacobowitz <drow@mvista.com>
16521
16522 * configure.in: Check whether we need to prototype strerror.
16523 * server.h: Optionally prototype strerror.
16524 * gdbreplay.c (perror_with_name): Use strerror.
16525 * linux-low.c (linux_attach_lwp): Use strerror.
16526 * utils.c (perror_with_name): Use strerror.
16527 * config.in, configure: Regenerated.
16528
c8a86edf
DJ
165292003-06-28 Daniel Jacobowitz <drow@mvista.com>
16530
16531 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16532 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16533
73d37363
DJ
165342003-06-20 Daniel Jacobowitz <drow@mvista.com>
16535
16536 * Makefile.in (SFILES): Update.
16537 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16538 low-sun3.c: Remove files.
16539
6ad8ae5c
DJ
165402003-06-17 Daniel Jacobowitz <drow@mvista.com>
16541
16542 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16543 (linux_detach_one_process, linux_detach): New functions.
16544 (linux_target_ops): Add linux_detach.
16545 * server.c (main): Handle 'D' packet.
16546 * target.h (struct target_ops): Add "detach" member.
16547 (detach_inferior): Define.
16548
1581182a
MK
165492003-06-13 Mark Kettenis <kettenis@gnu.org>
16550
16551 From Kelley Cook <kelleycook@wideopenwest.com>:
16552 * configure.srv: Accept i[34567]86 variants.
16553
e5379b03
DJ
165542003-06-05 Daniel Jacobowitz <drow@mvista.com>
16555
16556 * linux-low.c (linux_wait_for_event): Correct comment typos.
16557 (linux_resume_one_process): Call check_removed_breakpoint.
16558 (linux_send_signal): New function.
16559 (linux_target_ops): Add linux_send_signal.
16560 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16561 of kill.
16562 * target.h (struct target_ops): Add send_signal.
16563
2ff29de4
JB
165642003-05-29 Jim Blandy <jimb@redhat.com>
16565
16566 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16567 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16568 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16569 away part of the register's value.
16570
254787d4
DJ
165712003-03-26 Daniel Jacobowitz <drow@mvista.com>
16572
16573 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16574 (linux_wait_for_event, linux_init_signals): Likewise.
16575
94e10508
DJ
165762003-03-17 Daniel Jacobowitz <drow@mvista.com>
16577
16578 * configure.in: Check for stdlib.h.
16579 * configure: Regenerated.
16580 * config.in: Regenerated.
16581
4c0711e0
DJ
165822003-01-04 Andreas Schwab <schwab@suse.de>
16583
16584 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16585
ef66e766
AC
165862003-01-02 Andrew Cagney <ac131313@redhat.com>
16587
16588 * Makefile.in: Remove obsolete code.
16589
a1358604
DJ
165902002-11-20 Daniel Jacobowitz <drow@mvista.com>
16591
16592 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16593 defined(PT_FPR0_HI).
16594
23ce3b1c
DJ
165952002-11-17 Stuart Hughes <seh@zee2.com>
16596
16597 * linux-arm-low.c (arm_num_regs): Increase.
16598 (arm_regmap): Include status register.
16599
166002002-11-17 Daniel Jacobowitz <drow@mvista.com>
16601
16602 * linux-low.c (register_addr): Remove incorrect -1 check.
16603
a9fa9f7d
DJ
166042002-08-29 Daniel Jacobowitz <drow@mvista.com>
16605
16606 * linux-low.c (linux_create_inferior): Call setpgid. Return
16607 the new PID.
16608 (unstopped_p, linux_signal_pid): Remove.
16609 (linux_target_ops): Remove linux_signal_pid.
16610 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16611 global instead of target method.
16612 * target.h (struct target_ops): Remove signal_pid. Update comment
16613 for create_inferior.
16614 * server.c (signal_pid): New variable.
16615 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16616 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16617 (attach_inferior): Set signal_pid.
16618
17574093
DJ
166192002-08-23 Daniel Jacobowitz <drow@mvista.com>
16620
16621 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16622
166232002-08-20 Jim Blandy <jimb@redhat.com>
16624
16625 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16626 default for this.
16627
166282002-08-01 Andrew Cagney <cagney@redhat.com>
16629
16630 * Makefile.in: Make chill references obsolete.
16631
166322002-07-24 Kevin Buettner <kevinb@redhat.com>
16633
16634 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16635 * configure: Regenerate.
16636 * config.in: Regenerate.
16637
166382002-07-09 David O'Brien <obrien@FreeBSD.org>
16639
16640 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16641 (perror_with_name, remote_close, remote_open, expect, play): Static.
16642
166432002-07-04 Michal Ludvig <mludvig@suse.cz>
16644
4b8dad4a 16645 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16646 byte offsets instead of an array of indexes.
16647 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16648
166492002-06-13 Daniel Jacobowitz <drow@mvista.com>
16650
16651 * regcache.c: Add comment.
16652
166532002-06-11 Daniel Jacobowitz <drow@mvista.com>
16654
16655 * thread-db.c: New file.
16656 * proc-service.c: New file.
16657 * acinclude.m4: New file.
16658 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16659 proc-service.o, and thread-db.o.
16660 (linux-low.o): Add USE_THREAD_DB.
16661 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16662 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16663 * aclocal.m4: Regenerated.
16664 * config.in: Regenerated.
16665 * configure: Regenerated.
16666 * configure.in: Check for proc_service.h, sys/procfs.h,
16667 thread_db.h, and linux/elf.h headrs.
16668 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16669 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16670 Check for -lthread_db and thread support.
16671 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16672 PowerPC, and SuperH.
16673 * i387-fp.c: Constify arguments.
16674 * i387-fp.h: Likewise.
16675 * inferiors.c: (struct thread_info): Renamed from
16676 `struct inferior_info'. Remove PID member. Use generic inferior
16677 list header. All uses updated.
16678 (inferiors, signal_pid): Removed.
16679 (all_threads): New variable.
16680 (get_thread): Define.
16681 (add_inferior_to_list): New function.
16682 (for_each_inferior): New function.
16683 (change_inferior_id): New function.
16684 (add_inferior): Removed.
16685 (remove_inferior): New function.
16686 (add_thread): New function.
16687 (free_one_thread): New function.
16688 (remove_thread): New function.
16689 (clear_inferiors): Use for_each_inferior and free_one_thread.
16690 (find_inferior): New function.
16691 (find_inferior_id): New function.
16692 (inferior_target_data): Update argument type.
16693 (set_inferior_target_data): Likewise.
16694 (inferior_regcache_data): Likewise.
16695 (set_inferior_regcache_data): Likewise.
16696 * linux-low.c (linux_bp_reinsert): Remove.
16697 (all_processes, stopping_threads, using_thrads)
16698 (struct pending_signals, debug_threads, pid_of): New.
16699 (inferior_pid): Replace with macro.
16700 (struct inferior_linux_data): Remove.
16701 (get_stop_pc, add_process): New functions.
16702 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16703 Use add_process and add_thread.
16704 (linux_attach_lwp): New function, based on old linux_attach. Use
16705 add_process and add_thread. Set stop_expected for new threads.
16706 (linux_attach): New function.
16707 (linux_kill_one_process): New function.
16708 (linux_kill): Kill all LWPs.
16709 (linux_thread_alive): Use find_inferior_id.
16710 (check_removed_breakpoints, status_pending_p): New functions.
16711 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16712 Update. Use WNOHANG. Wait for cloned processes also. Update process
16713 struct for the found process.
16714 (linux_wait_for_event): New function.
16715 (linux_wait): Use it. Support LWPs.
16716 (send_sigstop, wait_for_sigstop, stop_all_processes)
16717 (linux_resume_one_process, linux_continue_one_process): New functions.
16718 (linux_resume): Support LWPs.
16719 (REGISTER_RAW_SIZE): Remove.
16720 (fetch_register): Use register_size instead. Call supply_register.
16721 (usr_store_inferior_registers): Likewise. Call collect_register.
16722 Fix recursive case.
16723 (regsets_fetch_inferior_registers): Improve error message.
16724 (regsets_store_inferior_registers): Add debugging.
16725 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16726 (unstopped_p, linux_signal_pid): New functions.
16727 (linux_target_ops): Add linux_signal_pid.
16728 (linux_init_signals): New function.
16729 (initialize_low): Call it. Initialize using_threads.
16730 * regcache.c (inferior_regcache_data): Add valid
16731 flag.
16732 (get_regcache): Fetch registers lazily. Add fetch argument
16733 and update all callers.
16734 (regcache_invalidate_one, regcache_invalidate): New
16735 functions.
16736 (new_register_cache): Renamed from create_register_cache.
16737 Return the new regcache.
16738 (free_register_cache): Change argument to a void *.
16739 (registers_to_string, registers_from_string): Call get_regcache
16740 with fetch flag set.
16741 (register_data): Make static. Pass fetch flag to get_regcache.
16742 (supply_register): Call get_regcache with fetch flag clear.
16743 (collect_register): Call get_regcache with fetch flag set.
16744 (collect_register_as_string): New function.
16745 * regcache.h: Update.
16746 * remote-utils.c (putpkt): Flush after debug output and use
16747 stderr.
16748 Handle input interrupts while waiting for an ACK.
16749 (input_interrupt): Use signal_pid method.
16750 (getpkt): Flush after debug output and use stderr.
16751 (outreg): Use collect_register_as_string.
16752 (new_thread_notify, dead_thread_notify): New functions.
16753 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16754 and general_thread.
16755 (look_up_one_symbol): Flush after debug output.
16756 * server.c (step_thread, server_waiting): New variables.
16757 (start_inferior): Don't use signal_pid. Update call to mywait.
16758 (attach_inferior): Update call to mywait.
16759 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16760 (main): Don't fetch/store registers explicitly. Use
16761 set_desired_inferior. Support proposed ``Hs'' packet. Update
16762 calls to mywait.
16763 * server.h: Update.
16764 (struct inferior_list, struct_inferior_list_entry): New.
16765 * target.c (set_desired_inferior): New.
16766 (write_inferior_memory): Constify.
16767 (mywait): New function.
16768 * target.h: Update.
16769 (struct target_ops): New signal_pid method.
16770 (mywait): Removed macro, added prototype.
16771
16772 * linux-low.h (regset_func): Removed.
16773 (regset_fill_func, regset_store_func): New.
16774 (enum regset_type): New.
16775 (struct regset_info): Add type field. Use new operation types.
16776 (struct linux_target_ops): stop_pc renamed to get_pc.
16777 Add decr_pc_after_break and breakpoint_at.
16778 (get_process, get_thread_proess, get_process_thread)
16779 (strut process_info, all_processes, linux_attach_lwp)
16780 (thread_db_init): New.
16781
16782 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16783 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16784 (the_low_target): Add new members.
16785 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16786 (i386_store_fpxregset): Constify.
16787 (target_regsets): Add new kind identifier.
16788 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16789 (i386_set_pc): Add debugging.
16790 (i386_breakpoint_at): New function.
16791 (the_low_target): Add new members.
16792 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16793 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16794 (mips_breakpoint_at): New.
16795 (the_low_target): Add new members.
16796 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16797 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16798 (the_low_target): Add new members.
16799 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16800 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16801 (the_low_target): Add new members.
16802 * linux-x86-64-low.c (target_regsets): Add new kind
16803 identifier.
16804
168052002-05-15 Daniel Jacobowitz <drow@mvista.com>
16806
16807 From Martin Pool <mbp@samba.org>:
16808 * server.c (gdbserver_usage): New function.
16809 (main): Call it.
16810
168112002-05-14 Daniel Jacobowitz <drow@mvista.com>
16812
16813 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16814 stop_at -> stop_pc.
16815
168162002-05-04 Andrew Cagney <ac131313@redhat.com>
16817
16818 * Makefile.in: Remove obsolete code.
16819
168202002-04-24 Michal Ludvig <mludvig@suse.cz>
16821
16822 * linux-low.c (regsets_fetch_inferior_registers),
16823 (regsets_store_inferior_registers): Removed cast to int from
16824 ptrace() calls.
16825 * regcache.h: Added declaration of struct inferior_info.
16826
168272002-04-20 Daniel Jacobowitz <drow@mvista.com>
16828
16829 * inferiors.c (struct inferior_info): Add regcache_data.
16830 (add_inferior): Call create_register_cache.
16831 (clear_inferiors): Call free_register_cache.
16832 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16833 * regcache.c (struct inferior_regcache_data): New.
16834 (registers): Remove.
16835 (get_regcache): New function.
16836 (create_register_cache, free_register_cache): New functions.
16837 (set_register_cache): Don't initialize the register cache here.
16838 (registers_to_string, registers_from_string, register_data): Call
16839 get_regcache.
16840 * regcache.h: Add prototypes.
16841 * server.h: Likewise.
16842
168432002-04-20 Daniel Jacobowitz <drow@mvista.com>
16844
16845 * mem-break.c: New file.
16846 * mem-break.h: New file.
16847 * Makefile.in: Add mem-break.o rule; update server.h
16848 dependencies.
16849 * inferiors.c (struct inferior_info): Add target_data
16850 member.
16851 (clear_inferiors): Free target_data member if set.
16852 (inferior_target_data, set_inferior_target_data): New functions.
16853 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16854 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16855 * linux-low.c (linux_bp_reinsert): New variable.
16856 (struct inferior_linux_data): New.
16857 (linux_create_inferior): Use set_inferior_target_data.
16858 (linux_attach): Likewise. Call add_inferior.
16859 (linux_wait_for_one_inferior): New function.
16860 (linux_wait): Call it.
16861 (linux_write_memory): Add const.
16862 (initialize_low): Call set_breakpoint_data.
16863 * linux-low.h (struct linux_target_ops): Add breakpoint
16864 handling members.
16865 * server.c (attach_inferior): Remove extra add_inferior
16866 call.
16867 * server.h: Include mem-break.h. Update inferior.c
16868 prototypes.
16869 * target.c (read_inferior_memory)
16870 (write_inferior_memory): New functions.
16871 * target.h (read_inferior_memory)
16872 (write_inferior_memory): Change macros to prototypes.
16873 (struct target_ops): Update comments. Add const to write_memory
16874 definition.
16875
168762002-04-11 Daniel Jacobowitz <drow@mvista.com>
16877
16878 * linux-low.c (usr_store_inferior_registers): Support
16879 registers which are allowed to fail to store.
16880 * linux-low.h (linux_target_ops): Likewise.
16881 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16882 (ppc_cannot_store_register): FPSCR may not be storable.
16883
168842002-04-09 Daniel Jacobowitz <drow@mvista.com>
16885
16886 * server.h: Include <string.h> if HAVE_STRING_H.
16887 * ChangeLog: Correct paths in last ChangeLog entry.
16888
168892002-04-09 Daniel Jacobowitz <drow@mvista.com>
16890
16891 * linux-low.h: Remove obsolete prototypes.
16892 (struct linux_target_ops): New.
16893 (extern the_low_target): New.
16894 * linux-low.c (num_regs, regmap): Remove declarations.
16895 (register_addr): Use the_low_target explicitly.
16896 (fetch_register): Likewise.
16897 (usr_fetch_inferior_registers): Likewise.
16898 (usr_store_inferior_registers): Likewise.
16899 * linux-arm-low.c (num_regs): Remove.
16900 (arm_num_regs): Define.
16901 (arm_regmap): Renamed from regmap, made static.
16902 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16903 made static.
16904 (arm_cannot_store_register): Renamed from cannot_store_register,
16905 made static.
16906 (the_low_target): New.
16907 * linux-i386-low.c (num_regs): Remove.
16908 (i386_num_regs): Define.
16909 (i386_regmap): Renamed from regmap, made static.
16910 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16911 made static.
16912 (i386_cannot_store_register): Renamed from cannot_store_register,
16913 made static.
16914 (the_low_target): New.
16915 * linux-ia64-low.c (num_regs): Remove.
16916 (ia64_num_regs): Define.
16917 (ia64_regmap): Renamed from regmap, made static.
16918 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16919 made static.
16920 (ia64_cannot_store_register): Renamed from cannot_store_register,
16921 made static.
16922 (the_low_target): New.
16923 * linux-m68k-low.c (num_regs): Remove.
16924 (m68k_num_regs): Define.
16925 (m68k_regmap): Renamed from regmap, made static.
16926 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16927 made static.
16928 (m68k_cannot_store_register): Renamed from cannot_store_register,
16929 made static.
16930 (the_low_target): New.
16931 * linux-mips-low.c (num_regs): Remove.
16932 (mips_num_regs): Define.
16933 (mips_regmap): Renamed from regmap, made static.
16934 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16935 made static.
16936 (mips_cannot_store_register): Renamed from cannot_store_register,
16937 made static.
16938 (the_low_target): New.
16939 * linux-ppc-low.c (num_regs): Remove.
16940 (ppc_num_regs): Define.
16941 (ppc_regmap): Renamed from regmap, made static.
16942 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16943 made static.
16944 (ppc_cannot_store_register): Renamed from cannot_store_register,
16945 made static.
16946 (the_low_target): New.
16947 * linux-s390-low.c (num_regs): Remove.
16948 (s390_num_regs): Define.
16949 (s390_regmap): Renamed from regmap, made static.
16950 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16951 made static.
16952 (s390_cannot_store_register): Renamed from cannot_store_register,
16953 made static.
16954 (the_low_target): New.
16955 * linux-sh-low.c (num_regs): Remove.
16956 (sh_num_regs): Define.
16957 (sh_regmap): Renamed from regmap, made static.
16958 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16959 made static.
16960 (sh_cannot_store_register): Renamed from cannot_store_register,
16961 made static.
16962 (the_low_target): New.
16963 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16964 (the_low_target): New.
16965
169662002-04-09 Daniel Jacobowitz <drow@mvista.com>
16967
16968 * Makefile.in: Add stamp-h target.
16969 * configure.in: Create stamp-h.
16970 * configure: Regenerated.
16971
169722002-04-09 Daniel Jacobowitz <drow@mvista.com>
16973
16974 * inferiors.c: New file.
16975 * target.c: New file.
16976 * target.h: New file.
16977 * Makefile.in: Add target.o and inferiors.o. Update
16978 dependencies.
16979 * linux-low.c (inferior_pid): New static variable,
16980 moved from server.c.
16981 (linux_create_inferior): Renamed from create_inferior.
16982 Call add_inferior. Return 0 on success instead of a PID.
16983 (linux_attach): Renamed from myattach.
16984 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16985 (linux_thread_alive): Renamed from mythread_alive.
16986 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16987 child dies.
16988 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16989 (regsets_store_inferior_registers): Correct error message.
16990 Add missing ``return 0''.
16991 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16992 (linux_store_registers): Renamed from store_inferior_registers.
16993 (linux_read_memory): Renamed from read_inferior_memory.
16994 (linux_write_memory): Renamed from write_inferior_memory.
16995 (linux_target_ops): New structure.
16996 (initialize_low): Call set_target_ops ().
16997 * remote-utils.c (unhexify): New function.
16998 (hexify): New function.
16999 (input_interrupt): Send signals to ``signal_pid''.
17000 * server.c (inferior_pid): Remove.
17001 (start_inferior): Update create_inferior call.
17002 (attach_inferior): Call add_inferior.
17003 (handle_query): New function.
17004 (main): Call handle_query for `q' packets.
17005 * server.h: Include "target.h". Remove obsolete prototypes.
17006 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17007
170082002-04-09 Daniel Jacobowitz <drow@mvista.com>
17009
17010 * Makefile.in: Add WARN_CFLAGS. Update configury
17011 dependencies.
17012 * configure.in: Check for <string.h>
17013 * configure: Regenerate.
17014 * config.in: Regenerate.
17015 * gdbreplay.c: Include needed system headers.
17016 (remote_open): Remove strchr prototype.
17017 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17018 * regcache.c (supply_register): Change buf argument to const void *.
17019 (supply_register_by_name): Likewise.
17020 (collect_register): Change buf argument to void *.
17021 (collect_register_by_name): Likewise.
17022 * regcache.h: Add missing prototypes.
17023 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17024 * server.c (handle_query): New function.
17025 (attached): New static variable, moved out of main.
17026 (main): Quiet longjmp clobber warnings.
17027 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17028 * utils.c (error): Remove NORETURN.
17029 (fatal): Likewise.