Zero-initialize linux note sections
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8ecfd7bd
SDJ
12018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2 Simon Marchi <simark@simark.ca>
3
4 * acinclude.m4: Include "../selftest.m4".
5 * configure: Regenerate.
6 * configure.ac: Use "GDB_AC_SELFTEST".
7 * configure.srv: Use "$enable_unittests" instead of
8 "$development" when checking whether unit tests have been
9 enabled.
10 * server.c (captured_main): Update message informing that
11 selftests have been disabled.
12
96643e35
TT
132018-10-04 Tom Tromey <tom@tromey.com>
14
15 * configure: Rebuild.
16
da4ae14a
TT
172018-10-04 Tom Tromey <tom@tromey.com>
18
19 * server.c (handle_status): Rename inner "thread".
20 (process_serial_event): Declare "res" in 'm' case.
21 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
22 (iterate_over_lwps): Rename inner "thread".
23 (linux_qxfer_libraries_svr4): Rename inner "len".
24 * gdbthread.h (find_thread_in_random): Rename inner "thread".
25
7c619dbd
GB
262018-10-01 Gary Benson <gbenson@redhat.com>
27
28 * gdb_proc_service.h: Moved common code to
29 common/gdb_proc_service.h.
30
3795e814
GB
312018-10-01 Gary Benson <gbenson@redhat.com>
32
33 * gdb_proc_service.h: Synchronize comments and whitespace with
34 GDB's version of this file.
35
49b036f1
TT
362018-09-25 Tom Tromey <tom@tromey.com>
37
38 * configure: Rebuild.
39 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
40
8ff03f0b
SM
412018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
42
43 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
44 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
45 ($(IPA_LIB)): Sort IPA_OBJS.
46
a1cd91dc
SM
472018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * Makefile.in: Remove references to $(ADD_DEPS).
50
752312ba
TT
512018-09-16 Tom Tromey <tom@tromey.com>
52
53 * remote-utils.c (remote_open): Use GNU style for metasyntactic
54 variables.
55 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
56 variables.
57
f1628857
TT
582018-09-05 Tom Tromey <tom@tromey.com>
59
60 * configure: Rebuild.
61
ad202fcc
SM
622018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
63
64 PR build/23399
65 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
66
d3d8724a
TT
672018-08-27 Tom Tromey <tom@tromey.com>
68
69 PR build/23087:
70 * configure: Rebuild.
71
b4f183d2
TT
722018-08-27 Tom Tromey <tom@tromey.com>
73
74 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
75 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
76 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
77 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
78 (s390x_emit_stack_adjust): Add casts to unsigned char.
79
4e2aa472
SM
802018-08-22 Simon Marchi <simon.marchi@ericsson.com>
81
82 PR gdb/23374
83 PR gdb/23375
84 * server.h (struct client_state) <disable_randomization>:
85 Initialize to 1.
86
cf4088a9
SM
872018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
88
89 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
90 variable.
91 (mips_supply_ptrace_register): Likewise.
92
a0de763e
TT
932018-07-22 Tom Tromey <tom@tromey.com>
94
95 * configure: Rebuild.
96
b0a7723d
TT
972018-07-22 Tom Tromey <tom@tromey.com>
98
99 * win32-low.c (win32_create_inferior): Remove unused variables.
100 * gdbreplay.c (remote_open): Remove unused variable.
101 * remote-utils.c (remote_prepare): Remove unused variable.
102 * x86-tdesc.h (X86_TDESC_H): Define.
103 (amd64_expedite_regs): Define conditionally.
104 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
105 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
106 * remote-utils.c (readchar): Remove unused variable.
107
a780ef4f
PA
1082018-07-13 Pedro Alves <palves@redhat.com>
109
110 * linux-low.c (linux_kill): Change parameter to process_info
111 pointer instead of pid. Adjust.
112 * lynx-low.c (lynx_kill): Likewise.
113 * nto-low.c (nto_kill): Likewise.
114 * spu-low.c (spu_kill): Likewise.
115 * win32-low.c (win32_kill): Likewise.
116 * server.c (handle_v_kill, kill_inferior_callback)
117 (detach_or_kill_for_exit): Adjust.
118 * target.c (kill_inferior): Change parameter to process_info
119 pointer instead of pid. Adjust.
120 * target.h (struct target_ops) <kill>: Change parameter to
121 process_info pointer instead of pid. Adjust all implementations
122 and callers.
123 (kill_inferior): Likewise.
124
ef2ddb33
PA
1252018-07-13 Pedro Alves <palves@redhat.com>
126
127 * linux-low.c (linux_detach, linux_join): Change parameter to
128 process_info pointer instead of pid. Adjust.
129 * lynx-low.c (lynx_detach, lynx_join): Likewise.
130 * nto-low.c (nto_detach): Likewise.
131 * spu-low.c (spu_detach, spu_join): Likewise.
132 * win32-low.c (win32_detach, win32_join): Likewise.
133 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
134 * target.h (struct target_ops) <detach, join>: Change parameter to
135 process_info pointer instead of pid. Adjust all implementations
136 and callers.
137 (detach_inferior, join_inferior): Rename 'pid' parameter to
138 'proc'.
139
c7ab0aef
SDJ
1402018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
141 Jan Kratochvil <jan.kratochvil@redhat.com>
142 Paul Fertser <fercerpav@gmail.com>
143 Tsutomu Seki <sekiriki@gmail.com>
144
145 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
146 (OBS): Add 'common/netstuff.o'.
147 (GDBREPLAY_OBS): Likewise.
148 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
149 (remote_open): Implement support for IPv6
150 connections.
151 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
152 and 'wspiapi.h'.
153 (handle_accept_event): Accept connections from IPv6 sources.
154 (remote_prepare): Handle IPv6-style hostnames; implement
155 support for IPv6 connections.
156 (remote_open): Implement support for printing connections from
157 IPv6 sources.
158
31445d10
PA
1592018-07-11 Pedro Alves <palves@redhat.com>
160
161 PR gdb/23377
162 * mem-break.c (any_persistent_commands): Add process_info
163 parameter and use it instead of relying on the current process.
164 Change return type to bool.
165 * mem-break.h (any_persistent_commands): Add process_info
166 parameter and change return type to bool.
167 * server.c (handle_detach): Remove require_running_or_return call.
168 Look up the process_info for the process we're about to detach.
169 If not found, return back error to GDB. Adjust
170 any_persistent_commands call to pass down a process pointer.
171
cb197132
PA
1722018-07-11 Pedro Alves <palves@redhat.com>
173
174 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
175 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
176 instead of collect_register_by_name.
177 * regcache.c (regcache_raw_get_unsigned_by_name): New.
178 * regcache.h (regcache_raw_get_unsigned_by_name): New.
179
1b919490
VB
1802018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
181 Pedro Alves <palves@redhat.com>
182
183 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
184
d7e15655
TT
1852018-07-03 Tom Tromey <tom@tromey.com>
186
187 * linux-low.c: Update.
188 * lynx-low.c: Update.
189 * mem-break.c: Update.
190 * nto-low.c: Update.
191 * remote-utils.c: Update.
192 * server.c: Update.
193 * spu-low.c: Update.
194 * target.c: Update.
195 * win32-low.c: Update.
196
26a57c92
TT
1972018-07-03 Tom Tromey <tom@tromey.com>
198
199 * server.c: Update.
200
0e998d96
TT
2012018-07-03 Tom Tromey <tom@tromey.com>
202
203 * linux-low.c: Update.
204
cc6bcb54
TT
2052018-07-03 Tom Tromey <tom@tromey.com>
206
207 * target.c: Update.
208
e38504b3
TT
2092018-07-03 Tom Tromey <tom@tromey.com>
210
211 * linux-low.c: Update.
212 * linux-mips-low.c: Update.
213 * lynx-low.c: Update.
214 * nto-low.c: Update.
215 * remote-utils.c: Update.
216 * server.c: Update.
217 * spu-low.c: Update.
218 * target.c: Update.
219 * thread-db.c: Update.
220
e99b03dc
TT
2212018-07-03 Tom Tromey <tom@tromey.com>
222
223 * linux-low.c: Update.
224 * linux-mips-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 * tracepoint.c: Update.
233
f2907e49
TT
2342018-07-03 Tom Tromey <tom@tromey.com>
235
236 * linux-low.c: Update.
237 * linux-ppc-low.c: Update.
238 * linux-x86-low.c: Update.
239 * proc-service.c: Update.
240 * server.c: Update.
241 * spu-low.c: Update.
242 * thread-db.c: Update.
243 * win32-low.c: Update.
244
fd79271b
TT
2452018-07-03 Tom Tromey <tom@tromey.com>
246
247 * linux-low.c: Update.
248 * lynx-low.c: Update.
249 * nto-low.c: Update.
250 * remote-utils.c: Update.
251 * spu-low.c: Update.
252 * thread-db.c: Update.
253 * win32-low.c: Update.
254
c0867626
SDJ
2552018-06-29 Joel Brobecker <brobecker@adacore.com>
256
257 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
258 parameter in call to 'amd64_create_target_description'.
259
2512d7ef
JK
2602018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
261
262 * x86-tdesc.h: Remove executable permission flag.
263
d0ac1c44
SM
2642018-06-19 Simon Marchi <simon.marchi@ericsson.com>
265
266 * configure.ac: Remove AC_PREREQ, add missing quoting.
267 * configure: Re-generate.
268 * config.in: Re-generate.
269 * aclocal.m4: Re-generate.
270
c4eb05ff
SM
2712018-06-18 Simon Marchi <simon.marchi@ericsson.com>
272
273 * tracepoint.h (current_traceframe): Remove declaration.
274
02895270
AH
2752018-06-18 Alan Hayward <alan.hayward@arm.com>
276
277 * linux-aarch64-low.c (is_sve_tdesc): New function.
278 (aarch64_sve_regs_copy_to_regcache): Likewise.
279 (aarch64_sve_regs_copy_from_regcache): Likewise.
280 (aarch64_regs_info): Add SVE checks.
281 (initialize_low_arch): Initialize SVE.
282
e9902bfc
AH
2832018-06-18 Alan Hayward <alan.hayward@arm.com>
284
285 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
286
fefa175e
AH
2872018-06-11 Alan Hayward <alan.hayward@arm.com>
288
289 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
290 (initialize_low_tracepoint): Likewise
291 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
292 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
293 param.
294 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
295 checks.
296 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
297
b91ad3ff
AH
2982018-06-11 Alan Hayward <alan.hayward@arm.com>
299
300 * server.h (PBUFSIZ): Increase size
301
f868386e
AH
3022018-06-11 Alan Hayward <alan.hayward@arm.com>
303
304 * regcache.c (regcache::raw_compare): New function.
305 * regcache.h (regcache::raw_compare): New declaration.
306
9c861883
AH
3072018-06-11 Alan Hayward <alan.hayward@arm.com>
308
309 * regcache.c (new_register_cache): Use new.
310 (free_register_cache): Use delete.
311 (register_data): Use const.
312 (supply_register): Move body inside regcache.
313 (regcache::raw_supply): New override function.
314 (collect_register): Move body inside regcache.
315 (regcache::raw_collect): New override function.
316 (regcache::get_register_status): New override function.
317 * regcache.h (struct regcache): Inherit from reg_buffer_common.
318
40591844
TT
3192018-06-09 Tom Tromey <tom@tromey.com>
320
321 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
322 declare queue.
323 (event_queue): Use std::queue.
324 (gdb_event_xfree): Remove.
325 (initialize_event_loop, process_event, wait_for_event): Update.
326
6341380d
SC
3272018-06-08 Stan Cox <scox@redhat.com>
328
329 * win32-low.c (win32_create_inferior): last_ptid and last_status
330 moved to client_state.
331
03349c93
PA
3322018-06-08 Pedro Alves <palves@redhat.com>
333
334 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
335 common/common-exceptions.o, common/common-utils.o,
336 common/errors.o, common/print-utils.o and utils.o.
337 * gdbreplay.c: Include "common-defs.h" instead of the two
338 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
339 string.h or alloca.h.
340 (perror_with_name): Delete.
341 (remote_open): Use xstrdup instead of strdup.
342 (main): Rename to ...
343 (captured_main): ... this.
344 (main): New.
345
8dcc53b3
TT
3462018-06-08 Tom Tromey <tom@tromey.com>
347
348 * linux-low.c (linux_low_read_btrace): Update.
349
c12a5089
SC
3502018-06-04 Stan Cox <scox@redhat.com>
351
352 * server.h (struct client_state): New.
353 * server.c (cont_thread, general_thread, multi_process)
354 (report_fork_events, report_vfork_events, report_exec_events)
355 (report_thread_events, swbreak_feature, hwbreak_feature)
356 (vCont_supported, disable_randomization, pass_signals)
357 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
358 Moved to client_state.
359 * remote-utils.c (remote_debug, noack_mode)
360 (transport_is_reliable): Moved to client_state.
361 * tracepoint.c (current_traceframe): Moved to client_state.
362
363 Update all callers.
364 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
365 linux-low.c, remote-utils.h, target.c: Use client_state.
366
122394f1
AH
3672018-05-31 Alan Hayward <alan.hayward@arm.com>
368
369 * configure.srv: Add new c/h file.
370
95228a0d
AH
3712018-05-31 Alan Hayward <alan.hayward@arm.com>
372
373 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
374 null VQ.
375
d8dab6c3
MR
3762018-05-25 Maciej W. Rozycki <macro@mips.com>
377
378 * gdb.arch/mips-fpregset-core.exp: New test.
379 * gdb.arch/mips-fpregset-core.c: New test source.
380
81e25b7c
EK
3812018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
382
383 PR server/23198
384 * hostio.c (require_int): Do not report overflow for integers
385 between 0xfffffff and 0x7fffffff.
386
7e947ad3
MR
3872018-05-22 Maciej W. Rozycki <macro@mips.com>
388
389 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
390 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
391 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
392 functions.
393 (the_low_target): Wire them.
394
1d75a658
PFC
3952018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
396
397 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
398 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
399 mode. Call collect_register_by_name with vscr using
400 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
401 (ppc_store_vrregset): Add and set vscr_offset variable as in
402 ppc_fill_vrregset. Call supply_register_by_name with vscr using
403 vscr_offset.
404
d078308a
PFC
4052018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
406
407 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
408 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
409 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
410
7273b5fc
PFC
4112018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
412
413 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
414 (ppc_store_vsxregset): Likewise.
415 (ppc_fill_vrregset): Likewise.
416 (ppc_store_vrregset): Likewise.
417 (ppc_fill_evrregset): Likewise.
418 (ppc_store_evrregset): Likewise.
419 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
420 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
421 needed.
422
2e077f5e
PFC
4232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
424
425 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
426 wordsize of the inferior. Call ppc_linux_target_wordsize.
427
bd64614e
PFC
4282018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
429
430 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
431 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
432 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
433 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
434 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
435 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
436 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
437 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
438 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
439 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
440 (tdesc_powerpc_e500l): Remove.
441 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
442 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
443 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
444 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
445 linux-ppc-tdesc.h.
446 (ppc_arch_setup): Remove target description matching code. Fill a
447 ppc_linux_features struct and call ppc_linux_match_description
448 with it.
449
75d74cca
MR
4502018-05-22 Maciej W. Rozycki <macro@mips.com>
451
452 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
453 width of the requested register exceeds the width of the
454 `ptrace' data type.
455 (mips_cannot_store_register): Likewise.
456
e4439e43
MR
4572018-05-21 Maciej W. Rozycki <macro@mips.com>
458
459 * linux-mips-low.c (mips_fetch_register): New function. Update
460 preceding comment.
461 (mips_store_gregset): Supply 0 rather than $restart for $zero.
462 (the_low_target): Wire `mips_fetch_register'.
463
55271bf9
JB
4642018-05-10 Joel Brobecker <brobecker@adacore.com>
465
466 * lynx-i386-low.c (LYNXOS_178): New macro.
467 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
468 the layout on LynxOS-178.
469 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
470 handle floating point registers that are not supported by
471 LynxOS-178.
472
1a34f210
TT
4732018-05-10 Tom Tromey <tom@tromey.com>
474
475 * configure: Rebuild.
476
190852c8
JB
4772018-05-10 Joel Brobecker <brobecker@adacore.com>
478
479 PR server/23158:
480 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
481 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
482 Use it to set the expedite_regs field in the given tdesc.
483 * x86-tdesc.h: New file.
484 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
485 Adjust following the addition of the new expedite_regs parameter
486 to init_target_desc.
487 * linux-tic6x-low.c (tic6x_read_description): Likewise.
488 * linux-x86-tdesc.c: #include "x86-tdesc.h".
489 (i386_linux_read_description, amd64_linux_read_description):
490 Adjust following the addition of the new expedite_regs parameter
491 to init_target_desc.
492 * lynx-i386-low.c: #include "x86-tdesc.h".
493 (lynx_i386_arch_setup): Adjust following the addition of the new
494 expedite_regs parameter to init_target_desc.
495 * nto-x86-low.c: #include "x86-tdesc.h".
496 (nto_x86_arch_setup): Adjust following the addition of the new
497 expedite_regs parameter to init_target_desc.
498 * win32-i386-low.c: #include "x86-tdesc.h".
499 (i386_arch_setup): Adjust following the addition of the new
500 expedite_regs parameter to init_target_desc.
501
7dbac825
JB
5022018-05-10 Joel Brobecker <brobecker@adacore.com>
503
504 PR server/23158:
505 * win32-low.c (win32_create_inferior): Add call to my_wait
506 setting last_status global.
507
906994d9
JB
5082018-05-10 Joel Brobecker <brobecker@adacore.com>
509
510 PR server/23158:
511 * win32-low.c (create_process): Only call gdb_tilde_expand if
512 inferior_cwd is not NULL.
513
8ee22052
AB
5142018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
515
516 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
517 registers to the cache if their values have changed.
518 (i387_xsave_to_cache): Provide default values for x87 control
519 registers when these features are available, but disabled.
520 * regcache.c (supply_register_by_name_zeroed): New function.
521 * regcache.h (supply_register_by_name_zeroed): Declare new
522 function.
523
aff689d3
TT
5242018-05-07 Tom Tromey <tom@tromey.com>
525
526 * configure: Rebuild.
527
85e26832
TT
5282018-05-04 Tom Tromey <tom@tromey.com>
529
530 * configure: Rebuild.
531
a3b60e45
JK
5322018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
533 Pedro Alves <palves@redhat.com>
534
535 * linux-aarch64-low.c (aarch64_stopped_data_address):
536 Likewise.
537
632e107b
TT
5382018-04-27 Tom Tromey <tom@tromey.com>
539
540 * configure: Rebuild.
541
458412c3
TT
5422018-04-23 Tom Tromey <tom@tromey.com>
543
544 * configure: Rebuild.
545
f31c089e
SM
5462018-04-19 Simon Marchi <simon.marchi@ericsson.com>
547
548 * Makefile.in (depcomp): Add "..".
549 (all_deps_files): New and use it.
550
b319b098
AH
5512018-04-18 Alan Hayward <alan.hayward@arm.com>
552
553 * configure.srv (aarch64*-*-linux*): Don't include xml.
554 (i[34567]86-*-cygwin*): Likewise.
555 (i[34567]86-*-linux*): Likewise.
556 (i[34567]86-*-lynxos*): Likewise.
557 (i[34567]86-*-mingw32ce*): Likewise.
558 (i[34567]86-*-mingw*): Likewise.
559 (i[34567]86-*-nto*): Likewise.
560 (tic6x-*-uclinux): Likewise.
561 (x86_64-*-linux*): Likewise.
562 (x86_64-*-mingw*): Likewise.
563 (x86_64-*-cygwin*): Likewise.
564
3b74854b
AH
5652018-04-18 Alan Hayward <alan.hayward@arm.com>
566
567 * tdesc.c: Remove xml parameter.
568
e98577a9
AH
5692018-04-18 Alan Hayward <alan.hayward@arm.com>
570
571 * server.c (get_features_xml): Remove cast.
572 * tdesc.c (void target_desc::accept): Fill in function.
573 (tdesc_get_features_xml): Remove old xml creation.
574 (print_xml_feature::visit_pre): Add xml vistor.
575 * tdesc.h (struct target_desc): Make xmltarget mutable.
576 (tdesc_get_features_xml): Remove declaration.
577
d278f585
AH
5782018-04-18 Alan Hayward <alan.hayward@arm.com>
579
580 * tdesc.c (tdesc_architecture_name): Add new function.
581 (tdesc_osabi_name): Likewise.
582 (tdesc_get_features_xml): Use new functions.
583
eee8a18d
AH
5842018-04-18 Alan Hayward <alan.hayward@arm.com>
585
586 * tdesc.c (tdesc_create_flags): Remove.
587 (tdesc_add_flag): Likewise.
588 (tdesc_named_type): Likewise.
589 (tdesc_create_union): Likewise.
590 (tdesc_create_struct): Likewise.
591 (tdesc_create_vector): Likewise.
592 (tdesc_add_bitfield): Likewise.
593 (tdesc_add_field): Likewise.
594 (tdesc_set_struct_size): Likewise.
595
82ec9bc7
AH
5962018-04-18 Alan Hayward <alan.hayward@arm.com>
597
598 * tdesc.c (~target_desc): Remove implictly deleted items.
599 (init_target_desc): Iterate all features.
600 (tdesc_get_features_xml): Use vector.
601 (tdesc_create_feature): Create feature.
602 * tdesc.h (tdesc_feature) Remove
603 (target_desc): Add features.
604
ea3e7d71
AH
6052018-04-18 Alan Hayward <alan.hayward@arm.com>
606
607 * Makefile.in: Add common/tdesc.c
608 * tdesc.c (init_target_desc): init all reg_defs from register
609 vector.
610 (tdesc_create_reg): Create tdesc_reg.
611 * tdesc.h (tdesc_feature): Add register vector.
612
17d08cd4
SM
6132018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * tdesc.h (struct target_desc) <features>: Change type to
616 std::vector<std::string>.
617 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
618 changes.
619 (tdesc_get_features_xml): Likewise.
620 (tdesc_create_feature): Likewise.
621
5cd3e386
AH
6222018-03-26 Alan Hayward <alan.hayward@arm.com>
623
624 * regcache.c (find_register_by_number): Return a ref.
625 (find_regno): Use references.
626 (register_size): Likewise.
627 (register_data): Likewise.
628 * tdesc.c (target_desc::~target_desc): Remove free calls.
629 (target_desc::operator==): Use std::vector compare.
630 (init_target_desc): Use reference.
631 (tdesc_create_reg): Use reg constructors.
632 * tdesc.h (struct target_desc): Replace pointer with object.
633
dff7492c
AH
6342018-03-23 Alan Hayward <alan.hayward@arm.com>
635
636 * regcache.c (find_register_by_number): Make static.
637 (find_regno): Use find_register_by_number
638 * regcache.h (struct reg): Remove declaration.
639
d80e5242
AH
6402018-03-23 Alan Hayward <alan.hayward@arm.com>
641
642 * tdesc.c (target_desc::~target_desc): Move to here.
643 (target_desc::operator==): Likewise.
644 * tdesc.h (target_desc::~target_desc): Move from here.
645 (target_desc::operator==): Likewise.
646
f69c5afb
AA
6472018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
648
649 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
650
ce29f843
AA
6512018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
652
653 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
654 S390_TDESC_GS.
655 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
656 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
657 and init_registers_s390_gs_linux64.
658
c49bd90b
AA
6592018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
660
661 * linux-s390-low.c (s390_fill_gs): Remove function.
662 (s390_fill_gsbc): Remove function.
663 (s390_regsets): Set fill functions for the guarded storage regsets
664 to NULL.
665
7edb9bd3
AA
6662018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
667
668 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
669 the word size. Add comment.
670 (s390_get_wordsize): New function.
671 (s390_arch_setup): No longer select a temporary tdesc to fetch the
672 pswm with it. Instead, use s390_get_wordsize to determine the
673 word size first and derive the correct tdesc from that directly.
674
39be3c7e
SM
6752018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
676
677 * Makefile.in: Include silent-rules.mk.
678 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
679 (COMPILE): Add ECHO_CXX.
680 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
681 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
682 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
683 (version-generated.c): Add ECHO_GEN.
684 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
685 (IPAGENT_COMPILE): Add ECHO_CXX.
686 (%-generated.c): Add ECHO_REGDAT.
687
3ae9ce5d
TT
6882018-03-14 Tom Tromey <tom@tromey.com>
689
690 PR cli/14977:
691 * ax.c (ax_printf): Special case for NULL.
692
e6a58aa8
SM
6932018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
694
695 * linux-low.c (linux_qxfer_libraries_svr4): Use
696 xml_escape_text_append.
697
f6e8a41e
SM
6982018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
699
700 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
701
b9671caf
SM
7022018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
703
704 * server.c (handle_general_set): Remove unnecessary xstrdup.
705
e80aaf61
SM
7062018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * server.c (parse_debug_format_options): Adjust to
709 delim_string_to_char_ptr_vec changes.
710 * thread-db.c (thread_db_load_search): Adjust to
711 dirnames_to_char_ptr_vec changes.
712
b1223e78
MM
7132018-03-01 Markus Metzger <markus.t.metzger@intel.com>
714
715 * target.h (target_enable_btrace, target_disable_btrace)
716 (target_read_btrace, target_read_btrace_conf): Turn macro into
717 inline function. Throw error if target method is not defined.
718 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
719 check for btrace target method. Be prepared to handle exceptions
720 from btrace target methods.
721
81561546
SDJ
7222018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
723
724 * server.c (captured_main): Change order of error message printed
725 when the current working directory cannot be found.
726
25e3c82c
SDJ
7272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
728
729 * server.c: Include "filenames.h" and "pathstuff.h".
730 (program_name): Delete variable.
731 (program_path): New anonymous class.
732 (get_exec_wrapper): Use "program_path" instead of
733 "program_name".
734 (handle_v_run): Likewise.
735 (captured_main): Likewise.
736 (process_serial_event): Likewise.
737
b4987c95
SDJ
7382018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
739
740 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
741 (OBJS): Add "pathstuff.o".
742 * server.c (current_directory): New global variable.
743 (captured_main): Initialize "current_directory".
744
f46cd62a
AH
7452018-02-26 Alan Hayward <alan.hayward@arm.com>
746
747 * tdesc.c: Use common/tdesc.h.
748 * tdesc.h: Likewise.
749
a543c5ca
AH
7502018-02-20 Alan Hayward <alan.hayward@arm.com>
751 Simon Marchi <simon.marchi@ericsson.com>
752
753 * Makefile.in: Switch order of make rules.
754
b5884fa7
AH
7552018-02-19 Alan Hayward <alan.hayward@arm.com>
756
757 * Makefile.in: Add common directory in build.
758 * configure.ac: Add common reference.
759 * configure: Regenerate.
760
de6242d3
MM
7612018-02-09 Markus Metzger <markus.t.metzger@intel.com>
762
763 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
764 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
765 * spu-low.c (spu_target_ops): Likewise.
766 * win32-low.c (win32_target_ops): Likewise.
767 * server.c (supported_btrace_packets): Report packets unconditionally.
768 * target.h (target_ops) <supports_btrace>: Remove.
769 (target_supports_btrace): Remove.
770
9ee23a85
MM
7712018-02-09 Markus Metzger <markus.t.metzger@intel.com>
772
773 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
774 (handle_btrace_disable): Change return type to void. Use exceptions
775 to report errors.
776 (handle_btrace_general_set): Catch exception and copy message to
777 return message.
778
8ce47547
TT
7792018-02-08 Tom Tromey <tom@tromey.com>
780
781 * linux-low.c (install_software_single_step_breakpoints): Use
782 make_scoped_restore.
783 * inferiors.c (make_cleanup_restore_current_thread): Remove.
784 (do_restore_current_thread_cleanup): Remove.
785 * gdbthread.h (make_cleanup_restore_current_thread): Don't
786 declare.
787
45dd3607
TT
7882018-02-08 Tom Tromey <tom@tromey.com>
789
790 * mem-break.c (set_raw_breakpoint_at): Use
791 gdb::unique_xmalloc_ptr.
792
e671cd59
PA
7932018-01-30 Pedro Alves <palves@redhat.com>
794
795 PR gdb/13211
796 * target.c (target_terminal::terminal_state): Rename to ...
797 (target_terminal::m_terminal_state): ... this.
798
a0aad537
JC
7992018-01-19 James Clarke <jrtc27@jrtc27.com>
800
801 * linux-low.c (handle_extended_wait): Surround call to
802 thread_db_notice_clone with #ifdef USE_THREAD_DB.
803
4d9b86e1
SM
8042018-01-17 Simon Marchi <simon.marchi@ericsson.com>
805
806 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
807 linux_ptrace_attach_fail_reason_string now returning an
808 std::string.
809 (linux_attach): Likewise.
810 * thread-db.c (attach_thread): Likewise.
811
f517c180
EA
8122018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
813
814 PR gdb/21559
815 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
816 checking for fs_base/gs_base fields in struct user_regs_struct.
817 * configure: Regenerate.
818
9a70f35c
YQ
8192018-01-16 Yao Qi <yao.qi@linaro.org>
820
821 PR gdb/18749
822 * linux-low.c (fetch_register): Call supply_register instead of
823 error.
824
605fd3c6
YQ
8252018-01-08 Yao Qi <yao.qi@linaro.org>
826 Simon Marchi <simon.marchi@ericsson.com>
827
828 * Makefile.in (OBS): Remove selftest.o.
829 * configure.ac: Set srv_selftest_objs if $development is true.
830 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
831 * configure: Re-generated.
832 * server.c (captured_main): Wrap variable selftest_filter with
833 GDB_SELF_TEST.
834
2cc05030
SM
8352018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
836
837 * server.c (parse_debug_format_options): Return std::string.
838 (handle_monitor_command, captured_main): Adjust.
839
e379cee6
PA
8402018-01-05 Pedro Alves <palves@redhat.com>
841
842 PR gdb/18653
843 * server.c (captured_main): Pass quiet=false to
844 save_original_signals_state.
845
82e1e79a
JB
8462018-01-01 Joel Brobecker <brobecker@adacore.com>
847
848 * gdbreplay.c (gdbreplay_version): Update copyright year in
849 version message.
850 * server.c (gdbserver_version): Likewise.
851
8e481c3b
TT
8522017-12-08 Tom Tromey <tom@tromey.com>
853
854 * ax.c (ax_printf): Update.
855
a8806230
YQ
8562017-12-07 Yao Qi <yao.qi@linaro.org>
857
858 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
859 aarch64_linux_read_description.
860 * linux-amd64-ipa.c (idx2mask): New array.
861 (get_ipa_tdesc): Move idx2mask out.
862 (initialize_low_tracepoint): Initialize target descriptions.
863 * linux-i386-ipa.c (idx2mask): New array.
864 (get_ipa_tdesc): Move idx2mask out.
865 (initialize_low_tracepoint): Initialize target descriptions.
866
d4a0e8b5
SM
8672017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
868
869 * tdesc.c (struct tdesc_type): Change return type.
870 (tdesc_add_flag): Change parameter type.
871 (tdesc_add_bitfield): Likewise.
872 (tdesc_add_field): Likewise.
873 (tdesc_set_struct_size): Likewise.
874
798a7429
SM
8752017-12-05 Simon Marchi <simon.marchi@ericsson.com>
876
877 * regcache.c (registers_to_string): Remove unused variable.
878
c0e15c9b
SM
8792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
880
881 * inferiors.c (for_each_inferior_with_data): Remove.
882 * inferiors.h (for_each_inferior_with_data): Remove.
883 * server.c (handle_qxfer_threads_worker): Change parameter type.
884 (handle_qxfer_threads_proper): Use for_each_thread.
885
f0045347
SM
8862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
887
888 * inferiors.c (for_each_inferior): Remove.
889 (clear_inferiors): Use for_each_thread.
890 * inferiors.h (for_each_inferior): Remove.
891 * linux-low.c (linux_wait_for_event_filtered): Use
892 for_each_thread.
893 (linux_stabilize_threads): Likewise.
894 * regcache.c (regcache_release): Likewise.
895 * server.c (gdb_wants_all_threads_stopped): Likewise.
896 (clear_pending_status_callback): Remove.
897 (handle_status): Use for_each_thread.
898 (captured_main): Likewise.
899 * win32-low.c (child_init_thread_list): Likewise.
900 (win32_clear_inferiors): Likewise.
901 (fake_breakpoint_event): Likewise.
902
9521758b
SM
9032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
904
905 * inferiors.h (find_inferior): Remove.
906 * inferiors.c (find_inferior): Remove.
907
8f86d7aa
SM
9082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
909
910 * linux-low.c (resume_status_pending_p): Update comment.
911 (need_step_over_p): Update comment.
912
e2b44075
SM
9132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
914
915 * linux-low.c (proceed_one_lwp): Return void, change parameter
916 type.
917 (unsuspend_and_proceed_one_lwp): Likewise.
918 (proceed_all_lwps): Use for_each_thread.
919 (unstop_all_lwps): Likewise.
920
c80825ff
SM
9212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
922
923 * linux-low.c (linux_resume_one_thread): Return void, take
924 parameter directly.
925 (linux_resume): Use for_each_thread.
926
df3e4dbe
SM
9272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
928
929 * linux-low.c (send_sigstop_callback): Return void, change
930 parameter type. Rename to...
931 (send_sigstop): ... this.
932 (suspend_and_send_sigstop_callback): Return void, change parameter
933 type. Rename to...
934 (suspend_and_send_sigstop): ... this.
935 (stop_all_lwps): Use for_each_thread.
936
5a6b0a41
SM
9372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
938
939 * linux-low.c (lwp_running): Return bool, remove unused
940 argument.
941 (linux_stabilize_threads): Use find_thread.
942
39a64da5
SM
9432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
944
945 * linux-low.c (select_singlestep_lwp_callback): Remove.
946 (count_events_callback): Remove.
947 (select_event_lwp_callback): Remove.
948 (select_event_lwp): Use find_thread/for_each_thread.
949
a1385b7b
SM
9502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * linux-low.c (not_stopped_callback): Return bool, take filter
953 argument directly.
954 (linux_wait_for_event_filtered): Use find_thread.
955 (linux_wait_1): Likewise.
956
454296a2
SM
9572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
958
959 * linux-low.c (same_lwp): Remove.
960 (find_lwp_pid): Use find_thread.
961
6b2a85da
SM
9622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
963
964 * linux-low.c (delete_lwp_callback): Remove.
965 (linux_mourn): Use for_each_thread.
966
798a38e8
SM
9672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
968
969 * linux-low.c (linux_detach_lwp_callback): Return void, remove
970 args parameter, don't check for pid.
971 (linux_detach): Use for_each_thread.
972
e4eb0dec
SM
9732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
974
975 * linux-low.c (struct counter): Remove.
976 (second_thread_of_pid_p): Remove.
977 (last_thread_of_process_p): Use find_thread.
978
83e1b6c1
SM
9792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * inferiors.c (find_inferior_in_random): Remove.
982 * inferiors.h (find_inferior_in_random): Remove.
983 * linux-low.c (status_pending_p_callback): Return bool, accept
984 parameter ptid directly.
985 (linux_wait_for_event_filtered): Use find_thread_in_random.
986 (linux_wait_1): Likewise.
987
8dc7b443
SM
9882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
989
990 * inferiors.c (find_inferior_id): Remove.
991 (find_thread_ptid): Move implemention from find_inferior_id to
992 here.
993 * inferiors.h (find_inferior_id): Remove.
994 * server.c (handle_status): Use find_thread_ptid.
995 (process_serial_event): Likewise.
996 * thread-db.c (find_one_thread): Likewise.
997 (thread_db_thread_handle): Likewise.
998 * win32-low.c (thread_rec): Likewise.
999 (child_delete_thread): Likewise.
1000 (win32_thread_alive): Likewise.
1001 (get_child_debug_event): Likewise.
1002
da25033c
SM
10032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1004
1005 * linux-mips-low.c (update_watch_registers_callback): Return
1006 void, remove pid_p parameter, don't check for pid.
1007 (mips_insert_point, mips_remove_point): Use for_each_thread.
1008
c91bb56b
SM
10092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1010
1011 * lynx.low (lynx_delete_thread_callback): Remove.
1012 (lynx_mourn): Use for_each_thread.
1013
634a3254
SM
10142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1015
1016 * regcache.c (regcache_invalidate_one): Remove.
1017 (regcache_invalidate_pid): use for_each_thread.
1018
41272101
TT
10192017-11-26 Tom Tromey <tom@tromey.com>
1020
1021 * linux-low.c (linux_create_inferior): Update.
1022
f5291a6f
UW
10232017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1024
1025 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1026
6654d750
AH
10272017-11-24 Alan Hayward <alan.hayward@arm.com>
1028
1029 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1030 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1031 * linux-aarch64-tdesc-selftest.c: New file.
1032 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1033
10342017-11-24 Alan Hayward <alan.hayward@arm.com>
1035
1036 * configure.srv: Add new file.
1037 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1038 * linux-aarch64-tdesc-selftest.c: New file.
1039 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1040
49bdb7ee
AH
10412017-11-24 Alan Hayward <alan.hayward@arm.com>
1042
1043 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1044 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1045 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1046
d6d7ce56
AH
10472017-11-24 Alan Hayward <alan.hayward@arm.com>
1048
1049 * configure.srv: Add new files.
1050 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1051 aarch64_linux_read_description.
1052 * linux-aarch64-low.c (aarch64_linux_read_description):
1053 Merge with aarch64_arch_setup.
1054 (aarch64_arch_setup): Call aarch64_linux_read_description.
1055 * linux-aarch64-tdesc.c: New file.
1056 * linux-aarch64-tdesc.h: New file.
1057
506fe5f4
YQ
10582017-11-24 Yao Qi <yao.qi@linaro.org>
1059
1060 * configure.srv: Set $srv_regobj for tic6x-linux.
1061 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1062 (tic6x_read_description): Move some code to tic6x_arch_setup.
1063 (tic6x_tdesc_test): New function.
1064 (initialize_low_arch): Call selftests::register_test.
1065
29f9a567
YQ
10662017-11-22 Yao Qi <yao.qi@linaro.org>
1067
1068 * remote-utils.c (prepare_resume_reply): Use memcpy.
1069
578290ec
SM
10702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * linux-low.c (kill_one_lwp_callback): Return void, take
1073 argument directly, don't filter on pid.
1074 (linux_kill): Use for_each_thread.
1075
eca55aec
SM
10762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * linux-low.c (need_step_over_p): Return bool, remove dummy
1079 argument.
1080 (linux_resume, proceed_all_lwps): Use find_thread.
1081
25c28b4d
SM
10822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1083
1084 * linux-low.c (resume_status_pending_p): Return bool, remove
1085 flag_p argument.
1086 (linux_resume): Use find_thread.
1087
5fdda392
SM
10882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * linux-low.c (struct thread_resume_array): Remove.
1091 (linux_set_resume_request): Return void, take arguments
1092 directly.
1093 (linux_resume): Use for_each_thread.
1094
fcb056a5
SM
10952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1096
1097 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1098 return bool, remove data argument.
1099 (linux_stabilize_threads): Use find_thread.
1100
139720c5
SM
11012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1102
1103 * linux-low.c (unsuspend_one_lwp): Remove.
1104 (unsuspend_all_lwps): Use for_each_thread, inline code from
1105 unsuspend_one_lwp.
1106
6d1e5673
SM
11072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1110 * linux-low.c (struct iterate_over_lwps_args): Remove.
1111 (iterate_over_lwps_filter): Remove.
1112 (iterate_over_lwps): Use find_thread.
1113
bbf550d5
SM
11142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1115
1116 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1117 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1118 code from reset_lwp_ptrace_options_callback.
1119
00192f77
SM
11202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1121
1122 * linux-arm-low.c (struct update_registers_data): Remove.
1123 (update_registers_callback): Return void, take arguments
1124 directly, don't check thread's pid.
1125 (arm_insert_point, arm_remove_point): Use for_each_thread.
1126
2bee2b6c
SM
11272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1128
1129 * win32-low.c (continue_one_thread): Return void, take argument
1130 directly.
1131 (child_continue): Use for_each_thread.
1132
0b360f19
SM
11332017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1134
1135 * win32-i386-low.c (update_debug_registers_callback): Rename
1136 to ...
1137 (update_debug_registers): ... this, return void, remove pid_p arg.
1138 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1139
f27866ba
SM
11402017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1141
1142 * inferiors.h (struct process_info): Add constructor, initialize
1143 fields..
1144 <syscalls_to_catch>: Change type to std::vector<int>.
1145 * inferiors.c (add_process): Allocate process_info with new.
1146 (remove_process): Free process_info with delete.
1147 * linux-low.c (handle_extended_wait): Adjust.
1148 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1149 * server.c (handle_general_set): Adjust.
1150
e849ea89
PA
11512017-11-16 Pedro Alves <palves@redhat.com>
1152
1153 * remote-utils.c (remote_close): Block SIGIO signals instead of
1154 uninstalling the SIGIO handler.
1155
1d0aa65c
AH
11562017-11-16 Alan Hayward <alan.hayward@arm.com>
1157
1158 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1159
3491a34c
YQ
11602017-11-16 Yao Qi <yao.qi@linaro.org>
1161
1162 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1163 (tic6x_store_gregset): Likewise.
1164 (tic6x_usrregs_info): Move it up.
1165
a602f924
AH
11662017-11-15 Alan Hayward <alan.hayward@arm.com>
1167
1168 * Makefile.in: Update arch rules.
1169 * configure.srv: Explicitly mark arch/ files.
1170
5616b6c3
AS
11712017-11-13 Andreas Schwab <schwab@suse.de>
1172
1173 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1174 function.
1175 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1176
d1928160
PA
11772017-11-06 Pedro Alves <palves@redhat.com>
1178
1179 * config.in, configure: Regenerate.
1180
bac608e7
SM
11812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * target.c (struct thread_search): Remove.
1184 (thread_search_callback): Remove.
1185 (prepare_to_access_memory): Use for_each_thread instead of
1186 find_inferior. Inline code from thread_search_callback.
1187
eaddb425
SM
11882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * server.c (struct visit_actioned_threads_data): Remove.
1191 (visit_actioned_threads): Change prototype to take arguments
1192 directly.
1193 (resume): Use find_thread instead of find_inferior.
1194
99078d34
SM
11952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1196
1197 * server.c (queue_stop_reply_callback): Change prototype, return
1198 void.
1199 (find_status_pending_thread_callback): Remove.
1200 (handle_status): Replace find_inferior with find_thread and
1201 for_each_thread.
1202
cc628f3d
AH
12032017-10-25 Alan Hayward <alan.hayward@arm.com>
1204
1205 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1206 with REGNO.
1207 (aarch64_store_gregset): Likewise.
1208 (aarch64_fill_fpregset): Likewise.
1209 (aarch64_store_fpregset): Likewise.
1210
4d3bb80e
SM
12112017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1212
1213 * gdbthread.h (find_thread, for_each_thread): New functions.
1214 * inferiors.c (thread_of_pid): Remove.
1215 (find_any_thread_of_pid): Use find_thread.
1216 * linux-low.c (num_lwps): Use for_each_thread.
1217
7a7cdfa0
YQ
12182017-10-17 Yao Qi <yao.qi@linaro.org>
1219
1220 * Makefile.in: Remove one rule.
1221 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1222
e675d170
YQ
12232017-10-17 Yao Qi <yao.qi@linaro.org>
1224
1225 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1226 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1227
7eb4e0f9
YQ
12282017-10-17 Yao Qi <yao.qi@linaro.org>
1229
1230 * configure.srv: Rename arm.o with arch/arm.o.
1231
60d6cfc9
YQ
12322017-10-17 Yao Qi <yao.qi@linaro.org>
1233
1234 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1235 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1236 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1237 (arch-i386.o, arch-amd64.o): Remove rules.
1238 (arch/%.o): New rule.
1239 Update POSTCOMPILE and COMPILE.pre.
1240 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1241 * configure: Re-generated.
1242 * configure.srv: Replace arch-i386.o with arch/i386.o.
1243 Replace arch-amd64.o with arch/amd64.o.
1244
5bfda255
YQ
12452017-10-16 Yao Qi <yao.qi@linaro.org>
1246
1247 * configure: Regenerated.
1248
9c80ecd6
SM
12492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1250
1251 * inferiors.h: (struct inferior_list): Remove.
1252 (struct inferior_list_entry); Remove.
1253 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1254 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1255 get_first_inferior): Remove.
1256 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1257 find_inferior_id, find_inferior_in_random): Change signature.
1258 * inferiors.c (all_threads): Change type to
1259 std::list<thread_info *>.
1260 (get_thread): Remove macro.
1261 (find_inferior, find_inferior_id): Change signature, implement
1262 using find_thread.
1263 (find_inferior_in_random): Change signature, implement using
1264 find_thread_in_random.
1265 (for_each_inferior, for_each_inferior_with_data): Change
1266 signature, implement using for_each_thread.
1267 (add_inferior_to_list, remove_inferior): Remove.
1268 (add_thread, get_first_thread, thread_of_pid,
1269 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1270 (get_first_inferior, one_inferior_p, clear_inferior_list):
1271 Remove.
1272 (clear_inferiors, get_thread_process): Update.
1273 * gdbthread.h: Include <list>.
1274 (struct thread_info) <entry>: Remove field.
1275 <id>: New field.
1276 (all_threads): Change type to std::list<thread_info *>.
1277 (get_first_inferior): Add doc.
1278 (find_thread, for_each_thread, find_thread_in_random): New
1279 functions.
1280 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1281 * linux-arm-low.c (update_registers_callback): Update.
1282 * linux-low.c (second_thread_of_pid_p): Update.
1283 (kill_one_lwp_callback, linux_detach_lwp_callback,
1284 delete_lwp_callback, status_pending_p_callback, same_lwp,
1285 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1286 iterate_over_lwps, not_stopped_callback,
1287 resume_stopped_resumed_lwps, count_events_callback,
1288 select_singlestep_lwp_callback, select_event_lwp_callback,
1289 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1290 suspend_and_send_sigstop_callback, wait_for_sigstop,
1291 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1292 lwp_running, linux_set_resume_request, resume_status_pending_p,
1293 need_step_over_p, start_step_over, linux_resume_one_thread,
1294 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1295 reset_lwp_ptrace_options_callback): Update.
1296 * linux-mips-low.c (update_watch_registers_callback): Update.
1297 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1298 Update.
1299 (free_register_cache_thread_one): Remove.
1300 (regcache_release): Update.
1301 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1302 handle_qxfer_threads_worker): Update.
1303 (handle_query): Update, use list iterator.
1304 (visit_actioned_threads, handle_pending_status,
1305 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1306 clear_pending_status_callback, set_pending_status_callback,
1307 find_status_pending_thread_callback, handle_status,
1308 process_serial_event): Update.
1309 * target.c (thread_search_callback): Update.
1310 * thread-db.c (thread_db_get_tls_address): Update.
1311 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1312 Update.
1313 * win32-i386-low.c (update_debug_registers_callback): Update.
1314 * win32-low.c (delete_thread_info, child_delete_thread,
1315 continue_one_thread, suspend_one_thread,
1316 get_child_debug_event): Adjust.
1317
9179355e
SM
13182017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1319
1320 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1321 * inferiors.h: Include <list>.
1322 (struct process_info) <entry>: Remove field.
1323 <pid>: New field.
1324 (pid_of): Change macro to function.
1325 (ptid_of, lwpid_of): Remove macro.
1326 (all_processes): Change type to std::list<process_info *>.
1327 (ALL_PROCESSES): Remove macro.
1328 (for_each_process, find_process): New function.
1329 * inferiors.c (all_processes): Change type to
1330 std::list<process_info *>.
1331 (find_thread_process): Adjust.
1332 (add_process): Likewise.
1333 (remove_process): Likewise.
1334 (find_process_pid): Likewise.
1335 (get_first_process): Likewise.
1336 (started_inferior_callback): Remove.
1337 (have_started_inferiors_p): Adjust.
1338 (attached_inferior_callback): Remove.
1339 (have_attached_inferiors_p): Adjust.
1340 * linux-low.c (check_zombie_leaders): Likewise.
1341 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1342 (x86_linux_update_xmltarget): Adjust.
1343 * server.c (handle_query): Likewise.
1344 (gdb_reattached_process): Remove.
1345 (handle_status): Adjust.
1346 (kill_inferior_callback): Likewise.
1347 (detach_or_kill_inferior): Remove.
1348 (print_started_pid): Likewise.
1349 (print_attached_pid): Likewise.
1350 (detach_or_kill_for_exit): Update.
1351 (process_serial_event): Likewise.
1352 * linux-arm-low.c (arm_new_fork): Likewise.
1353
c9cb8905
SM
13542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1355
1356 * dll.h: Include <list>.
1357 (struct dll_info): Add constructor.
1358 <entry>: Remove field.
1359 (all_dlls): Change type to std::list<dll_info>.
1360 * dll.c: Include <algorithm>.
1361 (get_dll): Remove macro.
1362 (all_dlls): Change type to std::list<dll_info *>.
1363 (free_one_dll): Remove.
1364 (match_dll): Likewise.
1365 (loaded_dll): Adjust.
1366 (unloaded_dll): Adjust to all_dlls type change, use
1367 std::find_if. Inline code from match_dll.
1368 (clear_dlls): Adjust to all_dlls type change.
1369 * server.c (emit_dll_description): Remove.
1370 (handle_qxfer_libraries): Adjust to all_dlls type change,
1371 integrate emit_dll_description's functionality.
1372
04ec7890
SM
13732017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * linux-low.h (struct linux_target_ops) <delete_process>: New
1376 field.
1377 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1378 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1379 (struct linux_target_ops): Add delete_process callback.
1380 * linux-arm-low.c (arm_delete_process): New.
1381 (struct linux_target_ops): Add delete_process callback.
1382 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1383 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1384 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1385 * linux-mips-low.c (mips_linux_delete_process): New.
1386 (struct linux_target_ops): Add delete_process callback.
1387 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1388 * linux-s390-low.c (struct linux_target_ops): Likewise.
1389 * linux-sh-low.c (struct linux_target_ops): Likewise.
1390 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1391 * linux-tile-low.c (struct linux_target_ops): Likewise.
1392 * linux-x86-low.c (x86_linux_delete_process): New.
1393 (struct linux_target_ops): Add delete_process callback.
1394 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1395
466eecee
SM
13962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1397
1398 * linux-aarch64-low.c (the_low_target): Add thread delete
1399 callback.
1400 * linux-arm-low.c (arm_delete_thread): New function.
1401 (the_low_target): Add thread delete callback.
1402 * linux-bfin-low.c (the_low_target): Likewise.
1403 * linux-crisv32-low.c (the_low_target): Likewise.
1404 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1405 set.
1406 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1407 field.
1408 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1409 * linux-mips-low.c (mips_linux_delete_thread): New function.
1410 (the_low_target): Add thread delete callback.
1411 * linux-ppc-low.c (the_low_target): Likewise.
1412 * linux-s390-low.c (the_low_target): Likewise.
1413 * linux-sh-low.c (the_low_target): Likewise.
1414 * linux-tic6x-low.c (the_low_target): Likewise.
1415 * linux-tile-low.c (the_low_target): Likewise.
1416 * linux-x86-low.c (the_low_target): Likewise.
1417 * linux-xtensa-low.c (the_low_target): Likewise.
1418
b79f7801
YZ
14192017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1420
1421 * win32-low.c: Include "common-inferior.h".
1422
bc3b087d
SDJ
14232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1424
1425 * inferiors.c (set_inferior_cwd): New function.
1426 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1427 (handle_query): Inform that QSetWorkingDir is supported.
1428 * win32-low.c (create_process): Pass the inferior's cwd to
1429 CreateProcess.
1430
d092c5a2
SDJ
14312017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1432
1433 * inferiors.c (current_inferior_cwd): New global variable.
1434 (get_inferior_cwd): New function.
1435 * inferiors.h (struct process_info) <cwd>: New field.
1436
7da0a886
SDJ
14372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1438
1439 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1440 (OBS): Add gdb_tilde_expand.o.
1441
289a6840
SM
14422017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1443
1444 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1445 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1446
256642e8
PA
14472017-09-29 Pedro Alves <palves@redhat.com>
1448
1449 * ax.c (gdb_parse_agent_expr): Constify.
1450 * ax.h (gdb_parse_agent_expr): Constify.
1451 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1452 Constify.
1453 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1454 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1455 * remote-utils.h (read_ptid): Constify.
1456 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1457 (process_point_options, process_serial_event): Constify.
1458 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1459 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1460 (cmd_qtbuffer): Constify.
1461
5b9ca4d4
PA
14622017-09-29 Pedro Alves <palves@redhat.com>
1463
1464 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1465 fails.
1466
94c207e0
PA
14672017-09-29 Pedro Alves <palves@redhat.com>
1468
1469 * linux-low.c (handle_extended_wait): Pass parent thread instead
1470 of process to thread_db_notice_clone.
1471 * linux-low.h (thread_db_notice_clone): Replace parent process
1472 parameter with parent thread parameter.
1473 * thread-db.c (find_one_thread): Add comment.
1474 (thread_db_notice_clone): Replace parent process parameter with
1475 parent thread parameter. Temporarily switch to the parent thread.
1476
75352e28
SDJ
14772017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1478
1479 * gdbthread.h: Include "common-gdbthread.h".
1480 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1481 "if" when validating the ptid.
1482 * remote-utils.c: Include "gdbthread.h".
1483 (prepare_resume_reply): Use "switch_to_thread".
1484 * target.c (done_accessing_memory): Likewise.
1485
ad339634
AA
14862017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1487
1488 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1489 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1490 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1491 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1492 s390x-gs-linux64-ipa.o to ipa_obj.
1493 * linux-s390-low.c (HWCAP_S390_GS): New define.
1494 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1495 New functions.
1496 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1497 (s390_arch_setup): Check for guarded-storage support and choose
1498 appropriate tdesc.
1499 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1500 init_registers_s390x_gs_linux64.
1501 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1502 enum value.
1503 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1504 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1505
cc4d742f
SM
15062017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1507
1508 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1509
f6327dcb
KB
15102017-09-21 Kevin Buettner <kevinb@redhat.com>
1511
1512 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1513 (thread_db_thread_handle): Declare.
1514 * linux-low.c (linux_target_ops): Initialize thread_handle.
1515 * server.c (handle_qxfer_threads_worker): Add support for
1516 "handle" attribute.
1517 * target.h (struct target_ops): Add new function pointer,
1518 thread_handle.
1519 (target_thread_handle): Define.
1520 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1521 field in lwp.
1522 (thread_db_thread_handle): New function.
1523
86299109
KB
15242017-09-21 Kevin Buettner <kevinb@redhat.com>
1525
1526 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1527 * linux-low.h (thread_db_notice_clone): Declare.
1528 * thread-db.c (thread_db_notice_clone): New function.
1529
f557a88a
PA
15302017-09-21 Pedro Alves <palves@redhat.com>
1531
1532 * server.c (gdb_read_memory, handle_status, process_serial_event)
1533 (handle_serial_event, handle_target_event): Adjust to
1534 set_desired_thread prototype change.
1535 * target.c (set_desired_thread): Remove 'use_general' parameter
1536 and adjust.
1537 * target.h (set_desired_thread): Remove 'use_general' parameter.
1538
223ffa71
TT
15392017-09-20 Tom Tromey <tom@tromey.com>
1540
1541 * target.c (target_terminal::terminal_state): Define.
1542 (target_terminal::init): Rename from target_terminal_init.
1543 (target_terminal::inferior): Rename from
1544 target_terminal_inferior.
1545 (target_terminal::ours): Rename from target_terminal_ours.
1546 (target_terminal::ours_for_output, target_terminal::info): New.
1547
04fd3ba9
SM
15482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1549
1550 * server.c (accumulate_file_name_length): Remove.
1551 (emit_dll_description): Adjust to std::string change.
1552 (handle_qxfer_libraries): Use std::string to hold document.
1553
5e187554
SM
15542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1557 return type of xml_escape_text.
1558 * server.c (emit_dll_description): Likewise.
1559
1526853e
SM
15602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * server.c (captured_main): Accept argument for --selftest.
1563 Update run_tests call.
1564 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1565 when registering selftests.
1566
c4dfafab
SDJ
15672017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1568
1569 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1570 instead of "VEC" for "target_desc.reg_defs".
1571 (regcache_cpy): Likewise.
1572 (registers_to_string): Likewise.
1573 (registers_from_string): Likewise.
1574 (find_regno): Likewise.
1575 (supply_regblock): Likewise.
1576 (regcache_raw_read_unsigned): Likewise.
1577 * tdesc.c (init_target_desc): Likewise.
1578 (tdesc_create_reg): Likewise.
1579 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1580 (struct target_desc) <reg_defs>: Convert to "std::vector".
1581 (target_desc): Do not initialize "reg_defs".
1582 (~target_desc): Update code to use "std::vector" instead of "VEC"
1583 for "target_desc.reg_defs".
1584 (operator==): Likewise.
1585
124aceb4
SM
15862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1587
1588 * inferiors.h (thread_to_gdb_id): Remove.
1589 * inferiors.c (thread_to_gdb_id): Remove.
1590 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1591 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1592 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1593 Likewise.
1594 * nto-low.c (nto_fetch_registers, nto_store_registers,
1595 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1596
96cde54f
SM
15972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * inferiors.h (gdb_id_to_thread_id): Remove.
1600 * inferiors.c (gdb_id_to_thread_id): Remove.
1601 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1602 removal. Move pid declaration closer to where it's used.
1603
e8ca139e
SM
16042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1605
1606 * server.c (handle_detach): New function.
1607 (process_serial_event): Move code out, call handle_detach.
1608
f8a4e119
SM
16092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1610
1611 * server.c (require_running): Rename to ...
1612 (require_running_or_return): ... this ...
1613 (require_running_or_break): ... and this.
1614 (handle_query, process_serial_event): Adjust.
1615
0eb0a407
SM
16162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1617
1618 * linux-low.c (linux_set_resume_request): Remove unused
1619 variables.
1620
785922a5
SM
16212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1622
1623 * server.c (first_thread_of): Remove.
1624 (process_serial_event): Replace usage of first_thread_of with
1625 find_any_thread_of_pid.
1626 * tracepoint.c (same_process_p): Remove.
1627 (gdb_agent_about_to_close): Replace usage of same_process_p with
1628 find_any_thread_of_pid.
1629 * linux-x86-low.c (same_process_callback): Remove.
1630 (x86_arch_setup_process_callback): Replace usage of
1631 same_process_callback with find_any_thread_of_pid.
1632 * thread-db.c (any_thread_of): Remove.
1633 (switch_to_process): Replace usage of any_thread_of with
1634 find_any_thread_of_pid.
1635 * inferiors.c (thread_pid_matches_callback): Remove.
1636 (find_thread_process): Adjust to use find_any_thread_of_pid.
1637
a059f00c
SDJ
16382017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1639
1640 * regcache.c (get_thread_regcache): Guard calls to "memset"
1641 with "!VEC_empty".
1642
cc397f3a
SDJ
16432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1644
1645 * linux-low.c (handle_extended_wait): Use
1646 "allocate_target_description" instead of "XNEW".
1647 * linux-x86-low.c (initialize_low_arch): Likewise.
1648
22916b07
YQ
16492017-09-05 Yao Qi <yao.qi@linaro.org>
1650
1651 * configure.srv (srv_i386_regobj): Remove.
1652 (srv_amd64_regobj): Remove.
1653 (srv_regobj): Set it to "" for x86 non-linux targets.
1654 * linux-x86-tdesc.c (i386_linux_read_description):
1655 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1656 (init_registers_i386): Remove the declaration.
1657 (tdesc_i386): Remove the declaration.
1658 (lynx_i386_arch_setup): Call i386_create_target_description.
1659 * nto-x86-low.c: Likewise.
1660 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1661 [!__x86_64__]: include arch/i386.h.
1662 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1663
38602d55
YQ
16642017-09-05 Yao Qi <yao.qi@linaro.org>
1665
1666 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1667 i386/amd64-XXX-linux from it.
1668
44b886ff
YQ
16692017-09-05 Yao Qi <yao.qi@linaro.org>
1670
1671 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1672 false.
1673 (ipa_amd64_linux_regobj): Remove.
1674 (ipa_x32_linux_regobj): Remove.
1675
b4570e4b
YQ
16762017-09-05 Yao Qi <yao.qi@linaro.org>
1677
1678 * Makefile.in (arch-amd64.o): New rule.
1679 * configure.srv: Append arch-amd64.o.
1680 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1681 (get_ipa_tdesc): Call amd64_linux_read_description.
1682 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1683 and init_registers_amd64_XXX.
1684 * linux-x86-low.c (x86_linux_read_description): Call
1685 amd64_linux_read_description.
1686 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1687 (initialize_low_arch): Don't call init_registers_x32_XXX and
1688 init_registers_amd64_XXX.
1689 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1690 and tdesc_amd64_XXX.
1691 [__x86_64__] (amd64_tdesc_test): New function.
1692 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1693 and init_registers_amd64_XXX.
1694 * linux-x86-tdesc.c: Include arch/amd64.h.
1695 (xcr0_to_tdesc_idx): New function.
1696 (i386_linux_read_description): New function.
1697 (amd64_get_ipa_tdesc_idx): New function.
1698 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1699 (amd64_get_ipa_tdesc): Declare.
1700
d1f28ea2
YQ
17012017-09-05 Yao Qi <yao.qi@linaro.org>
1702
1703 * configure.srv (srv_i386_linux_xmlfiles): Remove
1704 i386/i386-XXX-linux.xml from it.
1705
25a93583
YQ
17062017-09-05 Yao Qi <yao.qi@linaro.org>
1707
1708 * configure.srv: Set srv_i386_linux_regobj empty if $development
1709 is false.
1710 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1711 initialize_low_tdesc.
1712 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1713 with #if initialize_low_tdesc.
1714 * linux-x86-tdesc-selftest.c: New file.
1715 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1716
5f035c07
YQ
17172017-09-05 Yao Qi <yao.qi@linaro.org>
1718
1719 * Makefile.in (arch-i386.o): New rule.
1720 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1721 (x86_64-*-linux*): Likewise.
1722 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1723 include arch/i386.h.
1724 (i386_linux_read_description): Remove code and call
1725 i386_create_target_description.
1726 * tdesc.c (allocate_target_description): New function.
1727 * tdesc.h (set_tdesc_architecture): Remove declaration.
1728 (set_tdesc_osabi): Likewise.
1729
0abe8a89
YQ
17302017-09-05 Yao Qi <yao.qi@linaro.org>
1731
1732 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1733 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1734 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1735 .xmltarget.
1736 * server.c (get_features_xml): Call tdesc_get_features_xml.
1737 * tdesc.c (set_tdesc_architecture): New function.
1738 (set_tdesc_osabi): New function.
1739 (tdesc_get_features_xml): New function.
1740 (tdesc_create_feature): Add an argument.
1741 * tdesc.h (struct target_desc) <features>: New field.
1742 <arch, osabi>: New field.
1743 (~target_desc): xfree features, arch, and osabi.
1744 (target_desc::oerator==): Don't compare .xmltarget.
1745 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1746 (set_tdesc_osabi): Likewise.
1747 (tdesc_get_features_xml): Likewise.
1748
0a188386
YQ
17492017-09-05 Yao Qi <yao.qi@linaro.org>
1750
1751 * linux-x86-tdesc.c: Include selftest.h.
1752 (i386_tdesc_test): New function.
1753 (initialize_low_tdesc): Call selftests::register_test.
1754 * tdesc.h: Include regdef.h.
1755 (target_desc): Override operator == and !=.
1756
f49ff000
YQ
17572017-09-05 Yao Qi <yao.qi@linaro.org>
1758
1759 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1760 (ipa_obj): Likewise.
1761 * linux-i386-ipa.c: Include common/x86-xstate.h
1762 (get_ipa_tdesc): Call i386_linux_read_description.
1763 (initialize_low_tracepoint): Don't call init_registers_XXX
1764 functions, call initialize_low_tdesc instead.
1765 * linux-x86-low.c (x86_linux_read_description): Call
1766 i386_linux_read_description.
1767 (initialize_low_arch): Don't call init_registers_i386_XXX
1768 functions, call initialize_low_tdesc.
1769 * linux-x86-tdesc.c: New file.
1770 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1771 (i386_get_ipa_tdesc_idx): Declare.
1772 (i386_get_ipa_tdesc): Declare.
1773 (initialize_low_tdesc): Declare.
1774
2b68ef2f
YQ
17752017-09-05 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1778 instead of 0.
1779
f7000548
YQ
17802017-09-05 Yao Qi <yao.qi@linaro.org>
1781
1782 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1783 * regcache.c (get_thread_regcache): Use VEC_length.
1784 (init_register_cache): Likewise.
1785 (regcache_cpy): Likewise.
1786 (registers_to_string): Iterate reg_defs via VEC_iterate.
1787 (find_regno): Likewise.
1788 (find_register_by_number): Use VEC_index.
1789 (register_size): Call find_register_by_number.
1790 (register_data): Call find_register_by_number.
1791 (supply_regblock): Use VEC_length.
1792 (regcache_raw_read_unsigned): Likewise.
1793 * tdesc.c (init_target_desc): Iterate reg_defs via
1794 VEC_iterate.
1795 (default_description): Update initializer.
1796 (copy_target_description): Don't update field num_registers.
1797 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1798 <num_registers>: Remove.
1799
50a421ac
SM
18002017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1801
1802 * Makefile.in (.SECONDARY): Define target.
1803
23fdd69e
SM
18042017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * linux-low.c (linux_wait_1): Adjust.
1807 * server.c (queue_stop_reply_callback): Adjust.
1808
0a2dde4a
SDJ
18092017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1810
1811 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1812 QEnvironmentUnset and QEnvironmentReset packets.
1813 (handle_query): Inform remote that QEnvironmentHexEncoded,
1814 QEnvironmentUnset and QEnvironmentReset are supported.
1815
6afd337d
SM
18162017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1817
1818 * inferiors.h (inferior_target_data): Rename to ...
1819 (thread_target_data): ... this.
1820 (inferior_regcache_data): Rename to ...
1821 (thread_regcache_data): ... this.
1822 (set_inferior_regcache_data): Rename to ...
1823 (set_thread_regcache_data): ... this.
1824 * inferiors.c (inferior_target_data): Rename to ...
1825 (thread_target_data): ... this.
1826 (inferior_regcache_data): Rename to ...
1827 (thread_regcache_data): ... this.
1828 (set_inferior_regcache_data): Rename to ...
1829 (set_thread_regcache_data): ... this.
1830 (free_one_thread): Update.
1831 * linux-low.h (get_thread_lwp): Update.
1832 * regcache.c (get_thread_regcache): Update.
1833 (regcache_invalidate_thread): Update.
1834 (free_register_cache_thread): Update.
1835 * win32-i386-low.c (update_debug_registers_callback): Update.
1836 (win32_get_current_dr): Update.
1837 * win32-low.c (thread_rec): Update.
1838 (delete_thread_info): Update.
1839 (continue_one_thread): Update.
1840 (suspend_one_thread): Update.
1841
a160cc46
SM
18422017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1843
1844 * inferiors.c (set_inferior_target_data): Remove.
1845 * inferiors.h (set_inferior_target_data): Remove.
1846
6d580b63
YQ
18472017-08-18 Yao Qi <yao.qi@linaro.org>
1848
1849 * Makefile.in (OBS): Add selftest.o.
1850 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1851 * configure, config.in: Re-generated.
1852 * server.c: Include common/sefltest.h.
1853 (captured_main): Handle option --selftest.
1854
f5a29eb0
YQ
18552017-08-09 Yao Qi <yao.qi@linaro.org>
1856
1857 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1858 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1859 i386-avx-mpx.o and i386-mmx.o.
1860 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1861 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1862 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1863 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1864 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1865 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1866 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1867 i386/amd64-avx-mpx.xml.
1868
57757c2f
YQ
18692017-08-09 Yao Qi <yao.qi@linaro.org>
1870
1871 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1872 and x32-avx-avx512.o.
1873 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1874 i386/x32-avx-avx512.xml.
1875
229d26fc
SM
18762017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1877
1878 * tracepoint.h (enum class fast_tpoint_collect_result): New
1879 enumeration.
1880 (fast_tracepoint_collecting): Change return type to
1881 fast_tpoint_collect_result.
1882 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1883 * linux-low.h: Include tracepoint.h.
1884 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1885 fast_tpoint_collect_result.
1886 * linux-low.c (handle_tracepoints): Adjust.
1887 (linux_fast_tracepoint_collecting): Change return type to
1888 fast_tpoint_collect_result.
1889 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1890 linux_wait_1, stuck_in_jump_pad_callback,
1891 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1892 proceed_one_lwp): Adjust to type change.
1893
2e1e43e1
YQ
18942017-07-10 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1897
adc764e7
YQ
18982017-06-29 Yao Qi <yao.qi@linaro.org>
1899
1900 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1901 Remove.
1902 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1903
a206891a
SM
19042017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1907
9a6c7d9c
SDJ
19082017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1909
1910 * linux-low.c (linux_create_inferior): Adjust code to access the
1911 environment information via 'gdb_environ' class.
1912 * lynx-low.c (lynx_create_inferior): Likewise.
1913 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1914 (get_environ): Return a pointer to 'our_environ'.
1915 (captured_main): Initialize 'our_environ'.
1916 * server.h (get_environ): Adjust prototype.
1917 * spu-low.c (spu_create_inferior): Adjust code to access the
1918 environment information via 'gdb_environ' class.
1919
ae3e2ccf
SM
19202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1921
1922 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1923 usage of "register" keyword.
1924
3e019bdc
SM
19252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1926
1927 * configure: Re-generate.
1928
8465943a
SM
19292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * configure: Re-generate.
1932
cf0dd6f0
SM
19332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1934
1935 * Makefile.in (COMPILE.pre): Add "-x c++".
1936
9845682b
SDJ
19372017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1938
1939 * fork-child.c: Conditionally include <signal.h>.
1940
aefd8b33
SDJ
19412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1942
1943 * server.c (handle_general_set): Handle new packet
1944 "QStartupWithShell".
1945 (handle_query): Add "QStartupWithShell" to the list of supported
1946 packets.
1947 (gdbserver_usage): Add help text explaining the
1948 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1949 options.
1950 (captured_main): Recognize and act upon the presence of the new
1951 CLI options.
1952
2090129c
SDJ
19532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1954 Pedro Alves <palves@redhat.com>
1955
1956 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1957 * configure: Regenerate.
1958 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1959 "fork-inferior.o".
1960 (i[34567]86-*-lynxos*): Likewise.
1961 (spu*-*-*): Likewise.
1962 * fork-child.c: New file.
1963 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1964 and "environ.h".
1965 (linux_ptrace_fun): New function.
1966 (linux_create_inferior): Adjust function prototype to reflect
1967 change on "target.h". Adjust function code to use
1968 "fork_inferior".
1969 (linux_request_interrupt): Delete "signal_pid".
1970 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1971 (lynx_ptrace_fun): New function.
1972 (lynx_create_inferior): Adjust function prototype to reflect
1973 change on "target.h". Adjust function code to use
1974 "fork_inferior".
1975 * nto-low.c (nto_create_inferior): Adjust function prototype and
1976 code to reflect change on "target.h". Update comments.
1977 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1978 "common-terminal.h" and "environ.h".
1979 (terminal_fd): Moved to fork-child.c.
1980 (old_foreground_pgrp): Likewise.
1981 (restore_old_foreground_pgrp): Likewise.
1982 (last_status): Make it global.
1983 (last_ptid): Likewise.
1984 (our_environ): New variable.
1985 (startup_with_shell): Likewise.
1986 (program_name): Likewise.
1987 (program_argv): Rename to...
1988 (program_args): ...this.
1989 (wrapper_argv): New variable.
1990 (start_inferior): Delete function.
1991 (get_exec_wrapper): New function.
1992 (get_exec_file): Likewise.
1993 (get_environ): Likewise.
1994 (prefork_hook): Likewise.
1995 (post_fork_inferior): Likewise.
1996 (postfork_hook): Likewise.
1997 (postfork_child_hook): Likewise.
1998 (handle_v_run): Update code to deal with arguments coming from the
1999 remote host. Update calls from "start_inferior" to
2000 "create_inferior".
2001 (captured_main): Likewise. Initialize environment variable. Call
2002 "have_job_control".
2003 * server.h (post_fork_inferior): New prototype.
2004 (get_environ): Likewise.
2005 (last_status): Declare.
2006 (last_ptid): Likewise.
2007 (signal_pid): Likewise.
2008 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2009 (spu_ptrace_fun): New function.
2010 (spu_create_inferior): Adjust function prototype to reflect change
2011 on "target.h". Adjust function code to use "fork_inferior".
2012 * target.c (target_terminal_init): New function.
2013 (target_terminal_inferior): Likewise.
2014 (target_terminal_ours): Likewise.
2015 * target.h: Include <vector>.
2016 (struct target_ops) <create_inferior>: Update prototype.
2017 (create_inferior): Update macro.
2018 * utils.c (gdb_flush_out_err): New function.
2019 * win32-low.c (win32_create_inferior): Adjust function prototype
2020 and code to reflect change on "target.h".
2021
043a4934
SDJ
20222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2023
2024 * inferiors.c (switch_to_thread): New function.
2025
15652511
SDJ
20262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2027
2028 * Makefile.in (SFILE): Add "common/job-control.c".
2029 (OBS): Add "job-control.o".
2030
21ea5acd
SDJ
20312017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2032
2033 * Makefile: Remove "@host_makefile_frag@".
2034
e13cb306
PA
20352017-05-05 Pedro Alves <palves@redhat.com>
2036
2037 * configure: Regenerate.
2038
c94fee56
SDJ
20392017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2040
2041 * configure: Regenerate.
2042
a0ff9e1a
SM
20432017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2044
2045 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2046 software_single_step change of return type to
2047 std::vector<CORE_ADDR>.
2048 * linux-low.c (install_software_single_step_breakpoints):
2049 Likewise.
2050 * linux-low.h (install_software_single_step_breakpoints):
2051 Likewise.
2052
be628ab8
SDJ
20532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2054
2055 * remote-utils.c: Include "gdb_termios.h" instead of
2056 "terminal.h".
2057 * terminal.h: Delete file.
2058
7c5ded6a
SDJ
20592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2060
2061 * server.c: Include <vector>.
2062 <program_argv, wrapper_argv>: Convert to std::vector.
2063 (start_inferior): Rewrite function to use C++.
2064 (handle_v_run): Likewise. Update code that calculates the argv
2065 based on the vRun packet; use C++.
2066 (captured_main): Likewise.
2067
436252de
SM
20682017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2069
2070 * server.c (handle_v_cont): Initialize thread_resume::thread
2071 with null_ptid.
2072
9bf2a700
PA
20732017-04-05 Pedro Alves <palves@redhat.com>
2074
2075 * configure: Regenerate.
2076
a121b7c1
PA
20772017-04-05 Pedro Alves <palves@redhat.com>
2078
2079 * gdbreplay.c (sync_error): Constify.
2080 * linux-x86-low.c (push_opcode): Constify.
2081
21c8a587
PA
20822017-04-05 Pedro Alves <palves@redhat.com>
2083
2084 * win32-low.c (get_child_debug_event)
2085 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2086 Report TARGET_WAITKIND_SPURIOUS instead.
2087
fb32b4f7
PA
20882017-04-05 Pedro Alves <palves@redhat.com>
2089
2090 * remote-utils.c (remote_prepare, remote_open): Constify.
2091 * remote-utils.h (remote_prepare, remote_open): Constify.
2092 * server.c (captured_main): Constify 'port' handling.
2093
65dd1e59
SM
20942017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2095
2096 * Makefile.in (clean): Clear .deps.
2097
8fa5b777
SM
20982017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2099
2100 * .gitignore: Remove generated files, replace with wildcard.
2101 * (clean): Replace removal of generated files with wildcard.
2102 (version.c): Replace with...
2103 (version-generated.c): ...this.
2104 (xml-builtin.c): Replace with...
2105 (xml-builtin-generated.c): ...this.
2106 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2107 (%.c: *regformats*): Replace with...
2108 (%-generated.c: *regformats*): ...this.
2109
a12e714b
MF
21102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2111
2112 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2113 (xtensa_fill_gregset): Call collect_register_by_name for
2114 threadptr register.
2115 (xtensa_store_gregset): Call supply_register_by_name for
2116 threadptr register.
2117
1a09b50a
MF
21182017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2119
2120 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2121 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2122 (xtensa_store_gregset): Call supply_register for all registers in
2123 a0_regnum..a0_regnum + C0_NREGS range.
2124
1a01e7c6
SM
21252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2126
2127 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2128 (ax-ipa.o: ax.c): Remove.
2129 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2130 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2131 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2132 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2133 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2134
36bc18a8
SM
21352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2136
2137 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2138 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2139 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2140 (errors-ipa.o: ../common/errors.c): Remove.
2141 (format-ipa.o: ../common/format.c): Remove.
2142 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2143
a8ebe3d5
SM
21442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2145
2146 * Makefile.in (%-ipa.o: %.c): New rule.
2147 (tracepoint-ipa.o: tracepoint.c): Remove.
2148 (utils-ipa.o: utils.c): Remove.
2149 (remote-utils-ipa.o: remote-utils.c): Remove.
2150 (regcache-ipa.o: regcache.c): Remove.
2151 (i386-linux-ipa.o: i386-linux.c): Remove.
2152 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2153 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2154 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2155 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2156 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2157 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2158 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2159 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2160 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2161 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2162 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2163 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2164 (aarch64-ipa.o: aarch64.c): Remove.
2165 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2166 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2167 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2168 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2169 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2170 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2171 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2172 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2173 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2174 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2175 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2176 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2177 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2178 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2179 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2180 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2181 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2182 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2183 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2184 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2185 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2186 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2187 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2188 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2189 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2190 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2191 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2192 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2193 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2194 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2195 (tdesc-ipa.o: tdesc.c): Remove.
2196 (x32-linux-ipa.o: x32-linux.c): Remove.
2197 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2198 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2199
50cfacb7
SM
22002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2201
2202 * Makefile.in (%.o: ../arch/%.c): New rule.
2203 (arm.o: ../arch/arm.c): Remove.
2204 (arm-linux.o: ../arch/arm-linux.c): Remove.
2205 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2206 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2207
c5a22423
SM
22082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2209
2210 * Makefile.in (%.o: ../nat/%.c): New rule.
2211 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2212 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2213 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2214 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2215 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2216 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2217 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2218 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2219 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2220 (linux-personality.o: ../nat/linux-personality.c): Remove.
2221 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2222 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2223 (x86-linux.o: ../nat/x86-linux.c): Remove.
2224 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2225 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2226
6bda016b
SM
22272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2228
2229 * Makefile.in (%.o: ../common/%.c): New rule.
2230 (signals.o: ../common/signals.c): Remove.
2231 (print-utils.o: ../common/print-utils.c): Remove.
2232 (rsp-low.o: ../common/rsp-low.c): Remove.
2233 (common-utils.o: ../common/common-utils.c): Remove.
2234 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2235 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2236 (vec.o: ../common/vec.c): Remove.
2237 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2238 (xml-utils.o: ../common/xml-utils.c): Remove.
2239 (ptid.o: ../common/ptid.c): Remove.
2240 (buffer.o: ../common/buffer.c): Remove.
2241 (format.o: ../common/format.c): Remove.
2242 (filestuff.o: ../common/filestuff.c): Remove.
2243 (agent.o: ../common/agent.c): Remove.
2244 (errors.o: ../common/errors.c): Remove.
2245 (environ.o: ../common/environ.c): Remove.
2246 (common-debug.o: ../common/common-debug.c): Remove.
2247 (cleanups.o: ../common/cleanups.c): Remove.
2248 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2249 (fileio.o: ../common/fileio.c): Remove.
2250 (common-regcache.o: ../common/common-regcache.c): Remove.
2251 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2252 (new-op.o: ../common/new-op.c): Remove.
2253 (btrace-common.o: ../common/btrace-common.c): Remove.
2254
21122961
SM
22552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2256
2257 * Makefile.in (%.o: ../target/%.c): New rule.
2258 (waitstatus.o: ../target/waitstatus.c): Remove.
2259
c362e621
SM
22602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2261
2262 * Makefile.in
2263 (%.c: ../regformats/%.dat,
2264 (%.c: ../regformats/arm/%.dat,
2265 (%.c: ../regformats/i386/%.dat,
2266 (%.c: ../regformats/rs6000/%.dat): New rules.
2267 (aarch64.c): Remove.
2268 (reg-arm.c): Remove.
2269 (arm-with-iwmmxt.c): Remove.
2270 (arm-with-vfpv2.c): Remove.
2271 (arm-with-vfpv3.c): Remove.
2272 (arm-with-neon.c): Remove.
2273 (reg-bfin.c): Remove.
2274 (reg-cris.c): Remove.
2275 (reg-crisv32.c): Remove.
2276 (i386.c): Remove.
2277 (i386-linux.c): Remove.
2278 (i386-avx.c): Remove.
2279 (i386-avx-linux.c): Remove.
2280 (i386-avx-avx512.c): Remove.
2281 (i386-avx-avx512-linux.c): Remove.
2282 (i386-mpx.c): Remove.
2283 (i386-mpx-linux.c): Remove.
2284 (i386-avx-mpx-avx512-pku.c): Remove.
2285 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2286 (i386-avx-mpx.c): Remove.
2287 (i386-avx-mpx-linux.c): Remove.
2288 (i386-mmx.c): Remove.
2289 (i386-mmx-linux.c): Remove.
2290 (reg-ia64.c): Remove.
2291 (reg-m32r.c): Remove.
2292 (reg-m68k.c): Remove.
2293 (reg-cf.c): Remove.
2294 (mips-linux.c): Remove.
2295 (mips-dsp-linux.c): Remove.
2296 (mips64-linux.c): Remove.
2297 (mips64-dsp-linux.c): Remove.
2298 (nios2-linux.c): Remove.
2299 (powerpc-32.c): Remove.
2300 (powerpc-32l.c): Remove.
2301 (powerpc-altivec32l.c): Remove.
2302 (powerpc-cell32l.c): Remove.
2303 (powerpc-vsx32l.c): Remove.
2304 (powerpc-isa205-32l.c): Remove.
2305 (powerpc-isa205-altivec32l.c): Remove.
2306 (powerpc-isa205-vsx32l.c): Remove.
2307 (powerpc-e500l.c): Remove.
2308 (powerpc-64l.c): Remove.
2309 (powerpc-altivec64l.c): Remove.
2310 (powerpc-cell64l.c): Remove.
2311 (powerpc-vsx64l.c): Remove.
2312 (powerpc-isa205-64l.c): Remove.
2313 (powerpc-isa205-altivec64l.c): Remove.
2314 (powerpc-isa205-vsx64l.c): Remove.
2315 (s390-linux32.c): Remove.
2316 (s390-linux32v1.c): Remove.
2317 (s390-linux32v2.c): Remove.
2318 (s390-linux64.c): Remove.
2319 (s390-linux64v1.c): Remove.
2320 (s390-linux64v2.c): Remove.
2321 (s390-te-linux64.c): Remove.
2322 (s390-vx-linux64.c): Remove.
2323 (s390-tevx-linux64.c): Remove.
2324 (s390x-linux64.c): Remove.
2325 (s390x-linux64v1.c): Remove.
2326 (s390x-linux64v2.c): Remove.
2327 (s390x-te-linux64.c): Remove.
2328 (s390x-vx-linux64.c): Remove.
2329 (s390x-tevx-linux64.c): Remove.
2330 (tic6x-c64xp-linux.c): Remove.
2331 (tic6x-c64x-linux.c): Remove.
2332 (tic6x-c62x-linux.c): Remove.
2333 (reg-sh.c): Remove.
2334 (reg-sparc64.c): Remove.
2335 (reg-spu.c): Remove.
2336 (amd64.c): Remove.
2337 (amd64-linux.c): Remove.
2338 (amd64-avx.c): Remove.
2339 (amd64-avx-linux.c): Remove.
2340 (amd64-avx-avx512.c): Remove.
2341 (amd64-avx-avx512-linux.c): Remove.
2342 (amd64-mpx.c): Remove.
2343 (amd64-mpx-linux.c): Remove.
2344 (amd64-avx-mpx-avx512-pku.c): Remove.
2345 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2346 (amd64-avx-mpx.c): Remove.
2347 (amd64-avx-mpx-linux.c): Remove.
2348 (x32.c): Remove.
2349 (x32-linux.c): Remove.
2350 (x32-avx.c): Remove.
2351 (x32-avx-linux.c): Remove.
2352 (x32-avx-avx512.c): Remove.
2353 (x32-avx-avx512-linux.c): Remove.
2354 (reg-xtensa.c): Remove.
2355 (reg-tilegx.c): Remove.
2356 (reg-tilegx32.c): Remove.
2357
1672e0d9
SDJ
23582017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2359
2360 * Makefile.in (SFILES): Add "common/environ.c".
2361 (OBJS): Add "common/environ.h".
2362
239b6d10
WT
23632017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2364
2365 * configure.ac: Check if the fs_base and gs_base members of
2366 `struct user_regs_struct' exist.
2367 * config.in: Regenerated.
2368 * configure: Likewise.
2369
694b382c
AT
23702017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2373 target_read_memory.
2374 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2375 (get_next_pcs_syscall_next_pc): Likewise.
2376
7dc53023
LM
23772016-12-23 Luis Machado <lgustavo@codesourcery.com>
2378
2379 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2380 * nto-x86-low.c: Likewise.
2381
ad02e4fe
SM
23822016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2383
2384 * Makefile.in: Include disable-implicit-rules.mk.
2385
dcb07cfa
PA
23862016-11-23 Pedro Alves <palves@redhat.com>
2387
2388 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2389 (debug_vprintf): Use std::chrono::steady_clock instead of
2390 gettimeofday. Use '.' instead of ':'.
2391 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2392 (get_timestamp): Use std::chrono::steady_clock instead of
2393 gettimeofday.
2394
8629c02c
SM
23952016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2396
2397 * Makefile.in: Fix whitespace formatting.
2398
b593ecca
SM
23992016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2400
2401 * Makefile.in (SFILES, OBS): Flatten list and order
2402 alphabetically.
2403
9986ba08
PA
24042016-11-23 Pedro Alves <palves@redhat.com>
2405
2406 * event-loop.c (handle_file_event): Use warning.
2407 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2408 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2409 Use warning.
2410
4eefa7bc
PA
24112016-11-23 Pedro Alves <palves@redhat.com>
2412
2413 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2414 output.
2415 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2416 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2417 debug_printf and debug_flush for debug output.
2418 * server.c (handle_general_set): Likewise.
2419 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2420 output.
2421
5443506e
SM
24222016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 * Makefile.in (.c.o): Replace rule with ...
2425 (%.o: %.c): ... this one.
2426
3b165252
SM
24272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2428
2429 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2430 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2431 make.
2432 * configure.ac: Remove checks for the make program.
2433 * configure: Re-generate.
2434
0bcda685
PA
24352016-10-28 Pedro Alves <palves@redhat.com>
2436
2437 * Makefile.in (CXX_DIALECT): Get from configure.
2438 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2439 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2440 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2441 * config.in: Regenerate.
2442 * configure: Regenerate.
2443
c3805894
YQ
24442016-10-27 Yao Qi <yao.qi@linaro.org>
2445
2446 * linux-low.c (linux_supports_range_stepping): Return true if
2447 can_software_single_step return true.
2448
89342618
YQ
24492016-10-27 Yao Qi <yao.qi@linaro.org>
2450
2451 * inferiors.c (find_inferior_in_random): New function.
2452 * inferiors.h (find_inferior_in_random): Declare.
2453 * linux-low.c (linux_wait_for_event_filtered): Call
2454 find_inferior_in_random instead of find_inferior.
2455
e3652c84
YQ
24562016-10-27 Yao Qi <yao.qi@linaro.org>
2457
2458 * linux-low.c (linux_wait_1): If single-step breakpoints are
2459 inserted, remove them.
2460
5a04c4cf
PA
24612016-10-26 Pedro Alves <palves@redhat.com>
2462
2463 * linux-low.c (handle_extended_wait): Link parent/child fork
2464 threads.
2465 (linux_wait_1): Unlink them.
2466 (linux_set_resume_request): Ignore resume requests for
2467 already-resumed and unhandled fork child threads.
2468 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2469 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2470 New functions.
2471 (handle_v_requests) <vCont>: Don't call require_running.
2472 * server.h (in_queued_stop_replies): New declaration.
2473
cb93dc7f
YQ
24742016-10-24 Yao Qi <yao.qi@linaro.org>
2475
2476 PR server/20733
2477 * linux-aarch64-low.c (append_insns): Cast the return value to
2478 'uint32_t *'.
2479
a1078bea
YQ
24802016-10-10 Yao Qi <yao.qi@linaro.org>
2481
2482 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2483
1fb77080
SDJ
24842016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2485
2486 * target.c (target_supports_multi_process): New function, moved
2487 from...
2488 * target.h (target_supports_multi_process): ... here. Remove
2489 macro.
2490
39b5a3b9
TT
24912016-10-05 Tom Tromey <tom@tromey.com>
2492
2493 PR remote/20655:
2494 * tracepoint.c (handle_tracepoint_bkpts): Check
2495 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2496
c1d0b70a
YQ
24972016-10-05 Yao Qi <yao.qi@linaro.org>
2498
2499 * configure.srv: Update the path of arm-*.xml files.
2500
0a69eedb
YQ
25012016-10-05 Terry Guo <terry.guo@arm.com>
2502 Yao Qi <yao.qi@linaro.org>
2503
2504 * Makefile.in: Adjust the path of rules.
2505 * configure.srv: Update the path of xml files.
2506 * regformats/arm-with-iwmmxt.dat: Regenerated.
2507 * regformats/arm-with-neon.dat: Likewise.
2508 * regformats/arm-with-vfpv2.dat: Likewise.
2509 * regformats/arm-with-vfpv3.dat Likewise.
2510
17e16485
YQ
25112016-09-30 Yao Qi <yao.qi@linaro.org>
2512
2513 PR gdbserver/20627
2514 * target.c (target_stop_and_wait): Don't call
2515 target_continue_no_signal, use resume_stop instead.
2516
edeeb602
YQ
25172016-09-26 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-low.c (linux_wait_1): Call debug_exit.
2520
503b1c39
PA
25212016-09-23 Pedro Alves <palves@redhat.com>
2522
2523 * Makefile.in (SFILES): Add common/new-op.c.
2524 (OBS): Add common/new-op.o.
2525 (new-op.o): New rule.
2526
74172ecf
SM
25272016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2528
2529 * .gitinore: Ignore more files.
2530
fc6cda2e
YQ
25312016-09-21 Yao Qi <yao.qi@linaro.org>
2532
2533 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2534 23.
2535
bc1e6c81
SDJ
25362016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2537
2538 * server.c (start_inferior): Call target_mourn_inferior instead of
2539 mourn_inferior; pass ptid_t argument to it.
2540 (resume): Likewise.
2541 (handle_target_event): Likewise.
2542 * target.c (target_mourn_inferior): New function.
2543 * target.h (mourn_inferior): Delete macro.
2544
0e00e962
AA
25452016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2546
2547 * linux-low.c (lwp_is_stepping): New function.
2548
1d8cb77d
CL
25492016-09-06 Carl Love <cel@us.ibm.com>
2550
2551 * server.c (start_inferior): Fixed comment, requested comment change
2552 didn't get updated correctly. Removed reference to ptrace () call as
2553 it is only true on Linux systems.
2554
7313bced
CL
25552016-09-06 Carl Love <cel@us.ibm.com>
2556
2557 * server.c (start_inferior): Do not call
2558 function target_post_create_inferior () if the
2559 inferior process has already exited.
2560
cf6de44d
PA
25612016-09-05 Pedro Alves <palves@redhat.com>
2562
2563 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2564 (COMPILE.pre, CC_LD): Use CXX directly.
2565 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2566 * acinclude.m4: Don't include build-with-cxx.m4.
2567 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2568 * configure: Regenerate.
2569
c1da6748
AT
25702016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2571
2572 PR gdb/19495
2573 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2574 call writing data to own_buf.
2575
f2b9e3df
SDJ
25762016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2577
2578 * target.c (mywait): Call target_wait instead of
2579 the_target->wait.
2580 (target_wait): New function.
2581
049a8570
SDJ
25822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2583
2584 * server.c (start_inferior): New variable 'ptid'. Replace calls
2585 to the_target->resume by target_continue{,_no_signal}, depending
2586 on the case.
2587 * target.c (target_stop_and_wait): Call target_continue_no_signal
2588 instead of the_target->resume.
2589 (target_continue): New function.
2590
3aa5cfa0
AT
25912016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2592
2593 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2594
754653a7
AZ
25952016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2596
2597 PR server/20491
2598 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2599 ps_prochandle.
2600 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2601 * linux-arm-low.c (ps_get_thread_area): Likewise.
2602 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2603 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2604 * linux-mips-low.c (ps_get_thread_area): Likewise.
2605 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2606 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2607 * linux-x86-low.c (ps_get_thread_area): Likewise.
2608 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2609
ed036b40
PA
26102016-08-19 Pedro Alves <palves@redhat.com>
2611
2612 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2613
c8ef42ee
PA
26142016-08-19 Pedro Alves <palves@redhat.com>
2615
2616 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2617 comment. Use memcpy instead of casting through unsigned long.
2618
9c235a72
PA
26192016-08-19 Pedro Alves <palves@redhat.com>
2620
2621 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2622 allocating around 0x80000000.
2623
201506da
PA
26242016-08-19 Pedro Alves <palves@redhat.com>
2625
2626 PR gdb/20415
2627 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2628 (x32-avx512-linux-ipa.o): New rules.
2629 * configure.ac (x86_64-*-linux*): New x32 check.
2630 * configure.srv (ipa_x32_linux_regobj): New.
2631 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2632 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2633 descriptions.
2634 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2635 descriptions.
2636 * configure: Regenerate.
2637
f348d89a
PA
26382016-08-09 Pedro Alves <palves@redhat.com>
2639
2640 PR gdb/18653
2641 * Makefile.in (OBS): Add signals-state-save-restore.o.
2642 (signals-state-save-restore.o): New rule.
2643 * config.in: Regenerate.
2644 * configure: Regenerate.
2645 * linux-low.c: Include "signals-state-save-restore.h".
2646 (linux_create_inferior): Call
2647 restore_original_signals_state.
2648 * server.c: Include "dispositions-save-restore.h".
2649 (captured_main): Call save_original_signals_state.
2650
1baf5149
PA
26512016-08-05 Pedro Alves <palves@redhat.com>
2652
2653 * configure: Regenerate.
2654
fcd4a73d
YQ
26552016-08-04 Yao Qi <yao.qi@linaro.org>
2656
2657 * linux-low.c (regsets_fetch_inferior_registers): Check
2658 errno is ESRCH or not.
2659
979659d0
YQ
26602016-08-02 Yao Qi <yao.qi@linaro.org>
2661
2662 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2663 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2664 (thread_db_load_search): Update.
2665 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2666 td_ta_set_event and td_ta_event_getmsg.
2667
6598661d
PA
26682016-07-26 Pedro Alves <palves@redhat.com>
2669
2670 PR server/20414
2671 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2672 of unsigned long for 64-bit registers and use uint32_t instead of
2673 unsigned int for 32-bit registers.
2674
9cf12d57
PA
26752016-07-26 Pedro Alves <palves@redhat.com>
2676
2677 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2678 to 'ptrace'.
2679
305450ed
TT
26802016-07-21 Tom Tromey <tom@tromey.com>
2681
2682 * configure: Rebuild.
2683
2583da7c
YQ
26842016-07-21 Yao Qi <yao.qi@linaro.org>
2685
2686 * mem-break.c (find_gdb_breakpoint): Cast bp to
2687 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2688
21536b36
YQ
26892016-07-21 Yao Qi <yao.qi@linaro.org>
2690
2691 * server.c (handle_v_requests): Support s and S actions
2692 if target_supports_software_single_step return true.
2693
8901d193
YQ
26942016-07-21 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2697 is resume_step, call maybe_hw_step.
2698 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2699 and unstop them.
2700 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2701 breakpoints or not.
2702 (proceed_one_lwp): If resume request is resume_step, install
2703 reinsert breakpoints and call maybe_hw_step.
2704
0e9a339e
YQ
27052016-07-21 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-low.c (proceed_one_lwp): Declare.
2708 (linux_resume_one_thread): Remove local variable 'step'.
2709 Lift code enqueue signal. Call proceed_one_lwp instead of
2710 linux_resume_one_lwp.
2711
4281b351
YQ
27122016-07-21 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-low.c (linux_resume_one_thread): Call
2715 enqueue_pending_signal.
2716
984a2c04
YQ
27172016-07-21 Yao Qi <yao.qi@linaro.org>
2718
2719 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2720 * inferiors.c (do_restore_current_thread_cleanup): New function.
2721 (make_cleanup_restore_current_thread): Likewise.
2722 * linux-low.c (install_software_single_step_breakpoints): Call
2723 make_cleanup_restore_current_thread. Switch current_thread to
2724 thread.
2725
bec903c9
YQ
27262016-07-21 Yao Qi <yao.qi@linaro.org>
2727
2728 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2729 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2730 (clone_one_breakpoint): Likewise.
2731 (delete_reinsert_breakpoints): Change parameter to thread.
2732 Callers updated.
2733 (has_reinsert_breakpoints): Likewise.
2734 (uninsert_reinsert_breakpoints): Likewise.
2735 (reinsert_reinsert_breakpoints): Likewise.
2736 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2737 (delete_reinsert_breakpoints): Likewise.
2738 (reinsert_reinsert_breakpoints): Likewise.
2739 (uninsert_reinsert_breakpoints): Likewise.
2740 (has_reinsert_breakpoints): Likewise.
2741
63c40ec7
YQ
27422016-07-21 Yao Qi <yao.qi@linaro.org>
2743
2744 * inferiors.c (get_thread_process): Make parameter const.
2745 * inferiors.h (get_thread_process): Update declaration.
2746 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2747 Add new parameters child_thread and parent_thread. Callers
2748 updated.
2749 * mem-break.h (clone_all_breakpoints): Update declaration.
2750
9aa76cd0
YQ
27512016-07-21 Yao Qi <yao.qi@linaro.org>
2752
2753 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2754 <command_list, handler>: Remove.
2755 (struct gdb_breakpoint): New.
2756 (struct other_breakpoint): New.
2757 (struct reinsert_breakpoint): New.
2758 (is_gdb_breakpoint): New function.
2759 (any_persistent_commands): Update command_list if
2760 is_gdb_breakpoint returns true.
2761 (set_breakpoint): Create breakpoints according to their types.
2762 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2763 (set_gdb_breakpoint_1): Likewise.
2764 (set_gdb_breakpoint): Likewise.
2765 (clear_breakpoint_conditions): Change parameter type to
2766 'struct gdb_breakpoint *'.
2767 (clear_breakpoint_commands): Likewise.
2768 (clear_breakpoint_conditions_and_commands): Likewise.
2769 (add_condition_to_breakpoint): Likewise.
2770 (add_breakpoint_condition): Likewise.
2771 (add_commands_to_breakpoint): Likewise.
2772 (check_breakpoints): Check other_breakpoint.
2773 (clone_one_breakpoint): Clone breakpopint according to its type.
2774 * mem-break.h (struct gdb_breakpoint): Declare.
2775 (set_gdb_breakpoint): Update declaration.
2776 (clear_breakpoint_conditions_and_commands): Likewise.
2777 (add_breakpoint_condition): Likewise.
2778 (add_breakpoint_commands): Likewise.
2779 * server.c (process_point_options): Change parameter type to
2780 'struct gdb_breakpoint *'.
2781
811f8301
YQ
27822016-07-21 Yao Qi <yao.qi@linaro.org>
2783
2784 * mem-break.c (set_breakpoint_at): Rename it to ...
2785 (set_breakpoint_type_at): ... it.
2786 (set_breakpoint_at): Call set_breakpoint_type_at.
2787 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2788 * mem-break.h (set_breakpoint_at): Update comments.
2789
b1c51e36
CLT
27902016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2791
2792 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2793 to buf parameter.
2794 (nios2_store_gregset): Likewise.
2795
ced2dffb
PA
27962016-07-01 Pedro Alves <palves@redhat.com>
2797 Antoine Tremblay <antoine.tremblay@ericsson.com>
2798
2799 * linux-low.c: Change interface to take the target lwp_info
2800 pointer directly and return void. Handle detaching from a zombie
2801 thread.
2802 (linux_detach_lwp_callback): New function.
2803 (linux_detach): Detach from the leader thread after detaching from
2804 the clone threads.
2805
2ac09a5b
YQ
28062016-06-28 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2809 for variable new_offset.
2810 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2811 (aarch64_ftrace_insn_reloc_cb): Likewise.
2812 (aarch64_ftrace_insn_reloc_tb): Likewise.
2813 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2814 PRIx64 instead of PRIx32.
2815
79e7fd4f
YQ
28162016-06-28 Yao Qi <yao.qi@linaro.org>
2817
2818 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2819 (the_low_target): Install arm_get_syscall_trapinfo.
2820
061fc021
YQ
28212016-06-28 Yao Qi <yao.qi@linaro.org>
2822
2823 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2824 function.
2825 (the_low_target): Install aarch64_get_syscall_trapinfo.
2826
4cc32bec
YQ
28272016-06-28 Yao Qi <yao.qi@linaro.org>
2828
2829 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2830 Callers updated.
2831 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2832 Remove parameter sysno.
2833 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2834 sysret.
2835
782c1122
AA
28362016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2837
2838 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2839 (s390_emit_ne_goto): Likewise.
2840 (s390_emit_lt_goto): Likewise.
2841 (s390_emit_le_goto): Likewise.
2842 (s390_emit_gt_goto): Likewise.
2843 (s390_emit_ge_goto): Likewise.
2844 (s390x_emit_eq_goto): Likewise.
2845 (s390x_emit_ne_goto): Likewise.
2846 (s390x_emit_lt_goto): Likewise.
2847 (s390x_emit_le_goto): Likewise.
2848 (s390x_emit_gt_goto): Likewise.
2849 (s390x_emit_ge_goto): Likewise.
2850 (s390_emit_ops_impl): Mark variable static.
2851 (s390x_emit_ops): Likewise.
2852
2e7b624b
YQ
28532016-06-17 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-low.c (handle_extended_wait): Call
2856 uninsert_reinsert_breakpoints for the parent process. Remove
2857 reinsert breakpoints from the child process. Reinsert them to
2858 the parent process when vfork is done.
2859 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2860 (reinsert_reinsert_breakpoints): New function.
2861 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2862 (reinsert_reinsert_breakpoints): Declare.
2863
8a81c5d7
YQ
28642016-06-17 Yao Qi <yao.qi@linaro.org>
2865
2866 * linux-low.c (handle_extended_wait): If the parent is doing
2867 step-over, remove the reinsert breakpoints from the forked child.
2868
f50bf8e5
YQ
28692016-06-17 Yao Qi <yao.qi@linaro.org>
2870
2871 * linux-low.c (unsuspend_all_lwps): Declare.
2872 (linux_low_filter_event): If thread exited, call finish_step_over.
2873 If step-over is finished, unsuspend other threads.
2874
8376a3cb
YQ
28752016-06-17 Yao Qi <yao.qi@linaro.org>
2876
2877 * linux-low.c (linux_resume_one_lwp_throw): Assert
2878 has_reinsert_breakpoints returns false.
2879 * mem-break.c (delete_disabled_breakpoints): Assert
2880 bp type isn't reinsert_breakpoint.
2881
f79b145d
YQ
28822016-06-17 Yao Qi <yao.qi@linaro.org>
2883
2884 * linux-low.c (maybe_hw_step): New function.
2885 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2886 (finish_step_over): Switch current_thread to lwp temporarily,
2887 and assert has_reinsert_breakpoints returns true.
2888 (proceed_one_lwp): Call maybe_hw_step.
2889 * mem-break.c (has_reinsert_breakpoints): New function.
2890 * mem-break.h (has_reinsert_breakpoints): Declare.
2891
0ae534d2
JT
28922016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2893
2894 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2895
fcdad592
YQ
28962016-05-17 Yao Qi <yao.qi@linaro.org>
2897
2898 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2899 instead of find_inferior.
2900
9e784964
YQ
29012016-05-05 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2904 Initialize res to zero.
2905
cf2ebb6e
YQ
29062016-05-05 Yao Qi <yao.qi@linaro.org>
2907
2908 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2909 to uint32_t.
2910
c1aebf87
UW
29112016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2912
2913 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2914 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2915 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2916
35fd2deb 29172016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2918 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2919
2920 * tracepoint.c (write_inferior_int8): New function.
2921 (cmd_qtenable_disable): Write enable flag using
2922 write_inferior_int8.
2923
484b3c32
YQ
29242016-04-25 Yao Qi <yao.qi@linaro.org>
2925
2926 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2927 (need_step_over_p): Return zero if the LWP has pending signals
2928 can be delivered on software single step target.
2929
85ba7d86
YQ
29302016-04-25 Yao Qi <yao.qi@linaro.org>
2931
2932 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2933 return instead of error.
2934
3539aa13
YQ
29352016-04-22 Yao Qi <yao.qi@linaro.org>
2936
2937 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2938 to 23.
2939
5b061e98
YQ
29402016-04-22 Yao Qi <yao.qi@linaro.org>
2941
2942 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2943 signal when stepping over breakpoint with software single
2944 step.
2945
3451269c
PA
29462016-04-21 Pedro Alves <palves@redhat.com>
2947
2948 * linux-s390-low.c (s390_collect_ptrace_register)
2949 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2950 add casts.
2951 (s390_check_regset): Use void * instead of gdb_byte *.
2952
a2358508
PA
29532016-04-20 Pedro Alves <palves@redhat.com>
2954
2955 * configure: Renegerate.
2956
6885166d
YQ
29572016-04-20 Yao Qi <yao.qi@linaro.org>
2958
2959 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2960 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2961 number 16.
2962 (arm_store_gregset): Likewise.
2963
2b863f51
WT
29642016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2965
2966 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2967 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2968 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2969 (amd64-avx-mpx-linux.c): New rules.
2970 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2971 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2972 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2973 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2974 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2975 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2976 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2977 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2978 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2979 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2980 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2981 * linux-x86-low.c (x86_linux_read_description): Add case for
2982 X86_XSTATE_AVX_MPX_MASK.
2983 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2984 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2985 init_registers_i386_avx_mpx_linux.
2986 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2987 (initialize_low_tracepoint): Call
2988 init_registers_i386_avx_mpx_linux.
2989 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2990 (initialize_low_tracepoint): Call
2991 init_registers_amd64_avx_mpx_linux.
2992 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2993 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2994 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2995 declarations.
2996
9b30624b
PA
29972016-04-18 Pedro Alves <palves@redhat.com>
2998
2999 * configure: Regenerate.
3000
45e3745e
AT
30012016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3002
3003 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3004 (aarch64_emit_sub): Likewise.
3005
2afc13ff
PA
30062016-04-12 Pedro Alves <palves@redhat.com>
3007
3008 * utils.c (prepare_to_throw_exception): Delete.
3009
6e774b13
SM
30102016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3011
3012 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3013
4dca19f8
MK
30142016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3015
3016 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3017
d0a9981f
MK
30182016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3019
3020 * linux-aarch64-ipa.c: Add <elf.h> include.
3021 * linux-ppc-ipa.c: Add <elf.h> include.
3022 * linux-s390-ipa.c: Add <elf.h> include.
3023
252db07e
MK
30242016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3025
3026 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3027 (get_raw_reg_ptr): Likewise.
3028 (get_trace_state_variable_value_ptr): Likewise.
3029 (set_trace_state_variable_value_ptr): Likewise.
3030 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3031 char *.
3032
14e2b6d9
MK
30332016-03-31 Wei-cheng Wang <cole945@gmail.com>
3034 Marcin Kościelnicki <koriakin@0x04.net>
3035
3036 PR/17221
3037 * linux-ppc-low.c (emit_insns): New function.
3038 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3039 (ppc_emit_prologue): New function.
3040 (ppc_emit_epilogue): New function.
3041 (ppc_emit_add): New function.
3042 (ppc_emit_sub): New function.
3043 (ppc_emit_mul): New function.
3044 (ppc_emit_lsh): New function.
3045 (ppc_emit_rsh_signed): New function.
3046 (ppc_emit_rsh_unsigned): New function.
3047 (ppc_emit_ext): New function.
3048 (ppc_emit_zero_ext): New function.
3049 (ppc_emit_log_not): New function.
3050 (ppc_emit_bit_and): New function.
3051 (ppc_emit_bit_or): New function.
3052 (ppc_emit_bit_xor): New function.
3053 (ppc_emit_bit_not): New function.
3054 (ppc_emit_equal): New function.
3055 (ppc_emit_less_signed): New function.
3056 (ppc_emit_less_unsigned): New function.
3057 (ppc_emit_ref): New function.
3058 (ppc_emit_const): New function.
3059 (ppc_emit_reg): New function.
3060 (ppc_emit_pop): New function.
3061 (ppc_emit_stack_flush): New function.
3062 (ppc_emit_swap): New function.
3063 (ppc_emit_stack_adjust): New function.
3064 (ppc_emit_call): New function.
3065 (ppc_emit_int_call_1): New function.
3066 (ppc_emit_void_call_2): New function.
3067 (ppc_emit_if_goto): New function.
3068 (ppc_emit_goto): New function.
3069 (ppc_emit_eq_goto): New function.
3070 (ppc_emit_ne_goto): New function.
3071 (ppc_emit_lt_goto): New function.
3072 (ppc_emit_le_goto): New function.
3073 (ppc_emit_gt_goto): New function.
3074 (ppc_emit_ge_goto): New function.
3075 (ppc_write_goto_address): New function.
3076 (ppc_emit_ops_impl): New static variable.
3077 (ppc64v1_emit_prologue): New function.
3078 (ppc64v2_emit_prologue): New function.
3079 (ppc64_emit_epilogue): New function.
3080 (ppc64_emit_add): New function.
3081 (ppc64_emit_sub): New function.
3082 (ppc64_emit_mul): New function.
3083 (ppc64_emit_lsh): New function.
3084 (ppc64_emit_rsh_signed): New function.
3085 (ppc64_emit_rsh_unsigned): New function.
3086 (ppc64_emit_ext): New function.
3087 (ppc64_emit_zero_ext): New function.
3088 (ppc64_emit_log_not): New function.
3089 (ppc64_emit_bit_and): New function.
3090 (ppc64_emit_bit_or): New function.
3091 (ppc64_emit_bit_xor): New function.
3092 (ppc64_emit_bit_not): New function.
3093 (ppc64_emit_equal): New function.
3094 (ppc64_emit_less_signed): New function.
3095 (ppc64_emit_less_unsigned): New function.
3096 (ppc64_emit_ref): New function.
3097 (ppc64_emit_const): New function.
3098 (ppc64v1_emit_reg): New function.
3099 (ppc64v2_emit_reg): New function.
3100 (ppc64_emit_pop): New function.
3101 (ppc64_emit_stack_flush): New function.
3102 (ppc64_emit_swap): New function.
3103 (ppc64v1_emit_call): New function.
3104 (ppc64v2_emit_call): New function.
3105 (ppc64v1_emit_int_call_1): New function.
3106 (ppc64v2_emit_int_call_1): New function.
3107 (ppc64v1_emit_void_call_2): New function.
3108 (ppc64v2_emit_void_call_2): New function.
3109 (ppc64_emit_if_goto): New function.
3110 (ppc64_emit_eq_goto): New function.
3111 (ppc64_emit_ne_goto): New function.
3112 (ppc64_emit_lt_goto): New function.
3113 (ppc64_emit_le_goto): New function.
3114 (ppc64_emit_gt_goto): New function.
3115 (ppc64_emit_ge_goto): New function.
3116 (ppc64v1_emit_ops_impl): New static variable.
3117 (ppc64v2_emit_ops_impl): New static variable.
3118 (ppc_emit_ops): New function.
3119 (linux_low_target): Wire in ppc_emit_ops.
3120
a2174ba4
MK
31212016-03-31 Wei-cheng Wang <cole945@gmail.com>
3122 Marcin Kościelnicki <koriakin@0x04.net>
3123
3124 PR/17221
3125 * Makefile.in: Add powerpc-*-ipa.o
3126 * configure.srv: Add ipa_obj for powerpc*-linux.
3127 * linux-ppc-ipa.c: New file.
3128 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3129 includes.
3130 (PPC_FIELD): New macro.
3131 (PPC_SEXT): New macro.
3132 (PPC_OP6): New macro.
3133 (PPC_BO): New macro.
3134 (PPC_LI): New macro.
3135 (PPC_BD): New macro.
3136 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3137 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3138 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3139 (ppc_get_thread_area): New function.
3140 (is_elfv2_inferior): New function.
3141 (gen_ds_form): New function.
3142 (GEN_STD): New macro.
3143 (GEN_STDU): New macro.
3144 (GEN_LD): New macro.
3145 (GEN_LDU): New macro.
3146 (gen_d_form): New function.
3147 (GEN_ADDI): New macro.
3148 (GEN_ADDIS): New macro.
3149 (GEN_LI): New macro.
3150 (GEN_LIS): New macro.
3151 (GEN_ORI): New macro.
3152 (GEN_ORIS): New macro.
3153 (GEN_LWZ): New macro.
3154 (GEN_STW): New macro.
3155 (GEN_STWU): New macro.
3156 (gen_xfx_form): New function.
3157 (GEN_MFSPR): New macro.
3158 (GEN_MTSPR): New macro.
3159 (GEN_MFCR): New macro.
3160 (GEN_MTCR): New macro.
3161 (GEN_SYNC): New macro.
3162 (GEN_LWSYNC): New macro.
3163 (gen_x_form): New function.
3164 (GEN_OR): New macro.
3165 (GEN_MR): New macro.
3166 (GEN_LWARX): New macro.
3167 (GEN_STWCX): New macro.
3168 (GEN_CMPW): New macro.
3169 (gen_md_form): New function.
3170 (GEN_RLDICL): New macro.
3171 (GEN_RLDICR): New macro.
3172 (gen_i_form): New function.
3173 (GEN_B): New macro.
3174 (GEN_BL): New macro.
3175 (gen_b_form): New function.
3176 (GEN_BNE): New macro.
3177 (GEN_LOAD): New macro.
3178 (GEN_STORE): New macro.
3179 (gen_limm): New function.
3180 (gen_atomic_xchg): New function.
3181 (gen_call): New function.
3182 (ppc_relocate_instruction): New function.
3183 (ppc_install_fast_tracepoint_jump_pad): New function.
3184 (ppc_get_min_fast_tracepoint_insn_len): New function.
3185 (ppc_get_ipa_tdesc_idx): New function.
3186 (the_low_target): Wire in the new functions.
3187 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3188 tdescs.
3189 * linux-ppc-tdesc.h: New file.
3190
a13c4696
MK
31912016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3192
3193 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3194 (alloc_jump_pad_buffer): New function.
3195 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3196 (alloc_jump_pad_buffer): New function.
3197 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3198 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3199 (alloc_jump_pad_buffer): New function.
3200 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3201 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3202 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3203 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3204
1cda1512
MK
32052016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3206
3207 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3208 * linux-amd64-ipa.c: Likewise.
3209 * linux-i386-ipa.c: Likewise.
3210 * linux-s390-ipa.c: Likewise.
3211 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3212 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3213 set_trace_state_variable_value_ptr.
3214 (struct ipa_sym_addresses): Likewise.
3215 (symbol_list): Likewise.
3216 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3217 accessing gdb_collect directly.
3218 (gdb_collect_ptr_type): New typedef.
3219 (get_raw_reg_ptr_type): New typedef.
3220 (get_trace_state_variable_value_ptr_type): New typedef.
3221 (set_trace_state_variable_value_ptr_type): New typedef.
3222 (gdb_collect_ptr): New global.
3223 (get_raw_reg_ptr): New global.
3224 (get_trace_state_variable_value_ptr): New global.
3225 (set_trace_state_variable_value_ptr): New global.
3226 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3227 accessing get_raw_reg directly.
3228 (get_get_tsv_func_addr): Likewise for
3229 get_trace_state_variable_value_ptr.
3230 (get_set_tsv_func_addr): Likewise for
3231 set_trace_state_variable_value_ptr.
3232 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3233
72fb5488
SM
32342016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3235
3236 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3237
28170b88
MK
32382016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3239
3240 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3241 packets.
3242 (relocate_instruction): Remove own_buf.
3243 * server.c (own_buf): Make global.
3244 (handle_v_requests): Make global.
3245 * server.h (own_buf): New declaration.
3246 (handle_v_requests): New prototype.
3247
f39e8743
MK
32482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3249
3250 PR 18377
3251 * linux-s390-low.c (add_insns): New function.
3252 (s390_emit_prologue): New function.
3253 (s390_emit_epilogue): New function.
3254 (s390_emit_add): New function.
3255 (s390_emit_sub): New function.
3256 (s390_emit_mul): New function.
3257 (s390_emit_lsh): New function.
3258 (s390_emit_rsh_signed): New function.
3259 (s390_emit_rsh_unsigned): New function.
3260 (s390_emit_ext): New function.
3261 (s390_emit_log_not): New function.
3262 (s390_emit_bit_and): New function.
3263 (s390_emit_bit_or): New function.
3264 (s390_emit_bit_xor): New function.
3265 (s390_emit_bit_not): New function.
3266 (s390_emit_equal): New function.
3267 (s390_emit_less_signed): New function.
3268 (s390_emit_less_unsigned): New function.
3269 (s390_emit_ref): New function.
3270 (s390_emit_if_goto): New function.
3271 (s390_emit_goto): New function.
3272 (s390_write_goto_address): New function.
3273 (s390_emit_litpool): New function.
3274 (s390_emit_const): New function.
3275 (s390_emit_call): New function.
3276 (s390_emit_reg): New function.
3277 (s390_emit_pop): New function.
3278 (s390_emit_stack_flush): New function.
3279 (s390_emit_zero_ext): New function.
3280 (s390_emit_swap): New function.
3281 (s390_emit_stack_adjust): New function.
3282 (s390_emit_set_r2): New function.
3283 (s390_emit_int_call_1): New function.
3284 (s390_emit_void_call_2): New function.
3285 (s390_emit_eq_goto): New function.
3286 (s390_emit_ne_goto): New function.
3287 (s390_emit_lt_goto): New function.
3288 (s390_emit_le_goto): New function.
3289 (s390_emit_gt_goto): New function.
3290 (s390_emit_ge_goto): New function.
3291 (s390x_emit_prologue): New function.
3292 (s390x_emit_epilogue): New function.
3293 (s390x_emit_add): New function.
3294 (s390x_emit_sub): New function.
3295 (s390x_emit_mul): New function.
3296 (s390x_emit_lsh): New function.
3297 (s390x_emit_rsh_signed): New function.
3298 (s390x_emit_rsh_unsigned): New function.
3299 (s390x_emit_ext): New function.
3300 (s390x_emit_log_not): New function.
3301 (s390x_emit_bit_and): New function.
3302 (s390x_emit_bit_or): New function.
3303 (s390x_emit_bit_xor): New function.
3304 (s390x_emit_bit_not): New function.
3305 (s390x_emit_equal): New function.
3306 (s390x_emit_less_signed): New function.
3307 (s390x_emit_less_unsigned): New function.
3308 (s390x_emit_ref): New function.
3309 (s390x_emit_if_goto): New function.
3310 (s390x_emit_const): New function.
3311 (s390x_emit_call): New function.
3312 (s390x_emit_reg): New function.
3313 (s390x_emit_pop): New function.
3314 (s390x_emit_stack_flush): New function.
3315 (s390x_emit_zero_ext): New function.
3316 (s390x_emit_swap): New function.
3317 (s390x_emit_stack_adjust): New function.
3318 (s390x_emit_int_call_1): New function.
3319 (s390x_emit_void_call_2): New function.
3320 (s390x_emit_eq_goto): New function.
3321 (s390x_emit_ne_goto): New function.
3322 (s390x_emit_lt_goto): New function.
3323 (s390x_emit_le_goto): New function.
3324 (s390x_emit_gt_goto): New function.
3325 (s390x_emit_ge_goto): New function.
3326 (s390_emit_ops): New function.
3327 (struct linux_target_ops): Fill in emit_ops hook.
3328
abd9baf9
MK
33292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3330
3331 PR 18377
3332 * Makefile.in: Add s390 IPA files.
3333 * configure.srv: Build IPA for s390.
3334 * linux-s390-ipa.c: New file.
3335 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3336 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3337 (tdesc_s390_linux32): Likewise.
3338 (init_registers_s390_linux32v1): Likewise.
3339 (tdesc_s390_linux32v1): Likewise.
3340 (init_registers_s390_linux32v2): Likewise.
3341 (tdesc_s390_linux32v2): Likewise.
3342 (init_registers_s390_linux64): Likewise.
3343 (tdesc_s390_linux64): Likewise.
3344 (init_registers_s390_linux64v1): Likewise.
3345 (tdesc_s390_linux64v1): Likewise.
3346 (init_registers_s390_linux64v2): Likewise.
3347 (tdesc_s390_linux64v2): Likewise.
3348 (init_registers_s390_te_linux64): Likewise.
3349 (tdesc_s390_te_linux64): Likewise.
3350 (init_registers_s390_vx_linux64): Likewise.
3351 (tdesc_s390_vx_linux64): Likewise.
3352 (init_registers_s390_tevx_linux64): Likewise.
3353 (tdesc_s390_tevx_linux64): Likewise.
3354 (init_registers_s390x_linux64): Likewise.
3355 (tdesc_s390x_linux64): Likewise.
3356 (init_registers_s390x_linux64v1): Likewise.
3357 (tdesc_s390x_linux64v1): Likewise.
3358 (init_registers_s390x_linux64v2): Likewise.
3359 (tdesc_s390x_linux64v2): Likewise.
3360 (init_registers_s390x_te_linux64): Likewise.
3361 (tdesc_s390x_te_linux64): Likewise.
3362 (init_registers_s390x_vx_linux64): Likewise.
3363 (tdesc_s390x_vx_linux64): Likewise.
3364 (init_registers_s390x_tevx_linux64): Likewise.
3365 (tdesc_s390x_tevx_linux64): Likewise.
3366 (have_hwcap_s390_vx): New static variable.
3367 (s390_arch_setup): Fill have_hwcap_s390_vx.
3368 (s390_get_thread_area): New function.
3369 (s390_ft_entry_gpr_esa): New const.
3370 (s390_ft_entry_gpr_zarch): New const.
3371 (s390_ft_entry_misc): New const.
3372 (s390_ft_entry_fr): New const.
3373 (s390_ft_entry_vr): New const.
3374 (s390_ft_main_31): New const.
3375 (s390_ft_main_64): New const.
3376 (s390_ft_exit_fr): New const.
3377 (s390_ft_exit_vr): New const.
3378 (s390_ft_exit_misc): New const.
3379 (s390_ft_exit_gpr_esa): New const.
3380 (s390_ft_exit_gpr_zarch): New const.
3381 (append_insns): New function.
3382 (s390_relocate_instruction): New function.
3383 (s390_install_fast_tracepoint_jump_pad): New function.
3384 (s390_get_min_fast_tracepoint_insn_len): New function.
3385 (s390_get_ipa_tdesc_idx): New function.
3386 (struct linux_target_ops): Wire in the above functions.
3387 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3388 * linux-s390-tdesc.h: New file.
3389
a4105d04
MK
33902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3391
3392 * linux-s390-low.c (s390_supports_tracepoints): New function.
3393 (struct linux_target_ops): Fill supports_tracepoints hook.
3394
35ac8b3e
YQ
33952016-03-18 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-low.c (lwp_signal_can_be_delivered): New function.
3398 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3399
94610ec4
YQ
34002016-03-18 Yao Qi <yao.qi@linaro.org>
3401
3402 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3403 0 if signal is enqueued. Remove 'signal' from one debugging
3404 message. Move one debugging message to some lines below.
3405 Remove code setting 'signal' to 0.
3406
80aea927
YQ
34072016-03-18 Yao Qi <yao.qi@linaro.org>
3408
3409 * linux-low.c (linux_low_filter_event): Remove redundant
3410 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3411
b04fd3be
MK
34122016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3413
3414 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3415 (struct linux_target_ops): Wire in the above.
3416
c40c8d4b
YQ
34172016-03-03 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-low.c: Update comments to start_step_over.
3420
0f8288ae
YQ
34212016-03-03 Yao Qi <yao.qi@linaro.org>
3422
3423 PR server/19736
3424 * linux-low.c (handle_extended_wait): Set child suspended
3425 if event_lwp->bp_reinsert isn't zero.
3426
fdbd04a8
YQ
34272016-03-02 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3430 enqueue_pending_signal.
3431
6896a8fa
MK
34322016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3433
3434 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3435 is actually loaded.
3436
ab503087
MK
34372016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3438
3439 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3440 (s390_regmap_3264) [!__s390x__]: New global.
3441 (s390_collect_ptrace_register): Skip map entries containing -1.
3442 (s390_supply_ptrace_register): Ditto.
3443 (s390_fill_gprs_high): New function.
3444 (s390_store_gprs_high): New function.
3445 (s390_regsets): Add NT_S390_HIGH_GPRS.
3446 (s390_get_hwcap): Enable on 31-bit.
3447 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3448 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3449 Detect NT_S390_HIGH_GPRS.
3450 (s390_usrregs_info_3264): Enable on 31-bit.
3451 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3452 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3453
ae91f625
MK
34542016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3455
3456 PR gdb/13808
3457 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3458 * configure.srv: Ditto.
3459 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3460 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3461 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3462 (init_registers_amd64_linux): Remove prototype.
3463 (tdesc_amd64_linux): Remove declaration.
3464 (get_ipa_tdesc): New function.
3465 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3466 initialize remaining tdescs.
3467 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3468 (init_registers_i386_linux): Remove prototype.
3469 (tdesc_i386_linux): Remove declaration.
3470 (get_ipa_tdesc): New function.
3471 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3472 initialize remaining tdescs.
3473 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3474 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3475 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3476 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3477 (x86_get_ipa_tdesc_idx): New function.
3478 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3479 * linux-x86-tdesc.h: New file.
3480 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3481 (target_get_ipa_tdesc_idx): New macro.
3482 * tracepoint.c (ipa_tdesc_idx): New macro.
3483 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3484 (symbol_list): Add ipa_tdesc_idx.
3485 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3486 (ipa_tdesc): Remove.
3487 (ipa_tdesc_idx): New variable.
3488 (get_context_regcache): Use get_ipa_tdesc.
3489 (gdb_collect): Ditto.
3490 (gdb_probe): Ditto.
3491 * tracepoint.h (get_ipa_tdesc): New prototype.
3492 (ipa_tdesc): Remove.
3493
e7ad2f14
PA
34942016-02-24 Pedro Alves <palves@redhat.com>
3495
3496 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3497 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3498 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3499 Factor out common code between the USE_SIGTRAP_SIGINFO and
3500 !USE_SIGTRAP_SIGINFO blocks.
3501 (linux_low_filter_event): Call save_stop_reason instead of
3502 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3503 Update comments.
3504 (linux_wait_1): Update comments.
3505
657f9cde
WW
35062016-02-24 Wei-cheng Wang <cole945@gmail.com>
3507
3508 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3509 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3510 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3511 ppc_insert_point, ppc_remove_point.
3512
b00b61e1
MK
35132016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3514
3515 * linux-s390-low.c (s390_supports_z_point_type): New function.
3516 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3517
553cb527
YQ
35182016-02-16 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3521 PC. Get pc from regcache_read_pc.
3522
a5652c21
YQ
35232016-02-12 Yao Qi <yao.qi@linaro.org>
3524
3525 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3526 or linux_get_pc_32bit.
3527 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3528
ed443b61
YQ
35292016-02-12 Yao Qi <yao.qi@linaro.org>
3530
3531 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3532 arm_linux_get_next_pcs_fixup.
3533
020ecd38
MK
35342016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3535
3536 * tracepoint.c (x_tracepoint_action_download): Change
3537 write_inferior_data_ptr to write_inferior_data_pointer.
3538 (cmd_qtstart): Likewise.
3539 (write_inferior_data_ptr): Remove.
3540 (download_agent_expr): Change write_inferior_data_ptr to
3541 write_inferior_data_pointer.
3542 (download_tracepoint_1): Likewise.
3543 (download_tracepoint): Likewise.
3544 (download_trace_state_variables): Likewise.
3545
7cae9051
WW
35462016-02-11 Wei-cheng Wang <cole945@gmail.com>
3547 Marcin Kościelnicki <koriakin@0x04.net>
3548
3549 * tracepoint.c (struct tracepoint_action_ops): Remove.
3550 (struct tracepoint_action): Remove ops.
3551 (m_tracepoint_action_download, r_tracepoint_action_download)
3552 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3553 size and offset accordingly.
3554 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3555 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3556 (tracepoint_action_send, tracepoint_action_download): New functions.
3557 Helpers for trace action handlers.
3558 (add_tracepoint_action): Remove setup actions ops.
3559 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3560
9f6a71b4
YQ
35612016-02-10 Yao Qi <yao.qi@linaro.org>
3562
3563 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3564
1e94266c
SM
35652016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3566
3567 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3568 to AC_OUTPUT.
3569 * configure: Regenerate.
3570
8adce034
SM
35712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3572
3573 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3574 void * to gdb_byte *.
3575 * linux-low.c (siginfo_fixup): Likewise.
3576 (linux_xfer_siginfo): Likewise.
3577 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3578 Likewise.
3579 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3580
93813b37
WT
35812016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3582
3583 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3584 to srv_tgtobj.
3585 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3586 to srv_tgtobj.
3587 * linux-x86-low.c [__x86_64__]: Include
3588 "nat/amd64-linux-siginfo.h".
3589 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3590 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3591 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3592 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3593 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3594 (cpt_si_fd, si_timerid, si_overrun): Move from
3595 nat/amd64-linux-siginfo.c.
3596 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3597
8424cc97
SM
35982016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3599
3600 * server.c (skip_to_semicolon): Remove.
3601 (process_point_options): Use strchrnul instead of
3602 skip_to_semicolon.
3603
4d18591b
YQ
36042016-01-26 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3607 * linux-low.c (install_software_single_step_breakpoints): Don't
3608 call regcache_read_pc.
3609 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3610 argument pc.
3611
d8020970
YQ
36122016-01-26 Yao Qi <yao.qi@linaro.org>
3613
3614 * linux-low.c (install_software_single_step_breakpoints): Call
3615 regcache_read_pc instead of get_pc.
3616
8b207339
YQ
36172016-01-26 Yao Qi <yao.qi@linaro.org>
3618
3619 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3620 (unblock_async_io): Rename to ...
3621 (block_unblock_async_io): ... it. New function.
3622 (enable_async_io): Don't install SIGIO handler. Unblock it
3623 instead.
3624 (disable_async_io): Don't ignore SIGIO. Block it instead.
3625 (initialize_async_io): Install SIGIO handler. Don't call
3626 unblock_async_io.
3627
18879fef
YQ
36282016-01-26 Yao Qi <yao.qi@linaro.org>
3629
3630 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3631 first character is '\003', call *the_target->request_interrupt.
3632
a0f8e08a
YQ
36332016-01-25 Yao Qi <yao.qi@linaro.org>
3634
3635 * remote-utils.c (new_thread_notify): Remove.
3636 (dead_thread_notify): Likewise.
3637 * remote-utils.h (new_thread_notify): Remove declaration.
3638 (dead_thread_notify): Likewise.
3639
cc5fd9ab
MK
36402016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3641
3642 * gdb.trace/pending.exp: Fix expected message on continue.
3643
99e8eb11
MK
36442016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3645
3646 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3647 it works properly on big-endian machines where sizeof (CORE_ADDR)
3648 != sizeof (void *).
3649
a994041d
PA
36502016-01-21 Pedro Alves <palves@redhat.com>
3651
3652 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3653 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3654 * configure: Regenerate.
3655
f7a6a40d
YQ
36562016-01-21 Yao Qi <yao.qi@linaro.org>
3657
3658 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3659 is_thumb and set it according to CPSR saved on the stack.
3660 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3661 arm_sigreturn_next_pc.
3662
6f69e520
YQ
36632016-01-18 Yao Qi <yao.qi@linaro.org>
3664
3665 * linux-low.c (linux_set_pc_64bit): New function.
3666 (linux_get_pc_64bit): New function.
3667 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3668 Declare.
3669 * linux-sparc-low.c (debug_threads): Remove declaration.
3670 (sparc_get_pc): Remove.
3671 (the_low_target): Use linux_get_pc_64bit instead of
3672 sparc_get_pc.
3673 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3674 (the_low_target): Use linux_get_pc_64bit and
3675 linux_set_pc_64bit.
3676
276d4552
YQ
36772016-01-18 Yao Qi <yao.qi@linaro.org>
3678
3679 * linux-arm-low.c (debug_threads): Remove declaration.
3680 (arm_get_pc, arm_set_pc): Remove.
3681 (the_low_target): Use linux_get_pc_32bit and
3682 linux_set_pc_32bit.
3683 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3684 (the_low_target): Use linux_get_pc_32bit and
3685 linux_set_pc_32bit.
3686 * linux-cris-low.c (debug_threads): Remove declaration.
3687 (cris_get_pc, cris_set_pc,): Remove.
3688 (the_low_target): Use linux_get_pc_32bit and
3689 linux_set_pc_32bit.
3690 * linux-crisv32-low.c (debug_threads): Remove declaration.
3691 (cris_get_pc, cris_set_pc): Remove.
3692 (the_low_target): Use linux_get_pc_32bit and
3693 linux_set_pc_32bit.
3694 * linux-low.c: Include inttypes.h.
3695 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3696 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3697 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3698 (the_low_target): Use linux_get_pc_32bit and
3699 linux_set_pc_32bit.
3700 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3701 (the_low_target): Use linux_get_pc_32bit and
3702 linux_set_pc_32bit.
3703 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3704 (the_low_target): Use linux_get_pc_32bit and
3705 linux_set_pc_32bit.
3706 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3707 (the_low_target): Use linux_get_pc_32bit and
3708 linux_set_pc_32bit.
3709 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3710 (the_low_target): Use linux_get_pc_32bit and
3711 linux_set_pc_32bit.
3712
eb0edac8
GB
37132016-01-18 Gary Benson <gbenson@redhat.com>
3714
3715 * configure.ac (AC_FUNC_FORK): New check.
3716 * config.in: Regenerate.
3717 * configure: Likewise.
3718
1b451dda
YQ
37192016-01-14 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3722 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3723 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3724 arm_get_next_pcs_ctor.
3725
82075af2
JS
37262016-01-12 Josh Stone <jistone@redhat.com>
3727 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3728
3729 * inferiors.h: Include "gdb_vecs.h".
3730 (struct process_info): Add syscalls_to_catch.
3731 * inferiors.c (remove_process): Free syscalls_to_catch.
3732 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3733 syscall_return stops.
3734 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3735 * server.c (handle_general_set): Handle QCatchSyscalls.
3736 (handle_query): Report support for QCatchSyscalls.
3737 * target.h (struct target_ops): Add supports_catch_syscall.
3738 (target_supports_catch_syscall): New macro.
3739 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3740 (struct lwp_info): Add syscall_state.
3741 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3742 Maintain syscall_state and syscalls_to_catch across exec.
3743 (get_syscall_trapinfo): New function, proxy to the_low_target.
3744 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3745 (linux_low_filter_event): Toggle syscall_state entry/return for
3746 syscall traps, and set it ignored for all others.
3747 (gdb_catching_syscalls_p): New function.
3748 (gdb_catch_this_syscall_p): New function.
3749 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3750 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3751 (linux_supports_catch_syscall): New function.
3752 (linux_target_ops): Install it.
3753 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3754 (the_low_target): Install it.
3755
8f13a3ce
MF
37562016-01-12 Mike Frysinger <vapier@gentoo.org>
3757
3758 * acinclude.m4: Include new ../warning.m4 file.
3759 * configure: Regenerated.
3760 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3761
5b3da067
MF
37622016-01-12 Mike Frysinger <vapier@gentoo.org>
3763
3764 * ax.c (is_goto_target): Mark static.
3765 * linux-low.c (register_addr): Likewise.
3766 (linux_fetch_registers, linux_store_registers): Likewise.
3767 * mem-break.c (any_persistent_commands): Fix old prototype.
3768 (add_commands_to_breakpoint): Mark static.
3769 * regcache.c (find_register_by_name): Delete unused func.
3770 * remote-utils.c (hex_or_minus_one): Mark static.
3771 * server.c (monitor_show_help): Mark static.
3772 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3773 handle_v_requests): Likewise.
3774
bc504a31
PA
37752016-01-12 Pedro Alves <palves@redhat.com>
3776
3777 Remove use of the registered trademark symbol throughout.
3778
5a0dd67a
YQ
37792016-01-08 Yao Qi <yao.qi@linaro.org>
3780
3781 * remote-utils.c (getpkt): If c is '\003', call target hook
3782 request_interrupt.
3783
b2ca446f
YQ
37842016-01-06 Yao Qi <yao.qi@linaro.org>
3785
3786 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3787 linux-aarch32-low.c.
3788 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3789 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3790 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3791 (thumb2_breakpoint): Declare.
3792 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3793 linux-aarch32-low.h.
3794 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3795 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3796 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3797
edd88788
JB
37982016-01-01 Joel Brobecker <brobecker@adacore.com>
3799
3800 * gdbreplay.c (gdbreplay_version): Change copyright year in
3801 version message.
3802 * server.c (gdbserver_version): Likewise.
3803
65da7f14
PP
38042015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3805
3806 * server.c (crc32_table): Delete.
3807 (crc32): Use libiberty's xcrc32 function.
3808
4abd5ed2
JB
38092015-12-22 Joel Brobecker <brobecker@adacore.com>
3810
3811 * lynx-low.c (lynx_delete_thread_callback): New function.
3812 (lynx_mourn): Properly delete our process and all of its
3813 threads. Remove call to clear_inferiors.
3814
0e50fe5c
JB
38152015-12-22 Joel Brobecker <brobecker@adacore.com>
3816
3817 * target.c (thread_search_callback): Add check that
3818 the thread_stopped target callback is not NULL before
3819 calling it.
3820
35adc03f
YQ
38212015-12-21 Yao Qi <yao.qi@linaro.org>
3822
3823 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3824 arm breakpoint.
3825
bd2b2909
AT
38262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3827
3828 * server.c (handle_query): Call target_supports_software_single_step.
3829
7fe5e27e
AT
38302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3831
3832 * linux-low.c (single_step): New function.
3833 (linux_resume_one_lwp_throw): Call single_step.
3834 (start_step_over): Likewise.
3835
d9311bfa
AT
38362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3837
3838 * Makefile.in (SFILES): Append arch/arm-linux.c,
3839 arch/arm-get-next-pcs.c.
3840 (arm-linux.o): New rule.
3841 (arm-get-next-pcs.o): New rule.
3842 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3843 arm-linux.o.
3844 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3845 to linux-aarch32-low.c.
3846 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3847 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3848 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3849 (thumb2_breakpoint_len): Likewise.
3850 (arm_is_thumb_mode): Make non-static.
3851 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3852 from linux-aarch32-low.c.
3853 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3854 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3855 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3856 (thumb2_breakpoint_len): Likewise.
3857 (arm_is_thumb_mode): New declaration.
3858 * linux-arm-low.c: Include arch/arm-linux.h
3859 aarch/arm-get-next-pcs.h, sys/syscall.h.
3860 (get_next_pcs_ops): New struct.
3861 (get_next_pcs_addr_bits_remove): New function.
3862 (get_next_pcs_is_thumb): New function.
3863 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3864 (arm_sigreturn_next_pc): Likewise.
3865 (get_next_pcs_syscall_next_pc): Likewise.
3866 (arm_gdbserver_get_next_pcs): Likewise.
3867 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3868 Initialize.
3869 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3870 * server.h: Include gdb_vecs.h.
3871
68ce2059
AT
38722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3873
3874 * Makefile.in (SFILES): Append common/common-regcache.c.
3875 (OBS): Append common-regcache.o.
3876 (common-regcache.o): New rule.
3877 * regcache.c (init_register_cache): Initialize cache to
3878 REG_UNAVAILABLE.
3879 (regcache_raw_read_unsigned): New function.
3880 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3881 register_status enum.
3882
fa5308bd
AT
38832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3884
3885 * linux-aarch64-low.c (the_low_targets): Rename
3886 breakpoint_reinsert_addr to get_next_pcs.
3887 * linux-arm-low.c (the_low_targets): Likewise.
3888 * linux-bfin-low.c (the_low_targets): Likewise.
3889 * linux-cris-low.c (the_low_targets): Likewise.
3890 * linux-crisv32-low.c (the_low_targets): Likewise.
3891 * linux-low.c (can_software_single_step): Likewise.
3892 (install_software_single_step_breakpoints): New function.
3893 (start_step_over): Use install_software_single_step_breakpoints.
3894 * linux-low.h: New CORE_ADDR vector.
3895 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3896 get_next_pcs.
3897 * linux-mips-low.c (the_low_targets): Likewise.
3898 * linux-nios2-low.c (the_low_targets): Likewise.
3899 * linux-sparc-low.c (the_low_targets): Likewise.
3900
4a6ed09b
PA
39012015-12-17 Pedro Alves <palves@redhat.com>
3902
3903 * linux-low.c (linux_kill_one_lwp): Remove references to
3904 LinuxThreads.
3905 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3906 to 'kill'.
3907 (linux_init_signals): Delete.
3908 (initialize_low): Adjust.
3909 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3910
7544db95
PA
39112015-12-16 Pedro Alves <palves@redhat.com>
3912
3913 * configure.ac (compiler warning flags): When testing a
3914 -Wno-foo option, check whether -Wfoo works instead.
3915 * configure: Regenerate.
3916
8020350c
DB
39172015-12-11 Don Breazeal <donb@codesourcery.com>
3918
3919 * server.c (process_serial_event): Don't exit from gdbserver
3920 in remote mode if there are still active inferiors.
3921
db91f502
YQ
39222015-12-11 Yao Qi <yao.qi@linaro.org>
3923
3924 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3925 arm_breakpoint_at if the process is 32-bit.
3926
b37a6290
YQ
39272015-12-11 Yao Qi <yao.qi@linaro.org>
3928
3929 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3930 arm breakpoint.
3931
17b1509a
YQ
39322015-12-07 Yao Qi <yao.qi@linaro.org>
3933
3934 * configure.srv: Append arm.o to srv_tgtobj for
3935 aarch64*-*-linux* target.
3936 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3937 from linux-arm-low.c.
3938 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3939 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3940 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3941 (thumb2_breakpoint_len): Likewise.
3942 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3943 (arm_breakpoint_kinds): Likewise.
3944 (arm_breakpoint_kind_from_pc): Likewise.
3945 (arm_sw_breakpoint_from_kind): Likewise.
3946 (arm_breakpoint_kind_from_current_state): Likewise.
3947 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3948 (arm_sw_breakpoint_from_kind): Declare.
3949 (arm_breakpoint_kind_from_current_state): Declare.
3950 (arm_breakpoint_at): Declare.
3951 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3952 arm_sw_breakpoint_from_kind if process is 32-bit.
3953 (aarch64_breakpoint_kind_from_pc): New function.
3954 (aarch64_breakpoint_kind_from_current_state): New function.
3955 (the_low_target): Initialize fields breakpoint_kind_from_pc
3956 and breakpoint_kind_from_current_state.
3957 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3958 linux-aarch32-low.c.
3959 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3960 (arm_breakpoint, arm_breakpoint_len): Likewise.
3961 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3962 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3963 (arm_is_thumb_mode): Likewise.
3964 (arm_breakpoint_at): Likewise.
3965 (arm_breakpoint_kind_from_pc): Likewise.
3966 (arm_sw_breakpoint_from_kind): Likewise.
3967 (arm_breakpoint_kind_from_current_state): Likewise.
3968
3969 Revert:
3970 2015-08-04 Yao Qi <yao.qi@linaro.org>
3971
3972 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3973 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3974 * server.c (extended_protocol): Remove "static".
3975 * server.h (extended_protocol): Declare it.
3976
ece66d65
JS
39772015-12-04 Josh Stone <jistone@redhat.com>
3978
3979 * target.h (struct target_ops) <arch_setup>: Rename to ...
3980 (struct target_ops) <post_create_inferior>: ... this.
3981 (target_arch_setup): Rename to ...
3982 (target_post_create_inferior): ... this, calling post_create_inferior.
3983 * server.c (start_inferior): Update target_arch_setup calls to
3984 target_post_create_inferior.
3985 * linux-low.c (linux_low_ptrace_options): Forward declare.
3986 (linux_arch_setup): Update its comment for general use.
3987 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3988 (struct linux_target_ops): Use linux_post_create_inferior.
3989 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3990 to post_create_inferior.
3991 * nto-low.c (struct nto_target_ops): Likewise.
3992 * spu-low.c (struct spu_target_ops): Likewise.
3993 * win32-low.c (struct win32_target_ops): Likewise.
3994
e58c48b4
AT
39952015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3996
3997 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3998
fbec8956
AT
39992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4000
4001 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4002 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4003 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4004 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4005 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4006 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4007 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4008 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4009 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4010 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4011 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4012 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4013
9b4c5f87
AT
40142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4015
4016 * linux-low.c (linux_look_up_symbols): Don't call
4017 linux_supports_traceclone.
4018 * linux-low.h (thread_db_init): Remove use_events argument.
4019 * thread-db.c (thread_db_use_event): Remove global variable.
4020 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4021 (struct thread_db) <td_create_bp>: Remove field.
4022 (thread_db_create_event): Remove function.
4023 (thread_db_enable_reporting): Likewise.
4024 (find_one_thread): Don't check for thread_db_use_events.
4025 (attach_thread): Likewise.
4026 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4027 (try_thread_db_load_1): Don't check for thread_db_use_events.
4028 (thread_db_init): Remove use_events argument and thread events
4029 handling.
4030 (remove_thread_event_breakpoints): Remove function.
4031 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4032
7d00775e
AT
40332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4034
4035 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4036 New function.
4037 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4038 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4039 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4040 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4041 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4042 Initialize.
4043 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4044 New function.
4045 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4046 * linux-low.c (can_hardware_single_step): Use
4047 supports_hardware_single_step.
4048 (can_software_single_step): New function.
4049 (start_step_over): Call can_software_single_step.
4050 (linux_supports_hardware_single_step): New function.
4051 (struct target_ops) <supports_software_single_step>: Initialize.
4052 * linux-low.h (struct linux_target_ops)
4053 <supports_hardware_single_step>: Initialize.
4054 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4055 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4056 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4057 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4058 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4060 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4061 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4062 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4063 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4064 Initialize.
4065 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4066 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4067 Initialize.
4068 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4069 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4070 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4071 New function.
4072 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4073 * target.h (struct target_ops): <supports_software_single_step>:
4074 New field.
4075 (target_supports_software_single_step): New macro.
4076
2d97cd35
AT
40772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4078
4079 * linux-low.c (linux_wait_1): Fix pc advance condition.
4080 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4081 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4082
769ef81f
AT
40832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4084
4085 * linux-arm-low.c (arm_is_thumb_mode): New function.
4086 (arm_breakpoint_at): Use arm_is_thumb_mode.
4087 (arm_breakpoint_kind_from_current_state): New function.
4088 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4089 Initialize.
4090 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4091 (linux_breakpoint_kind_from_current_state): New function.
4092 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4093 * linux-low.h (struct linux_target_ops)
4094 <breakpoint_kind_from_current_state>: New field.
4095 * target.h (struct target_ops): Likewise.
4096 (target_breakpoint_kind_from_current_state): New macro.
4097
1bebeeca
PA
40982015-11-30 Pedro Alves <palves@redhat.com>
4099
4100 * linux-low.c (linux_resume): Wake up the event loop before
4101 returning.
4102
a67a9fae
PA
41032015-11-30 Pedro Alves <palves@redhat.com>
4104
4105 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4106 check.
4107 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4108 to -1.
4109 * target.c (struct thread_search): New structure.
4110 (thread_search_callback): New function.
4111 (prev_general_thread): New global.
4112 (prepare_to_access_memory, done_accessing_memory): New functions.
4113 * target.h (prepare_to_access_memory, done_accessing_memory):
4114 Replace macros with function declarations.
4115
f2faf941
PA
41162015-11-30 Pedro Alves <palves@redhat.com>
4117
4118 PR 14618
4119 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4120 report TARGET_WAITKIND_NO_RESUMED.
4121 * remote-utils.c (prepare_resume_reply): Handle
4122 TARGET_WAITKIND_NO_RESUMED.
4123 * server.c (report_no_resumed): New global.
4124 (handle_query) <qSupported>: Handle "no-resumed+". Report
4125 "no-resumed+" support.
4126 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4127 return error if the client doesn't support no-resumed events.
4128 (push_stop_notification): New function.
4129 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4130 events if the client supports them.
4131
a681f9c9
PA
41322015-11-30 Pedro Alves <palves@redhat.com>
4133
4134 * linux-low.c (thread_still_has_status_pending_p): Don't check
4135 vCont;t here.
4136 (lwp_resumed): New function.
4137 (status_pending_p_callback): Return early if the LWP is not
4138 supposed to be resumed.
4139
65706a29
PA
41402015-11-30 Pedro Alves <palves@redhat.com>
4141
4142 * linux-low.c (handle_extended_wait): Assert that the LWP's
4143 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4144 thread create events, leave the new child's status pending.
4145 (linux_low_filter_event): If GDB wants to hear about thread exit
4146 events, leave the LWP marked dead and don't delete it.
4147 (linux_wait_for_event_filtered): Don't check for thread exit.
4148 (filter_exit_event): New function.
4149 (linux_wait_1): Use it, when returning an exit event.
4150 (linux_resume_one_lwp_throw): Assert that the LWP's
4151 waitstatus is TARGET_WAITKIND_IGNORE.
4152 * remote-utils.c (prepare_resume_reply): Handle
4153 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4154 * server.c (report_thread_events): New global.
4155 (handle_general_set): Handle QThreadEvents.
4156 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4157 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4158 TARGET_WAITKIND_THREAD_EXITED.
4159 * server.h (report_thread_events): Declare.
4160
56cf4bed
PA
41612015-11-30 Pedro Alves <palves@redhat.com>
4162
4163 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4164 the thread's last_resume_kind was resume_stop.
4165
500c1d85
PA
41662015-11-30 Pedro Alves <palves@redhat.com>
4167
4168 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4169 before returning.
4170
de979965
PA
41712015-11-30 Pedro Alves <palves@redhat.com>
4172
4173 * server.c (handle_v_requests): Handle vCtrlC.
4174
34c65914
PA
41752015-11-30 Pedro Alves <palves@redhat.com>
4176
4177 * gdbthread.h (find_any_thread_of_pid): Declare.
4178 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4179 functions.
4180 * server.c (handle_query): If current_thread is NULL, look for
4181 another thread of the selected process.
4182
79efa585 41832015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4184 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4185
4186 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4187 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4188 name in reply.
4189 * target.h (struct target_ops) <thread_name>: New field.
4190 (target_thread_name): New macro.
4191
80d82c19
JB
41922015-11-23 Joel Brobecker <brobecker@adacore.com>
4193
4194 * regcache.h (regcache_invalidate_pid): Add declaration.
4195 * regcache.c (regcache_invalidate_pid): New function, extracted
4196 from regcache_invalidate.
4197 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4198 Add trivial documentation comment.
4199 * lynx-low.c: Use regcache_invalidate_pid instead of
4200 regcache_invalidate.
4201
64da5dd5
JB
42022015-11-23 Joel Brobecker <brobecker@adacore.com>
4203
4204 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4205 and Elf64_auxv_t if the target is Android.
4206
37ce4055
DE
42072015-11-22 Doug Evans <xdje42@gmail.com>
4208
4209 * target.h: #include <sys/types.h>.
4210
06e03fff
PA
42112015-11-19 Pedro Alves <palves@redhat.com>
4212
4213 * linux-low.c (linux_process_qsupported): Change prototype.
4214 Adjust.
4215 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4216 Change prototype.
4217 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4218 and adjust to loop over all features.
4219 * server.c (handle_query) <qSupported>: Adjust to call
4220 target_process_qsupported once, passing it a vector of unprocessed
4221 features.
4222 * target.h (struct target_ops) <process_qsupported>: Change
4223 prototype.
4224 (target_process_qsupported): Adjust.
4225
9a084706
PA
42262015-11-19 Pedro Alves <palves@redhat.com>
4227
4228 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4229 mode.
4230 * configure: Regenerate.
4231
dad44a1f
PA
42322015-11-19 Pedro Alves <palves@redhat.com>
4233
4234 * configure: Regenerate.
4235
231c0592
YQ
42362015-11-19 Yao Qi <yao.qi@linaro.org>
4237
4238 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4239 type to uint32_t.
4240
6c1c9a8b
YQ
42412015-11-19 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4244 (struct aarch64_operand): Move enum out.
4245
9caa3311
YQ
42462015-11-19 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4249 struct user_fpsimd_state *.
4250 (aarch64_store_fpregset): Likewise.
4251
6a69a054
YQ
42522015-11-19 Yao Qi <yao.qi@linaro.org>
4253
4254 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4255 struct user_pt_regs *.
4256 (aarch64_store_gregset): Likewise.
4257
1798301e
PA
42582015-11-18 Pedro Alves <palves@redhat.com>
4259
4260 * Makefile.in (all_object_files): Add $IPA_OBJS.
4261
ce7715e2
PA
42622015-11-17 Pedro Alves <palves@redhat.com>
4263
4264 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4265 GDB_SIGNAL_0 and gdb_signal_to_string.
4266
c0879059
PA
42672015-11-17 Pedro Alves <palves@redhat.com>
4268
4269 * win32-low.c (handle_output_debug_string): Remove parameter.
4270 (win32_kill): Remove our_status local and adjust call to
4271 handle_output_debug_string.
4272 (get_child_debug_event): Adjust call to
4273 handle_output_debug_string.
4274
1996e237
SM
42752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4276
4277 * linux-mips-low.c (mips_fill_gregset): Add cast.
4278 (mips_store_gregset): Likewise.
4279 (mips_fill_fpregset): Likewise.
4280 (mips_store_fpregset): Likewise.
4281
cbec665b
SM
42822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4283
4284 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4285 priv.
4286
eb3e3c67
SM
42872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4288
4289 * linux-mips-low.c (mips_linux_new_thread): Change type of
4290 watch_type to enum target_hw_bp_type.
4291
171de4b8
SM
42922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4293
4294 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4295 Change return type to arm_hwbp_type.
4296
04248ead
SM
42972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4298
4299 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4300 (arm_store_gregset): Likewise.
4301 * linux-arm-low.c (arm_get_hwcap): Likewise.
4302 (arm_read_description): Likewise.
4303
04b3479c
SM
43042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4305
4306 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4307
2bc84e8a
SM
43082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4309
4310 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4311 (ppc_fill_vsxregset): Likewise.
4312 (ppc_store_vsxregset): Likewise.
4313 (ppc_fill_vrregset): Likewise.
4314 (ppc_store_vrregset): Likewise.
4315 (ppc_fill_evrregset): Likewise.
4316 (ppc_store_evrregset): Likewise.
4317
e6c5bb05
SM
43182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4319
4320 * linux-ppc-low.c (ppc_usrregs_info): Remove
4321 forward-declaration.
4322 (ppc_arch_setup): Move lower in file.
4323
7ea45d72
SM
43242015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4325
4326 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4327 (ps_pdwrite): Likewise.
4328
69291610
HW
43292015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4330
4331 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4332 to after assert checks.
4333
b42945fd
SM
43342015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4335
4336 * proc-service.c (ps_pdread): Add/adjust casts.
4337 (ps_pdwrite): Add/adjust casts.
4338
d6f85c84
SM
43392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4340
4341 * server.c (handle_search_memory_1): Cast return value of
4342 memmem.
4343
f98cd059
SM
43442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4345
4346 * server.c (write_qxfer_response): Change type of data to
4347 gdb_byte *.
4348
d2412fa5
PA
43492015-10-29 Pedro Alves <palves@redhat.com>
4350
4351 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4352
c17414a2
PA
43532015-10-29 Pedro Alves <palves@redhat.com>
4354
4355 * tracepoint.c (clear_installed_tracepoints): Add casts.
4356
e053fbc4
PA
43572015-10-29 Pedro Alves <palves@redhat.com>
4358
4359 * server.c (handle_v_cont, process_serial_event): Add enum
4360 gdb_signal casts to signal parsing code.
4361
add67df8
PA
43622015-10-29 Pedro Alves <palves@redhat.com>
4363
4364 * linux-low.h (NULL_REGSET): Define.
4365 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4366 * linux-arm-low.c (arm_regsets): Likewise.
4367 * linux-crisv32-low.c (cris_regsets): Likewise.
4368 * linux-m68k-low.c (m68k_regsets): Likewise.
4369 * linux-mips-low.c (mips_regsets): Likewise.
4370 * linux-nios2-low.c (nios2_regsets): Likewise.
4371 * linux-ppc-low.c (ppc_regsets): Likewise.
4372 * linux-s390-low.c (s390_regsets): Likewise.
4373 * linux-sh-low.c (sh_regsets): Likewise.
4374 * linux-sparc-low.c (sparc_regsets): Likewise.
4375 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4376 * linux-tile-low.c (tile_regsets): Likewise.
4377 * linux-x86-low.c (x86_regsets): Likewise.
4378 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4379
50bc912a
PA
43802015-10-29 Pedro Alves <palves@redhat.com>
4381
4382 * linux-low.h (NULL_REGSET): Define.
4383 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4384 * linux-arm-low.c (arm_regsets): Likewise.
4385 * linux-crisv32-low.c (cris_regsets): Likewise.
4386 * linux-m68k-low.c (m68k_regsets): Likewise.
4387 * linux-mips-low.c (mips_regsets): Likewise.
4388 * linux-nios2-low.c (nios2_regsets): Likewise.
4389 * linux-ppc-low.c (ppc_regsets): Likewise.
4390 * linux-s390-low.c (s390_regsets): Likewise.
4391 * linux-sh-low.c (sh_regsets): Likewise.
4392 * linux-sparc-low.c (sparc_regsets): Likewise.
4393 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4394 * linux-tile-low.c (tile_regsets): Likewise.
4395 * linux-x86-low.c (x86_regsets): Likewise.
4396 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4397
682b2546
DE
43982015-10-26 Doug Evans <dje@google.com>
4399
4400 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4401
963843d4
DE
44022015-10-26 Doug Evans <dje@google.com>
4403
4404 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4405
d41401ac
DE
44062015-10-26 Doug Evans <dje@google.com>
4407
4408 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4409 for debug_printf.
4410 (attach_thread, find_new_threads_callback): Ditto.
4411
3db28855
AT
44122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4413
4414 * mem-break.h (set_breakpoint_data): Remove.
4415
fb78e89c
AT
44162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4417
4418 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4419 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4420 (initialize_low): Remove set_breakpoint_data call.
4421 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4422 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4423 (initialize_low): Remove set_breakpoint_data call.
4424 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4425 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4426 (initialize_low): Remove set_breakpoint_data call.
4427
2e6ee069
AT
44282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4429
4430 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4431 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4432 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4433 * target.h (target_breakpoint_kind_from_pc): New macro.
4434
1652a986
AT
44352015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4436
4437 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4438 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4439 the default breakpoint kind.
4440
abeead09
AT
44412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4442
4443 * linux-arm-low.c (arm_supports_z_point_type): Add software
4444 breakpoint support.
4445
b0b4b501
AT
44462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4447
4448 * linux-arm-low.c: Refactor breakpoint definitions.
4449 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4450 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4451
8689682c
AT
44522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4453
4454 * Makefile.in: Add arm.c/o.
4455 * configure.srv: Likewise.
4456 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4457 (arm_breakpoint_kind_from_pc): New function.
4458 (arm_sw_breakpoint_from_kind): Return proper kind.
4459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4460
27165294
AT
44612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4462
4463 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4464 removal.
4465 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4466 (struct raw_breakpoint) <size>: Remove.
4467 (struct raw_breakpoint) <kind>: Add.
4468 (bp_size): New function.
4469 (bp_opcode): Likewise.
4470 (find_raw_breakpoint_at): Adjust for kind.
4471 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4472 (remove_memory_breakpoint): Adjust for kind call bp_size.
4473 (set_raw_breakpoint_at): Adjust for kind.
4474 (set_breakpoint): Likewise.
4475 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4476 (delete_raw_breakpoint): Adjust for kind.
4477 (delete_breakpoint): Likewise.
4478 (find_gdb_breakpoint): Likewise.
4479 (set_gdb_breakpoint_1): Likewise.
4480 (set_gdb_breakpoint): Likewise.
4481 (delete_gdb_breakpoint_1): Likewise.
4482 (delete_gdb_breakpoint): Likewise.
4483 (uninsert_raw_breakpoint): Likewise.
4484 (reinsert_raw_breakpoint): Likewise.
4485 (set_breakpoint_data): Remove.
4486 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4487 (check_mem_read): Adjust for kind call bp_size.
4488 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4489 (clone_one_breakpoint): Adjust for kind.
4490 * mem-break.h (set_gdb_breakpoint): Likewise.
4491 (delete_gdb_breakpoint): Likewise.
4492 * server.c (process_serial_event): Likewise.
4493
dd373349
AT
44942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4495
4496 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4497 (struct linux_target_ops) <breakpoint>: Remove.
4498 (struct linux_target_ops) <breakpoint_len>: Remove.
4499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4501 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4502 (arm_sw_breakpoint_from_kind): New function.
4503 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4504 (struct linux_target_ops) <breakpoint>: Remove.
4505 (struct linux_target_ops) <breakpoint_len>: Remove.
4506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4508 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4509 (struct linux_target_ops) <breakpoint>: Remove.
4510 (struct linux_target_ops) <breakpoint_len>: Remove.
4511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4513 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4514 (struct linux_target_ops) <breakpoint>: Remove.
4515 (struct linux_target_ops) <breakpoint_len>: Remove.
4516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4518 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4519 and sw_breakpoint_from_kind to increment the pc.
4520 (linux_breakpoint_kind_from_pc): New function.
4521 (linux_sw_breakpoint_from_kind): New function.
4522 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4523 (initialize_low): Call breakpoint_kind_from_pc and
4524 sw_breakpoint_from_kind to replace breakpoint_data/len.
4525 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4526 New field.
4527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4528 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4529 (struct linux_target_ops) <breakpoint>: Remove.
4530 (struct linux_target_ops) <breakpoint_len>: Remove.
4531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4533 * linux-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4539 (struct linux_target_ops) <breakpoint>: Remove.
4540 (struct linux_target_ops) <breakpoint_len>: Remove.
4541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4543 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4544 (struct linux_target_ops) <breakpoint>: Remove.
4545 (struct linux_target_ops) <breakpoint_len>: Remove.
4546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4548 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4549 (struct linux_target_ops) <breakpoint>: Remove.
4550 (struct linux_target_ops) <breakpoint_len>: Remove.
4551 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4552 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4553 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4554 (struct linux_target_ops) <breakpoint>: Remove.
4555 (struct linux_target_ops) <breakpoint_len>: Remove.
4556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4558 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4559 (struct linux_target_ops) <breakpoint>: Remove.
4560 (struct linux_target_ops) <breakpoint_len>: Remove.
4561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4563 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4564 (struct linux_target_ops) <breakpoint>: Remove.
4565 (struct linux_target_ops) <breakpoint_len>: Remove.
4566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4568 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4569 (struct linux_target_ops) <breakpoint>: Remove.
4570 (struct linux_target_ops) <breakpoint_len>: Remove.
4571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4573 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4574 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4575 (struct linux_target_ops) <breakpoint>: Remove.
4576 (struct linux_target_ops) <breakpoint_len>: Remove.
4577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4579 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4580 (struct linux_target_ops) <breakpoint>: Remove.
4581 (struct linux_target_ops) <breakpoint_len>: Remove.
4582 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4583 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4584
4cd98a19
AT
45852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4586
4587 * linux-cris-low.c (cris_get_pc): Remove void arg.
4588
774ee6d2
AR
45892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4590
4591 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4592 variable name.
4593
833dcd29
AR
45942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4595
4596 * inferiors.c (thread_pid_matches_callback): New function.
4597 (find_thread_process): New function.
4598 (remove_thread): Reset current_thread.
4599 (remove_process): Assert threads have been removed first.
4600
8d689ee5
YQ
46012015-10-15 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4604 if it is 3.
4605 (aarch64_remove_point): Likewise.
4606 * regcache.c (regcache_register_size): New function.
4607
1c2e1515
YQ
46082015-10-12 Yao Qi <yao.qi@linaro.org>
4609
4610 * linux-aarch64-low.c: Update all callers as emit_load_store
4611 is renamed to aarch64_emit_load_store.
4612
e1c587c3
YQ
46132015-10-12 Yao Qi <yao.qi@linaro.org>
4614
4615 * linux-aarch64-low.c: Update all callers of function renaming
4616 from emit_insn to aarch64_emit_insn.
4617
b6542f81
YQ
46182015-10-12 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4621 arch/aarch64-insn.h.
4622 (struct aarch64_memory_operand): Likewise.
4623 (ENCODE): Likewise.
4624 (emit_insn): Move to arch/aarch64-insn.c.
4625 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4626 (emit_load_store): Move to arch/aarch64-insn.c.
4627 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4628 (can_encode_int32): Remove.
4629
246994ce
YQ
46302015-10-12 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4633 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4634 (aarch64_relocate_instruction): Likewise.
4635 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4636 (struct aarch64_insn_visitor): Likewise.
4637
0badd99f
YQ
46382015-10-12 Yao Qi <yao.qi@linaro.org>
4639
4640 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4641 (struct aarch64_insn_visitor): New.
4642 (struct aarch64_insn_relocation_data): New.
4643 (aarch64_ftrace_insn_reloc_b): New function.
4644 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4645 (aarch64_ftrace_insn_reloc_cb): Likewise.
4646 (aarch64_ftrace_insn_reloc_tb): Likewise.
4647 (aarch64_ftrace_insn_reloc_adr): Likewise.
4648 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4649 (aarch64_ftrace_insn_reloc_others): Likewise.
4650 (visitor): New.
4651 (aarch64_relocate_instruction): Use visitor.
4652
dfaffe9d
YQ
46532015-10-12 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4656 int. Add argument buf.
4657 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4658 aarch64_relocate_instruction.
4659
70b439f0
YQ
46602015-10-12 Yao Qi <yao.qi@linaro.org>
4661
4662 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4663 argument insn. Remove local variable insn. Don't call
4664 target_read_uint32.
4665 (aarch64_install_fast_tracepoint_jump_pad): Call
4666 target_read_uint32.
4667
7781c06f
YQ
46682015-09-30 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4671 (emit_load_store_pair): Likewise.
4672
9a3c8263
SM
46732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4674
4675 * dll.c (match_dll): Add cast(s).
4676 (unloaded_dll): Likewise.
4677 * linux-low.c (second_thread_of_pid_p): Likewise.
4678 (delete_lwp_callback): Likewise.
4679 (count_events_callback): Likewise.
4680 (select_event_lwp_callback): Likewise.
4681 (linux_set_resume_request): Likewise.
4682 * server.c (accumulate_file_name_length): Likewise.
4683 (emit_dll_description): Likewise.
4684 (handle_qxfer_threads_worker): Likewise.
4685 (visit_actioned_threads): Likewise.
4686 * thread-db.c (any_thread_of): Likewise.
4687 * tracepoint.c (same_process_p): Likewise.
4688 (match_blocktype): Likewise.
4689 (build_traceframe_info_xml): Likewise.
4690
224c3ddb
SM
46912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4692
4693 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4694 assignment.
4695 (gdb_unparse_agent_expr): Likewise.
4696 * hostio.c (require_data): Likewise.
4697 (handle_pread): Likewise.
4698 * linux-low.c (disable_regset): Likewise.
4699 (fetch_register): Likewise.
4700 (store_register): Likewise.
4701 (get_dynamic): Likewise.
4702 (linux_qxfer_libraries_svr4): Likewise.
4703 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4704 (set_fast_tracepoint_jump): Likewise.
4705 (uninsert_fast_tracepoint_jumps_at): Likewise.
4706 (reinsert_fast_tracepoint_jumps_at): Likewise.
4707 (validate_inserted_breakpoint): Likewise.
4708 (clone_agent_expr): Likewise.
4709 * regcache.c (init_register_cache): Likewise.
4710 * remote-utils.c (putpkt_binary_1): Likewise.
4711 (decode_M_packet): Likewise.
4712 (decode_X_packet): Likewise.
4713 (look_up_one_symbol): Likewise.
4714 (relocate_instruction): Likewise.
4715 (monitor_output): Likewise.
4716 * server.c (handle_search_memory): Likewise.
4717 (handle_qxfer_exec_file): Likewise.
4718 (handle_qxfer_libraries): Likewise.
4719 (handle_qxfer): Likewise.
4720 (handle_query): Likewise.
4721 (handle_v_cont): Likewise.
4722 (handle_v_run): Likewise.
4723 (captured_main): Likewise.
4724 * target.c (write_inferior_memory): Likewise.
4725 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4726 * tracepoint.c (init_trace_buffer): Likewise.
4727 (add_tracepoint_action): Likewise.
4728 (add_traceframe): Likewise.
4729 (add_traceframe_block): Likewise.
4730 (cmd_qtdpsrc): Likewise.
4731 (cmd_qtdv): Likewise.
4732 (cmd_qtstatus): Likewise.
4733 (response_source): Likewise.
4734 (response_tsv): Likewise.
4735 (cmd_qtnotes): Likewise.
4736 (gdb_collect): Likewise.
4737 (initialize_tracepoint): Likewise.
4738
afbe19f8
PL
47392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4740
4741 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4742 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4743 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4744 <NOP>: New.
4745 (enum aarch64_condition_codes): New enum.
4746 (w0): New static global.
4747 (fp): Likewise.
4748 (lr): Likewise.
4749 (struct aarch64_memory_operand) <type>: New
4750 MEMORY_OPERAND_POSTINDEX type.
4751 (postindex_memory_operand): New helper function.
4752 (emit_ret): New function.
4753 (emit_load_store_pair): New function, factored out of emit_stp
4754 with support for MEMORY_OPERAND_POSTINDEX.
4755 (emit_stp): Rewrite using emit_load_store_pair.
4756 (emit_ldp): New function.
4757 (emit_load_store): Likewise.
4758 (emit_ldr): Mention post-index instruction in comment.
4759 (emit_ldrh): New function.
4760 (emit_ldrb): New function.
4761 (emit_ldrsw): Mention post-index instruction in comment.
4762 (emit_str): Likewise.
4763 (emit_subs): New function.
4764 (emit_cmp): Likewise.
4765 (emit_and): Likewise.
4766 (emit_orr): Likewise.
4767 (emit_orn): Likewise.
4768 (emit_eor): Likewise.
4769 (emit_mvn): Likewise.
4770 (emit_lslv): Likewise.
4771 (emit_lsrv): Likewise.
4772 (emit_asrv): Likewise.
4773 (emit_mul): Likewise.
4774 (emit_sbfm): Likewise.
4775 (emit_sbfx): Likewise.
4776 (emit_ubfm): Likewise.
4777 (emit_ubfx): Likewise.
4778 (emit_csinc): Likewise.
4779 (emit_cset): Likewise.
4780 (emit_nop): Likewise.
4781 (emit_ops_insns): New helper function.
4782 (emit_pop): Likewise.
4783 (emit_push): Likewise.
4784 (aarch64_emit_prologue): New function.
4785 (aarch64_emit_epilogue): Likewise.
4786 (aarch64_emit_add): Likewise.
4787 (aarch64_emit_sub): Likewise.
4788 (aarch64_emit_mul): Likewise.
4789 (aarch64_emit_lsh): Likewise.
4790 (aarch64_emit_rsh_signed): Likewise.
4791 (aarch64_emit_rsh_unsigned): Likewise.
4792 (aarch64_emit_ext): Likewise.
4793 (aarch64_emit_log_not): Likewise.
4794 (aarch64_emit_bit_and): Likewise.
4795 (aarch64_emit_bit_or): Likewise.
4796 (aarch64_emit_bit_xor): Likewise.
4797 (aarch64_emit_bit_not): Likewise.
4798 (aarch64_emit_equal): Likewise.
4799 (aarch64_emit_less_signed): Likewise.
4800 (aarch64_emit_less_unsigned): Likewise.
4801 (aarch64_emit_ref): Likewise.
4802 (aarch64_emit_if_goto): Likewise.
4803 (aarch64_emit_goto): Likewise.
4804 (aarch64_write_goto_address): Likewise.
4805 (aarch64_emit_const): Likewise.
4806 (aarch64_emit_call): Likewise.
4807 (aarch64_emit_reg): Likewise.
4808 (aarch64_emit_pop): Likewise.
4809 (aarch64_emit_stack_flush): Likewise.
4810 (aarch64_emit_zero_ext): Likewise.
4811 (aarch64_emit_swap): Likewise.
4812 (aarch64_emit_stack_adjust): Likewise.
4813 (aarch64_emit_int_call_1): Likewise.
4814 (aarch64_emit_void_call_2): Likewise.
4815 (aarch64_emit_eq_goto): Likewise.
4816 (aarch64_emit_ne_goto): Likewise.
4817 (aarch64_emit_lt_goto): Likewise.
4818 (aarch64_emit_le_goto): Likewise.
4819 (aarch64_emit_gt_goto): Likewise.
4820 (aarch64_emit_ge_got): Likewise.
4821 (aarch64_emit_ops_impl): New static global variable.
4822 (aarch64_emit_ops): New target function, return
4823 &aarch64_emit_ops_impl.
4824 (struct linux_target_ops): Install it.
4825
bb903df0
PL
48262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4827
4828 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4829 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4830 aarch64-ipa.o.
4831 * linux-aarch64-ipa.c: New file.
4832 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4833 and endian.h.
4834 (aarch64_get_thread_area): New target method.
4835 (extract_signed_bitfield): New helper function.
4836 (aarch64_decode_ldr_literal): New function.
4837 (enum aarch64_opcodes): New enum.
4838 (struct aarch64_register): New struct.
4839 (struct aarch64_operand): New struct.
4840 (x0): New static global.
4841 (x1): Likewise.
4842 (x2): Likewise.
4843 (x3): Likewise.
4844 (x4): Likewise.
4845 (w2): Likewise.
4846 (ip0): Likewise.
4847 (sp): Likewise.
4848 (xzr): Likewise.
4849 (aarch64_register): New helper function.
4850 (register_operand): Likewise.
4851 (immediate_operand): Likewise.
4852 (struct aarch64_memory_operand): New struct.
4853 (offset_memory_operand): New helper function.
4854 (preindex_memory_operand): Likewise.
4855 (enum aarch64_system_control_registers): New enum.
4856 (ENCODE): New macro.
4857 (emit_insn): New helper function.
4858 (emit_b): New function.
4859 (emit_bcond): Likewise.
4860 (emit_cb): Likewise.
4861 (emit_tb): Likewise.
4862 (emit_blr): Likewise.
4863 (emit_stp): Likewise.
4864 (emit_ldp_q_offset): Likewise.
4865 (emit_stp_q_offset): Likewise.
4866 (emit_load_store): Likewise.
4867 (emit_ldr): Likewise.
4868 (emit_ldrsw): Likewise.
4869 (emit_str): Likewise.
4870 (emit_ldaxr): Likewise.
4871 (emit_stxr): Likewise.
4872 (emit_stlr): Likewise.
4873 (emit_data_processing_reg): Likewise.
4874 (emit_data_processing): Likewise.
4875 (emit_add): Likewise.
4876 (emit_sub): Likewise.
4877 (emit_mov): Likewise.
4878 (emit_movk): Likewise.
4879 (emit_mov_addr): Likewise.
4880 (emit_mrs): Likewise.
4881 (emit_msr): Likewise.
4882 (emit_sevl): Likewise.
4883 (emit_wfe): Likewise.
4884 (append_insns): Likewise.
4885 (can_encode_int32_in): New helper function.
4886 (aarch64_relocate_instruction): New function.
4887 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4888 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4889 (struct linux_target_ops): Install aarch64_get_thread_area,
4890 aarch64_install_fast_tracepoint_jump_pad and
4891 aarch64_get_min_fast_tracepoint_insn_len.
4892
787749ea
PL
48932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4894
4895 * Makefile.in (aarch64-insn.o): New rule.
4896 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4897
9812b2e6
YQ
48982015-09-21 Yao Qi <yao.qi@linaro.org>
4899
4900 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4901
18fe412b
YQ
49022015-09-21 Yao Qi <yao.qi@linaro.org>
4903
4904 * tracepoint.c (max_jump_pad_size): Remove.
4905
a0cc84cd
YQ
49062015-09-18 Yao Qi <yao.qi@linaro.org>
4907
4908 * linux-aarch64-low.c: Don't include sys/uio.h.
4909 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4910
d78908cf
WW
49112015-09-16 Wei-cheng Wang <cole945@gmail.com>
4912
4913 * tracepoint.c (eval_result_type): Change prototype.
4914 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4915
d57e0d50
PA
49162015-09-15 Pedro Alves <palves@redhat.com>
4917
4918 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4919 Check whether to report exec events instead of checking whether
4920 multiprocess is enabled.
4921
5a676acc
PA
49222015-09-15 Pedro Alves <palves@redhat.com>
4923
4924 PR remote/18965
4925 * remote-utils.c (prepare_resume_reply): Merge
4926 TARGET_WAITKIND_VFORK_DONE switch case with the
4927 TARGET_WAITKIND_FORKED case.
4928
7c5d0fad
YQ
49292015-09-15 Yao Qi <yao.qi@linaro.org>
4930
4931 * server.c (handle_query): Check string comparison using
4932 "else if" instead of "if".
4933
750ce8d1
YQ
49342015-09-15 Yao Qi <yao.qi@linaro.org>
4935
4936 * server.c (vCont_supported): New global variable.
4937 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4938 matches. Append ";vContSupported+" to own_buf.
4939 (handle_v_requests): Append ";s;S" to own_buf if target supports
4940 hardware single step or vCont_supported is false.
4941 (capture_main): Set vCont_supported to zero.
4942
70b90b91
YQ
49432015-09-15 Yao Qi <yao.qi@linaro.org>
4944
4945 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4946 it to ...
4947 (linux_supports_hardware_single_step): ... New function.
4948 (linux_target_ops): Update.
4949 * lynx-low.c (lynx_target_ops): Set field
4950 supports_hardware_single_step to target_can_do_hardware_single_step.
4951 * nto-low.c (nto_target_ops): Likewise.
4952 * spu-low.c (spu_target_ops): Likewise.
4953 * win32-low.c (win32_target_ops): Likewise.
4954 * target.c (target_can_do_hardware_single_step): New function.
4955 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4956 Remove. <supports_hardware_single_step>: New field.
4957 (target_supports_conditional_breakpoints): Remove.
4958 (target_supports_hardware_single_step): New macro.
4959 (target_can_do_hardware_single_step): Declare.
4960 * server.c (handle_query): Use target_supports_hardware_single_step
4961 instead of target_supports_conditional_breakpoints.
4962
ade90bde
YQ
49632015-09-15 Yao Qi <yao.qi@linaro.org>
4964
4965 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4966 function.
4967 (struct linux_target_ops the_low_target): Install
4968 aarch64_linux_siginfo_fixup.
4969
94585166
DB
49702015-09-11 Don Breazeal <donb@codesourcery.com>
4971 Luis Machado <lgustavo@codesourcery.com>
4972
4973 * linux-low.c (linux_mourn): Static declaration.
4974 (linux_arch_setup): Move in front of
4975 handle_extended_wait.
4976 (linux_arch_setup_thread): New function.
4977 (handle_extended_wait): Handle exec events. Call
4978 linux_arch_setup_thread. Make event_lwp argument a
4979 pointer-to-a-pointer.
4980 (check_zombie_leaders): Do not check stopped threads.
4981 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4982 (linux_low_filter_event): Add lwp and thread for exec'ing
4983 non-leader thread if leader thread has been deleted.
4984 Refactor code into linux_arch_setup_thread and call it.
4985 Pass child lwp pointer by reference to handle_extended_wait.
4986 (linux_wait_for_event_filtered): Update comment.
4987 (linux_wait_1): Prevent clobbering exec event status.
4988 (linux_supports_exec_events): New function.
4989 (linux_target_ops) <supports_exec_events>: Initialize new member.
4990 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4991 new member.
4992 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4993 * server.c (report_exec_events): New global variable.
4994 (handle_query): Handle qSupported query for exec-events feature.
4995 (captured_main): Initialize report_exec_events.
4996 * server.h (report_exec_events): Declare new global variable.
4997 * target.h (struct target_ops) <supports_exec_events>: New
4998 member.
4999 (target_supports_exec_events): New macro.
5000 * win32-low.c (win32_target_ops) <supports_exec_events>:
5001 Initialize new member.
5002
0568462b
MM
50032015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5004
5005 * linux-low.c (linux_low_enable_btrace): Remove.
5006 (linux_target_ops): Replace linux_low_enable_btrace with
5007 linux_enable_btrace.
5008
39edd165
YQ
50092015-09-03 Yao Qi <yao.qi@linaro.org>
5010
5011 * linux-aarch64-low.c (aarch64_insert_point): Call
5012 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5013 returns true.
5014
1db33b5a
UW
50152015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5016
5017 * linux-low.c (check_stopped_by_breakpoint): Use
5018 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5019
ab290430
PA
50202015-08-27 Pedro Alves <palves@redhat.com>
5021
5022 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5023
8d749320
SM
50242015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5025
6711b7f8
SM
5026 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5027 the XNEW-family equivalent.
8d749320
SM
5028 (compile_bytecodes): Likewise.
5029 * dll.c (loaded_dll): Likewise.
5030 * event-loop.c (append_callback_event): Likewise.
5031 (create_file_handler): Likewise.
5032 (create_file_event): Likewise.
5033 * hostio.c (handle_open): Likewise.
5034 * inferiors.c (add_thread): Likewise.
5035 (add_process): Likewise.
5036 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5037 * linux-arm-low.c (arm_new_process): Likewise.
5038 (arm_new_thread): Likewise.
5039 * linux-low.c (add_to_pid_list): Likewise.
5040 (linux_add_process): Likewise.
5041 (handle_extended_wait): Likewise.
5042 (add_lwp): Likewise.
5043 (enqueue_one_deferred_signal): Likewise.
5044 (enqueue_pending_signal): Likewise.
5045 (linux_resume_one_lwp_throw): Likewise.
5046 (linux_resume_one_thread): Likewise.
5047 (linux_read_memory): Likewise.
5048 (linux_write_memory): Likewise.
5049 * linux-mips-low.c (mips_linux_new_process): Likewise.
5050 (mips_linux_new_thread): Likewise.
5051 (mips_add_watchpoint): Likewise.
5052 * linux-x86-low.c (initialize_low_arch): Likewise.
5053 * lynx-low.c (lynx_add_process): Likewise.
5054 * mem-break.c (set_raw_breakpoint_at): Likewise.
5055 (set_breakpoint): Likewise.
5056 (add_condition_to_breakpoint): Likewise.
5057 (add_commands_to_breakpoint): Likewise.
5058 (clone_agent_expr): Likewise.
5059 (clone_one_breakpoint): Likewise.
5060 * regcache.c (new_register_cache): Likewise.
5061 * remote-utils.c (look_up_one_symbol): Likewise.
5062 * server.c (queue_stop_reply): Likewise.
5063 (start_inferior): Likewise.
5064 (queue_stop_reply_callback): Likewise.
5065 (handle_target_event): Likewise.
5066 * spu-low.c (fetch_ppc_memory): Likewise.
5067 (store_ppc_memory): Likewise.
5068 * target.c (set_target_ops): Likewise.
5069 * thread-db.c (thread_db_load_search): Likewise.
5070 (try_thread_db_load_1): Likewise.
5071 * tracepoint.c (add_tracepoint): Likewise.
5072 (add_tracepoint_action): Likewise.
5073 (create_trace_state_variable): Likewise.
5074 (cmd_qtdpsrc): Likewise.
5075 (cmd_qtro): Likewise.
5076 (add_while_stepping_state): Likewise.
5077 * win32-low.c (child_add_thread): Likewise.
5078 (get_image_name): Likewise.
5079
ed8b7b42
YQ
50802015-08-25 Yao Qi <yao.qi@linaro.org>
5081
5082 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5083
db3cb7cb
YQ
50842015-08-25 Yao Qi <yao.qi@linaro.org>
5085
5086 * Makefile.in (aarch64-linux.o): New rule.
5087 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5088 srv_tgtobj.
5089 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5090 (aarch64_init_debug_reg_state): Make it extern.
5091 (aarch64_linux_prepare_to_resume): Remove.
5092
f6011a1c
YQ
50932015-08-25 Yao Qi <yao.qi@linaro.org>
5094
5095 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5096 lwp_arch_private_info and ptid_of_lwp.
5097
88e2cf7e
YQ
50982015-08-25 Yao Qi <yao.qi@linaro.org>
5099
5100 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5101 Find proc_info by find_process_pid. All callers updated.
5102
5e35436e
YQ
51032015-08-25 Yao Qi <yao.qi@linaro.org>
5104
5105 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5106 Remove.
5107 (debug_reg_change_callback): Remove.
5108 (aarch64_notify_debug_reg_change): Remove.
5109
4a8a7965
YQ
51102015-08-25 Yao Qi <yao.qi@linaro.org>
5111
5112 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5113 Call current_lwp_ptid.
5114
32a271ee
YQ
51152015-08-25 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-aarch64-low.c (debug_reg_change_callback): Use
5118 debug_printf.
5119
0d51c8d7
YQ
51202015-08-25 Yao Qi <yao.qi@linaro.org>
5121
5122 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5123
31a43dd5
YQ
51242015-08-25 Yao Qi <yao.qi@linaro.org>
5125
5126 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5127
8ee52567
YQ
51282015-08-25 Yao Qi <yao.qi@linaro.org>
5129
5130 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5131 the code.
5132
ff3f0f45
YQ
51332015-08-25 Yao Qi <yao.qi@linaro.org>
5134
5135 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5136 Remove.
5137 (debug_reg_change_callback): Remove argument entry and add argument
5138 lwp. Remove local variable thread. Don't print thread id in the
5139 debugging output. Don't check whether pid of thread equals to pid.
5140 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5141 iterate_over_lwps instead find_inferior.
5142
3d40fbb5
PA
51432015-08-24 Pedro Alves <palves@redhat.com>
5144
5145 * inferiors.c (get_first_process): New function.
5146 * inferiors.h (get_first_process): New declaration.
5147 * remote-utils.c (read_ptid): Default to the first process in the
5148 list, instead of to the current thread's process.
5149
438e1e42
PA
51502015-08-24 Pedro Alves <palves@redhat.com>
5151
5152 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5153 * event-loop.c: Likewise.
5154 * remote-utils.c: Likewise.
5155 * tracepoint.c: Likewise.
5156
a8c6d4fc
PA
51572015-08-24 Pedro Alves <palves@redhat.com>
5158
5159 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5160 ptid_get_lwp.
5161
99b0bb12
PA
51622015-08-21 Pedro Alves <palves@redhat.com>
5163
5164 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5165 instead of literal 1.
5166
f8904751
PA
51672015-08-21 Pedro Alves <palves@redhat.com>
5168
5169 * tdesc.c (default_description): Explicitly zero-initialize.
5170
465a859e
PA
51712015-08-21 Pedro Alves <palves@redhat.com>
5172
5173 PR gdb/18749
5174 * inferiors.c (remove_thread): Discard any pending stop reply for
5175 this thread.
5176 * server.c (remove_all_on_match_pid): Rename to ...
5177 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5178 instead of a pid.
5179 (discard_queued_stop_replies): Change parameter to a ptid. Now
5180 extern.
5181 (handle_v_kill, kill_inferior_callback, captured_main)
5182 (process_serial_event): Adjust.
5183 * server.h (discard_queued_stop_replies): Declare.
5184
f0db101d
PA
51852015-08-21 Pedro Alves <palves@redhat.com>
5186
5187 * linux-low.c (wait_for_sigstop): Always switch to no thread
5188 selected if the previously current thread dies.
5189 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5190 process instead of the current thread's.
5191 * remote-utils.c (input_interrupt): Don't check if there's no
5192 current thread.
5193 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5194 current thread to the general thread fails, error out.
5195 (handle_qxfer_auxv, handle_qxfer_libraries)
5196 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5197 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5198 (handle_query): Check if there's a thread selected instead of
5199 checking whether there's any thread in the thread list.
5200 (handle_qxfer_threads, handle_qxfer_btrace)
5201 (handle_qxfer_btrace_conf): Don't error out early if there's no
5202 thread in the thread list.
5203 (handle_v_cont, myresume): Don't set the current thread to the
5204 continue thread.
5205 (process_serial_event) <Hg handling>: Also set thread_id if the
5206 previous general thread is still alive.
5207 (process_serial_event) <g/G handling>: If setting the current
5208 thread to the general thread fails, error out.
5209 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5210 thread's lwp instead of the current thread's.
5211 * target.c (set_desired_thread): If the desired thread was not
5212 found, leave the current thread pointing to NULL. Return an int
5213 (boolean) indicating success.
5214 * target.h (set_desired_thread): Change return type to int.
5215
40045d91
MF
52162015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5217
5218 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5219 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5220 #includes.
5221 (ps_get_thread_area): New function.
5222
45face3b
GB
52232015-08-19 Gary Benson <gbenson@redhat.com>
5224
5225 * hostio.c (handle_pread): Do not attempt to read more data
5226 than hostio_reply_with_data can fit in a packet.
5227
16d5f642
JB
52282015-08-18 Joel Brobecker <brobecker@adacore.com>
5229
5230 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5231
a738da3a
MF
52322015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5233
5234 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5235
33ebda9d
PA
52362015-08-06 Pedro Alves <palves@redhat.com>
5237
5238 * tracepoint.c (expr_eval_result): Now an int.
5239
a44892be
PA
52402015-08-06 Pedro Alves <palves@redhat.com>
5241
5242 * gdbthread.h (struct regcache): Forward declare.
5243 (struct thread_info) <regcache_data>: Now a struct regcache
5244 pointer.
5245 * inferiors.c (inferior_regcache_data)
5246 (set_inferior_regcache_data): Now work with struct regcache
5247 pointers.
5248 * inferiors.h (struct regcache): Forward declare.
5249 (inferior_regcache_data, set_inferior_regcache_data): Now work
5250 with struct regcache pointers.
5251 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5252 (free_register_cache_thread): Remove struct regcache pointer
5253 casts.
5254
608a1e46
PA
52552015-08-06 Pedro Alves <palves@redhat.com>
5256
5257 * server.c (captured_main): On error, print the exception message
5258 to stderr, and if run_once is set, throw a quit.
5259
f0ce0d3a
PA
52602015-08-06 Pedro Alves <palves@redhat.com>
5261
5262 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5263 the current thread.
5264
bf47e248
PA
52652015-08-06 Pedro Alves <palves@redhat.com>
5266
5267 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5268 reading beyond the passed in buffer length.
5269
b6b9ffcc
PL
52702015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5271
5272 * tracepoint.c (symbol_list) <required>: Remove.
5273
863d01bd
PA
52742015-08-06 Pedro Alves <palves@redhat.com>
5275
5276 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5277 count if stopping and suspending threads.
5278 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5279 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5280 (linux_detach): Complete an ongoing step-over.
5281 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5282 throughout.
5283 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5284 (linux_wait_1): If passing a signal to the inferior after
5285 finishing a step-over, unsuspend and re-resume all lwps. If we
5286 see a single-step event but the thread should be continuing, don't
5287 pass the trap to gdb.
5288 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5289 internal_error instead of gdb_assert.
5290 (enqueue_pending_signal): New function.
5291 (check_ptrace_stopped_lwp_gone): Add debug output.
5292 (start_step_over): Use internal_error instead of gdb_assert.
5293 (complete_ongoing_step_over): New function.
5294 (linux_resume_one_thread): Don't resume a suspended thread.
5295 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5296 it stepping.
5297
00db26fa
PA
52982015-08-06 Pedro Alves <palves@redhat.com>
5299
5300 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5301 (linux_thread_alive): Use lwp_is_marked_dead.
5302 (extended_event_reported): Delete.
5303 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5304 instead of extended_event_reported.
5305 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5306 as well.
5307 (lwp_is_marked_dead): New function.
5308 (lwp_running): Use lwp_is_marked_dead.
5309 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5310 comment.
5311
ad071a30
PA
53122015-08-06 Pedro Alves <palves@redhat.com>
5313
5314 * linux-low.c (linux_wait_1): Move fork event output out of the
5315 !report_to_gdb check. Pass event_child->waitstatus to
5316 target_waitstatus_to_string instead of ourstatus.
5317
524b57e6
YQ
53182015-08-04 Yao Qi <yao.qi@linaro.org>
5319
5320 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5321 if current_thread is 32 bit.
5322
6085d6f6
YQ
53232015-08-04 Yao Qi <yao.qi@linaro.org>
5324
5325 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5326 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5327 * server.c (extended_protocol): Remove "static".
5328 * server.h (extended_protocol): Declare it.
5329
8a7e4587
YQ
53302015-08-04 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5333 both aarch64 and aarch32.
5334 (aarch64_set_pc): Likewise.
5335
3b53ae99
YQ
53362015-08-04 Yao Qi <yao.qi@linaro.org>
5337
5338 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5339 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5340 arm-with-neon.xml to srv_xmlfiles.
5341 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5342 (is_64bit_tdesc): New function.
5343 (aarch64_linux_read_description): New function.
5344 (aarch64_arch_setup): Call aarch64_linux_read_description.
5345 (regs_info): Rename to regs_info_aarch64.
5346 (aarch64_regs_info): Return right regs_info.
5347 (initialize_low_arch): Call initialize_low_arch_aarch32.
5348
bd9e6534
YQ
53492015-08-04 Yao Qi <yao.qi@linaro.org>
5350
5351 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5352 * linux-aarch32-low.c: New file.
5353 * linux-aarch32-low.h: New file.
5354 * linux-arm-low.c (arm_fill_gregset): Move it to
5355 linux-aarch32-low.c.
5356 (arm_store_gregset): Likewise.
5357 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5358 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5359 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5360 (regs_info): Rename to regs_info_arm.
5361 (arm_regs_info): Return regs_info_aarch32 if
5362 have_ptrace_getregset is 1 and target description is
5363 arm_with_neon or arm_with_vfpv3.
5364 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5365 Call initialize_low_arch_aarch32 instead.
5366
ded48a5e
YQ
53672015-08-04 Yao Qi <yao.qi@linaro.org>
5368
5369 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5370 * linux-low.c: ... here.
5371 * linux-low.h (have_ptrace_getregset): Declare it.
5372
96e9210f
PA
53732015-08-04 Pedro Alves <palves@redhat.com>
5374
5375 * thread-db.c (struct thread_db): Use new typedefs.
5376 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5377 CHK calls.
5378 (disable_thread_event_reporting): Cast result of dlsym to
5379 destination function pointer type.
5380 (thread_db_mourn): Use td_ta_delete_ftype.
5381
af60a1ef
SL
53822015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5383
5384 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5385 arch variant.
5386 (CDX_BREAKPOINT): Define for R2.
5387 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5388 (the_low_target): Add comments.
5389
e8b41681
YQ
53902015-07-30 Yao Qi <yao.qi@linaro.org>
5391
5392 * linux-arm-low.c (arm_hwcap): Remove it.
5393 (arm_read_description): New local variable arm_hwcap. Don't
5394 set arm_hwcap to zero.
5395
89abb039
YQ
53962015-07-30 Yao Qi <yao.qi@linaro.org>
5397
5398 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5399 Use regcache->tdesc instead.
5400 (arm_store_wmmxregset): Likewise.
5401 (arm_fill_vfpregset): Likewise.
5402 (arm_store_vfpregset): Likewise.
5403
deca266c
YQ
54042015-07-30 Yao Qi <yao.qi@linaro.org>
5405
5406 * linux-arm-low.c: Include arch/arm.h.
5407 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5408 (arm_store_gregset): Likewise.
5409
aa58a496
SM
54102015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5411
5412 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5413 ptrace's 4th parameter.
5414
50904b25
YQ
54152015-07-27 Yao Qi <yao.qi@linaro.org>
5416
5417 * configure.srv (case aarch64*-*-linux*): Don't set
5418 srv_linux_usrregs.
5419
5826e159
PA
54202015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5421
5422 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5423 sys/ptrace.h.
5424 * linux-arm-low.c: Likewise.
5425 * linux-cris-low.c: Likewise.
5426 * linux-crisv32-low.c: Likewise.
5427 * linux-low.c: Likewise.
5428 * linux-m68k-low.c: Likewise.
5429 * linux-mips-low.c: Likewise.
5430 * linux-nios2-low.c: Likewise.
5431 * linux-s390-low.c: Likewise.
5432 * linux-sparc-low.c: Likewise.
5433 * linux-tic6x-low.c: Likewise.
5434 * linux-tile-low.c: Likewise.
5435 * linux-x86-low.c: Likewise.
5436
54019719
PA
54372015-07-24 Pedro Alves <palves@redhat.com>
5438
5439 * config.in: Regenerate.
5440 * configure: Regenerate.
5441
eb7aa561
PA
54422015-07-24 Pedro Alves <palves@redhat.com>
5443
5444 * acinclude.m4: Include ../ptrace.m4.
5445 * configure.ac: Call GDB_AC_PTRACE.
5446 * config.in, configure: Regenerate.
5447
55d7b841
YQ
54482015-07-24 Yao Qi <yao.qi@linaro.org>
5449
5450 * linux-low.c (linux_create_inferior): Remove setting to
5451 proc->priv->new_inferior.
5452 (linux_attach): Likewise.
5453 (linux_low_filter_event): Likewise.
5454 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5455
c06cbd92
YQ
54562015-07-24 Yao Qi <yao.qi@linaro.org>
5457
5458 * linux-low.c (linux_arch_setup): New function.
5459 (linux_low_filter_event): If proc->tdesc is NULL and
5460 proc->attached is true, call the_low_target.arch_setup.
5461 Otherwise, keep status pending, and return.
5462 (linux_resume_one_lwp_throw): Don't call get_pc if
5463 thread->while_stepping isn't NULL. Don't call
5464 get_thread_regcache if proc->tdesc is NULL.
5465 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5466 (linux_target_ops): Install arch_setup.
5467 * server.c (start_inferior): Call the_target->arch_setup.
5468 * target.h (struct target_ops) <arch_setup>: New field.
5469 (target_arch_setup): New marco.
5470 * lynx-low.c (lynx_target_ops): Update.
5471 * nto-low.c (nto_target_ops): Update.
5472 * spu-low.c (spu_target_ops): Update.
5473 * win32-low.c (win32_target_ops): Update.
5474
5ae3ebba
YQ
54752015-07-24 Yao Qi <yao.qi@linaro.org>
5476
5477 * linux-low.c (linux_add_process): Don't set
5478 proc->priv->new_inferior.
5479 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5480 (linux_attach): Likewise.
5481
eb97750b
YQ
54822015-07-24 Yao Qi <yao.qi@linaro.org>
5483
5484 * server.c (start_inferior): Code refactor.
5485
51aee833
YQ
54862015-07-24 Yao Qi <yao.qi@linaro.org>
5487
5488 * server.c (process_serial_event): Set general_thread.
5489
af1b22f3
YQ
54902015-07-21 Yao Qi <yao.qi@linaro.org>
5491
5492 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5493 aarch64_linux_get_debug_reg_capacity.
5494
554717a3
YQ
54952015-07-17 Yao Qi <yao.qi@linaro.org>
5496
5497 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5498 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5499 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5500 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5501 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5502 (AARCH64_HWP_ALIGNMENT): Likewise.
5503 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5504 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5505 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5506 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5507 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5508 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5509 (struct aarch64_debug_reg_state): Likewise.
5510 (struct arch_lwp_info): Likewise.
5511 (aarch64_align_watchpoint): Likewise.
5512 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5513 (aarch64_watchpoint_length): Likewise.
5514 (aarch64_point_encode_ctrl_reg): Likewise
5515 (aarch64_point_is_aligned): Likewise.
5516 (aarch64_align_watchpoint): Likewise.
5517 (aarch64_linux_set_debug_regs):
5518 (aarch64_dr_state_insert_one_point): Likewise.
5519 (aarch64_dr_state_remove_one_point): Likewise.
5520 (aarch64_handle_breakpoint): Likewise.
5521 (aarch64_handle_aligned_watchpoint): Likewise.
5522 (aarch64_handle_unaligned_watchpoint): Likewise.
5523 (aarch64_handle_watchpoint): Likewise.
5524
c67ca4de
YQ
55252015-07-17 Yao Qi <yao.qi@linaro.org>
5526
5527 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5528 and don't aarch64_get_debug_reg_state. All callers update.
5529 (aarch64_handle_aligned_watchpoint): Likewise.
5530 (aarch64_handle_unaligned_watchpoint): Likewise.
5531 (aarch64_handle_watchpoint): Likewise.
5532 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5533 (aarch64_remove_point): Likewise.
5534
25abf979
YQ
55352015-07-17 Yao Qi <yao.qi@linaro.org>
5536
5537 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5538 debug_printf.
5539 (aarch64_handle_unaligned_watchpoint): Likewise.
5540
db1ff28b
JK
55412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5542
5543 Revert the previous 3 commits:
5544 Move gdb_regex* to common/
5545 Move linux_find_memory_regions_full & co.
5546 gdbserver build-id attribute generator
5547
700ca40f
JK
55482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5549 Jan Kratochvil <jan.kratochvil@redhat.com>
5550
5551 gdbserver build-id attribute generator.
5552 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5553 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5554 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5555 (find_phdr): New.
5556 (get_dynamic): Use find_pdhr to traverse program headers.
5557 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5558 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5559 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5560 (get_hex_build_id): New.
5561 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5562 to reply XML document.
5563
9904185c
JK
55642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5565 Jan Kratochvil <jan.kratochvil@redhat.com>
5566
5567 * target.c: Include target/target-utils.h and fcntl.h.
5568 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5569 (target_fileio_read_stralloc): New functions.
5570
6e5b4429
JK
55712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5572
5573 * Makefile.in (OBS): Add gdb_regex.o.
5574 (gdb_regex.o): New.
5575 * config.in: Rebuilt.
5576 * configure: Rebuilt.
5577
ddc98fbf
JK
55782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5579 Jan Kratochvil <jan.kratochvil@redhat.com>
5580
5581 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5582 * Makefile.in (OBS): Add target-utils.o.
5583 (linux-maps.o, target-utils.o): New.
5584 * configure.srv (srv_linux_obj): Add linux-maps.o.
5585
e57bb7a0
PL
55862015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5587
5588 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5589 function, return 1.
5590 (the_low_target): Install it.
5591
586b02a9
PA
55922015-07-14 Pedro Alves <palves@redhat.com>
5593
5594 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5595 Instead, ignore ECHILD, and throw an error for other errnos.
5596
58c1b36c
PA
55972015-07-10 Pedro Alves <palves@redhat.com>
5598
5599 * event-loop.c (struct callback_event) <data>: Change type to
5600 gdb_client_data instance instead of gdb_client_data pointer.
5601 (append_callback_event): Adjust.
5602
421530db
PL
56032015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5604
5605 * linux-aarch64-low.c: Add comments for each linux_target_ops
5606 method. Remove comments already covered in target_ops and
5607 linux_target_ops definitions.
5608 (the_low_target): Add comments for each unimplemented method.
5609
c2d65f38
YQ
56102015-07-09 Yao Qi <yao.qi@linaro.org>
5611
5612 * linux-aarch64-low.c (aarch64_regmap): Remove.
5613 (aarch64_usrregs_info): Remove.
5614 (regs_info): Set field usrregs to NULL.
5615
b20a6524
MM
56162015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5617
5618 * linux-low.c: Include "rsp-low.h"
5619 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5620 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5621 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5622 (handle_btrace_enable_pt): New.
5623 (handle_btrace_general_set): Support "pt".
5624 (handle_btrace_conf_general_set): Support "pt:size".
5625
96c97461
PL
56262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5627
5628 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5629 Z_PACKET_SW_BP.
5630
37d66942
PL
56312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5632
5633 * linux-aarch64-low.c: Remove comment about endianness.
5634 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5635 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5636 memcmp.
5637
dc06243f
GB
56382015-06-24 Gary Benson <gbenson@redhat.com>
5639
5640 * linux-i386-ipa.c (stdint.h): Do not include.
5641 * lynx-i386-low.c (stdint.h): Likewise.
5642 * lynx-ppc-low.c (stdint.h): Likewise.
5643 * mem-break.c (stdint.h): Likewise.
5644 * thread-db.c (stdint.h): Likewise.
5645 * tracepoint.c (stdint.h): Likewise.
5646 * win32-low.c (stdint.h): Likewise.
5647
124e13d9
SM
56482015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5649
5650 * server.c (write_qxfer_response): Update call to
5651 remote_escape_output.
5652
909c2cda
JK
56532015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5654 Jan Kratochvil <jan.kratochvil@redhat.com>
5655
5656 Merge multiple hex conversions.
5657 * gdbreplay.c (tohex): Rename to 'fromhex'.
5658 (logchar): Use fromhex.
5659
24c05f46
JK
56602015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5661
5662 * server.c (handle_qxfer_libraries): Set `version' attribute for
5663 <library-list>.
5664
14d2069a
GB
56652015-06-10 Gary Benson <gbenson@redhat.com>
5666
5667 * target.h (struct target_ops) <multifs_open>: New field.
5668 <multifs_unlink>: Likewise.
5669 <multifs_readlink>: Likewise.
5670 * linux-low.c (nat/linux-namespaces.h): New include.
5671 (linux_target_ops): Initialize the_target->multifs_open,
5672 the_target->multifs_unlink and the_target->multifs_readlink.
5673 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5674 * hostio.c (hostio_fs_pid): New static variable.
5675 (hostio_handle_new_gdb_connection): New function.
5676 (handle_setfs): Likewise.
5677 (handle_open): Use the_target->multifs_open as appropriate.
5678 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5679 (handle_readlink): Use the_target->multifs_readlink as
5680 appropriate.
5681 (handle_vFile): Handle vFile:setfs packets.
5682 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5683 after target_handle_new_gdb_connection.
5684
4b8b5e72
GB
56852015-06-10 Gary Benson <gbenson@redhat.com>
5686
5687 * configure.ac (AC_CHECK_FUNCS): Add setns.
5688 * config.in: Regenerate.
5689 * configure: Likewise.
5690 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5691 (linux-namespaces.o): New rule.
5692 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5693
3ac2e371
GB
56942015-06-09 Gary Benson <gbenson@redhat.com>
5695
5696 * hostio.c (handle_open): Process mode argument with
5697 fileio_to_host_mode.
5698
ca9b78ce
YQ
56992015-06-01 Yao Qi <yao.qi@linaro.org>
5700
5701 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5702 * linux-x86-low.c: Likewise.
5703
bfacd19d
DB
57042015-05-28 Don Breazeal <donb@codesourcery.com>
5705
5706 * linux-low.c (handle_extended_wait): Initialize
5707 thread_info.last_resume_kind for new fork children.
5708
452003ef
PA
57092015-05-15 Pedro Alves <palves@redhat.com>
5710
5711 * target.h (target_handle_new_gdb_connection): Rewrite using if
5712 wrapped in do/while.
5713
1041a03c
JB
57142015-05-14 Joel Brobecker <brobecker@adacore.com>
5715
5716 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5717 * configure, config.in: Regenerate.
5718 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5719 Declare typedef.
5720
c269dbdb
DB
57212015-05-12 Don Breazeal <donb@codesourcery.com>
5722
5723 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5724 PTRACE_EVENT_VFORK_DONE.
5725 (linux_low_ptrace_options, extended_event_reported): Add vfork
5726 events.
5727 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5728 and "vforkdone" for RSP 'T' Stop Reply Packet.
5729 * server.h (report_vfork_events): Declare
5730 global variable.
5731
3a8a0396
DB
57322015-05-12 Don Breazeal <donb@codesourcery.com>
5733
5734 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5735 (the_low_target) <new_fork>: Initialize new member.
5736 * linux-arm-low.c (arm_new_fork): New function.
5737 (the_low_target) <new_fork>: Initialize new member.
5738 * linux-low.c (handle_extended_wait): Call new target function
5739 new_fork.
5740 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5741 * linux-mips-low.c (mips_add_watchpoint): New function
5742 extracted from mips_insert_point.
5743 (the_low_target) <new_fork>: Initialize new member.
5744 (mips_linux_new_fork): New function.
5745 (mips_insert_point): Call mips_add_watchpoint.
5746 * linux-x86-low.c (x86_linux_new_fork): New function.
5747 (the_low_target) <new_fork>: Initialize new member.
5748
de0d863e
DB
57492015-05-12 Don Breazeal <donb@codesourcery.com>
5750
5751 * linux-low.c (handle_extended_wait): Implement return value,
5752 rename argument 'event_child' to 'event_lwp', handle
5753 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5754 (linux_low_ptrace_options): New function.
5755 (linux_low_filter_event): Call linux_low_ptrace_options,
5756 use different argument fo linux_enable_event_reporting,
5757 use return value from handle_extended_wait.
5758 (extended_event_reported): New function.
5759 (linux_wait_1): Call extended_event_reported and set
5760 status to report fork events.
5761 (linux_write_memory): Add pid to debug message.
5762 (reset_lwp_ptrace_options_callback): New function.
5763 (linux_handle_new_gdb_connection): New function.
5764 (linux_target_ops): Initialize new structure member.
5765 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5766 * lynx-low.c: Initialize new structure member.
5767 * remote-utils.c (prepare_resume_reply): Implement stop reason
5768 "fork" for "T" stop message.
5769 * server.c (handle_query): Call handle_new_gdb_connection.
5770 * server.h (report_fork_events): Declare global flag.
5771 * target.h (struct target_ops) <handle_new_gdb_connection>:
5772 New member.
5773 (target_handle_new_gdb_connection): New macro.
5774 * win32-low.c: Initialize new structure member.
5775
ddcbc397
DB
57762015-05-12 Don Breazeal <donb@codesourcery.com>
5777
5778 * mem-break.c (APPEND_TO_LIST): Define macro.
5779 (clone_agent_expr): New function.
5780 (clone_one_breakpoint): New function.
5781 (clone_all_breakpoints): New function.
5782 * mem-break.h: Declare new functions.
5783
89245bc0
DB
57842015-05-12 Don Breazeal <donb@codesourcery.com>
5785
5786 * linux-low.c (linux_supports_fork_events): New function.
5787 (linux_supports_vfork_events): New function.
5788 (linux_target_ops): Initialize new structure members.
5789 (initialize_low): Call linux_check_ptrace_features.
5790 * lynx-low.c (lynx_target_ops): Initialize new structure
5791 members.
5792 * server.c (report_fork_events, report_vfork_events):
5793 New global flags.
5794 (handle_query): Add new features to qSupported packet and
5795 response.
5796 (captured_main): Initialize new global variables.
5797 * target.h (struct target_ops) <supports_fork_events>:
5798 New member.
5799 <supports_vfork_events>: New member.
5800 (target_supports_fork_events): New macro.
5801 (target_supports_vfork_events): New macro.
5802 * win32-low.c (win32_target_ops): Initialize new structure
5803 members.
5804
835205d0
GB
58052015-05-12 Gary Benson <gbenson@redhat.com>
5806
5807 * server.c (handle_qxfer_exec_file): Use current process
5808 if annex is empty.
5809
21e94bd9
SL
58102015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5811
5812 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5813 Remove HAVE_PTRACE_GETREGS conditionals.
5814 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5815 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5816
45614f15
YQ
58172015-05-08 Yao Qi <yao.qi@linaro.org>
5818
5819 * linux-low.c (linux_supports_conditional_breakpoints): New
5820 function.
5821 (linux_target_ops): Install new target method.
5822 * lynx-low.c (lynx_target_ops): Install NULL hook for
5823 supports_conditional_breakpoints.
5824 * nto-low.c (nto_target_ops): Likewise.
5825 * spu-low.c (spu_target_ops): Likewise.
5826 * win32-low.c (win32_target_ops): Likewise.
5827 * server.c (handle_query): Check
5828 target_supports_conditional_breakpoints.
5829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5830 New field.
5831 (target_supports_conditional_breakpoints): New macro.
5832
80ad801e
PA
58332015-05-06 Pedro Alves <palves@redhat.com>
5834
5835 PR server/18081
5836 * server.c (start_inferior): If the process exits, mourn it.
5837
819843c7
GB
58382015-04-21 Gary Benson <gbenson@redhat.com>
5839
5840 * hostio.c (fileio_open_flags_to_host): Factored out to
5841 fileio_to_host_openflags in common/fileio.c. Single use
5842 updated.
5843
a2d5a9d7
MF
58442015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5845
5846 * linux-xtensa-low.c (xtensa_fill_gregset)
5847 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5848 XCHAL_HAVE_LOOP.
5849
deb44829
MF
58502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5851
5852 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5853 (regs_info): Replace usrregs pointer with NULL.
5854
e57f1de3
GB
58552015-04-17 Gary Benson <gbenson@redhat.com>
5856
5857 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5858 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5859 * server.c (handle_qxfer_exec_file): New function.
5860 (qxfer_packets): Add exec-file entry.
5861 (handle_query): Report qXfer:exec-file:read as supported packet.
5862
62828379
RN
58632015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5864
5865 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5866
b88bb450
GB
58672015-04-09 Gary Benson <gbenson@redhat.com>
5868
5869 * hostio-errno.c (errno_to_fileio_error): Remove function.
5870 Update caller to use remote_fileio_to_fio_error.
5871
c8f4bfdd
YQ
58722015-04-09 Yao Qi <yao.qi@linaro.org>
5873
5874 * linux-low.c (linux_insert_point): Call
5875 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5876 (linux_remove_point): Call remove_memory_breakpoint if type is
5877 raw_bkpt_type_sw.
5878 * linux-x86-low.c (x86_insert_point): Don't call
5879 insert_memory_breakpoint.
5880 (x86_remove_point): Don't call remove_memory_breakpoint.
5881
41f98f02
PA
58822015-04-01 Pedro Alves <palves@redhat.com>
5883 Cleber Rosa <crosa@redhat.com>
5884
5885 * server.c (gdbserver_usage): Reorganize and extend the usage
5886 message.
5887
2bf6fb9d
PA
58882015-03-24 Pedro Alves <palves@redhat.com>
5889
5890 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5891 output. Also dump TRAP_TRACE.
5892 (linux_low_filter_event): In debug output, distinguish a
5893 resume_stop SIGSTOP from a delayed SIGSTOP.
5894
369f6daa
GB
58952015-03-24 Gary Benson <gbenson@redhat.com>
5896
5897 * linux-x86-low.c (x86_linux_new_thread): Moved to
5898 nat/x86-linux.c.
5899 (x86_linux_prepare_to_resume): Likewise.
5900
8e5d4070
GB
59012015-03-24 Gary Benson <gbenson@redhat.com>
5902
5903 * Makefile.in (x86-linux-dregs.o): New rule.
5904 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5905 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5906 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5907 (x86_linux_dr_get): Likewise.
5908 (x86_linux_dr_set): Likewise.
5909 (update_debug_registers_callback): Likewise.
5910 (x86_linux_dr_set_addr): Likewise.
5911 (x86_linux_dr_get_addr): Likewise.
5912 (x86_linux_dr_set_control): Likewise.
5913 (x86_linux_dr_get_control): Likewise.
5914 (x86_linux_dr_get_status): Likewise.
5915 (x86_linux_update_debug_registers): Likewise.
5916
2b95d440
GB
59172015-03-24 Gary Benson <gbenson@redhat.com>
5918
5919 * linux-x86-low.c (x86_linux_update_debug_registers):
5920 New function, factored out from...
5921 (x86_linux_prepare_to_resume): ...this.
5922
14b0bc68
GB
59232015-03-24 Gary Benson <gbenson@redhat.com>
5924
5925 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5926 (x86_linux_dr_set): Likewise.
5927 (update_debug_registers_callback): Likewise.
5928 (x86_linux_dr_set_addr): Likewise.
5929 (x86_linux_dr_get_addr): Likewise.
5930 (x86_linux_dr_set_control): Likewise.
5931 (x86_linux_dr_get_control): Likewise.
5932 (x86_linux_dr_get_status): Likewise.
5933 (x86_linux_prepare_to_resume): Likewise.
5934
5dfe6ca8
GB
59352015-03-24 Gary Benson <gbenson@redhat.com>
5936
5937 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5938 Use perror_with_name. Pass string through gettext.
5939 (x86_linux_dr_set): Likewise.
5940
d33472ad
GB
59412015-03-24 Gary Benson <gbenson@redhat.com>
5942
5943 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5944 (x86_linux_dr_set_addr): ...this.
5945 (x86_dr_low_get_addr): Rename to...
5946 (x86_linux_dr_get_addr): ...this.
5947 (x86_dr_low_set_control): Rename to...
5948 (x86_linux_dr_set_control): ...this.
5949 (x86_dr_low_get_control): Rename to...
5950 (x86_linux_dr_get_control): ...this.
5951 (x86_dr_low_get_status): Rename to...
5952 (x86_linux_dr_get_status): ...this.
5953 (x86_dr_low): Update with new function names.
5954
4b134ca1
GB
59552015-03-24 Gary Benson <gbenson@redhat.com>
5956
5957 * Makefile.in (x86-linux.o): New rule.
5958 * configure.srv: Add x86-linux.o to relevant targets.
5959 * linux-low.c (lwp_set_arch_private_info): New function.
5960 (lwp_arch_private_info): Likewise.
5961 * linux-x86-low.c: Include nat/x86-linux.h.
5962 (arch_lwp_info): Removed structure.
5963 (update_debug_registers_callback):
5964 Use lwp_set_debug_registers_changed.
5965 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5966 and lwp_set_debug_registers_changed.
5967 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5968
34c703da
GB
59692015-03-24 Gary Benson <gbenson@redhat.com>
5970
5971 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5972 * linux-arm-low.c (arm_new_thread): Likewise.
5973 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5974 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5975 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5976 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5977
cff068da
GB
59782015-03-24 Gary Benson <gbenson@redhat.com>
5979
5980 * linux-low.c (ptid_of_lwp): New function.
5981 (lwp_is_stopped): Likewise.
5982 (lwp_stop_reason): Likewise.
5983 * linux-x86-low.c (update_debug_registers_callback):
5984 Use lwp_is_stopped.
5985 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5986 lwp_stop_reason.
5987
b2f7c7e8
GB
59882015-03-24 Gary Benson <gbenson@redhat.com>
5989
5990 * linux-low.h (linux_stop_lwp): Remove declaration.
5991
6d4ee8c6
GB
59922015-03-24 Gary Benson <gbenson@redhat.com>
5993
5994 * linux-low.h: Include nat/linux-nat.h.
5995 * linux-low.c (iterate_over_lwps_args): New structure.
5996 (iterate_over_lwps_filter): New function.
5997 (iterate_over_lwps): Likewise.
5998 * linux-x86-low.c (update_debug_registers_callback):
5999 Update signature to what iterate_over_lwps expects.
6000 Remove PID check that iterate_over_lwps now performs.
6001 (x86_dr_low_set_addr): Use iterate_over_lwps.
6002 (x86_dr_low_set_control): Likewise.
6003
70a0bb6b
GB
60042015-03-24 Gary Benson <gbenson@redhat.com>
6005
6006 * linux-x86-low.c (x86_debug_reg_state): New function.
6007 (x86_linux_prepare_to_resume): Use the above.
6008
7b669087
GB
60092015-03-24 Gary Benson <gbenson@redhat.com>
6010
6011 * linux-low.c (current_lwp_ptid): New function.
6012 * linux-x86-low.c: Include nat/linux-nat.h.
6013 (x86_dr_low_get_addr): Use current_lwp_ptid.
6014 (x86_dr_low_get_control): Likewise.
6015 (x86_dr_low_get_status): Likewise.
6016
eef49a3d
PA
60172015-03-20 Pedro Alves <palves@redhat.com>
6018
6019 * tracepoint.c (cmd_qtstatus): Make "str" const.
6020
b2333d22
PA
60212015-03-20 Pedro Alves <palves@redhat.com>
6022
6023 * server.c (handle_general_set): Make "req_str" const.
6024
23f238d3
PA
60252015-03-19 Pedro Alves <palves@redhat.com>
6026
6027 * linux-low.c (linux_resume_one_lwp): Rename to ...
6028 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6029 instead call perror_with_name.
6030 (check_ptrace_stopped_lwp_gone): New function.
6031 (linux_resume_one_lwp): Reimplement as wrapper around
6032 linux_resume_one_lwp_throw that swallows errors if the LWP is
6033 gone.
6034
91baf43f
PA
60352015-03-19 Pedro Alves <palves@redhat.com>
6036
6037 * linux-low.c (count_events_callback, select_event_lwp_callback):
6038 No longer check whether the thread has resume_stop as last resume
6039 kind.
6040
8bf3b159
PA
60412015-03-19 Pedro Alves <palves@redhat.com>
6042
6043 * linux-low.c (count_events_callback, select_event_lwp_callback):
6044 Use the lwp's status_pending_p field, not the thread's.
6045
b90fc188
PA
60462015-03-19 Pedro Alves <palves@redhat.com>
6047
6048 * linux-low.c (select_event_lwp_callback): Update comments to
6049 no longer mention SIGTRAP.
6050
464b0089
GB
60512015-03-18 Gary Benson <gbenson@redhat.com>
6052
6053 * server.c (handle_query): Do not report vFile:fstat as supported.
6054
aa9e327f
GB
60552015-03-11 Gary Benson <gbenson@redhat.com>
6056
6057 * hostio.c (sys/types.h): New include.
6058 (sys/stat.h): Likewise.
6059 (common-remote-fileio.h): Likewise.
6060 (handle_fstat): New function.
6061 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6062
791c0056
GB
60632015-03-11 Gary Benson <gbenson@redhat.com>
6064
6065 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6066 struct stat.st_blocks and struct stat.st_blksize.
6067 * configure: Regenerate.
6068 * config.in: Likewise.
6069 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6070 (OBS): Add common-remote-fileio.o.
6071 (common-remote-fileio.o): New rule.
6072
9a9df970
PA
60732015-03-09 Pedro Alves <palves@redhat.com>
6074
6075 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6076 'struct sockaddr' pointer in 'accept' call.
6077
9eb1356e
PA
60782015-03-09 Pedro Alves <palves@redhat.com>
6079
6080 Revert:
6081 2015-03-07 Pedro Alves <palves@redhat.com>
6082 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6083 or <winsock2.h> here. Instead include "gdb_socket.h".
6084 (remote_open): Use union gdb_sockaddr_u.
6085 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6086 or <winsock2.h> here. Instead include "gdb_socket.h".
6087 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6088 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6089 or <sys/un.h>.
6090 (init_named_socket, gdb_agent_helper_thread): Use union
6091 gdb_sockaddr_u.
6092
aac331e4
PA
60932015-03-07 Pedro Alves <palves@redhat.com>
6094
6095 * configure.ac (build_warnings): Move
6096 -Wdeclaration-after-statement to the C-specific set.
6097 * configure: Regenerate.
6098
366c75fc
PA
60992015-03-07 Pedro Alves <palves@redhat.com>
6100
6101 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6102 or <winsock2.h> here. Instead include "gdb_socket.h".
6103 (remote_open): Use union gdb_sockaddr_u.
6104 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6105 or <winsock2.h> here. Instead include "gdb_socket.h".
6106 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6107 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6108 or <sys/un.h>.
6109 (init_named_socket, gdb_agent_helper_thread): Use union
6110 gdb_sockaddr_u.
6111
492d29ea
PA
61122015-03-07 Pedro Alves <palves@redhat.com>
6113
6114 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6115 instead.
6116
60a191ed
YQ
61172015-03-06 Yao Qi <yao.qi@linaro.org>
6118
6119 * linux-aarch64-low.c (aarch64_insert_point): Use
6120 show_debug_regs as a boolean.
6121 (aarch64_remove_point): Likewise.
6122
f5771b1d
PA
61232015-03-05 Pedro Alves <palves@redhat.com>
6124
6125 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6126 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6127 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6128 * nto-low.c (nto_target_ops): Likewise.
6129 * spu-low.c (spu_target_ops): Likewise.
6130 * win32-low.c (win32_target_ops): Likewise.
6131
3e572f71
PA
61322015-03-04 Pedro Alves <palves@redhat.com>
6133
72f4393d 6134 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6135 Decide whether a breakpoint triggered based on the SIGTRAP's
6136 siginfo.si_code.
72f4393d
L
6137 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6138 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6139 (linux_low_filter_event): Check for breakpoints before checking
6140 watchpoints.
6141 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6142 siginfo.si_code.
72f4393d
L
6143 (linux_stopped_by_sw_breakpoint)
6144 (linux_supports_stopped_by_sw_breakpoint)
6145 (linux_stopped_by_hw_breakpoint)
6146 (linux_supports_stopped_by_hw_breakpoint): New functions.
6147 (linux_target_ops): Install new target methods.
3e572f71 6148
1ec68e26
PA
61492015-03-04 Pedro Alves <palves@redhat.com>
6150
6151 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6152 * server.c (swbreak_feature, hwbreak_feature): New globals.
6153 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6154 (captured_main): Clear swbreak_feature and hwbreak_feature.
6155 * server.h (swbreak_feature, hwbreak_feature): Declare.
6156 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6157 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6158 supports_stopped_by_hw_breakpoint>: New fields.
6159 (target_supports_stopped_by_sw_breakpoint)
6160 (target_stopped_by_sw_breakpoint)
6161 (target_supports_stopped_by_hw_breakpoint)
6162 (target_stopped_by_hw_breakpoint): Declare.
6163
15c66dd6
PA
61642015-03-04 Pedro Alves <palves@redhat.com>
6165
6166 enum lwp_stop_reason -> enum target_stop_reason
6167 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6168 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6169 (linux_wait_1, stuck_in_jump_pad_callback)
6170 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6171 (linux_stopped_by_watchpoint):
6172 * linux-low.h (enum lwp_stop_reason): Delete.
6173 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6174 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6175
98fc70d6
YQ
61762015-03-04 Yao Qi <yao.qi@linaro.org>
6177
6178 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6179
dd2ac174
GB
61802015-03-03 Gary Benson <gbenson@redhat.com>
6181
6182 * hostio.c (handle_vFile): Fix prefix lengths.
6183
d68e53f4
MM
61842015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6185
6186 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6187 ptr_bits.
6188
bf2d68ab
AA
61892015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6190
6191 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6192 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6193 (clean): Add "rm -f" for above C files.
6194 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6195 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6196 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6197 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6198 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6199 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6200 (init_registers_s390x_vx_linux64)
6201 (init_registers_s390x_tevx_linux64)
6202 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6203 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6204 declarations.
6205 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6206 (s390_store_vxrs_high): New functions.
6207 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6208 NT_S390_VXRS_HIGH.
6209 (s390_arch_setup): Add logic for selecting one of the new target
6210 descriptions. Activate the new vector regsets if applicable.
6211 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6212 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6213 and init_registers_s390x_tevx_linux64.
6214
c966a859
PA
62152015-03-01 Pedro Alves <palves@redhat.com>
6216
6217 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6218 parameter.
6219
4180215b
PA
62202015-02-27 Pedro Alves <palves@redhat.com>
6221
6222 * linux-x86-low.c (u_debugreg_offset): New function.
6223 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6224
749bab01
PA
62252015-02-27 Pedro Alves <palves@redhat.com>
6226
6227 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6228 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6229 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6230 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6231 (ps_lsetfpregs, ps_getpid)
6232 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6233 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6234 (ps_lsetxregs, ps_plog): Declare.
6235
3c14e5a3
PA
62362015-02-27 Pedro Alves <palves@redhat.com>
6237
6238 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6239 IP_AGENT_EXPORT_FUNC.
6240 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6241 IP_AGENT_EXPORT_FUNC.
6242 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6243 (IP_AGENT_EXPORT): Delete.
6244 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6245 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6246 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6247 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6248 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6249 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6250 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6251 (traceframe_read_count, traceframe_write_count)
6252 (traceframes_created, trace_state_variables, get_raw_reg)
6253 (get_trace_state_variable_value, set_trace_state_variable_value)
6254 (ust_loaded, helper_thread_id, cmd_buf): Use
6255 IPA_SYM_EXPORTED_NAME.
6256 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6257 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6258 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6259 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6260 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6261 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6262 EXTERN_C_PUSH/EXTERN_C_POP.
6263 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6264 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6265 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6266 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6267 (traceframe_write_count, traceframe_read_count)
6268 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6269 (about_to_request_buffer_space, get_trace_state_variable_value)
6270 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6271 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6272 EXTERN_C_PUSH/EXTERN_C_POP.
6273 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6274 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6275 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6276 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6277 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6278 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6279 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6280 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6281 Define.
6282 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6283 (IP_AGENT_EXPORT_VAR_DECL): Define.
6284 (tracing): Declare.
6285 (gdb_agent_get_raw_reg): Declare.
6286
fe978cb0
PA
62872015-02-27 Tom Tromey <tromey@redhat.com>
6288 Pedro Alves <palves@redhat.com>
6289
6290 Rename symbols whose names are reserved C++ keywords throughout.
6291
3bc3d82a
PA
62922015-02-27 Pedro Alves <palves@redhat.com>
6293
6294 * Makefile.in (COMPILER): New, get it from autoconf.
6295 (CXX): Get from autoconf instead.
6296 (COMPILE.pre): Use COMPILER.
6297 (CC-LD): Rename to ...
6298 (CC_LD): ... this. Use COMPILER.
6299 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6300 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6301 * acinclude.m4: Include build-with-cxx.m4.
6302 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6303 Disable -Werror by default if building in C++ mode.
6304 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6305 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6306 the C++ compiler. Save/restore CXXFLAGS too.
6307 * configure: Regenerate.
6308
07697489
PA
63092015-02-27 Pedro Alves <palves@redhat.com>
6310
6311 * acinclude.m4: Include libiberty.m4.
6312 * configure.ac: Call libiberty_INIT.
6313 * config.in, configure: Regenerate.
6314
9beb7c4e
PA
63152015-02-26 Pedro Alves <palves@redhat.com>
6316
6317 * linux-low.c (linux_wait_1): When incrementing the PC past a
6318 program breakpoint always use the_low_target.breakpoint_len as
6319 increment, rather than the maximum between that and
6320 the_low_target.decr_pc_after_break.
6321
8090aef2
PA
63222015-02-23 Pedro Alves <palves@redhat.com>
6323
6324 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6325 thread was doing a step-over; always adjust the PC if
6326 we stepped over a permanent breakpoint.
6327 (linux_wait_1): If we stepped over breakpoint that was on top of a
6328 permanent breakpoint, manually advance the PC past it.
6329
bc9540e8
PA
63302015-02-23 Pedro Alves <palves@redhat.com>
6331
6332 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6333 modes.
6334 (x86_fill_gregset, x86_store_gregset): Use it when handling
6335 $orig_eax.
6336
2db9a427
PA
63372015-02-20 Pedro Alves <palves@redhat.com>
6338
6339 * thread-db.c: Include "nat/linux-procfs.h".
6340 (thread_db_init): Skip listing new threads if the kernel supports
6341 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6342
afa8d396
PA
63432015-02-20 Pedro Alves <palves@redhat.com>
6344
6345 * linux-low.c (status_pending_p_callback): Use ptid_match.
6346
c9587f88
AT
63472015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6348
6349 PR breakpoints/16812
6350 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6351 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6352 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6353
b05ec7a5
AT
63542015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6355
6356 PR breakpoints/15956
6357 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6358
d33501a5
MM
63592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6360
6361 * linux-low.c (linux_low_btrace_conf): Print size.
6362 * server.c (handle_btrace_conf_general_set): New.
6363 (hanle_general_set): Call handle_btrace_conf_general_set.
6364 (handle_query): Report Qbtrace-conf:bts:size as supported.
6365
f4abbc16
MM
63662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6367
6368 * linux-low.c (linux_low_enable_btrace): Update parameters.
6369 (linux_low_btrace_conf): New.
6370 (linux_target_ops)<to_btrace_conf>: Initialize.
6371 * server.c (current_btrace_conf): New.
6372 (handle_btrace_enable): Rename to ...
6373 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6374 to target_enable_btrace. Update comment. Update users.
6375 (handle_qxfer_btrace_conf): New.
6376 (qxfer_packets): Add btrace-conf entry.
6377 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6378 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6379 (target_ops)<read_btrace_conf>: New.
6380 (target_enable_btrace): Update parameters.
6381 (target_read_btrace_conf): New.
6382
043c3577
MM
63832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6384
6385 * server.c (handle_btrace_general_set): Remove call to
6386 target_supports_btrace.
6387 (supported_btrace_packets): New.
6388 (handle_query): Call supported_btrace_packets.
6389 * target.h: include btrace-common.h.
6390 (btrace_target_info): Removed.
6391 (supports_btrace, target_supports_btrace): Update parameters.
6392
734b0e4b
MM
63932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6394
6395 * Makefile.in (SFILES): Add common/btrace-common.c.
6396 (OBS): Add common/btrace-common.o.
6397 (btrace-common.o): Add build rules.
6398 * linux-low: Include btrace-common.h.
6399 (linux_low_read_btrace): Use struct btrace_data. Call
6400 btrace_data_init and btrace_data_fini.
6401
d6c146e9
PA
64022015-02-06 Pedro Alves <palves@redhat.com>
6403
6404 * thread-db.c (find_new_threads_callback): Add debug output.
6405
20ba1ce6
PA
64062015-02-04 Pedro Alves <palves@redhat.com>
6407
6408 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6409 (resume_stopped_resumed_lwps): New function.
6410 (linux_wait_for_event_filtered): Use it.
6411
8cc73a39
SDJ
64122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6413
6414 * Makefile.in (SFILES): Add linux-personality.c.
6415 (linux-personality.o): New rule.
6416 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6417 list of objects to be built.
6418 * linux-low.c: Include nat/linux-personality.h.
6419 (linux_create_inferior): Remove code to disable address space
6420 randomization (moved to ../nat/linux-personality.c). Create
6421 cleanup to disable address space randomization.
6422
fb23d554
SDJ
64232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6424
6425 * Makefile.in (posix-strerror.o): New rule.
6426 (mingw-strerror.o): Likewise.
6427 * configure: Regenerated.
6428 * configure.ac: Source file ../common/common.host. Initialize new
6429 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6430
cdf43629
YQ
64312015-01-14 Yao Qi <yao@codesourcery.com>
6432
6433 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6434 (ppc-linux.o): New rule.
6435 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6436 * configure.ac: AC_CHECK_FUNCS(getauxval).
6437 * config.in: Re-generated.
6438 * configure: Re-generated.
6439 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6440 ppc64_64bit_inferior_p
6441
514c5338
YQ
64422015-01-14 Yao Qi <yao@codesourcery.com>
6443
6444 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6445 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6446 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6447 (PT_ORIG_R3, PT_TRAP): Likewise.
6448 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6449 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6450 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6451
3368c1e5
JB
64522015-01-10 Joel Brobecker <brobecker@adacore.com>
6453
6454 * i387-fp.c (i387_cache_to_xsave): In look over
6455 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6456 zmmh_low_space field by use of zmmh_high_space.
6457
582511be
PA
64582015-01-09 Pedro Alves <palves@redhat.com>
6459
6460 * linux-low.c (step_over_bkpt): Move higher up in the file.
6461 (handle_extended_wait): Don't store the stop_pc here.
6462 (get_stop_pc): Adjust comments and rename to ...
6463 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6464 stopped for a software breakpoint or hardware breakpoint.
6465 (thread_still_has_status_pending_p): New function.
6466 (status_pending_p_callback): Use
6467 thread_still_has_status_pending_p. If the event is no longer
6468 interesting, resume the LWP.
6469 (handle_tracepoints): Add assert.
6470 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6471 (wstatus_maybe_breakpoint): New function.
6472 (cancel_breakpoint): Delete function.
6473 (check_stopped_by_watchpoint): New function, factored out from
6474 linux_low_filter_event.
6475 (lp_status_maybe_breakpoint): Delete function.
6476 (linux_low_filter_event): Remove filter_ptid argument.
6477 Leave thread group exits pending here. Store the LWP's stop PC.
6478 Always leave events pending.
6479 (linux_wait_for_event_filtered): Pull all events out of the
6480 kernel, and leave them all pending.
6481 (count_events_callback, select_event_lwp_callback): Consider all
6482 events.
6483 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6484 (select_event_lwp): Only give preference to the stepping LWP in
6485 all-stop mode. Adjust comments.
6486 (ignore_event): New function.
6487 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6488 references to cancel_breakpoints. Adjust to renames. Also give
6489 equal priority to all LWPs that have had events in non-stop mode.
6490 If reporting a software breakpoint event, unadjust the LWP's PC.
6491 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6492 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6493 Adjust.
6494 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6495 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6496 (linux_stopped_by_watchpoint): Adjust.
6497 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6498 * linux-low.h (enum lwp_stop_reason): New.
6499 (struct lwp_info) <stop_pc>: Adjust comment.
6500 <stopped_by_watchpoint>: Delete field.
6501 <stop_reason>: New field.
6502 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6503 * mem-break.c (software_breakpoint_inserted_here)
6504 (hardware_breakpoint_inserted_here): New function.
6505 * mem-break.h (software_breakpoint_inserted_here)
6506 (hardware_breakpoint_inserted_here): Declare.
6507 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6508 (cancel_breakpoints): Delete.
6509 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6510 (upload_fast_traceframes): Remove references to
6511 cancel_breakpoints.
6512
a33e3959
PA
65132015-01-09 Pedro Alves <palves@redhat.com>
6514
6515 * thread-db.c (find_new_threads_callback): Ignore thread if the
6516 kernel thread ID is -1.
6517
8784d563
PA
65182015-01-09 Pedro Alves <palves@redhat.com>
6519
6520 * linux-low.c (linux_attach_fail_reason_string): Move to
6521 nat/linux-ptrace.c, and rename.
6522 (linux_attach_lwp): Update comment.
6523 (attach_proc_task_lwp_callback): New function.
6524 (linux_attach): Adjust to rename and use
6525 linux_proc_attach_tgid_threads.
6526 (linux_attach_fail_reason_string): Delete declaration.
6527
76f2b779
JB
65282015-01-01 Joel Brobecker <brobecker@adacore.com>
6529
6530 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6531 * server.c (gdbserver_version): Likewise.
6532
fafcc06a
SDJ
65332014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6534
6535 * remote-utils.c: Include ctype.h.
6536 (input_interrupt): Explicitly handle the case when the char
6537 received is the NUL byte. Improve the printing of non-ASCII
6538 characters.
6539
beed38b8
JB
65402014-12-16 Joel Brobecker <brobecker@adacore.com>
6541
6542 * linux-low.c (linux_low_filter_event): Update call to
6543 linux_enable_event_reporting following the addition of
6544 a new parameter to that function.
6545
bf330350
CU
65462014-12-16 Catalin Udma <catalin.udma@freescale.com>
6547
6548 PR server/17457
6549 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6550 (AARCH64_FPCR_REGNO): Likewise.
6551 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6552 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6553 (aarch64_store_fpregset): Likewise.
6554
5227d625
JB
65552014-12-15 Joel Brobecker <brobecker@adacore.com>
6556
6557 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6558 Remove FIXME comment about assumption about N.
6559
f93b65a0
JB
65602014-12-13 Joel Brobecker <brobecker@adacore.com>
6561
6562 * configure.ac: If large-file support is disabled in GDBserver,
6563 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6564 * configure: Regenerate.
6565
e5a9158d
AA
65662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6567
6568 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6569 warning upon ENODATA from ptrace.
6570 * linux-s390-low.c (s390_store_tdb): New.
6571 (s390_regsets): Add regset for NT_S390_TDB.
6572
feea5f36
AA
65732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6574
6575 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6576 without a fill_function.
6577 * linux-s390-low.c (s390_fill_last_break): Remove.
6578 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6579 (s390_arch_setup): Use regset's size instead of fill_function for
6580 loop end condition.
6581
098dbe61
AA
65822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6583
6584 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6585 the regset's store function when ptrace returned an error.
6586 * regcache.c (get_thread_regcache): Invalidate register cache
6587 before fetching inferior's registers.
6588
28eef672
AA
65892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6590
6591 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6592 while-loop as for-loop.
6593 (regsets_store_inferior_registers): Likewise.
6594
bdca27a2
YQ
65952014-11-28 Yao Qi <yao@codesourcery.com>
6596
6597 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6598 * config.in, configure: Re-generate.
6599 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6600 is defined.
6601
9c232dda
YQ
66022014-11-21 Yao Qi <yao@codesourcery.com>
6603
6604 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6605 (AC_CHECK_HEADERS): Remove malloc.h.
6606 * configure: Re-generated.
6607 * config.in: Re-generated.
6608 * server.h: Don't include alloca.h and malloc.h.
6609 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6610 Don't include malloc.h.
6611
43968415
JB
66122014-11-17 Joel Brobecker <brobecker@adacore.com>
6613
6614 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6615 corresponding ERRNO check in same block.
6616
40e91bc7
PA
66172014-11-12 Pedro Alves <palves@redhat.com>
6618
6619 * server.c (cont_thread): Update comment.
6620 (start_inferior, attach_inferior): No longer clear cont_thread.
6621 (handle_v_cont): No longer set cont_thread.
6622 (captured_main): Clear cont_thread each time a GDB connects.
6623
c2c118cf
PA
66242014-11-12 Pedro Alves <palves@redhat.com>
6625
6626 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6627 thread, and don't resume all threads if the Hc thread has exited.
6628
78708b7c
PA
66292014-11-12 Pedro Alves <palves@redhat.com>
6630
6631 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6632 the process group instead of to a specific LWP.
6633
a2abc7de
PA
66342014-10-15 Pedro Alves <palves@redhat.com>
6635
6636 PR server/17487
6637 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6638 parameter.
6639 (arm_set_thread_context): Delete.
6640 (the_low_target): Adjust.
6641 * win32-i386-low.c (debug_registers_changed)
6642 (debug_registers_used): Delete.
6643 (update_debug_registers_callback): New function.
6644 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6645 needing to update their debug registers.
6646 (win32_get_current_dr): New function.
6647 (x86_dr_low_get_addr, x86_dr_low_get_control)
6648 (x86_dr_low_get_status): Fetch the debug register from the thread
6649 record's context.
6650 (i386_initial_stuff): Adjust.
6651 (i386_get_thread_context): Remove current_event parameter. Don't
6652 clear debug_registers_changed nor copy DR values to
6653 debug_reg_state.
6654 (i386_set_thread_context): Delete.
6655 (i386_prepare_to_resume): New function.
6656 (i386_thread_added): Mark the thread as needing to update irs
6657 debug registers.
6658 (the_low_target): Remove i386_set_thread_context and install
6659 i386_prepare_to_resume.
6660 * win32-low.c (win32_get_thread_context): Adjust.
6661 (win32_set_thread_context): Use SetThreadContext
6662 directly.
6663 (win32_prepare_to_resume): New function.
6664 (win32_require_context): New function, factored out from ...
6665 (thread_rec): ... this.
6666 (continue_one_thread): Call win32_prepare_to_resume on each thread
6667 we're about to continue.
6668 (win32_resume): Call win32_prepare_to_resume on the event thread.
6669 * win32-low.h (struct win32_thread_info)
6670 <debug_registers_changed>: New field.
6671 (struct win32_target_ops): Change prototype of set_thread_context,
6672 delete set_thread_context and add prepare_to_resume.
6673 (win32_require_context): New declaration.
6674
a442d071
GB
66752014-10-08 Gary Benson <gbenson@redhat.com>
6676
6677 * server.h: Do not include common-exceptions.h.
6678
6f1947e8
GB
66792014-10-08 Gary Benson <gbenson@redhat.com>
6680
6681 * server.h: Do not include cleanups.h.
6682
63b434a4
JH
66832014-09-30 James Hogan <james.hogan@imgtec.com>
6684
6685 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6686 mips64-dsp-linux.c.
6687
c4d9ceb6
YQ
66882014-09-23 Yao Qi <yao@codesourcery.com>
6689
6690 * linux-low.c (lp_status_maybe_breakpoint): New function.
6691 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6692 (count_events_callback): Likewise.
6693 (select_event_lwp_callback): Likewise.
6694 (cancel_breakpoints_callback): Likewise.
6695
89a5711c
DB
66962014-09-19 Don Breazeal <donb@codesourcery.com>
6697
6698 * linux-low.c (handle_extended_wait): Call
6699 linux_ptrace_get_extended_event.
6700 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6701 linux_is_extended_waitstatus.
6702
bffc0964
JB
67032014-09-16 Joel Brobecker <brobecker@adacore.com>
6704
6705 * Makefile.in (CPPFLAGS): Define.
6706 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6707 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6708
0bfdf32f
GB
67092014-09-16 Gary Benson <gbenson@redhat.com>
6710
6711 * inferiors.h (current_inferior): Renamed as...
6712 (current_thread): New variable. All uses updated.
6713 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6714 (maybe_move_out_of_jump_pad): Likewise.
6715 (cancel_breakpoint): Likewise.
6716 (linux_low_filter_event): Likewise.
6717 (wait_for_sigstop): Likewise.
6718 (linux_resume_one_lwp): Likewise.
6719 (need_step_over_p): Likewise.
6720 (start_step_over): Likewise.
6721 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6722 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6723 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6724 and save_inferior as saved_thread.
6725 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6726 saved_thread.
6727 (regcache_invalidate_thread): Likewise.
6728 * remote-utils.c (prepare_resume_reply): Likewise.
6729 * thread-db.c (thread_db_get_tls_address): Likewise.
6730 (disable_thread_event_reporting): Likewise.
6731 (remove_thread_event_breakpoints): Likewise.
6732 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6733 as saved_thread.
6734 * target.h (set_desired_inferior): Renamed as...
6735 (set_desired_thread): New declaration. All uses updated.
6736 * server.c (myresume): Updated comment to reference thread instead
6737 of inferior.
6738 (handle_serial_event): Likewise.
6739 (handle_target_event): Likewise.
6740
361c8ade
GB
67412014-09-12 Tom Tromey <tromey@redhat.com>
6742 Gary Benson <gbenson@redhat.com>
6743
6744 * regcache.h: Include common-regcache.h.
6745 (regcache_read_pc): Don't declare.
6746 * regcache.c (get_thread_regcache_for_ptid): New function.
6747
bd9269f7
GB
67482014-09-11 Tom Tromey <tromey@redhat.com>
6749 Gary Benson <gbenson@redhat.com>
6750
6751 * symbol.c: New file.
6752 * Makefile.in (SFILES): Add symbol.c.
6753 (OBS): Add symbol.o.
6754
f8c1d06b
GB
67552014-09-11 Gary Benson <gbenson@redhat.com>
6756
6757 * target.c (target_stop_ptid, target_continue_ptid): New
6758 functions.
6759
721ec300
GB
67602014-09-11 Tom Tromey <tromey@redhat.com>
6761 Gary Benson <gbenson@redhat.com>
6762
6763 * target.h: Include target/target.h.
6764 * target.c (target_read_memory, target_read_uint32)
6765 (target_write_memory): New functions.
6766
c5e92cca
GB
67672014-09-11 Gary Benson <gbenson@redhat.com>
6768
6769 * server.h (debug_hw_points): Don't declare.
6770 * server.c (debug_hw_points): Don't define. Replace all uses
6771 with show_debug_regs.
6772 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6773 all uses with show_debug_regs.
6774
2e4bb98a
EBM
67752014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6776
6777 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6778 endianness into account.
6779 (ppc_supply_ptrace_register): Likewise.
6780
ac740bc7
JH
67812014-09-03 James Hogan <james.hogan@imgtec.com>
6782
6783 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6784 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6785
97ea6506
GB
67862014-09-03 Gary Benson <gbenson@redhat.com>
6787
6788 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6789 ALL_DEBUG_ADDRESS_REGISTERS.
6790
df7e5265
GB
67912014-09-02 Gary Benson <gbenson@redhat.com>
6792
6793 * i386-low.h: Renamed as...
6794 * x86-low.h: New file. All type, function and variable name
6795 prefixes changed from "i386_" to "x86_". All references updated.
6796 * i386-low.c: Renamed as...
6797 * x86-low.c: New file. All type, function and variable name
6798 prefixes changed from "i386_" to "x86_". All references updated.
6799
ed859da7
GB
68002014-09-02 Gary Benson <gbenson@redhat.com>
6801
6802 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6803 (x86_linux_new_thread): Likewise.
6804
860789c7
GB
68052014-08-29 Gary Benson <gbenson@redhat.com>
6806
6807 * server.h (setjmp.h): Do not include.
6808 (toplevel): Do not declare.
6809 (common-exceptions.h): Include.
6810 (cleanups.h): Likewise.
6811 * server.c (toplevel): Do not define.
6812 (exit_code): New static global.
6813 (detach_or_kill_for_exit_cleanup): New function.
6814 (main): New function. Original main renamed to...
6815 (captured_main): New function.
6816 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6817
ff55e1b5
GB
68182014-08-29 Gary Benson <gbenson@redhat.com>
6819
6820 * Makefile.in (SFILES): Add common/common-exceptions.c.
6821 (OBS): Add common-exceptions.o.
6822 (common-exceptions.o): New rule.
6823 * utils.c (prepare_to_throw_exception): New function.
6824
e9bcb658
GB
68252014-08-29 Gary Benson <gbenson@redhat.com>
6826
6827 * config.in: Regenerate.
6828 * configure: Likewise.
6829
e3180625
GB
68302014-08-29 Gary Benson <gbenson@redhat.com>
6831
6832 * Makefile.in (SFILES): Add common/cleanups.c.
6833 (OBS): cleanups.o.
6834 (cleanups.o): New rule.
6835
e3d6ba5d
GB
68362014-08-29 Gary Benson <gbenson@redhat.com>
6837
6838 * utils.c (internal_vwarning): New function.
6839
7096e886
GB
68402014-08-28 Gary Benson <gbenson@redhat.com>
6841
6842 * utils.h (fatal): Remove declaration.
6843 * utils.c (fatal): Remove function.
6844
14ce3192
GB
68452014-08-28 Gary Benson <gbenson@redhat.com>
6846
6847 * tracepoint.c (gdb_agent_init): Replace fatal with
6848 perror_with_name.
6849 (initialize_tracepoint): Likewise.
6850
50278d59
GB
68512014-08-28 Gary Benson <gbenson@redhat.com>
6852
6853 * remote-utils.c (remote_prepare): Replace fatal with error.
6854
aa96c426
GB
68552014-08-28 Gary Benson <gbenson@redhat.com>
6856
6857 * linux-low.c (linux_async): Replace fatal with warning.
6858 Tidy up and return.
6859 (linux_start_non_stop): Return -1 if linux_async failed.
6860
f7160e97
GB
68612014-08-28 Gary Benson <gbenson@redhat.com>
6862
6863 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6864 gdb_assert.
6865 (i386_dr_low_get_addr): Remove vague comment.
6866 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6867 gdb_assert.
6868
38e08fca
GB
68692014-08-28 Gary Benson <gbenson@redhat.com>
6870
6871 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6872 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6873 internal_error.
6874 (linux_resume_one_lwp): Likewise.
6875 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6876 gdb_assert.
6877 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6878 with internal_error.
6879 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6880 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6881 (find_register_by_name): Replace fatal with internal_error.
6882 (find_regno): Likewise.
6883 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6884 * thread-db.c (thread_db_create_event): Likewise.
6885 (thread_db_load_search): Likewise.
6886 (try_thread_db_load_1): Likewise.
6887 * tracepoint.c (get_jump_space_head): Replace fatal with
6888 internal_error.
6889 (claim_trampoline_space): Likewise.
6890 (have_fast_tracepoint_trampoline_buffer): Likewise.
6891 (cmd_qtstart): Likewise.
6892 (stop_tracing): Likewise.
6893 (fast_tracepoint_collecting): Likewise.
6894 (target_malloc): Likewise.
6895 (download_tracepoint): Likewise.
6896 (download_trace_state_variables): Replace check with gdb_assert.
6897 (upload_fast_traceframes): Replace fatal with internal_error.
6898
34abf635
GB
68992014-08-19 Tom Tromey <tromey@redhat.com>
6900 Gary Benson <gbenson@redhat.com>
6901
6902 * Makefile.in (SFILES): Add common/common-debug.c.
6903 (OBS): Add common-debug.o.
6904 (common-debug.o): New rule.
6905 * debug.h (debug_printf): Don't declare.
6906 * debug.c (debug_printf): Renamed and rewritten as...
6907 (debug_vprintf): New function.
6908
f6e94d78
GB
69092014-08-19 Gary Benson <gbenson@redhat.com>
6910
6911 * utils.h: Do not include print-utils.h.
6912
9239eeab
GB
69132014-08-19 Tom Tromey <tromey@redhat.com>
6914 Gary Benson <gbenson@redhat.com>
6915
6916 * server.h: Add static assertion.
6917 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6918
ef87c8bb
GB
69192014-08-19 Tom Tromey <tromey@redhat.com>
6920 Gary Benson <gbenson@redhat.com>
6921
6922 * Makefile.in (SFILES): Add common/errors.c.
6923 (OBS): Add errors.o.
6924 (IPA_OBS): Add errors-ipa.o.
6925 (errors.o): New rule.
6926 (errors-ipa.o): Likewise.
6927 * utils.h (perror_with_name, error, warning): Don't declare.
6928 * utils.c (warning): Renamed and rewritten as...
6929 (vwarning): New function.
6930 (error): Renamed and rewritten as...
6931 (verror): New function.
6932 (internal_error): Renamed and rewritten as...
6933 (internal_verror): New function.
6934
bb974a24
GB
69352014-08-07 Gary Benson <gbenson@redhat.com>
6936
6937 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6938 * configure: Regenerate.
6939 * config.in: Likewise.
6940 * server.h: Do not include errno.h.
6941 * event-loop.c: Likewise.
6942 * hostio-errno.c: Likewise.
6943 * linux-low.c: Likewise.
6944 * remote-utils.c: Likewise.
6945 * spu-low.c: Likewise.
6946 * utils.c: Likewise.
6947 * gdbreplay.c: Unconditionally include errno.h.
6948
6d3d12eb
GB
69492014-08-07 Gary Benson <gbenson@redhat.com>
6950
6951 * server.h: Do not include string.h.
6952 * event-loop.c: Likewise.
6953 * linux-low.c: Likewise.
6954 * regcache.c: Likewise.
6955 * remote-utils.c: Likewise.
6956 * spu-low.c: Likewise.
6957 * utils.c: Likewise.
6958
dccbb609
GB
69592014-08-07 Gary Benson <gbenson@redhat.com>
6960
6961 * server.h: Do not include gdb_assert.h.
6962
e76df0d0
GB
69632014-08-07 Gary Benson <gbenson@redhat.com>
6964
6965 * server.h: Do not include common-utils.h.
6966
4cb9c816
GB
69672014-08-07 Gary Benson <gbenson@redhat.com>
6968
6969 * server.h: Do not include ptid.h.
6970 * notif.h: Likewise.
6971
3995eeee
GB
69722014-08-07 Gary Benson <gbenson@redhat.com>
6973
6974 * server.h: Do not include gdb_locale.h.
6975
cb9f1a9b
GB
69762014-08-07 Gary Benson <gbenson@redhat.com>
6977
6978 * server.h: Do not include gdb/signals.h.
6979 * win32-low.c: Likewise.
6980
a5fceff8
GB
69812014-08-07 Gary Benson <gbenson@redhat.com>
6982
6983 * server.h: Do not include pathmax.h.
6984
b9391142
GB
69852014-08-07 Gary Benson <gbenson@redhat.com>
6986
6987 * server.h: Do not include libiberty.h.
6988 * linux-bfin-low.c: Likewise.
6989
0e443c87
GB
69902014-08-07 Gary Benson <gbenson@redhat.com>
6991
6992 * server.h: Do not include ansidecl.h.
6993
8ebb3f56
GB
69942014-08-07 Gary Benson <gbenson@redhat.com>
6995
6996 * linux-x86-low.c: Do not include stddef.h.
6997 * lynx-ppc-low.c: Likewise.
6998 * tracepoint.c: Likewise.
6999
8980bdf6
GB
70002014-08-07 Gary Benson <gbenson@redhat.com>
7001
7002 * server.h: Do not include stdarg.h.
7003 * nto-low.c: Likewise.
7004
d7096f71
GB
70052014-08-07 Gary Benson <gbenson@redhat.com>
7006
7007 * server.h: Do not include stdlib.h.
7008 * inferiors.c: Likewise.
7009 * linux-low.c: Likewise.
7010 * regcache.c: Likewise.
7011 * spu-low.c: Likewise.
7012 * tracepoint.c: Likewise.
7013 * utils.c: Likewise.
7014
d02f550d
GB
70152014-08-07 Gary Benson <gbenson@redhat.com>
7016
7017 * server.h: Do not include stdio.h.
7018 * linux-low.c: Likewise.
7019 * remote-utils.c: Likewise.
7020 * spu-low.c: Likewise.
7021 * utils.c: Likewise.
7022 * wincecompat.c: Likewise.
7023
87f6c4e3
GB
70242014-08-06 Gary Benson <gbenson@redhat.com>
7025
7026 * regcache.c (init_register_cache): Move conditionals inside if.
7027
7089dca4
GB
70282014-08-06 Gary Benson <gbenson@redhat.com>
7029
7030 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7031
462f517e
GB
70322014-07-31 Gary Benson <gbenson@redhat.com>
7033
7034 * ax.h: Do not include server.h.
7035 * gdbthread.h: Likewise.
7036 * lynx-low.h: Likewise.
7037 * notif.h: Likewise.
7038
976411d6
GB
70392014-07-30 Gary Benson <gbenson@redhat.com>
7040
7041 * server.h: Include common-defs.h.
7042 Do not include config.h or build-gnulib-gdbserver/config.h.
7043
d41f6d8e
GB
70442014-07-30 Gary Benson <gbenson@redhat.com>
7045
7046 * hostio-errno.c: Move server.h to top of includes list.
7047 * inferiors.c: Likewise.
7048 * linux-x86-low.c: Likewise.
7049 * notif.c: Include server.h.
7050
314c6a35
TT
70512014-07-24 Tom Tromey <tromey@redhat.com>
7052 Gary Benson <gbenson@redhat.com>
7053
7054 * server.h (CORE_ADDR): Now unsigned.
7055
69ff6be5
PA
70562014-07-16 Pedro Alves <palves@redhat.com>
7057
7058 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7059
ce9e3fe7
PA
70602014-07-15 Pedro Alves <palves@redhat.com>
7061
7062 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7063 copy.
7064
e76126e8
PA
70652014-07-11 Pedro Alves <palves@redhat.com>
7066
7067 * linux-low.c (kill_wait_lwp): New function, based on
7068 kill_one_lwp_callback, but use my_waitpid directly.
7069 (kill_one_lwp_callback, linux_kill): Use it.
7070
8e9db26e
PA
70712014-06-23 Pedro Alves <palves@redhat.com>
7072
7073 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7074 before setting DR0..DR3.
7075
698b3e08
GB
70762014-06-20 Gary Benson <gbenson@redhat.com>
7077
7078 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7079 * configure: Regenerated.
7080 * config.in: Likewise.
7081
125f8a3d
GB
70822014-06-20 Gary Benson <gbenson@redhat.com>
7083
7084 * Makefile.in (SFILES): Update locations for files moved
7085 from common to nat.
7086 (object file files): Reordered.
7087
42995dbd
GB
70882014-06-20 Gary Benson <gbenson@redhat.com>
7089
7090 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7091 (i386_dr_low_set_addr): Likewise.
7092 (i386_dr_low_get_addr): Likewise.
7093 (i386_dr_low_can_set_control): Likewise.
7094 (i386_dr_low_set_control): Likewise.
7095 (i386_dr_low_get_control): Likewise.
7096 (i386_dr_low_get_status): Likewise.
7097 (i386_get_debug_register_length): Likewise.
7098 * linux-x86-low.c (i386_dr_low_set_addr):
7099 Changed signature. Made static.
7100 (i386_dr_low_get_addr): Likewise.
7101 (i386_dr_low_set_control): Likewise.
7102 (i386_dr_low_get_control): Likewise.
7103 (i386_dr_low_get_status): Likewise.
7104 (i386_dr_low): New global variable.
7105 * win32-i386-low.c (i386_dr_low_set_addr):
7106 Changed signature. Made static.
7107 (i386_dr_low_get_addr): Likewise.
7108 (i386_dr_low_set_control): Likewise.
7109 (i386_dr_low_get_control): Likewise.
7110 (i386_dr_low_get_status): Likewise.
7111 (i386_dr_low): New global variable.
7112
e1d2394b
MS
71132014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7114
7115 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7116 * Makefile.in (AR, AR_FLAGS): Define.
7117 * configure: Regenerate.
7118
3a8ee006
GB
71192014-06-19 Gary Benson <gbenson@redhat.com>
7120
7121 * Makefile.in (i386-dregs.o): New rule.
7122 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7123 * i386-low.c (target.h): Remove include.
7124 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7125 (DR_CONTROL_SHIFT): Likewise.
7126 (DR_CONTROL_SIZE): Likewise.
7127 (DR_RW_EXECUTE): Likewise.
7128 (DR_RW_WRITE): Likewise.
7129 (DR_RW_READ): Likewise.
7130 (DR_RW_IORW): Likewise.
7131 (DR_LEN_1): Likewise.
7132 (DR_LEN_2): Likewise.
7133 (DR_LEN_4): Likewise.
7134 (DR_LEN_8): Likewise.
7135 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7136 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7137 (DR_ENABLE_SIZE): Likewise.
7138 (DR_LOCAL_SLOWDOWN): Likewise.
7139 (DR_GLOBAL_SLOWDOWN): Likewise.
7140 (DR_CONTROL_RESERVED): Likewise.
7141 (I386_DR_CONTROL_MASK): Likewise.
7142 (I386_DR_VACANT): Likewise.
7143 (I386_DR_LOCAL_ENABLE): Likewise.
7144 (I386_DR_GLOBAL_ENABLE): Likewise.
7145 (I386_DR_DISABLE): Likewise.
7146 (I386_DR_SET_RW_LEN): Likewise.
7147 (I386_DR_GET_RW_LEN): Likewise.
7148 (I386_DR_WATCH_HIT): Likewise.
7149 (i386_wp_op_t): Likewise.
7150 (i386_show_dr): Likewise.
7151 (i386_length_and_rw_bits): Likewise.
7152 (i386_insert_aligned_watchpoint): Likewise.
7153 (i386_remove_aligned_watchpoint): Likewise.
7154 (i386_handle_nonaligned_watchpoint): Likewise.
7155 i386_update_inferior_debug_regs(): Likewise.
7156 (i386_dr_insert_watchpoint): Likewise.
7157 (i386_dr_remove_watchpoint): Likewise.
7158 (i386_dr_region_ok_for_watchpoint): Likewise.
7159 (i386_dr_stopped_data_address): Likewise.
7160 (i386_dr_stopped_by_watchpoint): Likewise.
7161
8f26655c
GB
71622014-06-19 Gary Benson <gbenson@redhat.com>
7163
7164 * i386-low.c (i386_dr_show): Renamed to
7165 i386_show_dr and made static. All uses updated.
7166 (i386_dr_length_and_rw_bits): Renamed to
7167 i386_length_and_rw_bits and made static.
7168 All uses updated.
7169 (i386_dr_insert_aligned_watchpoint): Renamed to
7170 i386_insert_aligned_watchpoint and made static.
7171 All uses updated.
7172 (i386_dr_remove_aligned_watchpoint): Renamed to
7173 i386_remove_aligned_watchpoint and made static.
7174 All uses updated.
7175 (i386_dr_update_inferior_debug_regs): Renamed to
7176 i386_update_inferior_debug_regs and made static.
7177 All uses updated.
7178
b9228891
GB
71792014-06-18 Gary Benson <gbenson@redhat.com>
7180
5171def3
GB
7181 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7182 (i386_dr_low_can_set_control): Likewise.
7183 (i386_get_debug_register_length): Likewise.
7184 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7185 (i386_dr_low_can_set_control): Likewise.
7186 (i386_get_debug_register_length): Likewise.
7187
71882014-06-17 Gary Benson <gbenson@redhat.com>
7189
b9228891
GB
7190 * i386-low.h (i386-dregs.h): New include.
7191 (DR_FIRSTADDR): Now in i386-dregs.h.
7192 (DR_LASTADDR): Likewise.
7193 (DR_NADDR): Likewise.
7194 (DR_STATUS): Likewise.
7195 (DR_CONTROL): Likewise.
7196 (i386_debug_reg_state): Likewise.
7197 (i386_dr_insert_watchpoint): Likewise.
7198 (i386_dr_remove_watchpoint): Likewise.
7199 (i386_dr_region_ok_for_watchpoint): Likewise.
7200 (i386_dr_stopped_data_address): Likewise.
7201 (i386_dr_stopped_by_watchpoint): Likewise.
7202 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7203
4be83cc2
GB
72042014-06-18 Gary Benson <gbenson@redhat.com>
7205
7206 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7207 i386_dr_insert_watchpoint.
7208 (i386_low_remove_watchpoint): Renamed to
7209 i386_dr_remove_watchpoint.
7210 (i386_low_region_ok_for_watchpoint): Renamed to
7211 i386_dr_region_ok_for_watchpoint.
7212 (i386_low_stopped_data_address): Renamed to
7213 i386_dr_stopped_data_address.
7214 (i386_low_stopped_by_watchpoint): Renamed to
7215 i386_dr_stopped_by_watchpoint.
7216 * i386-low.c (i386_show_dr): Renamed to
7217 i386_dr_show and made nonstatic. All uses updated.
7218 (i386_length_and_rw_bits): Renamed to
7219 i386_dr_length_and_rw_bits and made nonstatic.
7220 All uses updated.
7221 (i386_insert_aligned_watchpoint): Renamed to
7222 i386_dr_insert_aligned_watchpoint and made nonstatic.
7223 All uses updated.
7224 (i386_remove_aligned_watchpoint): Renamed to
7225 i386_dr_remove_aligned_watchpoint and made nonstatic.
7226 All uses updated.
7227 (i386_update_inferior_debug_regs): Renamed to
7228 i386_dr_update_inferior_debug_regs and made nonstatic.
7229 All uses updated.
7230 (i386_low_insert_watchpoint): Renamed to
7231 i386_dr_insert_watchpoint. All uses updated.
7232 (i386_low_remove_watchpoint): Renamed to
7233 i386_dr_remove_watchpoint. All uses updated.
7234 (i386_low_region_ok_for_watchpoint): Renamed to
7235 i386_dr_region_ok_for_watchpoint. All uses updated.
7236 (i386_low_stopped_data_address): Renamed to
7237 i386_dr_stopped_data_address. All uses updated.
7238 (i386_low_stopped_by_watchpoint): Renamed to
7239 i386_dr_stopped_by_watchpoint. All uses updated.
7240
131aa0d4
GB
72412014-06-18 Gary Benson <gbenson@redhat.com>
7242
7243 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7244 (i386_dr_low_can_set_control): Likewise.
7245 (i386_insert_aligned_watchpoint): New check.
7246
d9305f7f
GB
72472014-06-18 Gary Benson <gbenson@redhat.com>
7248
7249 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7250 Renamed to state.
7251
e927c9fc
GB
72522014-06-18 Gary Benson <gbenson@redhat.com>
7253
7254 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7255 instead of fatal and error.
7256 (i386_handle_nonaligned_watchpoint): Likewise.
7257
1b6d4134
GB
72582014-06-18 Gary Benson <gbenson@redhat.com>
7259
7260 * i386-low.c (i386_get_debug_register_length): New macro.
7261 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7262 (i386_show_dr): Use debug_printf instead of fprintf. Use
7263 phex to format values.
7264
6e62758f
GB
72652014-06-18 Gary Benson <gbenson@redhat.com>
7266
7267 * i386-low.h: Comment changes.
7268 * i386-low.c: Likewise.
7269
fc6e2f03
GB
72702014-06-18 Gary Benson <gbenson@redhat.com>
7271
7272 * i386-low.c: Whitespace changes.
7273
f9d1eeed
TT
72742014-06-12 Tom Tromey <tromey@redhat.com>
7275
7276 * utils.c (freeargv): Remove.
7277
0b04e523
TT
72782014-06-12 Tom Tromey <tromey@redhat.com>
7279
7280 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7281 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7282 (parse_debug_format_options): Likewise.
7283 (gdbserver_usage): Likewise.
7284 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7285 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7286 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7287 against libiberty.
7288 ($(LIBGNU)): Depend on libiberty.
7289 (all-lib): Recurse into all subdirs.
7290 (install-only): Invoke "install" target in subdirs.
7291 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7292 targets.
7293 * configure: Rebuild.
7294 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7295 for vasprintf, vsnprintf, or gettimeofday.
7296 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7297 srv_tgtobj.
7298
270c9937
JB
72992014-06-05 Joel Brobecker <brobecker@adacore.com>
7300
7301 * development.sh: Delete.
7302 * Makefile.in (config.status): Adjust dependency on development.sh.
7303 * configure.ac: Adjust development.sh source call.
7304 * configure: Regenerate.
7305
0a261ed8
PA
73062014-06-02 Pedro Alves <palves@redhat.com>
7307
7308 * ax.c (gdb_free_agent_expr): New function.
7309 * ax.h (gdb_free_agent_expr): New declaration.
7310 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7311 list.
7312 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7313 static.
7314 (clear_breakpoint_conditions_and_commands): New function.
7315 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7316 (clear_breakpoint_conditions_and_commands): New declaration.
7317
e9dae05e
RR
73182014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7319
7320 * linux-aarch64-low.c (asm/ptrace.h): Include.
7321
5876f503
JK
73222014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7323
7324 Fix TLS access for -static -pthread.
7325 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7326 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7327 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7328
802e8e6d
PA
73292014-05-20 Pedro Alves <palves@redhat.com>
7330
7331 * linux-aarch64-low.c (aarch64_insert_point)
7332 (aarch64_remove_point): No longer check whether the type is
7333 supported here. Adjust to new interface.
7334 (the_low_target): Install aarch64_supports_z_point_type as
7335 supports_z_point_type method.
7336 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7337 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7338 instead of a Z packet char. Adjust.
7339 (arm_supports_z_point_type): New function.
7340 (arm_insert_point, arm_remove_point): Adjust to new interface.
7341 (the_low_target): Install arm_supports_z_point_type.
7342 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7343 (cris_insert_point, cris_remove_point): Adjust to new interface.
7344 Don't check whether the type is supported here.
7345 (the_low_target): Install cris_supports_z_point_type.
7346 * linux-low.c (linux_supports_z_point_type): New function.
7347 (linux_insert_point, linux_remove_point): Adjust to new interface.
7348 * linux-low.h (struct linux_target_ops) <insert_point,
7349 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7350 raw_breakpoint pointer parameter.
7351 <supports_z_point_type>: New method.
7352 * linux-mips-low.c (mips_supports_z_point_type): New function.
7353 (mips_insert_point, mips_remove_point): Adjust to new interface.
7354 Use mips_supports_z_point_type.
7355 (the_low_target): Install mips_supports_z_point_type.
7356 * linux-ppc-low.c (the_low_target): Install NULL as
7357 supports_z_point_type method.
7358 * linux-s390-low.c (the_low_target): Install NULL as
7359 supports_z_point_type method.
7360 * linux-sparc-low.c (the_low_target): Install NULL as
7361 supports_z_point_type method.
7362 * linux-x86-low.c (x86_supports_z_point_type): New function.
7363 (x86_insert_point): Adjust to new insert_point interface. Use
7364 insert_memory_breakpoint. Adjust to new
7365 i386_low_insert_watchpoint interface.
7366 (x86_remove_point): Adjust to remove_point interface. Use
7367 remove_memory_breakpoint. Adjust to new
7368 i386_low_remove_watchpoint interface.
7369 (the_low_target): Install x86_supports_z_point_type.
7370 * lynx-low.c (lynx_target_ops): Install NULL as
7371 supports_z_point_type callback.
7372 * nto-low.c (nto_supports_z_point_type): New.
7373 (nto_insert_point, nto_remove_point): Adjust to new interface.
7374 (nto_target_ops): Install nto_supports_z_point_type.
7375 * mem-break.c: Adjust intro comment.
7376 (struct raw_breakpoint) <raw_type, size>: New fields.
7377 <inserted>: Update comment.
7378 <shlib_disabled>: Delete field.
7379 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7380 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7381 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7382 (raw_bkpt_type_to_target_hw_bp_type): New function.
7383 (find_enabled_raw_code_breakpoint_at): New function.
7384 (find_raw_breakpoint_at): New type and size parameters. Use them.
7385 (insert_memory_breakpoint): New function, based off
7386 set_raw_breakpoint_at.
7387 (remove_memory_breakpoint): New function.
7388 (set_raw_breakpoint_at): Reimplement.
7389 (set_breakpoint): New, based on set_breakpoint_at.
7390 (set_breakpoint_at): Reimplement.
7391 (delete_raw_breakpoint): Go through the_target->remove_point
7392 instead of assuming memory breakpoints.
7393 (find_gdb_breakpoint_at): Delete.
7394 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7395 (find_gdb_breakpoint): New function.
7396 (set_gdb_breakpoint_at): Delete.
7397 (z_type_supported): New function.
7398 (set_gdb_breakpoint_1): New function, loosely based off
7399 set_gdb_breakpoint_at.
7400 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7401 (delete_gdb_breakpoint_at): Delete.
7402 (delete_gdb_breakpoint_1): New function, loosely based off
7403 delete_gdb_breakpoint_at.
7404 (delete_gdb_breakpoint): New function.
7405 (clear_gdb_breakpoint_conditions): Rename to ...
7406 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7407 breakpoint.
7408 (add_condition_to_breakpoint): Make static.
7409 (add_breakpoint_condition): Take a struct breakpoint pointer
7410 instead of an address. Adjust.
7411 (gdb_condition_true_at_breakpoint): Rename to ...
7412 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7413 z_type parameter.
7414 (gdb_condition_true_at_breakpoint): Reimplement.
7415 (add_breakpoint_commands): Take a struct breakpoint pointer
7416 instead of an address. Adjust.
7417 (gdb_no_commands_at_breakpoint): Rename to ...
7418 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7419 parameter. Return true if no breakpoint was found. Change debug
7420 output.
7421 (gdb_no_commands_at_breakpoint): Reimplement.
7422 (run_breakpoint_commands): Rename to ...
7423 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7424 and change return type to boolean.
7425 (run_breakpoint_commands): New function.
7426 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7427 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7428 breakpoint. Go through the_target->remove_point instead of
7429 assuming memory breakpoint.
7430 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7431 software and hardware breakpoints.
7432 (reinsert_raw_breakpoint): Go through the_target->insert_point
7433 instead of assuming memory breakpoint.
7434 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7435 software and hardware breakpoints.
7436 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7437 Check both software and hardware breakpoints.
7438 (validate_inserted_breakpoint): Assert the breakpoint is a
7439 software breakpoint. Set the inserted flag to -1 instead of
7440 setting shlib_disabled.
7441 (delete_disabled_breakpoints): Adjust.
7442 (validate_breakpoints): Only validate software breakpoints.
7443 Adjust to inserted flag change.
7444 (check_mem_read, check_mem_write): Skip breakpoint types other
7445 than software breakpoints. Adjust to inserted flag change.
7446 * mem-break.h (enum raw_bkpt_type): New enum.
7447 (raw_breakpoint, struct process_info): Forward declare.
7448 (Z_packet_to_target_hw_bp_type): Delete declaration.
7449 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7450 (set_gdb_breakpoint, delete_gdb_breakpoint)
7451 (clear_breakpoint_conditions): New declarations.
7452 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7453 (breakpoint_inserted_here): Update comment.
7454 (add_breakpoint_condition, add_breakpoint_commands): Replace
7455 address parameter with a breakpoint pointer parameter.
7456 (gdb_breakpoint_here): Update comment.
7457 (delete_gdb_breakpoint_at): Delete.
7458 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7459 * server.c (process_point_options): Take a struct breakpoint
7460 pointer instead of an address. Adjust.
7461 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7462 delete_gdb_breakpoint.
7463 * spu-low.c (spu_target_ops): Install NULL as
7464 supports_z_point_type method.
7465 * target.h: Include mem-break.h.
7466 (struct target_ops) <prepare_to_access_memory>: Update comment.
7467 <supports_z_point_type>: New field.
7468 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7469 instead of a char. Also take a raw breakpoint pointer.
7470 * win32-arm-low.c (the_low_target): Install NULL as
7471 supports_z_point_type.
7472 * win32-i386-low.c (i386_supports_z_point_type): New function.
7473 (i386_insert_point, i386_remove_point): Adjust to new interface.
7474 (the_low_target): Install i386_supports_z_point_type.
7475 * win32-low.c (win32_supports_z_point_type): New function.
7476 (win32_insert_point, win32_remove_point): Adjust to new interface.
7477 (win32_target_ops): Install win32_supports_z_point_type.
7478 * win32-low.h (struct win32_target_ops):
7479 <supports_z_point_type>: New method.
7480 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7481 instead of a char. Also take a raw breakpoint pointer.
7482
932539e3
PA
74832014-05-20 Pedro Alves <palves@redhat.com>
7484
7485 * mem-break.h: Include break-common.h.
7486 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7487 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7488 (Z_packet_to_target_hw_bp_type): New declaration.
7489 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7490 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7491 (Z_PACKET_ACCESS_WP): Delete macros.
7492 (Z_packet_to_hw_type): Delete function.
7493 * i386-low.h: Don't include break-common.h here.
7494 (Z_packet_to_hw_type): Delete declaration.
7495 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7496 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7497 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7498 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7499 * linux-aarch64-low.c: Don't include break-common.h here.
7500 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7501 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7502 (Z_packet_to_target_hw_bp_type): Delete function.
7503 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7504 function.
7505 (mips_insert_point, mips_remove_point): Use
7506 Z_packet_to_target_hw_bp_type.
7507
4ff0d3d8
PA
75082014-05-20 Pedro Alves <palves@redhat.com>
7509
7510 * linux-aarch64-low.c: Include break-common.h.
7511 (enum target_point_type): Delete.
7512 (Z_packet_to_point_type): Rename to ...
7513 (Z_packet_to_target_hw_bp_type): ... this, and return a
7514 target_hw_bp_type instead.
7515 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7516 instead of an enum target_point_type.
7517 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7518 breakpoint type.
7519 (aarch64_dr_state_insert_one_point)
7520 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7521 (aarch64_handle_aligned_watchpoint)
7522 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7523 Take an enum target_hw_bp_type instead of an enum
7524 target_point_type.
7525 (aarch64_supports_z_point_type): New function.
7526 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7527 use Z_packet_to_target_hw_bp_type.
7528
786dc519
JB
75292014-05-20 Joel Brobecker <brobecker@adacore.com>
7530
7531 * configure.ac: Only use -Werror by default when DEVELOPMENT
7532 is true.
7533 * configure: Regenerate.
7534
9e0aa64f
JK
75352014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7536
7537 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7538 * linux-x86-low.c (X86_64_USER_REGS): New.
7539 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7540
2b577b92
YQ
75412014-04-28 Yao Qi <yao@codesourcery.com>
7542
7543 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7544 name.
7545
94611da2
PA
75462014-04-25 Pedro Alves <palves@redhat.com>
7547
7548 PR server/16255
7549 * linux-low.c (linux_attach_fail_reason_string): New function.
7550 (linux_attach_lwp): Delete.
7551 (linux_attach_lwp_1): Rename to ...
7552 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7553 argument. Remove "initial" parameter. Return int instead of
7554 void. Don't error or warn here.
7555 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7556 failure to attach to the tgid. Call warning when failing to
7557 attach to an lwp.
7558 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7559 argument. Remove "initial" parameter. Return int instead of
7560 void. Don't error or warn here.
7561 (linux_attach_fail_reason_string): New declaration.
7562 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7563 interface change. Use linux_attach_fail_reason_string.
7564
01f9f808
MS
75652014-04-24 Michael Sturm <michael.sturm@mintel.com>
7566 Walfred Tedeschi <walfred.tedeschi@intel.com>
7567
7568 * Makefile.in: Added rules to handle new files
7569 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7570 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7571 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7572 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7573 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7574 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7575 x32-avx512-linux.o.
7576 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7577 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7578 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7579 i386/x32-avx512.xml.
7580 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7581 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7582 i386/x32-avx512-linux.xml.
7583 * i387-fp.c (num_avx512_k_registers): New constant for number
7584 of K registers.
7585 (num_avx512_zmmh_low_registers): New constant for number of
7586 lower ZMM registers (0-15).
7587 (num_avx512_zmmh_high_registers): New constant for number of
7588 higher ZMM registers (16-31).
7589 (num_avx512_ymmh_registers): New contant for number of higher
7590 YMM registers (ymm16-31 added by avx521 on x86_64).
7591 (num_avx512_xmm_registers): New constant for number of higher
7592 XMM registers (xmm16-31 added by AVX512 on x86_64).
7593 (struct i387_xsave): Add space for AVX512 registers.
7594 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7595 Add code to handle AVX512 registers.
7596 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7597 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7598 prototypei from generated file.
7599 (tdesc_amd64_avx512_linux): Likewise.
7600 (init_registers_x32_avx512_linux): Likewise.
7601 (tdesc_x32_avx512_linux): Likewise.
7602 (init_registers_i386_avx512_linux): Likewise.
7603 (tdesc_i386_avx512_linux): Likewise.
7604 (x86_64_regmap): Add AVX512 registers.
7605 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7606 mask.
7607 (initialize_low_arch): Add code to initialize AVX512 registers.
7608
51aa91f9
PA
76092014-04-23 Pedro Alves <palves@redhat.com>
7610
7611 * mem-break.c (find_gdb_breakpoint_at): Make static.
7612 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7613
a4165e94
PA
76142014-04-23 Pedro Alves <palves@redhat.com>
7615
7616 * i386-low.c: Don't include break-common.h here.
7617 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7618 prototype to take target_hw_bp_type as argument instead of a Z
7619 packet char.
7620 * i386-low.h: Include break-common.h here.
7621 (Z_packet_to_hw_type): Declare.
7622 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7623 prototypes.
7624 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7625 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7626 (x86_remove_point): Convert the packet number to a
7627 target_hw_bp_type before calling i386_low_remove_watchpoint.
7628 * win32-i386-low.c (i386_insert_point): Convert the packet number
7629 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7630 (i386_remove_point): Convert the packet number to a
7631 target_hw_bp_type before calling i386_low_remove_watchpoint.
7632
b8acf843
PA
76332014-04-23 Pedro Alves <palves@redhat.com>
7634
7635 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7636
d708bcd1
PA
76372014-04-10 Pedro Alves <palves@redhat.com>
7638
7639 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7640 Check if the condition or command is NULL before checking if the
7641 breakpoint is known. On success, return true.
7642 * mem-break.h (add_breakpoint_condition): Document return.
7643 (add_breakpoint_commands): Add describing comment.
7644 * server.c (skip_to_semicolon): New function.
7645 (process_point_options): Use it.
7646
2eec7d5b
PA
76472014-04-09 Pedro Alves <palves@redhat.com>
7648
7649 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7650 to lwpid_of.
7651
fa96cb38
PA
76522014-02-27 Pedro Alves <palves@redhat.com>
7653
7654 PR 12702
7655 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7656 macros.
7657 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7658 output.
7659 (last_thread_of_process_p): Take a PID argument instead of a
7660 thread pointer.
7661 (linux_wait_for_lwp): Delete.
7662 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7663 functions.
7664 (linux_low_filter_event): New function, party factored out from
7665 linux_wait_for_event.
7666 (linux_wait_for_event): Rename to ...
7667 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7668 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7669 sigsuspend. Check for zombie leaders.
7670 (linux_wait_for_event): Reimplement as wrapper around
7671 linux_wait_for_event_filtered.
7672 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7673 a normal or signal exit is seen, it's the whole process exiting.
7674 (wait_for_sigstop): No longer a for_each_inferior callback.
7675 Rewrite on top of linux_wait_for_event_filtered.
7676 (stop_all_lwps): Call wait_for_sigstop directly.
7677 * server.c (resume, handle_target_event): Handle
7678 TARGET_WAITKIND_NO_RESUMED.
7679
d763de10
JB
76802014-02-26 Joel Brobecker <brobecker@adacore.com>
7681
7682 * win32-low.c (psapi_get_dll_name,
7683 * win32_CreateToolhelp32Snapshot): Delete.
7684 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7685 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7686 Delete.
7687 (handle_load_dll): Add function description.
7688 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7689
850a0f76
JB
76902014-02-26 Joel Brobecker <brobecker@adacore.com>
7691
7692 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7693 Add comment.
7694 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7695 base address when calling win32_add_one_solib.
7696 (handle_load_dll): Delete local variable load_addr.
7697 Remove 0x1000 offset applied to DLL base address when calling
7698 win32_add_one_solib.
7699 (handle_unload_dll): Add comment.
7700
f25b3fc3
JB
77012014-02-26 Joel Brobecker <brobecker@adacore.com>
7702
7703 * win32-low.c (win32_add_all_dlls): Renames
7704 win32_ensure_ntdll_loaded. Rewrite function documentation.
7705 Adjust implementation to always load all DLLs.
7706 Add 0x1000 offset to DLL base address when calling
7707 win32_add_one_solib.
7708 (child_initialization_done): New static global.
7709 (do_initial_child_stuff): Set child_initialization_done to
7710 zero during child initialization, and 1 after. Replace call
7711 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7712 Add comment.
7713 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7714 (handle_unload_dll): Add function documentation.
7715 (get_child_debug_event): Ignore load and unload DLL events
7716 during child initialization.
7717
d86d4aaf
DE
77182014-02-20 Doug Evans <dje@google.com>
7719
3bc32da3 7720 Remove global all_lwps.
d86d4aaf
DE
7721 * inferiors.h (ptid_of): Move here from linux-low.h.
7722 (pid_of, lwpid_of): Ditto.
7723 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7724 parameter is a struct thread_info * now.
7725 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7726 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7727 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7728 directly.
7729 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7730 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7731 * linux-arm-low.c (update_registers_callback): Update, "entry"
7732 parameter is a struct thread_info * now.
7733 Fetch lwpid from current_inferior directly.
7734 (arm_insert_point): Pass &all_threads to find_inferior instead of
7735 &all_lwps.
7736 (arm_remove_point): Ditto.
7737 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7738 (arm_prepare_to_resume): Fetch pid from thread.
7739 (arm_read_description): Fetch lwpid from current_inferior directly.
7740 * linux-low.c (all_lwps): Delete.
7741 (delete_lwp): Delete call to remove_inferior.
7742 (handle_extended_wait): Fetch lwpid from thread.
7743 (add_lwp): Don't set lwp->entry.id. Remove call to
7744 add_inferior_to_list.
7745 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7746 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7747 (kill_one_lwp_callback): Ditto.
7748 (linux_kill): Don't dereference NULL pointer.
7749 Fetch ptid,lwpid from thread.
7750 (get_detach_signal): Fetch ptid from thread.
7751 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7752 Simplify call to regcache_invalidate_thread.
7753 (delete_lwp_callback): Update, "entry" parameter is a
7754 struct thread_info * now. Fetch pid from thread.
7755 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7756 (status_pending_p_callback): Update, "entry" parameter is a
7757 struct thread_info * now. Fetch ptid from thread.
7758 (find_lwp_pid): Update, "entry" parameter is a
7759 struct thread_info * now.
7760 (linux_wait_for_lwp): Fetch pid from thread.
7761 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7762 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7763 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7764 (dequeue_one_deferred_signal): Ditto.
7765 (cancel_breakpoint): Fetch ptid from current_inferior.
7766 (linux_wait_for_event): Pass &all_threads to find_inferior,
7767 not &all_lwps. Fetch ptid, lwpid from thread.
7768 (count_events_callback): Update, "entry" parameter is a
7769 struct thread_info * now.
7770 (select_singlestep_lwp_callback): Ditto.
7771 (select_event_lwp_callback): Ditto.
7772 (cancel_breakpoints_callback): Ditto.
7773 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7774 not &all_lwps.
7775 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7776 (unsuspend_one_lwp): Update, "entry" parameter is a
7777 struct thread_info * now.
7778 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7779 not &all_lwps.
7780 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7781 Fetch lwpid from thread, not lwp.
7782 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7783 Pass &all_threads to find_inferior, not &all_lwps.
7784 (send_sigstop): Fetch lwpid from thread, not lwp.
7785 (send_sigstop_callback): Update, "entry" parameter is a
7786 struct thread_info * now.
7787 (suspend_and_send_sigstop_callback): Ditto.
7788 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7789 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7790 struct thread_info * now.
7791 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7792 from thread, lwp.
7793 (lwp_running): Update, "entry" parameter is a
7794 struct thread_info * now.
7795 (stop_all_lwps): Fetch ptid from thread.
7796 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7797 (linux_resume_one_lwp): Fetch lwpid from thread.
7798 (linux_set_resume_request): Update, "entry" parameter is a
7799 struct thread_info * now. Fetch pid, lwpid from thread.
7800 (resume_status_pending_p): Update, "entry" parameter is a
7801 struct thread_info * now.
7802 (need_step_over_p): Ditto. Fetch lwpid from thread.
7803 (start_step_over): Fetch lwpid from thread.
7804 (linux_resume_one_thread): Update, "entry" parameter is a
7805 struct thread_info * now. Fetch lwpid from thread.
7806 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7807 (proceed_one_lwp): Update, "entry" parameter is a
7808 struct thread_info * now. Fetch lwpid from thread.
7809 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7810 struct thread_info * now.
7811 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7812 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7813 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7814 directly.
7815 (regsets_store_inferior_registers): Ditto.
7816 (fetch_register, store_register): Ditto.
7817 (linux_read_memory, linux_write_memory): Ditto.
7818 (linux_request_interrupt): Ditto.
7819 (linux_read_auxv): Ditto.
7820 (linux_xfer_siginfo): Ditto.
7821 (linux_qxfer_spu): Ditto.
7822 (linux_qxfer_libraries_svr4): Ditto.
7823 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7824 moved to inferiors.h.
7825 (get_lwp): Delete.
7826 (get_thread_lwp): Update.
7827 (struct lwp_info): Delete member "entry". Simplify comment for
7828 member "thread".
7829 (all_lwps): Delete.
7830 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7831 current_inferior directly.
7832 (update_watch_registers_callback): Update, "entry" parameter is a
7833 struct thread_info * now. Fetch pid from thread.
7834 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7835 (mips_insert_point): Fetch lwpid from current_inferior.
7836 Pass &all_threads to find_inferior, not &all_lwps.
7837 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7838 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7839 directly.
7840 (mips_stopped_data_address): Ditto.
7841 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7842 directly.
7843 * linux-tile-low.c (tile_arch_setup): Ditto.
7844 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7845 (update_debug_registers_callback): Update, "entry" parameter is a
7846 struct thread_info * now. Fetch pid from thread.
7847 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7848 Pass &all_threads to find_inferior, not &all_lwps.
7849 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7850 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7851 Pass &all_threads to find_inferior, not &all_lwps.
7852 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7853 (i386_dr_low_get_status): Ditto.
7854 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7855 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7856 (x86_linux_read_description): Ditto.
7857 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7858
3b8361aa
DE
78592014-02-20 Doug Evans <dje@google.com>
7860
7861 * inferiors.c (get_first_inferior): Fix buglet.
7862
f7667f0d
DE
78632014-02-19 Doug Evans <dje@google.com>
7864
7865 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7866 * inferiors.c (add_thread): Change result type to struct thread_info *.
7867 All callers updated.
7868 (add_lwp): Call add_thread here instead of in callers.
7869 All callers updated.
7870 * linux-low.h (get_lwp_thread): Rewrite.
7871 (struct lwp_info): New member "thread".
7872
b3312d80
DE
78732014-02-19 Doug Evans <dje@google.com>
7874
7875 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7876 All callers updated.
7877
ecc6f45c
DE
78782014-02-19 Doug Evans <dje@google.com>
7879
7880 * inferiors.c (add_thread): Fix whitespace.
7881
649ebbca
DE
78822014-02-19 Doug Evans <dje@google.com>
7883
7884 * dll.c (clear_dlls): Replace accessing list implemention details
7885 with API function.
7886 * gdbthread.h (get_first_thread): Declare.
7887 * inferiors.c (for_each_inferior_with_data): New function.
7888 (get_first_thread): New function.
7889 (find_thread_ptid): Simplify.
7890 (get_first_inferior): New function.
7891 (clear_list): Delete.
7892 (one_inferior_p): New function.
7893 (clear_inferior_list): New function.
7894 (clear_inferiors): Update.
7895 * inferiors.h (for_each_inferior_with_data): Declare.
7896 (clear_inferior_list): Declare.
7897 (one_inferior_p): Declare.
7898 (get_first_inferior): Declare.
7899 * linux-low.c (linux_wait_for_event): Replace accessing list
7900 implemention details with API function.
7901 * server.c (target_running): Ditto.
7902 (accumulate_file_name_length): New function.
7903 (emit_dll_description): New function.
7904 (handle_qxfer_libraries): Replace accessing list implemention
7905 details with API function.
7906 (handle_qxfer_threads_worker): New function.
7907 (handle_qxfer_threads_proper): Replace accessing list implemention
7908 details with API function.
7909 (handle_query): Ditto.
7910 (visit_actioned_threads_callback_ftype): New typedef.
7911 (visit_actioned_threads_data): New struct.
7912 (visit_actioned_threads): Rewrite to be find_inferior callback.
7913 (resume): Call find_inferior.
7914 (handle_status): Replace accessing list implemention
7915 details with API function.
7916 (process_serial_event): Replace accessing list implemention details
7917 with API function.
7918 * target.c (set_desired_inferior): Replace accessing list implemention
7919 details with API function.
7920 * tracepoint.c (same_process_p): New function.
7921 (gdb_agent_about_to_close): Replace accessing list implemention
7922 details with API function.
7923 * win32-low.c (child_delete_thread): Replace accessing list
7924 implemention details with API function.
7925 (match_dll_by_basename): New function.
7926 (dll_is_loaded_by_basename): New function.
7927 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7928 details call to dll_is_loaded_by_basename.
7929
80894984
DE
79302014-02-19 Doug Evans <dje@google.com>
7931
7932 * dll.h (struct dll_info): Add comment.
7933 * gdbthread.h (struct thread_info): Add comment.
7934 (current_ptid): Simplify.
7935 * inferiors.c (add_process): Update.
7936 (remove_process): Update.
7937 * inferiors.h (struct process_info): Rename member "head" to "entry".
7938 * linux-low.c (delete_lwp): Update.
7939 (add_lwp): Update.
7940 (last_thread_of_process_p): Update.
7941 (kill_one_lwp_callback, linux_kill): Update.
7942 (status_pending_p_callback): Update.
7943 (wait_for_sigstop): Update. Simplify read of ptid.
7944 (start_step_over): Update.
7945 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7946 (get_lwp_thread): Update.
7947 (struct lwp_info): Rename member "head" to "entry".
7948 * regcache.h (inferior_list_entry): Delete.
7949 * server.c (kill_inferior_callback): Update.
7950 (detach_or_kill_inferior_callback): Update.
7951 (print_started_pid): Update.
7952 (print_attached_pid): Update.
7953 (process_serial_event): Simplify read of ptid.
7954 * thread-db.c (thread_db_create_event): Update.
7955 (thread_db_get_tls_address): Update.
7956 * win32-low.c (current_inferior_ptid): Simplify.
7957
46917d26
TT
79582014-02-19 Tom Tromey <tromey@redhat.com>
7959
7960 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7961 argument.
7962 (target_supports_btrace): Update.
7963
0759a81e
YQ
79642014-02-14 Yao Qi <yao@codesourcery.com>
7965
7966 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7967 (rsp-low-ipa.o): New target.
7968
a7191e8b
TT
79692014-02-12 Tom Tromey <tromey@redhat.com>
7970
7971 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7972 convert_ascii_to_int.
7973 * regcache.c (registers_to_string): Likewise.
7974 * remote-utils.c (decode_M_packet): Likewise.
7975 * server.c (process_serial_event): Likewise.
7976
ff0e980e
TT
79772014-02-12 Tom Tromey <tromey@redhat.com>
7978
7979 * server.c (handle_query, handle_v_run): Use hex2bin, not
7980 unhexify.
7981 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7982
e9371aff
TT
79832014-02-12 Tom Tromey <tromey@redhat.com>
7984
7985 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7986 convert_int_to_ascii.
7987 * regcache.c (registers_to_string, collect_register_as_string):
7988 Likewise.
7989 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7990 Likewise.
7991 * server.c (process_serial_event): Likewise.
7992 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7993 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7994
971dc0b8
TT
79952014-02-12 Tom Tromey <tromey@redhat.com>
7996
7997 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7998 bin2hex, not hexify.
7999 * tracepoint.c (cmd_qtstatus): Likewise.
8000
0a822afb
TT
80012014-02-12 Tom Tromey <tromey@redhat.com>
8002
8003 * remote-utils.c (monitor_output): Pass explicit length to
8004 hexify.
8005
9c3d6531
TT
80062014-02-12 Tom Tromey <tromey@redhat.com>
8007
8008 * tracepoint.c: Include rsp-low.h.
8009 * server.c: Include rsp-low.h.
8010 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8011 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8012 declare.
8013 * remote-utils.c: Include rsp-low.h.
8014 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8015 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8016 (convert_int_to_ascii, convert_ascii_to_int): Move to
8017 common/rsp-low.c.
8018 * regcache.c: Include rsp-low.h.
8019 * ax.c: Include rsp-low.h.
8020 * Makefile.in (SFILES): Add common/rsp-low.c.
8021 (OBS): Add rsp-low.o.
8022 (rsp-low.o): New target.
8023
01fd3ea5
TT
80242014-02-12 Tom Tromey <tromey@redhat.com>
8025
8026 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8027 Include print-utils.h.
8028 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8029 (plongest, thirty_two, phex_nz): Remove.
8030 * Makefile.in (SFILES): Add common/print-utils.c.
8031 (OBS): Add print-utils.o.
8032 (print-utils-ipa.o): New target.
8033 (print-utils.o): New target.
8034 (IPA_OBJS): Add print-utils-ipa.o.
8035
e99dc820
TT
80362014-02-06 Tom Tromey <tromey@redhat.com>
8037
8038 * Makefile.in (SFILES): Fix indentation.
8039
ee1e2d4f
DE
80402014-02-05 Doug Evans <dje@google.com>
8041
8042 * linux-low.c (linux_wait_for_event): Improve comment.
8043 (linux_wait_1): Keep current_inferior in sync with event_child.
8044
f5a02773
DE
80452014-01-22 Doug Evans <dje@google.com>
8046
8047 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8048
87ce2a04
DE
80492014-01-22 Doug Evans <dje@google.com>
8050
8051 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8052 * configure: Regenerate.
8053 * config.in: Regenerate.
8054 * Makefile.in (SFILES): Add debug.c.
8055 (OBS): Add debug.o.
8056 * debug.c: New file.
8057 * debug.h: New file.
8058 * linux-aarch64-low.c (*): Update all debugging printfs to use
8059 debug_printf instead of fprintf.
8060 * linux-arm-low.c (*): Ditto.
8061 * linux-cris-low.c (*): Ditto.
8062 * linux-crisv32-low.c (*): Ditto.
8063 * linux-m32r-low.c (*): Ditto.
8064 * linux-sparc-low.c (*): Ditto.
8065 * linux-x86.c (*): Ditto.
8066 * linux-low.c (*): Ditto.
8067 (linux_wait_1): Add calls to debug_enter, debug_exit.
8068 (linux_wait): Remove redundant debugging printf.
8069 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8070 (linux_resume, unstop_all_lwps): Ditto.
8071 * mem-break.c (*): Update all debugging printfs to use
8072 debug_printf instead of fprintf.
8073 * remote-utils.c (*): Ditto.
8074 * thread-db.c (*): Ditto.
8075 * server.c #include <ctype.h>, "gdb_vecs.h".
8076 (debug_threads): Moved to debug.c.
8077 (*): Update all debugging printfs to use debug_printf instead of
8078 fprintf.
8079 (start_inferior): Replace call to fflush with call to debug_flush.
8080 (monitor_show_help): Mention set debug-format.
8081 (parse_debug_format_options): New function.
8082 (handle_monitor_command): Handle "monitor set debug-format".
8083 (gdbserver_usage): Mention --debug-format.
8084 (main): Parse --debug-format.
8085 * server.h (debug_threads): Declaration moved to debug.h.
8086 #include "debug.h".
8087 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8088 trace_debug_1 that uses debug_printf.
8089 (tracepoint_look_up_symbols): Update all debugging printfs to use
8090 debug_printf instead of fprintf.
8091
e671835b
BS
80922014-01-20 Baruch Siach <baruch@tkos.co.il>
8093
8094 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8095 sys/ptrace.h.
8096
b5737fa9
PA
80972014-01-17 Pedro Alves <palves@redhat.com>
8098
ea38d2a9 8099 PR build/16445
c7faa97a
PA
8100 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8101 defined after including gdb_proc_service.h.
b5737fa9 8102
40ed484e
DE
81032014-01-16 Doug Evans <dje@google.com>
8104
8105 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8106 (match_dll): Use it.
8107
969c39fb
MM
81082014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8109
8110 * target.h (target_ops) <read_btrace>: Change parameters and
8111 return type to allow error reporting.
8112 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8113 trace reading errors on.
8114 * linux-low.c (linux_low_read_btrace): Pass trace reading
8115 errors on.
8116 (linux_low_disable_btrace): New.
8117
ab7f45ba
DE
81182014-01-15 Doug Evans <dje@google.com>
8119
8120 * inferiors.c (thread_id_to_gdb_id): Delete.
8121 * inferiors.h (thread_id_to_gdb_id): Delete.
8122
66af0f44
EZ
81232014-01-13 Eli Zaretskii <eliz@gnu.org>
8124
8125 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8126 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8127 versions.
8128
9939e131
PA
81292014-01-08 Pedro Alves <palves@redhat.com>
8130
8131 * server.c (handle_status): Don't discard previous queued stop
8132 replies or thread's pending status here.
8133 (main) <disconnection>: Do it here instead.
8134
b7ea362b
PA
81352014-01-08 Pedro Alves <palves@redhat.com>
8136
8137 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8138 * server.c (visit_actioned_threads, handle_pending_status): New
8139 function.
8140 (handle_v_cont): Factor out parts to ...
8141 (resume): ... this new function. If in all-stop, and a thread
8142 being resumed has a pending status, report it without actually
8143 resuming.
8144 (myresume): Adjust to use the new 'resume' function.
8145 (clear_pending_status_callback, set_pending_status_callback)
8146 (find_status_pending_thread_callback): New functions.
8147 (handle_status): Handle the case of multiple threads having
8148 interesting statuses to report. Report threads' real last signal
8149 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8150 with an interesting thread to report the status for, instead of
8151 always reporting the status of the first thread.
8152
28498c42
JB
81532014-01-01 Joel Brobecker <brobecker@adacore.com>
8154
8155 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8156 * gdbreplay.c (gdbreplay_version): Likewise.
8157
f45c82da
YZ
81582013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8159
8160 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8161 iov.iov_len with the real length in use.
8162
379a5e2d
JB
81632013-12-13 Joel Brobecker <brobecker@adacore.com>
8164
8165 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8166 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8167 for all targets that use win32-low.c.
8168 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8169 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8170
4210d83e
PA
81712013-12-13 Pedro Alves <palves@redhat.com>
8172
8173 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8174 if equal to TARGET_WAITKIND_LOADED.
8175 * win32-low.c (cached_status): New static global.
8176 (win32_wait): Add declaration.
8177 (do_initial_child_stuff): Flush all initial pending debug events
8178 up to the initial breakpoint.
8179 (win32_wait): If CACHED_STATUS was set, return that instead
8180 of doing a real wait. Remove the code resuming the execution
8181 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8182 during the initial phase. Also remove the code changing
8183 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8184 TARGET_WAITKIND_STOPPED.
8185
e7f0d979
YQ
81862013-12-11 Yao Qi <yao@codesourcery.com>
8187
8188 * notif.c (handle_notif_ack): Return 0 if no notification
8189 matches.
8190
ebcf782c
DE
81912013-11-20 Doug Evans <dje@google.com>
8192
8193 * linux-low.c (linux_set_resume_request): Fix comment.
8194
20ad9378
DE
81952013-11-20 Doug Evans <dje@google.com>
8196
8197 * linux-low.c (resume_status_pending_p): Tweak comment.
8198
a196ebeb
WT
81992013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8200
8201 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8202 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8203 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8204 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8205 (srv_amd64_regobj): Add amd64-mpx.o.
8206 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8207 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8208 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8209 * i387-fp.c (num_pl_bnd_register) Added constant.
8210 (num_pl_bnd_cfg_registers) Added constant.
8211 (struct i387_xsave) Added reserved area and MPX fields.
8212 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8213 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8214 function.
8215 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8216 (init_registers_amd64_mpx_linux): Declare new function.
8217 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8218 (x86_64_regmap): Add MPX registers.
8219 (x86_linux_read_description): Add MPX case.
8220 (initialize_low_arch): Initialize MPX targets.
8221
0080a2f6
TT
82222013-11-18 Tom Tromey <tromey@redhat.com>
8223
8224 * configure: Rebuild.
8225 * configure.ac: Don't check for stdlib.h.
8226 * gdbreplay.c: Unconditionally include stdlib.h.
8227
2978b111
TT
82282013-11-18 Tom Tromey <tromey@redhat.com>
8229
8230 * config.in: Rebuild.
8231 * configure: Rebuild.
8232 * configure.ac: Don't use AC_HEADER_DIRENT.
8233
a3d08894
TT
82342013-11-18 Tom Tromey <tromey@redhat.com>
8235
8236 * server.h: Don't check HAVE_STRING_H.
8237 * gdbreplay.c: Don't check HAVE_STRING_H.
8238 * configure: Rebuild.
8239
0a5dd17d
TT
82402013-11-18 Tom Tromey <tromey@redhat.com>
8241
8242 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8243 LIBGNU.
8244
1bd2f0ba
TT
82452013-11-08 Tom Tromey <tromey@redhat.com>
8246
8247 * configure, config.in: Rebuild.
8248 * configure.ac: Remove unused configury.
8249
3266f10b
TT
82502013-11-08 Tom Tromey <tromey@redhat.com>
8251
8252 * acinclude.m4: Include common.m4, codeset.m4.
8253 * configure, config.in: Rebuild.
8254 * configure.ac: Use GDB_AC_COMMON.
8255
6682d959
AA
82562013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8257
8258 * linux-s390-low.c (HWCAP_S390_TE): New define.
8259 (s390_arch_setup): Consider the TE field in the HWCAP for
8260 determining 'have_regset_tdb'.
8261
fd0a4d76
SDJ
82622013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8263
8264 PR gdb/16014
8265 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8266 call to sizeof.
8267
1a3d890b
PA
82682013-10-02 Pedro Alves <palves@redhat.com>
8269
8270 * server.c (process_serial_event): Don't output "GDBserver
8271 exiting" if GDB is connected through stdio.
8272 * target.c (mywait): Likewise, be silent if GDB is connected
8273 through stdio.
8274
97ad4581
JB
82752013-10-01 Joel Brobecker <brobecker@adacore.com>
8276
8277 * lynx-low.c (lynx_add_threads_after_attach): New function.
8278 (lynx_attach): Remove call to add_thread. Add call to
8279 lynx_add_threads_after_attach instead.
8280
5b4e221c
MF
82812013-09-28 Mike Frysinger <vapier@gentoo.org>
8282
8283 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8284 * config.in, configure: Regenerated.
8285
ee47b2f8
YQ
82862013-09-18 Yao Qi <yao@codesourcery.com>
8287
8288 PR server/15959
8289 * server.c (start_inferior): Clear 'resume_info'.
8290
d6707650 82912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8292
d6707650
JW
8293 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8294 for each register.
8295
9243dd0e 82962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8297
9243dd0e
JW
8298 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8299 linux-tile-low.o to srv_tgtobj.
8300
c623a6ef
WN
83012013-09-16 Will Newton <will.newton@linaro.org>
8302
8303 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8304 out regs.
8305
fb71d39e
PA
83062013-09-06 Pedro Alves <palves@redhat.com>
8307
8308 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8309 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8310 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8311 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8312 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8313 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8314
8e7e9910
PA
83152013-09-06 Pedro Alves <palves@redhat.com>
8316
8317 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8318 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8319
7c3a12ca
PA
83202013-09-06 Pedro Alves <palves@redhat.com>
8321
8322 * linux-amd64-ipa.c: Include tracepoint.h.
8323 * linux-i386-ipa.c: Include tracepoint.h.
8324
8eb3d7b6
RW
83252013-09-06 Ricard Wanderlof <ricardw@axis.com>
8326
8327 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8328 (ps_get_thread_area): New function.
8329
eddddb9d
RW
83302013-09-06 Ricard Wanderlof <ricardw@axis.com>
8331
8332 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8333 (initialize_low_arch): Call init_registers_crisv32 rather than
8334 init_register_crisv32.
8335
533b0600
PA
83362013-09-05 Pedro Alves <palves@redhat.com>
8337
8338 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8339 to ...
8340 * hostio.h: ... this new file.
8341 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8342 win32-low.c: Include hostio.h.
8343
0ce3d3b5
PA
83442013-09-05 Pedro Alves <palves@redhat.com>
8345
8346 * server.h (gdb_client_data, handler_func, callback_handler_func)
8347 (delete_file_handler, add_file_handler, append_callback_event)
8348 (delete_callback_event, start_event_loop, initialize_event_loop):
8349 Move to event-loop.h and include it.
8350 * event-loop.h: New file.
8351
799cdc37
PA
83522013-09-05 Pedro Alves <palves@redhat.com>
8353
8354 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8355 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8356 (loaded_dll, unloaded_dll): Move to ...
8357 * dll.h: ... this new file.
8358 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8359
6a6bbd9d
PA
83602013-09-05 Pedro Alves <palves@redhat.com>
8361
8362 * server.h (current_process, get_thread_process, all_processes)
8363 (add_inferior_to_list, for_each_inferior, current_inferior)
8364 (remove_inferior, add_process, remove_process, find_process_pid)
8365 (have_started_inferiors_p, have_attached_inferiors_p)
8366 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8367 (clear_inferiors, find_inferior, find_inferior_id)
8368 (inferior_target_data, set_inferior_target_data)
8369 (inferior_regcache_data, set_inferior_regcache_data): Move to
8370 inferiors.h, and include it.
8371 * inferiors.h: New file.
8372
f699aaba
PA
83732013-09-05 Pedro Alves <palves@redhat.com>
8374
8375 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8376 Move ...
72f4393d 8377 * ax.h: ... here.
f699aaba 8378
c144c7a0
PA
83792013-09-05 Pedro Alves <palves@redhat.com>
8380
8381 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8382 tracepoint.h.
8383 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8384 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8385 (handle_tracepoint_general_set, handle_tracepoint_query)
8386 (tracepoint_finished_step, tracepoint_was_hit)
8387 (release_while_stepping_state_list, current_traceframe)
8388 (in_readonly_region, traceframe_read_mem)
8389 (fetch_traceframe_registers, traceframe_read_sdata)
8390 (traceframe_read_info, struct fast_tpoint_collect_status)
8391 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8392 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8393 (supply_fast_tracepoint_registers)
8394 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8395 (ipa_tdesc, claim_trampoline_space)
8396 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8397 (agent_mem_read, agent_get_trace_state_variable_value)
8398 (agent_set_trace_state_variable_value, agent_tsv_read)
8399 (agent_mem_read_string, get_raw_reg_func_addr)
8400 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8401 * tracepoint.h: ... this new file.
8402
ff42e6ab
PA
84032013-09-05 Pedro Alves <palves@redhat.com>
8404
8405 * server.h (perror_with_name, error, fatal, warning, paddress)
8406 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8407 include it.
8408 * utils.h: New file.
8409
541af0f4
PA
84102013-09-05 Pedro Alves <palves@redhat.com>
8411
8412 * server.h (remote_debug, noack_mode, transport_is_reliable)
8413 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8414 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8415 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8416 (write_enn, initialize_async_io, enable_async_io)
8417 (disable_async_io, check_remote_input_interrupt_request)
8418 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8419 (dead_thread_notify, prepare_resume_reply)
8420 (decode_address_to_semicolon, decode_address, decode_m_packet)
8421 (decode_M_packet, decode_X_packet, decode_xfer_write)
8422 (decode_search_memory_packet, unhexify, hexify)
8423 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8424 (look_up_one_symbol, relocate_instruction)
8425 (monitor_output): Move to remote-utils.h, and include it.
8426 * remote-utils.h: New file.
8427
eebdf26b
PA
84282013-09-05 Pedro Alves <palves@redhat.com>
8429
8430 * server.h (_): Delete.
8431
3aafd2ff
PA
84322013-09-02 Pedro Alves <palves@redhat.com>
8433
8434 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8435 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8436 allocated.
8437 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8438
cee83bcb
PM
84392013-09-02 Pierre Muller <muller@sourceware.org>
8440
8441 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8442 or WriteProcessMemory complete successfully and handle
8443 ERROR_PARTIAL_COPY error.
8444
9a13b2fa
PA
84452013-09-02 Pedro Alves <palves@redhat.com>
8446
8447 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8448 error instead of EIO.
8449
602e3198
JK
84502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8451
8452 PR server/15604
8453 * linux-low.c: Include filestuff.h.
8454 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8455 * lynx-low.c: Include filestuff.h.
8456 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8457 * server.c: Include filestuff.h.
8458 (main): Call notice_open_fds.
8459 * spu-low.c: Include filestuff.h.
8460 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8461
96d7229d
LM
84622013-08-22 Luis Machado <lgustavo@codesourcery.com>
8463
8464 * Makefile.in: Explain why ../target and ../nat are not
8465 listed as include file search paths.
8466 (linux-waitpid.o): New object file rule.
8467 * configure.srv (srv_native_linux_obj): New variable.
8468 Replace all occurrences of linux native object files with
8469 $srv_native_linux_obj.
8470 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8471 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8472 (linux_enable_event_reporting): Remove declaration.
8473 (my_waitpid): Moved to common/linux-waitpid.c.
8474 (linux_wait_for_event): Pass ptid when calling
8475 linux_enable_event_reporting.
8476 (linux_supports_tracefork_flag): Remove.
8477 (linux_enable_event_reporting): Likewise.
8478 (linux_tracefork_grandchild): Remove.
8479 (STACK_SIZE): Moved to common/linux-ptrace.c.
8480 (linux_tracefork_child): Remove.
8481 (linux_test_for_tracefork): Remove.
8482 (linux_look_up_symbols): Call linux_supports_traceclone.
8483 (initialize_low): Remove call to linux_test_for_tracefork.
8484 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8485 common/linux-ptrace.h.
8486 (PTRACE_TYPE_ARG4): Likewise.
8487 Include linux-ptrace.h.
8488
32940073
PA
84892013-08-21 Pedro Alves <palves@redhat.com>
8490
8491 * config.in: Renegerate.
8492
33b60d58 84932013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8494
33b60d58
LM
8495 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8496 (SFILES): Remove $(srcdir)/common/target-common.c and
8497 add $(srcdir)/target/waitstatus.c.
8498 (OBS): Remove target-common.o and add waitstatus.o.
8499 (server_h): Remove $(srcdir)/../common/target-common.h and
8500 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8501 and $(srcdir)/../target/waitstatus.h.
8502 (target-common.o): Remove.
8503 (waitstatus.o): New target object file.
8504 * target.h: Do not include target-common.h and
8505 include target/resume.h, target/wait.h and
8506 target/waitstatus.h.
8507
b8e1b30e
LM
85082013-08-13 Luis Machado <lgustavo@codesourcery.com>
8509
8510 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8511 to PTRACE_TYPE_ARG3.
8512 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8513 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8514 PTRACE_TYPE_ARG4.
8515 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8516 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8517
7a60ad40
YQ
85182013-07-27 Jie Zhang <jie@codesourcery.com>
8519 Daniel Jacobowitz <dan@codesourcery.com>
8520 Yao Qi <yao@codesourcery.com>
8521
8522 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8523 (mips-linux-watch.o): New rule.
8524 (mips_linux_watch_h): New variable.
8525 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8526 srv_tgtobj.
8527 * linux-mips-low.c: Include mips-linux-watch.h.
8528 (struct arch_process_info, struct arch_lwp_info): New.
8529 (update_watch_registers_callback): New function.
8530 (mips_linux_new_process, mips_linux_new_thread) New functions.
8531 (mips_linux_prepare_to_resume, mips_insert_point): New
8532 functions.
8533 (mips_remove_point, mips_stopped_by_watchpoint): New
8534 functions.
8535 (rsp_bp_type_to_target_hw_bp_type): New function.
8536 (mips_stopped_data_address): New function.
8537 (the_low_target): Add watchpoint support functions.
8538
de6f69ad
YQ
85392013-07-27 Yao Qi <yao@codesourcery.com>
8540
8541 * i386-low.c: Include break-common.h.
8542 (enum target_hw_bp_type): Remove.
8543
3360c0bf
LM
85442013-07-24 Luis Machado <lgustavo@codesourcery.com>
8545
8546 * Makefile.in (SFILES): /common/target-common.c.
8547 (OBS): Add target-common.o.
8548 (server_h): Add $(srcdir)/../common/target-common.h.
8549 (target-common.o): New target.
8550 * server.c (queue_stop_reply_callback): Free
8551 status string after use.
8552 * target.c (target_waitstatus_to_string): Remove.
8553 * target.h: Include target-common.h.
8554 (resume_kind): Likewise.
8555 (target_waitkind): Likewise.
8556 (target_waitstatus): Likewise.
8557 (TARGET_WNOHANG): Likewise.
8558
bd885420
YQ
85592013-07-04 Yao Qi <yao@codesourcery.com>
8560
8561 * Makefile.in (host_alias): Use @host_noncanonical@.
8562 (target_alias): Use @target_noncanonical@.
8563 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8564 ACX_NONCANONICAL_HOST.
8565 * configure: Regenerated.
8566
8567 Revert:
8568 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8569
8570 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8571 * configure: Rebuild.
8572 * Makefile.in (version_host, version_target): Get from configure.
8573 (version.c): Use $(version_host) and $(version_target).
8574
17ef446e
PA
85752013-07-03 Pedro Alves <palves@redhat.com>
8576
8577 * Makefile.in (config.status): Depend on development.sh.
8578 * acinclude.m4: Include libmcheck.m4.
8579 * configure: Regenerate.
8580
7a9a7487
MG
85812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8582
8583 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8584 attribute inside the parentheses.
8585 (winapi_DebugSetProcessKillOnExit): Ditto.
8586 (winapi_DebugBreakProcess): Ditto.
8587 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8588
49b64de6
MG
85892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8590
8591 * notif.h (notif_event): Add a dummy member to avoid compiler
8592 errors.
8593
d5749ee7
PA
85942013-07-01 Pedro Alves <palves@redhat.com>
8595
8596 * hostio.c (HOSTIO_PATH_MAX): Define.
8597 (require_filename, handle_open, handle_unlink, handle_readlink):
8598 Use it.
8599
d8d2a3ee
PA
86002013-07-01 Pedro Alves <palves@redhat.com>
8601
8602 * server.h: Include "pathmax.h".
8603 * linux-low.c: Don't include sys/param.h.
8604 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8605 MAXPATHLEN.
8606 * win32-low.c: Don't include sys/param.h.
8607 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8608
bc7dea8d
PA
86092013-07-01 Pedro Alves <palves@redhat.com>
8610
8611 * event-loop.c: Don't check HAVE_UNISTD_H before including
8612 <unistd.h>.
8613 * gdbreplay.c: Likewise.
8614 * remote-utils.c: Likewise.
8615 * server.c: Likewise.
8616 * configure.ac: Don't check for unistd.h.
8617 * configure: Regenerate.
8618
d6c2da54
TT
86192013-06-28 Tom Tromey <tromey@redhat.com>
8620
8621 * Makefile.in (version.c): Use version.in, not
8622 common/version.in.
8623
257b6bec
MG
86242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8625
8626 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8627 * configure: Rebuild.
8628 * Makefile.in (version_host, version_target): Get from configure.
8629 (version.c): Use $(version_host) and $(version_target).
8630
86ebe149
DK
86312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8632
8633 Fix trace-status to output user name without trailing colon.
8634 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8635
f30aa5af
DK
86362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8637
8638 Fix trace-status to output proper start-time and stop-time.
8639 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8640 output start time and stop time in hex as gdb expects.
8641
28a93511
YQ
86422013-06-26 Pedro Alves <pedro@codesourcery.com>
8643
8644 * tracepoint.c (build_traceframe_info_xml): Output trace state
8645 variables present in the trace buffer.
8646
01208463
TT
86472013-06-24 Tom Tromey <tromey@redhat.com>
8648
8649 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8650 create-version.sh.
8651 (version.o): Remove.
8652 * gdbreplay.c: Include version.h.
8653 (version, host_name): Don't declare.
8654 * server.h: Include version.h.
8655 (version, host_name): Don't declare.
8656
760256f9
PA
86572013-06-12 Pedro Alves <palves@redhat.com>
8658
8659 * linux-x86-low.c (linux_is_elf64): Delete global.
8660 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8661 with local linux_pid_exe_is_elf_64_file use.
8662
030031ee
PA
86632013-06-11 Pedro Alves <palves@redhat.com>
8664
8665 * linux-low.c (regset_disabled, disable_regset): New functions.
8666 (regsets_fetch_inferior_registers)
8667 (regsets_store_inferior_registers): Use them.
8668 (initialize_regsets_info); Don't allocate the disabled_regsets
8669 array here.
8670 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8671 comment.
8672
5da6eb0a
PA
86732013-06-11 Pedro Alves <palves@redhat.com>
8674
8675 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8676 xmalloc.
8677
7e5aaa09
PA
86782013-06-11 Pedro Alves <palves@redhat.com>
8679
8680 * linux-x86-low.c (initialize_low_arch): Call
8681 init_registers_x32_avx_linux.
8682
d878444c
JK
86832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8684
8685 Fix compatibility with Android Bionic.
8686 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8687 it is not empty.
8688
3aee8918
PA
86892013-06-07 Pedro Alves <palves@redhat.com>
8690
5f2b57b5 8691 PR server/14823
3aee8918
PA
8692 * Makefile.in (OBS): Add tdesc.o.
8693 (IPA_OBJS): Add tdesc-ipa.o.
8694 (tdesc-ipa.o): New rule.
8695 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8696 interface.
8697 * linux-low.c (new_inferior): Delete.
8698 (disabled_regsets, num_regsets): Delete.
8699 (linux_add_process): Adjust to set the new per-process
8700 new_inferior flag.
8701 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8702 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8703 was a stop. When calling arch_setup, switch the current inferior
8704 to the thread that got an event.
8705 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8706 (regsets_fetch_inferior_registers)
8707 (regsets_store_inferior_registers): New regsets_info parameter.
8708 Adjust to use it.
8709 (linux_register_in_regsets): New regs_info parameter. Adjust to
8710 use it.
8711 (register_addr, fetch_register, store_register): New usrregs_info
8712 parameter. Adjust to use it.
8713 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8714 parameter regs_info. Adjust to use it.
8715 (linux_fetch_registers): Get the current inferior's regs_info, and
8716 adjust to use it.
8717 (linux_store_registers): Ditto.
8718 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8719 (initialize_low): Don't initialize the target_regsets here. Call
8720 initialize_low_arch.
8721 * linux-low.h (target_regsets): Delete declaration.
8722 (struct regsets_info): New.
8723 (struct usrregs_info): New.
8724 (struct regs_info): New.
8725 (struct process_info_private) <new_inferior>: New field.
8726 (struct linux_target_ops): Delete the num_regs, regmap, and
8727 regset_bitmap fields. New field regs_info.
8728 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8729 * i387-fp.c (num_xmm_registers): Delete.
8730 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8731 calls to new interface.
8732 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8733 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8734 Infer the number of xmm registers from the regcache's target
8735 description.
8736 * i387-fp.h (num_xmm_registers): Delete.
8737 * inferiors.c (add_thread): Don't install the thread's regcache
8738 here.
8739 * proc-service.c (gregset_info): Fetch the current inferior's
8740 regs_info. Adjust to use it.
8741 * regcache.c: Include tdesc.h.
8742 (register_bytes, reg_defs, num_registers)
8743 (gdbserver_expedite_regs): Delete.
8744 (get_thread_regcache): If the thread doesn't have a regcache yet,
8745 create one, instead of aborting gdbserver.
8746 (regcache_invalidate_one): Rename to ...
8747 (regcache_invalidate_thread): ... this.
8748 (regcache_invalidate_one): New.
8749 (regcache_invalidate): Only invalidate registers of the current
8750 process.
8751 (init_register_cache): Add target_desc parameter, and use it.
8752 (new_register_cache): Ditto. Assert the target description has a
8753 non zero registers_size.
8754 (regcache_cpy): Add assertions. Adjust.
8755 (realloc_register_cache, set_register_cache): Delete.
8756 (registers_to_string, registers_from_string): Adjust.
8757 (find_register_by_name, find_regno, find_register_by_number)
8758 (register_cache_size): Add target_desc parameter, and use it.
8759 (free_register_cache_thread, free_register_cache_thread_one)
8760 (regcache_release, register_cache_size): New.
8761 (register_size): Add target_desc parameter, and use it.
8762 (register_data, supply_register, supply_register_zeroed)
8763 (supply_regblock, supply_register_by_name, collect_register)
8764 (collect_register_as_string, collect_register_by_name): Adjust.
8765 * regcache.h (struct target_desc): Forward declare.
8766 (struct regcache) <tdesc>: New field.
8767 (init_register_cache, new_register_cache): Add target_desc
8768 parameter.
8769 (regcache_invalidate_thread): Declare.
8770 (regcache_invalidate_one): Delete declaration.
8771 (regcache_release): Declare.
8772 (find_register_by_number, register_cache_size, register_size)
8773 (find_regno): Add target_desc parameter.
8774 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8775 declarations.
8776 * remote-utils.c: Include tdesc.h.
8777 (outreg, prepare_resume_reply): Adjust.
8778 * server.c: Include tdesc.h.
8779 (gdbserver_xmltarget): Delete declaration.
8780 (get_features_xml, process_serial_event): Adjust.
8781 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8782 declare.
8783 (struct process_info) <tdesc>: New field.
8784 (ipa_tdesc): Declare.
8785 * tdesc.c: New file.
8786 * tdesc.h: New file.
8787 * tracepoint.c: Include tdesc.h.
8788 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8789 (get_context_regcache): Adjust to pass ipa_tdesc down.
8790 (do_action_at_tracepoint): Adjust to get the register cache size
8791 from the context regcache's description.
8792 (traceframe_walk_blocks): Adjust to get the register cache size
8793 from the current trace frame's description.
8794 (traceframe_get_pc): Adjust to get current trace frame's
8795 description and pass it down.
8796 (gdb_collect): Adjust to get the register cache size from the
8797 IPA's description.
8798 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8799 (gdbserver_xmltarget): Delete.
8800 (initialize_low_tracepoint): Set the ipa's target description.
8801 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8802 (initialize_low_tracepoint): Set the ipa's target description.
8803 * linux-x86-low.c: Include tdesc.h.
8804 [__x86_64__] (is_64bit_tdesc): New.
8805 (ps_get_thread_area, x86_get_thread_area): Use it.
8806 (i386_cannot_store_register): Rename to ...
8807 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8808 (i386_cannot_fetch_register): Rename to ...
8809 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8810 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8811 to new interface.
8812 (target_regsets): Rename to ...
8813 (x86_regsets): ... this.
8814 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8815 interface.
8816 (x86_siginfo_fixup): Use is_64bit_tdesc.
8817 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8818 (tdesc_x32_avx_linux, tdesc_x32_linux)
8819 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8820 Declare.
8821 (x86_linux_update_xmltarget): Delete.
8822 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8823 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8824 (AMD64_LINUX_USER64_CS): New.
8825 (x86_linux_read_description): New, based on
8826 x86_linux_update_xmltarget.
8827 (same_process_callback): New.
8828 (x86_arch_setup_process_callback): New.
8829 (x86_linux_update_xmltarget): New.
8830 (x86_regsets_info): New.
8831 (amd64_linux_regs_info): New.
8832 (i386_linux_usrregs_info): New.
8833 (i386_linux_regs_info): New.
8834 (x86_linux_regs_info): New.
8835 (x86_arch_setup): Reimplement.
8836 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8837 (x86_emit_ops): Ditto.
8838 (the_low_target): Adjust. Install x86_linux_regs_info,
8839 x86_cannot_fetch_register, and x86_cannot_store_register.
8840 (initialize_low_arch): New.
8841 * linux-ia64-low.c (tdesc_ia64): Declare.
8842 (ia64_fetch_register): Adjust.
8843 (ia64_usrregs_info, regs_info): New globals.
8844 (ia64_regs_info): New function.
8845 (the_low_target): Adjust.
8846 (initialize_low_arch): New function.
8847 * linux-sparc-low.c (tdesc_sparc64): Declare.
8848 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8849 Adjust.
8850 (sparc_arch_setup): New function.
8851 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8852 (the_low_target): Adjust.
8853 (initialize_low_arch): New function.
8854 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8855 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8856 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8857 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8858 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8859 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8860 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8861 (tdesc_powerpc_isa205_vsx64l): Declare.
8862 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8863 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8864 (ppc_set_pc, ppc_get_hwcap): Adjust.
8865 (ppc_usrregs_info): Forward declare.
8866 (!__powerpc64__) ppc_regmap_adjusted: New global.
8867 (ppc_arch_setup): Adjust to the current process'es target
8868 description.
8869 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8870 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8871 (ppc_store_evrregset): Adjust.
8872 (target_regsets): Rename to ...
8873 (ppc_regsets): ... this, and make static.
8874 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8875 (ppc_regs_info): New function.
8876 (the_low_target): Adjust.
8877 (initialize_low_arch): New function.
8878 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8879 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8880 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8881 (tdesc_s390x_linux64v2): Declare.
8882 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8883 (s390_fill_gregset, s390_store_last_break): Adjust.
8884 (target_regsets): Rename to ...
8885 (s390_regsets): ... this, and make static.
8886 (s390_get_pc, s390_set_pc): Adjust.
8887 (s390_get_hwcap): New target_desc parameter, and use it.
8888 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8889 (s390_arch_setup): Adjust to set the current process'es target
8890 description. Don't adjust the regmap.
8891 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8892 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8893 (regs_info_3264): New globals.
8894 (s390_regs_info): New function.
8895 (the_low_target): Adjust.
8896 (initialize_low_arch): New function.
8897 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8898 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8899 [__mips64] (init_registers_mips_linux)
8900 (init_registers_mips_dsp_linux): Delete defines.
8901 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8902 (have_dsp): New global.
8903 (mips_read_description): New, based on mips_arch_setup.
8904 (mips_arch_setup): Reimplement.
8905 (get_usrregs_info): New function.
8906 (mips_cannot_fetch_register, mips_cannot_store_register)
8907 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8908 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8909 (target_regsets): Rename to ...
8910 (mips_regsets): ... this, and make static.
8911 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8912 (dsp_regs_info, regs_info): New globals.
8913 (mips_regs_info): New function.
8914 (the_low_target): Adjust.
8915 (initialize_low_arch): New function.
8916 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8917 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8918 Declare.
8919 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8920 (arm_read_description): New, with bits factored from
8921 arm_arch_setup.
8922 (arm_arch_setup): Reimplement.
8923 (target_regsets): Rename to ...
8924 (arm_regsets): ... this, and make static.
8925 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8926 (arm_regs_info): New function.
8927 (the_low_target): Adjust.
8928 (initialize_low_arch): New function.
8929 * linux-m68k-low.c (tdesc_m68k): Declare.
8930 (target_regsets): Rename to ...
8931 (m68k_regsets): ... this, and make static.
8932 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8933 (m68k_regs_info): New function.
8934 (m68k_arch_setup): New function.
8935 (the_low_target): Adjust.
8936 (initialize_low_arch): New function.
8937 * linux-sh-low.c (tdesc_sharch): Declare.
8938 (target_regsets): Rename to ...
8939 (sh_regsets): ... this, and make static.
8940 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8941 (sh_regs_info, sh_arch_setup): New functions.
8942 (the_low_target): Adjust.
8943 (initialize_low_arch): New function.
8944 * linux-bfin-low.c (tdesc_bfin): Declare.
8945 (bfin_arch_setup): New function.
8946 (bfin_usrregs_info, regs_info): New globals.
8947 (bfin_regs_info): New function.
8948 (the_low_target): Adjust.
8949 (initialize_low_arch): New function.
8950 * linux-cris-low.c (tdesc_cris): Declare.
8951 (cris_arch_setup): New function.
8952 (cris_usrregs_info, regs_info): New globals.
8953 (cris_regs_info): New function.
8954 (the_low_target): Adjust.
8955 (initialize_low_arch): New function.
8956 * linux-cris-low.c (tdesc_crisv32): Declare.
8957 (cris_arch_setup): New function.
8958 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8959 (cris_regs_info): New function.
8960 (the_low_target): Adjust.
8961 (initialize_low_arch): New function.
8962 * linux-m32r-low.c (tdesc_m32r): Declare.
8963 (m32r_arch_setup): New function.
8964 (m32r_usrregs_info, regs_info): New globals.
8965 (m32r_regs_info): Adjust.
8966 (initialize_low_arch): New function.
8967 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8968 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8969 (tic6x_usrregs_info): Forward declare.
8970 (tic6x_read_description): New function, based on ...
8971 (tic6x_arch_setup): ... this. Reimplement.
8972 (target_regsets): Rename to ...
8973 (tic6x_regsets): ... this, and make static.
8974 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8975 (tic6x_regs_info): New function.
8976 (the_low_target): Adjust.
8977 (initialize_low_arch): New function.
8978 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8979 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8980 (target_regsets): Rename to ...
8981 (xtensa_regsets): ... this, and make static.
8982 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8983 globals.
8984 (xtensa_arch_setup, xtensa_regs_info): New functions.
8985 (the_low_target): Adjust.
8986 (initialize_low_arch): New function.
8987 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8988 (nios2_arch_setup): Set the current process'es tdesc.
8989 (target_regsets): Rename to ...
8990 (nios2_regsets): ... this.
8991 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8992 (nios2_regs_info): New function.
8993 (the_low_target): Adjust.
8994 (initialize_low_arch): New function.
a261b8f5
PA
8995 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8996 (aarch64_arch_setup): Set the current process'es tdesc.
8997 (target_regsets): Rename to ...
8998 (aarch64_regsets): ... this.
8999 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9000 (aarch64_regs_info): New function.
9001 (the_low_target): Adjust.
9002 (initialize_low_arch): New function.
3aee8918
PA
9003 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9004 globals.
9005 (target_regsets): Rename to ...
9006 (tile_regsets): ... this.
9007 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9008 (tile_regs_info): New function.
9009 (tile_arch_setup): Set the current process'es tdesc.
9010 (the_low_target): Adjust.
9011 (initialize_low_arch): New function.
9012 * spu-low.c (tdesc_spu): Declare.
9013 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9014 * win32-arm-low.c (tdesc_arm): Declare.
9015 (arm_arch_setup): New function.
9016 (the_low_target): Install arm_arch_setup instead of
9017 init_registers_arm.
9018 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9019 (init_windows_x86): Rename to ...
9020 (i386_arch_setup): ... this. Set `win32_tdesc'.
9021 (the_low_target): Adjust.
9022 * win32-low.c (win32_tdesc): New global.
9023 (child_add_thread): Don't create the thread cache here.
9024 (do_initial_child_stuff): Set the new process'es tdesc.
9025 * win32-low.h (struct target_desc): Forward declare.
9026 (win32_tdesc): Declare.
9027 * lynx-i386-low.c (tdesc_i386): Declare global.
9028 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9029 * lynx-low.c (lynx_tdesc): New global.
9030 (lynx_add_process): Set the new process'es tdesc.
9031 * lynx-low.h (struct target_desc): Forward declare.
9032 (lynx_tdesc): Declare global.
9033 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9034 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9035 * nto-low.c (nto_tdesc): New global.
9036 (do_attach): Set the new process'es tdesc.
9037 * nto-low.h (struct target_desc): Forward declare.
9038 (nto_tdesc): Declare.
9039 * nto-x86-low.c (tdesc_i386): Declare.
9040 (nto_x86_arch_setup): Set `nto_tdesc'.
9041
b1fbec62
GB
90422013-06-04 Gary Benson <gbenson@redhat.com>
9043
9044 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9045 to qSupported response when appropriate.
9046 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9047 with nonzero-length annex.
9048 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9049 arguments supplied in annex.
9050
d1ec4ce7
DE
90512013-05-31 Doug Evans <dje@google.com>
9052
ac44adcb 9053 PR server/15594
d1ec4ce7
DE
9054 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9055 64 bits in 64-cross-32 environment.
9056
9b25f2d3
PA
90572013-05-28 Pedro Alves <palves@redhat.com>
9058
9059 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9060 (aarch64-without-fpu.c): Delete rule.
9061 * configure.srv (aarch64*-*-linux*): Remove references to
9062 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9063 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9064 declaration.
9065
6740dc9c
PA
90662013-05-24 Pedro Alves <palves@redhat.com>
9067
9068 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9069 instead of strchr/decode_address. Error if the range isn't split
9070 with a ','. Don't assume there's be a ':' in the action.
9071
c2d6af84
PA
90722013-05-23 Yao Qi <yao@codesourcery.com>
9073 Pedro Alves <palves@redhat.com>
9074
9075 * linux-low.c (lwp_in_step_range): New function.
9076 (linux_wait_1): If the thread was range stepping and stopped
9077 outside the stepping range, report the stop to GDB. Otherwise,
9078 continue stepping. Add range stepping debug output.
9079 (linux_set_resume_request): Copy the step range from the resume
9080 request to the lwp.
9081 (linux_supports_range_stepping): New.
9082 (linux_target_ops) <supports_range_stepping>: Set to
9083 linux_supports_range_stepping.
9084 * linux-low.h (struct linux_target_ops)
9085 <supports_range_stepping>: New field.
9086 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9087 * linux-x86-low.c (x86_supports_range_stepping): New.
9088 (the_low_target) <supports_range_stepping>: Set to
9089 x86_supports_range_stepping.
9090 * server.c (handle_v_cont): Handle 'r' action.
9091 (handle_v_requests): Append ";r" if the target supports range
9092 stepping.
9093 * target.h (struct thread_resume) <step_range_start,
9094 step_range_end>: New fields.
9095 (struct target_ops) <supports_range_stepping>:
9096 New field.
9097 (target_supports_range_stepping): New macro.
9098
58794e1a
JB
90992013-05-17 Joel Brobecker <brobecker@adacore.com>
9100
9101 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9102 confusion in comment.
9103
d631c5a7
JB
91042013-05-17 Joel Brobecker <brobecker@adacore.com>
9105
9106 * lynx-low.c (struct process_info_private): New type.
9107 (lynx_add_process): New function.
9108 (lynx_create_inferior, lynx_attach): Replace calls to
9109 add_process by calls to lynx_add_process.
9110 (lynx_resume): If PTID is null, then try using
9111 current_process()->private->last_wait_event_ptid.
9112 Add comments.
9113 (lynx_clear_inferiors): Delete. The contents of that function
9114 has been inlined in lynx_mourn;
9115 (lynx_wait_1): Save the ptid in the process's private data.
9116 (lynx_mourn): Free the process' private data. Replace call
9117 to lynx_clear_inferiors by call to clear_inferiors.
9118
96f7a20f
YQ
91192013-05-17 Yao Qi <yao@codesourcery.com>
9120
9121 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9122 the right place.
9123
db0dfaa0
LM
91242013-05-16 Luis Machado <lgustavo@codesourcery.com>
9125
9126 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9127 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9128 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9129 PT_TEXT_END_ADDR guards. Update comments.
9130 (linux_target_op) <read_offsets>: Conditionally define to
9131 linux_read_offsets if the target is UCLIBC and if it defines
9132 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9133
68f5f838
SL
91342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9135 Andrew Jenner <andrew@codesourcery.com>
9136
9137 * Makefile.in (SFILES): Add linux-nios2-low.c.
9138 (clean): Add action to delete nios2-linux.c.
9139 (nios2-linux.c): New rule.
9140 * configure.srv: Add nios2*-*-linux*.
9141 * linux-nios2-low.c: New.
9142
1ebff1fd
HAQ
91432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9144
9145 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9146
f6150862
HZ
91472013-04-25 Hui Zhu <hui@codesourcery.com>
9148
9149 PR gdb/15186
f6150862
HZ
9150 * ax.c (ax_printf): Add fflush.
9151
614c279d
TT
91522013-04-22 Tom Tromey <tromey@redhat.com>
9153
9154 * Makefile.in (SFILES): Add filestuff.c.
9155 (OBS): Add filestuff.o.
9156 (filestuff.o): New target.
9157 * config.in, configure: Rebuild.
9158 * configure.ac: Check for fdwalk, pipe2.
9159
7d4e5717
PA
91602013-04-17 Pedro Alves <palves@redhat.com>
9161
9162 * configure.ac (USE_THREAD_DB): Delete variable.
9163 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9164 Don't AC_SUBST USE_THREAD_DB.
9165 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9166 * config.in, configure: Regenerate.
9167
d5c93e41
PA
91682013-04-16 Pedro Alves <palves@redhat.com>
9169
9170 * linux-low.h (struct lwp_info) <thread_known>: Move under
9171 the USE_THREAD_DB #ifdef.
9172
04f5fe89
PA
91732013-04-16 Pedro Alves <palves@redhat.com>
9174
9175 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9176 (linux-low.o): Delete rule.
9177 * linux-low.h: Always include "gdb_thread_db.h" instead of
9178 conditionally including thread_db.h.
9179 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9180 HAVE_THREAD_DB_H.
9181
480b27bf
JK
91822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9183
9184 * Makefile.in (install-only): Fix make install regression.
9185
43662968
JK
91862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9187
9188 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9189 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9190 installation.
9191 * gdbserver.1: Remove.
9192
3e74e146
PA
91932013-03-22 Pedro Alves <palves@redhat.com>
9194
9195 * linux-low.c (handle_extended_wait): Don't call
9196 linux_enable_event_reporting.
9197
a8347a2a
TT
91982013-03-15 Tony Theodore <tonyt@logyst.com>
9199
9200 PR build/9098:
9201 * Makefile.in (SHELL): Use @SHELL@.
9202
eeb56fa7
SDJ
92032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9204
9205 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9206 compiler warning.
9207
4fa7e2ff
JB
92082013-03-13 Joel Brobecker <brobecker@adacore.com>
9209
9210 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9211 Remove extraneous NULL element.
9212
8ddb1965
YQ
92132013-03-13 Yao Qi <yao@codesourcery.com>
9214
9215 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9216 'V' block in trace frame.
9217
9accd112
MM
92182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9219
9220 * target.h (struct target_ops): Add btrace ops.
9221 (target_supports_btrace): New macro.
9222 (target_enable_btrace): New macro.
9223 (target_disable_btrace): New macro.
9224 (target_read_btrace): New macro.
9225 * gdbthread.h (struct thread_info): Add btrace field.
9226 * server.c: Include btrace-common.h.
9227 (handle_btrace_general_set): New function.
9228 (handle_btrace_enable): New function.
9229 (handle_btrace_disable): New function.
9230 (handle_general_set): Call handle_btrace_general_set.
9231 (handle_qxfer_btrace): New function.
9232 (struct qxfer qxfer_packets[]): Add btrace entry.
9233 * inferiors.c (remove_thread): Disable btrace.
9234 * linux-low: Include linux-btrace.h.
9235 (linux_low_enable_btrace): New function.
9236 (linux_low_read_btrace): New function.
9237 (linux_target_ops): Add btrace ops.
9238 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9239 Add srv_linux_btrace=yes.
9240 (x86_64-*-linux*): Add linux-btrace.o.
9241 Add srv_linux_btrace=yes.
9242 * configure.ac: Define HAVE_LINUX_BTRACE.
9243 * config.in: Regenerated.
9244 * configure: Regenerated.
9245
5cc22e4c
MM
92462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9247
9248 * server.c (handle_qxfer): Preserve error message if -3 is
9249 returned.
9250 (qxfer): Document the -3 return value.
9251
7c97f91e
MM
92522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9253
9254 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9255 (linux_btrace_h): New variable.
9256 (linux-btrace.o): New rule.
9257
be9a119c 92582013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9259 Hafiz Abid Qadeer <abidh@codesourcery.com>
9260
9261 * tracepoint.c (trace_buffer_size): New global.
9262 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9263 (init_trace_buffer): Change to one-argument function. Allocate
9264 trace buffer memory.
9265 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9266 handle QTBuffer:size packet.
9267 (cmd_bigqtbuffer_size): New function.
9268 (initialize_tracepoint): Call init_trace_buffer with
9269 DEFAULT_TRACE_BUFFER_SIZE.
9270 * server.c (handle_query): Add QTBuffer:size in the
9271 supported packets.
9272
e64f7499
YQ
92732013-03-07 Yao Qi <yao@codesourcery.com>
9274
9275 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9276 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9277 of -1.
9278 (cmd_qtsp): Adjust condition. Do post increment.
9279 Set cur_action and cur_step_action back to 0.
9280
f0ae6fc3
PA
92812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9282
9283 PR server/15236
9284 * linux-low.c (linux_write_memory): Return early success if LEN is
9285 zero.
9286
b5b0b0af
CV
92872013-03-05 Corinna Vinschen <vinschen@redhat.de>
9288
334ad4a8 9289 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9290
589bc927
TT
92912013-02-28 Tom Tromey <tromey@redhat.com>
9292
9293 * configure.ac: Invoke AC_SYS_LARGEFILE.
9294 * configure, config.in: Rebuild.
9295
dfe07582
CV
92962013-02-28 Corinna Vinschen <vinschen@redhat.com>
9297
9298 * win32-low.c: Throughout, fix format strings and casts of
9299 printf-like functions to avoid type related warnings on all
9300 platforms.
9301 (get_child_debug_event): Print dwDebugEventCode as hex since
9302 that's how it's usually documented.
9303
736cd585
YQ
93042013-02-28 Yao Qi <yao@codesourcery.com>
9305
9306 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9307 pulongest.
9308
e1f58301
JW
93092013-02-27 Jiong Wang <jiwang@tilera.com>
9310
9311 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9312 (reg-tilegx32.c): New rule.
9313 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9314 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9315 different register info initializer according to elf class.
9316 (init_registers_tilgx32): New function. The tilegx32 register info
9317 initializer.
9318 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9319 (tile_store_gregset): Likewise.
9320
d171ca78
YQ
93212013-02-27 Yao Qi <yao@codesourcery.com>
9322
9323 * server.c (process_point_options): Print debug message when
9324 debug_threads is true.
9325
282bbdf3
YQ
93262013-02-26 Yao Qi <yao@codesourcery.com>
9327
9328 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9329
aca22551
PA
93302013-02-19 Pedro Alves <palves@redhat.com>
9331 Kai Tietz <ktietz@redhat.com>
9332
9333 PR gdb/15161
9334
9335 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9336 instead of strtoul to extract address from packet.
9337 (process_serial_event) <'z'>: Likewise.
9338
4f3cee1c
YQ
93392013-02-18 Yao Qi <yao@codesourcery.com>
9340
9341 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9342
8e1d55a3
PA
93432013-02-14 Pedro Alves <palves@redhat.com>
9344
9345 Plug memory leak.
9346
9347 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9348 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9349
458820da
PA
93502013-02-14 Pedro Alves <palves@redhat.com>
9351
9352 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9353
baea0dae
PA
93542013-02-14 Pedro Alves <palves@redhat.com>
9355
9356 * tracepoint.c (save_string): Delete.
9357 (add_tracepoint_action): Use savestring instead of save_string.
9358
0b1afbb3
PA
93592013-02-12 Pedro Alves <palves@redhat.com>
9360
9361 * linux-xtensa-low.c: Ditto.
9362 * xtensa-xtregs.c: Ditto.
9363
8a4ac37e
PA
93642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9365
9366 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9367 thread_db.
9368
148de6bb
MS
93692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9370
9371 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9372 aarch64_num_wp_regs and aarch64_num_bp_regs to
9373 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9374
55fac6e0
MS
93752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9376
9377 * linux-aarch64-low.c (ps_get_thread_area): Replace
9378 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9379
176eb98c
MS
93802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9381 Marcus Shawcroft <marcus.shawcroft@arm.com>
9382 Nigel Stephens <nigel.stephens@arm.com>
9383 Yufeng Zhang <yufeng.zhang@arm.com>
9384
9385 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9386 (aarch64.c, aarch64-without-fpu.c): New targets.
9387 * configure.srv (aarch64*-*-linux*): New.
9388 * linux-aarch64-low.c: New file.
9389
56f7af9c
MS
93902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9391
43aaf8b6 9392 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9393 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9394 (dequeue_one_deferred_signal, linux_resume_one_thread)
9395 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9396 (linux_tracefork_grandchild, linux_test_for_tracefork)
9397 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9398 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9399 where the argument is 0.
9400
60f662b0
YQ
94012013-01-25 Yao Qi <yao@codesourcery.com>
9402
9403 * event-loop.c: Include "queue.h".
9404 (gdb_event_p): New typedef.
9405 (struct gdb_event) <next_event>: Remove.
9406 (event_queue): Change to QUEUE(gdb_event_p).
9407 (async_queue_event): Remove.
9408 (gdb_event_xfree): New.
9409 (initialize_event_loop): New.
9410 (process_event): Use API from QUEUE.
9411 (wait_for_event): Likewise.
9412 * server.c (main): Call initialize_event_loop.
9413 * server.h (initialize_event_loop): Declare.
9414
5ae4861a
YQ
94152013-01-18 Yao Qi <yao@codesourcery.com>
9416
9417 * ax.h (struct eval_agent_expr_context): New.
9418 (gdb_eval_agent_expr): Update declaration.
9419 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9420 TFRAME. Add new argument CTX.
9421 * server.h (struct eval_agent_expr_context): Declare.
9422 (agent_mem_read, agent_tsv_read): Update declaration.
9423 (agent_mem_read_string): Likewise.
9424 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9425 (add_traceframe_block): Add new argument TPOINT.
9426 Increase TPOINT->traceframe_usage.
9427 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9428 eval_tracepoint_agent_expr.
9429 (condition_true_at_tracepoint): Likewise.
9430 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9431 (agent_mem_read_string, agent_tsv_read): Likewise.
9432
85e00e85
YQ
94332013-01-16 Yao Qi <yao@codesourcery.com>
9434
9435 * linux-low.c (linux_resume_one_lwp): Don't check
9436 'lwp->bp_reinsert != 0'.
9437
4039cf45
JB
94382013-01-07 Joel Brobecker <brobecker@adacore.com>
9439 Pedro Alves <palves@redhat.com>
9440
9441 * lynx-low.c (ptrace_request_to_str): Define a temporary
9442 macro and use it to simplify this function's implementation.
9443
9044dee2
JB
94442013-01-07 Joel Brobecker <brobecker@adacore.com>
9445
9446 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9447 sets errno.
9448
e6352c8f
JB
94492013-01-07 Joel Brobecker <brobecker@adacore.com>
9450
9451 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9452
50681a27
JB
94532013-01-07 Joel Brobecker <brobecker@adacore.com>
9454
9455 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9456
3f6e77ef
JB
94572013-01-07 Joel Brobecker <brobecker@adacore.com>
9458
9459 * lynx-low.c (lynx_resume): Use the resume_info parameter
9460 to determine the ptid for the lynx_ptrace call, unless
9461 it is equal to minus_one_ptid, in which case we use the
9462 ptid of the current_inferior.
9463 (lynx_wait_1): After having received a thread create/exit
9464 event, resume the inferior's execution using the signaling
9465 thread's ptid, rather than the old ptid.
9466
7fda33ae
JB
94672013-01-07 Joel Brobecker <brobecker@adacore.com>
9468
9469 * lynx-low.c (lynx_resume): Delete variable ret.
9470
b9786c74
JB
94712013-01-01 Joel Brobecker <brobecker@adacore.com>
9472
9473 * gdbreplay.c (gdbreplay_version): Update copyright year.
9474 * server.c (gdbserver_version): Likewise.
9475
8b93d60f
JB
94762012-12-17 Joel Brobecker <brobecker@adacore.com>
9477
9478 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9479 new thread.
9480
037335a7
JB
94812012-12-17 Joel Brobecker <brobecker@adacore.com>
9482
9483 * lynx-low.c (ptrace_request_to_str): Add handling for
9484 PTRACE_GETTRACESIG.
9485
52d4cbd8
JB
94862012-12-17 Joel Brobecker <brobecker@adacore.com>
9487
9488 * lynx-low.c (lynx_attach): Delete variable new_process.
9489
ab8f6ca9
JB
94902012-12-17 Joel Brobecker <brobecker@adacore.com>
9491
9492 * lynx-low.c (lynx_create_inferior): Delete variable
9493 new_process.
9494
78cbc024
JB
94952012-12-17 Joel Brobecker <brobecker@adacore.com>
9496
9497 * lynx-low.c (ptrace_request_to_str): Do not handle
9498 PTRACE_GETTHREADLIST if this macro does not exist.
9499
14a00470
YQ
95002012-12-15 Yao Qi <yao@codesourcery.com>
9501
9502 * Makefile.in (OBS): Add notif.o.
9503 * notif.c, notif.h: New.
9504 * server.c: Include "notif.h".
9505 (struct vstop_notif) <next>: Remove.
9506 <base>: New field.
9507 (queue_stop_reply): Update.
9508 (push_event, send_next_stop_reply): Remove.
9509 (discard_queued_stop_replies): Update.
9510 (notif_stop): New variable.
9511 (handle_v_stopped): Remove.
9512 (handle_v_requests): Don't call handle_v_stopped. Call
9513 handle_ack_notif instead.
9514 (queue_stop_reply_callback): Call notif_event_enque instead
9515 of queue_stop_reply.
9516 (handle_status): Don't call send_next_stop_reply, call
9517 notif_write_event instead.
9518 (kill_inferior_callback): Likewise.
9519 (detach_or_kill_inferior_callback): Likewise.
9520 (main): Call initialize_notif.
9521 (process_serial_event): Call QUEUE_is_empty.
9522 (handle_target_event): Call notif_push instead of push event.
9523 * server.h (push_event): Remove declaration.
9524
61c125b9
TT
95252012-12-10 Tom Tromey <tromey@redhat.com>
9526
9527 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9528 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9529 macros.
9530 (.c.o): Rewrite.
9531 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9532 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9533 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9534 (amd64-linux-ipa.o, ax.o): Rewrite.
9535 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9536 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9537 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9538 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9539 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9540 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9541 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9542 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9543 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9544 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9545 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9546 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9547 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9548 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9549 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9550 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9551 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9552 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9553 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9554 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9555 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9556 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9557 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9558 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9559 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9560 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9561 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9562 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9563 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9564 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9565 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9566 (reg-tilegx.o): Remove.
9567 (all_object_files): New macro.
9568 Include .deps files.
9569 * aclocal.m4, configure: Rebuild.
9570 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9571 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9572 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9573
e90e9ad9
TT
95742012-12-05 Tom Tromey <tromey@redhat.com>
9575
9576 PR gdb/14917:
9577 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9578
02d403bf 95792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9580
9581 * configure.ac: Check for linux/perf_event.h.
9582 * config.in: Regenerated.
9583 * configure: Regenerated.
9584
0270a750
PA
95852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9586
9587 * hostio.c (handle_readlink): Decrease buffer size
9588 parameter passed to readlink by one byte.
9589
8c29b58e
YQ
95902012-11-26 Yao Qi <yao@codesourcery.com>
9591
9592 * configure.ac (build_warnings): Append '-Wempty-body'.
9593 * configure: Regenerated.
9594 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9595 body.
9596
8bdce1ff
PM
95972012-11-15 Pierre Muller <muller@sourceware.org>
9598
9599 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9600 * config.in: Regenerate.
9601 * configure: Regenerate.
9602 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9603 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9604 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9605 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9606 header.
9607 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9608 instead of <sys/wait.h> header.
9609 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9610
02d403bf 96112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9612
9613 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9614 (various make rules): Remove -DGDBSERVER
9615
fbd5db48
YQ
96162012-11-09 Yao Qi <yao@codesourcery.com>
9617
9618 * spu-low.c (current_ptid): Move it to ..
9619 * gdbthread.h: ... here. New.
9620 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9621 * server.c (myresume, process_serial_event): Likewise.
9622 * thread-db.c (thread_db_find_new_threads): Likewise.
9623 * tracepoint.c (run_inferior_command): Likewise.
9624
b3dc46ff
AB
96252012-10-01 Andrew Burgess <aburgess@broadcom.com>
9626
9627 * server.c (handle_search_memory_1): Include access length in
9628 warning message.
9629
07c04788
HPN
96302012-09-05 Michael Brandt <michael.brandt@axis.com>
9631
9632 * linux-crisv32-low.c: Fix compile errors.
9633
918d227b
YQ
96342012-09-04 Yao Qi <yao@codesourcery.com>
9635
9636 * tracepoint.c (cmd_qtsv): Adjust debug message.
9637 Don't check CUR_TPOINT.
9638
18c1b81a
YQ
96392012-08-28 Yao Qi <yao@codesourcery.com>
9640
9641 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9642 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9643 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9644 Remove declarations of xmalloc, xreallloc, xstrdup and
9645 freeargv.
9646 * Makefile.in (libiberty_h): New.
9647 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9648 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9649
dc82f37b
YQ
96502012-08-23 Yao Qi <yao@codesourcery.com>
9651
9652 * server.h: Remove declaration of 'xsnprintf'.
9653
406b1477
KS
96542012-08-22 Keith Seitz <keiths@redhat.com>
9655
9656 * server.h: Include build-gnulib-gbserver/config.h.
9657 * gdbreplay.c: Likewise.
9658
e6712ff1
DE
96592012-08-08 Doug Evans <dje@google.com>
9660
9661 * Makefile.in (SFILES): Add gdb_vecs.c.
9662 (OBS): Add gdb_vecs.o.
9663 (gdb_vecs_h, host_defs_h): New variables.
9664 (thread-db.o): Add $(gdb_vecs_h) dependency.
9665 (gdb_vecs.o): New rule.
9666 * thread-db.c: #include "gdb_vecs.h".
9667 (thread_db_load_search): Use a vector to iterate over path elements.
9668 Handle text appearing after "$pdir".
9669
9670 * configure.ac: Add check for strstr.
9671 * config.in: Regenerate.
9672 * configure: Regenerate.
9673
7c3270ae
UW
96742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9675
9676 * hostio.c (handle_pread): If pread fails, fall back to attempting
9677 lseek/read.
9678 (handle_pwrite): Likewise for pwrite.
9679
b62e2b27
UW
96802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9681
9682 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9683 between unsupported TYPE and unimplementable ADDR/LEN combination.
9684 (arm_insert_point): Act on new return value.
9685
78a99e91
PA
96862012-07-31 Pedro Alves <palves@redhat.com>
9687
9688 * server.c (process_point_options): Only skip tokens if we find
9689 one that is unrecognized. Don't treat 'X' specially while
9690 skipping unrecognized tokens.
9691
fcf303ab
UW
96922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9693
9694 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9695 to 4-byte-align HW breakpoint addresses for Thumb.
9696
7255706c
YQ
96972012-07-27 Yao Qi <yao@codesourcery.com>
9698
9699 PR remote/14161.
9700
9701 * server.h: Declare gdb_agent_about_to_close.
9702 * target.c (kill_inferior): Include "agent.h".
9703 New. Send command 'kill'.
9704 * target.h (kill_inferior): Removed macro.
9705 * tracepoint.c (gdb_agent_about_to_close): New.
9706 (gdb_agent_helper_thread): Handle command 'close'.
9707 Wait endlessly until the inferior stops.
9708 Install gdb_agent_remove_socket to atexit hook.
9709 (agent_socket_name): New static variable.
9710 (gdb_agent_socket_init): Replace local variable 'name' with
9711 'agent_socket_name'.
9712 (gdb_agent_remove_socket): New.
9713
5a3f286f
YQ
97142012-07-27 Yao Qi <yao@codesourcery.com>
9715
9716 * server.c (process_point_options): Stop at 'X' when parsing.
9717
961bd387
ME
97182012-07-19 Michael Eager <eager@eagercon.com>
9719
a261b8f5 9720 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9721 to hw_execute.
9722 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9723 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9724 hardware breakpoint.
9725
aa7c7447
JK
97262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9727
9728 * gdbserver/linux-low.c (initialize_low): Call
9729 linux_ptrace_init_warnings.
9730
7f216e7c
DE
97312012-07-02 Doug Evans <dje@google.com>
9732
9733 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9734 pointer to int.
9735
d3ce09f5
SS
97362012-07-02 Stan Shebs <stan@codesourcery.com>
9737
9738 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9739 (ax.o): Add it to build rule.
9740 (ax-ipa.o): Ditto.
9741 (OBS): Add format.o.
9742 (IPA_OBS): Add format.o.
9743 * server.c (handle_query): Claim support for breakpoint commands.
9744 (process_point_options): Add command case.
9745 (process_serial_event): Leave running if there are printfs in
9746 effect.
9747 * mem-break.h (any_persistent_commands): Declare.
9748 (add_breakpoint_commands): Declare.
9749 (gdb_no_commands_at_breakpoint): Declare.
9750 (run_breakpoint_commands): Declare.
9751 * mem-break.c (struct point_command_list): New struct.
9752 (struct breakpoint): New field command_list.
9753 (any_persistent_commands): New function.
9754 (add_commands_to_breakpoint): New function.
9755 (add_breakpoint_commands): New function.
9756 (gdb_no_commands_at_breakpoint): New function.
9757 (run_breakpoint_commands): New function.
9758 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9759 locally.
9760 * ax.c: Include format.h.
9761 (ax_printf): New function.
9762 (gdb_eval_agent_expr): Add printf opcode.
9763
2f8f6aed
YQ
97642012-06-13 Yao Qi <yao@codesourcery.com>
9765
9766 * server.c (start_inferior): Remove duplicated writes to fields
9767 'last_resume_kind' and 'last_status' of 'current_inferior'.
9768
0c9070b3
YQ
97692012-06-12 Yao Qi <yao@codesourcery.com>
9770 Pedro Alves <palves@redhat.com>
9771
9772 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9773 comment.
9774 * server.c (handle_v_cont): Extend comment.
9775
c52daf70
YQ
97762012-06-11 Yao Qi <yao@codesourcery.com>
9777
9778 * linux-low.c (linux_attach): Add 'static'.
9779
d38bbb0a
YQ
97802012-06-06 Yao Qi <yao@codesourcery.com>
9781
9782 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9783
89dc0afd
JK
97842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9785
9786 Fix gcc -flto compilation warning.
9787 * server.c (main): Make variable multi_mode and attach volatile.
9788
75f62ce7
TJB
97892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9790
9791 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9792 if the platform doesn't know about it.
9793
65f479b6
PA
97942012-05-30 Jeff Kenton <jkenton@tilera.com>
9795
9796 * Makefile.in (SFILES): Add linux-tile-low.c.
9797 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9798 * configure.srv: Handle tilegx-*-linux*.
9799 * linux-tile-low.c: New file.
9800
0c5bf5a9
JK
98012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9802
9803 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9804
a493e3e2
PA
98052012-05-24 Pedro Alves <palves@redhat.com>
9806
9807 PR gdb/7205
9808
43aaf8b6 9809 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9810
2ea28649
PA
98112012-05-24 Pedro Alves <palves@redhat.com>
9812
9813 PR gdb/7205
9814
9815 Replace target_signal with gdb_signal throughout.
9816
8d409d16
MR
98172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9818
9819 * linux-low.c (linux_store_registers): Avoid the copying sequence
9820 when no data has been retrieved by ptrace.
9821
23512c01
MGD
98222012-05-22 Will Deacon <will.deacon@arm.com>
9823
9824 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9825 Include asm/ptrace.h.
9826 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9827 already defined.
9828
4934b29e
MR
98292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9830
9831 * linux-low.c (linux_store_registers): Don't re-retrieve data
9832 with ptrace that has already been obtained from /proc. Always
9833 copy any data retrieved with ptrace to the buffer supplied.
9834
bde24c0a
PA
98352012-05-11 Yao Qi <yao@codesourcery.com>
9836 Pedro Alves <palves@redhat.com>
9837
9838 * linux-low.c (enum stopping_threads_kind): New.
9839 (stopping_threads): Change type to `enum stopping_threads_kind'.
9840 (handle_extended_wait): If stopping and suspending threads, leave
9841 the new_lwp suspended too.
9842 (linux_wait_for_event): Adjust.
9843 (stop_all_lwps): Set `stopping_threads' to
9844 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9845 whether we're suspending threads or just stopping them. Assert no
9846 recursion happens.
9847
623b6bdf
YQ
98482012-04-29 Yao Qi <yao@codesourcery.com>
9849
9850 * server.h: Move some code to ...
9851 * gdbthread.h: ... here. New.
9852 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9853 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9854 (nto-low.o, win32-low.o): Likewise.
9855 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9856 * regcache.c, remote-utils.c, server.c: Likewise.
9857 * target.c, tracepoint.c, win32-low.c: Likewise.
9858
f15f9948
TJB
98592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9860
9861 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9862 (PTRACE_ARG4_TYPE): Likewise.
9863 (PTRACE_XFER_TYPE): Likewise.
9864 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9865 ptrace to PTRACE_ARG3_TYPE.
9866 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9867 (PTRACE_ARG4_TYPE): Likewise.
9868 (PTRACE_XFER_TYPE): Likewise.
9869 (linux_detach_one_lwp): Cast fourth argument of
9870 ptrace to long then PTRACE_ARG4_TYPE.
9871 (regsets_fetch_inferior_registers): Cast third argument of
9872 ptrace to long then PTRACE_ARG3_TYPE.
9873 (regsets_store_inferior_registers): Likewise.
9874
38ea300a
PA
98752012-04-20 Pedro Alves <palves@redhat.com>
9876
9877 * configure: Regenerate.
9878
c971b7fa
PA
98792012-04-19 Pedro Alves <palves@redhat.com>
9880
43aaf8b6 9881 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9882 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9883 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9884 (all, install-only, uninstall, clean-info, all-lib, clean): No
9885 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9886 (maintainer-clean realclean distclean): Use subdir_do.
9887 (subdir_do): New.
9888 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9889 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9890 * acinclude.m4: Include acx_configure_dir.m4.
9891 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9892 calls. Call AC_PROG_RANLIB. Configure gnulib using
9893 ACX_CONFIGURE_DIR.
9894 (GNULIB): New.
9895 (GNULIB_STDINT_H): Adjust.
9896 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9897 * gdbreplay.c: Include build-gnulib/config.h.
9898 * server.h: Likewise.
9899 * aclocal.m4: Regenerate.
9900 * config.in: Regenerate.
9901 * configure: Regenerate.
c971b7fa 9902
809277f8
PA
99032012-04-19 Pedro Alves <palves@redhat.com>
9904
9905 * Makefile.in (LIBGNU, INCGNU): Adjust.
9906 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9907 (all, install-only, uninstall, clean-info, all-lib, clean)
9908 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9909 * configure.ac: Adjust AC_OUTPUT output.
9910 * aclocal.m4: Regenerate.
9911 * configure: Regenerate.
9912
fd9bb8b8
PA
99132012-04-19 Pedro Alves <palves@redhat.com>
9914
9915 * Makefile.in (generated_files): New.
9916 (server_h): Remove the explicit dependency on config.h, and depend
9917 on $generated_files.
9918
1c298c66
PA
99192012-04-19 Pedro Alves <palves@redhat.com>
9920
9921 * Makefile.in (INCGNU): Add -Ignulib.
9922
57c4b50b
PA
99232012-04-19 Pedro Alves <palves@redhat.com>
9924
9925 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9926 (INCGNU): ... this, and spell out -I here.
9927 (GNULIB_LIB): Rename to ...
9928 (LIBGNU): ... this.
9929 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9930
1030e047
PA
99312012-04-19 Pedro Alves <palves@redhat.com>
9932
9933 * config.in: Regenerate.
9934
447d4319
PA
99352012-04-19 Pedro Alves <palves@redhat.com>
9936
9937 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9938 * server.h (memmem): Remove declaration.
9939 * config.in: Regenerate.
9940 * configure: Regenerate.
9941
aad9eab9
YQ
99422012-04-19 Yao Qi <yao@codesourcery.com>
9943
9944 * Makefile.in (SFILES): Add common/vec.c.
9945 (OBS): Add vec.o.
9946 (vec.o): New rule.
9947
3e10640f
YQ
99482012-04-19 Yao Qi <yao@codesourcery.com>
9949
9950 * remote-utils.c (prepare_resume_reply): Replace with macro
9951 target_core_of_thread.
9952 * server.c (handle_qxfer_threads_proper): Likewise.
9953 * target.h (traget_core_of_thread): New macro.
9954
71622373
PA
99552012-04-18 Pedro Alves <palves@redhat.com>
9956
9957 * aclocal.m4: Regenerate.
9958 * configure: Regenerate.
9959
80d26939
YQ
99602012-04-16 Yao Qi <yao@codesourcery.com>
9961
9962 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9963 duplicated on address.
9964
42476b70
YQ
99652012-04-16 Yao Qi <yao@codesourcery.com>
9966
9967 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9968 (struct tracepoint_action_ops) <send>: New field.
9969 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9970 (agent_expr_send, x_tracepoint_action_send): New.
9971 (l_tracepoint_action_send): New.
9972 (cmd_qtdp): Download and install tracepoint
9973 according to `use_agent'.
9974 (run_inferior_command): Add one more parameter `len'.
9975 Update callers.
9976 (tracepoint_send_agent): New.
9977 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9978
7bc83639
YQ
99792012-04-16 Yao Qi <yao@codesourcery.com>
9980
9981 * tracepoint.c (download_tracepoints): Moved to ...
9982 (cmd_qtstart): ... here.
9983
5f18041e
YQ
99842012-04-14 Yao Qi <yao@codesourcery.com>
9985
9986 * tracepoint.c: Include inttypes.h.
9987 (struct collect_memory_action): Use sized types.
9988 (struct tracepoint): Likewise.
9989 (cmd_qtdp, stop_tracing): Update print specifiers.
9990 (cmd_qtp, response_tracepoint): Likewise.
9991 (collect_data_at_tracepoint): Likewise.
9992 (collect_data_at_step): Likewise.
9993
55a8c076
YQ
99942012-04-14 Yao Qi <yao@codesourcery.com>
9995
9996 Import gnulib module inttypes.
9997 * aclocal.m4, config.in, configure: Regenerated.
9998
dc750257
YQ
99992012-04-14 Yao Qi <yao@codesourcery.com>
10000
10001 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10002 Makefile and config.status at last.
10003
0ab5faf9
YQ
100042012-04-13 Yao Qi <yao@codesourcery.com>
10005
10006 * tracepoint.c: Include stdint.h unconditionally.
10007
18f5fd81
TJB
100082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10009
10010 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10011 on BFD_HAVE_SYS_PROCFS_TYPE.
10012 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10013 * configure: Regenerate.
10014 * config.in: Likewise.
10015
4d47af5c
L
100162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10017
10018 * Makefile.in (clean): Also remove x32.c x32-linux.c
10019 x32-avx.c x32-avx-linux.c.
10020 (x32.o): New target.
10021 (x32.c): Likewise.
10022 (x32-linux.o): Likewise.
10023 (x32-linux.c): Likewise.
10024 (x32-avx.o): Likewise.
10025 (x32-avx.c): Likewise.
10026 (x32-avx-linux.o): Likewise.
10027 (x32-avx-linux.c): Likewise.
10028
10029 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10030 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10031 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10032 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10033 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10034 i386/x32-avx-linux.xml.
10035
10036 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10037 (init_registers_x32_avx_linux): Likwise.
10038 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10039 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10040
ecedbe58
PA
100412012-04-13 Pedro Alves <palves@redhat.com>
10042
10043 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10044 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10045 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10046 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10047 the sub-make.
10048
c92b5177
L
100492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10050
10051 * linux-x86-low.c (compat_x32_clock_t): New.
10052 (compat_x32_siginfo_t): Likewise.
10053 (compat_x32_siginfo_from_siginfo): Likewise.
10054 (siginfo_from_compat_x32_siginfo): Likewise.
10055 (linux_is_elf64): Likewise.
10056 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10057 and siginfo_from_compat_x32_siginfo for x32.
10058 (x86_arch_setup): Set linux_is_elf64.
10059
214d508e
L
100602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10061
10062 PR gdb/13969
10063 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10064 e_machine field.
10065 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10066 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10067 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10068 compatible with process.
10069
c9a1864a
YQ
100702012-04-12 Yao Qi <yao@codesourcery.com>
10071
10072 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10073 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10074 (install-only, install-info, clean): Handle sub dir gnulib.
10075 (all-lib, am--refresh): New targets.
10076 (memmem.o): Remove target.
10077 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10078 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10079 (AC_REPLACE_FUNCS): Remove memmem.
10080 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10081 (AC_OUTPUT): Generate Makefile in gnulib/.
10082 * aclocal.m4, config.in, configure: Regenerated.
10083
367ba2c2
MR
100842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10085
10086 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10087
9d236627
PA
100882012-04-05 Pedro Alves <palves@redhat.com>
10089
10090 -Werror=strict-aliasing
10091
10092 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10093 pointer.
10094
111217b3
PA
100952012-04-04 Pedro Alves <palves@redhat.com>
10096
10097 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10098 (sparc_store_gregset_from_stack, sparc_store_gregset)
10099 (sparc_breakpoint_at): Fix formatting.
10100
8365dcf5
TJB
101012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10102
10103 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10104 are available.
10105 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10106 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10107 * config.in: Regenerate.
10108 * configure: Likewise.
10109
689cc2ae
PA
101102012-03-29 Pedro Alves <palves@redhat.com>
10111
10112 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10113 Correct ptrace arguments.
10114
c14dfd32
PA
101152012-03-28 Pedro Alves <palves@redhat.com>
10116
10117 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10118 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10119 (IA64_FR1_REGNUM): New defines.
10120 (ia64_fetch_register): New.
10121 (the_low_target): Install it.
10122 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10123 field.
10124 * linux-low.c (linux_fetch_registers): Try the
10125 the_low_target.fetch_register hook first.
10126
10127 * linux-arm-low.c (the_low_target): Adjust.
10128 * linux-bfin-low.c (the_low_target): Adjust.
10129 * linux-cris-low.c (the_low_target): Adjust.
10130 * linux-crisv32-low.c (the_low_target): Adjust.
10131 * linux-m32r-low.c (the_low_target): Adjust.
10132 * linux-m68k-low.c (the_low_target): Adjust.
10133 * linux-mips-low.c (the_low_target): Adjust.
10134 * linux-ppc-low.c (the_low_target): Adjust.
10135 * linux-s390-low.c (the_low_target): Adjust.
10136 * linux-sh-low.c (the_low_target): Adjust.
10137 * linux-sparc-low.c (the_low_target): Adjust.
10138 * linux-tic6x-low.c (the_low_target): Adjust.
10139 * linux-x86-low.c (the_low_target): Adjust.
10140 * linux-xtensa-low.c (the_low_target): Adjust.
10141
63c88e13
PA
101422012-03-26 Pedro Alves <palves@redhat.com>
10143
10144 * server.c (handle_qxfer_libraries): Don't bail early if
10145 the_target->qxfer_libraries_svr4 is not NULL.
10146
fb723180
PA
101472012-03-26 Pedro Alves <palves@redhat.com>
10148
10149 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10150
0afae3cf
PA
101512012-03-23 Pedro Alves <palves@redhat.com>
10152
10153 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10154 "library-list-svr4" element's start tag when the the DSO list is
10155 empty.
10156
485f1ee4
PA
101572012-03-23 Pedro Alves <palves@redhat.com>
10158
10159 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10160 a variable whose type size is the same as the inferior's pointer
10161 size.
10162
a5362b9a
TS
101632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10164
10165 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10166 struct siginfo.
10167 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10168 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10169 * linux-low.h: Include <signal.h>.
10170 (struct siginfo): Remove forward declaration.
10171 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10172 struct siginfo.
10173
d226c142
MF
101742012-03-21 Mike Frysinger <vapier@gentoo.org>
10175
10176 * .gitignore: Ignore more files.
10177
122f36ef
PA
101782012-03-19 Pedro Alves <palves@redhat.com>
10179 Jan Kratochvil <jan.kratochvil@redhat.com>
10180
10181 * server.c (cont_thread, general_thread): Add describing comments.
10182 (start_inferior): Clear `cont_thread'.
10183 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10184 of a process.
10185
fc3e5175
YQ
101862012-03-15 Yao Qi <yao@codesourcery.com>
10187
10188 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10189 handling to ...
10190 (cmd_qtdp): ... here.
10191
8d0d92cd
YQ
101922012-03-15 Yao Qi <yao@codesourcery.com>
10193
10194 * tracepoint.c (struct tracepoint_action_ops): New.
10195 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10196 (m_tracepoint_action_download): New.
10197 (r_tracepoint_action_download): New.
10198 (x_tracepoint_action_download): New.
10199 (l_tracepoint_action_download): New.
10200 (add_tracepoint_action): Install `action->ops' according type.
10201 (download_tracepoint_1): Move code `download' function pointer
10202 of various tracepoint_action_ops.
10203
87b0bb13
JK
102042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10205
10206 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10207 linux_ptrace_attach_warnings.
10208
5f572dec
JK
102092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10210
10211 * Makefile.in (linux-ptrace.o): New.
10212 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10213 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10214 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10215 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10216 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10217 of these targets.
10218 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10219
f4647387
YQ
102202012-03-08 Yao Qi <yao@codesourcery.com>
10221 Pedro Alves <palves@redhat.com>
10222
10223 Fix PR server/13392.
10224 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10225 offset of JMP insn.
10226 * tracepoint.c (remove_tracepoint): New.
10227 (cmd_qtdp): Call remove_tracepoint when failed to install.
10228
9b224c5e
PA
102292012-03-07 Pedro Alves <palves@redhat.com>
10230
10231 * linux-low.c (get_detach_signal): New.
10232 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10233 Pass on pending signals to PTRACE_DETACH. Check the result of the
10234 ptrace call.
10235 * server.c (program_signals, program_signals_p): New.
10236 (handle_general_set): Handle QProgramSignals.
10237 * server.h (program_signals, program_signals_p): Declare.
10238
e237a7e2
JK
102392012-03-05 Pedro Alves <palves@redhat.com>
10240 Jan Kratochvil <jan.kratochvil@redhat.com>
10241
10242 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10243 New comment why.
10244
5808517f
YQ
102452012-03-03 Yao Qi <yao@codesourcery.com>
10246
10247 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10248 agent_look_up_symbols.
10249
58b4daa5
YQ
102502012-03-03 Yao Qi <yao@codesourcery.com>
10251
10252 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10253 (linux-x86-low.o): Likewise.
10254 * server.h: Remove in_process_agent_loaded.
10255 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10256 common/agent.c.
10257 Update callers.
10258
8ffcbaaf
YQ
102592012-03-03 Yao Qi <yao@codesourcery.com>
10260
10261 * tracepoint.c (gdb_agent_capability): New global.
10262 (in_process_agent_loaded_ust): Renamed to
10263 `in_process_agent_supports_ust'.
10264 Update callers.
10265 (in_process_agent_supports_ust): Call agent_capability_check.
10266 (clear_installed_tracepoints): Assert that agent supports
10267 agent.
10268
d1feda86
YQ
102692012-03-03 Yao Qi <yao@codesourcery.com>
10270
10271 * linux-low.c (linux_supports_agent): New.
10272 (linux_target_ops): Initialize field `supports_agent' with
10273 linux_supports_agent.
10274 * target.h (struct target_ops) <supports_agent>: New.
10275 (target_supports_agent): New macro.
10276 * server.c (handle_general_set): Handle packet 'QAgent'.
10277 (handle_query): Send `QAgent+'.
10278 * Makefile.in (server.o): Depends on agent.h.
10279
2fa291ac
YQ
102802012-03-03 Yao Qi <yao@codesourcery.com>
10281
10282 * Makefile.in (OBS): Add agent.o.
10283 Add new rule for agent.o.
10284 Track dependence of tracepoint.c on agent.h.
10285 * tracepoint.c (run_inferior_command_1):
10286 (run_inferior_command): Call agent_run_command.
10287 (gdb_ust_connect_sync_socket): Deleted. Move it to
10288 common/agent.c.
10289 (resume_thread, stop_thread): Likewise.
10290 (gdb_ust_socket_init): Renamed to ...
10291 (gdb_agent_socket_init): ... New.
10292 (gdb_ust_thread): Renamed to ...
10293 (gdb_agent_helper_thread): ... New.
10294 (gdb_ust_init): Move some code to ...
10295 (gdb_agent_init): ... here. New.
10296 [HAVE_UST]: Call gdb_ust_init.
10297 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10298 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10299 * config.in, configure: Regenerated.
10300
05044653
PA
103012012-03-02 Pedro Alves <palves@redhat.com>
10302
10303 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10304 * linux-low.c (struct simple_pid_list): New.
10305 (stopped_pids): New a struct simple_pid_list pointer.
10306 (add_to_pid_list, pull_pid_from_list): New.
10307 (handle_extended_wait): Don't assume the first signal new children
10308 report is SIGSTOP. Adjust call to pull_pid_from_list.
10309 (linux_wait_for_lwp): Adjust.
10310
8d00225b
YQ
103112012-03-02 Yao Qi <yao@codesourcery.com>
10312
10313 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10314 debug log.
10315
19560ba5
YQ
103162012-03-02 Yao Qi <yao@codesourcery.com>
10317
10318 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10319 `stop_pc' and `tpoint'. Update caller.
10320
1faeff08
MR
103212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10322
10323 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10324 * linux-low.c (use_linux_regsets): New macro.
10325 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10326 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10327 (linux_register_in_regsets): New function.
10328 (usr_fetch_inferior_registers): Skip registers covered by
10329 regsets.
10330 (usr_store_inferior_registers): Likewise.
10331 (usr_fetch_inferior_registers): New macro.
10332 (usr_store_inferior_registers): Likewise.
10333 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10334 (linux_store_registers): Likewise.
10335 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10336 prototype.
10337 (init_registers_mips64_dsp_linux): Likewise.
10338 (init_registers_mips_linux): New macro.
10339 (init_registers_mips_dsp_linux): Likewise.
10340 (mips_dsp_num_regs): Likewise.
10341 (DSP_BASE, DSP_CONTROL): New fallback macros.
10342 (mips_base_regs): New macro.
10343 (mips_regmap): Use it. Fix the size.
10344 (mips_dsp_regmap): New variable.
10345 (mips_dsp_regset_bitmap): Likewise.
10346 (mips_arch_setup): New function.
10347 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10348 than mips_regmap.
10349 (mips_cannot_store_register): Likewise.
10350 (the_low_target): Update .arch_setup, .num_regs and .regmap
10351 initializers. Add .regset_bitmap initializer.
10352 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10353 initializer.
10354 * linux-bfin-low.c (the_low_target): Likewise.
10355 * linux-cris-low.c (the_low_target): Likewise.
10356 * linux-crisv32-low.c (the_low_target): Likewise.
10357 * linux-ia64-low.c (the_low_target): Likewise.
10358 * linux-m32r-low.c (the_low_target): Likewise.
10359 * linux-m68k-low.c (the_low_target): Likewise.
10360 * linux-ppc-low.c (the_low_target): Likewise.
10361 * linux-s390-low.c (the_low_target): Likewise.
10362 * linux-sh-low.c (the_low_target): Likewise.
10363 * linux-sparc-low.c (the_low_target): Likewise.
10364 * linux-tic6x-low.c (the_low_target): Likewise.
10365 * linux-x86-low.c (the_low_target): Likewise.
10366 * linux-xtensa-low.c (the_low_target): Likewise.
10367 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10368 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10369 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10370 srv_xmlfiles.
10371 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10372 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10373
c03e6ccc
YQ
103742012-02-29 Yao Qi <yao@codesourcery.com>
10375 Pedro Alves <palves@redhat.com>
10376
10377 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10378 `step_over_finished' is true.
10379
644cebc9
PA
103802012-02-27 Pedro Alves <palves@redhat.com>
10381
10382 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10383 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10384
c14d7ab2
PA
103852012-02-27 Pedro Alves <palves@redhat.com>
10386
10387 PR server/9684
10388 * linux-low.c (pid_is_stopped): New.
10389 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10390
412c89dd
LM
103912012-02-25 Luis Machado <lgustavo@codesourcery.com>
10392
10393 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10394 of conditions.
10395
b745defe
MR
103962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10397
10398 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10399
9f3a5c85
LM
104002012-02-24 Luis Machado <lgustavo@codesourcery>
10401
10402 * server.c (handle_query): Advertise support for target-side
10403 breakpoint condition evaluation.
10404 (process_point_options): New function.
10405 (process_serial_event): When inserting a breakpoint, check for
10406 a target-side condition that should be evaluated.
10407
10408 * mem-break.c: Include regcache.h and ax.h.
10409 (point_cond_list_t): New data structure.
10410 (breakpoint) <cond_list>: New field.
10411 (find_gdb_breakpoint_at): Make non-static.
10412 (delete_gdb_breakpoint_at): Clear any target-side
10413 conditions.
10414 (clear_gdb_breakpoint_conditions): New function.
10415 (add_condition_to_breakpoint): Likewise.
10416 (add_breakpoint_condition): Likewise.
10417 (gdb_condition_true_at_breakpoint): Likewise.
10418 (gdb_breakpoint_here): Return result directly instead
10419 of going through a local variable.
10420
10421 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10422 (clear_gdb_breakpoint_conditions): Likewise.
10423 (add_breakpoint_condition): Likewise.
10424 (gdb_condition_true_at_breakpoint): Likewise.
10425
10426 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10427 (need_step_over_p): Take target-side breakpoint condition into
10428 consideration.
10429
5e1dc496
LM
104302012-02-24 Luis Machado <lgustavo@codesourcery>
10431
10432 * server.h: Include tracepoint.h.
10433 (agent_mem_read, agent_get_trace_state_variable_value,
10434 agent_set_trace_state_variable_value,
10435 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10436 get_set_tsv_func_addr): New prototypes.
10437
10438 * ax.h: New include file.
10439 * ax.c: New source file.
10440
10441 * tracepoint.c: Include ax.h.
10442 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10443 agent_expr, eval_result_type): Move to ax.h.
10444 (parse_agent_expr): Rename to ...
10445 (gdb_parse_agent_expr): ... this, make it non-static and move
10446 to ax.h.
10447 (unparse_agent_expr) Rename to ...
10448 (gdb_unparse_agent_expr): ... this, make it non-static and move
10449 to ax.h.
10450 (eval_agent_expr): Rename to ...
10451 (eval_tracepoint_agent_expr): ... this.
10452 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10453 forward declarations.
10454 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10455 (agent_get_trace_state_variable_value): New function.
10456 (agent_set_trace_state_variable_value): New function.
10457 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10458 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10459 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10460 (condition_true_at_tracepoint): Likewise.
10461 (parse_agent_expr): Rename to ...
10462 (gdb_parse_agent_expr): ... this and move to ax.c.
10463 (unparse_agent_expr): Rename to ...
10464 (gdb_unparse_agent_expr): ... this and move to ax.c.
10465 (gdb_agent_op_name): Move to ax.c.
10466 (eval_agent_expr): Rename to ...
10467 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10468 and move to ax.c.
10469 (eval_tracepoint_agent_expr): New function.
10470 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10471 non-static.
5e1dc496
LM
10472 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10473 ax.c.
10474 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10475 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10476 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10477 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10478 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10479 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10480 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10481 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10482 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10483 (compile_bytecodes): Remove forward declaration.
10484 (is_goto_target): Move to ax.c.
10485 (compile_bytecodes): Move to ax.c and call
10486 agent_get_trace_state_variable_value (...) and
10487 agent_set_trace_state_variable_value (...).
10488
10489 * Makefile.in: Update ax.c and IPA dependencies.
10490
277e4e52
PA
104912012-02-24 Pedro Alves <palves@redhat.com>
10492
10493 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10494 (cmd_bigqtbuffer_circular): ... this. Only handle
10495 'QTBuffer:circular:'.
10496 (handle_tracepoint_general_set): Adjust.
10497
bf4c19f7
YQ
104982012-02-16 Yao Qi <yao@codesourcery.com>
10499
10500 * inferiors.c: Move code to ...
10501 * dll.c: .... here. New.
10502 * server.h: Declare clear_dlls.
10503 * Makefile.in (SFILES): Add dll.c.
10504 (OBS): Add dll.o
10505 (dll.o): New rule.
10506
d73f2619
YQ
105072012-02-11 Yao Qi <yao@codesourcery.com>
10508
10509 * server.c: (handle_monitor_command): Add a new parameter
10510 `own_buf'.
10511 (handle_query): Update caller.
10512
f8255c2a
JB
105132012-02-09 Joel Brobecker <brobecker@adacore.com>
10514
10515 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10516 * configure, config.in: Regenerate.
10517 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10518 is not defined.
10519
da84f473
PA
105202012-02-02 Pedro Alves <palves@redhat.com>
10521
10522 Try SIGKILL first, then PTRACE_KILL.
10523 * linux-low.c (linux_kill_one_lwp): New.
10524 (linux_kill_one_lwp): Rename to ...
10525 (kill_one_lwp_callback): ... this. Use the new
10526 linux_kill_one_lwp.
10527
e886a173
PA
105282012-02-02 Pedro Alves <palves@redhat.com>
10529
10530 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10531 inferior.
10532
be07f1a2
PA
105332012-01-27 Pedro Alves <palves@redhat.com>
10534
10535 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10536 (elf_64_file_p): Make static.
10537 (linux_pid_exe_is_elf_64_file): New.
10538 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10539 Delete declarations.
10540 (linux_pid_exe_is_elf_64_file): Declare.
10541 * linux-x86-low.c (x86_arch_setup): Use
10542 linux_pid_exe_is_elf_64_file.
10543
d8301ad1
JK
105442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10545
10546 * linux-low.c (linux_wait_for_event_1): Rename to ...
10547 (linux_wait_for_event): ... here and merge it with former
10548 linux_wait_for_event - new variable wait_ptid, use it.
10549 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10550
01b17894
PA
105512012-01-23 Pedro Alves <palves@redhat.com>
10552
10553 * server.c (main): Avoid yet another case of infinite loop while
10554 detaching/killing after a longjmp.
10555
e825046f
JK
105562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10557
10558 Code cleanup.
10559 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10560
b9e7b9c3
UW
105612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10562
10563 * hostio.c (handle_readlink): New function.
10564 (handle_vFile): Call it to handle "vFile:readlink" packets.
10565
901f9912
UW
105662012-01-20 Pedro Alves <palves@redhat.com>
10567 Ulrich Weigand <ulrich.weigand@linaro.org>
10568
10569 * server.c (handle_v_requests): Only support vAttach and vRun to
10570 start multiple processes when in extended protocol mode.
10571
fc1ab1a0
PA
105722012-01-17 Pedro Alves <palves@redhat.com>
10573
10574 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10575 memalign plus mprotect to allocate the scratch buffer.
10576
7d5d4e98
PA
105772012-01-13 Pedro Alves <palves@redhat.com>
10578
10579 * server.c (attach_inferior): Clear `cont_thread'.
10580
f128d5e9
PA
105812012-01-13 Pedro Alves <palves@redhat.com>
10582
10583 * server.c (main): Avoid infinite loop while detaching/killing
10584 after a longjmp.
10585
06db92f0
DE
105862012-01-09 Doug Evans <dje@google.com>
10587
10588 * server.c (start_inferior): Set last_ptid in --wrapper case.
10589
32d92999
YQ
105902012-01-06 Yao Qi <yao@codesourcery.com>
10591
10592 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10593 defined.
10594 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10595
5e0a92a9
YQ
105962012-01-04 Yao Qi <yao@codesourcery.com>
10597
10598 * tracepoint.c (cmd_qtdp): Print debug message
10599 for static tracepoint.
10600
ae639e8c
YQ
106012012-01-04 Yao Qi <yao@codesourcery.com>
10602
10603 * tracepoint.c (trace_vdebug): Differentiate debug message
10604 between gdbserver and IPA.
10605
f72429c5
YQ
106062012-01-03 Yao Qi <yao@codesourcery.com>
10607
10608 * tracepoint.c (tracepoint_was_hit): Don't collect for
10609 static tracepoint.
10610
12c3e59c
JB
106112012-01-02 Joel Brobecker <brobecker@adacore.com>
10612
10613 * terminal.h: Reformat copyright header.
10614
67827812
JB
106152012-01-02 Joel Brobecker <brobecker@adacore.com>
10616
10617 * server.c (gdbserver_version): Update copyright year.
10618 * gdbreplay.c (gdbreplay_version): Likewise.
10619
3e52c33d
JK
106202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10621
10622 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10623
10624 Revert:
10625 2011-12-18 Hui Zhu <teawater@gmail.com>
10626 * linux-low.c (linux_create_inferior): Save return value to ret.
10627
66f1260e
HZ
106282011-12-18 Hui Zhu <teawater@gmail.com>
10629
10630 * linux-low.c (linux_create_inferior): Save return value to ret.
10631
e77616d7
DE
106322011-12-16 Doug Evans <dje@google.com>
10633
e7b06c57
DE
10634 * linux-low.c (linux_create_inferior): If stdio connection,
10635 redirect stdin from /dev/null, stdout to stderr.
10636 * remote-utils.c (remote_is_stdio): New static global.
10637 (remote_connection_is_stdio): New function.
10638 (remote_prepare): Handle stdio connection.
10639 (remote_open): Ditto.
10640 (remote_close): Don't close stdin for stdio connections.
10641 (read_prim,write_prim): New functions. Replace all calls to
10642 read/write to these.
10643 * server.c (main): Watch for "-" argument. Move call to
10644 remote_prepare before start_inferior.
10645 * server.h (STDIO_CONNECTION_NAME): New macro.
10646 (remote_connection_is_stdio): Declare.
10647
e77616d7
DE
10648 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10649 in debugging output.
10650
82067193
YQ
106512011-12-15 Yao Qi <yao@codesourcery.com>
10652
10653 * tracepoint.c: Include sys/syscall.h.
10654 (gdb_ust_thread): Remove preprocessor conditional.
10655
82bfbe7e
PA
106562011-12-14 Pedro Alves <pedro@codesourcery.com>
10657
10658 * linux-low.c (linux_detach_one_lwp): Call
10659 the_low_target.prepare_to_resume before detaching.
10660
712c6575
YQ
106612011-12-14 Yao Qi <yao@codesourcery.com>
10662
10663 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10664 of write.
10665
d54d1edf
YQ
106662011-12-14 Yao Qi <yao@codesourcery.com>
10667
10668 * i386-low.c (i386_low_stopped_data_address): Initialize local
10669 variable `control'.
10670
6210a125
PA
106712011-12-13 Pedro Alves <pedro@codesourcery.com>
10672
10673 PR remote/13492
10674
10675 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10676 DR_CONTROL unless necessary. Extend comments.
10677 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10678 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10679
2ece8244
YQ
106802011-12-13 Yao Qi <yao@codesourcery.com>
10681
10682 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10683 macros.
10684 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10685
784867a5
JK
106862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10687
10688 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10689 Print new debug message for such case.
10690
6bf36717
JK
106912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10692
10693 Fix overlapping memcpy.
10694 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10695 the read_inferior_memory transfer.
10696 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10697 write_inferior_memory transfer.
10698 (set_fast_tracepoint_jump): New variable buf. Use it for the
10699 read_inferior_memory and write_inferior_memory transfers.
10700 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10701 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10702 Use it for the write_inferior_memory transfer.
10703 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10704 buffers.
10705
50275556
MR
107062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10707
10708 * linux-low.c (fetch_register, store_register): Make code
10709 consistent, fix formatting.
10710
7325beb4
MR
107112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10712
10713 * linux-low.c (usr_store_inferior_registers): Factor out code
10714 to handle individual registers into...
10715 (store_register): ... this new function.
10716
c642a434
UW
107172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10718
10719 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10720 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10721 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10722 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10723 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10724 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10725 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10726 (srv_xmlfiles): Add new XML files.
10727
10728 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10729 and <sys/uio.h>.
10730 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10731 (init_registers_s390_linux32v1): Add prototype.
10732 (init_registers_s390_linux32v2): Likewise.
10733 (init_registers_s390_linux64v1): Likewise.
10734 (init_registers_s390_linux64v2): Likewise.
10735 (init_registers_s390x_linux64v1): Likewise.
10736 (init_registers_s390x_linux64v2): Likewise.
10737 (s390_num_regs): Increment to 52.
10738 (s390_regmap): Add orig_r2 register.
10739 (s390_num_regs_3264): Increment to 68.
10740 (s390_regmap_3264): Add orig_r2 register.
10741 (s390_collect_ptrace_register): Handle orig_r2 register.
10742 (s390_supply_ptrace_register): Likewise.
10743 (s390_fill_last_break): New function.
10744 (s390_store_last_break): Likewise.
10745 (s390_fill_system_call): New function.
10746 (s390_store_system_call): Likewise.
10747 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10748 register sets.
10749 (s390_check_regset): New function.
10750 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10751 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10752 Update target_regsets for available register sets.
10753
2268b414
JK
107542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10755 Jan Kratochvil <jan.kratochvil@redhat.com>
10756
10757 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10758 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10759 New.
10760 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10761 * linux-low.h (struct process_info_private): New member r_debug.
10762 * server.c (handle_qxfer_libraries): Call
10763 the_target->qxfer_libraries_svr4.
10764 (handle_qxfer_libraries_svr4): New function.
10765 (qxfer_packets): New entry "libraries-svr4".
10766 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10767 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10768 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10769 PACKET_qXfer_libraries_svr4.
10770
d6db1fab
UW
107712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10772
10773 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10774 PSW address/mask between 8-byte and 16-byte formats.
10775 (s390_supply_ptrace_register): Likewise.
10776 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10777 basic addressing mode bit.
10778
242f5f1c
SS
107792011-11-24 Stan Shebs <stan@codesourcery.com>
10780
10781 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10782
f196051f
SS
107832011-11-17 Stan Shebs <stan@codesourcery.com>
10784
10785 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10786 (tracing_start_time): New global.
10787 (tracing_stop_time): New global.
10788 (tracing_user_name): New global.
10789 (tracing_notes): New global.
10790 (tracing_stop_note): New global.
10791 (cmd_qtstart): Set traceframe_usage, start_time.
10792 (stop_tracing): Set stop_time.
10793 (cmd_qtstatus): Report additional status.
10794 (cmd_qtp): New function.
10795 (handle_tracepoint_query): Call it.
10796 (cmd_qtnotes): New function.
10797 (handle_tracepoint_general_set): Call it.
10798 (get_timestamp): Rename from tsv_get_timestamp.
10799
405f8e94
SS
108002011-11-14 Stan Shebs <stan@codesourcery.com>
10801 Kwok Cheung Yeung <kcy@codesourcery.com>
10802
10803 * linux-x86-low.c (small_jump_insn): New.
10804 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10805 trampoline and error message, build a trampoline and issue a small
10806 jump instruction to it.
10807 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10808 trampoline and error message.
10809 (x86_get_min_fast_tracepoint_insn_len): New.
10810 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10811 * linux-low.h (struct linux_target_ops): Add arguments to
10812 install_fast_tracepoint_jump_pad operation, add new operation.
10813 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10814 arguments.
10815 (linux_get_min_fast_tracepoint_insn_len): New function.
10816 (linux_target_op): Add new operation.
10817 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10818 (gdb_trampoline_buffer_end): Ditto.
10819 (gdb_trampoline_buffer_error): Ditto.
10820 (struct ipa_sym_addresses): Add fields for new IPA variables.
10821 (symbol_list): Add entries for new IPA variables.
10822 (struct tracepoint): Add fields to hold the address range of the
10823 trampoline used by the tracepoint.
10824 (trampoline_buffer_head): New static variable.
10825 (trampoline_buffer_tail): Ditto.
10826 (claim_trampoline_space): New function.
10827 (have_fast_tracepoint_trampoline_buffer): New function.
10828 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10829 structure.
10830 (install_fast_tracepoint): Ditto, also add error buffer argument.
10831 (cmd_qtminftpilen): New function.
10832 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10833 (fast_tracepoint_from_trampoline_address): New function.
10834 (fast_tracepoint_collecting): Handle trampoline as part of jump
10835 pad space.
10836 (set_trampoline_buffer_space): New function.
10837 (initialize_tracepoint): Initialize new IPA variables.
10838 * target.h (struct target_ops): Add arguments to
10839 install_fast_tracepoint_jump_pad operation, add new
10840 get_min_fast_tracepoint_insn_len operation.
10841 (target_get_min_fast_tracepoint_insn_len): New.
10842 (install_fast_tracepoint_jump_pad): Add arguments.
10843 * server.h (IPA_BUFSIZ): Define.
10844 * linux-i386-ipa.c: Include extra header files.
10845 (initialize_fast_tracepoint_trampoline_buffer): New function.
10846 (initialize_low_tracepoint): Call it.
10847 * server.h (set_trampoline_buffer_space): Declare.
10848 (claim_trampoline_space): Ditto.
10849 (have_fast_tracepoint_trampoline_buffer): Ditto.
10850
1e4d1764
YQ
108512011-11-14 Yao Qi <yao@codesourcery.com>
10852
10853 * server.c (handle_query): Handle InstallInTrace for qSupported.
10854 * tracepoint.c (add_tracepoint): Sort list.
10855 (install_tracepoint, download_tracepoint): New.
10856 (cmd_qtdp): Call them to install and download tracepoints.
10857 (sort_tracepoints): Removed.
10858 (cmd_qtstart): Update.
10859
5c73ff4e
YQ
108602011-11-14 Yao Qi <yao@codesourcery.com>
10861
10862 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10863 * mem-break.h: Declare.
10864 * tracepoint.c (cmd_qtstart): Move some code to ...
10865 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10866 New.
10867 (download_tracepoints): Move some code to ...
10868 (download_tracepoint_1): ... here. New.
10869
86a30030
YQ
108702011-11-08 Yao Qi <yao@codesourcery.com>
10871
10872 * remote-utils.c (relocate_instruction): A comment fix.
10873
8d26e50c
JB
108742011-11-07 Joel Brobecker <brobecker@adacore.com>
10875
10876 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10877 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10878 dr_status_mirror and dr_control_mirror from debug_reg_state.
10879 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10880 (i386_initial_stuff): Remove use of deleted globals.
10881 (i386_get_thread_context, i386_set_thread_context,
10882 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10883 from debug_reg_state.
10884
a59306a3
YQ
108852011-11-05 Yao Qi <yao@codesourcery.com>
10886
10887 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10888 address as TPOINT's.
10889
3065dfb6
SS
108902011-11-02 Stan Shebs <stan@codesourcery.com>
10891
10892 * tracepoint.c (agent_mem_read_string): New function.
10893 (eval_agent_expr): Call it for tracenz.
10894 * server.c (handle_query): Report support for tracenz.
10895
fd0d8c7c
YQ
108962011-11-02 Yao Qi <yao@codesourcery.com>
10897
10898 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10899
609086b1
YQ
109002011-11-02 Yao Qi <yao@codesourcery.com>
10901
10902 * target.h: Fix a typo in comment.
10903
b9fd1791
PA
109042011-10-31 Pedro Alves <pedro@codesourcery.com>
10905
10906 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10907 clobber the breakpoints' shadows with fast tracepoint jumps.
10908 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10909 * target.c (write_inferior_memory): Also pass MYADDR down to
10910 check_mem_write.
10911
03583c20
UW
109122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10913
10914 * configure.ac: Check support for personality routine.
10915 * configure: Regenerate.
10916 * config.in: Likewise.
10917 * linux-low.c: Include <sys/personality.h>.
10918 Define ADDR_NO_RANDOMIZE if necessary.
10919 (linux_create_inferior): Disable address space randomization when
10920 forking inferior, if requested.
10921 (linux_supports_disable_randomization): New function.
10922 (linux_target_ops): Install it.
10923 * server.h (disable_randomization): Declare.
10924 * server.c (disable_randomization): New global variable.
10925 (handle_general_set): Handle QDisableRandomization.
10926 (handle_query): Likewise for qSupported.
10927 (main): Support --disable-randomization and --no-disable-randomization
10928 command line arguments.
10929 * target.h (struct target_ops): Add supports_disable_randomization.
10930 (target_supports_disable_randomization): New macro.
10931
723b724b
MF
109322011-09-29 Mike Frysinger <vapier@gentoo.org>
10933
10934 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10935 ifdef check.
10936 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10937 [!PT_GETDSBT] (target_loadmap): New definition.
10938 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10939 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10940 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10941 and PT_GETDSBT to LINUX_LOADMAP.
10942 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10943 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10944
55329a5c 109452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10946
10947 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10948 (arm_linux_hwbp_cap): New static variable.
10949 (arm_linux_get_hwbp_cap): Replace by ...
10950 (arm_linux_init_hwbp_cap): ... this new function.
10951 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10952 (arm_linux_get_hw_watchpoint_count): Likewise.
10953 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10954 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10955 (arm_prepare_to_resume): Use perror_with_name instead of error.
10956
55329a5c 109572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10958
10959 * linux-arm-low.c: Include <signal.h>.
10960 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10961 (struct arm_linux_hwbp_cap): New data type.
10962 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10963 (struct arm_linux_hw_breakpoint): New data type.
10964 (MAX_BPTS, MAX_WPTS): Define.
10965 (struct arch_process_info, struct arch_lwp_info): New data types.
10966 (arm_linux_get_hwbp_cap): New function.
10967 (arm_linux_get_hw_breakpoint_count): Likewise.
10968 (arm_linux_get_hw_watchpoint_count): Likewise.
10969 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10970 (arm_hwbp_control_initialize): Likewise.
10971 (arm_hwbp_control_is_enabled): Likewise.
10972 (arm_hwbp_control_is_initialized): Likewise.
10973 (arm_hwbp_control_disable): Likewise.
10974 (arm_linux_hw_breakpoint_equal): Likewise.
10975 (arm_linux_hw_point_initialize): Likewise.
10976 (struct update_registers_data): New data structure.
10977 (update_registers_callback: New function.
10978 (arm_insert_point): Likewise.
10979 (arm_remove_point): Likewise.
10980 (arm_stopped_by_watchpoint): Likewise.
10981 (arm_stopped_data_address): Likewise.
10982 (arm_new_process): Likewise.
10983 (arm_new_thread): Likewise.
10984 (arm_prepare_to_resume): Likewise.
10985 (the_low_target): Register arm_insert_point, arm_remove_point,
10986 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10987 arm_new_thread, and arm_prepare_to_resume.
10988
6b9801d4
SS
109892011-09-15 Stan Shebs <stan@codesourcery.com>
10990
10991 * server.h (struct emit_ops): Add compare-goto fields.
10992 * tracepoint.c (gdb_agent_op_sizes): New table.
10993 (emit_eq_goto): New function.
10994 (emit_ne_goto): New function.
10995 (emit_lt_goto): New function.
10996 (emit_le_goto): New function.
10997 (emit_gt_goto): New function.
10998 (emit_ge_goto): New function.
10999 (is_goto_target): New function.
11000 (compile_bytecodes): Recognize special cases of compare-goto
11001 combinations and call specialized emitters for them.
11002 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11003 (amd64_emit_ne_goto): New function.
11004 (amd64_emit_lt_goto): New function.
11005 (amd64_emit_le_goto): New function.
11006 (amd64_emit_gt_goto): New function.
11007 (amd64_emit_ge_goto): New function.
11008 (amd64_emit_ops): Add the new functions.
11009 (i386_emit_eq_goto): New function.
11010 (i386_emit_ne_goto): New function.
11011 (i386_emit_lt_goto): New function.
11012 (i386_emit_le_goto): New function.
11013 (i386_emit_gt_goto): New function.
11014 (i386_emit_ge_goto): New function.
11015 (i386_emit_ops): Add the new functions.
11016
bf15cbda
SS
110172011-09-08 Stan Shebs <stan@codesourcery.com>
11018
11019 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11020 (i386_emit_epilogue): Restore %ebx.
11021
943ca1dd
JZ
110222011-08-31 Jie Zhang <jzhang918@gmail.com>
11023
11024 * server.c (step_thread): Remove definition.
11025 (process_serial_event): Don't handle Hs.
11026 * server.h (step_thread): Remove declaration.
11027 * target.c (set_desired_inferior): Remove use of step_thread.
11028
e3deef73
LM
110292011-08-24 Luis Machado <lgustavo@codesourcery.com>
11030
11031 * linux-low.c: Include linux-procfs.h.
11032 (linux_attach_lwp_1): Update comments.
11033 (linux_attach): Scan for existing threads when attaching to a
11034 process that is the tgid.
11035 * Makefile.in: Update dependencies.
11036
13da1c97
LM
110372011-08-24 Luis Machado <lgustavo@codesourcery.com>
11038
11039 * configure.srv: Add linux-procfs.o dependencies.
11040
881127c9
YQ
110412011-08-14 Yao Qi <yao@codesourcery.com>
11042
11043 * target.h (struct target_ops): Fix indent.
11044 * win32-low.c (win32_target_ops): Fix comment.
11045
58dbd541
YQ
110462011-08-14 Andrew Jenner <andrew@codesourcery.com>
11047 Yao Qi <yao@codesourcery.com>
11048
11049 * Makefile.in (clean): Remove tic6x-*.c files.
11050 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11051 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11052 (tic6x-c64xp-linux.c): Likewise.
11053 * configure.srv: Add support for tic6x-*-uclinux.
11054 * linux-tic6x-low.c: New.
11055 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11056
78d85199
YQ
110572011-08-14 Andrew Stubbs <ams@codesourcery.com>
11058 Yao Qi <yao@codesourcery.com>
11059
11060 * target.h (struct target_ops): Add read_loadmap.
11061 * linux-low.c (struct target_loadseg): New type.
11062 (struct target_loadmap): New type.
11063 (linux_read_loadmap): New function.
11064 (linux_target_ops): Add linux_read_loadmap.
11065 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11066 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11067 to NULL.
78d85199 11068
a959a88d
EZ
110692011-08-05 Eli Zaretskii <eliz@gnu.org>
11070
11071 * win32-low.c: Include <stdint.h>.
11072
1ced966e
PA
110732011-07-22 Pedro Alves <pedro@codesourcery.com>
11074
11075 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11076 to the inferior here.
11077 (i386_remove_aligned_watchpoint): Ditto.
11078 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11079 fit part of the watchpoint in the debug registers.
11080 (i386_update_inferior_debug_regs): New.
11081 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11082 registers, and only update the inferior on success.
11083 (i386_low_remove_watchpoint): Ditto.
11084
d26e3629
KY
110852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11086
11087 * linux-low.c (compare_ints, unique, list_threads, show_process,
11088 linux_core_of_thread): Delete.
11089 (linux_target_ops): Change linux_core_of_thread to
11090 linux_common_core_of_thread.
11091 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11092 * utils.c (malloc_failure): Change type of argument.
11093 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11094 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11095 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11096 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11097 (IPA_OBJS): Add common-utils-ipa.o.
11098 (ptid_h, linux_osdata_h): New macros.
11099 (server_h): Add common/common-utils.h, common/xml-utils.h,
11100 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11101 common/ptid.h.
11102 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11103 ptid.o, buffer.o): New rules.
11104 (linux-low.o): Add common/linux-osdata.h as a dependency.
11105 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11106 * configure.ac: Add AC_HEADER_DIRENT check.
11107 * config.in: Regenerate.
11108 * configure: Regenerate.
11109 * remote-utils.c (xml_escape_text): Delete.
11110 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11111 buffer_xml_printf): Move to common/buffer.c.
11112 * server.c (main): Remove call to initialize_inferiors.
11113 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11114 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11115 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11116 internal_error, gdb_assert, gdb_assert_fail): Delete.
11117 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11118 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11119 common/buffer.h.
11120 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11121 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11122 initialize_inferiors): Delete.
11123
2275a1a7
PA
111242011-07-20 Pedro Alves <pedro@codesourcery.com>
11125
11126 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11127 symbol error.
11128
0a5b1e09
PA
111292011-05-31 Pedro Alves <pedro@codesourcery.com>
11130
11131 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11132 assertion.
11133 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11134
6938fd34
YQ
111352011-05-26 Yao Qi <yao@codesourcery.com>
11136
11137 * Makefile.in (thread-db.o): Track dependence to
11138 common/gdb_thread_db.h.
11139 * thread-db.c: include gdb_thread_db.h from right place.
11140
b481f9e0
TT
111412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11142
11143 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11144 __FILE__ and __LINE__ to internal_error.
11145
98a5dd13
DE
111462011-05-13 Doug Evans <dje@google.com>
11147
11148 * thread-db.c (try_thread_db_load_from_sdir): New function.
11149 (try_thread_db_load_from_dir): New function.
11150 (thread_db_load_search): Handle $sdir, ignore $pdir.
11151 Remove trying of system directories if search of
11152 libthread-db-search-path fails, that is now done via $sdir.
11153
d248b706
KY
111542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11155
11156 * server.c (handle_query): Add EnableDisableTracepoints to the list
11157 of supported features.
43aaf8b6 11158 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11159 tracepoints.
43aaf8b6
PA
11160 (cmd_qtenable_disable): New.
11161 (cmd_qtstart): Install tracepoints even if disabled.
11162 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11163 receiving a QTEnable or QTDisable packet.
11164 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11165 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11166 tracepoints.
11167 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11168
84e578fb
DE
111692011-05-10 Doug Evans <dje@google.com>
11170
11171 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11172
71f55dd8
DE
111732011-05-04 Doug Evans <dje@google.com>
11174
11175 * linux-low.c (linux_join): Skip process lookup.
11176 * spu-low.c (spu_join): Ditto.
11177 * server.c (join_inferiors_callback): Delete.
11178 (process_serial_event): For 'D' packet (detach) call join_inferior
11179 directly.
11180
4d393d60
JM
111812011-05-04 Joseph Myers <joseph@codesourcery.com>
11182
11183 * README: Don't mention xscale*-*-linux*.
11184 * configure.srv (xscale*-*-linux*): Don't handle target.
11185
b00ad6ff
NF
111862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11187
11188 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11189 casting pointers.
11190 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11191 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11192 (i386_emit_void_call_2): Likewise.
11193
af96c192
YQ
111942011-04-26 Yao Qi <yao@codesourcery.com>
11195
43aaf8b6
PA
11196 * linux-low.c: Move common macros to linux-ptrace.h.
11197 Include linux-ptrace.h.
af96c192
YQ
11198 * Makefile.in (linux_ptrace_h): New.
11199 (linux-low.o): Depends on linux-ptrace.h.
11200
03f2bd59
JK
112012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11202
11203 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11204 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11205 (remote_prepare): New function with most of the TCP code from ...
11206 (remote_open): ... here. Detect PORT here unconditionally. Move also
11207 setting transport_is_reliable.
11208 * server.c (run_once): New variable.
11209 (gdbserver_usage): Document it.
11210 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11211 the first run if RUN_ONCE.
11212 * server.h (run_once, remote_prepare): New declarations.
11213
7a9dd1b2
TT
112142011-04-19 Tom Tromey <tromey@redhat.com>
11215
11216 * win32-low.c (handle_load_dll): Remove duplicate "the".
11217
81239425
PM
112182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11219
11220 Remove support for old Cygwin 1.5 versions.
11221 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11222 function to avoid warning.
11223 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11224 warning.
11225
9e0627f1
PM
112262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11227
11228 * gdbserver/server.h (Macro _): Define it if not available.
11229
588eebee
MS
112302011-03-14 Michael Snyder <msnyder@vmware.com>
11231
348af9f7 11232 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11233
43f70d4c
JB
112342011-03-10 Joel Brobecker <brobecker@adacore.com>
11235
11236 * Makefile.in (maintainer-clean realclean distclean): Remove
11237 "make ... subdir_do" command.
11238
348af9f7
MS
112392011-03-10 Michael Snyder <msnyder@vmware.com>
11240
11241 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11242
11243 * server.c (handle_v_run): Free alloced buffer on early return.
11244
e637a4f5
YQ
112452011-03-09 Yao Qi <yao@codesourcery.com>
11246
11247 Revert:
11248 2011-03-04 Yao Qi <yao@codesourcery.com>
11249
11250 * Makefile.in: Remove GNU make feature --directory.
11251
11252 2011-03-05 Yao Qi <yao@codesourcery.com>
11253
11254 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11255 (subdir_do): New make target. Copied from gdb/Makefile.
11256 (maintainer-clean, realclean, distclean, clean): Call corresponding
11257 make targets in common/Makefile.
11258
11259 2011-02-11 Yao Qi <yao@codesourcery.com>
11260
11261 * configure.ac: Call AC_PROG_RANLIB.
11262 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11263 * configure: Regenerate.
11264
e6edda56
JK
112652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11266
11267 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11268
e5141119
JB
112692011-03-06 Yao Qi <yao@codesourcery.com>
11270
11271 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11272
64794aa4
JB
112732011-03-05 Yao Qi <yao@codesourcery.com>
11274
11275 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11276 (subdir_do): New make target. Copied from gdb/Makefile.
11277 (maintainer-clean, realclean, distclean, clean): Call corresponding
11278 make targets in common/Makefile.
11279
7a762829
YQ
112802011-03-04 Yao Qi <yao@codesourcery.com>
11281
11282 * Makefile.in: Remove GNU make feature --directory.
11283
348af9f7
MS
112842011-03-04 Michael Snyder <msnyder@vmware.com>
11285
11286 * server.c (queue_stop_reply): Call xmalloc not malloc.
11287
112882011-03-02 Michael Snyder <msnyder@vmware.com>
11289
11290 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11291
9f72fee2
MS
112922011-02-28 Michael Snyder <msnyder@vmware.com>
11293
588eebee
MS
11294 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11295 (cmd_qtframe): Ditto.
11296 (cmd_qtbuffer): Ditto.
11297 (cmd_bigqtbuffer): Ditto.
11298
9f72fee2
MS
11299 * utils.c (decimal2str): Initialize 'width' to nine, then
11300 don't mess with it.
11301
8040bd49
UW
113022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11303
11304 * hostio.c (require_data): Free *data, not data.
11305
7e52cbd0
JK
113062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11307
11308 * hostio.c (require_data): Use free, not xfree.
11309
9130f83e
MS
113102011-02-27 Michael Snyder <msnyder@vmware.com>
11311
4b812f4e
MS
11312 * server.c (handle_query): Discard unused value.
11313
9130f83e
MS
11314 * hostio.c (require_data): Free malloc memory before returning
11315 error.
11316
69d37113
MS
113172011-02-26 Michael Snyder <msnyder@vmware.com>
11318
11319 * linux-low.c (list_threads): Call closedir for dirent.
11320
35f5825a
MS
113212011-02-27 Michael Snyder <msnyder@vmware.com>
11322
2a589cef
MS
11323 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11324 a case statement falls through.
11325
0adea5f7
MS
11326 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11327
35f5825a
MS
11328 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11329 in comparison.
11330
238f1c74
MS
113312011-02-26 Michael Snyder <msnyder@vmware.com>
11332
11333 * utils.c (decimal2str): Eliminate dead code and dead param.
11334 (pulongest): Drop dead param from call to decimal2str.
11335 (plongest): Ditto.
11336
633ff500
JB
113372011-02-24 Joel Brobecker <brobecker@adacore.com>
11338
11339 Revert the following patch (not approved yet):
11340 2011-02-21 Hui Zhu <teawater@gmail.com>
11341 * tracepoint.c (tp_printf): New function.
11342 (eval_agent_expr): Handle gdb_agent_op_printf.
11343
f9c6ff72
HZ
113442011-02-21 Hui Zhu <teawater@gmail.com>
11345
11346 * tracepoint.c (tp_printf): New function.
11347 (eval_agent_expr): Handle gdb_agent_op_printf.
11348
94d5e490
TT
113492011-02-18 Tom Tromey <tromey@redhat.com>
11350
11351 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11352 (tracepoint.o): Likewise.
11353 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11354 (gdb_agent_op_names): Likewise.
11355
c7f96d2b
TT
113562011-02-18 Tom Tromey <tromey@redhat.com>
11357
11358 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11359 gdb_agent_op_rot>: New constants.
11360 (gdb_agent_op_names): Add pick and roll.
11361 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11362 cases.
11363
0feedb2c
JK
113642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11365
11366 * aclocal.m4: Regenerated with aclocal-1.11.1.
11367
b3b9301e
PA
113682011-02-14 Pedro Alves <pedro@codesourcery.com>
11369
11370 * server.c (handle_qxfer_traceframe_info): New.
11371 (qxfer_packets): Register "traceframe-info".
11372 (handle_query): Report support for qXfer:traceframe-info:read+.
11373 * tracepoint.c (match_blocktype): New.
11374 (traceframe_find_block_type): Rename to ...
11375 (traceframe_walk_blocks): ... this. Add callback filter argument,
11376 and use it.
11377 (traceframe_find_block_type): New, reimplemented on top of
11378 traceframe_walk_blocks.
11379 (build_traceframe_info_xml): New.
11380 (traceframe_read_info): New.
11381 * server.h (traceframe_read_info): Declare.
11382
4f3e6fb7
YQ
113832011-02-11 Yao Qi <yao@codesourcery.com>
11384
11385 * configure.ac: Call AC_PROG_RANLIB.
11386 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11387 * configure: Regenerate.
11388
764880b7
PA
113892011-02-07 Pedro Alves <pedro@codesourcery.com>
11390
11391 * server.c (gdb_read_memory): Change return semantics to allow
11392 partial transfers.
11393 (handle_search_memory_1): Adjust.
11394 (process_serial_event) <'m' packet>: Handle partial transfers.
11395 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11396
1c79eb8a
PA
113972011-01-28 Pedro Alves <pedro@codesourcery.com>
11398
11399 * regcache.c (init_register_cache): Initialize
11400 regcache->register_status.
11401 (free_register_cache): Release regcache->register_status.
11402 (regcache_cpy): Copy register_status.
11403 (registers_to_string): Print 'x's for unavailable registers.
11404 (supply_register): Mark the register's status valid or
11405 unavailable, depending on whether a buffer was passed in or not.
11406 (supply_register_zeroed): New.
11407 (supply_regblock): Mark the registers' status valid or
11408 unavailable, depending on whether a buffer was passed in or not.
11409 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11410 (struct regcache): New `register_status' field.
11411 (supply_register_zeroed): Declare.
11412 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11413 supply_register_zeroed, rather than passing a NULL buffer to
11414 supply_register.
11415 * tracepoint.c (fetch_traceframe_registers): Update comment.
11416
85724a0e
PA
114172011-01-28 Pedro Alves <pedro@codesourcery.com>
11418
11419 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11420 buffer explicit.
11421
d08aafef
PA
114222011-01-25 Pedro Alves <pedro@codesourcery.com>
11423
11424 * server.h (decode_xfer_write): Change prototype.
11425 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11426 and don't extract the annex here.
11427 * server.c (decode_xfer_read): Remove `annex' parameter,
11428 and don't extract the annex here.
11429 (decode_xfer): New.
11430 (struct qxfer): New.
11431 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11432 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11433 (handle_qxfer_statictrace): New functions, abstracted out from
11434 handle_query, and made to use the struct qxfer interface.
11435 (handle_threads_qxfer_proper): Rename to ...
11436 (handle_qxfer_threads_proper): ... this.
11437 (handle_threads_qxfer): Rename to ...
11438 (handle_qxfer_threads): ... this. Adjust.
11439 (qxfer_packets): New array.
11440 (handle_qxfer): New function.
11441 (handle_query): Use handle_qxfer.
11442
493e2a69
MS
114432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11444
11445 * gdbreplay.c: Shorten lines of >= 80 columns.
11446 * linux-low.c: Ditto.
11447 * linux-ppc-low.c: Ditto.
11448 * linux-s390-low.c: Ditto.
11449 * linux-sparc-low.c: Ditto.
11450 * linux-x86-low.c: Ditto.
11451 * linux-xtensa-low.c: Ditto.
11452 * mem-break.c: Ditto.
11453 * nto-low.c: Ditto.
11454 * regcache.h: Ditto.
11455 * remote-utils.c: Ditto.
11456 * server.c: Ditto.
11457 * server.h: Ditto.
11458 * thread-db.c: Ditto.
11459 * tracepoint.c: Ditto.
11460 * utils.c: Ditto.
11461 * win32-low.h: Ditto.
11462
44944448
JB
114632011-01-05 Joel Brobecker <brobecker@adacore.com>
11464
11465 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11466 update.
11467
71ce852c
JB
114682011-01-01 Joel Brobecker <brobecker@adacore.com>
11469
11470 * server.c (gdbserver_version): Update copyright year in version
11471 output.
11472 * gdbreplay.c (gdbreplay_version): Ditto.
11473
eb826dc6
MF
114742010-12-29 Jie Zhang <jie.zhang@analog.com>
11475
11476 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11477 * linux-bfin-low.c: New file.
11478 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11479 PT_DATA_ADDR for BFIN targets.
11480 * Makefile.in (SFILES): Add linux-bfin-low.c.
11481 (clean): Remove reg-bfin.c.
11482 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11483 * README: Mention supported Blackfin targets.
11484
39ab222a
MF
114852010-12-23 Mike Frysinger <vapier@gentoo.org>
11486
11487 * .gitignore: New file.
11488
a1f2ce7d
MF
114892010-11-16 Mike Frysinger <vapier@gentoo.org>
11490
11491 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11492
f474844c
JZ
114932010-10-22 Jie Zhang <jie@codesourcery.com>
11494
11495 * Makefile.in: Add FLAGS_TO_PASS variable.
11496 (install): Remove dependency of install-only and recursively
11497 invoke make for install-only.
11498
f1048712
DE
114992010-10-04 Doug Evans <dje@google.com>
11500
11501 * Makefile.in (uninstall): Use $(DESTDIR).
11502
b53a1623
PA
115032010-09-24 Pedro Alves <pedro@codesourcery.com>
11504
e6ee044d
PA
11505 PR gdb/11842
11506
b53a1623
PA
11507 * linux-x86-low.c (compat_siginfo_from_siginfo)
11508 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11509 si_code is < 0. Check for si_code == SI_TIMER before checking for
11510 si_code < 0.
11511
fa1bd1e4
JB
115122010-09-13 Joel Brobecker <brobecker@adacore.com>
11513
11514 * lynx-i386-low.c: New file.
11515 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11516
47fac8f8
JB
115172010-09-13 Joel Brobecker <brobecker@adacore.com>
11518
11519 * lynx-low.c (ptrace_request_to_str): Remove handling for
11520 request values that have been removed in LynxOS 5.x.
11521
1adfc54d
JB
115222010-09-13 Joel Brobecker <brobecker@adacore.com>
11523
11524 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11525 <ptrace.h>
11526
c2a66c29
NS
115272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11528
11529 * configure.ac: Add --enable-inprocess-agent option.
11530 * configure: Rebuilt.
11531
32fcada3
YQ
115322010-09-06 Yao Qi <yao@codesourcery.com>
11533
11534 * linux-low.c (linux_kill): Remove unused variable.
11535 (linux_stabilize_threads): Likewise.
11536 * server.c (start_inferior): Likewise.
11537 (queue_stop_reply_callback): Likewise.
11538 * tracepoint.c (do_action_at_tracepoint): Likewise.
11539
0cccb683
YQ
115402010-09-06 Yao Qi <yao@codesourcery.com>
11541
11542 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11543 on return.
11544
423ec54c
JK
115452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11546
11547 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11548
12ac6819
PA
115492010-09-06 Pedro Alves <pedro@codesourcery.com>
11550
11551 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11552 "$(IPA_DEPFILES)".
11553
8ed54b31
JB
115542010-09-01 Joel Brobecker <brobecker@adacore.com>
11555
11556 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11557 gdbserver/lynx-ppc-low.c: New files.
11558 * Makefile.in (lynx_low_h): New variable.
11559 (lynx-low.o, lynx-ppc-low.o): New rules.
11560 * configure.ac: On LynxOS, link with -lnetinet.
11561 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11562 * configure: regenerate.
11563
bb0116a4
JB
115642010-09-01 Joel Brobecker <brobecker@adacore.com>
11565
11566 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11567 * configure.ac: Add check for vasprintf and vsnprintf.
11568 * configure, config.in: Regenerate.
11569 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11570
a778ab81 115712010-09-01 Joel Brobecker <brobecker@adacore.com>
11572
11573 * gdbreplay.c: Move include of alloca.h up, next to include of
11574 malloc.h.
11575 * server.h: Add include of malloc.h.
11576 * mem-break.c: Remove include of malloc.h.
11577 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11578
8b034a19 115792010-09-01 Joel Brobecker <brobecker@adacore.com>
11580
11581 * Makefile.in (memmem.o): Build with -Wno-error.
11582
115832010-09-01 Joel Brobecker <brobecker@adacore.com>
11584
11585 * utils.c (xsnprintf): Make non-static.
11586 * server.h: Add xsnprintf declaration.
11587 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11588 replace calls to snprintf by calls to xsnprintf throughout.
11589
115902010-09-01 Joel Brobecker <brobecker@adacore.com>
11591
11592 * configure.ac: Add configure check for alloca.
11593 * configure, config.in: Regenerate.
11594 * server.h: Include alloca.h if it exists.
11595 * gdbreplay.c: Include alloca.h if it exists.
11596
1a981360
PA
115972010-08-28 Pedro Alves <pedro@codesourcery.com>
11598
11599 * linux-low.c (__SIGRTMIN): Define if not already defined.
11600 (linux_create_inferior): Check for __ANDROID__ rather than
11601 __SIGRTMIN.
11602 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11603 are already deferred.
11604 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11605 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11606 stopped and already has a pending signal to report.
11607 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11608 a pending signal to report or is moving out of a jump pad.
11609 (linux_init_signals): Check for __ANDROID__ rather than
11610 __SIGRTMIN.
11611
b4d51a55
PA
116122010-08-28 Pedro Alves <pedro@codesourcery.com>
11613
11614 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11615 debug_threads check. Avoid a linear search when not doing debug
11616 output.
11617
ec48365d
PA
116182010-08-27 Pedro Alves <pedro@codesourcery.com>
11619
11620 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11621 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11622 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11623 (process_event): Change local fd's type to gdb_fildes_t.
11624 (create_file_handler): Adjust prototype.
11625 (delete_file_handler): Adjust prototype.
11626 (handle_file_event): Adjust prototype. Use pfildes.
11627 (create_file_event): Adjsut prototype.
11628 * remote-utils.c (remote_desc, listen_desc): Change type to
11629 gdb_fildes_t.
11630 * server.h: New gdb_fildes_t typedef.
11631 [USE_WIN32API]: Include winsock2.h.
11632 (delete_file_handler, add_file_handler): Adjust prototypes.
11633 (pfildes): Declare.
11634 * utils.c (pfildes): New.
11635
854d88f0
PA
116362010-08-27 Pedro Alves <pedro@codesourcery.com>
11637
11638 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11639 * configure: Regenerate.
11640
0146f85b
PA
116412010-08-27 Pedro Alves <pedro@codesourcery.com>
11642
11643 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11644 (linux_done_accessing_memory): ... this.
11645 (linux_target_ops): Adjust.
11646 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11647 * nto-low.c (nto_target_ops): Adjust comment.
11648 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11649 * spu-low.c (spu_target_ops): Adjust comment.
11650 * target.h (target_ops): Rename unprepare_to_access_memory field
11651 to done_accessing_memory.
11652 (unprepare_to_access_memory): Rename to ...
11653 (done_accessing_memory): ... this.
11654
90d74c30
PA
116552010-08-26 Pedro Alves <pedro@codesourcery.com>
11656
11657 * linux-low.c (linux_prepare_to_access_memory): New.
11658 (linux_unprepare_to_access_memory): New.
11659 (linux_target_ops): Install them.
11660 * server.c (read_memory): Rename to ...
11661 (gdb_read_memory): ... this. Use
11662 prepare_to_access_memory/prepare_to_access_memory.
11663 (write_memory): Rename to ...
11664 (gdb_write_memory): ... this. Use
11665 prepare_to_access_memory/prepare_to_access_memory.
11666 (handle_search_memory_1): Adjust.
11667 (process_serial_event): Adjust.
11668 * target.h (struct target_ops): New fields
11669 prepare_to_access_memory and unprepare_to_access_memory.
11670 (prepare_to_access_memory, unprepare_to_access_memory): New.
11671 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11672 prepare_to_access_memory/prepare_to_access_memory.
11673 * nto-low.c (nto_target_ops): Adjust.
11674 * spu-low.c (spu_target_ops): Adjust.
11675 * win32-low.c (win32_target_ops): Adjust.
11676
fd467969
PA
116772010-08-26 Pedro Alves <pedro@codesourcery.com>
11678
11679 * Makefile.in (WARN_CFLAGS): Get it from configure.
11680 (WERROR_CFLAGS): New.
11681 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11682 * configure.ac: Introduce --enable-werror, which adds -Werror to
11683 the compiler command line. Enabled by default. Disable with
11684 --disable-werror. Add -Wdeclaration-after-statement
11685 Wpointer-arith and -Wformat-nonliteral to warning flags.
11686 * configure: Regenerate.
11687
331e2f5f
PA
116882010-08-26 Pedro Alves <pedro@codesourcery.com>
11689
11690 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11691
e581f2b4
PA
116922010-08-26 Pedro Alves <pedro@codesourcery.com>
11693
11694 * gdbreplay.c (remote_error): New.
11695 (gdbchar): New.
11696 (expect): Use gdbchar. Check for error reading from GDB.
11697 Clarify sync error output.
11698 (play): Check for errors writing to GDB.
11699 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11700 * remote-utils.c (getpkt): Check for errors writing to the remote
11701 descriptor.
11702
3c11dd79
PA
117032010-08-25 Pedro Alves <pedro@codesourcery.com>
11704
11705 * linux-low.c (linux_wait_1): Move non-debugging code out of
11706 `debug_threads' control.
11707
d20a8ad9
PA
117082010-08-25 Pedro Alves <pedro@codesourcery.com>
11709
11710 * linux-low.c (linux_wait_1): Don't set last_status here.
11711 * server.c (push_event, queue_stop_reply_callback): Assert we're
11712 not pushing a TARGET_WAITKIND_IGNORE event.
11713 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11714 (myresume, handle_target_event): Set the thread's last_resume_kind
11715 and last_status from the target returned status.
11716
964e4306
PA
117172010-08-25 Pedro Alves <pedro@codesourcery.com>
11718
11719 PR threads/10729
11720
11721 * linux-x86-low.c (update_debug_registers_callback): New.
11722 (i386_dr_low_set_addr): Use it.
11723 (i386_dr_low_get_addr): New.
11724 (i386_dr_low_set_control): Use update_debug_registers_callback.
11725 (i386_dr_low_get_control): New.
11726 (i386_dr_low_get_status): Adjust.
11727 * linux-low.c (linux_stop_lwp): New.
11728 * linux-low.h (linux_stop_lwp): Declare.
11729
11730 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11731 argument instead of a i386_debug_reg_state.
11732 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11733 a i386_debug_reg_state.
11734 (i386_insert_aligned_watchpoint): Adjust.
11735 (i386_remove_aligned_watchpoint): Adjust.
11736 (i386_low_stopped_data_address): Read the debug registers from the
11737 inferior instead of from the mirrors.
11738 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11739 (i386_dr_low_get_addr): Declare.
11740 (i386_dr_low_get_control): Declare.
11741 (i386_dr_low_get_status): Change prototype.
11742
11743 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11744 (i386_dr_low_get_addr): New.
11745 (i386_dr_low_get_control): New.
11746 (i386_dr_low_get_status): Adjust prototype. Return
11747 dr_status_mirror.
11748 (i386_initial_stuff): Clear dr_status_mirror and
11749 dr_control_mirror.
11750 (i386_get_thread_context): Adjust.
11751 (i386_set_thread_context): Adjust.
11752 (i386_thread_added): Adjust.
11753
5f21a75b
PA
117542010-08-24 Pedro Alves <pedro@codesourcery.com>
11755
11756 * linux-low.h (linux_thread_area): Delete declaration.
11757
3e4c1235
TS
117582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11759
11760 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11761 after its termination.
11762
1971b033
PA
117632010-08-09 Pedro Alves <pedro@codesourcery.com>
11764
11765 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11766 (gdb_wants_all_stopped): Delete.
11767 (linux_wait_1): Don't call them.
11768 * server.c (handle_v_cont): Tag all threads as want-stopped.
11769 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11770 stopped as "client-wants-stopped".
11771
310444ac
PA
117722010-07-31 Pedro Alves <pedro@codesourcery.com>
11773
11774 * Makefile.in (signals_h): New.
11775 (server_h): Depend on it.
11776 (server.o): Don't depend on $(signals_def).
11777 (signals.o): Depend on $(signals_def).
11778
a19cae16
JK
117792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11780
11781 * Makefile.in (signals_def): New.
11782 (server_h): Append include/gdb/signals.h and signals_def.
11783 (server.o): Append signals_def.
11784
30d50328
JK
117852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11786
11787 * server.c (handle_target_event): Use target_signal_to_host for
11788 resume_info.sig initialization.
11789 * target.h (struct thread_resume) <sig>: New comment.
11790
5c3216e2
OS
117912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11792
c6f46ca0
OS
11793 * server.c (handle_query): strcpy() the returned string from paddress()
11794 instead of sprintf().
5c3216e2
OS
11795 * utils.c (paddress): Return phex_nz().
11796
6bd31874
JB
117972010-07-07 Joel Brobecker <brobecker@adacore.com>
11798
11799 * server.c (handle_v_cont): Call mourn_inferior if process
11800 just exited.
11801 (myresume): Likewise.
11802
0fb4aa4b
PA
118032010-07-01 Pedro Alves <pedro@codesourcery.com>
11804
11805 Static tracepoints, and integration with UST.
11806
11807 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11808 * mem-break.c (uninsert_all_breakpoints)
11809 (reinsert_all_breakpoints): New.
11810 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11811 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11812 (gdb_agent_ust_loaded, helper_thread_id)
11813 (gdb_agent_helper_thread_id): New macros.
11814 (struct ipa_sym_addresses): Add addr_ust_loaded,
11815 addr_helper_thread_id, addr_cmd_buf.
11816 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11817 (in_process_agent_loaded_ust): New.
11818 (write_e_ust_not_loaded): New.
11819 (maybe_write_ipa_ust_not_loaded): New.
11820 (struct collect_static_trace_data_action): New.
11821 (enum tracepoint_type) <static_tracepoint>: New.
11822 (struct tracepoint) <handle>: Mention static tracepoints.
11823 (struct static_tracepoint_ctx): New.
11824 (CMD_BUF_SIZE): New.
11825 (add_tracepoint_action): Handle static tracepoint actions.
11826 (unprobe_marker_at): New.
11827 (clear_installed_tracepoints): Handle static tracepoints.
11828 (cmd_qtdp): Handle static tracepoints.
11829 (probe_marker_at): New.
11830 (cmd_qtstart): Handle static tracepoints.
11831 (response_tracepoint): Handle static tracepoints.
11832 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11833 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11834 (get_context_regcache): Handle static tracepoints.
11835 (do_action_at_tracepoint): Handle static tracepoint actions.
11836 (traceframe_find_block_type): Handle static trace data blocks.
11837 (traceframe_read_sdata): New.
11838 (download_tracepoints): Download static tracepoint actions.
11839 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11840 (GDB_PROBE_NAME): New.
11841 (ust_ops): New.
11842 (GET_UST_SYM): New.
11843 (USTF): New.
11844 (dlsym_ust): New.
11845 (ust_marker_to_static_tracepoint): New.
11846 (gdb_probe): New.
11847 (collect_ust_data_at_tracepoint): New.
11848 (gdb_ust_probe): New.
11849 (UNIX_PATH_MAX, SOCK_DIR): New.
11850 (gdb_ust_connect_sync_socket): New.
11851 (resume_thread, stop_thread): New.
11852 (run_inferior_command): New.
11853 (init_named_socket): New.
11854 (gdb_ust_socket_init): New.
11855 (cstr_to_hexstr): New.
11856 (next_st): New.
11857 (first_marker, next_marker): New.
11858 (response_ust_marker): New.
11859 (cmd_qtfstm, cmd_qtsstm): New.
11860 (unprobe_marker_at, probe_marker_at): New.
11861 (cmd_qtstmat, gdb_ust_thread): New.
11862 (gdb_ust_init): New.
11863 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11864 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11865 (ST_REGENTRY): New.
11866 (x86_64_st_collect_regmap): New.
11867 (X86_64_NUM_ST_COLLECT_GREGS): New.
11868 (AMD64_RIP_REGNUM): New.
11869 (supply_static_tracepoint_registers): New.
11870 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11871 (ST_REGENTRY): New.
11872 (i386_st_collect_regmap): New.
11873 (i386_NUM_ST_COLLECT_GREGS): New.
11874 (supply_static_tracepoint_registers): New.
11875 * server.c (handle_query): Handle qXfer:statictrace:read.
11876 <qSupported>: Report support for StaticTracepoints, and
11877 qXfer:statictrace:read features.
11878 * server.h (traceframe_read_sdata)
11879 (supply_static_tracepoint_registers): Declare.
11880 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11881 (unpack_varlen_hex): Include in IPA build.
11882 * Makefile.in (ustlibs, ustinc): New.
11883 (IPA_OBJS): Add remote-utils-ipa.o.
11884 ($(IPA_LIB)): Link -ldl and -lpthread.
11885 (UST_CFLAGS): New.
11886 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11887 * config.in, configure: Regenerate.
11888
9e4344e5
PA
118892010-06-20 Ian Lance Taylor <iant@google.com>
11890 Pedro Alves <pedro@codesourcery.com>
11891
11892 * linux-x86-low.c (always_true): Delete.
11893 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11894 trying to fool the compiler with always_true.
11895
c6beb2cb
PA
118962010-06-20 Pedro Alves <pedro@codesourcery.com>
11897
11898 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11899 conditions in gdbserver.
11900
d2ed6730
UW
119012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11902
11903 * spu-low.c (spu_read_memory): Wrap around local store limit.
11904 (spu_write_memory): Likewise.
11905
4e29fb54
PA
119062010-06-15 Pedro Alves <pedro@codesourcery.com>
11907
11908 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11909 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11910 LONGEST uses.
11911 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11912 uses.
11913 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11914 uses with LONGEST uses.
11915
6a271cae
PA
119162010-06-14 Stan Shebs <stan@codesourcery.com>
11917 Pedro Alves <pedro@codesourcery.com>
11918
11919 Bytecode compiler.
11920
11921 * linux-x86-low.c: Include limits.h.
11922 (add_insns): New.
11923 (always_true): New.
11924 (EMIT_ASM): New.
11925 (EMIT_ASM32): New.
11926 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11927 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11928 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11929 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11930 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11931 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11932 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11933 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11934 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11935 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11936 (amd64_emit_void_call_2): New.
11937 (amd64_emit_ops): New.
11938 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11939 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11940 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11941 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11942 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11943 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11944 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11945 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11946 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11947 (i386_emit_stack_adjust, i386_emit_int_call_1)
11948 (i386_emit_void_call_2): New.
11949 (i386_emit_ops): New.
11950 (x86_emit_ops): New.
11951 (the_low_target): Install x86_emit_ops.
11952 * server.h (struct emit_ops): New.
11953 (get_raw_reg_func_addr): Declare.
11954 (current_insn_ptr, emit_error): Declare.
11955 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11956 (set_trace_state_variable_value): New defines.
11957 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11958 addr_get_trace_state_variable_value and
11959 addr_set_trace_state_variable_value.
11960 (symbol_list): New fields for get_raw_reg,
11961 get_trace_state_variable_value and set_trace_state_variable_value.
11962 (condfn): New typedef.
11963 (struct tracepoint): New field `compiled_cond'.
11964 (do_action_at_tracepoint): Clear compiled_cond.
11965 (get_trace_state_variable_value, set_trace_state_variable_value):
11966 Export in the IPA.
11967 (condition_true_at_tracepoint): If there's a compiled condition,
11968 run that.
11969 (current_insn_ptr, emit_error): New globals.
11970 (struct bytecode_address): New.
11971 (get_raw_reg_func_addr): New.
11972 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11973 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11974 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11975 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11976 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11977 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11978 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11979 (compile_tracepoint_condition, compile_bytecodes): New.
11980 * target.h (emit_ops): Forward declare.
11981 (struct target_ops): New field emit_ops.
11982 (target_emit_ops): New.
11983 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11984 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11985 * linux-low.c (linux_emit_ops): New.
11986 (linux_target_ops): Install it.
11987 * linux-low.h (struct linux_target_ops): New field emit_ops.
11988
92b72907
UW
119892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11990
11991 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11992 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11993
fa593d66
PA
119942010-06-01 Pedro Alves <pedro@codesourcery.com>
11995 Stan Shebs <stan@codesourcery.com>
11996
11997 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11998 (all): Depend on $(extra_libraries).
11999 (install-only): Install the IPA.
12000 (IPA_OBJS, IPA_LIB): New.
12001 (clean): Remove the IPA lib.
12002 (IPAGENT_CFLAGS): New.
12003 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12004 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12005 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12006 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12007 * configure.ac: Check for atomic builtins support in the compiler.
12008 (IPA_DEPFILES, extra_libraries): Define.
12009 * configure.srv (ipa_obj): Add description.
12010 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12011 (i[34567]86-*-linux*): Set ipa_obj.
12012 (x86_64-*-linux*): Set ipa_obj.
12013 * linux-low.c (stabilizing_threads): New.
12014 (supports_fast_tracepoints): New.
12015 (linux_detach): Stabilize threads before detaching.
12016 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12017 the lwp is either not stabilizing, or is moving out of a jump pad.
12018 (linux_fast_tracepoint_collecting): New.
12019 (maybe_move_out_of_jump_pad): New.
12020 (enqueue_one_deferred_signal): New.
12021 (dequeue_one_deferred_signal): New.
12022 (linux_wait_for_event_1): If moving out of a jump pad, defer
12023 pending signals to later.
12024 (linux_stabilize_threads): New.
12025 (linux_wait_1): Check if threads need moving out of jump pads, and
12026 do it if so.
12027 (stuck_in_jump_pad_callback): New.
12028 (move_out_of_jump_pad_callback): New.
12029 (lwp_running): New.
12030 (linux_resume_one_lwp): Handle moving out of jump pads.
12031 (linux_set_resume_request): Dequeue deferred signals.
12032 (need_step_over_p): Also step over fast tracepoint jumps.
12033 (start_step_over): Also uninsert fast tracepoint jumps.
12034 (finish_step_over): Also reinsert fast tracepoint jumps.
12035 (linux_install_fast_tracepoint_jump): New.
12036 (linux_target_ops): Install linux_stabilize_threads and
12037 linux_install_fast_tracepoint_jump_pad.
12038 * linux-low.h (linux_target_ops) <get_thread_area,
12039 install_fast_tracepoint_jump_pad>: New fields.
12040 (struct lwp_info) <collecting_fast_tracepoint,
12041 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12042 (linux_get_thread_area): Declare.
12043 * linux-x86-low.c (jump_insn): New.
12044 (x86_get_thread_area): New.
12045 (append_insns): New.
12046 (push_opcode): New.
12047 (amd64_install_fast_tracepoint_jump_pad): New.
12048 (i386_install_fast_tracepoint_jump_pad): New.
12049 (x86_install_fast_tracepoint_jump_pad): New.
12050 (the_low_target): Install x86_get_thread_area and
12051 x86_install_fast_tracepoint_jump_pad.
12052 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12053 (struct fast_tracepoint_jump): New.
12054 (fast_tracepoint_jump_insn): New.
12055 (fast_tracepoint_jump_shadow): New.
12056 (find_fast_tracepoint_jump_at): New.
12057 (fast_tracepoint_jump_here): New.
12058 (delete_fast_tracepoint_jump): New.
12059 (set_fast_tracepoint_jump): New.
12060 (uninsert_fast_tracepoint_jumps_at): New.
12061 (reinsert_fast_tracepoint_jumps_at): New.
12062 (set_breakpoint_at): Use write_inferior_memory.
12063 (uninsert_raw_breakpoint): Use write_inferior_memory.
12064 (check_mem_read): Mask out fast tracepoint jumps.
12065 (check_mem_write): Mask out fast tracepoint jumps.
12066 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12067 (set_fast_tracepoint_jump): Declare.
12068 (delete_fast_tracepoint_jump)
12069 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12070 (reinsert_fast_tracepoint_jumps_at): Declare.
12071 * regcache.c: Don't compile many functions when building the
12072 in-process agent library.
12073 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12074 the register buffer in the heap.
12075 (free_register_cache): If the register buffer isn't owned by the
12076 regcache, don't free it.
12077 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12078 pre-existing register caches.
12079 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12080 type.
12081 (convert_ascii_to_int): : Constify `from' parameter type.
12082 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12083 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12084 the needed buffer in-place.
12085 (relocate_instruction): New.
12086 * server.c (handle_query) <qSymbols>: If the target supports
12087 tracepoints, give it a chance of looking up symbols. Report
12088 support for fast tracepoints.
12089 (handle_status): Stabilize threads.
12090 (process_serial_event): Adjust.
12091 * server.h (struct fast_tracepoint_jump): Forward declare.
12092 (struct process_info) <fast_tracepoint_jumps>: New field.
12093 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12094 (decode_X_packet, decode_M_packet): Adjust.
12095 (relocate_instruction): Declare.
12096 (in_process_agent_loaded): Declare.
12097 (tracepoint_look_up_symbols): Declare.
12098 (struct fast_tpoint_collect_status): Declare.
12099 (fast_tracepoint_collecting): Declare.
12100 (force_unlock_trace_buffer): Declare.
12101 (handle_tracepoint_bkpts): Declare.
12102 (initialize_low_tracepoint)
12103 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12104 * target.h (struct target_ops) <stabilize_threads,
12105 install_fast_tracepoint_jump_pad>: New fields.
12106 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12107 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12108 [HAVE_STDINT_H]: Include stdint.h.
12109 (trace_debug_1): Rename to ...
12110 (trace_vdebug): ... this.
12111 (trace_debug): Rename to ...
12112 (trace_debug_1): ... this. Add `level' parameter.
12113 (trace_debug): New.
12114 (ATTR_USED, ATTR_NOINLINE): New.
12115 (IP_AGENT_EXPORT): New.
12116 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12117 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12118 (about_to_request_buffer_space, trace_buffer_is_full)
12119 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12120 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12121 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12122 (traceframe_write_count, traceframes_created)
12123 (trace_state_variables)
12124 New renaming defines.
12125 (struct ipa_sym_addresses): New.
12126 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12127 (symbol_list): New.
12128 (ipa_sym_addrs): New.
12129 (all_tracepoint_symbols_looked_up): New.
12130 (in_process_agent_loaded): New.
12131 (write_e_ipa_not_loaded): New.
12132 (maybe_write_ipa_not_loaded): New.
12133 (tracepoint_look_up_symbols): New.
12134 (debug_threads) [IN_PROCESS_AGENT]: New.
12135 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12136 (UNKNOWN_SIDE_EFFECTS): New.
12137 (stop_tracing): New.
12138 (flush_trace_buffer): New.
12139 (stop_tracing_bkpt): New.
12140 (flush_trace_buffer_bkpt): New.
12141 (read_inferior_integer): New.
12142 (read_inferior_uinteger): New.
12143 (read_inferior_data_pointer): New.
12144 (write_inferior_data_pointer): New.
12145 (write_inferior_integer): New.
12146 (write_inferior_uinteger): New.
12147 (struct collect_static_trace_data_action): Delete.
12148 (enum tracepoint_type): New.
12149 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12150 <actions_str, step_actions, step_actions_str>: Only include in
12151 GDBserver.
fa593d66
PA
12152 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12153 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12154 (tracepoints): Use IP_AGENT_EXPORT.
12155 (last_tracepoint): Don't include in the IPA.
12156 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12157 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12158 (alloced_trace_state_variables): New.
12159 (trace_state_variables): Use IP_AGENT_EXPORT.
12160 (traceframe_t): Delete unused variable.
12161 (circular_trace_buffer): Don't include in the IPA.
12162 (trace_buffer_start): Delete.
12163 (struct trace_buffer_control): New.
12164 (trace_buffer_free): Delete.
12165 (struct ipa_trace_buffer_control): New.
12166 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12167 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12168 New.
12169 (trace_buffer_ctrl): New.
12170 (TRACE_BUFFER_CTRL_CURR): New.
12171 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12172 Reimplement as macros.
12173 (trace_buffer_wrap): Delete.
12174 (traceframe_write_count, traceframe_read_count)
12175 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12176 (struct tracepoint_hit_ctx) <type>: New field.
12177 (struct fast_tracepoint_ctx): New.
12178 (memory_barrier): New.
12179 (cmpxchg): New.
12180 (record_tracepoint_error): Update atomically in the IPA.
12181 (clear_inferior_trace_buffer): New.
12182 (about_to_request_buffer_space): New.
12183 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12184 updating the same buffer.
12185 (add_tracepoint): Default the tracepoint's type to trap
12186 tracepoint, and orig_size to -1.
12187 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12188 internal variables.
12189 (create_trace_state_variable): New parameter `gdb'. Handle it.
12190 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12191 (cmd_qtdp): Handle fast tracepoints.
12192 (cmd_qtdv): Adjust.
12193 (max_jump_pad_size): New.
12194 (gdb_jump_pad_head): New.
12195 (get_jump_space_head): New.
12196 (claim_jump_space): New.
12197 (sort_tracepoints): New.
12198 (MAX_JUMP_SIZE): New.
12199 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12200 IPA.
12201 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12202 support. Upload fast traceframes, and delete internal IPA
12203 breakpoints.
12204 (stop_tracing_handler): New.
12205 (flush_trace_buffer_handler): New.
12206 (cmd_qtstop): Upload fast tracepoints.
12207 (response_tracepoint): Handle fast tracepoints.
12208 (tracepoint_finished_step): Upload fast traceframes. Set the
12209 tracepoint hit context's tracepoint type.
12210 (handle_tracepoint_bkpts): New.
12211 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12212 type. Add comment about fast tracepoints.
12213 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12214 non-existing action_str field.
12215 (get_context_regcache): Handle fast tracepoints.
12216 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12217 to the regcache.
12218 (fast_tracepoint_from_jump_pad_address): New.
12219 (fast_tracepoint_from_ipa_tpoint_address): New.
12220 (collecting_t): New.
12221 (force_unlock_trace_buffer): New.
12222 (fast_tracepoint_collecting): New.
12223 (collecting): New.
12224 (gdb_collect): New.
12225 (write_inferior_data_ptr): New.
12226 (target_tp_heap): New.
12227 (target_malloc): New.
12228 (download_agent_expr): New.
12229 (UALIGN): New.
12230 (download_tracepoints): New.
12231 (download_trace_state_variables): New.
12232 (upload_fast_traceframes): New.
12233 (IPA_FIRST_TRACEFRAME): New.
12234 (IPA_NEXT_TRACEFRAME_1): New.
12235 (IPA_NEXT_TRACEFRAME): New.
12236 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12237 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12238 (gdb_jump_pad_buffer_end): New.
12239 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12240 (initialize_tracepoint): Adjust.
12241 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12242 buffer. Initialize the low module.
12243 * utils.c (PREFIX, TOOLNAME): New.
12244 (malloc_failure): Use PREFIX.
12245 (error): In the IPA, an error causes an exit.
12246 (fatal, warning): Use PREFIX.
12247 (internal_error): Use TOOLNAME.
12248 (NUMCELLS): Increase to 10.
12249 * configure, config.in: Regenerate.
12250
d149dd1d
PA
122512010-06-01 Pedro Alves <pedro@codesourcery.com>
12252
12253 * server.c (handle_query) <qSupported>: Do two passes over the
12254 qSupported string to avoid nesting strtok.
12255
f6528abd
JK
122562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12257
12258 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12259 (CDEPS): New.
12260 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12261 -Wl,--dynamic-list.
12262 * configure: Regenerate.
12263 * proc-service.list: New.
12264
ca2a87a0
JK
122652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12266
12267 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12268 New comment.
12269
363a6e9f
OS
122702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12271
12272 * gdbreplay.c (remote_open): Check error return from socket() call by
12273 its equality to -1 not by it being negative.
12274 * remote-utils.c (remote_open): Likewise.
12275
d23b6cb1
PA
122762010-05-23 Pedro Alves <pedro@codesourcery.com>
12277
12278 * config.h: Regenerate.
12279
28d3cf85
MK
122802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12281
12282 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12283 doesn't provide PTRACE_GET_THREAD_AREA.
12284
fea36a59
MK
122852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12286
12287 * linux-m68k-low.c: Include <asm/ptrace.h>
12288 (ps_get_thread_area): Implement.
12289
24b066ba
DE
122902010-05-03 Doug Evans <dje@google.com>
12291
12292 * event-loop.c (struct callback_event): New struct.
12293 (callback_list): New global.
12294 (append_callback_event, delete_callback_event): New functions.
12295 (process_callback): New function.
12296 (start_event_loop): Call it.
12297 * remote-utils.c (NOT_SCHEDULED): Define.
12298 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12299 moved out of readchar.
12300 (readchar): Rewrite. Call reschedule before returning.
12301 (reset_readchar): New function.
12302 (remote_close): Call it.
12303 (process_remaining, reschedule): New functions.
12304 * server.h (callback_handler_func): New typedef.
12305 (append_callback_event, delete_callback_event): Declare.
12306
9836d6ea
PA
123072010-05-03 Pedro Alves <pedro@codesourcery.com>
12308
12309 * proc-service.c (ps_pglobal_lookup): Use
12310 thread_db_look_up_one_symbol.
12311 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12312 parameter. Use it instead of all_symbols_looked_up.
12313 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12314 field.
12315 (all_symbols_looked_up): Don't declare.
12316 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12317 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12318 field.
12319 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12320 Set all_symbols_looked_up here.
12321 (thread_db_look_up_one_symbol): New.
12322 (thread_db_get_tls_address): Adjust.
12323 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12324 thread_db object on the heap, and tentatively set it in the
12325 process structure.
12326 (thread_db_init): Don't set all_symbols_looked_up here.
12327 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12328
7984d532
PA
123292010-05-03 Pedro Alves <pedro@codesourcery.com>
12330
12331 * linux-low.c (linux_kill, linux_detach): Adjust.
12332 (status_pending_p_callback): Remove redundant statement. Check
12333 for !TARGET_WAITIKIND_IGNORE, instead of
12334 TARGET_WAITKIND_STOPPED.
12335 (handle_tracepoints): Make sure LWP is locked. Adjust.
12336 (linux_wait_for_event_1): Adjust.
12337 (linux_cancel_breakpoints): New.
12338 (unsuspend_one_lwp): New.
12339 (unsuspend_all_lwps): New.
12340 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12341 (send_sigstop_callback): Change return type to int, add new
12342 `except' parameter and handle it.
12343 (suspend_and_send_sigstop_callback): New.
12344 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12345 pass them down. If SUSPEND, also increment the lwp's suspend
12346 count.
12347 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12348 (need_step_over_p): Don't consider suspended LWPs.
12349 (start_step_over): Adjust.
12350 (proceed_one_lwp): Change return type to int, add new `except'
12351 parameter and handle it.
12352 (unsuspend_and_proceed_one_lwp): New.
12353 (proceed_all_lwps): Use find_inferior instead of
12354 for_each_inferior.
12355 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12356 also decrement the suspend count of LWPs. Pass `except' down,
12357 instead of hacking its suspend count.
12358 (linux_pause_all): Add `freeze' parameter. Adjust.
12359 (linux_unpause_all): New.
12360 (linux_target_ops): Install linux_unpause_all.
12361 * server.c (handle_status): Adjust.
12362 * target.h (struct target_ops): New fields `unpause_all' and
12363 `cancel_breakpoints'. Add new parameter to `pause_all'.
12364 (pause_all): Add new `freeze' parameter.
12365 (unpause_all): New.
12366 (cancel_breakpoints): New.
12367 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12368 cancel breakpoints.
12369 (cmd_qtstart): Pause threads.
12370 (stop_tracing): Pause threads, and cancel breakpoints.
12371 * win32-low.c (win32_target_ops): Adjust.
12372
e471f25b
PA
123732010-05-03 Pedro Alves <pedro@codesourcery.com>
12374
12375 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12376 the inferior right away from here...
12377 (linux_wait_1): ... to here, and adjust to check the thread's
12378 last_resume_kind instead of the lwp's step or stop_expected flags.
12379
1915ef4f
PA
123802010-05-02 Pedro Alves <pedro@codesourcery.com>
12381
12382 * README: Use consistent `GDB' and `GDBserver' spellings.
12383
f9e39928
PA
123842010-05-02 Pedro Alves <pedro@codesourcery.com>
12385
12386 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12387 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12388 (linux_detach_one_lwp): Assume the lwp is stopped.
12389 (any_thread_of): Delete.
12390 (linux_detach): Stop all lwps here. Don't blindly delete all
12391 breakpoints.
12392 (delete_lwp_callback): New.
12393 (linux_mourn): Delete all lwps of the process that is gone.
12394 (linux_wait_1): Don't delete the last lwp of the process here.
12395 * mem-break.h (mark_breakpoints_out): Declare.
12396 * mem-break.c (mark_breakpoints_out): New.
12397 (free_all_breakpoints): Use it.
12398 * server.c (handle_target_event): If the process is gone, mark
12399 breakpoints out.
12400 * thread-db.c (struct thread_db) <create_bp>: New field.
12401 (thread_db_enable_reporting): Fix prototype. Store a thread event
12402 breakpoint reference in the thread_db struct.
12403 (thread_db_load_search): Clear the thread_db object.
12404 (try_thread_db_load_1): Ditto.
12405 (switch_to_process): New.
12406 (disable_thread_event_reporting): Use it.
12407 (remove_thread_event_breakpoints): New.
12408 (thread_db_detach, thread_db_mourn): Use it.
12409
1e7fc18c
PA
124102010-05-01 Pedro Alves <pedro@codesourcery.com>
12411
12412 * linux-low.c (linux_enable_event_reporting): New.
12413 (linux_wait_for_event_1, handle_extended_wait): Use it.
12414
02fc4de7
PA
124152010-04-30 Pedro Alves <pedro@codesourcery.com>
12416
12417 * linux-low.c (linux_kill_one_lwp, linux_kill)
12418 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12419 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12420 SIGSTOP even if the LWP is stopped.
12421 (send_sigstop_callback): New.
12422 (stop_all_lwps): Use send_sigstop_callback instead.
12423 (linux_resume_one_thread): Adjust.
12424 (proceed_one_lwp): Still proceed an LWP that the client has
12425 requested to stop, if we haven't reported it as stopped yet. Make
12426 sure that LWPs the client want stopped, have a pending SIGSTOP.
12427
bc3b5632
DE
124282010-04-26 Doug Evans <dje@google.com>
12429
ae1ada35
DE
12430 * server.c (handle_general_set): Make static.
12431
bc3b5632
DE
12432 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12433 Print received char after testing for error/eof instead of before.
12434 (input_interrupt): Tweak comment.
12435
65730243
DE
124362010-04-23 Doug Evans <dje@google.com>
12437
12438 * server.c (start_inferior): Print inferior argv if --debug.
12439
a8ae7dc0
AR
124402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12441
12442 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12443 * nto-x86-low.c: Include server.h
12444
1c07cc19
PM
124452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12446
12447 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12448 be consistent with other sources of this directory.
12449 (init_registers_amd64): Correct name of source file of this function
12450 in the comment.
12451
e0a61e09
PM
124522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12453
12454 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12455 64-bit executables.
12456
54709339
PM
124572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12458
12459 * win32-i386-low.c: Add 64-bit support.
12460 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12461 (init_registers_amd64): Declare.
12462 (mappings): Add 64-bit version of array.
12463 (init_windows_x86): New function.
12464 (the_low_target): Change init_arch field to init_windows_x86.
12465
e8f0053d
PM
124662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12467
12468 * win32-low.c: Adapt to support also 64-bit architecture.
12469 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12470 (get_image_name): Use SIZE_T type for local variable `done'.
12471 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12472 (toolhelp_get_dll_name): Idem.
12473 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12474 Use uintptr_t typecast to avoid warning.
12475 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12476 (handle_exception): Use phex_nz to avoid warning.
12477 (win32_wait): Remove unused local variable `process'.
12478
c481e77e
PM
124792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12480
12481 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12482 `amd64-avx.o'.
12483
12ea4b69
PM
124842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12485
12486 * configure.ac: Use `ws2_32' library for srv_mingw.
12487 * configure: Regenerate.
12488 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12489 * remote-utils.c: Likewise.
12490
f6d1620c
L
124912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12492
12493 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12494 if __x86_64__ is defined.
12495
8e642873
PM
124962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12497
12498 * configure: Regenerate.
12499
711e434b
PM
125002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12501
12502 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12503 * target.h (target_ops): New get_tib_address field.
12504 * win32-low.h (win32_thread_info): Add thread_local_base field.
12505 * win32-low.c (child_add_thread): Add tlb argument.
12506 Set thread_local_base field to TLB.
12507 (get_child_debug_event): Adapt to child_add_thread change.
12508 (win32_get_tib_address): New function.
12509 (win32_target_ops): Set get_tib_address field to
12510 win32_get_tib_address.
12511 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12512
505106cd
PA
125132010-04-12 Pedro Alves <pedro@codesourcery.com>
12514
505106cd
PA
12515 * linux-low.c (linux_mourn): Also remove the process.
12516 * server.c (handle_target_event): Don't remove the process here.
12517 * nto-low.c (nto_mourn): New.
12518 (nto_target_ops): Install it.
12519 * spu-low.c (spu_mourn): New.
12520 (spu_target_ops): Install it.
12521 * win32-low.c (win32_mourn): New.
12522 (win32_target_ops): Install it.
12523
e8470a06
PA
125242010-04-12 Pedro Alves <pedro@codesourcery.com>
12525
12526 * server.h (buffer_xml_printf): Remove redundant `;'.
12527
45ba0d02
PA
125282010-04-12 Pedro Alves <pedro@codesourcery.com>
12529
12530 * regcache.c (set_register_cache): Invalidate regcaches before
12531 changing the register cache layout.
12532 (regcache_invalidate_one): Allow a NULL regcache.
12533 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12534 regcaches before changing the register cache layout or the target
12535 regsets.
12536
59e04013
L
125372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12538
12539 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12540 variable warning on Linux/x86-64.
12541
8336d594
PA
125422010-04-11 Pedro Alves <pedro@codesourcery.com>
12543
12544 GDBserver disconnected tracing support.
12545
12546 * linux-low.c (linux_remove_process): Delete.
12547 (add_lwp): Don't set last_resume_kind here.
12548 (linux_kill): Use `mourn'.
12549 (linux_detach): Use `thread_db_detach', and `mourn'.
12550 (linux_mourn): New.
12551 (linux_attach_lwp_1): Adjust comment.
12552 (linux_attach): last_resume_kind moved the thread_info; adjust.
12553 (status_pending_p_callback): Adjust.
12554 (linux_wait_for_event_1): Adjust.
12555 (count_events_callback, select_singlestep_lwp_callback)
12556 (select_event_lwp_callback, cancel_breakpoints_callback)
12557 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12558 (proceed_one_lwp): Adjust.
12559 (linux_async): Add debug output.
12560 (linux_thread_stopped): New.
12561 (linux_pause_all): New.
12562 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12563 linux_pause_all.
12564 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12565 (thread_db_free): Delete declaration.
12566 (thread_db_detach, thread_db_mourn): Declare.
12567 * thread-db.c (thread_db_init): Use thread_db_mourn.
12568 (thread_db_free): Delete, split in two.
12569 (disable_thread_event_reporting): New.
12570 (thread_db_detach): New.
12571 (thread_db_mourn): New.
12572
12573 * server.h (struct thread_info) <last_resume_kind>: New field.
12574 <attached>: Add comment.
12575 <gdb_detached>: New field.
12576 (handler_func): Change return type to int.
12577 (handle_serial_event, handle_target_event): Ditto.
12578 (gdb_connected): Declare.
12579 (tracing): Delete.
12580 (disconnected_tracing): Declare.
12581 (stop_tracing): Declare.
12582
12583 * server.c (handle_query) <qSupported>: Report support for
12584 disconnected tracing.
12585 (queue_stop_reply_callback): Account for running threads.
12586 (gdb_wants_thread_stopped): New.
12587 (gdb_wants_all_threads_stopped): New.
12588 (gdb_reattached_process): New.
12589 (handle_status): Clear the `gdb_detached' flag of all processes.
12590 In all-stop, stop all threads.
12591 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12592 (process_serial_event): If the remote connection breaks, or if an
12593 exit was forced with "monitor exit", force an event loop exit.
12594 Handle disconnected tracing on detach.
12595 (handle_serial_event): Adjust.
12596 (handle_target_event): If GDB isn't connected, forward events back
12597 to the inferior, unless the last process exited, in which case,
12598 exit gdbserver. Adjust interface.
12599
12600 * remote-utils.c (remote_open): Don't block in accept. Instead
12601 register an event loop source on the listen socket file
12602 descriptor. Refactor bits into ...
12603 (listen_desc): ... this new global.
12604 (gdb_connected): ... this new function.
12605 (enable_async_notification): ... this new function.
12606 (handle_accept_event): ... this new function.
12607 (remote_close): Clear remote_desc.
12608
12609 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12610
12611 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12612 New fields.
12613 (mourn_inferior): Define.
12614 (target_process_qsupported): Avoid the dangling else problem.
12615 (thread_stopped): Define.
12616 (pause_all): Define.
12617 (target_waitstatus_to_string): Declare.
12618 * target.c (target_waitstatus_to_string): New.
12619
12620 * tracepoint.c (tracing): Make extern.
12621 (disconnected_tracing): New.
12622 (stop_tracing): Make extern. Handle tracing stops due to GDB
12623 disconnecting.
12624 (cmd_qtdisconnected): New.
12625 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12626 (handle_tracepoint_general_set): Handle QTDisconnected.
12627
12628 * event-loop.c (event_handler_func): Change return type to int.
12629 (process_event): Bail out if the event handler wants the event
12630 loop to stop.
12631 (handle_file_event): Ditto.
12632 (start_event_loop): Bail out if the event handler wants the event
12633 loop to stop.
12634
12635 * nto-low.c (nto_target_ops): Adjust.
12636 * spu-low.c (spu_wait): Don't remove the process here.
12637 (spu_target_ops): Adjust.
12638 * win32-low.c (win32_wait): Don't remove the process here.
12639 (win32_target_ops): Adjust.
12640
5d267c4c
PA
126412010-04-11 Pedro Alves <pedro@codesourcery.com>
12642
12643 * regcache.c (realloc_register_cache): Invalidate inferior's
12644 regcache before recreating it.
12645
623ccd72
PA
126462010-04-09 Pedro Alves <pedro@codesourcery.com>
12647
12648 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12649
219f2f23
PA
126502010-04-09 Stan Shebs <stan@codesourcery.com>
12651 Pedro Alves <pedro@codesourcery.com>
12652
12653 * server.h (LONGEST): New.
12654 (struct thread_info) <while_stepping>: New field.
12655 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12656 Declare.
12657 (initialize_tracepoint, handle_tracepoint_general_set)
12658 (handle_tracepoint_query, tracepoint_finished_step)
12659 (tracepoint_was_hit, release_while_stepping_state_list):
12660 (current_traceframe): Declare.
12661 * server.c (handle_general_set): Handle tracepoint packets.
12662 (read_memory): New.
12663 (write_memory): New.
12664 (handle_search_memory_1): Use read_memory.
12665 (handle_query): Report support for conditional tracepoints, trace
12666 state variables, and tracepoint sources. Handle tracepoint
12667 queries.
12668 (main): Initialize the tracepoints module.
12669 (process_serial_event): Handle traceframe reads/writes.
12670
12671 * linux-low.c (handle_tracepoints): New.
12672 (linux_wait_1): Call it.
12673 (linux_resume_one_lwp): Handle while-stepping.
12674 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12675 (linux_target_ops): Install them.
12676 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12677 New field.
12678 * linux-x86-low.c (x86_supports_tracepoints): New.
12679 (the_low_target). Install it.
12680
12681 * mem-break.h (delete_breakpoint): Declare.
12682 * mem-break.c (delete_breakpoint): Make external.
12683
12684 * target.h (struct target_ops): Add `supports_tracepoints',
12685 `read_pc', and `write_pc' fields.
12686 (target_supports_tracepoints): Define.
12687 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12688 (phex_nz): New.
12689
12690 * regcache.h (struct regcache) <registers_owned>: New field.
12691 (init_register_cache, regcache_cpy): Declare.
12692 (regcache_read_pc, regcache_write_pc): Declare.
12693 (register_cache_size): Declare.
12694 (supply_regblock): Declare.
12695 * regcache.c (init_register_cache): New.
12696 (new_register_cache): Use it.
12697 (regcache_cpy): New.
12698 (register_cache_size): New.
12699 (supply_regblock): New.
12700 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12701
219f2f23
PA
12702 * tracepoint.c: New.
12703
12704 * Makefile.in (OBS): Add tracepoint.o.
12705 (tracepoint.o): New rule.
12706
3a13a53b
L
127072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12708
12709 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12710 (i386-mmx.o): New.
12711 (i386-mmx.c): Likewise.
12712 (i386-mmx-linux.o): Likewise.
12713 (i386-mmx-linux.c): Likewise.
12714
12715 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12716 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12717 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12718 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12719
12720 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12721 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12722 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12723
1570b33e
L
127242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12725
12726 * Makefile.in (clean): Updated.
12727 (i386-avx.o): New.
12728 (i386-avx.c): Likewise.
12729 (i386-avx-linux.o): Likewise.
12730 (i386-avx-linux.c): Likewise.
12731 (amd64-avx.o): Likewise.
12732 (amd64-avx.c): Likewise.
12733 (amd64-avx-linux.o): Likewise.
12734 (amd64-avx-linux.c): Likewise.
12735
12736 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12737 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12738 (srv_amd64_regobj): Add amd64-avx.o.
12739 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12740 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12741 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12742 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12743 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12744 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12745 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12746
12747 * i387-fp.c: Include "i386-xstate.h".
12748 (i387_xsave): New.
12749 (i387_cache_to_xsave): Likewise.
12750 (i387_xsave_to_cache): Likewise.
12751 (x86_xcr0): Likewise.
12752
12753 * i387-fp.h (i387_cache_to_xsave): Likewise.
12754 (i387_xsave_to_cache): Likewise.
12755 (x86_xcr0): Likewise.
12756
12757 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12758 * linux-crisv32-low.c (target_regsets): Likewise.
12759 * linux-m68k-low.c (target_regsets): Likewise.
12760 * linux-mips-low.c (target_regsets): Likewise.
12761 * linux-ppc-low.c (target_regsets): Likewise.
12762 * linux-s390-low.c (target_regsets): Likewise.
12763 * linux-sh-low.c (target_regsets): Likewise.
12764 * linux-sparc-low.c (target_regsets): Likewise.
12765 * linux-xtensa-low.c (target_regsets): Likewise.
12766
12767 * linux-low.c: Include <sys/uio.h>.
12768 (regsets_fetch_inferior_registers): Support nt_type.
12769 (regsets_store_inferior_registers): Likewise.
12770 (linux_process_qsupported): New.
12771 (linux_target_ops): Add linux_process_qsupported.
12772
12773 * linux-low.h (regset_info): Add nt_type.
12774 (linux_target_ops): Add process_qsupported.
12775
12776 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12777 and <sys/uio.h>.
12778 (init_registers_i386_avx_linux): New.
12779 (init_registers_amd64_avx_linux): Likewise.
12780 (xmltarget_i386_linux_no_xml): Likewise.
12781 (xmltarget_amd64_linux_no_xml): Likewise.
12782 (PTRACE_GETREGSET): Likewise.
12783 (PTRACE_SETREGSET): Likewise.
12784 (x86_fill_xstateregset): Likewise.
12785 (x86_store_xstateregset): Likewise.
12786 (use_xml): Likewise.
12787 (x86_linux_update_xmltarget): Likewise.
12788 (x86_linux_process_qsupported): Likewise.
12789 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12790 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12791 init_registers_i386_linux here. Call
12792 x86_linux_update_xmltarget.
12793 (the_low_target): Add x86_linux_process_qsupported.
12794
12795 * server.c (handle_query): Call target_process_qsupported.
12796
12797 * target.h (target_ops): Add process_qsupported.
12798 (target_process_qsupported): New.
12799
fc7238bb
PA
128002010-04-03 Pedro Alves <pedro@codesourcery.com>
12801
12802 * inferiors.c (add_thread): Set last_status kind to
12803 TARGET_WAITKIND_IGNORE.
12804 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12805 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12806 (linux_wait_1): Move `thread' local definition to block that uses
12807 it. Don't NULL initialize `event_child'.
12808 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12809 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12810 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12811
bdabb078
PA
128122010-04-01 Pedro Alves <pedro@codesourcery.com>
12813
12814 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12815 an extended waitstatus, or by a watchpoint.
12816 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12817 thread was stepping or has been stopped by a watchpoint.
12818
d3bbe7a0
PA
128192010-04-01 Pedro Alves <pedro@codesourcery.com>
12820
12821 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12822 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12823 of another, then delete the previous, and validate all
12824 breakpoints.
12825 (validate_inserted_breakpoint): New.
12826 (delete_disabled_breakpoints): New.
12827 (validate_breakpoints): New.
12828 (check_mem_read): Validate breakpoints before trusting their
12829 shadow. Delete disabled breakpoints.
12830 (check_mem_write): Validate breakpoints before trusting they
12831 should be inserted. Delete disabled breakpoints.
12832 * mem-break.h (validate_breakpoints):
12833 * server.c (handle_query): Validate breakpoints when we see a
12834 qSymbol query.
12835
8b07ae33
PA
128362010-04-01 Pedro Alves <pedro@codesourcery.com>
12837
12838 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12839 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12840 if we could tell there's a GDB breakpoint at stop_pc.
12841 (need_step_over_p): Don't do a step over if we find a GDB
12842 breakpoint at the resume PC.
12843
12844 * mem-break.c (struct raw_breakpoint): New.
12845 (enum bkpt_type): New type `gdb_breakpoint'.
12846 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12847 fields. New field `raw'.
12848 (find_raw_breakpoint_at): New.
12849 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12850 breakpoint instead.
12851 (set_breakpoint_at): Adjust.
12852 (delete_raw_breakpoint): New.
12853 (release_breakpoint): New.
12854 (delete_breakpoint): Rename to...
12855 (delete_breakpoint_1): ... this. Add proc parameter. Use
12856 release_breakpoint. Return ENOENT.
12857 (delete_breakpoint): Reimplement.
12858 (find_breakpoint_at): Delete.
12859 (find_gdb_breakpoint_at): New.
12860 (delete_breakpoint_at): Delete.
12861 (set_gdb_breakpoint_at): New.
12862 (delete_gdb_breakpoint_at): New.
12863 (gdb_breakpoint_here): New.
12864 (set_reinsert_breakpoint): Use release_breakpoint.
12865 (uninsert_breakpoint): Rename to ...
12866 (uninsert_raw_breakpoint): ... this.
12867 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12868 (reinsert_raw_breakpoint): Change parameter type to
12869 raw_breakpoint.
12870 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12871 instead.
12872 (check_breakpoints): Adjust. Use release_breakpoint.
12873 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12874 (breakpoint_inserted_here): Ditto.
12875 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12876 Don't trust the breakpoint's shadow if it is not inserted.
12877 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12878 (delete_all_breakpoints): Adjust.
12879 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12880 use delete_breakpoint_1.
12881
12882 * mem-break.h (breakpoints_supported): Delete declaration.
12883 (set_gdb_breakpoint_at): Declare.
12884 (gdb_breakpoint_here): Declare.
12885 (delete_breakpoint_at): Delete.
12886 (delete_gdb_breakpoint_at): Declare.
12887
12888 * server.h (struct raw_breakpoint): Forward declare.
12889 (struct process_info): New field `raw_breakpoints'.
12890
12891 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12892 breakpoints.
12893
6bf5e0ba
PA
128942010-03-24 Pedro Alves <pedro@codesourcery.com>
12895
12896 * linux-low.c (status_pending_p_callback): Fix comment.
12897 (linux_wait_for_event_1): Move most of the internal breakpoint
12898 handling from here...
12899 (linux_wait_1): ... to here.
12900 (count_events_callback): New.
12901 (select_singlestep_lwp_callback): New.
12902 (select_event_lwp_callback): New.
12903 (cancel_breakpoints_callback): New.
12904 (select_event_lwp): New.
12905 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12906 priority to all LWPs that have had events that should be reported
12907 to the client. Cancel breakpoints when about to reporting the
12908 event to the client, not while stopping lwps. No longer cancel
12909 finished single-steps here.
12910 (cancel_finished_single_step): Delete.
12911 (cancel_finished_single_steps): Delete.
12912
414a389f
PA
129132010-03-24 Pedro Alves <pedro@codesourcery.com>
12914
12915 * mem-break.c (enum bkpt_type): New.
12916 (struct breakpoint): New field `type'.
12917 (set_breakpoint_at): Change return type to struct breakpoint
12918 pointer. Set type to `other_breakpoint' by default.
12919 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12920 in the breakpoint list.
12921 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12922 (reinsert_breakpoint): Rename to ...
12923 (reinsert_raw_breakpoint): ... this.
12924 (reinsert_breakpoints_at): Adjust.
12925 * mem-break.h (struct breakpoint): Declare.
12926 (set_breakpoint_at): Change return type to struct breakpoint
12927 pointer.
12928
2280c721
PA
129292010-03-24 Pedro Alves <pedro@codesourcery.com>
12930
12931 * server.c (handle_query): Assign, not compare.
12932
d50171e4
PA
129332010-03-24 Pedro Alves <pedro@codesourcery.com>
12934
12935 Teach linux gdbserver to step-over-breakpoints.
12936
12937 * linux-low.c (can_hardware_single_step): New.
12938 (supports_breakpoints): New.
12939 (handle_extended_wait): If stopping threads, read the stop pc of
12940 the new cloned LWP.
12941 (get_pc): New.
12942 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12943 low target doesn't support retrieving the PC.
12944 (add_lwp): Set last_resume_kind to resume_continue.
12945 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12946 (linux_attach): Don't clear stop_expected. Set the lwp's
12947 last_resume_kind to resume_stop.
12948 (linux_detach_one_lwp): Don't check for removed breakpoints.
12949 (check_removed_breakpoint): Delete.
12950 (status_pending_p): Rename to ...
12951 (status_pending_p_callback): ... this. Don't check for removed
12952 breakpoints. Don't consider threads that are stopped from GDB's
12953 perspective.
12954 (linux_wait_for_lwp): Always read the stop_pc here.
12955 (cancel_breakpoint): New.
12956 (step_over_bkpt): New global.
12957 (linux_wait_for_event_1): Implement stepping over breakpoints.
12958 (gdb_wants_lwp_stopped): New.
12959 (gdb_wants_all_stopped): New.
12960 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12961 single-step traps here. Store the thread's last reported target
12962 wait status.
12963 (send_sigstop): Don't clear stop_expected. Always set it,
12964 instead.
12965 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12966 (cancel_finished_single_step): New.
12967 (cancel_finished_single_steps): New.
12968 (wait_for_sigstop): Don't cancel finished single-step traps here.
12969 (linux_resume_one_lwp): Don't check for removed breakpoints.
12970 Don't set `step' on non-hardware step archs.
12971 (linux_set_resume_request): Ignore resume_stop requests if already
12972 stopping or stopped. Set the lwp's last_resume_kind.
12973 (resume_status_pending_p): Don't check for removed breakpoints.
12974 (need_step_over_p): New.
12975 (start_step_over): New.
12976 (finish_step_over): New.
12977 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12978 requests. Clear the thread's last reported target waitstatus.
12979 Don't use the `suspended' flag. Don't consider pending breakpoints.
12980 (linux_resume): Start a step-over if necessary.
12981 (proceed_one_lwp): New.
12982 (proceed_all_lwps): New.
12983 (unstop_all_lwps): New.
12984 * linux-low.h (struct lwp_info): Rewrite comment for the
12985 `suspended' flag. Add the `stop_pc' field. Delete the
12986 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12987 Add `'last_resume_kind' and `need_step_over' fields.
12988 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12989 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12990 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12991 (set_raw_breakpoint_at): New.
12992 (set_breakpoint_at): Rewrite to use it.
12993 (reinsert_breakpoint_handler): Delete.
12994 (set_reinsert_breakpoint): New.
12995 (reinsert_breakpoint_by_bp): Delete.
12996 (delete_reinsert_breakpoints): New.
12997 (uninsert_breakpoint): Rewrite.
12998 (uninsert_breakpoints_at): New.
12999 (reinsert_breakpoint): Rewrite.
13000 (reinsert_breakpoints_at): New.
13001 (check_breakpoints): Rewrite.
13002 (breakpoint_here): New.
13003 (breakpoint_inserted_here): New.
13004 (check_mem_read): Adjust.
13005 * mem-break.h (breakpoints_supported, breakpoint_here)
13006 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13007 (reinsert_breakpoint_by_bp): Delete declaration.
13008 (delete_reinsert_breakpoints): Declare.
13009 (reinsert_breakpoint): Delete declaration.
13010 (reinsert_breakpoints_at): Declare.
13011 (uninsert_breakpoint): Delete declaration.
13012 (uninsert_breakpoints_at): Declare.
13013 (check_breakpoints): Adjust prototype.
13014 * server.h: Adjust include order.
13015 (struct thread_info): Declare here. Add a `last_status' field.
13016
30ba68cb
MS
130172010-03-23 Michael Snyder <msnyder@vmware.com>
13018
13019 * server.c (crc32): New function.
13020 (handle_query): Add handling for 'qCRC:' request.
13021
b9a881c2
PA
130222010-03-23 Pedro Alves <pedro@codesourcery.com>
13023
13024 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13025 lwp had been stopped by a watchpoint.
13026
e92d13d5
PA
130272010-03-16 Pedro Alves <pedro@codesourcery.com>
13028
13029 * server.h (internal_error): Declare.
13030 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13031 * utils.c (internal_error): New function.
13032
64daa791
AS
130332010-03-15 Andreas Schwab <schwab@redhat.com>
13034
13035 * configure.srv: Fix typo setting srv_regobj.
13036
f52cd8cd
PA
130372010-03-15 Pedro Alves <pedro@codesourcery.com>
13038
13039 * linux-low.c (fetch_register): Avoid passing a non string literal
13040 format to `error'.
13041 (usr_store_inferior_registers): Ditto.
13042
93ae6fdc
PA
130432010-03-14 Pedro Alves <pedro@codesourcery.com>
13044
13045 * linux-low.c (linux_write_memory): Bail out early if peeking
13046 memory failed.
13047
c3adc08c
PA
130482010-03-14 Pedro Alves <pedro@codesourcery.com>
13049
13050 * linux-low.h (struct lwp_info): New fields
13051 `stopped_by_watchpoint' and `stopped_data_address'.
13052 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13053 here, and cache them in the lwp object.
13054 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13055 directly.
13056 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13057 field.
13058 (linux_stopped_by_watchpoint): Rewrite.
13059 (linux_stopped_data_address): Rewrite.
13060
bce522a2
PA
130612010-03-06 Simo Melenius <simo.melenius@iki.fi>
13062
13063 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13064 switching the current inferior, not before.
13065
90884b2b
L
130662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13067
13068 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13069 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13070 i386-linux.c and amd64-linux.c.
13071 (reg-i386.o): Removed.
13072 (reg-i386.c): Likewise.
13073 (reg-i386-linux.o): Likewise.
13074 (reg-i386-linux.c): Likewise.
13075 (reg-x86-64.o): Likewise.
13076 (reg-x86-64.c): Likewise.
13077 (reg-x86-64-linux.o): Likewise.
13078 (reg-x86-64-linux.c): Likewise.
13079 (i386.o): New.
13080 (i386.c): Likewise.
13081 (i386-linux.o): Likewise.
13082 (i386-linux.c): Likewise.
13083 (amd64.o): Likewise.
13084 (amd64.c): Likewise.
13085 (amd64-linux.o): Likewise.
13086 (amd64-linux.c): Likewise.
13087
13088 * configure.srv (srv_i386_regobj): New.
13089 (srv_i386_linux_regobj): Likewise.
13090 (srv_amd64_regobj): Likewise.
13091 (srv_amd64_linux_regobj): Likewise.
13092 (srv_i386_32bit_xmlfiles): Likewise.
13093 (srv_i386_64bit_xmlfiles): Likewise.
13094 (srv_i386_xmlfiles): Likewise.
13095 (srv_amd64_xmlfiles): Likewise.
13096 (srv_i386_linux_xmlfiles): Likewise.
13097 (srv_amd64_linux_xmlfiles): Likewise.
13098 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13099 srv_xmlfiles to $srv_i386_xmlfiles.
13100 (i[34567]86-*-mingw32ce*): Likewise.
13101 (i[34567]86-*-mingw*): Likewise.
13102 (i[34567]86-*-nto*): Likewise.
13103 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13104 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13105 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13106 (x86_64-*-linux*): Likewise.
13107
13108 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13109 (init_registers_amd64_linux): New.
13110 (x86_arch_setup): Replace init_registers_x86_64_linux with
13111 init_registers_amd64_linux.
13112
193f13e6
MK
131132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13114
13115 * configure.ac: Check for libdl. If it is not available link against
13116 static libthread_db.
13117 * configure: Regenerate.
13118
85d721b8
PA
131192010-02-22 Pedro Alves <pedro@codesourcery.com>
13120
13121 PR9605
13122
13123 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13124 handing a read watchpoint.
13125 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13126
6076632b
DE
131272010-02-12 Doug Evans <dje@google.com>
13128
13129 * linux-low.c (linux_supports_tracefork_flag): Document.
13130 (linux_look_up_symbols): Add comment.
13131
3327ccf7
L
131322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13133
13134 * regcache.c (supply_register): Clear regcache if buf is NULL.
13135
0718675c 131362010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13137 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13138
13139 * inferiors.c (find_inferior): Add function documentation.
13140 (unloaded_dll): Handle the case where the unloaded dll has not
13141 been previously registered in the dll list.
13142
177321bd
DJ
131432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13144
13145 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13146 (thumb2_breakpoint): New.
13147 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13148
2b009048
DJ
131492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13150
13151 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13152 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13153 breakpoints.
13154
3be029c7
PA
131552010-01-21 Pedro Alves <pedro@codesourcery.com>
13156
13157 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13158
18f5de3b
JK
131592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13160
13161 * linux-s390-low.c (s390_collect_ptrace_register)
13162 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13163
3743bb4f
DE
131642010-01-21 Doug Evans <dje@google.com>
13165
14ce3065
DE
13166 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13167 (PTRACE_ARG4_TYPE): New macro.
13168 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13169 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13170 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13171 (usr_store_inferior_registers): Ditto.
13172 (linux_read_memory, linux_write_memory): Ditto.
13173 (linux_test_for_tracefork): Ditto.
13174
3743bb4f
DE
13175 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13176 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13177
8b315be5
PA
131782010-01-21 Pedro Alves <pedro@codesourcery.com>
13179
13180 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13181 target.
13182
85492558
PA
131832010-01-21 Pedro Alves <pedro@codesourcery.com>
13184
13185 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13186 prototype to take a regcache. Adjust.
13187
442ea881
PA
131882010-01-20 Pedro Alves <pedro@codesourcery.com>
13189
13190 * regcache.h (struct thread_info): Forward declare.
13191 (struct regcache): New.
13192 (new_register_cache): Adjust prototype.
13193 (get_thread_regcache): Declare.
13194 (free_register_cache): Adjust prototype.
13195 (registers_to_string, registers_from_string): Ditto.
13196 (supply_register, supply_register_by_name, collect_register)
13197 (collect_register_as_string, collect_register_by_name): Ditto.
13198 * regcache.c (struct inferior_regcache_data): Delete.
13199 (get_regcache): Rename to ...
13200 (get_thread_regcache): ... this. Adjust. Switch inferior before
13201 fetching registers.
13202 (regcache_invalidate_one): Adjust.
13203 (regcache_invalidate): Fix prototype.
13204 (new_register_cache): Return the new register cache.
13205 (free_register_cache): Change prototype.
13206 (realloc_register_cache): Adjust.
13207 (registers_to_string): Change prototype to take a regcache. Adjust.
13208 (registers_from_string): Ditto.
13209 (register_data): Ditto.
13210 (supply_register): Ditto.
13211 (supply_register_by_name): Ditto.
13212 (collect_register): Ditto.
13213 (collect_register_as_string): Ditto.
13214 (collect_register_by_name): Ditto.
13215 * server.c (process_serial_event): Adjust.
13216 * linux-low.h (regset_fill_func, regset_store_func): Change
13217 prototype.
13218 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13219 Change prototype.
13220 * linux-low.c (get_stop_pc): Adjust.
13221 (check_removed_breakpoint): Adjust.
13222 (linux_wait_for_event): Adjust.
13223 (linux_resume_one_lwp): Adjust.
13224 (fetch_register): Add regcache parameter. Adjust.
13225 (usr_store_inferior_registers): Ditto.
13226 (regsets_fetch_inferior_registers): Ditto.
13227 (regsets_store_inferior_registers): Ditto.
13228 (linux_fetch_registers, linux_store_registers): Ditto.
13229 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13230 regcache. Adjust.
43aaf8b6
PA
13231 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13232 Ditto.
442ea881
PA
13233 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13234 prototype to take a regcache.
13235 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13236 * remote-utils.c (convert_ascii_to_int, outreg)
13237 (prepare_resume_reply): Change prototype to take a regcache.
13238 Adjust.
13239 * target.h (struct target_ops) <fetch_registers, store_registers>:
13240 Change prototype to take a regcache.
13241 (fetch_inferior_registers, store_inferior_registers): Change
13242 prototype to take a regcache. Adjust.
13243 * proc-service.c (ps_lgetregs): Adjust.
13244 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13245 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13246 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13247 take a regcache. Adjust.
13248 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13249 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13250 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13251 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13252 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13253 (cris_cannot_fetch_register):
13254 (cris_breakpoint_at): Change prototype to take a regcache.
13255 Adjust.
13256 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13257 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13258 to take a regcache. Adjust.
13259 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13260 Adjust.
13261 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13262 take a regcache. Adjust.
13263 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13264 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13265 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13266 * linux-mips-low.c (mips_get_pc):
13267 (mips_set_pc): Change prototype to take a regcache. Adjust.
13268 (mips_reinsert_addr): Adjust.
13269 (mips_collect_register): Change prototype to take a regcache.
13270 Adjust.
13271 (mips_supply_register):
13272 (mips_collect_register_32bit, mips_supply_register_32bit)
13273 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13274 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13275 * linux-ppc-low.c (ppc_supply_ptrace_register)
13276 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13277 (parse_spufs_run): Adjust.
13278 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13279 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13280 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13281 take a regcache. Adjust.
13282 * linux-s390-low.c (s390_collect_ptrace_register)
13283 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13284 (s390_set_pc): Change prototype to take a regcache. Adjust.
13285 (s390_arch_setup): Adjust.
13286 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13287 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13288 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13289 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13290 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13291 regcache. Adjust.
13292 (sparc_breakpoint_at): Adjust.
13293 * linux-xtensa-low.c (xtensa_fill_gregset):
13294 (xtensa_store_gregset):
13295 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13296 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13297 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13298 prototype to take a regcache. Adjust.
13299 * win32-arm-low.c (arm_fetch_inferior_register)
13300 (arm_store_inferior_register): Change prototype to take a
13301 regcache. Adjust.
13302 * win32-i386-low.c (i386_fetch_inferior_register)
13303 (i386_store_inferior_register): Change prototype to take a
13304 regcache. Adjust.
13305 * win32-low.c (child_fetch_inferior_registers)
13306 (child_store_inferior_registers): Change prototype to take a
13307 regcache. Adjust.
13308 (win32_wait): Adjust.
13309 (win32_fetch_inferior_registers): Change prototype to take a
13310 regcache. Adjust.
13311 (win32_store_inferior_registers): Adjust.
13312 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13313 store_inferior_register>: Change prototype to take a regcache.
13314
60c3d7b0
DE
133152010-01-20 Doug Evans <dje@google.com>
13316
13317 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13318 #ifdef.
13319 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13320 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13321
dc146f7c
VP
133222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13323
13324 * linux-low.c (linux_core_of_thread): New.
13325 (compare_ints, show_process, list_threads): New.
13326 (linux_qxfer_osdata): Report threads and cores.
13327 (linux_target_op): Register linux_core_of_thread.
13328 * remote-utils.c (prepare_resume_reply): Report the core.
13329 (buffer_xml_printf): Support %d specifier.
13330 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13331 New.
13332 (handle_query): Handle qXfer:threads. Announce availability
13333 thereof.
13334 * target.h (struct target_ops): New field core_of_thread.
13335
7803799a
UW
133362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13337
13338 * Makefile.in (clean): Remove new generated files.
13339 (reg-s390.o, reg-s390.c): Remove rules.
13340 (reg-s390x.o, reg-s390x.c): Likewise.
13341 (s390-linux32.o, s390-linux32.c): Add rules.
13342 (s390-linux64.o, s390-linux64.c): Likewise.
13343 (s390x-linux64.o, s390x-linux64.c): Likewise.
13344 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13345 * linux-s390-low.c: Include <elf.h>.
13346 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13347 (init_registers_s390): Remove prototype.
13348 (init_registers_s390x): Likewise.
13349 (init_registers_s390_linux32): Add prototype.
13350 (init_registers_s390_linux64): Likewise.
13351 (init_registers_s390x_linux64): Likewise.
13352 (s390_num_regs_3264): New define.
13353 (s390_regmap_3264): New global variable.
13354 (s390_cannot_fetch_register): Remove obsolete check.
13355 (s390_cannot_store_register): Likewise.
13356 (s390_collect_ptrace_register): Handle upper/lower register halves.
13357 (s390_supply_ptrace_register): Likewise.
13358 (s390_fill_gregset): Update to register number changes.
13359 (s390_get_hwcap): New routine.
13360 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13361 Install appropriate regmap and register set.
13362
6e7ffa39
JB
133632010-01-01 Joel Brobecker <brobecker@adacore.com>
13364
13365 * server.c (gdbserver_version): Update copyright year to 2010.
13366 * gdbreplay.c (gdbreplay_version): Likewise.
13367
957f3f49
DE
133682009-12-28 Doug Evans <dje@google.com>
13369
13370 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13371 elf/external.h. Include <elf.h> instead but only if necessary.
13372
ca5c370d
PA
133732009-12-28 Pedro Alves <pedro@codesourcery.com>
13374
13375 * linux-low.c (linux_remove_process): Remove `detaching'
13376 parameter. Don't release/detach from thread_db here.
13377 (linux_kill): Release/detach from thread_db here, ...
13378 (linux_detach): ... and here, before actually detaching.
13379 (linux_wait_1): ... and here, when a process exits.
13380 * thread-db.c (any_thread_of): New.
13381 (thread_db_free): Switch the current inferior to a thread of the
13382 passed in process.
13383
4ee62156
DE
133842009-12-21 Doug Evans <dje@google.com>
13385
d90e6a88
DE
13386 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13387
c5f62d5f
DE
13388 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13389 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13390 warning ifndef __NR_tkill. Move setting of errno there too.
13391 Delete unnecessary resetting of errno after syscall.
13392 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13393
10e86dd7
DE
13394 * configure.ac: Check for dladdr.
13395 * config.in: Regenerate.
13396 * configure: Regenerate.
13397 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13398 (try_thread_db_load): Update.
13399
4ee62156
DE
13400 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13401
00f515da
DE
134022009-12-18 Doug Evans <dje@google.com>
13403
e9464885
DE
13404 * event-loop.c: Include unistd.h if it exists.
13405
07d4f67e
DE
13406 * linux-low.c (my_waitpid): Move definition away from being in
13407 between linux_tracefork_child/linux_test_for_tracefork.
13408
00f515da
DE
13409 * gdb_proc_service.h (psaddr_t): Fix type.
13410 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13411 signature to match glibc.
13412
1de1badb
DE
134132009-12-16 Doug Evans <dje@google.com>
13414
13415 * linux-low.c (linux_read_memory): Fix argument to read.
13416
aeeb81d1
PA
134172009-11-26 Pedro Alves <pedro@codesourcery.com>
13418
13419 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13420 events, don't leave current_inferior pointing at null.
13421
10357975
PA
134222009-11-26 Pedro Alves <pedro@codesourcery.com>
13423
13424 * win32-low.c (LOG): Delete.
13425 (OUTMSG): Output to stderr.
13426 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13427 on compile time LOG macro.
13428 (win32_wait): Fix debug output.
13429
cf6e3471
PA
134302009-11-26 Pedro Alves <pedro@codesourcery.com>
13431
13432 * win32-low.c (win32_add_one_solib): If the dll name is
13433 "ntdll.dll", prepend the system directory to the dll path.
13434
0c85e18e
MK
134352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13438
9ac544ce 134392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13440 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13441
13442 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13443 * configure.ac: Check for __mcoldfire__ and set
13444 gdb_cv_m68k_is_coldfire.
13445 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13446 reg-cf.o and reg-m68k.o.
13447 * configure: Regenerated.
13448
fd7dd3e6
PA
134492009-11-16 Pedro Alves <pedro@codesourcery.com>
13450
13451 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13452 Pass it to thread_db_free.
13453 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13454 proper `detaching' argument to linux_remove_process.
13455 * linux-low.h (thread_db_free): Add `detaching' parameter.
13456 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13457 to thread_db_free.
13458 (thread_db_free): Add `detaching' parameter. Only
13459 call td_ta_clear_event if detaching from process.
13460
75aa492e
MK
134612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13462
13463 * thread-db.c (thread_db_free): Fix typo.
13464
21e1bee4
PP
134652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13466
13467 PR gdb/10838
13468 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13469
8838b45e
NS
134702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13471
13472 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13473 with an i686 compiler.
13474 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13475 needed.
13476 * configure: Rebuilt.
13477
8a35fb51
SL
134782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13479
13480 PR gdb/10783
13481
13482 * server.c (handle_search_memory_1): Correct read_addr initialization
13483 in loop for searching subsequent chunks.
13484
96f15937
PP
134852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13486
13487 * configure.ac: New --with-libthread-db option.
13488 * thread-db.c: Allow direct dependence on libthread_db.
13489 (thread_db_free): Adjust.
13490 * config.in: Regenerate.
13491 * configure: Likewise.
889bf7c5 13492
5f7d1694
PP
134932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13494
13495 PR gdb/10757
13496 * thread-db.c (attach_thread): New function.
13497 (maybe_attach_thread): Return success/failure.
13498 (find_new_threads_callback): Adjust.
889bf7c5
PA
13499 (thread_db_find_new_threads): Loop until no new threads.
13500
88e3b899
PA
135012009-10-13 Pedro Alves <pedro@codesourcery.com>
13502
13503 * proc-service.c (ps_lgetregs): Formatting.
13504
cdbfd419
PP
135052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13506
13507 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13508 * configure.ac: Adjust.
13509 * linux-low.h (struct process_info_private): Move members to struct
13510 thread_db.
13511 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13512 * linux-low.c (linux_remove_process): Adjust.
13513 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13514 * server.c (handle_query): Move code ...
13515 (handle_monitor_command): ... here. New function.
13516 * target.h (struct target_ops): New member.
13517 * thread-db.c (struct thread_db): New.
13518 (libthread_db_search_path): New variable.
13519 (thread_db_create_event, thread_db_enable_reporting)
13520 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13521 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13522 (try_thread_db_load_1, dladdr_to_soname): New functions.
13523 (try_thread_db_load, thread_db_load_search): New functions.
13524 (thread_db_init): Search for libthread_db.
13525 (thread_db_free): New function.
13526 (thread_db_handle_monitor_command): Likewise.
13527 * config.in: Regenerate.
13528 * configure: Regenerate.
889bf7c5 13529
4168d2d6
UW
135302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13531
13532 * spu-low.c (spu_kill): Wait for inferior to terminate.
13533 Call clear_inferiors.
13534 (spu_detach): Call clear_inferiors.
13535
81ecdfbb
RW
135362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13537
13538 * aclocal.m4: Regenerate.
13539 * config.in: Likewise.
13540 * configure: Likewise.
13541
0b9ff2c0
UW
135422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13543
13544 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13545 (parse_spufs_run): New function.
13546 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13547 (ppc_breakpoint_at): Handle SPU breakpoints.
13548
efcbbd14
UW
135492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13550
13551 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13552 (SPUFS_MAGIC): Define.
13553 (spu_enumerate_spu_ids): New function.
13554 (linux_qxfer_spu): New function.
13555 (linux_target_ops): Install linux_qxfer_spu.
13556
f4d9bade
UW
135572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13558
13559 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13560 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13561 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13562 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13563 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13564 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13565 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13566 (init_registers_powerpc_cell32l): Add prototype.
13567 (init_registers_powerpc_cell64l): Likewise.
13568 (ppc_arch_setup): Detect Cell/B.E. architecture.
13569
96e946ca
RW
135702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13571
13572 * Makefile.in (datarootdir): New variable.
13573
58d6951d
DJ
135742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * linux-low.c (linux_write_memory): Update debugging output.
13577 * Makefile.in (clean): Add new descriptions.
13578 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13579 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13580 * configure.srv: Add new files for arm*-*-linux*.
13581 * linux-arm-low.c: Add new declarations.
13582 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13583 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13584 (HWCAP_VFPv3D16): New.
13585 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13586 instead of __IWMMXT__.
13587 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13588 (arm_arch_setup): New.
13589 (target_regsets): Remove #ifdef. Add VFP regset.
13590 (the_low_target): Use arm_arch_setup.
13591
12b42a12
DJ
135922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13593
13594 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13595 the main thread again.
13596
ac8c974e
AR
135972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13598
13599 Adding Neutrino gdbserver.
13600 * configure: Regenerated.
13601 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13602 * configure.srv (i[34567]86-*-nto*): New target.
13603 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13604 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13605 (nto_comctrl) [__QNX__]: New function.
13606 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13607
4424e0c3 136082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13609
13610 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13611 srv_tgtobj.
13612
912cf4ba
PA
136132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13614 Pedro Alves <pedro@codesourcery.com>
13615
13616 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13617 don't support CONTEXT_EXTENDED_REGISTERS.
13618 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13619 (the_low_target): Install them.
13620 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13621 failing with ERROR_PIPE_NOT_CONNECTED.
13622
aa5ca48f
DE
136232009-06-30 Doug Evans <dje@google.com>
13624 Pierre Muller <muller@ics.u-strasbg.fr>
13625
13626 Add h/w watchpoint support to x86-linux, win32-i386.
13627 * Makefile.in (SFILES): Add i386-low.c
13628 (i386_low_h): Define.
13629 (i386-low.o): Add dependencies.
13630 (linux-x86-low.o): Add i386-low.h dependency.
13631 (win32-i386-low.o): Ditto.
13632 * i386-low.c: New file.
13633 * i386-low.h: New file.
13634 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13635 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13636 * linux-low.c (linux_add_process): Initialize arch_private.
13637 (linux_remove_process): Free arch_private.
13638 (add_lwp): Initialize arch_private.
13639 (delete_lwp): Free arch_private.
13640 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13641 provided.
13642 * linux-low.h (process_info_private): New member arch_private.
13643 (lwp_info): New member arch_private.
13644 (linux_target_ops): New members new_process, new_thread,
13645 prepare_to_resume.
13646 (ptid_of): New macro.
13647 * linux-x86-low.c: Include stddef.h, i386-low.h.
13648 (arch_process_info): New struct.
13649 (arch_lwp_info): New struct.
13650 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13651 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13652 (i386_dr_low_get_status): New function.
13653 (x86_insert_point, x86_remove_point): New functions.
13654 (x86_stopped_by_watchpoint): New function.
13655 (x86_stopped_data_address): New function.
13656 (x86_linux_new_process, x86_linux_new_thread): New functions.
13657 (x86_linux_prepare_to_resume): New function.
13658 (the_low_target): Add entries for insert_point, remove_point,
13659 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13660 prepare_to_resume.
13661 * server.c (debug_hw_points): New global.
13662 (monitor_show_help): Document set debug-hw-points.
13663 (handle_query): Process "set debug-hw-points".
13664 * server.h (debug_hw_points): Declare.
13665 (paddress): Declare.
13666 * utils.c (NUMCELLS, CELLSIZE): New macros.
13667 (get_sell, xsnprintf, paddress): New functions.
13668 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13669 remove_point, stopped_by_watchpoint, stopped_data_address.
13670 * win32-i386-low.c: Include i386-low.h.
13671 (debug_reg_state): Replaces dr.
13672 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13673 (i386_dr_low_get_status): New function.
13674 (i386_insert_point, i386_remove_point): New functions.
13675 (i386_stopped_by_watchpoint): New function.
13676 (i386_stopped_data_address): New function.
13677 (i386_initial_stuff): Update.
13678 (get_thread_context,set_thread_context,i386_thread_added): Update.
13679 (the_low_target): Add entries for insert_point,
13680 remove_point, stopped_by_watchpoint, stopped_data_address.
13681 * win32-low.c (win32_insert_watchpoint): New function.
13682 (win32_remove_watchpoint): New function.
13683 (win32_stopped_by_watchpoint): New function.
13684 (win32_stopped_data_address): New function.
13685 (win32_target_ops): Add entries for insert_watchpoint,
13686 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13687 * win32-low.h (win32_target_ops): New members insert_point,
13688 remove_point, stopped_by_watchpoint, stopped_data_address.
13689
d993e290
PA
136902009-06-25 Pedro Alves <pedro@codesourcery.com>
13691
13692 * server.c (process_serial_event): Re-return unsupported, not
13693 error, if the type isn't recognized. Re-allow supporting only
13694 insert or remove packets. Also call require_running for
13695 breakpoints. Add missing break statement to default case. Tidy.
13696 * target.h (struct target_ops): Rename insert_watchpoint to
13697 insert_point, and remove_watchpoint to remove_point.
13698
13699 * linux-low.h (struct linux_target_ops): Likewise.
13700 * linux-low.c (linux_insert_watchpoint): Rename to ...
13701 (linux_insert_point): ... this. Adjust.
13702 (linux_remove_watchpoint): Rename to ...
13703 (linux_remove_point): ... this. Adjust.
13704 (linux_target_ops): Adjust.
13705 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13706 (cris_insert_point): ... this.
13707 (cris_remove_watchpoint): Rename to ...
13708 (cris_remove_point): ... this.
13709 (the_low_target): Adjust.
13710
0f54c268
PM
137112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13712
13713 * server.c (handle_v_kill): Pass signal_pid to
13714 kill_inferior if multi_process is zero.
13715
c6314022
AR
137162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13717
13718 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13719 * target.h (target_ops): Comment for *_watchpoint to make it clear
13720 the functions can get types '0' and '1'.
13721
4463ce24
AR
137222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13723
13724 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13725 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13726 * regcache.c (get_regcache): Likewise.
13727 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13728 * win32-low.c (child_fetch_inferior_registers): Remove check for
13729 regno 0.
13730
cf8fd78b
PA
137312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13732 Pedro Alves <pedro@codesourcery.com>
13733
13734 * target.h (struct target_ops) <supports_multi_process>: New
13735 callback.
13736 (target_supports_multi_process): New.
13737 * server.c (handle_query): Even if GDB reports support, only
13738 enable multi-process if the target also supports it. Report
13739 multi-process support only if the target backend supports it.
13740 * linux-low.c (linux_supports_multi_process): New function.
13741 (linux_target_ops): Install it as target_supports_multi_process
13742 callback.
13743
47c0c975
DE
137442009-05-24 Doug Evans <dje@google.com>
13745
e09875d4
DE
13746 Global renaming of find_thread_pid to find_thread_ptid.
13747 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13748 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13749 All callers updated.
13750
e27d73f6
DE
13751 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13752 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13753 directly.
13754
47c0c975
DE
13755 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13756 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13757 (linux_resume_one_lwp): Ditto.
13758
2acc282a
DE
137592009-05-23 Doug Evans <dje@google.com>
13760
13761 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13762 from struct inferior_list_entry * to struct lwp_info *.
13763 All callers updated.
13764
9f1036c1
DE
137652009-05-13 Doug Evans <dje@google.com>
13766
13767 * linux-x86-low.c: Don't include assert.h.
13768 (x86_siginfo_fixup): Use fatal, not assert.
13769 (x86_arch_setup): Fix comment.
13770
d0722149
DE
137712009-05-12 Doug Evans <dje@google.com>
13772
13773 Biarch support for i386/amd64 gdbserver.
13774 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13775 Add linux-x86-low.c.
13776 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13777 (linux-x86-low.o): Add.
13778 * linux-x86-64-low.c: Delete.
13779 * linux-i386-low.c: Delete.
13780 * linux-x86-low.c: New file.
13781 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13782 linux-x86-low.o.
13783 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13784 linux-x86-low.o.
13785 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13786 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13787 (linux_child_pid_to_exec_file): New function.
13788 (elf_64_header_p, elf_64_file_p): New functions.
13789 (siginfo_fixup): New function.
13790 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13791 give target a chance to convert layout.
13792 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13793 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13794
fdeb2a12
DE
137952009-05-07 Doug Evans <dje@google.com>
13796
13797 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13798 (regsets_store_inferior_registers): Ditto.
13799
a6dbe5df
PA
138002009-05-06 Pedro Alves <pedro@codesourcery.com>
13801
13802 PR server/10048
13803
13804 * linux-low.c (must_set_ptrace_flags): Delete.
13805 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13806 of the global.
13807 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13808 `lwp->must_set_ptrace_flags' instead.
ba42693b 13809 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13810 (linux_wait_1): ... not here.
13811
5091eb23
DE
138122009-04-30 Doug Evans <dje@google.com>
13813
9f767825
DE
13814 * inferiors.c (started_inferior_callback): New function.
13815 (attached_inferior_callback): New function.
13816 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13817 * server.c (print_started_pid, print_attached_pid): New functions.
13818 (detach_or_kill_for_exit): New function.
13819 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13820 * server.h (have_started_inferiors_p): Declare.
13821 (have_attached_inferiors_p): Declare.
13822
5091eb23
DE
13823 * inferiors.c (remove_process): Fix memory leak, free process.
13824 * linux-low.c (linux_remove_process): New function.
13825 (linux_kill): Call it instead of remove_process.
13826 (linux_detach, linux_wait_1): Ditto.
13827
155c8968
PA
138282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13829
13830 * configure.srv: Add x86 Windows CE target.
13831
7fe519cb
UW
138322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * inferiors.c (get_thread_process): Make global.
13835 * server.h (get_thread_process): Add prototype.
13836 * thread-db.c (find_one_thread): Use get_thread_process
13837 instead of current_process.
13838 (thread_db_get_tls_address): Do not crash if called when
13839 thread layer is not yet initialized.
13840
5472f405
UW
138412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13842
13843 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13844 * spu-low.c (current_tid): Rename to ...
13845 (current_ptid): ... this.
13846 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13847 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13848 ptid_get_lwp (current_ptid) instead of current_tid.
13849 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13850 instead of current_tid. Use find_process_pid to verify pid
13851 argument is valid. Pass proper argument to remove_process.
13852 (spu_thread_alive): Compare current_ptid instead of current_tid.
13853 (spu_resume): Likewise.
13854
55ac2b99
PA
138552009-04-02 Pedro Alves <pedro@codesourcery.com>
13856
13857 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13858 variable.
13859
95954743
PA
138602009-04-01 Pedro Alves <pedro@codesourcery.com>
13861
13862 Implement the multiprocess extensions, and add linux multiprocess
13863 support.
13864
13865 * server.h (ULONGEST): Declare.
13866 (struct ptid, ptid_t): New.
13867 (minus_one_ptid, null_ptid): Declare.
13868 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13869 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13870 (struct inferior_list_entry): Change `id' type from unsigned from
13871 to ptid_t.
13872 (struct sym_cache, struct breakpoint, struct
13873 process_info_private): Forward declare.
13874 (struct process_info): Declare.
13875 (current_process): Declare.
13876 (all_processes): Declare.
13877 (initialize_inferiors): Declare.
13878 (add_thread): Adjust to use ptid_t.
13879 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13880 (add_process, remove_process, find_thread_pid): Declare.
13881 (find_inferior_id): Adjust to use ptid_t.
13882 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13883 (multi_process): Declare.
13884 (push_event): Adjust to use ptid_t.
13885 (read_ptid, write_ptid): Declare.
13886 (prepare_resume_reply): Adjust to use ptid_t.
13887 (clear_symbol_cache): Declare.
13888 * inferiors.c (all_processes): New.
13889 (null_ptid, minus_one_ptid): New.
13890 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13891 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13892 (add_thread): Change unsigned long to ptid. Remove gdb_id
13893 parameter. Adjust.
13894 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13895 (gdb_id_to_thread): Rename to ...
13896 (find_thread_pid): ... this. Change unsigned long to ptid.
13897 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13898 (loaded_dll, pull_pid_from_list): Adjust.
13899 (add_process, remove_process, find_process_pid)
13900 (get_thread_process, current_process, initialize_inferiors): New.
13901 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13902 (struct target_waitstatus) <related_pid>: Ditto.
13903 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13904 return type to int.
13905 (struct target_ops) <join>: Add `pid' argument.
13906 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13907 (struct target_ops) <wait>: Add `ptid' field. Change return type
13908 to ptid.
13909 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13910 (mywait): Add `ptid' argument. Change return type to ptid_t.
13911 (target_pid_to_str): Declare.
13912 * target.c (set_desired_inferior): Adjust to use ptids.
13913 (mywait): Add new `ptid' argument. Adjust.
13914 (target_pid_to_str): New.
13915 * mem-break.h (free_all_breakpoints): Declare.
13916 * mem-break.c (breakpoints): Delelete.
13917 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13918 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13919 to use per-process breakpoint list.
13920 (free_all_breakpoints): New.
13921 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13922 (symbol_cache, all_symbols_looked_up): Delete.
13923 (hexchars): New.
13924 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13925 read_ptid): New.
13926 (prepare_resume_reply): Change ptid argument's type from unsigned
13927 long to ptid_t. Adjust. Implement W;process and X;process.
13928 (free_sym_cache, clear_symbol_cache): New.
13929 (look_up_one_symbol): Adjust to per-process symbol cache. *
13930 * server.c (cont_thread, general_thread, step_thread): Change type
13931 to ptid_t.
13932 (attached): Delete.
13933 (multi_process): New.
13934 (last_ptid): Change type to ptid_t.
13935 (struct vstop_notif) <ptid>: Change type to ptid_t.
13936 (queue_stop_reply, push_event): Change `ptid' argument's type to
13937 ptid_t.
13938 (discard_queued_stop_replies): Add `pid' argument.
13939 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13940 changes. Don't reference the `attached' global.
13941 (attach_inferior): Adjust to mywait interface changes.
13942 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13943 features. Handle and report "multiprocess+". Handle
13944 "qAttached:PID".
13945 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13946 changes.
13947 (handle_v_kill): New.
13948 (handle_v_stopped): Adjust to use target_pid_to_str.
13949 (handle_v_requests): Allow multiple attaches and runs when
13950 multiprocess extensions are in effect. Handle "vKill".
13951 (myresume): Adjust to use ptids.
13952 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13953 (handle_status): Adjust to discard_queued_stop_replies interface
13954 change.
13955 (first_thread_of, kill_inferior_callback)
13956 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13957 (main): Call initialize_inferiors. Adjust to use ptids, killing
13958 and detaching from all inferiors. Handle multiprocess packet
13959 variants.
13960 * linux-low.h: Include gdb_proc_service.h.
13961 (struct process_info_private): New.
13962 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13963 <lwpid_of>: Use ptid_get_lwp.
13964 (get_lwp_thread): Adjust.
13965 (struct lwp_info): Add `dead' member.
13966 (find_lwp_pid): Declare.
13967 * linux-low.c (thread_db_active): Delete.
13968 (new_inferior): Adjust comment.
13969 (inferior_pid): Delete.
13970 (linux_add_process): New.
13971 (handle_extended_wait): Adjust.
13972 (add_lwp): Change unsigned long to ptid.
13973 (linux_create_inferior): Add process to processes table. Adjust
13974 to use ptids. Don't set new_inferior here.
13975 (linux_attach_lwp): Rename to ...
13976 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13977 it. Adjust to use ptids.
13978 (linux_attach_lwp): New.
13979 (linux_attach): Add process to processes table. Don't set
13980 new_inferior here.
13981 (struct counter): New.
13982 (second_thread_of_pid_p, last_thread_of_process_p): New.
13983 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13984 multiple processes.
13985 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13986 processes. Remove process from process table.
13987 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13988 to multiple processes.
13989 (any_thread_of): New.
13990 (linux_detach): Add `pid' argument, and handle it. Remove process
13991 from processes table.
13992 (linux_join): Add `pid' argument. Handle it.
13993 (linux_thread_alive): Change unsighed long argument to ptid_t.
13994 Consider dead lwps as not being alive.
13995 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13996 threads we're not interested in.
13997 (same_lwp, find_lwp_pid): New.
13998 (linux_wait_for_lwp): Change `pid' argument's type from int to
13999 ptid_t. Adjust.
14000 (linux_wait_for_event): Rename to ...
14001 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14002 from int to ptid_t. Adjust.
14003 (linux_wait_for_event): New.
14004 (linux_wait_1): Add `ptid' argument. Change return type to
14005 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14006 that exit from the process table.
14007 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14008 Adjust.
14009 (mark_lwp_dead): New.
14010 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14011 stopping all threads, mark its main lwp as dead.
14012 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14013 ptids.
14014 (fetch_register, usr_store_inferior_registers)
14015 (regsets_fetch_inferior_registers)
14016 (regsets_store_inferior_registers, linux_read_memory)
14017 (linux_write_memory): Inline `inferior_pid'.
14018 (linux_look_up_symbols): Adjust to use per-process
14019 `thread_db_active'.
14020 (linux_request_interrupt): Adjust to use ptids.
14021 (linux_read_auxv): Inline `inferior_pid'.
14022 (initialize_low): Don't reference thread_db_active.
14023 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14024 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14025 (ps_getpid): Return the pid of the current inferior.
14026 * thread-db.c (proc_handle, thread_agent): Delete.
14027 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14028 per-process data.
14029 (find_one_thread): Change argument type to ptid_t. Adjust to
14030 per-process data.
14031 (maybe_attach_thread): Adjust to per-process data and ptids.
14032 (thread_db_find_new_threads): Ditto.
14033 (thread_db_init): Ditto.
14034 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14035 processes table. Adjust to use ptids.
14036 (spu_kill, spu_detach): Adjust interface. Remove process from
14037 processes table.
14038 (spu_join, spu_thread_alive): Adjust interface.
14039 (spu_wait): Adjust interface. Remove process from processes
14040 table. Adjust to use ptids.
14041 * win32-low.c (current_inferior_tid): Delete.
14042 (current_inferior_ptid): New.
14043 (debug_event_ptid): New.
14044 (thread_rec): Take a ptid. Adjust.
14045 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14046 (child_delete_thread): Ditto.
14047 (do_initial_child_stuff): Add `attached' argument. Add process to
14048 processes table.
14049 (child_fetch_inferior_registers, child_store_inferior_registers):
14050 Adjust.
14051 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14052 (win32_attach): Pass 1 to do_initial_child_stuff.
14053 (win32_kill): Adjust interface. Remove process from processes
14054 table.
14055 (win32_detach): Ditto.
14056 (win32_join): Adjust interface.
14057 (win32_thread_alive): Take a ptid.
14058 (win32_resume): Adjust to use ptids.
14059 (get_child_debug_event): Ditto.
14060 (win32_wait): Adjust interface. Remove exiting process from
14061 processes table.
14062
bd99dc85
PA
140632009-04-01 Pedro Alves <pedro@codesourcery.com>
14064
14065 Non-stop mode support.
14066
14067 * server.h (non_stop): Declare.
14068 (gdb_client_data, handler_func): Declare.
14069 (delete_file_handler, add_file_handler, start_event_loop):
14070 Declare.
14071 (handle_serial_event, handle_target_event, push_event)
14072 (putpkt_notif): Declare.
14073 * target.h (enum resume_kind): New.
14074 (struct thread_resume): Replace `step' field by `kind' field.
14075 (TARGET_WNOHANG): Define.
14076 (struct target_ops) <wait>: Add `options' argument.
14077 <supports_non_stop, async, start_non_stop>: New fields.
14078 (target_supports_non_stop, target_async): New.
14079 (start_non_stop): Declare.
14080 (mywait): Add `options' argument.
14081 * target.c (mywait): Add `options' argument. Print child exit
14082 notifications here.
14083 (start_non_stop): New.
14084 * server.c (non_stop, own_buf, mem_buf): New globals.
14085 (struct vstop_notif): New.
14086 (notif_queue): New global.
14087 (queue_stop_reply, push_event, discard_queued_stop_replies)
14088 (send_next_stop_reply): New.
14089 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14090 interface changes.
14091 (attach_inferior): In non-stop mode, don't wait for the target
14092 here.
14093 (handle_general_set): Handle QNonStop.
14094 (handle_query): When handling qC, return the current general
14095 thread, instead of the first thread of the list.
14096 (handle_query): If the backend supports non-stop mode, include
14097 QNonStop+ in the qSupported query response.
14098 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14099 and non-stop mode.
14100 (handle_v_attach, handle_v_run): Handle non-stop mode.
14101 (handle_v_stopped): New.
14102 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14103 (myresume): Adjust to use resume_kind. Handle non-stop.
14104 (queue_stop_reply_callback): New.
14105 (handle_status): Handle non-stop mode.
14106 (main): Clear non_stop flag on reconnection. Use the event-loop.
14107 Refactor serial protocol handling from here ...
14108 (process_serial_event): ... to this new function. When GDB
14109 selects any thread, select one here. In non-stop mode, wait until
14110 GDB acks all pending events before exiting.
14111 (handle_serial_event, handle_target_event): New.
14112 * remote-utils.c (remote_open): Install remote_desc in the event
14113 loop.
14114 (remote_close): Remove remote_desc from the event loop.
14115 (putpkt_binary): Rename to...
14116 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14117 (putpkt_binary): New as wrapper around putpkt_binary_1.
14118 (putpkt_notif): New.
14119 (prepare_resume_reply): In non-stop mode, don't change the
14120 general_thread.
14121 * event-loop.c: New.
14122 * Makefile.in (OBJ): Add event-loop.o.
14123 (event-loop.o): New rule.
14124
14125 * linux-low.h (pid_of): Moved here.
14126 (lwpid_of): New.
14127 (get_lwp_thread): Use lwpid_of.
14128 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14129 * linux-low.c (pid_of): Delete.
14130 (inferior_pid): Use lwpid_of.
14131 (linux_event_pipe): New.
14132 (target_is_async_p): New.
14133 (delete_lwp): New.
14134 (handle_extended_wait): Use lwpid_of.
14135 (add_lwp): Don't set lwpid field.
14136 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14137 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14138 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14139 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14140 first. Adjust to linux_wait_for_event interface changes. Use
14141 lwpid_of.
14142 (linux_detach): Don't delete the main lwp here.
14143 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14144 (status_pending_p): Don't consider explicitly suspended lwps.
14145 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14146 pointer. Add OPTIONS argument. Change return type to int. Use
14147 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14148 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14149 pointer. Add status pointer argument. Return a pid instead of a
14150 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14151 changes. In non-stop mode, don't switch to a random thread.
14152 (linux_wait): Rename to...
14153 (linux_wait_1): ... this. Add target_options argument, and handle
14154 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14155 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14156 clean exit and signal exit code. Don't stop all threads in
14157 non-stop mode. In all-stop mode, only stop all threads when
14158 reporting a stop to GDB. Handle explicit thread stop requests.
14159 (async_file_flush, async_file_mark): New.
14160 (linux_wait): New.
14161 (send_sigstop): Use lwpid_of.
14162 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14163 interface changes. In non-stop mode, don't switch to a random
14164 thread.
14165 (linux_resume_one_lwp): Use lwpid_of.
14166 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14167 (linux_resume_one_thread): ... this. Handle resume_stop. In
14168 non-stop mode, don't look for pending flag in all threads.
14169 (resume_status_pending_p): Don't consider explicitly suspended
14170 threads.
14171 (my_waitpid): Reimplement. Emulate __WALL.
14172 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14173 Use lwpid_of.
14174 (sigchld_handler, linux_supports_non_stop, linux_async)
14175 (linux_start_non_stop): New.
14176 (linux_target_ops): Register linux_supports_non_stop, linux_async
14177 and linux_start_non_stop.
14178 (initialize_low): Install SIGCHLD handler.
14179 * thread-db.c (thread_db_create_event, find_one_thread)
14180 (thread_db_get_tls_address): Use lwpid_of.
14181 * win32-low.c (win32_detach): Adjust to use resume_kind.
14182 (win32_wait): Add `options' argument.
14183 * spu-low.c (spu_resume): Adjust to use resume_kind.
14184 (spu_wait): Add `options' argument.
14185
5b1c542e
PA
141862009-04-01 Pedro Alves <pedro@codesourcery.com>
14187
14188 Decouple target code from remote protocol.
14189
14190 * target.h (enum target_waitkind): New.
14191 (struct target_waitstatus): New.
14192 (struct target_ops) <wait>: Return an unsigned long. Take a
14193 target_waitstatus pointer instead of a char pointer.
14194 (mywait): Likewise.
14195 * target.c (mywait): Change prototype to return an unsigned long.
14196 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14197 * server.h (thread_from_wait, old_thread_from_wait): Delete
14198 declarations.
14199 (prepare_resume_reply): Change prototype to take a
14200 target_waitstatus.
14201 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14202 (last_status, last_ptid): New.
14203 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14204 pid instead of a signal.
14205 (attach_inferior): Remove "status" and "signal" parameters.
14206 Adjust.
14207 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14208 not as an address.
14209 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14210 (handle_v_requests, myresume): Remove "status" and "signal"
14211 parameters. Adjust.
14212 (handle_status): New.
14213 (main): Delete local `status'. Adjust.
14214 * remote-utils.c: Include target.h.
14215 (prepare_resume_reply): Change prototype to take a
14216 target_waitstatus. Adjust.
14217
14218 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14219 interface.
14220 * spu-low.c (spu_wait): Adjust.
14221 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14222 Delete.
14223 (win32_wait): Adjust.
14224
2bd7c093
PA
142252009-04-01 Pedro Alves <pedro@codesourcery.com>
14226
14227 * target.h (struct thread_resume): Delete leave_stopped member.
14228 (struct target_ops): Add a `n' argument to the `resume' callback.
14229 * server.c (start_inferior): Adjust.
14230 (handle_v_cont, myresume): Adjust.
14231 * linux-low.c (check_removed_breakpoint): Adjust to resume
14232 interface change, and to removed leave_stopped field.
14233 (resume_ptr): Delete.
14234 (struct thread_resume_array): New.
14235 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14236 resume interface change.
14237 (linux_continue_one_thread, linux_queue_one_thread)
14238 (resume_status_pending_p): Check if the resume field is NULL
14239 instead of checking the leave_stopped member.
14240 (linux_resume): Adjust to the target resume interface change.
14241 * spu-low.c (spu_resume): Adjust to the target resume interface
14242 change.
14243 * win32-low.c (win32_detach, win32_resume): Ditto.
14244
c35fafde
PA
142452009-04-01 Pedro Alves <pedro@codesourcery.com>
14246
14247 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14248 flag.
14249 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14250 pending.
14251 (linux_continue_one_thread): Only preserve the stepping flag if
14252 there's a pending breakpoint.
14253
0a59d50b
PA
142542009-03-31 Pedro Alves <pedro@codesourcery.com>
14255
14256 * server.c (main): After the inferior having exited, call
14257 remote_close before exiting gdbserver.
14258
f04c6d38
TJB
142592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14260
14261 Fix size of FPSCR in Power 7 processors.
14262 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14263 (PPC_FEATURE_HAS_DFP): New #define.
14264 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14265 size of the FPSCR.
14266
78e5cee6
PA
142672009-03-23 Pedro Alves <pedro@codesourcery.com>
14268
14269 * server.c (handle_query) Whitespace and formatting.
14270
1b3f6016
PA
142712009-03-22 Pedro Alves <pedro@codesourcery.com>
14272
14273 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14274 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14275 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14276 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14277 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14278 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14279 Makefile.in, configure.ac: Fix whitespace throughout.
14280 * configure: Regenerate.
14281
a07b2135
PA
142822009-03-22 Pedro Alves <pedro@codesourcery.com>
14283
14284 * inferiors.c (find_inferior): Make it safe for the callback
14285 function to delete the currently iterated inferior.
14286
67cc2626
PA
142872009-03-22 Pedro Alves <pedro@codesourcery.com>
14288
14289 * Makefile.in (linuw_low_h): Move higher.
14290 (thread-db.o): Depend on $(linux_low_h).
14291
54a0b537
PA
142922009-03-17 Pedro Alves <pedro@codesourcery.com>
14293
14294 Rename "process" to "lwp" throughout.
14295
14296 * linux-low.c (all_processes): Rename to...
14297 (all_lwps): ... this.
14298 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14299 (add_process): Rename to ...
14300 (add_lwp): ... this. Adjust.
14301 (linux_create_inferior): Adjust.
14302 (linux_attach_lwp): Adjust.
14303 (linux_attach): Adjust.
14304 (linux_kill_one_process): Rename to ...
14305 (linux_kill_one_lwp): ... this. Adjust.
14306 (linux_kill): Adjust.
14307 (linux_detach_one_process): Rename to ...
14308 (linux_detach_one_lwp): ... this. Adjust.
14309 (linux_detach): Adjust.
14310 (check_removed_breakpoint): Adjust.
14311 (status_pending_p): Adjust.
14312 (linux_wait_for_process): Rename to ...
14313 (linux_wait_for_lwp): ... this. Adjust.
14314 (linux_wait_for_event): Adjust.
14315 (send_sigstop): Adjust.
14316 (wait_for_sigstop): Adjust.
14317 (stop_all_processes): Rename to ...
14318 (stop_all_lwps): ... this.
14319 (linux_resume_one_process): Rename to ...
14320 (linux_resume_one_lwp): ... this. Adjust.
14321 (linux_set_resume_request, linux_continue_one_thread)
14322 (linux_queue_one_thread, resume_status_pending_p)
14323 (usr_store_inferior_registers, regsets_store_inferior_registers)
14324 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14325 Adjust.
14326 * linux-low.h (get_process): Rename to ...
14327 (get_lwp): ... this. Adjust.
14328 (get_thread_process): Rename to ...
14329 (get_thread_lwp): ... this. Adjust.
14330 (get_process_thread): Rename to ...
14331 (get_lwp_thread): ... this. Adjust.
14332 (struct process_info): Rename to ...
14333 (struct lwp_info): ... this.
14334 (all_processes): Rename to ...
14335 (all_lwps): ... this.
14336 * proc-service.c (ps_lgetregs): Adjust.
14337 * thread-db.c (thread_db_create_event, find_one_thread)
14338 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14339
0b16c5cf
PA
143402009-03-14 Pedro Alves <pedro@codesourcery.com>
14341
14342 * server.c (handle_query): Handle "qAttached".
14343
32de4b9d
NS
143442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14345
14346 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14347 GPLv3, update license URL.
14348
2aecd87f
DE
143492009-03-01 Doug Evans <dje@google.com>
14350
93efd302 14351 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14352 (server_h): Add gdb_signals.h.
14353 (signals.o): Update.
14354 * server.h (target_signal_from_host,target_signal_to_host_p)
14355 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14356
86b1f9c5
PM
143572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14358
14359 * remote-utils.c (getpkt): Also generate remote-debug
14360 information if noack_mode is set.
14361
4aa995e1
PA
143622009-02-06 Pedro Alves <pedro@codesourcery.com>
14363
14364 * server.c (handle_query): Report qXfer:siginfo:read and
14365 qXfer:siginfo:write as supported and handle them.
14366 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14367 * linux-low.c (linux_xfer_siginfo): New.
14368 (linux_target_ops): Set it.
14369
62709adf
PA
143702009-01-26 Pedro Alves <pedro@codesourcery.com>
14371
14372 * server.c (gdbserver_usage): Mention --remote-debug.
14373 (main): Accept '--remote-debug' switch.
14374
aef93bd7
DE
143752009-01-18 Doug Evans <dje@google.com>
14376
14377 * regcache.c (new_register_cache): No need to check result of xcalloc.
14378 * server.c (handle_search_memory): Back out calls to xmalloc,
14379 result is checked and error is returned to user upon failure.
14380 (handle_query): Ditto. Add more checks for result of malloc.
14381 (handle_v_cont): Check result of malloc, report error back to
14382 user upon failure.
14383 (handle_v_run): Ditto. Call freeargv.
14384 * server.h (freeargv): Declare.
14385 * utils.c (freeargv): New fn.
14386
54363045
DE
143872009-01-15 Doug Evans <dje@google.com>
14388
f626972c
DE
14389 * gdbreplay.c (perror_with_name): Make arg const char *.
14390 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14391 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14392 * utils.c (perror_with_name): Make arg const char *.
54363045 14393
18aae699
PA
143942009-01-14 Pedro Alves <pedro@codesourcery.com>
14395
14396 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14397 when handling a EXIT_PROCESS_DEBUG_EVENT.
14398
ff703abe
JB
143992009-01-06 Joel Brobecker <brobecker@adacore.com>
14400
14401 * gdbreplay.c (gdbreplay_version): Update copyright year.
14402 * server.c (gdbserver_version): Likewise.
14403
f21cc1a2 144042009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14405
14406 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14407 (handle_extended_wait): Improve comment.
0e21c1ec 14408
bca929d3
DE
144092008-12-13 Doug Evans <dje@google.com>
14410
14411 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14412 * server.h (ATTR_MALLOC): New macro.
14413 (xmalloc,xcalloc,xstrdup): Declare.
14414 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14415 * inferiors.c: Ditto.
14416 * linux-low.c: Ditto.
14417 * mem-break.c: Ditto.
14418 * regcache.c: Ditto.
14419 * remote-utils.c: Ditto.
14420 * server.c: Ditto.
14421 * target.c: Ditto.
14422 * win32-low.c: Ditto.
14423
97438e3f
DE
144242008-12-12 Doug Evans <dje@google.com>
14425
896c7fbb
DE
14426 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14427 in debugging printf.
14428
97438e3f
DE
14429 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14430
e3b886f8
DE
144312008-12-09 Doug Evans <dje@google.com>
14432
14433 * linux-low.h (struct process_info): Delete member tid, unused.
14434 * thread-db.c (find_one_thread): Update.
14435 (maybe_attach_thread): Update.
14436
07e059b5
VP
144372008-12-02 Pedro Alves <pedro@codesourcery.com>
14438
889bf7c5
PA
14439 * target.h (struct target_ops): Add qxfer_osdata member.
14440 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14441 and dirent.h.
14442 (linux_qxfer_osdata): New functions.
14443 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14444 callback.
14445 * server.c (handle_query): Handle "qXfer:osdata:read:".
14446 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14447 (buffer_xml_printf): New functions.
14448 * server.h (struct buffer): New.
14449 (buffer_grow_str, buffer_grow_str0): New macros.
14450 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14451 (buffer_xml_printf): Declare.
07e059b5 14452
4cab47ab
DE
144532008-11-24 Doug Evans <dje@google.com>
14454
14455 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14456
f142445f
DJ
144572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * server.c (handle_v_run): Always use the supplied argument list.
14460
d0107bb6 144612008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14462
d0107bb6
BW
14463 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14464 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14465
2c4ad781
TJB
144662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14467
14468 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14469 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14470 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14471 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14472 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14473 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14474 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14475 XML target descriptions.
14476 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14477 when inferior is running on an ISA 2.05 or later processor. Add
14478 special case to return offset for full 64-bit slot of FPSCR when
14479 in 32-bits.
14480
dfb64f85
DJ
144812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14482
14483 * Makefile.in (SFILES, clean): Added sparc64 files.
14484 (reg-sparc64.o, reg-sparc64.c): New.
14485 * configure.srv (sparc*-*-linux*): New configuration.
14486 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14487 syscall arguments for SPARC.
14488 (regsets_store_inferior_registers): Likewise.
14489 * linux-sparc-low.c: New file.
14490
66b6e1dd
DE
144912008-10-21 Doug Evans <dje@google.com>
14492
14493 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14494 (READLINE_DIR,READLINE_DEP): Delete.
14495 (INTERNAL_CFLAGS): Update.
14496 (LINTFLAGS): Update.
14497
9b710a42
PA
144982008-10-10 Pedro Alves <pedro@codesourcery.com>
14499
14500 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14501 whole argv from the last run, not just argv[0].
14502
5822d809
PA
145032008-09-08 Pedro Alves <pedro@codesourcery.com>
14504
14505 * regcache.c (new_register_cache): Return NULL if the register
14506 cache size isn't known yet.
14507 (free_register_cache): Avoid dereferencing a NULL regcache.
14508
74aac56f
DJ
145092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * configure.srv: Merge MIPS and MIPS64.
14512
400b20f5
MR
145132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14514
14515 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14516
677c5bb1
LM
145172008-08-18 Luis Machado <luisgpm@br.ibm.com>
14518
14519 * Makefile.in: Add required vsx dependencies.
14520
14521 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14522 Declare init_registers_powerpc_vsx32l.
14523 Declare init_registers_powerpc_vsx64l.
14524 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14525 (ppc_arch_setup): Check for VSX in hwcap.
14526 (ppc_fill_vsxregset): New function.
14527 (ppc_store_vsxregset): New function.
14528 Add new VSX entry in regset_info target_regsets.
14529
14530 * configure.srv: Add new VSX dependencies.
14531
a6f3e723
SL
145322008-08-12 Pedro Alves <pedro@codesourcery.com>
14533
14534 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14535 (remote_open): Set or clear transport_is_reliable.
14536 (putpkt_binary): Don't expect acks in noack mode.
14537 (getpkt): Don't send ack/nac in noack mode.
14538 * server.c (handle_general_set): Handle QStartNoAckMode.
14539 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14540 qSupported.
14541 (main): Reset noack_mode on every connection.
14542 * server.h (noack_mode): Declare.
14543
a417dc56
RW
145442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14545
14546 * Makefile.in (GDBREPLAY_OBS): New variable.
14547 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14548
3221518c
UW
145492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14550 Daniel Jacobowitz <dan@codesourcery.com>
14551
14552 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14553 (usr_store_inferior_registers): Likewise.
14554 (regsets_store_inferior_registers): Likewise.
14555
ec56be1b
PA
145562008-07-31 Rolf Jansen <rj@surtec.com>
14557 Pedro Alves <pedro@codesourcery.com>
14558
14559 * configure.ac: Check for memmem declaration.
14560 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14561 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14562 (disable_packet_qfThreadInfo): Unconditionally compile.
14563 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14564 * configure, config.in: Regenerate.
14565
2fe5e3ff
DE
145662008-07-28 Doug Kwan <dougkwan@google.com>
14567
14568 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14569 (linux_write_memory): Remove declaration of errno.
14570
836acd6d
UW
145712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14572
14573 * linux-low.c (handle_extended_wait): Do not use "status"
14574 variable uninitialized.
14575
aeba519e
PA
145762008-07-07 Pedro Alves <pedro@codesourcery.com>
14577
14578 * server.c (handle_v_attach): Inhibit reporting dll changes.
14579
db42f210
PA
145802008-06-27 Pedro Alves <pedro@codesourcery.com>
14581
14582 * remote-utils.c (prepare_resume_reply): If requested, don't
14583 output "thread:TID" in the T stop reply.
14584
14585 * server.c (disable_packet_vCont, disable_packet_Tthread)
14586 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14587 (handle_query): If requested, disable support for qC, qfThreadInfo
14588 and qsThreadInfo.
14589 (handle_v_requests): If requested, disable support for vCont.
14590 (gdbserver_show_disableable): New.
14591 (main): Handle --disable-packet and --disable-packet=LIST.
14592
14593 * server.h (disable_packet_vCont, disable_packet_Tthread)
14594 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14595
8e4c5421
CD
145962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14597
14598 * server.c (gdbserver_usage): Mention --version.
14599
6e23a804
DJ
146002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * Makefile.in (gdbreplay.o): New rule.
14603
90aa6a40
JM
146042008-06-06 Joseph Myers <joseph@codesourcery.com>
14605
14606 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14607 message, not gdbserver.
14608
c16158bc 146092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14610 Nathan Sidwell <nathan@codesourcery.com>
14611 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14612
14613 * acinclude.m4: Include ../../config/acx.m4.
14614 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14615 * configure, config.in: Regenerate.
14616 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14617 * server.c (gdbserver_version): Print PKGVERSION.
14618 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14619 (main): Adjust gdbserver_usage calls.
14620 * gdbreplay.c (version, host_name): Add declarations.
14621 (gdbreplay_version, gdbreplay_usage): New.
14622 (main): Accept --version and --help options.
14623
aeb75bf5
DJ
146242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14627 (arm_breakpoint_at): Handle Thumb.
14628 (the_low_target): Add comment.
14629
76b233dd
UW
146302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14631
14632 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14633
08388c79
DE
146342008-05-09 Doug Evans <dje@google.com>
14635
a3c83fae
DE
14636 * server.h (decode_search_memory_packet): Declare.
14637 * remote-utils.c (decode_search_memory_packet): New fn.
14638 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14639 (handle_search_memory): New fn.
14640 (handle_query): Process qSearch:memory packets.
14641
bb9c3d36
UW
146422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14643
14644 * regcache.c (registers_length): Remove.
14645 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14646 full register packet.
14647 * regcache.h (registers_length): Remove prototype.
14648 * server.h (PBUFSIZ): Define to 16384.
14649
7284e1be
UW
146502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14651
14652 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14653 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14654 powerpc-64l.o, and powerpc-altivec64l.o.
14655 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14656 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14657 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14658 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14659 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14660 to srv_xmlfiles.
14661
14662 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14663 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14664 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14665 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14666 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14667 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14668 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14669 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14670 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14671 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14672 (clean): Update.
14673
14674 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14675 (init_registers_powerpc_32l): ... this new prototype.
14676 (init_registers_powerpc_32): Remove, replace by ...
14677 (init_registers_powerpc_altivec32l): ... this new prototype.
14678 (init_registers_powerpc_e500): Remove, replace by ...
14679 (init_registers_powerpc_e500l): ... this new prototype.
14680 (init_registers_ppc64): Remove, replace by ...
14681 (init_registers_powerpc_64l): ... this new prototype.
14682 (init_registers_powerpc_64): Remove, replace by ...
14683 (init_registers_powerpc_altivec64l): ... this new prototype.
14684 (ppc_num_regs): Set to 73.
14685 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14686 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14687 (ppc_cannot_store_register): Handle orig_r3 and trap.
14688 (ppc_arch_setup): Update init_registers_... calls.
14689 (ppc_fill_gregset): Handle orig_r3 and trap.
14690
14691 * inferiors.c (clear_inferiors): Reset current_inferior.
14692
fdc59709
PB
146932008-04-23 Paolo Bonzini <bonzini@gnu.org>
14694
889bf7c5
PA
14695 * acinclude.m4: Add override.m4.
14696 * configure: Regenerate.
fdc59709 14697
c9b2f845
UW
146982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14699
14700 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14701 initial call to init_register_ppc64.
14702
550512b8
UW
147032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14704
43aaf8b6
PA
14705 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14706 single powerpc*-*-linux* case.
550512b8
UW
14707 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14708
b6430ec3
UW
147092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14710
14711 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14712 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14713 from reg_xmlfiles.
14714 * linux-ppc-low.c: Include <elf.h>.
14715 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14716 (ppc_hwcap): New global variable.
14717 (ppc_regmap): Remove __SPE__ #ifdef sections.
14718 (ppc_regmap_e500): New global variable.
14719 (ppc_cannot_store_register): Update __SPE__ special case.
14720 (ppc_get_hwcap): New function.
14721 (ppc_arch_setup): Use it to determine whether inferior supports
14722 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14723 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14724 Do not access registers if target does not support AltiVec.
14725 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14726 Do not access registers if target does not support SPE.
14727 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14728
52fa2412
UW
147292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * linux-low.c (disabled_regsets, num_regsets): New.
14732 (use_regsets_p): Delete.
14733 (linux_wait_for_process): Clear disabled_regsets.
14734 (regsets_fetch_inferior_registers): Check and set it.
14735 (regsets_store_inferior_registers): Likewise.
14736 (linux_fetch_registers, linux_store_registers): Do not use
14737 use_regsets_p.
14738 (initialize_low): Allocate disabled_regsets.
14739
e28b3332
DJ
147402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14741
14742 * Makefile.in (LIBOBJS): New.
14743 (OBS): Use LIBOBJS.
14744 (memmem.o): New rule.
14745 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14746 * configure: Regenerated.
14747
4536995d
UW
147482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14749
14750 * server.c (handle_query): Never return "unsupported" for
14751 qXfer:features:read queries.
14752
221c031f
UW
147532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14754
14755 * server.c (get_features_xml): Fix inverted condition.
14756 (handle_query): Always support qXfer:feature:read.
14757
ccd213ac
DJ
147582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14759
14760 * server.c (wrapper_argv): New.
14761 (start_inferior): Handle wrapper_argv. If set, expect an extra
14762 trap.
14763 (gdbserver_usage): Document --wrapper.
14764 (main): Parse --wrapper.
14765
6fe305f7
UW
147662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14767
14768 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14769 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14770 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14771 (ppc_set_pc): Likewise.
14772 (ppc_arch_setup): New function.
14773 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14774 of collect_register.
889bf7c5 14775 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14776
5b0a002e
UW
147772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14778
14779 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14780 instead of linux-ppc64-low.o.
14781 * linux-ppc64-low.c: Remove file.
14782 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14783 (linux-ppc64-low.o): Remove rule.
14784
14785 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14786 (init_registers_powerpc_64): Likewise.
14787 (ppc_regmap): Conditionally define depending on __powerpc64__.
14788 (ppc_cannot_store_register): Do not special-case "fpscr" when
14789 compiled on __powerpc64__.
14790 (ppc_collect_ptrace_register): New function.
14791 (ppc_supply_ptrace_register): New function.
14792 (ppc_breakpoint): Change type to "unsigned int".
14793 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14794 (the_low_target): Conditionally provide initializers for the
889bf7c5 14795 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14796 collect_ptrace_register and supply_ptrace_register members.
14797
9b4b61c8
UW
147982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14799
14800 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14801 * server.c (gdbserver_xmltarget): Define.
14802 (get_features_xml): Use it to replace "target.xml" and arch_string.
14803
14804 * configure.srv: Remove srv_xmltarget. Add XML files that were
14805 mentioned there to srv_xmlfiles instead. Remove conditional tests
14806 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14807 srv_xmlfiles and srv_regobj to include all possible choices.
14808 * configure.ac (srv_xmltarget): Remove.
14809 (srv_xmlfiles): Do not add "target.xml".
14810 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14811 checks for supplementary target information.
14812 * configure: Regenerate.
14813 * Makefile.in (XML_TARGET): Remove.
14814 (target.xml): Remove rule.
14815 (clean): Do not clean up target.xml.
14816 (.PRECIOUS): Do not mention target.xml.
14817
14818 * target.h (struct target_ops): Remove arch_string member.
14819 * linux-low.c (linux_arch_string): Remove.
14820 (linux_target_ops): Remove arch_string initializer.
14821 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14822 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14823 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14824 * spu-low.c (spu_arch_string): Remove.
14825 (spu_target_ops): Remove arch_string initializer.
14826 * win32-low.c (win32_arch_string): Remove.
14827 (win32_target_ops): Remove arch_string initializer.
14828 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14829 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14830 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14831
ee1a7ae4
UW
148322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14833
14834 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14835 by collect_ptrace_register and supply_ptrace_register hooks.
14836 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14837 instead of checking for the_low_target.left_pad_xfer.
14838 (usr_store_inferior_registers): Use collect_ptrace_register callback
14839 instead of checking for the_low_target.left_pad_xfer.
14840
14841 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14842 (s390_supply_ptrace_register): Likewise.
14843 (s390_fill_gregset): Call s390_collect_ptrace_register.
14844 (the_low_target): Update.
14845
14846 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14847 (ppc_supply_ptrace_register): Likewise.
14848 (the_low_target): Update.
14849
14850 * linux-i386-low.c (the_low_target): Update.
14851 * linux-x86-64-low.c (the_low_target): Update.
14852
d61ddec4
UW
148532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14854
14855 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14856 reg-s390.o and reg-s390x.o.
14857
14858 * linux-low.c (new_inferior): New global variable.
14859 (linux_create_inferior, linux_attach): Set it.
14860 (linux_wait_for_process): Call the_low_target.arch_setup after the
14861 target has stopped for the first time.
14862 (initialize_low): Do not call the_low_target.arch_setup.
14863
14864 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14865 (s390_set_pc): Likewise.
14866 (s390_arch_setup): New function.
14867 (the_low_target): Use s390_arch_setup as arch_setup routine.
14868
14869 * regcache.c (realloc_register_cache): New function.
14870 (set_register_cache): Call it for each existing regcache.
14871
d05b4ac3
UW
148722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14873
14874 * server.h (init_registers): Remove prototype.
14875
14876 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14877 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14878 instead of init_registers ().
14879 * linux-arm-low.c (init_registers_arm): Add prototype.
14880 (init_registers_arm_with_iwmmxt): Likewise.
14881 (the_low_target): Add initializer for arch_setup field.
14882 * linux-cris-low.c (init_registers_cris): Add prototype.
14883 (the_low_target): Add initializer for arch_setup field.
14884 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14885 (the_low_target): Add initializer for arch_setup field.
14886 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14887 (the_low_target): Add initializer for arch_setup field.
14888 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14889 (the_low_target): Add initializer for arch_setup field.
14890 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14891 (the_low_target): Add initializer for arch_setup field.
14892 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14893 (the_low_target): Add initializer for arch_setup field.
14894 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14895 (init_registers_mips64_linux): Likewise.
14896 (the_low_target): Add initializer for arch_setup field.
14897 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14898 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14899 (the_low_target): Add initializer for arch_setup field.
14900 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14901 (init_registers_powerpc_64): Likewise.
14902 (the_low_target): Add initializer for arch_setup field.
14903 * linux-s390-low.c (init_registers_s390): Add prototype.
14904 (init_registers_s390x): Likewise.
14905 (the_low_target): Add initializer for arch_setup field.
14906 * linux-sh-low.c (init_registers_sh): Add prototype.
14907 (the_low_target): Add initializer for arch_setup field.
14908 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14909 (the_low_target): Add initializer for arch_setup field.
14910 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14911 (the_low_target): Add initializer for arch_setup field.
14912
14913 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14914 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14915 instead of init_registers ().
14916 * win32-arm-low.c (init_registers_arm): Add prototype.
14917 (the_low_target): Add initializer for arch_setup field.
14918 * win32-i386-low.c (init_registers_i386): Add prototype.
14919 (the_low_target): Add initializer for arch_setup field.
14920
14921 * spu-low.c (init_registers_spu): Add prototype.
14922 (initialize_low): Call initialie_registers_spu () instead of
14923 initialize_registers ().
14924
fd96d250
PA
149252008-02-19 Pedro Alves <pedro@codesourcery.com>
14926
14927 * server.c (handle_v_requests): When handling the vRun and vAttach
14928 packets, if already debugging a process, don't kill it. Return an
14929 error instead.
14930
d41b6bb4
DJ
149312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14932
14933 * server.c (handle_query): Correct length check.
14934
5ac588cf
PA
149352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14936
14937 * win32-low.c (do_initial_child_stuff): Add process handle
14938 parameter. Set current_process_handle and current_process_id from the
14939 parameters. Clear globals.
14940 (win32_create_inferior): Don't set current_process_handle and
14941 current_process_id here. Instead pass them on the call to
14942 do_initial_child_stuff.
14943 (win32_attach): Likewise.
14944 (win32_clear_inferiors): New.
14945 (win32_kill): Don't close the current process handle or the
14946 current thread handle here. Instead call win32_clear_inferiors.
14947 (win32_detach): Don't open a new handle to the process. Call
14948 win32_clear_inferiors.
14949 (win32_join): Don't rely on current_process_handle; open a new
14950 handle using the process id.
14951 (win32_wait): Call win32_clear_inferiors when the inferior process
14952 has exited.
14953
ecd7ecbc
DJ
149542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * server.c (monitor_show_help): Add "exit".
14957
1525d545
MG
149582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14959
ecd7ecbc 14960 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14961 (clean): Add reg-xtensa.c.
14962 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14963 * configure.srv (xtensa*-*-linux*) New target.
14964 * linux-xtensa-low.c: New.
14965 * xtensa-xtregs.c: New.
1525d545 14966
59a016f0
PA
149672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14968
14969 * hostio.c: Don't include errno.h.
14970 (errno_to_fileio_errno): Move to hostio-errno.
14971 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14972 error number outputting to the target->hostio_last_error callback.
14973 (hostio_packet_error): Use FILEIO_EINVAL directly.
14974 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14975 calls to hostio_error.
14976 * hostio-errno.c: New.
14977 * server.h (hostio_last_error_from_errno): Declare.
14978 * target.h (target_ops): Add hostio_last_error member.
14979 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14980 as hostio_last_error handler.
889bf7c5 14981 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14982 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14983 (wince_hostio_last_error): New functions.
14984 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14985 as hostio_last_error handler.
14986 (win32_target_ops) [!_WIN32_WCE]: Register
14987 hostio_last_error_from_errno as hostio_last_error handler.
14988 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14989 (hostio-errno.o): New rule.
14990 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14991 * configure.srv (srv_hostio_err_objs): New variable. Default to
14992 hostio-errno.o.
14993 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14994 * configure: Regenerate.
14995
2d717e4f
DJ
149962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14997
14998 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14999 (linux_kill, linux_detach): Clean up the process list.
15000 * remote-utils.c (remote_open): Improve port number parsing.
15001 (putpkt_binary, input_interrupt): Only send interrupts if the target
15002 is running.
15003 * server.c (extended_protocol): Make static.
15004 (attached): Define earlier.
15005 (exit_requested, response_needed, program_argv): New variables.
15006 (target_running): New.
15007 (start_inferior): Clear attached here.
15008 (attach_inferior): Set attached here.
15009 (require_running): Define.
15010 (handle_query): Use require_running and target_running. Implement
15011 "monitor exit".
15012 (handle_v_attach, handle_v_run): New.
15013 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15014 (gdbserver_usage): Update.
15015 (main): Redo argument parsing. Handle --debug and --multi. Handle
15016 --attach along with other options or after the port. Save
15017 program_argv. Support no initial program. Resynchronize
15018 communication with GDB after an error. Handle "monitor exit".
15019 Use require_running and target_running. Always allow the extended
15020 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15021 restart in extended mode.
15022 * README: Refer to the GDB manual. Update --attach usage.
15023
7407e2de
AS
150242007-12-20 Andreas Schwab <schwab@suse.de>
15025
15026 * linux-low.c (STACK_SIZE): Define.
15027 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15028 (linux_test_for_tracefork): Likewise.
15029
b65d95c5
DJ
150302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15031
15032 * linux-low.c (linux_wait_for_event): Update messages. Do not
15033 reinsert auto-delete breakpoints.
15034 * mem-break.c (struct breakpoint): Change return type of handler to
15035 int.
15036 (set_breakpoint_at): Update handler type.
15037 (reinsert_breakpoint_handler): Return 1 instead of calling
15038 delete_breakpoint.
15039 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15040 setting a new one.
15041 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15042 * mem-break.h (set_breakpoint_at): Update handler type.
15043 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15044 * win32-low.c (auto_delete_breakpoint): New.
15045 (get_child_debug_event): Use it.
15046
4e799345
DJ
150472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15048
15049 * configure.ac: Check for pread and pwrite.
15050 * hostio.c (handle_pread): Fall back to lseek and read.
15051 (handle_pwrite): Fall back to lseek and write.
15052 * config.in, configure: Regenerated.
15053
27524b67
DJ
150542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15055
15056 * server.c (myresume): Add own_buf argument.
15057 (main): Update calls.
15058
a20d5e98
DJ
150592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15060
15061 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15062 * remote-utils.c (remote_open): Do not call disable_async_io.
15063 (block_async_io): Delete.
15064 (unblock_async_io): Make static.
15065 (initialize_async_io): New.
15066 * server.c (handle_v_cont): Handle async I/O here.
15067 (myresume): Likewise. Move other common resume tasks here...
15068 (main): ... from here. Call initialize_async_io. Disable async
15069 I/O before the main loop.
15070 * server.h (initialize_async_io): Declare.
15071 (block_async_io, unblock_async_io): Delete prototypes.
15072 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15073
b79d787e
DJ
150742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15075
15076 * remote-utils.c (readchar): Allow binary data in received messages.
15077
d97903b2
PA
150782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * win32-low.c (attaching): New global.
15081 (win32_create_inferior): Clear the `attaching' global.
15082 (win32_attach): Set the `attaching' global.
15083 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15084 attaching. Only set a breakpoint at the entry point if not
15085 attaching.
15086
311de423
PA
150872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15088
15089 * server.c (main): Don't report dll events on the initial
15090 connection on attaches.
15091
6c2d16d2
PA
150922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15093
15094 * server.c (main): Relax numerical bases supported for the pid of
15095 the --attach command line argument.
15096
5ca906e6
PA
150972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15098
15099 * win32-low.c (win32_attach): Call OpenProcess before
15100 DebugActiveProcess, not after. Add last error output to error
15101 call.
15102
9c6c8194
PA
151032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15104
15105 * win32-low.c (win32_get_thread_context)
15106 (win32_set_thread_context): New functions.
15107 (thread_rec): Use win32_get_thread_context.
15108 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15109 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15110 field.
15111
4d5d1aaa
PA
151122007-12-03 Leo Zayas
15113 Pedro Alves <pedro_alves@portugalmail.pt>
15114
15115 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15116 global variables.
15117 (child_add_thread): Minor cleanup.
15118 (child_continue): Resume artificially suspended threads before
15119 calling ContinueDebugEvent.
15120 (suspend_one_thread): New.
15121 (fake_breakpoint_event): New.
15122 (get_child_debug_event): Change return type to int. Check here if
15123 gdb sent an interrupt request. If a soft interrupt was requested,
15124 fake a breakpoint event. Return 0 if there is no event to handle,
15125 and 1 otherwise.
15126 (win32_wait): Don't check here if gdb sent an interrupt request.
15127 Ensure there is a valid event to handle.
15128 (win32_request_interrupt): Add soft interruption method as last
15129 resort.
15130
c436e841
PA
151312007-12-03 Leo Zayas
15132 Pedro Alves <pedro_alves@portugalmail.pt>
15133
15134 * win32-low.h (win32_thread_info): Add descriptions to the
15135 structure members. Replace `suspend_count' counter by a
15136 `suspended' flag.
15137 * win32-low.c (thread_rec): Update condition of when to get the
15138 context from the inferior. Rely on ContextFlags being set if it
15139 has already been retrieved. Only suspend the inferior thread if
15140 we haven't already. Warn if that fails.
15141 (continue_one_thread): s/suspend_count/suspended/. Only call
15142 ResumeThread once. Warn if that fails.
15143
e7b5fa67
PA
151442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15145
15146 * win32-low.c (win32_wait): Don't read from the inferior when it
15147 has already exited.
15148
a385171d
PA
151492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15150
15151 * Makefile.in (win32_low_h): New variable.
15152 (win32-low.o): Add dependency on $(win32_low_h).
15153 (win32-arm-low.o, win32-i386-low.o): New rules.
15154
f80c84b3
DJ
151552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15156
15157 * hostio.c: Correct copyright year.
15158
a6b151f1
DJ
151592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15160
15161 * Makefile.in (OBS): Add hostio.o.
15162 (hostio.o): New rule.
15163 * server.h (handle_vFile): Declare.
15164 * hostio.c: New file.
15165 * server.c (handle_v_requests): Take packet_len and new_packet_len
15166 for binary packets. Call handle_vFile.
15167 (main): Update call to handle_v_requests.
15168
f9387fc3
DJ
151692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * linux-low.c: Include <sched.h>.
15172
51c2684e
DJ
151732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15174
15175 * linux-low.c (linux_tracefork_grandchild): New.
15176 (linux_tracefork_child): Use clone.
15177 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15178
75f83163
JB
151792007-10-31 Joel Brobecker <brobecker@adacore.com>
15180
15181 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15182
da5898ce
DJ
151832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15186
24a09b5f
DJ
151872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15188
15189 * inferiors.c (change_inferior_id): Delete.
15190 (add_pid_to_list, pull_pid_from_list): New.
15191 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15192 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15193 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15194 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15195 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15196 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15197 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15198 (using_threads): Always set to 1.
15199 (handle_extended_wait): New.
15200 (add_process): Do not set TID.
15201 (linux_create_inferior): Set must_set_ptrace_flags.
15202 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15203 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15204 (linux_thread_alive): Rename TID argument to LWPID.
15205 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15206 (linux_wait_for_event): Do not use TID or check using_threads. Update
15207 call to dead_thread_notify. Call handle_extended_wait.
15208 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15209 (send_sigstop): Delete sigstop_sent.
15210 (wait_for_sigstop): Avoid TID.
15211 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15212 (linux_test_for_tracefork): New.
15213 (linux_lookup_signals): Use thread_db_active and
15214 linux_supports_tracefork_flag.
15215 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15216 * linux-low.h (get_process_thread): Avoid TID.
15217 (struct process_ifo): Move thread_known and tid to the end. Remove
15218 sigstop_sent.
15219 (linux_attach_lwp, thread_db_init): Update prototypes.
15220 * server.h (change_inferior_id): Delete prototype.
15221 (add_pid_to_list, pull_pid_from_list): New prototypes.
15222 * thread-db.c (thread_db_use_events): New.
15223 (find_first_thread): Rename to...
15224 (find_one_thread): ...this. Update callers and messages. Do not
15225 call fatal. Check thread_db_use_events. Do not call
15226 change_inferior_id or new_thread_notify.
15227 (maybe_attach_thread): Update. Do not call new_thread_notify.
15228 (thread_db_init): Set thread_db_use_events. Check use_events.
15229 * utils.c (fatal, warning): Correct message prefix.
15230
30ed0a8f
DJ
152312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * Makefile.in (clean): Remove new files.
15234 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15235 (powerpc-64.o, powerpc-64.c): New rules.
15236 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15237 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15238 with SPE.
15239 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15240 SPE targets.
15241 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15242 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15243 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15244 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15245 (target_regsets): Add AltiVec and SPE register sets.
15246 * configure.ac: Check for AltiVec and SPE.
15247 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15248 (ppc_fill_vrregset, ppc_store_vrregset): New.
15249 (target_regsets): Add AltiVec register set.
15250 * configure: Regenerated.
15251
fd462a61
DJ
152522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15253
15254 * linux-low.c (O_LARGEFILE): Define.
15255 (linux_read_memory): Use /proc/PID/mem.
15256 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15257 * configure, config.in: Regenerated.
15258
69f223ed
DJ
152592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15260
15261 * linux-low.c (linux_wait_for_event): Do not pass signals while
15262 single-stepping.
15263
aec18585
PA
152642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15265
15266 * win32-low.c (create_process): New.
15267 (win32_create_inferior): Use create_process instead of
15268 CreateProcess. If create_process failed retry appending an ".exe"
15269 suffix. Store the GetLastError result immediatelly after
15270 create_process calls and use it on the call to error.
15271
34d86ddd
PA
152722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15273
15274 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15275
5a0e3bd0
JB
152762007-08-23 Joel Brobecker <brobecker@adacore.com>
15277
15278 * configure.ac: Switch license to GPLv3.
15279
f88c79e6
MS
152802007-08-01 Michael Snyder <msnyder@access-company.com>
15281
15282 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15283
6b3d9b83
PA
152842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15285
15286 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15287 typedef.
15288 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15289 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15290 CloseToolhelp32Snapshot.
15291 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15292 CloseToolhelp32Snapshot.
15293
c588c53c
MS
152942007-07-27 Michael Snyder <michael.snyder@access-company.com>
15295
15296 * server.c (main): Check for inferior exit before main loop.
15297
aa0403d9
PA
152982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15299
15300 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15301 instead of on tmp_desc.
15302
255e7678
DJ
153032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15304 Daniel Jacobowitz <dan@codesourcery.com>
15305
15306 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15307 (add_thread): Minor cleanups.
15308 (clear_inferiors): Move lower in the file. Clear the DLL
15309 list.
15310 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15311 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15312 (xml_escape_text): New.
15313 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15314 for qSupported.
15315 (handle_v_cont): Report errors.
15316 (gdbserver_version): Update.
15317 (main): Correct size of own_buf. Do not report initial DLL events.
15318 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15319 (unloaded_dll, xml_escape_text): New.
15320 * win32-low.c (enum target_waitkind): Update comments.
15321 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15322 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15323 (win32_EnumProcessModules, win32_GetModuleInformation)
15324 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15325 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15326 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15327 (win32_Module32First, win32_Module32Next, load_toolhelp)
15328 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15329 (get_child_debug_event): Handle DLL events.
15330 (win32_wait): Likewise.
15331
0d37add9
DJ
153322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15333
15334 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15335 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15336
45e2715e
PA
153372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15338
15339 * win32-low.c (handle_output_debug_string): Ignore event if not
15340 waiting.
15341
c5674cf1
PA
153422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15343
15344 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15345
2bbe3cc1
DJ
153462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15347
15348 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15349
ae13219e
DJ
153502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15351
15352 * inferiors.c (change_inferior_id): Add comment.
15353 * linux-low.c (check_removed_breakpoint): Add an early
15354 prototype. Improve debug output.
15355 (linux_attach): Doc update.
15356 (linux_detach_one_process, linux_detach): Clean up before releasing
15357 each process.
15358 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15359 * linux-low.h (struct process_info): Doc improvement.
15360 * mem-break.c (delete_all_breakpoints): New.
15361 * mem-break.h (delete_all_breakpoints): New prototype.
15362 * thread-db.c (find_first_thread): New.
15363 (thread_db_create_event): Call it instead of
15364 thread_db_find_new_threads. Clean up unused variables.
15365 (maybe_attach_thread): Remove first thread handling.
15366 (thread_db_find_new_threads): Use find_first_thread.
15367 (thread_db_get_tls_address): Likewise.
15368
4105de34
DJ
153692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15370
15371 * thread-db.c (thread_db_find_new_threads): Add prototype.
15372 (thread_db_create_event): Check for the main thread before adding
15373 a new thread.
15374 (maybe_attach_thread): Only enable event reporting if TID == 0.
15375 (thread_db_get_tls_address): Check for new threads.
15376
2b876972
DJ
153772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15378
15379 * linux-low.c (linux_create_inferior): Try execv before execvp.
15380 * spu-low.c (spu_create_inferior): Likewise.
15381
7a245884
DJ
153822007-06-13 Mike Frysinger <vapier@gentoo.org>
15383
15384 * linux-low.c (linux_create_inferior): Change execv to execvp.
15385 * spu-low.c (spu_create_inferior): Likewies.
15386
117ce543
DJ
153872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * Makefile.in (clean): Clean new files instead of deleted ones.
15390 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15391 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15392 rules.
15393 * configure.srv: Specify XML files and new regformats for MIPS and
15394 MIPS64 GNU/Linux.
15395 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15396 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15397 an entry for the restart register.
15398 (mips_cannot_fetch_register, mips_cannot_store_register)
15399 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15400 register names to match the XML descriptions.
15401 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15402 restart register instead of $0.
15403
0e7f50da
UW
154042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15405 Markus Deuling <deuling@de.ibm.com>
15406
15407 * remote-utils.c (decode_xfer_write): New function.
15408 * server.h (decode_xfer_write): Add prototype.
15409 * server.c (handle_query): Add PACKET_LEN argument. Support
15410 qXfer:spu:read and qXfer:spu:write packets.
15411 (main): Pass packet_len to handle_query.
15412 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15413 * target.h (target_ops): Add qxfer_spu.
15414
374c1d38
UW
154152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15416
15417 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15418 accessing non-seekable spufs files.
15419
bb63802a
UW
154202007-05-16 Markus Deuling <deuling@de.ibm.com>
15421
889bf7c5 15422 * server.c (handle_query): Add reply for qC packet.
bb63802a 15423
7390519e
PA
154242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15425 Leo Zayas <lerele@champenstudios@com>
15426
15427 * server.h (check_remote_input_interrupt_request): New function.
15428 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15429 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15430 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15431 (check_remote_input_interrupt_request): New function.
15432 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15433 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15434 winapi_GenerateConsoleCtrlEvent): New typedefs.
15435 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15436 to 250 ms.
15437 (win32_wait): Check for remote interrupt request
15438 with check_remote_input_interrupt_request.
15439 (win32_request_interrupt): New function.
15440 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15441
34b34921
PA
154422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15443
15444 * win32-low.c (debug_registers_changed,
15445 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15446 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15447 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15448 (thread_rec): Get context using the low target.
15449 (child_add_thread): Call thread_added on the low target,
15450 which does the same thing.
15451 (regptr): Delete.
15452 (do_initial_child_stuff): Remove debug registers references.
15453 Set context using the low target. Resume threads after
15454 setting the contexts.
15455 (child_continue): Remove dead variable. Remove debug
15456 registers references.
15457 (child_fetch_inferior_registers): Go through the low target.
15458 (do_child_store_inferior_registers): Remove.
15459 (child_store_inferior_registers): Go through the low target.
15460 (win32_resume): Remove debug registers references.
15461 Set context using the low target.
15462 (handle_exception): Change return type to void. Don't record
15463 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15464 first chance exception.
889bf7c5 15465 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15466 goto loop. Always return after waiting for debug event.
15467 (win32_wait): Convert to switch statement. Handle spurious
15468 events.
15469
15470 * win32-i386-low.c (debug_registers_changed,
15471 debug_registers_used): New.
15472 (initial_stuff): Rename to ...
15473 (i386_initial_stuff): ... this. Clear debug registers
15474 state variables.
15475 (store_debug_registers): Delete.
15476 (i386_get_thread_context): New.
15477 (load_debug_registers): Delete.
15478 (i386_set_thread_context): New.
15479 (i386_thread_added): New.
15480 (single_step): Rename to ...
15481 (i386_single_step): ... this.
15482 (do_fetch_inferior_registers): Rename to ...
15483 (i386_fetch_inferior_register): ... this.
15484 (i386_store_inferior_register): New.
15485 (the_low_target): Adapt to new interface.
15486
15487 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15488 (arm_get_thread_context): New.
15489 (arm_set_thread_context): New.
15490 (regptr): New.
15491 (do_fetch_inferior_registers): Rename to ...
15492 (arm_fetch_inferior_register): ... this.
15493 (arm_store_inferior_register): New.
15494 (arm_wince_breakpoint): Reimplement as unsigned long.
15495 (arm_wince_breakpoint_len): Define.
15496 (the_low_target): Adapt to new interface.
15497
15498 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15499 load_debug_registers. Add get_thread_context, set_thread_context,
15500 thread_added and store_inferior_register. Rename
15501 fetch_inferior_registers to fetch_inferior_register.
15502 (regptr): Remove declaration.
15503
dd6953e1
PA
155042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15505
15506 * linux-low.c (linux_detach): Change return type to int. Return 0.
15507 * spu-low.c (spu_detach): Likewise.
15508
444d6139
PA
155092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15510
15511 * target.h (target_ops): Change return type of detach to int.
15512 Add join.
15513 (join_inferior): New.
15514 * server.c (main): Don't skip detach support on mingw32.
15515 If the inferior doesn't support detaching return error.
15516 Call join_inferior instead of using waitpid.
15517 * linux-low.c (linux_join): New.
15518 (linux_target_op): Add linux_join.
15519 * spu-low.c (spu_join): New.
15520 (spu_target_ops): Add spu_join.
15521 * win32-low.c (win32_detach): Adapt to new interface.
15522 Reopen current_process_handle before detaching. Issue a child
15523 resume before detaching.
15524 (win32_join): New.
15525 (win32_target_op): Add win32_join.
15526
1d5315fe
PA
155272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15528
15529 * win32-low.c (win32-attach): Fix return value.
15530 * target.h (target_ops): Describe ATTACH return values.
15531
bf914831
PA
155322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15533
15534 * win32-low.c (GETPROCADDRESS): Define.
15535 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15536 (winapi_DebugSetProcessKillOnExit): Likewise.
15537 (win32_create_inferior): Force usage of ansi CreateProcessA.
15538 (win32_attach): Use GETPROCADDRESS.
15539 (win32_detach): Likewise.
15540
f72f3e60
PA
155412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15542
15543 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15544
ed50f18f
PA
155452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15546
15547 * win32-low.c: Commit leftover changes from 2007-03-29.
15548
0c2ead7e
DJ
155492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15550
15551 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15552 fields short instead of int. Add explicit padding.
15553 (i387_cache_to_fsave): Remove unnecessary casts.
15554 (i387_fsave_to_cache): Doc fix.
15555 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15556
73725ff3
DJ
155572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15558
15559 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15560 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15561
d99f33d8
PA
155622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15563
15564 * configure.srv (arm*-*-mingw32ce*): Move near the other
15565 arm targets.
15566
68070c10
PA
155672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15568
2482afc6 15569 * configure.ac: Add errno checking.
68070c10
PA
15570 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15571 sys/file.h and malloc.h.
15572 (AC_CHECK_DECLS): Add perror.
15573 (srv_mingwce): Handle.
2482afc6 15574 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15575 win32-i386-low.o to srv_tgtobj.
15576 (i[34567]86-*-mingw*): Likewise.
15577 (arm*-*-mingw32ce*): Add case.
15578 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15579 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15580 [__MINGW32CE__] (strerror): New function.
15581 [__MINGW32CE__] (errno): Define to GetLastError.
15582 [__MINGW32CE__] (COUNTOF): New macro.
15583 (remote_open): Remove extra close call.
15584 * mem-break.c (delete_breakpoint_at): New function.
15585 * mem-break.h (delete_breakpoint_at): Declare.
15586 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15587 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15588 [USE_WIN32API] (read, write): Add char* casts.
15589 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15590 * server.h: Include wincecompat.h on Windows CE.
15591 [HAVE_ERRNO_H]: Check.
15592 (perror): Declare if not declared.
15593 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15594 (perror_with_name): Remove errno declaration.
15595 * wincecompat.h: New.
15596 * wincecompat.c: New.
15597 * win32-low.h: New.
15598 * win32-arm-low.c: New.
15599 * win32-i386-low.c: New.
15600 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15601 (OUTMSG2): Make it safe.
15602 (_T): New macro.
15603 (COUNTOF): New macro.
15604 (NUM_REGS): Get it from the low target.
15605 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15606 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15607 (thread_rec): Let low target handle debug registers.
15608 (child_add_thread): Likewise.
15609 (child_init_thread_list): Likewise.
15610 (continue_one_thread): Likewise.
15611 (regptr): New.
15612 (do_child_fetch_inferior_registers): Move to ...
15613 * win32-i386-low.c: ... here, and rename to ...
15614 (do_fetch_inferior_registers): ... this.
889bf7c5 15615 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15616 Go through the low target.
15617 (do_child_store_inferior_registers): Use regptr.
15618 (strwinerror): New function.
15619 (win32_create_inferior): Handle Windows CE.
15620 Use strwinerror instead of strerror on Windows error
15621 codes. Add program to the error output.
15622 Don't close the main thread handle on Windows CE.
15623 (win32_attach): Use coredll.dll on Windows CE.
15624 (win32_kill): Close current process and current
15625 thread handles.
15626 (win32_detach): Use coredll.dll on Windows CE.
15627 (win32_resume): Let low target handle debug registers, and
15628 step request.
15629 (handle_exception): Add/Remove initial breakpoint. Avoid
15630 non-existant WSTOPSIG on Windows CE.
15631 (win32_read_inferior_memory): Cast to remove warning.
15632 (win32_arch_string): Go through the low target.
15633 (initialize_low): Call set_breakpoint_data with the low
15634 target's breakpoint.
15635 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15636 FOP_REGNUM, mappings): Move to ...
15637 * win32-i386-low.c: ... here.
15638 * win32-low.c (win32_thread_info): Move to ...
15639 * win32-low.h: ... here.
15640 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15641 win32-arm-low.c and wincecompat.c.
15642 (all:): Add $EXEEXT.
15643 (install-only:): Likewise.
15644 (gdbserver:): Likewise.
15645 (gdbreplay:): Likewise.
15646 * config.in: Regenerate.
15647 * configure: Regenerate.
15648
41093d81
PA
156492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15650
15651 * win32-low.c: Rename typedef thread_info to
15652 win32_thread_info throughout.
15653
544afa54
PA
156542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15655
15656 * win32-i386-low.c: Rename to ...
15657 * win32-low.c: ... this.
15658 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15659 * Makefile.in: Likewise.
15660
bce7165d
PA
156612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15662
15663 * remote-utils.c (monitor_output): Constify msg parameter.
15664 * server.h (monitor_output): Likewise.
15665 * win32-i386-low.c (handle_output_debug_string): New.
15666 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15667 handle_output_debug_string.
15668 (get_child_debug_event): Likewise.
15669
506c7aa0
DJ
156702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15671
15672 * server.c (main): Correct strtoul check.
15673
42c81e2a
DJ
156742007-03-27 Jon Ringle <jon@ringle.org>
15675
15676 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15677
9453113a
DJ
156782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15679
15680 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15681
64a69107
DJ
156822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15683
15684 * terminal.h: Check HAVE_SGTTY_H.
15685
156862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15687
15688 * remote-utils.c (remote_open): Print out the assigned port number.
15689
c74d0ad8
DJ
156902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * remote-utils.c (monitor_output): New function.
15693 * server.c (debug_threads): Define here.
15694 (monitor_show_help): New function.
15695 (handle_query): Handle qRcmd.
15696 (main): Do not handle 'd' packet.
15697 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15698 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15699 of debug_threads.
15700
de7c3b4a
PA
157012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15702
15703 * Makefile.in (EXEEXT): New.
15704 (clean): Use $(EXEEXT).
15705
ef57601b
PA
157062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15707
15708 * target.h (target_ops): Rename send_signal to request_interrupt,
15709 and remove enum target_signal parameter.
15710 * linux-low.c (linux_request_interrupt): Rename from
15711 linux_send_signal, and always send SIGINT.
15712 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15713 and always send SIGINT.
15714 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15715 of send_signal.
15716 (input_interrupt): Likewise.
15717
820f2bda
PA
157182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15719
15720 * server.c (get_features_xml): Check if target implemented
15721 arch_string.
15722 * win32-i386-low.c (win32_arch_string): New.
15723 (win32_target_ops): Add win32_arch_string as arch_string member.
15724
ab39bf24
UW
157252007-02-22 Markus Deuling <deuling@de.ibm.com>
15726
15727 * spu-low.c (spu_arch_string): New.
15728 (spu_target_ops): Add spu_arch_string.
15729
61ff6e04
DJ
157302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15733 * configure.ac: Do not check for terminal.h.
15734 * configure, config.in: Regenerated.
15735
fb1e4ffc
DJ
157362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15737
15738 * Makefile.in (OBS): Add $(XML_BUILTIN).
15739 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15740 (clean): Update.
15741 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15742 (arm-with-iwmmxt.c): New.
15743 * config.in, configure: Regenerate.
15744 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15745 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15746 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15747 (arm*-*-linux*): Add iWMMXt and regset support.
15748 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15749 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15750 (arm_store_wmmxregset, target_regsets): New.
15751 * server.c (get_features_xml): Take annex argument. Check builtin
15752 XML documents.
15753 (handle_query): Handle multiple annexes.
15754
0f48aa01
DJ
157552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * remote-utils.c [USE_WIN32API] (read, write): Define.
15758 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15759 write.
15760
23181151
DJ
157612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15762
15763 * linux-i386-low.c (the_low_target): Set arch_string.
15764 * linux-x86-64-low.c (the_low_target): Likewise.
15765 * linux-low.c (linux_arch_string): New.
15766 (linux_target_ops): Add it.
15767 * linux-low.h (struct linux_target_ops): Add arch_string.
15768 * server.c (write_qxfer_response): Use const void * for DATA.
15769 (get_features_xml): New.
15770 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15771 * target.h (struct target_ops): Add arch_string method.
15772
9d606399
DJ
157732007-01-03 Denis Pilat <denis.pilat@st.com>
15774 Daniel Jacobowitz <dan@codesourcery.com>
15775
15776 * linux-low.c (linux_kill): Handle being called with no threads.
15777 * win32-i386-low.c (win32_kill): Likewise.
15778 (get_child_debug_event): Clear current_process_handle.
15779
157802006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15781 Daniel Jacobowitz <dan@codesourcery.com>
15782
15783 * remote-utils.c (remote_open): Check the type of specified
15784 serial port devices before opening them.
15785 * server.c (main): Kill the inferior if an error occurs during
15786 the first remote_open.
15787
a5e13d24
DJ
157882006-12-05 Markus Deuling <deuling@de.ibm.com>
15789
15790 * README: Update supported targets.
15791
186947f7
DJ
157922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * Makefile.in (clean): Remove reg-mips64.c.
15795 (reg-mips64.c, reg-mips64.o): New rules.
15796 * configure.srv: Handle mips64. Include regset support for mips.
15797 * linux-mips-low.c (union mips_register): New.
15798 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15799 (mips_breakpoint, mips_breakpoint_at): Use int.
15800 (mips_collect_register, mips_supply_register)
15801 (mips_collect_register_32bit, mips_supply_register_32bit)
15802 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15803 (mips_store_fpregset, target_regsets): New.
15804 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15805
a13e2c95
UW
158062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15807
15808 * configure.srv: Add target "spu*-*-*".
15809 * Makefile.in (clean): Remove reg-spu.c.
15810 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15811 * spu-low.c: New file.
15812
cb7283db
DJ
158132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15814
15815 * configure.ac: Correct td_thr_tls_get_addr test.
15816 * configure: Regenerated.
15817
89be2091
DJ
158182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * linux-low.c (linux_wait_for_event): Reformat. Use the
15821 pass_signals array.
15822 * remote-utils.c (decode_address_to_semicolon): New.
15823 * server.c (pass_signals, handle_general_set): New.
15824 (handle_query): Mention QPassSignals for qSupported.
15825 (main): Call handle_general_set.
15826 * server.h (pass_signals, decode_address_to_semicolon): New.
15827
000ef4f0
DJ
158282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15829
15830 * server.c (handle_query): Correct error handling for read_auxv.
15831
b7149293
UW
158322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15833
15834 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15835 and srv_linux_thread_db to yes.
15836 * linux-s390-low.c (s390_fill_gregset): New function.
15837 (target_regsets): Define data structure.
15838
dae5f5cf
DJ
158392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15840
15841 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15842 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15843 * config.in, configure: Regenerated.
15844 * inferiors.c (gdb_id_to_thread): New function.
15845 (gdb_id_to_thread_id): Use it.
15846 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15847 * linux-low.h (struct process_info): Add th member.
15848 (thread_db_get_tls_address): New prototype.
15849 * remote-utils.c (decode_address): Make non-static.
15850 * server.c (handle_query): Handle qGetTLSAddr.
15851 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15852 * target.h (struct target_ops): Add get_tls_address.
15853 * thread-db.c (maybe_attach_thread): Save the thread handle.
15854 (thread_db_get_tls_address): New.
15855
32ca6d61
DJ
158562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15857
15858 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15859 (linux_resume_one_process): Take a siginfo_t *. Update all
15860 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15861 (struct pending_signals): Add a siginfo_t.
15862 (linux_wait_for_process): Always set last_status.
15863 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15864 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15865 * linux-low.h (struct process_info): Add last_status.
15866
5ffff7c1
DJ
158672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15868
15869 * remote-utils.c (try_rle): New function.
15870 (putpkt_binary): Use it.
15871
8695c747
DJ
158722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15873
15874 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15875 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15876 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15877 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15878 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15879 point registers.
15880
290fadea
RS
158812006-08-08 Richard Sandiford <richard@codesourcery.com>
15882
15883 * server.c (terminal_fd): New variable.
15884 (old_foreground_pgrp): Likewise.
15885 (restore_old_foreground_pgrp): New function.
15886 (start_inferior): Record the terminal file descriptor in terminal_fd
15887 and its original foreground group in old_foreground_pgrp. Register
15888 restore_old_foreground_pgrp with atexit().
15889
9f2e1e63
DJ
158902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15891
15892 * server.c (handle_query): Correct qPart to qXfer.
15893
b80864fb
DJ
158942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15895
15896 * configure.ac: Check for more headers which are missing on
15897 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15898 * configure.srv: Add Cygwin and mingw32.
15899 * remote-utils.c: Don't include headers unconditionally which
15900 are missing on mingw32. Include <winsock.h> for mingw32.
15901 (remote_open): Adjust for mingw32 support. Flush
15902 standard error after writing to it.
15903 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15904 (unblock_async_io, enable_async_io, disable_async_io)
15905 (readchar, getpkt): Update for Winsock support.
15906 (prepare_resume_reply): Expect a protocol signal number.
15907 * server.c: Disable <sys/wait.h> on mingw32.
15908 (start_inferior): Adjust for mingw32 support. Flush
15909 standard error after writing to it.
15910 (attach_inferior): Likewise. Use protocol signal
15911 numbers.
15912 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15913 and names.
15914 * win32-i386-low.c: New file.
15915 * Makefile.in (XM_CLIBS): Set.
15916 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15917 (win32-i386-low.o): New dependency rule.
15918 * linux-low.c (linux_wait): Use target signal numbers.
15919 * target.h (struct target_ops): Doc fix.
15920 * server.h (target_signal_to_name): New prototype.
15921 * gdbreplay.c: Don't include headers unconditionally which
15922 are missing on mingw32. Include <winsock.h> for mingw32.
15923 (remote_close, remote_open): Adjust for Winsock support.
15924 * configure, config.in: Regenerated.
15925
0876f84a
DJ
159262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15927
15928 * server.c (decode_xfer_read, write_qxfer_response): New.
15929 (handle_query): Take a packet length argument. Handle
15930 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15931 the qSupported response.
15932 (main): Update call to handle_query.
15933
01f9e8fa
DJ
159342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15935
15936 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15937 (putpkt_binary): Renamed from putpkt and adjusted for binary
15938 data.
15939 (putpkt): New wrapper for putpkt_binary.
15940 (readchar): Don't mask off the high bit.
15941 (decode_X_packet): New function.
15942 * server.c (main): Call putpkt_binary if a handler sets the packet
15943 length. Save the length of the incoming packet. Handle 'X'.
15944 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15945
be2a5f71
DJ
159462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * server.c (handle_query): Handle qSupported.
15949
ea025f5f
DJ
159502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15951
15952 * remote-utils.c (all_symbols_looked_up): New variable.
15953 (look_up_one_symbol): Check it.
15954 * server.h (look_up_one_symbol): New declaration.
15955 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15956
9308fc88
DJ
159572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15958
15959 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15960 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15961 (PTRACE_GET_THREAD_AREA): Define.
15962 (ps_get_thread_area): New function.
15963
52fb6437
NS
159642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15965
15966 * configure.srv (m68k*-*-uclinux*): New target.
15967 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15968 (linux_resume_one_process): Remove extraneous cast.
15969 (linux_read_offsets): New.
15970 (linux_target_op): Add linux_read_offsets on mmuless systems.
15971 * server.c (handle_query): Add qOffsets logic.
15972 * target.h (struct target_ops): Add read_offsets.
15973
21b0f40c
DJ
159742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15977 (PTRACE_GET_THREAD_AREA): Define.
15978 (ps_get_thread_area): New function.
15979 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15980 (linux-x86-64-low.o): Update.
15981
0050a760
DJ
159822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15983
15984 * configure.ac: Remove checks for prfpregset_t.
15985 * gdb_proc_service.h: New file.
15986 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15987 new "gdb_proc_service.h".
15988 * proc-service.c: Likewise.
15989 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15990 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15991 * Makefile.in (gdb_proc_service_h): Updated.
15992 * configure, config.in: Regenerated.
15993
b92a518e
DJ
159942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15995
15996 * remote-utils.c (prepare_resume_reply): Move declaration
15997 of gdb_id_from_wait to the top of the block.
15998
545587ee
DJ
159992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * linux-low.c (regsets_store_inferior_registers): Read the regset
16002 from the target before filling it.
16003
9db87ebd
DJ
160042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16005
16006 * server.c (attach_inferior): Return SIGTRAP for a successful
16007 attach.
16008
dd24457d
DJ
160092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * Makefile.in (OBS): Add version.o.
16012 (STAGESTUFF): Delete.
16013 (version.o): Add dependencies.
16014 (version.c): Replace rule.
16015 (clean): Remove version.c.
16016 * server.c (gdbserver_version): New.
16017 (gdbserver_usage): Use printf.
16018 (main): Handle --version and --help.
16019 * server.h (version, host_name): Add declarations.
16020
6f0f660e
EZ
160212005-12-23 Eli Zaretskii <eliz@gnu.org>
16022
889bf7c5
PA
16023 * linux-arm-low.c:
16024 * linux-arm-low.c:
16025 * inferiors.c:
16026 * i387-fp.h:
16027 * i387-fp.c:
16028 * gdbreplay.c:
16029 * regcache.c:
16030 * proc-service.c:
16031 * mem-break.h:
16032 * mem-break.c:
16033 * linux-x86-64-low.c:
16034 * linux-sh-low.c:
16035 * linux-s390-low.c:
16036 * linux-ppc64-low.c:
16037 * linux-ppc-low.c:
16038 * linux-mips-low.c:
16039 * linux-m68k-low.c:
16040 * linux-m32r-low.c:
16041 * linux-low.h:
16042 * linux-low.c:
16043 * linux-ia64-low.c:
16044 * linux-i386-low.c:
16045 * linux-crisv32-low.c:
16046 * thread-db.c:
16047 * terminal.h:
16048 * target.h:
16049 * target.c:
16050 * server.h:
16051 * server.c:
16052 * remote-utils.c:
16053 * regcache.h:
16054 * utils.c:
16055 * Makefile.in:
16056 * configure.ac:
6f0f660e
EZ
16057 * gdbserver.1: Add (C) after Copyright. Update the FSF
16058 address.
16059
9d1fb177
DJ
160602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16061
16062 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16063 (arm_breakpoint_at): Recognize both breakpoints.
16064 (the_low_target): Use the correct breakpoint instruction.
16065
011a70c2
DJ
160662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16067
16068 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16069 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16070 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16071 (the_low_target): Update.
16072
7fb85e41
AS
160732005-10-25 Andreas Schwab <schwab@suse.de>
16074
16075 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16076
16077 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16078 (ia64_num_regs): Reduce to 462.
16079
3db0444b
DJ
160802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16081
16082 * acinclude.m4: Correct quoting.
16083 * aclocal.m4: Regenerated.
16084
16085 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16086 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16087 (thread_db_init): Call thread_db_err_str.
16088 * configure.ac: Check for TD_VERSION.
16089 * config.in, configure: Regenerated.
16090
bee0189a
DJ
160912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16092
16093 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16094
e9d25b98
DJ
160952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16096
16097 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16098 is not available. Define HAVE_PTRACE_GETREGS if it is.
16099 * config.in, configure: Regenerated.
16100 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16101 * linux-i386-low.c, linux-m68k-low.c: Update to use
16102 HAVE_PTRACE_GETREGS.
16103 * linux-low.c (regsets_fetch_inferior_registers)
16104 (regsets_store_inferior_registers): Only return 0 if we processed
16105 GENERAL_REGS.
16106 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16107 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16108
a06660f7
DJ
161092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16110
16111 * inferiors.c (struct thread_info): Add gdb_id.
16112 (add_thread): Add gdb_id argument.
16113 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16114 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16115 calls to add_thread.
16116 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16117 * server.c (handle_query): Use thread_to_gdb_id.
16118 (handle_v_cont, main): Use gdb_id_to_thread_id.
16119 * server.h (add_thread): Update prototype.
16120 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16121 prototypes.
16122
5a1f5858
DJ
161232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16124
16125 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16126 left-padded registers.
16127 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16128 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16129
e122f1f5
SE
161302005-07-01 Steve Ellcey <sje@cup.hp.com>
16131
16132 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16133 * configure: Regenerate.
16134 * config.in: Regenerate.
16135 * server.h (NEED_DECLARATION_STRERROR):
16136 Replace with !HAVE_DECL_STRERROR.
16137
d592fa2f
DJ
161382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * linux-low.c (linux_wait, linux_send_signal): Don't test
16141 an unsigned long variable for > 0 if it could be MAX_ULONG.
16142 * server.c (myresume): Likewise.
16143 * target.c (set_desired_inferior): Likewise.
16144
ccbd4912
MK
161452005-06-13 Mark Kettenis <kettenis@gnu.org>
16146
16147 * configure.ac: Simplify and improve check for socklen_t.
16148 * configure, config.in: Regenerate.
16149
f450004a
DJ
161502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16151
16152 * acconfig.h: Remove.
16153 * configure.ac: Add a test for socklen_t. Use three-argument
16154 AC_DEFINE throughout.
16155 * config.in: Regenerated using autoheader 2.59.
16156 * configure: Regenerated.
16157
16158 * gdbreplay.c (socklen_t): Provide a default.
16159 (remote_open): Use socklen_t.
16160 * remote-utils.c (socklen_t): Provide a default.
16161 (remote_open): Use socklen_t.
16162 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16163 unsigned char.
16164
16165 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16166 char for buffers.
16167 * linux-low.c (linux_read_memory, linux_write_memory)
16168 (linux_read_auxv): Likewise.
16169 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16170 (check_mem_write): Likewise.
16171 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16172 Likewise.
16173 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16174 (registers_from_string, register_data): Likewise.
16175 * server.c (handle_query, main): Likewise.
16176 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16177 (decode_M_packet): Likewise.
16178 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16179 * target.h (struct target_ops): Update read_memory, write_memory,
16180 and read_auxv.
16181 (read_inferior_memory, write_inferior_memory): Update.
16182 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16183 to unsigned char *.
16184 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16185 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16186 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16187 linux-s390-low.c, linux-sh-low.c: Update for changes in
16188 read_inferior_memory and the_low_target->breakpoint.
16189
eee84df1
DJ
161902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16191
16192 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16193 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16194 * configure.srv: Add powerpc64-*-linux*.
16195 * linux-ppc64-low.c: New file.
16196
45b134e5
OF
161972005-05-23 Orjan Friberg <orjanf@axis.com>
16198
16199 * linux-cris-low.c: New file with support for CRIS.
16200 * linux-crisv32-low.c: Ditto for CRISv32.
16201 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16202 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16203 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16204 reg-crisv32.o, and reg-crisv32.c to make rules.
16205 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16206 recognized targets.
16207
48d93c75
UW
162082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16209
16210 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16211 of sizeof (PTRACE_XFER_TYPE).
16212 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16213
e013ee27
OF
162142005-05-12 Orjan Friberg <orjanf@axis.com>
16215
889bf7c5 16216 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16217 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16218 pointers for hardware watchpoint support.
16219 * linux-low.h (struct linux_target_ops): Ditto.
16220 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16221 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16222 to linux_target_ops.
16223 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16224 reply packet.
16225 * server.c (main): Recognize 'Z' and 'z' packets.
16226
b0ded00b
UW
162272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16228
16229 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16230 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16231 (the_low_target): Add new members.
16232
8643e2ad
DJ
162332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16234
16235 * proc-service.c (ps_lgetregs): Search all_processes instead of
16236 all_threads.
16237
fc620387
DJ
162382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * server.c (start_inferior): Change return type to int.
16241 (attach_inferior): Change sigptr to int *.
16242 (handle_v_cont, handle_v_requests): Change signal to int *.
16243 (main): Change signal to int.
16244
162452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16246
16247 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16248 * configure.srv: Add m32r*-*-linux*.
16249 * linux-m32r-low.c: New file.
16250
e0e76420
DJ
162512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16254
a1928bad
DJ
162552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16256
16257 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16258 Take unsigned long arguments for PIDs.
16259 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16260 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16261 (wait_for_sigstop, linux_resume_one_process)
16262 (regsets_fetch_inferior_registers, linux_send_signal)
16263 (linux_read_auxv): Likewise. Update the types of variables holding
16264 PIDs. Update format string specifiers.
16265 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16266 * remote-utils.c (prepare_resume_reply): Likewise.
16267 * server.c (cont_thread, general_thread, step_thread)
16268 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16269 unsigned long.
16270 (handle_query): Update format specifiers.
16271 (handle_v_cont, main): Use strtoul for thread IDs.
16272 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16273 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16274 (general_thread, step_thread, thread_from_wait)
16275 (old_thread_from_wait): Update.
16276 * target.h (struct thread_resume): Use unsigned long for THREAD.
16277 (struct target_ops): Use unsigned long for arguments to attach and
16278 thread_alive.
16279
dcdb98d2
DJ
162802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16281
16282 * acinclude.m4: Include bfd/bfd.m4 directly.
16283 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16284 <agriffis@toolchain.org>.
16285 * aclocal.m4, configure: Regenerated.
16286
bec39cab
AC
162872005-01-07 Andrew Cagney <cagney@gnu.org>
16288
16289 * configure.ac: Rename configure.in, require autoconf 2.59.
16290 * configure: Re-generate.
16291
434c4c77
DJ
162922004-12-08 Daniel Jacobowitz <dan@debian.org>
16293
16294 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16295 LIBS when finished.
16296 * aclocal.m4: Regenerated.
16297 * configure: Regenerated.
16298
db1d3e1b
AS
162992004-11-21 Andreas Schwab <schwab@suse.de>
16300
16301 * linux-m68k-low.c (m68k_num_gregs): Define.
16302 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16303 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16304 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16305 (m68k_breakpoint_at): New. Add to the_low_target.
16306
16307 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16308 srv_linux_thread_db to yes.
16309
43360365
JB
163102004-10-20 Joel Brobecker <brobecker@gnat.com>
16311
16312 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16313 (ARCH_SET_FS): Likewise.
16314 (ARCH_GET_FS): Likewise.
16315 (ARCH_GET_GS): Likewise.
16316
fd500816
DJ
163172004-10-16 Daniel Jacobowitz <dan@debian.org>
16318
16319 * linux-i386-low.c (ps_get_thread_area): New.
16320 * linux-x86-64-low.c (ps_get_thread_area): New.
16321 * linux-low.c: Include <sys/syscall.h>.
16322 (linux_kill_one_process): Don't kill the first thread here.
16323 (linux_kill): Kill the first thread here.
16324 (kill_lwp): New function.
16325 (send_sigstop, linux_send_signal): Use it.
16326 * proc-service.c: Clean up #ifdefs.
16327 (fpregset_info): Delete.
16328 (ps_lgetregs): Update and enable implementation.
16329 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16330 implementations.
16331 * remote-utils.c (struct sym_cache, symbol_cache): New.
16332 (input_interrupt): Print a clearer message.
16333 (async_io_enabled): New variable.
16334 (enable_async_io, disable_async_io): Use it. Update comments.
16335 (look_up_one_symbol): Use the symbol cache.
16336 * thread-db.c (thread_db_look_up_symbols): New function.
16337 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16338
f6de3c42
DJ
163392004-10-16 Daniel Jacobowitz <dan@debian.org>
16340
16341 * configure.in: Test for -rdynamic.
16342 * configure: Regenerated.
16343 * Makefile (INTERNAL_LDFLAGS): New.
16344 (gdbserver, gdbreplay): Use it.
16345
2c0fc042
AC
163462004-09-02 Andrew Cagney <cagney@gnu.org>
16347
16348 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16349
075b3282
DJ
163502004-03-23 Daniel Jacobowitz <drow@mvista.com>
16351
16352 * linux-low.c (linux_wait): Clear all_processes list also.
16353
fa6a77dc
DJ
163542004-03-12 Daniel Jacobowitz <drow@mvista.com>
16355
16356 * linux-low.c: Include <errno.h>. Remove extern declaration of
16357 errno.
16358
6d782a97
DJ
163592004-03-12 Daniel Jacobowitz <drow@mvista.com>
16360
16361 * gdbreplay.c, server.h, utils.c: Update copyright years.
16362
3a7fb99b
DJ
163632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16364
16365 * server.c (main): Print child status or termination signal from
16366 variable 'signal', not 'sig'.
16367
c3e735a6
DJ
163682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16369
16370 * linux-low.c (linux_read_memory): Change return type to
16371 int. Check for and return error from ptrace().
16372 * target.c (read_inferior_memory): Change return type to int. Pass
16373 back return status from the_target->read_memory().
16374 * target.h (struct target_ops): Adapt *read_memory() prototype.
16375 Update comment.
16376 (read_inferior_memory): Adapt prototype.
16377 * server.c (main): Return an error packet if
16378 read_inferior_memory() returns an error.
16379
a59d1c82
DJ
163802004-03-04 Daniel Jacobowitz <drow@mvista.com>
16381
16382 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16383 Unify with other clean targets.
16384
dc3f8883
DJ
163852004-02-29 Daniel Jacobowitz <drow@mvista.com>
16386
16387 * server.c (handle_v_cont): Call set_desired_inferior.
16388
89a208da
DJ
163892004-02-29 Daniel Jacobowitz <drow@mvista.com>
16390
16391 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16392
62ea82f5
DJ
163932004-02-29 Daniel Jacobowitz <drow@mvista.com>
16394
16395 * linux-low.c (linux_wait): Unblock async I/O.
16396 (linux_resume): Block and enable async I/O.
16397 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16398 * server.h (block_async_io, unblock_async_io): Add prototypes.
16399
6910d122
DJ
164002004-02-29 Daniel Jacobowitz <drow@mvista.com>
16401
16402 * remote-utils.c (remote_open): Print a status notice after
16403 opening a TCP port.
16404 * server.c (attach_inferior): Print a status notice after
16405 attaching.
16406
164072004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16408
16409 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16410
c89dc5d4
DJ
164112004-02-26 Daniel Jacobowitz <drow@mvista.com>
16412
16413 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16414 error packet.
16415 * server.c, target.h: Update copyright years.
16416
4b8dad4a
RM
164172004-02-25 Roland McGrath <roland@redhat.com>
16418
16419 * target.h (struct target_ops): New member `read_auxv'.
16420 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16421 * linux-low.c (linux_read_auxv): New function.
16422 (linux_target_ops): Initialize `read_auxv' member to that.
16423
d7446758
JB
164242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16425
16426 Committed by Jim Blandy <jimb@redhat.com>.
16427
16428 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16429 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16430 instead of GPR_SIZE to distiguish s390 and s390x targets.
16431
5544ad89
DJ
164322004-01-31 Daniel Jacobowitz <drow@mvista.com>
16433
16434 * linux-low.c: Update copyright year.
16435 (check_removed_breakpoint): Clear pending_is_breakpoint.
16436 (linux_set_resume_request, linux_queue_one_thread)
16437 (resume_status_pending_p): New functions.
16438 (linux_continue_one_thread): Use process->resume.
16439 (linux_resume): Only resume threads if there are no pending events.
16440 * linux-low.h (struct process_info): Add resume request
16441 pointer.
16442
2a68b70e
DJ
164432004-01-30 Daniel Jacobowitz <drow@mvista.com>
16444
16445 * regcache.c (new_register_cache): Clear the allocated register
16446 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16447
64386c31
DJ
164482003-10-13 Daniel Jacobowitz <drow@mvista.com>
16449
16450 * linux-low.c (linux_resume): Take a struct thread_resume *
16451 argument.
16452 (linux_wait): Update call.
16453 (resume_ptr): New static variable.
16454 (linux_continue_one_thread): Renamed from
16455 linux_continue_one_process. Use resume_ptr.
16456 (linux_resume): Use linux_continue_one_thread.
16457 * server.c (handle_v_cont, handle_v_requests): New functions.
16458 (myresume): New function.
16459 (main): Handle 'v' case.
16460 * target.h (struct thread_resume): New type.
16461 (struct target_ops): Change argument of "resume" to struct
16462 thread_resume *.
16463 (myresume): Delete macro.
16464
c938e9b0
L
164652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16466
16467 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16468 (uninstall): Support DESTDIR.
16469
7f313d07
BC
16470Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16471
16472 * configure.srv: Add xscale*linux copy of arm*linux entry.
16473
3b2fc2ea
DJ
164742003-07-24 Daniel Jacobowitz <drow@mvista.com>
16475
16476 * linux-arm-low.c (arm_reinsert_addr): New function.
16477 (the_low_target): Add arm_reinsert_addr.
16478
1c0a559e
MK
164792003-07-08 Mark Kettenis <kettenis@gnu.org>
16480
16481 * mem-break.c: Remove whitespace at end of file.
16482
43d5792c
DJ
164832003-06-28 Daniel Jacobowitz <drow@mvista.com>
16484
16485 * configure.in: Check whether we need to prototype strerror.
16486 * server.h: Optionally prototype strerror.
16487 * gdbreplay.c (perror_with_name): Use strerror.
16488 * linux-low.c (linux_attach_lwp): Use strerror.
16489 * utils.c (perror_with_name): Use strerror.
16490 * config.in, configure: Regenerated.
16491
c8a86edf
DJ
164922003-06-28 Daniel Jacobowitz <drow@mvista.com>
16493
16494 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16495 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16496
73d37363
DJ
164972003-06-20 Daniel Jacobowitz <drow@mvista.com>
16498
16499 * Makefile.in (SFILES): Update.
16500 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16501 low-sun3.c: Remove files.
16502
6ad8ae5c
DJ
165032003-06-17 Daniel Jacobowitz <drow@mvista.com>
16504
16505 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16506 (linux_detach_one_process, linux_detach): New functions.
16507 (linux_target_ops): Add linux_detach.
16508 * server.c (main): Handle 'D' packet.
16509 * target.h (struct target_ops): Add "detach" member.
16510 (detach_inferior): Define.
16511
1581182a
MK
165122003-06-13 Mark Kettenis <kettenis@gnu.org>
16513
16514 From Kelley Cook <kelleycook@wideopenwest.com>:
16515 * configure.srv: Accept i[34567]86 variants.
16516
e5379b03
DJ
165172003-06-05 Daniel Jacobowitz <drow@mvista.com>
16518
16519 * linux-low.c (linux_wait_for_event): Correct comment typos.
16520 (linux_resume_one_process): Call check_removed_breakpoint.
16521 (linux_send_signal): New function.
16522 (linux_target_ops): Add linux_send_signal.
16523 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16524 of kill.
16525 * target.h (struct target_ops): Add send_signal.
16526
2ff29de4
JB
165272003-05-29 Jim Blandy <jimb@redhat.com>
16528
16529 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16530 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16531 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16532 away part of the register's value.
16533
254787d4
DJ
165342003-03-26 Daniel Jacobowitz <drow@mvista.com>
16535
16536 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16537 (linux_wait_for_event, linux_init_signals): Likewise.
16538
94e10508
DJ
165392003-03-17 Daniel Jacobowitz <drow@mvista.com>
16540
16541 * configure.in: Check for stdlib.h.
16542 * configure: Regenerated.
16543 * config.in: Regenerated.
16544
4c0711e0
DJ
165452003-01-04 Andreas Schwab <schwab@suse.de>
16546
16547 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16548
ef66e766
AC
165492003-01-02 Andrew Cagney <ac131313@redhat.com>
16550
16551 * Makefile.in: Remove obsolete code.
16552
a1358604
DJ
165532002-11-20 Daniel Jacobowitz <drow@mvista.com>
16554
16555 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16556 defined(PT_FPR0_HI).
16557
23ce3b1c
DJ
165582002-11-17 Stuart Hughes <seh@zee2.com>
16559
16560 * linux-arm-low.c (arm_num_regs): Increase.
16561 (arm_regmap): Include status register.
16562
165632002-11-17 Daniel Jacobowitz <drow@mvista.com>
16564
16565 * linux-low.c (register_addr): Remove incorrect -1 check.
16566
a9fa9f7d
DJ
165672002-08-29 Daniel Jacobowitz <drow@mvista.com>
16568
16569 * linux-low.c (linux_create_inferior): Call setpgid. Return
16570 the new PID.
16571 (unstopped_p, linux_signal_pid): Remove.
16572 (linux_target_ops): Remove linux_signal_pid.
16573 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16574 global instead of target method.
16575 * target.h (struct target_ops): Remove signal_pid. Update comment
16576 for create_inferior.
16577 * server.c (signal_pid): New variable.
16578 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16579 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16580 (attach_inferior): Set signal_pid.
16581
17574093
DJ
165822002-08-23 Daniel Jacobowitz <drow@mvista.com>
16583
16584 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16585
165862002-08-20 Jim Blandy <jimb@redhat.com>
16587
16588 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16589 default for this.
16590
165912002-08-01 Andrew Cagney <cagney@redhat.com>
16592
16593 * Makefile.in: Make chill references obsolete.
16594
165952002-07-24 Kevin Buettner <kevinb@redhat.com>
16596
16597 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16598 * configure: Regenerate.
16599 * config.in: Regenerate.
16600
166012002-07-09 David O'Brien <obrien@FreeBSD.org>
16602
16603 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16604 (perror_with_name, remote_close, remote_open, expect, play): Static.
16605
166062002-07-04 Michal Ludvig <mludvig@suse.cz>
16607
4b8dad4a 16608 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16609 byte offsets instead of an array of indexes.
16610 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16611
166122002-06-13 Daniel Jacobowitz <drow@mvista.com>
16613
16614 * regcache.c: Add comment.
16615
166162002-06-11 Daniel Jacobowitz <drow@mvista.com>
16617
16618 * thread-db.c: New file.
16619 * proc-service.c: New file.
16620 * acinclude.m4: New file.
16621 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16622 proc-service.o, and thread-db.o.
16623 (linux-low.o): Add USE_THREAD_DB.
16624 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16625 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16626 * aclocal.m4: Regenerated.
16627 * config.in: Regenerated.
16628 * configure: Regenerated.
16629 * configure.in: Check for proc_service.h, sys/procfs.h,
16630 thread_db.h, and linux/elf.h headrs.
16631 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16632 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16633 Check for -lthread_db and thread support.
16634 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16635 PowerPC, and SuperH.
16636 * i387-fp.c: Constify arguments.
16637 * i387-fp.h: Likewise.
16638 * inferiors.c: (struct thread_info): Renamed from
16639 `struct inferior_info'. Remove PID member. Use generic inferior
16640 list header. All uses updated.
16641 (inferiors, signal_pid): Removed.
16642 (all_threads): New variable.
16643 (get_thread): Define.
16644 (add_inferior_to_list): New function.
16645 (for_each_inferior): New function.
16646 (change_inferior_id): New function.
16647 (add_inferior): Removed.
16648 (remove_inferior): New function.
16649 (add_thread): New function.
16650 (free_one_thread): New function.
16651 (remove_thread): New function.
16652 (clear_inferiors): Use for_each_inferior and free_one_thread.
16653 (find_inferior): New function.
16654 (find_inferior_id): New function.
16655 (inferior_target_data): Update argument type.
16656 (set_inferior_target_data): Likewise.
16657 (inferior_regcache_data): Likewise.
16658 (set_inferior_regcache_data): Likewise.
16659 * linux-low.c (linux_bp_reinsert): Remove.
16660 (all_processes, stopping_threads, using_thrads)
16661 (struct pending_signals, debug_threads, pid_of): New.
16662 (inferior_pid): Replace with macro.
16663 (struct inferior_linux_data): Remove.
16664 (get_stop_pc, add_process): New functions.
16665 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16666 Use add_process and add_thread.
16667 (linux_attach_lwp): New function, based on old linux_attach. Use
16668 add_process and add_thread. Set stop_expected for new threads.
16669 (linux_attach): New function.
16670 (linux_kill_one_process): New function.
16671 (linux_kill): Kill all LWPs.
16672 (linux_thread_alive): Use find_inferior_id.
16673 (check_removed_breakpoints, status_pending_p): New functions.
16674 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16675 Update. Use WNOHANG. Wait for cloned processes also. Update process
16676 struct for the found process.
16677 (linux_wait_for_event): New function.
16678 (linux_wait): Use it. Support LWPs.
16679 (send_sigstop, wait_for_sigstop, stop_all_processes)
16680 (linux_resume_one_process, linux_continue_one_process): New functions.
16681 (linux_resume): Support LWPs.
16682 (REGISTER_RAW_SIZE): Remove.
16683 (fetch_register): Use register_size instead. Call supply_register.
16684 (usr_store_inferior_registers): Likewise. Call collect_register.
16685 Fix recursive case.
16686 (regsets_fetch_inferior_registers): Improve error message.
16687 (regsets_store_inferior_registers): Add debugging.
16688 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16689 (unstopped_p, linux_signal_pid): New functions.
16690 (linux_target_ops): Add linux_signal_pid.
16691 (linux_init_signals): New function.
16692 (initialize_low): Call it. Initialize using_threads.
16693 * regcache.c (inferior_regcache_data): Add valid
16694 flag.
16695 (get_regcache): Fetch registers lazily. Add fetch argument
16696 and update all callers.
16697 (regcache_invalidate_one, regcache_invalidate): New
16698 functions.
16699 (new_register_cache): Renamed from create_register_cache.
16700 Return the new regcache.
16701 (free_register_cache): Change argument to a void *.
16702 (registers_to_string, registers_from_string): Call get_regcache
16703 with fetch flag set.
16704 (register_data): Make static. Pass fetch flag to get_regcache.
16705 (supply_register): Call get_regcache with fetch flag clear.
16706 (collect_register): Call get_regcache with fetch flag set.
16707 (collect_register_as_string): New function.
16708 * regcache.h: Update.
16709 * remote-utils.c (putpkt): Flush after debug output and use
16710 stderr.
16711 Handle input interrupts while waiting for an ACK.
16712 (input_interrupt): Use signal_pid method.
16713 (getpkt): Flush after debug output and use stderr.
16714 (outreg): Use collect_register_as_string.
16715 (new_thread_notify, dead_thread_notify): New functions.
16716 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16717 and general_thread.
16718 (look_up_one_symbol): Flush after debug output.
16719 * server.c (step_thread, server_waiting): New variables.
16720 (start_inferior): Don't use signal_pid. Update call to mywait.
16721 (attach_inferior): Update call to mywait.
16722 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16723 (main): Don't fetch/store registers explicitly. Use
16724 set_desired_inferior. Support proposed ``Hs'' packet. Update
16725 calls to mywait.
16726 * server.h: Update.
16727 (struct inferior_list, struct_inferior_list_entry): New.
16728 * target.c (set_desired_inferior): New.
16729 (write_inferior_memory): Constify.
16730 (mywait): New function.
16731 * target.h: Update.
16732 (struct target_ops): New signal_pid method.
16733 (mywait): Removed macro, added prototype.
16734
16735 * linux-low.h (regset_func): Removed.
16736 (regset_fill_func, regset_store_func): New.
16737 (enum regset_type): New.
16738 (struct regset_info): Add type field. Use new operation types.
16739 (struct linux_target_ops): stop_pc renamed to get_pc.
16740 Add decr_pc_after_break and breakpoint_at.
16741 (get_process, get_thread_proess, get_process_thread)
16742 (strut process_info, all_processes, linux_attach_lwp)
16743 (thread_db_init): New.
16744
16745 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16746 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16747 (the_low_target): Add new members.
16748 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16749 (i386_store_fpxregset): Constify.
16750 (target_regsets): Add new kind identifier.
16751 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16752 (i386_set_pc): Add debugging.
16753 (i386_breakpoint_at): New function.
16754 (the_low_target): Add new members.
16755 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16756 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16757 (mips_breakpoint_at): New.
16758 (the_low_target): Add new members.
16759 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16760 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16761 (the_low_target): Add new members.
16762 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16763 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16764 (the_low_target): Add new members.
16765 * linux-x86-64-low.c (target_regsets): Add new kind
16766 identifier.
16767
167682002-05-15 Daniel Jacobowitz <drow@mvista.com>
16769
16770 From Martin Pool <mbp@samba.org>:
16771 * server.c (gdbserver_usage): New function.
16772 (main): Call it.
16773
167742002-05-14 Daniel Jacobowitz <drow@mvista.com>
16775
16776 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16777 stop_at -> stop_pc.
16778
167792002-05-04 Andrew Cagney <ac131313@redhat.com>
16780
16781 * Makefile.in: Remove obsolete code.
16782
167832002-04-24 Michal Ludvig <mludvig@suse.cz>
16784
16785 * linux-low.c (regsets_fetch_inferior_registers),
16786 (regsets_store_inferior_registers): Removed cast to int from
16787 ptrace() calls.
16788 * regcache.h: Added declaration of struct inferior_info.
16789
167902002-04-20 Daniel Jacobowitz <drow@mvista.com>
16791
16792 * inferiors.c (struct inferior_info): Add regcache_data.
16793 (add_inferior): Call create_register_cache.
16794 (clear_inferiors): Call free_register_cache.
16795 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16796 * regcache.c (struct inferior_regcache_data): New.
16797 (registers): Remove.
16798 (get_regcache): New function.
16799 (create_register_cache, free_register_cache): New functions.
16800 (set_register_cache): Don't initialize the register cache here.
16801 (registers_to_string, registers_from_string, register_data): Call
16802 get_regcache.
16803 * regcache.h: Add prototypes.
16804 * server.h: Likewise.
16805
168062002-04-20 Daniel Jacobowitz <drow@mvista.com>
16807
16808 * mem-break.c: New file.
16809 * mem-break.h: New file.
16810 * Makefile.in: Add mem-break.o rule; update server.h
16811 dependencies.
16812 * inferiors.c (struct inferior_info): Add target_data
16813 member.
16814 (clear_inferiors): Free target_data member if set.
16815 (inferior_target_data, set_inferior_target_data): New functions.
16816 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16817 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16818 * linux-low.c (linux_bp_reinsert): New variable.
16819 (struct inferior_linux_data): New.
16820 (linux_create_inferior): Use set_inferior_target_data.
16821 (linux_attach): Likewise. Call add_inferior.
16822 (linux_wait_for_one_inferior): New function.
16823 (linux_wait): Call it.
16824 (linux_write_memory): Add const.
16825 (initialize_low): Call set_breakpoint_data.
16826 * linux-low.h (struct linux_target_ops): Add breakpoint
16827 handling members.
16828 * server.c (attach_inferior): Remove extra add_inferior
16829 call.
16830 * server.h: Include mem-break.h. Update inferior.c
16831 prototypes.
16832 * target.c (read_inferior_memory)
16833 (write_inferior_memory): New functions.
16834 * target.h (read_inferior_memory)
16835 (write_inferior_memory): Change macros to prototypes.
16836 (struct target_ops): Update comments. Add const to write_memory
16837 definition.
16838
168392002-04-11 Daniel Jacobowitz <drow@mvista.com>
16840
16841 * linux-low.c (usr_store_inferior_registers): Support
16842 registers which are allowed to fail to store.
16843 * linux-low.h (linux_target_ops): Likewise.
16844 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16845 (ppc_cannot_store_register): FPSCR may not be storable.
16846
168472002-04-09 Daniel Jacobowitz <drow@mvista.com>
16848
16849 * server.h: Include <string.h> if HAVE_STRING_H.
16850 * ChangeLog: Correct paths in last ChangeLog entry.
16851
168522002-04-09 Daniel Jacobowitz <drow@mvista.com>
16853
16854 * linux-low.h: Remove obsolete prototypes.
16855 (struct linux_target_ops): New.
16856 (extern the_low_target): New.
16857 * linux-low.c (num_regs, regmap): Remove declarations.
16858 (register_addr): Use the_low_target explicitly.
16859 (fetch_register): Likewise.
16860 (usr_fetch_inferior_registers): Likewise.
16861 (usr_store_inferior_registers): Likewise.
16862 * linux-arm-low.c (num_regs): Remove.
16863 (arm_num_regs): Define.
16864 (arm_regmap): Renamed from regmap, made static.
16865 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16866 made static.
16867 (arm_cannot_store_register): Renamed from cannot_store_register,
16868 made static.
16869 (the_low_target): New.
16870 * linux-i386-low.c (num_regs): Remove.
16871 (i386_num_regs): Define.
16872 (i386_regmap): Renamed from regmap, made static.
16873 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16874 made static.
16875 (i386_cannot_store_register): Renamed from cannot_store_register,
16876 made static.
16877 (the_low_target): New.
16878 * linux-ia64-low.c (num_regs): Remove.
16879 (ia64_num_regs): Define.
16880 (ia64_regmap): Renamed from regmap, made static.
16881 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16882 made static.
16883 (ia64_cannot_store_register): Renamed from cannot_store_register,
16884 made static.
16885 (the_low_target): New.
16886 * linux-m68k-low.c (num_regs): Remove.
16887 (m68k_num_regs): Define.
16888 (m68k_regmap): Renamed from regmap, made static.
16889 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16890 made static.
16891 (m68k_cannot_store_register): Renamed from cannot_store_register,
16892 made static.
16893 (the_low_target): New.
16894 * linux-mips-low.c (num_regs): Remove.
16895 (mips_num_regs): Define.
16896 (mips_regmap): Renamed from regmap, made static.
16897 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16898 made static.
16899 (mips_cannot_store_register): Renamed from cannot_store_register,
16900 made static.
16901 (the_low_target): New.
16902 * linux-ppc-low.c (num_regs): Remove.
16903 (ppc_num_regs): Define.
16904 (ppc_regmap): Renamed from regmap, made static.
16905 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16906 made static.
16907 (ppc_cannot_store_register): Renamed from cannot_store_register,
16908 made static.
16909 (the_low_target): New.
16910 * linux-s390-low.c (num_regs): Remove.
16911 (s390_num_regs): Define.
16912 (s390_regmap): Renamed from regmap, made static.
16913 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16914 made static.
16915 (s390_cannot_store_register): Renamed from cannot_store_register,
16916 made static.
16917 (the_low_target): New.
16918 * linux-sh-low.c (num_regs): Remove.
16919 (sh_num_regs): Define.
16920 (sh_regmap): Renamed from regmap, made static.
16921 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16922 made static.
16923 (sh_cannot_store_register): Renamed from cannot_store_register,
16924 made static.
16925 (the_low_target): New.
16926 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16927 (the_low_target): New.
16928
169292002-04-09 Daniel Jacobowitz <drow@mvista.com>
16930
16931 * Makefile.in: Add stamp-h target.
16932 * configure.in: Create stamp-h.
16933 * configure: Regenerated.
16934
169352002-04-09 Daniel Jacobowitz <drow@mvista.com>
16936
16937 * inferiors.c: New file.
16938 * target.c: New file.
16939 * target.h: New file.
16940 * Makefile.in: Add target.o and inferiors.o. Update
16941 dependencies.
16942 * linux-low.c (inferior_pid): New static variable,
16943 moved from server.c.
16944 (linux_create_inferior): Renamed from create_inferior.
16945 Call add_inferior. Return 0 on success instead of a PID.
16946 (linux_attach): Renamed from myattach.
16947 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16948 (linux_thread_alive): Renamed from mythread_alive.
16949 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16950 child dies.
16951 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16952 (regsets_store_inferior_registers): Correct error message.
16953 Add missing ``return 0''.
16954 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16955 (linux_store_registers): Renamed from store_inferior_registers.
16956 (linux_read_memory): Renamed from read_inferior_memory.
16957 (linux_write_memory): Renamed from write_inferior_memory.
16958 (linux_target_ops): New structure.
16959 (initialize_low): Call set_target_ops ().
16960 * remote-utils.c (unhexify): New function.
16961 (hexify): New function.
16962 (input_interrupt): Send signals to ``signal_pid''.
16963 * server.c (inferior_pid): Remove.
16964 (start_inferior): Update create_inferior call.
16965 (attach_inferior): Call add_inferior.
16966 (handle_query): New function.
16967 (main): Call handle_query for `q' packets.
16968 * server.h: Include "target.h". Remove obsolete prototypes.
16969 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16970
169712002-04-09 Daniel Jacobowitz <drow@mvista.com>
16972
16973 * Makefile.in: Add WARN_CFLAGS. Update configury
16974 dependencies.
16975 * configure.in: Check for <string.h>
16976 * configure: Regenerate.
16977 * config.in: Regenerate.
16978 * gdbreplay.c: Include needed system headers.
16979 (remote_open): Remove strchr prototype.
16980 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16981 * regcache.c (supply_register): Change buf argument to const void *.
16982 (supply_register_by_name): Likewise.
16983 (collect_register): Change buf argument to void *.
16984 (collect_register_by_name): Likewise.
16985 * regcache.h: Add missing prototypes.
16986 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16987 * server.c (handle_query): New function.
16988 (attached): New static variable, moved out of main.
16989 (main): Quiet longjmp clobber warnings.
16990 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16991 * utils.c (error): Remove NORETURN.
16992 (fatal): Likewise.
This page took 2.3205 seconds and 4 git commands to generate.