]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gold won't build with gcc-9
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d105de22
TT
12018-11-29 Tom Tromey <tom@tromey.com>
2
3 * win32-low.c (win32_join): Take pid, not process.
4 * target.h (struct target_ops) <join>: Change argument type.
5 (join_inferior): Change argument name.
6 * spu-low.c (spu_join): Take pid, not process.
7 * server.c (handle_detach): Preserve pid before destroying
8 process.
9 * lynx-low.c (lynx_join): Take pid, not process.
10 * linux-low.c (linux_join): Take pid, not process.
11
50138245
AH
122018-11-23 Alan Hayward <alan.hayward@arm.com>
13
14 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
15 (aarch64_cannot_fetch_register): Likewise.
16 (struct linux_target_ops): Update references.
17
64f57f3d
PFC
182018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
19
20 * linux-ppc-low.c: Include nat/linux-ptrace.h.
21
8d619c01
EBM
222018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
23
24 * configure.srv (ipa_ppc_linux_regobj): Add
25 powerpc-isa207-htm-vsx32l-ipa.o and
26 powerpc-isa207-htm-vsx64l-ipa.o.
27 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
28 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
29 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
30 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
31 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
32 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
33 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
34 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
35 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
36 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
37 (init_registers_powerpc_isa207_htm_vsx32l)
38 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
39 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
40 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
41 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
42 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
43 (ppc_store_tm_ctarregset): New functions.
44 (ppc_regsets): Add entries for HTM regsets.
45 (ppc_arch_setup): Set htm in features struct when needed. Set
46 sizes for the HTM regsets.
47 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
48 (initialize_low_arch): Call
49 init_registers_powerpc_isa207_htm_vsx32l and
50 init_registers_powerpc_isa207_htm_vsx64l.
51 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
52 PPC_TDESC_ISA207_HTM_VSX.
53 (initialize_low_tracepoint): Call
54 init_registers_powerpc_isa207_htm_vsx32l and
55 init_registers_powerpc_isa207_htm_vsx64l.
56
232bfb86
EBM
572018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
58
59 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
60 rs6000/power-linux-pmu.xml to srv_xmlfiles.
61 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
62 (ppc_store_pmuregset): New functions.
63 (ppc_regsets): Add entries for ebb and pmu regsets.
64 (ppc_arch_setup): Set isa207 in features struct if the ebb and
65 pmu regsets are available. Set sizes for these regsets.
66
f2cf6173
EBM
672018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
68
69 * configure.srv (ipa_ppc_linux_regobj): Add
70 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
71 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
72 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
73 rs6000/powerpc-isa207-vsx32l.xml, and
74 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
75 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
76 <PPC_TDESC_ISA207_VSX>: New enum value.
77 (init_registers_powerpc_isa207_vsx32l): Declare.
78 (init_registers_powerpc_isa207_vsx64l): Declare.
79 * linux-ppc-low.c (ppc_fill_tarregset): New function.
80 (ppc_store_tarregset): New function.
81 (ppc_regsets): Add entry for the TAR regset.
82 (ppc_arch_setup): Set isa207 in features struct when needed. Set
83 size for the TAR regsets.
84 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
85 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
86 and init_registers_powerpc_isa207_vsx64l.
87 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
88 (initialize_low_tracepoint): Call
89 init_registers_powerpc_isa207_vsx32l and
90 init_registers_powerpc_isa207_vsx64l.
91
7ca18ed6
EBM
922018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
93 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
94
95 * configure.srv (ipa_ppc_linux_regobj): Add
96 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
97 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
98 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
99 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
100 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
101 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
102 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
103 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
104 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
105 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
106 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
107 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
108 (ppc_hwcap): Add comment.
109 (ppc_hwcap2): New global.
110 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
111 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
112 (ppc_regsets): Add entries for the DSCR and PPR regsets.
113 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
114 when needed. Set sizes for the the DSCR and PPR regsets.
115 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
116 (initialize_low_arch): Call
117 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
118 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
119 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
120 PPC_TDESC_ISA205_PPR_DSCR_VSX.
121 (initialize_low_tracepoint): Call
122 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
123 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
124
5c849b22
PFC
1252018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
126
127 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
128
8ecfd7bd
SDJ
1292018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
130 Simon Marchi <simark@simark.ca>
131
132 * acinclude.m4: Include "../selftest.m4".
133 * configure: Regenerate.
134 * configure.ac: Use "GDB_AC_SELFTEST".
135 * configure.srv: Use "$enable_unittests" instead of
136 "$development" when checking whether unit tests have been
137 enabled.
138 * server.c (captured_main): Update message informing that
139 selftests have been disabled.
140
96643e35
TT
1412018-10-04 Tom Tromey <tom@tromey.com>
142
143 * configure: Rebuild.
144
da4ae14a
TT
1452018-10-04 Tom Tromey <tom@tromey.com>
146
147 * server.c (handle_status): Rename inner "thread".
148 (process_serial_event): Declare "res" in 'm' case.
149 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
150 (iterate_over_lwps): Rename inner "thread".
151 (linux_qxfer_libraries_svr4): Rename inner "len".
152 * gdbthread.h (find_thread_in_random): Rename inner "thread".
153
7c619dbd
GB
1542018-10-01 Gary Benson <gbenson@redhat.com>
155
156 * gdb_proc_service.h: Moved common code to
157 common/gdb_proc_service.h.
158
3795e814
GB
1592018-10-01 Gary Benson <gbenson@redhat.com>
160
161 * gdb_proc_service.h: Synchronize comments and whitespace with
162 GDB's version of this file.
163
49b036f1
TT
1642018-09-25 Tom Tromey <tom@tromey.com>
165
166 * configure: Rebuild.
167 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
168
8ff03f0b
SM
1692018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
170
171 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
172 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
173 ($(IPA_LIB)): Sort IPA_OBJS.
174
a1cd91dc
SM
1752018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
176
177 * Makefile.in: Remove references to $(ADD_DEPS).
178
752312ba
TT
1792018-09-16 Tom Tromey <tom@tromey.com>
180
181 * remote-utils.c (remote_open): Use GNU style for metasyntactic
182 variables.
183 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
184 variables.
185
f1628857
TT
1862018-09-05 Tom Tromey <tom@tromey.com>
187
188 * configure: Rebuild.
189
ad202fcc
SM
1902018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
191
192 PR build/23399
193 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
194
d3d8724a
TT
1952018-08-27 Tom Tromey <tom@tromey.com>
196
197 PR build/23087:
198 * configure: Rebuild.
199
b4f183d2
TT
2002018-08-27 Tom Tromey <tom@tromey.com>
201
202 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
203 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
204 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
205 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
206 (s390x_emit_stack_adjust): Add casts to unsigned char.
207
4e2aa472
SM
2082018-08-22 Simon Marchi <simon.marchi@ericsson.com>
209
210 PR gdb/23374
211 PR gdb/23375
212 * server.h (struct client_state) <disable_randomization>:
213 Initialize to 1.
214
cf4088a9
SM
2152018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
216
217 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
218 variable.
219 (mips_supply_ptrace_register): Likewise.
220
a0de763e
TT
2212018-07-22 Tom Tromey <tom@tromey.com>
222
223 * configure: Rebuild.
224
b0a7723d
TT
2252018-07-22 Tom Tromey <tom@tromey.com>
226
227 * win32-low.c (win32_create_inferior): Remove unused variables.
228 * gdbreplay.c (remote_open): Remove unused variable.
229 * remote-utils.c (remote_prepare): Remove unused variable.
230 * x86-tdesc.h (X86_TDESC_H): Define.
231 (amd64_expedite_regs): Define conditionally.
232 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
233 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
234 * remote-utils.c (readchar): Remove unused variable.
235
a780ef4f
PA
2362018-07-13 Pedro Alves <palves@redhat.com>
237
238 * linux-low.c (linux_kill): Change parameter to process_info
239 pointer instead of pid. Adjust.
240 * lynx-low.c (lynx_kill): Likewise.
241 * nto-low.c (nto_kill): Likewise.
242 * spu-low.c (spu_kill): Likewise.
243 * win32-low.c (win32_kill): Likewise.
244 * server.c (handle_v_kill, kill_inferior_callback)
245 (detach_or_kill_for_exit): Adjust.
246 * target.c (kill_inferior): Change parameter to process_info
247 pointer instead of pid. Adjust.
248 * target.h (struct target_ops) <kill>: Change parameter to
249 process_info pointer instead of pid. Adjust all implementations
250 and callers.
251 (kill_inferior): Likewise.
252
ef2ddb33
PA
2532018-07-13 Pedro Alves <palves@redhat.com>
254
255 * linux-low.c (linux_detach, linux_join): Change parameter to
256 process_info pointer instead of pid. Adjust.
257 * lynx-low.c (lynx_detach, lynx_join): Likewise.
258 * nto-low.c (nto_detach): Likewise.
259 * spu-low.c (spu_detach, spu_join): Likewise.
260 * win32-low.c (win32_detach, win32_join): Likewise.
261 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
262 * target.h (struct target_ops) <detach, join>: Change parameter to
263 process_info pointer instead of pid. Adjust all implementations
264 and callers.
265 (detach_inferior, join_inferior): Rename 'pid' parameter to
266 'proc'.
267
c7ab0aef
SDJ
2682018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
269 Jan Kratochvil <jan.kratochvil@redhat.com>
270 Paul Fertser <fercerpav@gmail.com>
271 Tsutomu Seki <sekiriki@gmail.com>
272
273 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
274 (OBS): Add 'common/netstuff.o'.
275 (GDBREPLAY_OBS): Likewise.
276 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
277 (remote_open): Implement support for IPv6
278 connections.
279 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
280 and 'wspiapi.h'.
281 (handle_accept_event): Accept connections from IPv6 sources.
282 (remote_prepare): Handle IPv6-style hostnames; implement
283 support for IPv6 connections.
284 (remote_open): Implement support for printing connections from
285 IPv6 sources.
286
31445d10
PA
2872018-07-11 Pedro Alves <palves@redhat.com>
288
289 PR gdb/23377
290 * mem-break.c (any_persistent_commands): Add process_info
291 parameter and use it instead of relying on the current process.
292 Change return type to bool.
293 * mem-break.h (any_persistent_commands): Add process_info
294 parameter and change return type to bool.
295 * server.c (handle_detach): Remove require_running_or_return call.
296 Look up the process_info for the process we're about to detach.
297 If not found, return back error to GDB. Adjust
298 any_persistent_commands call to pass down a process pointer.
299
cb197132
PA
3002018-07-11 Pedro Alves <palves@redhat.com>
301
302 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
303 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
304 instead of collect_register_by_name.
305 * regcache.c (regcache_raw_get_unsigned_by_name): New.
306 * regcache.h (regcache_raw_get_unsigned_by_name): New.
307
1b919490
VB
3082018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
309 Pedro Alves <palves@redhat.com>
310
311 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
312
d7e15655
TT
3132018-07-03 Tom Tromey <tom@tromey.com>
314
315 * linux-low.c: Update.
316 * lynx-low.c: Update.
317 * mem-break.c: Update.
318 * nto-low.c: Update.
319 * remote-utils.c: Update.
320 * server.c: Update.
321 * spu-low.c: Update.
322 * target.c: Update.
323 * win32-low.c: Update.
324
26a57c92
TT
3252018-07-03 Tom Tromey <tom@tromey.com>
326
327 * server.c: Update.
328
0e998d96
TT
3292018-07-03 Tom Tromey <tom@tromey.com>
330
331 * linux-low.c: Update.
332
cc6bcb54
TT
3332018-07-03 Tom Tromey <tom@tromey.com>
334
335 * target.c: Update.
336
e38504b3
TT
3372018-07-03 Tom Tromey <tom@tromey.com>
338
339 * linux-low.c: Update.
340 * linux-mips-low.c: Update.
341 * lynx-low.c: Update.
342 * nto-low.c: Update.
343 * remote-utils.c: Update.
344 * server.c: Update.
345 * spu-low.c: Update.
346 * target.c: Update.
347 * thread-db.c: Update.
348
e99b03dc
TT
3492018-07-03 Tom Tromey <tom@tromey.com>
350
351 * linux-low.c: Update.
352 * linux-mips-low.c: Update.
353 * lynx-low.c: Update.
354 * mem-break.c: Update.
355 * nto-low.c: Update.
356 * remote-utils.c: Update.
357 * server.c: Update.
358 * spu-low.c: Update.
359 * target.c: Update.
360 * tracepoint.c: Update.
361
f2907e49
TT
3622018-07-03 Tom Tromey <tom@tromey.com>
363
364 * linux-low.c: Update.
365 * linux-ppc-low.c: Update.
366 * linux-x86-low.c: Update.
367 * proc-service.c: Update.
368 * server.c: Update.
369 * spu-low.c: Update.
370 * thread-db.c: Update.
371 * win32-low.c: Update.
372
fd79271b
TT
3732018-07-03 Tom Tromey <tom@tromey.com>
374
375 * linux-low.c: Update.
376 * lynx-low.c: Update.
377 * nto-low.c: Update.
378 * remote-utils.c: Update.
379 * spu-low.c: Update.
380 * thread-db.c: Update.
381 * win32-low.c: Update.
382
c0867626
SDJ
3832018-06-29 Joel Brobecker <brobecker@adacore.com>
384
385 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
386 parameter in call to 'amd64_create_target_description'.
387
2512d7ef
JK
3882018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
389
390 * x86-tdesc.h: Remove executable permission flag.
391
d0ac1c44
SM
3922018-06-19 Simon Marchi <simon.marchi@ericsson.com>
393
394 * configure.ac: Remove AC_PREREQ, add missing quoting.
395 * configure: Re-generate.
396 * config.in: Re-generate.
397 * aclocal.m4: Re-generate.
398
c4eb05ff
SM
3992018-06-18 Simon Marchi <simon.marchi@ericsson.com>
400
401 * tracepoint.h (current_traceframe): Remove declaration.
402
02895270
AH
4032018-06-18 Alan Hayward <alan.hayward@arm.com>
404
405 * linux-aarch64-low.c (is_sve_tdesc): New function.
406 (aarch64_sve_regs_copy_to_regcache): Likewise.
407 (aarch64_sve_regs_copy_from_regcache): Likewise.
408 (aarch64_regs_info): Add SVE checks.
409 (initialize_low_arch): Initialize SVE.
410
e9902bfc
AH
4112018-06-18 Alan Hayward <alan.hayward@arm.com>
412
413 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
414
fefa175e
AH
4152018-06-11 Alan Hayward <alan.hayward@arm.com>
416
417 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
418 (initialize_low_tracepoint): Likewise
419 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
420 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
421 param.
422 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
423 checks.
424 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
425
b91ad3ff
AH
4262018-06-11 Alan Hayward <alan.hayward@arm.com>
427
428 * server.h (PBUFSIZ): Increase size
429
f868386e
AH
4302018-06-11 Alan Hayward <alan.hayward@arm.com>
431
432 * regcache.c (regcache::raw_compare): New function.
433 * regcache.h (regcache::raw_compare): New declaration.
434
9c861883
AH
4352018-06-11 Alan Hayward <alan.hayward@arm.com>
436
437 * regcache.c (new_register_cache): Use new.
438 (free_register_cache): Use delete.
439 (register_data): Use const.
440 (supply_register): Move body inside regcache.
441 (regcache::raw_supply): New override function.
442 (collect_register): Move body inside regcache.
443 (regcache::raw_collect): New override function.
444 (regcache::get_register_status): New override function.
445 * regcache.h (struct regcache): Inherit from reg_buffer_common.
446
40591844
TT
4472018-06-09 Tom Tromey <tom@tromey.com>
448
449 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
450 declare queue.
451 (event_queue): Use std::queue.
452 (gdb_event_xfree): Remove.
453 (initialize_event_loop, process_event, wait_for_event): Update.
454
6341380d
SC
4552018-06-08 Stan Cox <scox@redhat.com>
456
457 * win32-low.c (win32_create_inferior): last_ptid and last_status
458 moved to client_state.
459
03349c93
PA
4602018-06-08 Pedro Alves <palves@redhat.com>
461
462 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
463 common/common-exceptions.o, common/common-utils.o,
464 common/errors.o, common/print-utils.o and utils.o.
465 * gdbreplay.c: Include "common-defs.h" instead of the two
466 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
467 string.h or alloca.h.
468 (perror_with_name): Delete.
469 (remote_open): Use xstrdup instead of strdup.
470 (main): Rename to ...
471 (captured_main): ... this.
472 (main): New.
473
8dcc53b3
TT
4742018-06-08 Tom Tromey <tom@tromey.com>
475
476 * linux-low.c (linux_low_read_btrace): Update.
477
c12a5089
SC
4782018-06-04 Stan Cox <scox@redhat.com>
479
480 * server.h (struct client_state): New.
481 * server.c (cont_thread, general_thread, multi_process)
482 (report_fork_events, report_vfork_events, report_exec_events)
483 (report_thread_events, swbreak_feature, hwbreak_feature)
484 (vCont_supported, disable_randomization, pass_signals)
485 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
486 Moved to client_state.
487 * remote-utils.c (remote_debug, noack_mode)
488 (transport_is_reliable): Moved to client_state.
489 * tracepoint.c (current_traceframe): Moved to client_state.
490
491 Update all callers.
492 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
493 linux-low.c, remote-utils.h, target.c: Use client_state.
494
122394f1
AH
4952018-05-31 Alan Hayward <alan.hayward@arm.com>
496
497 * configure.srv: Add new c/h file.
498
95228a0d
AH
4992018-05-31 Alan Hayward <alan.hayward@arm.com>
500
501 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
502 null VQ.
503
d8dab6c3
MR
5042018-05-25 Maciej W. Rozycki <macro@mips.com>
505
506 * gdb.arch/mips-fpregset-core.exp: New test.
507 * gdb.arch/mips-fpregset-core.c: New test source.
508
81e25b7c
EK
5092018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
510
511 PR server/23198
512 * hostio.c (require_int): Do not report overflow for integers
513 between 0xfffffff and 0x7fffffff.
514
7e947ad3
MR
5152018-05-22 Maciej W. Rozycki <macro@mips.com>
516
517 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
518 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
519 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
520 functions.
521 (the_low_target): Wire them.
522
1d75a658
PFC
5232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
524
525 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
526 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
527 mode. Call collect_register_by_name with vscr using
528 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
529 (ppc_store_vrregset): Add and set vscr_offset variable as in
530 ppc_fill_vrregset. Call supply_register_by_name with vscr using
531 vscr_offset.
532
d078308a
PFC
5332018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
534
535 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
536 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
537 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
538
7273b5fc
PFC
5392018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
540
541 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
542 (ppc_store_vsxregset): Likewise.
543 (ppc_fill_vrregset): Likewise.
544 (ppc_store_vrregset): Likewise.
545 (ppc_fill_evrregset): Likewise.
546 (ppc_store_evrregset): Likewise.
547 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
548 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
549 needed.
550
2e077f5e
PFC
5512018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
552
553 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
554 wordsize of the inferior. Call ppc_linux_target_wordsize.
555
bd64614e
PFC
5562018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
557
558 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
559 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
560 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
561 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
562 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
563 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
564 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
565 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
566 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
567 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
568 (tdesc_powerpc_e500l): Remove.
569 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
570 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
571 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
572 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
573 linux-ppc-tdesc.h.
574 (ppc_arch_setup): Remove target description matching code. Fill a
575 ppc_linux_features struct and call ppc_linux_match_description
576 with it.
577
75d74cca
MR
5782018-05-22 Maciej W. Rozycki <macro@mips.com>
579
580 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
581 width of the requested register exceeds the width of the
582 `ptrace' data type.
583 (mips_cannot_store_register): Likewise.
584
e4439e43
MR
5852018-05-21 Maciej W. Rozycki <macro@mips.com>
586
587 * linux-mips-low.c (mips_fetch_register): New function. Update
588 preceding comment.
589 (mips_store_gregset): Supply 0 rather than $restart for $zero.
590 (the_low_target): Wire `mips_fetch_register'.
591
55271bf9
JB
5922018-05-10 Joel Brobecker <brobecker@adacore.com>
593
594 * lynx-i386-low.c (LYNXOS_178): New macro.
595 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
596 the layout on LynxOS-178.
597 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
598 handle floating point registers that are not supported by
599 LynxOS-178.
600
1a34f210
TT
6012018-05-10 Tom Tromey <tom@tromey.com>
602
603 * configure: Rebuild.
604
190852c8
JB
6052018-05-10 Joel Brobecker <brobecker@adacore.com>
606
607 PR server/23158:
608 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
609 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
610 Use it to set the expedite_regs field in the given tdesc.
611 * x86-tdesc.h: New file.
612 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
613 Adjust following the addition of the new expedite_regs parameter
614 to init_target_desc.
615 * linux-tic6x-low.c (tic6x_read_description): Likewise.
616 * linux-x86-tdesc.c: #include "x86-tdesc.h".
617 (i386_linux_read_description, amd64_linux_read_description):
618 Adjust following the addition of the new expedite_regs parameter
619 to init_target_desc.
620 * lynx-i386-low.c: #include "x86-tdesc.h".
621 (lynx_i386_arch_setup): Adjust following the addition of the new
622 expedite_regs parameter to init_target_desc.
623 * nto-x86-low.c: #include "x86-tdesc.h".
624 (nto_x86_arch_setup): Adjust following the addition of the new
625 expedite_regs parameter to init_target_desc.
626 * win32-i386-low.c: #include "x86-tdesc.h".
627 (i386_arch_setup): Adjust following the addition of the new
628 expedite_regs parameter to init_target_desc.
629
7dbac825
JB
6302018-05-10 Joel Brobecker <brobecker@adacore.com>
631
632 PR server/23158:
633 * win32-low.c (win32_create_inferior): Add call to my_wait
634 setting last_status global.
635
906994d9
JB
6362018-05-10 Joel Brobecker <brobecker@adacore.com>
637
638 PR server/23158:
639 * win32-low.c (create_process): Only call gdb_tilde_expand if
640 inferior_cwd is not NULL.
641
8ee22052
AB
6422018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
643
644 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
645 registers to the cache if their values have changed.
646 (i387_xsave_to_cache): Provide default values for x87 control
647 registers when these features are available, but disabled.
648 * regcache.c (supply_register_by_name_zeroed): New function.
649 * regcache.h (supply_register_by_name_zeroed): Declare new
650 function.
651
aff689d3
TT
6522018-05-07 Tom Tromey <tom@tromey.com>
653
654 * configure: Rebuild.
655
85e26832
TT
6562018-05-04 Tom Tromey <tom@tromey.com>
657
658 * configure: Rebuild.
659
a3b60e45
JK
6602018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
661 Pedro Alves <palves@redhat.com>
662
663 * linux-aarch64-low.c (aarch64_stopped_data_address):
664 Likewise.
665
632e107b
TT
6662018-04-27 Tom Tromey <tom@tromey.com>
667
668 * configure: Rebuild.
669
458412c3
TT
6702018-04-23 Tom Tromey <tom@tromey.com>
671
672 * configure: Rebuild.
673
f31c089e
SM
6742018-04-19 Simon Marchi <simon.marchi@ericsson.com>
675
676 * Makefile.in (depcomp): Add "..".
677 (all_deps_files): New and use it.
678
b319b098
AH
6792018-04-18 Alan Hayward <alan.hayward@arm.com>
680
681 * configure.srv (aarch64*-*-linux*): Don't include xml.
682 (i[34567]86-*-cygwin*): Likewise.
683 (i[34567]86-*-linux*): Likewise.
684 (i[34567]86-*-lynxos*): Likewise.
685 (i[34567]86-*-mingw32ce*): Likewise.
686 (i[34567]86-*-mingw*): Likewise.
687 (i[34567]86-*-nto*): Likewise.
688 (tic6x-*-uclinux): Likewise.
689 (x86_64-*-linux*): Likewise.
690 (x86_64-*-mingw*): Likewise.
691 (x86_64-*-cygwin*): Likewise.
692
3b74854b
AH
6932018-04-18 Alan Hayward <alan.hayward@arm.com>
694
695 * tdesc.c: Remove xml parameter.
696
e98577a9
AH
6972018-04-18 Alan Hayward <alan.hayward@arm.com>
698
699 * server.c (get_features_xml): Remove cast.
700 * tdesc.c (void target_desc::accept): Fill in function.
701 (tdesc_get_features_xml): Remove old xml creation.
702 (print_xml_feature::visit_pre): Add xml vistor.
703 * tdesc.h (struct target_desc): Make xmltarget mutable.
704 (tdesc_get_features_xml): Remove declaration.
705
d278f585
AH
7062018-04-18 Alan Hayward <alan.hayward@arm.com>
707
708 * tdesc.c (tdesc_architecture_name): Add new function.
709 (tdesc_osabi_name): Likewise.
710 (tdesc_get_features_xml): Use new functions.
711
eee8a18d
AH
7122018-04-18 Alan Hayward <alan.hayward@arm.com>
713
714 * tdesc.c (tdesc_create_flags): Remove.
715 (tdesc_add_flag): Likewise.
716 (tdesc_named_type): Likewise.
717 (tdesc_create_union): Likewise.
718 (tdesc_create_struct): Likewise.
719 (tdesc_create_vector): Likewise.
720 (tdesc_add_bitfield): Likewise.
721 (tdesc_add_field): Likewise.
722 (tdesc_set_struct_size): Likewise.
723
82ec9bc7
AH
7242018-04-18 Alan Hayward <alan.hayward@arm.com>
725
726 * tdesc.c (~target_desc): Remove implictly deleted items.
727 (init_target_desc): Iterate all features.
728 (tdesc_get_features_xml): Use vector.
729 (tdesc_create_feature): Create feature.
730 * tdesc.h (tdesc_feature) Remove
731 (target_desc): Add features.
732
ea3e7d71
AH
7332018-04-18 Alan Hayward <alan.hayward@arm.com>
734
735 * Makefile.in: Add common/tdesc.c
736 * tdesc.c (init_target_desc): init all reg_defs from register
737 vector.
738 (tdesc_create_reg): Create tdesc_reg.
739 * tdesc.h (tdesc_feature): Add register vector.
740
17d08cd4
SM
7412018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
742
743 * tdesc.h (struct target_desc) <features>: Change type to
744 std::vector<std::string>.
745 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
746 changes.
747 (tdesc_get_features_xml): Likewise.
748 (tdesc_create_feature): Likewise.
749
5cd3e386
AH
7502018-03-26 Alan Hayward <alan.hayward@arm.com>
751
752 * regcache.c (find_register_by_number): Return a ref.
753 (find_regno): Use references.
754 (register_size): Likewise.
755 (register_data): Likewise.
756 * tdesc.c (target_desc::~target_desc): Remove free calls.
757 (target_desc::operator==): Use std::vector compare.
758 (init_target_desc): Use reference.
759 (tdesc_create_reg): Use reg constructors.
760 * tdesc.h (struct target_desc): Replace pointer with object.
761
dff7492c
AH
7622018-03-23 Alan Hayward <alan.hayward@arm.com>
763
764 * regcache.c (find_register_by_number): Make static.
765 (find_regno): Use find_register_by_number
766 * regcache.h (struct reg): Remove declaration.
767
d80e5242
AH
7682018-03-23 Alan Hayward <alan.hayward@arm.com>
769
770 * tdesc.c (target_desc::~target_desc): Move to here.
771 (target_desc::operator==): Likewise.
772 * tdesc.h (target_desc::~target_desc): Move from here.
773 (target_desc::operator==): Likewise.
774
f69c5afb
AA
7752018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
776
777 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
778
ce29f843
AA
7792018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
780
781 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
782 S390_TDESC_GS.
783 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
784 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
785 and init_registers_s390_gs_linux64.
786
c49bd90b
AA
7872018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
788
789 * linux-s390-low.c (s390_fill_gs): Remove function.
790 (s390_fill_gsbc): Remove function.
791 (s390_regsets): Set fill functions for the guarded storage regsets
792 to NULL.
793
7edb9bd3
AA
7942018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
795
796 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
797 the word size. Add comment.
798 (s390_get_wordsize): New function.
799 (s390_arch_setup): No longer select a temporary tdesc to fetch the
800 pswm with it. Instead, use s390_get_wordsize to determine the
801 word size first and derive the correct tdesc from that directly.
802
39be3c7e
SM
8032018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
804
805 * Makefile.in: Include silent-rules.mk.
806 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
807 (COMPILE): Add ECHO_CXX.
808 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
809 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
810 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
811 (version-generated.c): Add ECHO_GEN.
812 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
813 (IPAGENT_COMPILE): Add ECHO_CXX.
814 (%-generated.c): Add ECHO_REGDAT.
815
3ae9ce5d
TT
8162018-03-14 Tom Tromey <tom@tromey.com>
817
818 PR cli/14977:
819 * ax.c (ax_printf): Special case for NULL.
820
e6a58aa8
SM
8212018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
822
823 * linux-low.c (linux_qxfer_libraries_svr4): Use
824 xml_escape_text_append.
825
f6e8a41e
SM
8262018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
827
828 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
829
b9671caf
SM
8302018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
831
832 * server.c (handle_general_set): Remove unnecessary xstrdup.
833
e80aaf61
SM
8342018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
835
836 * server.c (parse_debug_format_options): Adjust to
837 delim_string_to_char_ptr_vec changes.
838 * thread-db.c (thread_db_load_search): Adjust to
839 dirnames_to_char_ptr_vec changes.
840
b1223e78
MM
8412018-03-01 Markus Metzger <markus.t.metzger@intel.com>
842
843 * target.h (target_enable_btrace, target_disable_btrace)
844 (target_read_btrace, target_read_btrace_conf): Turn macro into
845 inline function. Throw error if target method is not defined.
846 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
847 check for btrace target method. Be prepared to handle exceptions
848 from btrace target methods.
849
81561546
SDJ
8502018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
851
852 * server.c (captured_main): Change order of error message printed
853 when the current working directory cannot be found.
854
25e3c82c
SDJ
8552018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
856
857 * server.c: Include "filenames.h" and "pathstuff.h".
858 (program_name): Delete variable.
859 (program_path): New anonymous class.
860 (get_exec_wrapper): Use "program_path" instead of
861 "program_name".
862 (handle_v_run): Likewise.
863 (captured_main): Likewise.
864 (process_serial_event): Likewise.
865
b4987c95
SDJ
8662018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
867
868 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
869 (OBJS): Add "pathstuff.o".
870 * server.c (current_directory): New global variable.
871 (captured_main): Initialize "current_directory".
872
f46cd62a
AH
8732018-02-26 Alan Hayward <alan.hayward@arm.com>
874
875 * tdesc.c: Use common/tdesc.h.
876 * tdesc.h: Likewise.
877
a543c5ca
AH
8782018-02-20 Alan Hayward <alan.hayward@arm.com>
879 Simon Marchi <simon.marchi@ericsson.com>
880
881 * Makefile.in: Switch order of make rules.
882
b5884fa7
AH
8832018-02-19 Alan Hayward <alan.hayward@arm.com>
884
885 * Makefile.in: Add common directory in build.
886 * configure.ac: Add common reference.
887 * configure: Regenerate.
888
de6242d3
MM
8892018-02-09 Markus Metzger <markus.t.metzger@intel.com>
890
891 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
892 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
893 * spu-low.c (spu_target_ops): Likewise.
894 * win32-low.c (win32_target_ops): Likewise.
895 * server.c (supported_btrace_packets): Report packets unconditionally.
896 * target.h (target_ops) <supports_btrace>: Remove.
897 (target_supports_btrace): Remove.
898
9ee23a85
MM
8992018-02-09 Markus Metzger <markus.t.metzger@intel.com>
900
901 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
902 (handle_btrace_disable): Change return type to void. Use exceptions
903 to report errors.
904 (handle_btrace_general_set): Catch exception and copy message to
905 return message.
906
8ce47547
TT
9072018-02-08 Tom Tromey <tom@tromey.com>
908
909 * linux-low.c (install_software_single_step_breakpoints): Use
910 make_scoped_restore.
911 * inferiors.c (make_cleanup_restore_current_thread): Remove.
912 (do_restore_current_thread_cleanup): Remove.
913 * gdbthread.h (make_cleanup_restore_current_thread): Don't
914 declare.
915
45dd3607
TT
9162018-02-08 Tom Tromey <tom@tromey.com>
917
918 * mem-break.c (set_raw_breakpoint_at): Use
919 gdb::unique_xmalloc_ptr.
920
e671cd59
PA
9212018-01-30 Pedro Alves <palves@redhat.com>
922
923 PR gdb/13211
924 * target.c (target_terminal::terminal_state): Rename to ...
925 (target_terminal::m_terminal_state): ... this.
926
a0aad537
JC
9272018-01-19 James Clarke <jrtc27@jrtc27.com>
928
929 * linux-low.c (handle_extended_wait): Surround call to
930 thread_db_notice_clone with #ifdef USE_THREAD_DB.
931
4d9b86e1
SM
9322018-01-17 Simon Marchi <simon.marchi@ericsson.com>
933
934 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
935 linux_ptrace_attach_fail_reason_string now returning an
936 std::string.
937 (linux_attach): Likewise.
938 * thread-db.c (attach_thread): Likewise.
939
f517c180
EA
9402018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
941
942 PR gdb/21559
943 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
944 checking for fs_base/gs_base fields in struct user_regs_struct.
945 * configure: Regenerate.
946
9a70f35c
YQ
9472018-01-16 Yao Qi <yao.qi@linaro.org>
948
949 PR gdb/18749
950 * linux-low.c (fetch_register): Call supply_register instead of
951 error.
952
605fd3c6
YQ
9532018-01-08 Yao Qi <yao.qi@linaro.org>
954 Simon Marchi <simon.marchi@ericsson.com>
955
956 * Makefile.in (OBS): Remove selftest.o.
957 * configure.ac: Set srv_selftest_objs if $development is true.
958 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
959 * configure: Re-generated.
960 * server.c (captured_main): Wrap variable selftest_filter with
961 GDB_SELF_TEST.
962
2cc05030
SM
9632018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * server.c (parse_debug_format_options): Return std::string.
966 (handle_monitor_command, captured_main): Adjust.
967
e379cee6
PA
9682018-01-05 Pedro Alves <palves@redhat.com>
969
970 PR gdb/18653
971 * server.c (captured_main): Pass quiet=false to
972 save_original_signals_state.
973
82e1e79a
JB
9742018-01-01 Joel Brobecker <brobecker@adacore.com>
975
976 * gdbreplay.c (gdbreplay_version): Update copyright year in
977 version message.
978 * server.c (gdbserver_version): Likewise.
979
8e481c3b
TT
9802017-12-08 Tom Tromey <tom@tromey.com>
981
982 * ax.c (ax_printf): Update.
983
a8806230
YQ
9842017-12-07 Yao Qi <yao.qi@linaro.org>
985
986 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
987 aarch64_linux_read_description.
988 * linux-amd64-ipa.c (idx2mask): New array.
989 (get_ipa_tdesc): Move idx2mask out.
990 (initialize_low_tracepoint): Initialize target descriptions.
991 * linux-i386-ipa.c (idx2mask): New array.
992 (get_ipa_tdesc): Move idx2mask out.
993 (initialize_low_tracepoint): Initialize target descriptions.
994
d4a0e8b5
SM
9952017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
996
997 * tdesc.c (struct tdesc_type): Change return type.
998 (tdesc_add_flag): Change parameter type.
999 (tdesc_add_bitfield): Likewise.
1000 (tdesc_add_field): Likewise.
1001 (tdesc_set_struct_size): Likewise.
1002
798a7429
SM
10032017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1004
1005 * regcache.c (registers_to_string): Remove unused variable.
1006
c0e15c9b
SM
10072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1008
1009 * inferiors.c (for_each_inferior_with_data): Remove.
1010 * inferiors.h (for_each_inferior_with_data): Remove.
1011 * server.c (handle_qxfer_threads_worker): Change parameter type.
1012 (handle_qxfer_threads_proper): Use for_each_thread.
1013
f0045347
SM
10142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1015
1016 * inferiors.c (for_each_inferior): Remove.
1017 (clear_inferiors): Use for_each_thread.
1018 * inferiors.h (for_each_inferior): Remove.
1019 * linux-low.c (linux_wait_for_event_filtered): Use
1020 for_each_thread.
1021 (linux_stabilize_threads): Likewise.
1022 * regcache.c (regcache_release): Likewise.
1023 * server.c (gdb_wants_all_threads_stopped): Likewise.
1024 (clear_pending_status_callback): Remove.
1025 (handle_status): Use for_each_thread.
1026 (captured_main): Likewise.
1027 * win32-low.c (child_init_thread_list): Likewise.
1028 (win32_clear_inferiors): Likewise.
1029 (fake_breakpoint_event): Likewise.
1030
9521758b
SM
10312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1032
1033 * inferiors.h (find_inferior): Remove.
1034 * inferiors.c (find_inferior): Remove.
1035
8f86d7aa
SM
10362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1037
1038 * linux-low.c (resume_status_pending_p): Update comment.
1039 (need_step_over_p): Update comment.
1040
e2b44075
SM
10412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1042
1043 * linux-low.c (proceed_one_lwp): Return void, change parameter
1044 type.
1045 (unsuspend_and_proceed_one_lwp): Likewise.
1046 (proceed_all_lwps): Use for_each_thread.
1047 (unstop_all_lwps): Likewise.
1048
c80825ff
SM
10492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1050
1051 * linux-low.c (linux_resume_one_thread): Return void, take
1052 parameter directly.
1053 (linux_resume): Use for_each_thread.
1054
df3e4dbe
SM
10552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1056
1057 * linux-low.c (send_sigstop_callback): Return void, change
1058 parameter type. Rename to...
1059 (send_sigstop): ... this.
1060 (suspend_and_send_sigstop_callback): Return void, change parameter
1061 type. Rename to...
1062 (suspend_and_send_sigstop): ... this.
1063 (stop_all_lwps): Use for_each_thread.
1064
5a6b0a41
SM
10652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1066
1067 * linux-low.c (lwp_running): Return bool, remove unused
1068 argument.
1069 (linux_stabilize_threads): Use find_thread.
1070
39a64da5
SM
10712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1072
1073 * linux-low.c (select_singlestep_lwp_callback): Remove.
1074 (count_events_callback): Remove.
1075 (select_event_lwp_callback): Remove.
1076 (select_event_lwp): Use find_thread/for_each_thread.
1077
a1385b7b
SM
10782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1079
1080 * linux-low.c (not_stopped_callback): Return bool, take filter
1081 argument directly.
1082 (linux_wait_for_event_filtered): Use find_thread.
1083 (linux_wait_1): Likewise.
1084
454296a2
SM
10852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * linux-low.c (same_lwp): Remove.
1088 (find_lwp_pid): Use find_thread.
1089
6b2a85da
SM
10902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1091
1092 * linux-low.c (delete_lwp_callback): Remove.
1093 (linux_mourn): Use for_each_thread.
1094
798a38e8
SM
10952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1098 args parameter, don't check for pid.
1099 (linux_detach): Use for_each_thread.
1100
e4eb0dec
SM
11012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1102
1103 * linux-low.c (struct counter): Remove.
1104 (second_thread_of_pid_p): Remove.
1105 (last_thread_of_process_p): Use find_thread.
1106
83e1b6c1
SM
11072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1108
1109 * inferiors.c (find_inferior_in_random): Remove.
1110 * inferiors.h (find_inferior_in_random): Remove.
1111 * linux-low.c (status_pending_p_callback): Return bool, accept
1112 parameter ptid directly.
1113 (linux_wait_for_event_filtered): Use find_thread_in_random.
1114 (linux_wait_1): Likewise.
1115
8dc7b443
SM
11162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1117
1118 * inferiors.c (find_inferior_id): Remove.
1119 (find_thread_ptid): Move implemention from find_inferior_id to
1120 here.
1121 * inferiors.h (find_inferior_id): Remove.
1122 * server.c (handle_status): Use find_thread_ptid.
1123 (process_serial_event): Likewise.
1124 * thread-db.c (find_one_thread): Likewise.
1125 (thread_db_thread_handle): Likewise.
1126 * win32-low.c (thread_rec): Likewise.
1127 (child_delete_thread): Likewise.
1128 (win32_thread_alive): Likewise.
1129 (get_child_debug_event): Likewise.
1130
da25033c
SM
11312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1132
1133 * linux-mips-low.c (update_watch_registers_callback): Return
1134 void, remove pid_p parameter, don't check for pid.
1135 (mips_insert_point, mips_remove_point): Use for_each_thread.
1136
c91bb56b
SM
11372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * lynx.low (lynx_delete_thread_callback): Remove.
1140 (lynx_mourn): Use for_each_thread.
1141
634a3254
SM
11422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1143
1144 * regcache.c (regcache_invalidate_one): Remove.
1145 (regcache_invalidate_pid): use for_each_thread.
1146
41272101
TT
11472017-11-26 Tom Tromey <tom@tromey.com>
1148
1149 * linux-low.c (linux_create_inferior): Update.
1150
f5291a6f
UW
11512017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1152
1153 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1154
6654d750
AH
11552017-11-24 Alan Hayward <alan.hayward@arm.com>
1156
1157 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1158 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1159 * linux-aarch64-tdesc-selftest.c: New file.
1160 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1161
11622017-11-24 Alan Hayward <alan.hayward@arm.com>
1163
1164 * configure.srv: Add new file.
1165 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1166 * linux-aarch64-tdesc-selftest.c: New file.
1167 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1168
49bdb7ee
AH
11692017-11-24 Alan Hayward <alan.hayward@arm.com>
1170
1171 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1172 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1173 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1174
d6d7ce56
AH
11752017-11-24 Alan Hayward <alan.hayward@arm.com>
1176
1177 * configure.srv: Add new files.
1178 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1179 aarch64_linux_read_description.
1180 * linux-aarch64-low.c (aarch64_linux_read_description):
1181 Merge with aarch64_arch_setup.
1182 (aarch64_arch_setup): Call aarch64_linux_read_description.
1183 * linux-aarch64-tdesc.c: New file.
1184 * linux-aarch64-tdesc.h: New file.
1185
506fe5f4
YQ
11862017-11-24 Yao Qi <yao.qi@linaro.org>
1187
1188 * configure.srv: Set $srv_regobj for tic6x-linux.
1189 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1190 (tic6x_read_description): Move some code to tic6x_arch_setup.
1191 (tic6x_tdesc_test): New function.
1192 (initialize_low_arch): Call selftests::register_test.
1193
29f9a567
YQ
11942017-11-22 Yao Qi <yao.qi@linaro.org>
1195
1196 * remote-utils.c (prepare_resume_reply): Use memcpy.
1197
578290ec
SM
11982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1199
1200 * linux-low.c (kill_one_lwp_callback): Return void, take
1201 argument directly, don't filter on pid.
1202 (linux_kill): Use for_each_thread.
1203
eca55aec
SM
12042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * linux-low.c (need_step_over_p): Return bool, remove dummy
1207 argument.
1208 (linux_resume, proceed_all_lwps): Use find_thread.
1209
25c28b4d
SM
12102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1211
1212 * linux-low.c (resume_status_pending_p): Return bool, remove
1213 flag_p argument.
1214 (linux_resume): Use find_thread.
1215
5fdda392
SM
12162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1217
1218 * linux-low.c (struct thread_resume_array): Remove.
1219 (linux_set_resume_request): Return void, take arguments
1220 directly.
1221 (linux_resume): Use for_each_thread.
1222
fcb056a5
SM
12232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1224
1225 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1226 return bool, remove data argument.
1227 (linux_stabilize_threads): Use find_thread.
1228
139720c5
SM
12292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1230
1231 * linux-low.c (unsuspend_one_lwp): Remove.
1232 (unsuspend_all_lwps): Use for_each_thread, inline code from
1233 unsuspend_one_lwp.
1234
6d1e5673
SM
12352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1238 * linux-low.c (struct iterate_over_lwps_args): Remove.
1239 (iterate_over_lwps_filter): Remove.
1240 (iterate_over_lwps): Use find_thread.
1241
bbf550d5
SM
12422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1243
1244 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1245 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1246 code from reset_lwp_ptrace_options_callback.
1247
00192f77
SM
12482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1249
1250 * linux-arm-low.c (struct update_registers_data): Remove.
1251 (update_registers_callback): Return void, take arguments
1252 directly, don't check thread's pid.
1253 (arm_insert_point, arm_remove_point): Use for_each_thread.
1254
2bee2b6c
SM
12552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * win32-low.c (continue_one_thread): Return void, take argument
1258 directly.
1259 (child_continue): Use for_each_thread.
1260
0b360f19
SM
12612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1262
1263 * win32-i386-low.c (update_debug_registers_callback): Rename
1264 to ...
1265 (update_debug_registers): ... this, return void, remove pid_p arg.
1266 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1267
f27866ba
SM
12682017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1269
1270 * inferiors.h (struct process_info): Add constructor, initialize
1271 fields..
1272 <syscalls_to_catch>: Change type to std::vector<int>.
1273 * inferiors.c (add_process): Allocate process_info with new.
1274 (remove_process): Free process_info with delete.
1275 * linux-low.c (handle_extended_wait): Adjust.
1276 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1277 * server.c (handle_general_set): Adjust.
1278
e849ea89
PA
12792017-11-16 Pedro Alves <palves@redhat.com>
1280
1281 * remote-utils.c (remote_close): Block SIGIO signals instead of
1282 uninstalling the SIGIO handler.
1283
1d0aa65c
AH
12842017-11-16 Alan Hayward <alan.hayward@arm.com>
1285
1286 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1287
3491a34c
YQ
12882017-11-16 Yao Qi <yao.qi@linaro.org>
1289
1290 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1291 (tic6x_store_gregset): Likewise.
1292 (tic6x_usrregs_info): Move it up.
1293
a602f924
AH
12942017-11-15 Alan Hayward <alan.hayward@arm.com>
1295
1296 * Makefile.in: Update arch rules.
1297 * configure.srv: Explicitly mark arch/ files.
1298
5616b6c3
AS
12992017-11-13 Andreas Schwab <schwab@suse.de>
1300
1301 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1302 function.
1303 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1304
d1928160
PA
13052017-11-06 Pedro Alves <palves@redhat.com>
1306
1307 * config.in, configure: Regenerate.
1308
bac608e7
SM
13092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1310
1311 * target.c (struct thread_search): Remove.
1312 (thread_search_callback): Remove.
1313 (prepare_to_access_memory): Use for_each_thread instead of
1314 find_inferior. Inline code from thread_search_callback.
1315
eaddb425
SM
13162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1317
1318 * server.c (struct visit_actioned_threads_data): Remove.
1319 (visit_actioned_threads): Change prototype to take arguments
1320 directly.
1321 (resume): Use find_thread instead of find_inferior.
1322
99078d34
SM
13232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1324
1325 * server.c (queue_stop_reply_callback): Change prototype, return
1326 void.
1327 (find_status_pending_thread_callback): Remove.
1328 (handle_status): Replace find_inferior with find_thread and
1329 for_each_thread.
1330
cc628f3d
AH
13312017-10-25 Alan Hayward <alan.hayward@arm.com>
1332
1333 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1334 with REGNO.
1335 (aarch64_store_gregset): Likewise.
1336 (aarch64_fill_fpregset): Likewise.
1337 (aarch64_store_fpregset): Likewise.
1338
4d3bb80e
SM
13392017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * gdbthread.h (find_thread, for_each_thread): New functions.
1342 * inferiors.c (thread_of_pid): Remove.
1343 (find_any_thread_of_pid): Use find_thread.
1344 * linux-low.c (num_lwps): Use for_each_thread.
1345
7a7cdfa0
YQ
13462017-10-17 Yao Qi <yao.qi@linaro.org>
1347
1348 * Makefile.in: Remove one rule.
1349 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1350
e675d170
YQ
13512017-10-17 Yao Qi <yao.qi@linaro.org>
1352
1353 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1354 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1355
7eb4e0f9
YQ
13562017-10-17 Yao Qi <yao.qi@linaro.org>
1357
1358 * configure.srv: Rename arm.o with arch/arm.o.
1359
60d6cfc9
YQ
13602017-10-17 Yao Qi <yao.qi@linaro.org>
1361
1362 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1363 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1364 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1365 (arch-i386.o, arch-amd64.o): Remove rules.
1366 (arch/%.o): New rule.
1367 Update POSTCOMPILE and COMPILE.pre.
1368 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1369 * configure: Re-generated.
1370 * configure.srv: Replace arch-i386.o with arch/i386.o.
1371 Replace arch-amd64.o with arch/amd64.o.
1372
5bfda255
YQ
13732017-10-16 Yao Qi <yao.qi@linaro.org>
1374
1375 * configure: Regenerated.
1376
9c80ecd6
SM
13772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1378
1379 * inferiors.h: (struct inferior_list): Remove.
1380 (struct inferior_list_entry); Remove.
1381 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1382 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1383 get_first_inferior): Remove.
1384 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1385 find_inferior_id, find_inferior_in_random): Change signature.
1386 * inferiors.c (all_threads): Change type to
1387 std::list<thread_info *>.
1388 (get_thread): Remove macro.
1389 (find_inferior, find_inferior_id): Change signature, implement
1390 using find_thread.
1391 (find_inferior_in_random): Change signature, implement using
1392 find_thread_in_random.
1393 (for_each_inferior, for_each_inferior_with_data): Change
1394 signature, implement using for_each_thread.
1395 (add_inferior_to_list, remove_inferior): Remove.
1396 (add_thread, get_first_thread, thread_of_pid,
1397 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1398 (get_first_inferior, one_inferior_p, clear_inferior_list):
1399 Remove.
1400 (clear_inferiors, get_thread_process): Update.
1401 * gdbthread.h: Include <list>.
1402 (struct thread_info) <entry>: Remove field.
1403 <id>: New field.
1404 (all_threads): Change type to std::list<thread_info *>.
1405 (get_first_inferior): Add doc.
1406 (find_thread, for_each_thread, find_thread_in_random): New
1407 functions.
1408 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1409 * linux-arm-low.c (update_registers_callback): Update.
1410 * linux-low.c (second_thread_of_pid_p): Update.
1411 (kill_one_lwp_callback, linux_detach_lwp_callback,
1412 delete_lwp_callback, status_pending_p_callback, same_lwp,
1413 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1414 iterate_over_lwps, not_stopped_callback,
1415 resume_stopped_resumed_lwps, count_events_callback,
1416 select_singlestep_lwp_callback, select_event_lwp_callback,
1417 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1418 suspend_and_send_sigstop_callback, wait_for_sigstop,
1419 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1420 lwp_running, linux_set_resume_request, resume_status_pending_p,
1421 need_step_over_p, start_step_over, linux_resume_one_thread,
1422 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1423 reset_lwp_ptrace_options_callback): Update.
1424 * linux-mips-low.c (update_watch_registers_callback): Update.
1425 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1426 Update.
1427 (free_register_cache_thread_one): Remove.
1428 (regcache_release): Update.
1429 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1430 handle_qxfer_threads_worker): Update.
1431 (handle_query): Update, use list iterator.
1432 (visit_actioned_threads, handle_pending_status,
1433 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1434 clear_pending_status_callback, set_pending_status_callback,
1435 find_status_pending_thread_callback, handle_status,
1436 process_serial_event): Update.
1437 * target.c (thread_search_callback): Update.
1438 * thread-db.c (thread_db_get_tls_address): Update.
1439 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1440 Update.
1441 * win32-i386-low.c (update_debug_registers_callback): Update.
1442 * win32-low.c (delete_thread_info, child_delete_thread,
1443 continue_one_thread, suspend_one_thread,
1444 get_child_debug_event): Adjust.
1445
9179355e
SM
14462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1447
1448 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1449 * inferiors.h: Include <list>.
1450 (struct process_info) <entry>: Remove field.
1451 <pid>: New field.
1452 (pid_of): Change macro to function.
1453 (ptid_of, lwpid_of): Remove macro.
1454 (all_processes): Change type to std::list<process_info *>.
1455 (ALL_PROCESSES): Remove macro.
1456 (for_each_process, find_process): New function.
1457 * inferiors.c (all_processes): Change type to
1458 std::list<process_info *>.
1459 (find_thread_process): Adjust.
1460 (add_process): Likewise.
1461 (remove_process): Likewise.
1462 (find_process_pid): Likewise.
1463 (get_first_process): Likewise.
1464 (started_inferior_callback): Remove.
1465 (have_started_inferiors_p): Adjust.
1466 (attached_inferior_callback): Remove.
1467 (have_attached_inferiors_p): Adjust.
1468 * linux-low.c (check_zombie_leaders): Likewise.
1469 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1470 (x86_linux_update_xmltarget): Adjust.
1471 * server.c (handle_query): Likewise.
1472 (gdb_reattached_process): Remove.
1473 (handle_status): Adjust.
1474 (kill_inferior_callback): Likewise.
1475 (detach_or_kill_inferior): Remove.
1476 (print_started_pid): Likewise.
1477 (print_attached_pid): Likewise.
1478 (detach_or_kill_for_exit): Update.
1479 (process_serial_event): Likewise.
1480 * linux-arm-low.c (arm_new_fork): Likewise.
1481
c9cb8905
SM
14822017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1483
1484 * dll.h: Include <list>.
1485 (struct dll_info): Add constructor.
1486 <entry>: Remove field.
1487 (all_dlls): Change type to std::list<dll_info>.
1488 * dll.c: Include <algorithm>.
1489 (get_dll): Remove macro.
1490 (all_dlls): Change type to std::list<dll_info *>.
1491 (free_one_dll): Remove.
1492 (match_dll): Likewise.
1493 (loaded_dll): Adjust.
1494 (unloaded_dll): Adjust to all_dlls type change, use
1495 std::find_if. Inline code from match_dll.
1496 (clear_dlls): Adjust to all_dlls type change.
1497 * server.c (emit_dll_description): Remove.
1498 (handle_qxfer_libraries): Adjust to all_dlls type change,
1499 integrate emit_dll_description's functionality.
1500
04ec7890
SM
15012017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * linux-low.h (struct linux_target_ops) <delete_process>: New
1504 field.
1505 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1506 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1507 (struct linux_target_ops): Add delete_process callback.
1508 * linux-arm-low.c (arm_delete_process): New.
1509 (struct linux_target_ops): Add delete_process callback.
1510 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1511 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1512 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1513 * linux-mips-low.c (mips_linux_delete_process): New.
1514 (struct linux_target_ops): Add delete_process callback.
1515 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1516 * linux-s390-low.c (struct linux_target_ops): Likewise.
1517 * linux-sh-low.c (struct linux_target_ops): Likewise.
1518 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1519 * linux-tile-low.c (struct linux_target_ops): Likewise.
1520 * linux-x86-low.c (x86_linux_delete_process): New.
1521 (struct linux_target_ops): Add delete_process callback.
1522 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1523
466eecee
SM
15242017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1525
1526 * linux-aarch64-low.c (the_low_target): Add thread delete
1527 callback.
1528 * linux-arm-low.c (arm_delete_thread): New function.
1529 (the_low_target): Add thread delete callback.
1530 * linux-bfin-low.c (the_low_target): Likewise.
1531 * linux-crisv32-low.c (the_low_target): Likewise.
1532 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1533 set.
1534 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1535 field.
1536 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1537 * linux-mips-low.c (mips_linux_delete_thread): New function.
1538 (the_low_target): Add thread delete callback.
1539 * linux-ppc-low.c (the_low_target): Likewise.
1540 * linux-s390-low.c (the_low_target): Likewise.
1541 * linux-sh-low.c (the_low_target): Likewise.
1542 * linux-tic6x-low.c (the_low_target): Likewise.
1543 * linux-tile-low.c (the_low_target): Likewise.
1544 * linux-x86-low.c (the_low_target): Likewise.
1545 * linux-xtensa-low.c (the_low_target): Likewise.
1546
b79f7801
YZ
15472017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1548
1549 * win32-low.c: Include "common-inferior.h".
1550
bc3b087d
SDJ
15512017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1552
1553 * inferiors.c (set_inferior_cwd): New function.
1554 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1555 (handle_query): Inform that QSetWorkingDir is supported.
1556 * win32-low.c (create_process): Pass the inferior's cwd to
1557 CreateProcess.
1558
d092c5a2
SDJ
15592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1560
1561 * inferiors.c (current_inferior_cwd): New global variable.
1562 (get_inferior_cwd): New function.
1563 * inferiors.h (struct process_info) <cwd>: New field.
1564
7da0a886
SDJ
15652017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1566
1567 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1568 (OBS): Add gdb_tilde_expand.o.
1569
289a6840
SM
15702017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1571
1572 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1573 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1574
256642e8
PA
15752017-09-29 Pedro Alves <palves@redhat.com>
1576
1577 * ax.c (gdb_parse_agent_expr): Constify.
1578 * ax.h (gdb_parse_agent_expr): Constify.
1579 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1580 Constify.
1581 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1582 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1583 * remote-utils.h (read_ptid): Constify.
1584 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1585 (process_point_options, process_serial_event): Constify.
1586 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1587 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1588 (cmd_qtbuffer): Constify.
1589
5b9ca4d4
PA
15902017-09-29 Pedro Alves <palves@redhat.com>
1591
1592 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1593 fails.
1594
94c207e0
PA
15952017-09-29 Pedro Alves <palves@redhat.com>
1596
1597 * linux-low.c (handle_extended_wait): Pass parent thread instead
1598 of process to thread_db_notice_clone.
1599 * linux-low.h (thread_db_notice_clone): Replace parent process
1600 parameter with parent thread parameter.
1601 * thread-db.c (find_one_thread): Add comment.
1602 (thread_db_notice_clone): Replace parent process parameter with
1603 parent thread parameter. Temporarily switch to the parent thread.
1604
75352e28
SDJ
16052017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1606
1607 * gdbthread.h: Include "common-gdbthread.h".
1608 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1609 "if" when validating the ptid.
1610 * remote-utils.c: Include "gdbthread.h".
1611 (prepare_resume_reply): Use "switch_to_thread".
1612 * target.c (done_accessing_memory): Likewise.
1613
ad339634
AA
16142017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1615
1616 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1617 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1618 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1619 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1620 s390x-gs-linux64-ipa.o to ipa_obj.
1621 * linux-s390-low.c (HWCAP_S390_GS): New define.
1622 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1623 New functions.
1624 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1625 (s390_arch_setup): Check for guarded-storage support and choose
1626 appropriate tdesc.
1627 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1628 init_registers_s390x_gs_linux64.
1629 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1630 enum value.
1631 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1632 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1633
cc4d742f
SM
16342017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1637
f6327dcb
KB
16382017-09-21 Kevin Buettner <kevinb@redhat.com>
1639
1640 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1641 (thread_db_thread_handle): Declare.
1642 * linux-low.c (linux_target_ops): Initialize thread_handle.
1643 * server.c (handle_qxfer_threads_worker): Add support for
1644 "handle" attribute.
1645 * target.h (struct target_ops): Add new function pointer,
1646 thread_handle.
1647 (target_thread_handle): Define.
1648 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1649 field in lwp.
1650 (thread_db_thread_handle): New function.
1651
86299109
KB
16522017-09-21 Kevin Buettner <kevinb@redhat.com>
1653
1654 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1655 * linux-low.h (thread_db_notice_clone): Declare.
1656 * thread-db.c (thread_db_notice_clone): New function.
1657
f557a88a
PA
16582017-09-21 Pedro Alves <palves@redhat.com>
1659
1660 * server.c (gdb_read_memory, handle_status, process_serial_event)
1661 (handle_serial_event, handle_target_event): Adjust to
1662 set_desired_thread prototype change.
1663 * target.c (set_desired_thread): Remove 'use_general' parameter
1664 and adjust.
1665 * target.h (set_desired_thread): Remove 'use_general' parameter.
1666
223ffa71
TT
16672017-09-20 Tom Tromey <tom@tromey.com>
1668
1669 * target.c (target_terminal::terminal_state): Define.
1670 (target_terminal::init): Rename from target_terminal_init.
1671 (target_terminal::inferior): Rename from
1672 target_terminal_inferior.
1673 (target_terminal::ours): Rename from target_terminal_ours.
1674 (target_terminal::ours_for_output, target_terminal::info): New.
1675
04fd3ba9
SM
16762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1677
1678 * server.c (accumulate_file_name_length): Remove.
1679 (emit_dll_description): Adjust to std::string change.
1680 (handle_qxfer_libraries): Use std::string to hold document.
1681
5e187554
SM
16822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1683
1684 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1685 return type of xml_escape_text.
1686 * server.c (emit_dll_description): Likewise.
1687
1526853e
SM
16882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * server.c (captured_main): Accept argument for --selftest.
1691 Update run_tests call.
1692 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1693 when registering selftests.
1694
c4dfafab
SDJ
16952017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1696
1697 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1698 instead of "VEC" for "target_desc.reg_defs".
1699 (regcache_cpy): Likewise.
1700 (registers_to_string): Likewise.
1701 (registers_from_string): Likewise.
1702 (find_regno): Likewise.
1703 (supply_regblock): Likewise.
1704 (regcache_raw_read_unsigned): Likewise.
1705 * tdesc.c (init_target_desc): Likewise.
1706 (tdesc_create_reg): Likewise.
1707 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1708 (struct target_desc) <reg_defs>: Convert to "std::vector".
1709 (target_desc): Do not initialize "reg_defs".
1710 (~target_desc): Update code to use "std::vector" instead of "VEC"
1711 for "target_desc.reg_defs".
1712 (operator==): Likewise.
1713
124aceb4
SM
17142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1715
1716 * inferiors.h (thread_to_gdb_id): Remove.
1717 * inferiors.c (thread_to_gdb_id): Remove.
1718 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1719 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1720 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1721 Likewise.
1722 * nto-low.c (nto_fetch_registers, nto_store_registers,
1723 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1724
96cde54f
SM
17252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1726
1727 * inferiors.h (gdb_id_to_thread_id): Remove.
1728 * inferiors.c (gdb_id_to_thread_id): Remove.
1729 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1730 removal. Move pid declaration closer to where it's used.
1731
e8ca139e
SM
17322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1733
1734 * server.c (handle_detach): New function.
1735 (process_serial_event): Move code out, call handle_detach.
1736
f8a4e119
SM
17372017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1738
1739 * server.c (require_running): Rename to ...
1740 (require_running_or_return): ... this ...
1741 (require_running_or_break): ... and this.
1742 (handle_query, process_serial_event): Adjust.
1743
0eb0a407
SM
17442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1745
1746 * linux-low.c (linux_set_resume_request): Remove unused
1747 variables.
1748
785922a5
SM
17492017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * server.c (first_thread_of): Remove.
1752 (process_serial_event): Replace usage of first_thread_of with
1753 find_any_thread_of_pid.
1754 * tracepoint.c (same_process_p): Remove.
1755 (gdb_agent_about_to_close): Replace usage of same_process_p with
1756 find_any_thread_of_pid.
1757 * linux-x86-low.c (same_process_callback): Remove.
1758 (x86_arch_setup_process_callback): Replace usage of
1759 same_process_callback with find_any_thread_of_pid.
1760 * thread-db.c (any_thread_of): Remove.
1761 (switch_to_process): Replace usage of any_thread_of with
1762 find_any_thread_of_pid.
1763 * inferiors.c (thread_pid_matches_callback): Remove.
1764 (find_thread_process): Adjust to use find_any_thread_of_pid.
1765
a059f00c
SDJ
17662017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1767
1768 * regcache.c (get_thread_regcache): Guard calls to "memset"
1769 with "!VEC_empty".
1770
cc397f3a
SDJ
17712017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1772
1773 * linux-low.c (handle_extended_wait): Use
1774 "allocate_target_description" instead of "XNEW".
1775 * linux-x86-low.c (initialize_low_arch): Likewise.
1776
22916b07
YQ
17772017-09-05 Yao Qi <yao.qi@linaro.org>
1778
1779 * configure.srv (srv_i386_regobj): Remove.
1780 (srv_amd64_regobj): Remove.
1781 (srv_regobj): Set it to "" for x86 non-linux targets.
1782 * linux-x86-tdesc.c (i386_linux_read_description):
1783 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1784 (init_registers_i386): Remove the declaration.
1785 (tdesc_i386): Remove the declaration.
1786 (lynx_i386_arch_setup): Call i386_create_target_description.
1787 * nto-x86-low.c: Likewise.
1788 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1789 [!__x86_64__]: include arch/i386.h.
1790 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1791
38602d55
YQ
17922017-09-05 Yao Qi <yao.qi@linaro.org>
1793
1794 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1795 i386/amd64-XXX-linux from it.
1796
44b886ff
YQ
17972017-09-05 Yao Qi <yao.qi@linaro.org>
1798
1799 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1800 false.
1801 (ipa_amd64_linux_regobj): Remove.
1802 (ipa_x32_linux_regobj): Remove.
1803
b4570e4b
YQ
18042017-09-05 Yao Qi <yao.qi@linaro.org>
1805
1806 * Makefile.in (arch-amd64.o): New rule.
1807 * configure.srv: Append arch-amd64.o.
1808 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1809 (get_ipa_tdesc): Call amd64_linux_read_description.
1810 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1811 and init_registers_amd64_XXX.
1812 * linux-x86-low.c (x86_linux_read_description): Call
1813 amd64_linux_read_description.
1814 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1815 (initialize_low_arch): Don't call init_registers_x32_XXX and
1816 init_registers_amd64_XXX.
1817 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1818 and tdesc_amd64_XXX.
1819 [__x86_64__] (amd64_tdesc_test): New function.
1820 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1821 and init_registers_amd64_XXX.
1822 * linux-x86-tdesc.c: Include arch/amd64.h.
1823 (xcr0_to_tdesc_idx): New function.
1824 (i386_linux_read_description): New function.
1825 (amd64_get_ipa_tdesc_idx): New function.
1826 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1827 (amd64_get_ipa_tdesc): Declare.
1828
d1f28ea2
YQ
18292017-09-05 Yao Qi <yao.qi@linaro.org>
1830
1831 * configure.srv (srv_i386_linux_xmlfiles): Remove
1832 i386/i386-XXX-linux.xml from it.
1833
25a93583
YQ
18342017-09-05 Yao Qi <yao.qi@linaro.org>
1835
1836 * configure.srv: Set srv_i386_linux_regobj empty if $development
1837 is false.
1838 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1839 initialize_low_tdesc.
1840 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1841 with #if initialize_low_tdesc.
1842 * linux-x86-tdesc-selftest.c: New file.
1843 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1844
5f035c07
YQ
18452017-09-05 Yao Qi <yao.qi@linaro.org>
1846
1847 * Makefile.in (arch-i386.o): New rule.
1848 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1849 (x86_64-*-linux*): Likewise.
1850 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1851 include arch/i386.h.
1852 (i386_linux_read_description): Remove code and call
1853 i386_create_target_description.
1854 * tdesc.c (allocate_target_description): New function.
1855 * tdesc.h (set_tdesc_architecture): Remove declaration.
1856 (set_tdesc_osabi): Likewise.
1857
0abe8a89
YQ
18582017-09-05 Yao Qi <yao.qi@linaro.org>
1859
1860 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1861 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1862 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1863 .xmltarget.
1864 * server.c (get_features_xml): Call tdesc_get_features_xml.
1865 * tdesc.c (set_tdesc_architecture): New function.
1866 (set_tdesc_osabi): New function.
1867 (tdesc_get_features_xml): New function.
1868 (tdesc_create_feature): Add an argument.
1869 * tdesc.h (struct target_desc) <features>: New field.
1870 <arch, osabi>: New field.
1871 (~target_desc): xfree features, arch, and osabi.
1872 (target_desc::oerator==): Don't compare .xmltarget.
1873 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1874 (set_tdesc_osabi): Likewise.
1875 (tdesc_get_features_xml): Likewise.
1876
0a188386
YQ
18772017-09-05 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-x86-tdesc.c: Include selftest.h.
1880 (i386_tdesc_test): New function.
1881 (initialize_low_tdesc): Call selftests::register_test.
1882 * tdesc.h: Include regdef.h.
1883 (target_desc): Override operator == and !=.
1884
f49ff000
YQ
18852017-09-05 Yao Qi <yao.qi@linaro.org>
1886
1887 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1888 (ipa_obj): Likewise.
1889 * linux-i386-ipa.c: Include common/x86-xstate.h
1890 (get_ipa_tdesc): Call i386_linux_read_description.
1891 (initialize_low_tracepoint): Don't call init_registers_XXX
1892 functions, call initialize_low_tdesc instead.
1893 * linux-x86-low.c (x86_linux_read_description): Call
1894 i386_linux_read_description.
1895 (initialize_low_arch): Don't call init_registers_i386_XXX
1896 functions, call initialize_low_tdesc.
1897 * linux-x86-tdesc.c: New file.
1898 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1899 (i386_get_ipa_tdesc_idx): Declare.
1900 (i386_get_ipa_tdesc): Declare.
1901 (initialize_low_tdesc): Declare.
1902
2b68ef2f
YQ
19032017-09-05 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1906 instead of 0.
1907
f7000548
YQ
19082017-09-05 Yao Qi <yao.qi@linaro.org>
1909
1910 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1911 * regcache.c (get_thread_regcache): Use VEC_length.
1912 (init_register_cache): Likewise.
1913 (regcache_cpy): Likewise.
1914 (registers_to_string): Iterate reg_defs via VEC_iterate.
1915 (find_regno): Likewise.
1916 (find_register_by_number): Use VEC_index.
1917 (register_size): Call find_register_by_number.
1918 (register_data): Call find_register_by_number.
1919 (supply_regblock): Use VEC_length.
1920 (regcache_raw_read_unsigned): Likewise.
1921 * tdesc.c (init_target_desc): Iterate reg_defs via
1922 VEC_iterate.
1923 (default_description): Update initializer.
1924 (copy_target_description): Don't update field num_registers.
1925 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1926 <num_registers>: Remove.
1927
50a421ac
SM
19282017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1929
1930 * Makefile.in (.SECONDARY): Define target.
1931
23fdd69e
SM
19322017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1933
1934 * linux-low.c (linux_wait_1): Adjust.
1935 * server.c (queue_stop_reply_callback): Adjust.
1936
0a2dde4a
SDJ
19372017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1938
1939 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1940 QEnvironmentUnset and QEnvironmentReset packets.
1941 (handle_query): Inform remote that QEnvironmentHexEncoded,
1942 QEnvironmentUnset and QEnvironmentReset are supported.
1943
6afd337d
SM
19442017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * inferiors.h (inferior_target_data): Rename to ...
1947 (thread_target_data): ... this.
1948 (inferior_regcache_data): Rename to ...
1949 (thread_regcache_data): ... this.
1950 (set_inferior_regcache_data): Rename to ...
1951 (set_thread_regcache_data): ... this.
1952 * inferiors.c (inferior_target_data): Rename to ...
1953 (thread_target_data): ... this.
1954 (inferior_regcache_data): Rename to ...
1955 (thread_regcache_data): ... this.
1956 (set_inferior_regcache_data): Rename to ...
1957 (set_thread_regcache_data): ... this.
1958 (free_one_thread): Update.
1959 * linux-low.h (get_thread_lwp): Update.
1960 * regcache.c (get_thread_regcache): Update.
1961 (regcache_invalidate_thread): Update.
1962 (free_register_cache_thread): Update.
1963 * win32-i386-low.c (update_debug_registers_callback): Update.
1964 (win32_get_current_dr): Update.
1965 * win32-low.c (thread_rec): Update.
1966 (delete_thread_info): Update.
1967 (continue_one_thread): Update.
1968 (suspend_one_thread): Update.
1969
a160cc46
SM
19702017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1971
1972 * inferiors.c (set_inferior_target_data): Remove.
1973 * inferiors.h (set_inferior_target_data): Remove.
1974
6d580b63
YQ
19752017-08-18 Yao Qi <yao.qi@linaro.org>
1976
1977 * Makefile.in (OBS): Add selftest.o.
1978 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1979 * configure, config.in: Re-generated.
1980 * server.c: Include common/sefltest.h.
1981 (captured_main): Handle option --selftest.
1982
f5a29eb0
YQ
19832017-08-09 Yao Qi <yao.qi@linaro.org>
1984
1985 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1986 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1987 i386-avx-mpx.o and i386-mmx.o.
1988 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1989 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1990 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1991 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1992 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1993 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1994 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1995 i386/amd64-avx-mpx.xml.
1996
57757c2f
YQ
19972017-08-09 Yao Qi <yao.qi@linaro.org>
1998
1999 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2000 and x32-avx-avx512.o.
2001 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2002 i386/x32-avx-avx512.xml.
2003
229d26fc
SM
20042017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * tracepoint.h (enum class fast_tpoint_collect_result): New
2007 enumeration.
2008 (fast_tracepoint_collecting): Change return type to
2009 fast_tpoint_collect_result.
2010 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2011 * linux-low.h: Include tracepoint.h.
2012 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2013 fast_tpoint_collect_result.
2014 * linux-low.c (handle_tracepoints): Adjust.
2015 (linux_fast_tracepoint_collecting): Change return type to
2016 fast_tpoint_collect_result.
2017 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2018 linux_wait_1, stuck_in_jump_pad_callback,
2019 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2020 proceed_one_lwp): Adjust to type change.
2021
2e1e43e1
YQ
20222017-07-10 Yao Qi <yao.qi@linaro.org>
2023
2024 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2025
adc764e7
YQ
20262017-06-29 Yao Qi <yao.qi@linaro.org>
2027
2028 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2029 Remove.
2030 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2031
a206891a
SM
20322017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2035
9a6c7d9c
SDJ
20362017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2037
2038 * linux-low.c (linux_create_inferior): Adjust code to access the
2039 environment information via 'gdb_environ' class.
2040 * lynx-low.c (lynx_create_inferior): Likewise.
2041 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2042 (get_environ): Return a pointer to 'our_environ'.
2043 (captured_main): Initialize 'our_environ'.
2044 * server.h (get_environ): Adjust prototype.
2045 * spu-low.c (spu_create_inferior): Adjust code to access the
2046 environment information via 'gdb_environ' class.
2047
ae3e2ccf
SM
20482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2051 usage of "register" keyword.
2052
3e019bdc
SM
20532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2054
2055 * configure: Re-generate.
2056
8465943a
SM
20572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2058
2059 * configure: Re-generate.
2060
cf0dd6f0
SM
20612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2062
2063 * Makefile.in (COMPILE.pre): Add "-x c++".
2064
9845682b
SDJ
20652017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2066
2067 * fork-child.c: Conditionally include <signal.h>.
2068
aefd8b33
SDJ
20692017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2070
2071 * server.c (handle_general_set): Handle new packet
2072 "QStartupWithShell".
2073 (handle_query): Add "QStartupWithShell" to the list of supported
2074 packets.
2075 (gdbserver_usage): Add help text explaining the
2076 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2077 options.
2078 (captured_main): Recognize and act upon the presence of the new
2079 CLI options.
2080
2090129c
SDJ
20812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2082 Pedro Alves <palves@redhat.com>
2083
2084 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2085 * configure: Regenerate.
2086 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2087 "fork-inferior.o".
2088 (i[34567]86-*-lynxos*): Likewise.
2089 (spu*-*-*): Likewise.
2090 * fork-child.c: New file.
2091 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2092 and "environ.h".
2093 (linux_ptrace_fun): New function.
2094 (linux_create_inferior): Adjust function prototype to reflect
2095 change on "target.h". Adjust function code to use
2096 "fork_inferior".
2097 (linux_request_interrupt): Delete "signal_pid".
2098 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2099 (lynx_ptrace_fun): New function.
2100 (lynx_create_inferior): Adjust function prototype to reflect
2101 change on "target.h". Adjust function code to use
2102 "fork_inferior".
2103 * nto-low.c (nto_create_inferior): Adjust function prototype and
2104 code to reflect change on "target.h". Update comments.
2105 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2106 "common-terminal.h" and "environ.h".
2107 (terminal_fd): Moved to fork-child.c.
2108 (old_foreground_pgrp): Likewise.
2109 (restore_old_foreground_pgrp): Likewise.
2110 (last_status): Make it global.
2111 (last_ptid): Likewise.
2112 (our_environ): New variable.
2113 (startup_with_shell): Likewise.
2114 (program_name): Likewise.
2115 (program_argv): Rename to...
2116 (program_args): ...this.
2117 (wrapper_argv): New variable.
2118 (start_inferior): Delete function.
2119 (get_exec_wrapper): New function.
2120 (get_exec_file): Likewise.
2121 (get_environ): Likewise.
2122 (prefork_hook): Likewise.
2123 (post_fork_inferior): Likewise.
2124 (postfork_hook): Likewise.
2125 (postfork_child_hook): Likewise.
2126 (handle_v_run): Update code to deal with arguments coming from the
2127 remote host. Update calls from "start_inferior" to
2128 "create_inferior".
2129 (captured_main): Likewise. Initialize environment variable. Call
2130 "have_job_control".
2131 * server.h (post_fork_inferior): New prototype.
2132 (get_environ): Likewise.
2133 (last_status): Declare.
2134 (last_ptid): Likewise.
2135 (signal_pid): Likewise.
2136 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2137 (spu_ptrace_fun): New function.
2138 (spu_create_inferior): Adjust function prototype to reflect change
2139 on "target.h". Adjust function code to use "fork_inferior".
2140 * target.c (target_terminal_init): New function.
2141 (target_terminal_inferior): Likewise.
2142 (target_terminal_ours): Likewise.
2143 * target.h: Include <vector>.
2144 (struct target_ops) <create_inferior>: Update prototype.
2145 (create_inferior): Update macro.
2146 * utils.c (gdb_flush_out_err): New function.
2147 * win32-low.c (win32_create_inferior): Adjust function prototype
2148 and code to reflect change on "target.h".
2149
043a4934
SDJ
21502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2151
2152 * inferiors.c (switch_to_thread): New function.
2153
15652511
SDJ
21542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2155
2156 * Makefile.in (SFILE): Add "common/job-control.c".
2157 (OBS): Add "job-control.o".
2158
21ea5acd
SDJ
21592017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2160
2161 * Makefile: Remove "@host_makefile_frag@".
2162
e13cb306
PA
21632017-05-05 Pedro Alves <palves@redhat.com>
2164
2165 * configure: Regenerate.
2166
c94fee56
SDJ
21672017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2168
2169 * configure: Regenerate.
2170
a0ff9e1a
SM
21712017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2172
2173 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2174 software_single_step change of return type to
2175 std::vector<CORE_ADDR>.
2176 * linux-low.c (install_software_single_step_breakpoints):
2177 Likewise.
2178 * linux-low.h (install_software_single_step_breakpoints):
2179 Likewise.
2180
be628ab8
SDJ
21812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2182
2183 * remote-utils.c: Include "gdb_termios.h" instead of
2184 "terminal.h".
2185 * terminal.h: Delete file.
2186
7c5ded6a
SDJ
21872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 * server.c: Include <vector>.
2190 <program_argv, wrapper_argv>: Convert to std::vector.
2191 (start_inferior): Rewrite function to use C++.
2192 (handle_v_run): Likewise. Update code that calculates the argv
2193 based on the vRun packet; use C++.
2194 (captured_main): Likewise.
2195
436252de
SM
21962017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2197
2198 * server.c (handle_v_cont): Initialize thread_resume::thread
2199 with null_ptid.
2200
9bf2a700
PA
22012017-04-05 Pedro Alves <palves@redhat.com>
2202
2203 * configure: Regenerate.
2204
a121b7c1
PA
22052017-04-05 Pedro Alves <palves@redhat.com>
2206
2207 * gdbreplay.c (sync_error): Constify.
2208 * linux-x86-low.c (push_opcode): Constify.
2209
21c8a587
PA
22102017-04-05 Pedro Alves <palves@redhat.com>
2211
2212 * win32-low.c (get_child_debug_event)
2213 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2214 Report TARGET_WAITKIND_SPURIOUS instead.
2215
fb32b4f7
PA
22162017-04-05 Pedro Alves <palves@redhat.com>
2217
2218 * remote-utils.c (remote_prepare, remote_open): Constify.
2219 * remote-utils.h (remote_prepare, remote_open): Constify.
2220 * server.c (captured_main): Constify 'port' handling.
2221
65dd1e59
SM
22222017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2223
2224 * Makefile.in (clean): Clear .deps.
2225
8fa5b777
SM
22262017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2227
2228 * .gitignore: Remove generated files, replace with wildcard.
2229 * (clean): Replace removal of generated files with wildcard.
2230 (version.c): Replace with...
2231 (version-generated.c): ...this.
2232 (xml-builtin.c): Replace with...
2233 (xml-builtin-generated.c): ...this.
2234 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2235 (%.c: *regformats*): Replace with...
2236 (%-generated.c: *regformats*): ...this.
2237
a12e714b
MF
22382017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2239
2240 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2241 (xtensa_fill_gregset): Call collect_register_by_name for
2242 threadptr register.
2243 (xtensa_store_gregset): Call supply_register_by_name for
2244 threadptr register.
2245
1a09b50a
MF
22462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2247
2248 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2249 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2250 (xtensa_store_gregset): Call supply_register for all registers in
2251 a0_regnum..a0_regnum + C0_NREGS range.
2252
1a01e7c6
SM
22532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2254
2255 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2256 (ax-ipa.o: ax.c): Remove.
2257 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2258 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2259 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2260 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2261 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2262
36bc18a8
SM
22632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2264
2265 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2266 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2267 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2268 (errors-ipa.o: ../common/errors.c): Remove.
2269 (format-ipa.o: ../common/format.c): Remove.
2270 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2271
a8ebe3d5
SM
22722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * Makefile.in (%-ipa.o: %.c): New rule.
2275 (tracepoint-ipa.o: tracepoint.c): Remove.
2276 (utils-ipa.o: utils.c): Remove.
2277 (remote-utils-ipa.o: remote-utils.c): Remove.
2278 (regcache-ipa.o: regcache.c): Remove.
2279 (i386-linux-ipa.o: i386-linux.c): Remove.
2280 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2281 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2282 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2283 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2284 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2285 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2286 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2287 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2288 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2289 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2290 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2291 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2292 (aarch64-ipa.o: aarch64.c): Remove.
2293 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2294 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2295 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2296 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2297 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2298 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2299 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2300 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2301 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2302 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2303 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2304 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2305 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2306 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2307 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2308 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2309 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2310 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2311 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2312 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2313 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2314 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2315 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2316 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2317 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2318 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2319 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2320 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2321 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2322 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2323 (tdesc-ipa.o: tdesc.c): Remove.
2324 (x32-linux-ipa.o: x32-linux.c): Remove.
2325 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2326 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2327
50cfacb7
SM
23282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2329
2330 * Makefile.in (%.o: ../arch/%.c): New rule.
2331 (arm.o: ../arch/arm.c): Remove.
2332 (arm-linux.o: ../arch/arm-linux.c): Remove.
2333 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2334 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2335
c5a22423
SM
23362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2337
2338 * Makefile.in (%.o: ../nat/%.c): New rule.
2339 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2340 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2341 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2342 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2343 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2344 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2345 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2346 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2347 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2348 (linux-personality.o: ../nat/linux-personality.c): Remove.
2349 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2350 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2351 (x86-linux.o: ../nat/x86-linux.c): Remove.
2352 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2353 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2354
6bda016b
SM
23552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2356
2357 * Makefile.in (%.o: ../common/%.c): New rule.
2358 (signals.o: ../common/signals.c): Remove.
2359 (print-utils.o: ../common/print-utils.c): Remove.
2360 (rsp-low.o: ../common/rsp-low.c): Remove.
2361 (common-utils.o: ../common/common-utils.c): Remove.
2362 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2363 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2364 (vec.o: ../common/vec.c): Remove.
2365 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2366 (xml-utils.o: ../common/xml-utils.c): Remove.
2367 (ptid.o: ../common/ptid.c): Remove.
2368 (buffer.o: ../common/buffer.c): Remove.
2369 (format.o: ../common/format.c): Remove.
2370 (filestuff.o: ../common/filestuff.c): Remove.
2371 (agent.o: ../common/agent.c): Remove.
2372 (errors.o: ../common/errors.c): Remove.
2373 (environ.o: ../common/environ.c): Remove.
2374 (common-debug.o: ../common/common-debug.c): Remove.
2375 (cleanups.o: ../common/cleanups.c): Remove.
2376 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2377 (fileio.o: ../common/fileio.c): Remove.
2378 (common-regcache.o: ../common/common-regcache.c): Remove.
2379 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2380 (new-op.o: ../common/new-op.c): Remove.
2381 (btrace-common.o: ../common/btrace-common.c): Remove.
2382
21122961
SM
23832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2384
2385 * Makefile.in (%.o: ../target/%.c): New rule.
2386 (waitstatus.o: ../target/waitstatus.c): Remove.
2387
c362e621
SM
23882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2389
2390 * Makefile.in
2391 (%.c: ../regformats/%.dat,
2392 (%.c: ../regformats/arm/%.dat,
2393 (%.c: ../regformats/i386/%.dat,
2394 (%.c: ../regformats/rs6000/%.dat): New rules.
2395 (aarch64.c): Remove.
2396 (reg-arm.c): Remove.
2397 (arm-with-iwmmxt.c): Remove.
2398 (arm-with-vfpv2.c): Remove.
2399 (arm-with-vfpv3.c): Remove.
2400 (arm-with-neon.c): Remove.
2401 (reg-bfin.c): Remove.
2402 (reg-cris.c): Remove.
2403 (reg-crisv32.c): Remove.
2404 (i386.c): Remove.
2405 (i386-linux.c): Remove.
2406 (i386-avx.c): Remove.
2407 (i386-avx-linux.c): Remove.
2408 (i386-avx-avx512.c): Remove.
2409 (i386-avx-avx512-linux.c): Remove.
2410 (i386-mpx.c): Remove.
2411 (i386-mpx-linux.c): Remove.
2412 (i386-avx-mpx-avx512-pku.c): Remove.
2413 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2414 (i386-avx-mpx.c): Remove.
2415 (i386-avx-mpx-linux.c): Remove.
2416 (i386-mmx.c): Remove.
2417 (i386-mmx-linux.c): Remove.
2418 (reg-ia64.c): Remove.
2419 (reg-m32r.c): Remove.
2420 (reg-m68k.c): Remove.
2421 (reg-cf.c): Remove.
2422 (mips-linux.c): Remove.
2423 (mips-dsp-linux.c): Remove.
2424 (mips64-linux.c): Remove.
2425 (mips64-dsp-linux.c): Remove.
2426 (nios2-linux.c): Remove.
2427 (powerpc-32.c): Remove.
2428 (powerpc-32l.c): Remove.
2429 (powerpc-altivec32l.c): Remove.
2430 (powerpc-cell32l.c): Remove.
2431 (powerpc-vsx32l.c): Remove.
2432 (powerpc-isa205-32l.c): Remove.
2433 (powerpc-isa205-altivec32l.c): Remove.
2434 (powerpc-isa205-vsx32l.c): Remove.
2435 (powerpc-e500l.c): Remove.
2436 (powerpc-64l.c): Remove.
2437 (powerpc-altivec64l.c): Remove.
2438 (powerpc-cell64l.c): Remove.
2439 (powerpc-vsx64l.c): Remove.
2440 (powerpc-isa205-64l.c): Remove.
2441 (powerpc-isa205-altivec64l.c): Remove.
2442 (powerpc-isa205-vsx64l.c): Remove.
2443 (s390-linux32.c): Remove.
2444 (s390-linux32v1.c): Remove.
2445 (s390-linux32v2.c): Remove.
2446 (s390-linux64.c): Remove.
2447 (s390-linux64v1.c): Remove.
2448 (s390-linux64v2.c): Remove.
2449 (s390-te-linux64.c): Remove.
2450 (s390-vx-linux64.c): Remove.
2451 (s390-tevx-linux64.c): Remove.
2452 (s390x-linux64.c): Remove.
2453 (s390x-linux64v1.c): Remove.
2454 (s390x-linux64v2.c): Remove.
2455 (s390x-te-linux64.c): Remove.
2456 (s390x-vx-linux64.c): Remove.
2457 (s390x-tevx-linux64.c): Remove.
2458 (tic6x-c64xp-linux.c): Remove.
2459 (tic6x-c64x-linux.c): Remove.
2460 (tic6x-c62x-linux.c): Remove.
2461 (reg-sh.c): Remove.
2462 (reg-sparc64.c): Remove.
2463 (reg-spu.c): Remove.
2464 (amd64.c): Remove.
2465 (amd64-linux.c): Remove.
2466 (amd64-avx.c): Remove.
2467 (amd64-avx-linux.c): Remove.
2468 (amd64-avx-avx512.c): Remove.
2469 (amd64-avx-avx512-linux.c): Remove.
2470 (amd64-mpx.c): Remove.
2471 (amd64-mpx-linux.c): Remove.
2472 (amd64-avx-mpx-avx512-pku.c): Remove.
2473 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2474 (amd64-avx-mpx.c): Remove.
2475 (amd64-avx-mpx-linux.c): Remove.
2476 (x32.c): Remove.
2477 (x32-linux.c): Remove.
2478 (x32-avx.c): Remove.
2479 (x32-avx-linux.c): Remove.
2480 (x32-avx-avx512.c): Remove.
2481 (x32-avx-avx512-linux.c): Remove.
2482 (reg-xtensa.c): Remove.
2483 (reg-tilegx.c): Remove.
2484 (reg-tilegx32.c): Remove.
2485
1672e0d9
SDJ
24862017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2487
2488 * Makefile.in (SFILES): Add "common/environ.c".
2489 (OBJS): Add "common/environ.h".
2490
239b6d10
WT
24912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2492
2493 * configure.ac: Check if the fs_base and gs_base members of
2494 `struct user_regs_struct' exist.
2495 * config.in: Regenerated.
2496 * configure: Likewise.
2497
694b382c
AT
24982017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2499
2500 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2501 target_read_memory.
2502 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2503 (get_next_pcs_syscall_next_pc): Likewise.
2504
7dc53023
LM
25052016-12-23 Luis Machado <lgustavo@codesourcery.com>
2506
2507 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2508 * nto-x86-low.c: Likewise.
2509
ad02e4fe
SM
25102016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2511
2512 * Makefile.in: Include disable-implicit-rules.mk.
2513
dcb07cfa
PA
25142016-11-23 Pedro Alves <palves@redhat.com>
2515
2516 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2517 (debug_vprintf): Use std::chrono::steady_clock instead of
2518 gettimeofday. Use '.' instead of ':'.
2519 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2520 (get_timestamp): Use std::chrono::steady_clock instead of
2521 gettimeofday.
2522
8629c02c
SM
25232016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2524
2525 * Makefile.in: Fix whitespace formatting.
2526
b593ecca
SM
25272016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2528
2529 * Makefile.in (SFILES, OBS): Flatten list and order
2530 alphabetically.
2531
9986ba08
PA
25322016-11-23 Pedro Alves <palves@redhat.com>
2533
2534 * event-loop.c (handle_file_event): Use warning.
2535 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2536 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2537 Use warning.
2538
4eefa7bc
PA
25392016-11-23 Pedro Alves <palves@redhat.com>
2540
2541 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2542 output.
2543 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2544 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2545 debug_printf and debug_flush for debug output.
2546 * server.c (handle_general_set): Likewise.
2547 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2548 output.
2549
5443506e
SM
25502016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2551
2552 * Makefile.in (.c.o): Replace rule with ...
2553 (%.o: %.c): ... this one.
2554
3b165252
SM
25552016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2556
2557 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2558 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2559 make.
2560 * configure.ac: Remove checks for the make program.
2561 * configure: Re-generate.
2562
0bcda685
PA
25632016-10-28 Pedro Alves <palves@redhat.com>
2564
2565 * Makefile.in (CXX_DIALECT): Get from configure.
2566 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2567 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2568 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2569 * config.in: Regenerate.
2570 * configure: Regenerate.
2571
c3805894
YQ
25722016-10-27 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-low.c (linux_supports_range_stepping): Return true if
2575 can_software_single_step return true.
2576
89342618
YQ
25772016-10-27 Yao Qi <yao.qi@linaro.org>
2578
2579 * inferiors.c (find_inferior_in_random): New function.
2580 * inferiors.h (find_inferior_in_random): Declare.
2581 * linux-low.c (linux_wait_for_event_filtered): Call
2582 find_inferior_in_random instead of find_inferior.
2583
e3652c84
YQ
25842016-10-27 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-low.c (linux_wait_1): If single-step breakpoints are
2587 inserted, remove them.
2588
5a04c4cf
PA
25892016-10-26 Pedro Alves <palves@redhat.com>
2590
2591 * linux-low.c (handle_extended_wait): Link parent/child fork
2592 threads.
2593 (linux_wait_1): Unlink them.
2594 (linux_set_resume_request): Ignore resume requests for
2595 already-resumed and unhandled fork child threads.
2596 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2597 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2598 New functions.
2599 (handle_v_requests) <vCont>: Don't call require_running.
2600 * server.h (in_queued_stop_replies): New declaration.
2601
cb93dc7f
YQ
26022016-10-24 Yao Qi <yao.qi@linaro.org>
2603
2604 PR server/20733
2605 * linux-aarch64-low.c (append_insns): Cast the return value to
2606 'uint32_t *'.
2607
a1078bea
YQ
26082016-10-10 Yao Qi <yao.qi@linaro.org>
2609
2610 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2611
1fb77080
SDJ
26122016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2613
2614 * target.c (target_supports_multi_process): New function, moved
2615 from...
2616 * target.h (target_supports_multi_process): ... here. Remove
2617 macro.
2618
39b5a3b9
TT
26192016-10-05 Tom Tromey <tom@tromey.com>
2620
2621 PR remote/20655:
2622 * tracepoint.c (handle_tracepoint_bkpts): Check
2623 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2624
c1d0b70a
YQ
26252016-10-05 Yao Qi <yao.qi@linaro.org>
2626
2627 * configure.srv: Update the path of arm-*.xml files.
2628
0a69eedb
YQ
26292016-10-05 Terry Guo <terry.guo@arm.com>
2630 Yao Qi <yao.qi@linaro.org>
2631
2632 * Makefile.in: Adjust the path of rules.
2633 * configure.srv: Update the path of xml files.
2634 * regformats/arm-with-iwmmxt.dat: Regenerated.
2635 * regformats/arm-with-neon.dat: Likewise.
2636 * regformats/arm-with-vfpv2.dat: Likewise.
2637 * regformats/arm-with-vfpv3.dat Likewise.
2638
17e16485
YQ
26392016-09-30 Yao Qi <yao.qi@linaro.org>
2640
2641 PR gdbserver/20627
2642 * target.c (target_stop_and_wait): Don't call
2643 target_continue_no_signal, use resume_stop instead.
2644
edeeb602
YQ
26452016-09-26 Yao Qi <yao.qi@linaro.org>
2646
2647 * linux-low.c (linux_wait_1): Call debug_exit.
2648
503b1c39
PA
26492016-09-23 Pedro Alves <palves@redhat.com>
2650
2651 * Makefile.in (SFILES): Add common/new-op.c.
2652 (OBS): Add common/new-op.o.
2653 (new-op.o): New rule.
2654
74172ecf
SM
26552016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2656
2657 * .gitinore: Ignore more files.
2658
fc6cda2e
YQ
26592016-09-21 Yao Qi <yao.qi@linaro.org>
2660
2661 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2662 23.
2663
bc1e6c81
SDJ
26642016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2665
2666 * server.c (start_inferior): Call target_mourn_inferior instead of
2667 mourn_inferior; pass ptid_t argument to it.
2668 (resume): Likewise.
2669 (handle_target_event): Likewise.
2670 * target.c (target_mourn_inferior): New function.
2671 * target.h (mourn_inferior): Delete macro.
2672
0e00e962
AA
26732016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2674
2675 * linux-low.c (lwp_is_stepping): New function.
2676
1d8cb77d
CL
26772016-09-06 Carl Love <cel@us.ibm.com>
2678
2679 * server.c (start_inferior): Fixed comment, requested comment change
2680 didn't get updated correctly. Removed reference to ptrace () call as
2681 it is only true on Linux systems.
2682
7313bced
CL
26832016-09-06 Carl Love <cel@us.ibm.com>
2684
2685 * server.c (start_inferior): Do not call
2686 function target_post_create_inferior () if the
2687 inferior process has already exited.
2688
cf6de44d
PA
26892016-09-05 Pedro Alves <palves@redhat.com>
2690
2691 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2692 (COMPILE.pre, CC_LD): Use CXX directly.
2693 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2694 * acinclude.m4: Don't include build-with-cxx.m4.
2695 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2696 * configure: Regenerate.
2697
c1da6748
AT
26982016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2699
2700 PR gdb/19495
2701 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2702 call writing data to own_buf.
2703
f2b9e3df
SDJ
27042016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2705
2706 * target.c (mywait): Call target_wait instead of
2707 the_target->wait.
2708 (target_wait): New function.
2709
049a8570
SDJ
27102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2711
2712 * server.c (start_inferior): New variable 'ptid'. Replace calls
2713 to the_target->resume by target_continue{,_no_signal}, depending
2714 on the case.
2715 * target.c (target_stop_and_wait): Call target_continue_no_signal
2716 instead of the_target->resume.
2717 (target_continue): New function.
2718
3aa5cfa0
AT
27192016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2720
2721 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2722
754653a7
AZ
27232016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2724
2725 PR server/20491
2726 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2727 ps_prochandle.
2728 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2729 * linux-arm-low.c (ps_get_thread_area): Likewise.
2730 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2731 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2732 * linux-mips-low.c (ps_get_thread_area): Likewise.
2733 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2734 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2735 * linux-x86-low.c (ps_get_thread_area): Likewise.
2736 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2737
ed036b40
PA
27382016-08-19 Pedro Alves <palves@redhat.com>
2739
2740 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2741
c8ef42ee
PA
27422016-08-19 Pedro Alves <palves@redhat.com>
2743
2744 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2745 comment. Use memcpy instead of casting through unsigned long.
2746
9c235a72
PA
27472016-08-19 Pedro Alves <palves@redhat.com>
2748
2749 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2750 allocating around 0x80000000.
2751
201506da
PA
27522016-08-19 Pedro Alves <palves@redhat.com>
2753
2754 PR gdb/20415
2755 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2756 (x32-avx512-linux-ipa.o): New rules.
2757 * configure.ac (x86_64-*-linux*): New x32 check.
2758 * configure.srv (ipa_x32_linux_regobj): New.
2759 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2760 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2761 descriptions.
2762 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2763 descriptions.
2764 * configure: Regenerate.
2765
f348d89a
PA
27662016-08-09 Pedro Alves <palves@redhat.com>
2767
2768 PR gdb/18653
2769 * Makefile.in (OBS): Add signals-state-save-restore.o.
2770 (signals-state-save-restore.o): New rule.
2771 * config.in: Regenerate.
2772 * configure: Regenerate.
2773 * linux-low.c: Include "signals-state-save-restore.h".
2774 (linux_create_inferior): Call
2775 restore_original_signals_state.
2776 * server.c: Include "dispositions-save-restore.h".
2777 (captured_main): Call save_original_signals_state.
2778
1baf5149
PA
27792016-08-05 Pedro Alves <palves@redhat.com>
2780
2781 * configure: Regenerate.
2782
fcd4a73d
YQ
27832016-08-04 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-low.c (regsets_fetch_inferior_registers): Check
2786 errno is ESRCH or not.
2787
979659d0
YQ
27882016-08-02 Yao Qi <yao.qi@linaro.org>
2789
2790 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2791 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2792 (thread_db_load_search): Update.
2793 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2794 td_ta_set_event and td_ta_event_getmsg.
2795
6598661d
PA
27962016-07-26 Pedro Alves <palves@redhat.com>
2797
2798 PR server/20414
2799 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2800 of unsigned long for 64-bit registers and use uint32_t instead of
2801 unsigned int for 32-bit registers.
2802
9cf12d57
PA
28032016-07-26 Pedro Alves <palves@redhat.com>
2804
2805 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2806 to 'ptrace'.
2807
305450ed
TT
28082016-07-21 Tom Tromey <tom@tromey.com>
2809
2810 * configure: Rebuild.
2811
2583da7c
YQ
28122016-07-21 Yao Qi <yao.qi@linaro.org>
2813
2814 * mem-break.c (find_gdb_breakpoint): Cast bp to
2815 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2816
21536b36
YQ
28172016-07-21 Yao Qi <yao.qi@linaro.org>
2818
2819 * server.c (handle_v_requests): Support s and S actions
2820 if target_supports_software_single_step return true.
2821
8901d193
YQ
28222016-07-21 Yao Qi <yao.qi@linaro.org>
2823
2824 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2825 is resume_step, call maybe_hw_step.
2826 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2827 and unstop them.
2828 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2829 breakpoints or not.
2830 (proceed_one_lwp): If resume request is resume_step, install
2831 reinsert breakpoints and call maybe_hw_step.
2832
0e9a339e
YQ
28332016-07-21 Yao Qi <yao.qi@linaro.org>
2834
2835 * linux-low.c (proceed_one_lwp): Declare.
2836 (linux_resume_one_thread): Remove local variable 'step'.
2837 Lift code enqueue signal. Call proceed_one_lwp instead of
2838 linux_resume_one_lwp.
2839
4281b351
YQ
28402016-07-21 Yao Qi <yao.qi@linaro.org>
2841
2842 * linux-low.c (linux_resume_one_thread): Call
2843 enqueue_pending_signal.
2844
984a2c04
YQ
28452016-07-21 Yao Qi <yao.qi@linaro.org>
2846
2847 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2848 * inferiors.c (do_restore_current_thread_cleanup): New function.
2849 (make_cleanup_restore_current_thread): Likewise.
2850 * linux-low.c (install_software_single_step_breakpoints): Call
2851 make_cleanup_restore_current_thread. Switch current_thread to
2852 thread.
2853
bec903c9
YQ
28542016-07-21 Yao Qi <yao.qi@linaro.org>
2855
2856 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2857 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2858 (clone_one_breakpoint): Likewise.
2859 (delete_reinsert_breakpoints): Change parameter to thread.
2860 Callers updated.
2861 (has_reinsert_breakpoints): Likewise.
2862 (uninsert_reinsert_breakpoints): Likewise.
2863 (reinsert_reinsert_breakpoints): Likewise.
2864 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2865 (delete_reinsert_breakpoints): Likewise.
2866 (reinsert_reinsert_breakpoints): Likewise.
2867 (uninsert_reinsert_breakpoints): Likewise.
2868 (has_reinsert_breakpoints): Likewise.
2869
63c40ec7
YQ
28702016-07-21 Yao Qi <yao.qi@linaro.org>
2871
2872 * inferiors.c (get_thread_process): Make parameter const.
2873 * inferiors.h (get_thread_process): Update declaration.
2874 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2875 Add new parameters child_thread and parent_thread. Callers
2876 updated.
2877 * mem-break.h (clone_all_breakpoints): Update declaration.
2878
9aa76cd0
YQ
28792016-07-21 Yao Qi <yao.qi@linaro.org>
2880
2881 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2882 <command_list, handler>: Remove.
2883 (struct gdb_breakpoint): New.
2884 (struct other_breakpoint): New.
2885 (struct reinsert_breakpoint): New.
2886 (is_gdb_breakpoint): New function.
2887 (any_persistent_commands): Update command_list if
2888 is_gdb_breakpoint returns true.
2889 (set_breakpoint): Create breakpoints according to their types.
2890 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2891 (set_gdb_breakpoint_1): Likewise.
2892 (set_gdb_breakpoint): Likewise.
2893 (clear_breakpoint_conditions): Change parameter type to
2894 'struct gdb_breakpoint *'.
2895 (clear_breakpoint_commands): Likewise.
2896 (clear_breakpoint_conditions_and_commands): Likewise.
2897 (add_condition_to_breakpoint): Likewise.
2898 (add_breakpoint_condition): Likewise.
2899 (add_commands_to_breakpoint): Likewise.
2900 (check_breakpoints): Check other_breakpoint.
2901 (clone_one_breakpoint): Clone breakpopint according to its type.
2902 * mem-break.h (struct gdb_breakpoint): Declare.
2903 (set_gdb_breakpoint): Update declaration.
2904 (clear_breakpoint_conditions_and_commands): Likewise.
2905 (add_breakpoint_condition): Likewise.
2906 (add_breakpoint_commands): Likewise.
2907 * server.c (process_point_options): Change parameter type to
2908 'struct gdb_breakpoint *'.
2909
811f8301
YQ
29102016-07-21 Yao Qi <yao.qi@linaro.org>
2911
2912 * mem-break.c (set_breakpoint_at): Rename it to ...
2913 (set_breakpoint_type_at): ... it.
2914 (set_breakpoint_at): Call set_breakpoint_type_at.
2915 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2916 * mem-break.h (set_breakpoint_at): Update comments.
2917
b1c51e36
CLT
29182016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2919
2920 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2921 to buf parameter.
2922 (nios2_store_gregset): Likewise.
2923
ced2dffb
PA
29242016-07-01 Pedro Alves <palves@redhat.com>
2925 Antoine Tremblay <antoine.tremblay@ericsson.com>
2926
2927 * linux-low.c: Change interface to take the target lwp_info
2928 pointer directly and return void. Handle detaching from a zombie
2929 thread.
2930 (linux_detach_lwp_callback): New function.
2931 (linux_detach): Detach from the leader thread after detaching from
2932 the clone threads.
2933
2ac09a5b
YQ
29342016-06-28 Yao Qi <yao.qi@linaro.org>
2935
2936 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2937 for variable new_offset.
2938 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2939 (aarch64_ftrace_insn_reloc_cb): Likewise.
2940 (aarch64_ftrace_insn_reloc_tb): Likewise.
2941 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2942 PRIx64 instead of PRIx32.
2943
79e7fd4f
YQ
29442016-06-28 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2947 (the_low_target): Install arm_get_syscall_trapinfo.
2948
061fc021
YQ
29492016-06-28 Yao Qi <yao.qi@linaro.org>
2950
2951 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2952 function.
2953 (the_low_target): Install aarch64_get_syscall_trapinfo.
2954
4cc32bec
YQ
29552016-06-28 Yao Qi <yao.qi@linaro.org>
2956
2957 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2958 Callers updated.
2959 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2960 Remove parameter sysno.
2961 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2962 sysret.
2963
782c1122
AA
29642016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2965
2966 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2967 (s390_emit_ne_goto): Likewise.
2968 (s390_emit_lt_goto): Likewise.
2969 (s390_emit_le_goto): Likewise.
2970 (s390_emit_gt_goto): Likewise.
2971 (s390_emit_ge_goto): Likewise.
2972 (s390x_emit_eq_goto): Likewise.
2973 (s390x_emit_ne_goto): Likewise.
2974 (s390x_emit_lt_goto): Likewise.
2975 (s390x_emit_le_goto): Likewise.
2976 (s390x_emit_gt_goto): Likewise.
2977 (s390x_emit_ge_goto): Likewise.
2978 (s390_emit_ops_impl): Mark variable static.
2979 (s390x_emit_ops): Likewise.
2980
2e7b624b
YQ
29812016-06-17 Yao Qi <yao.qi@linaro.org>
2982
2983 * linux-low.c (handle_extended_wait): Call
2984 uninsert_reinsert_breakpoints for the parent process. Remove
2985 reinsert breakpoints from the child process. Reinsert them to
2986 the parent process when vfork is done.
2987 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2988 (reinsert_reinsert_breakpoints): New function.
2989 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2990 (reinsert_reinsert_breakpoints): Declare.
2991
8a81c5d7
YQ
29922016-06-17 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-low.c (handle_extended_wait): If the parent is doing
2995 step-over, remove the reinsert breakpoints from the forked child.
2996
f50bf8e5
YQ
29972016-06-17 Yao Qi <yao.qi@linaro.org>
2998
2999 * linux-low.c (unsuspend_all_lwps): Declare.
3000 (linux_low_filter_event): If thread exited, call finish_step_over.
3001 If step-over is finished, unsuspend other threads.
3002
8376a3cb
YQ
30032016-06-17 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-low.c (linux_resume_one_lwp_throw): Assert
3006 has_reinsert_breakpoints returns false.
3007 * mem-break.c (delete_disabled_breakpoints): Assert
3008 bp type isn't reinsert_breakpoint.
3009
f79b145d
YQ
30102016-06-17 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-low.c (maybe_hw_step): New function.
3013 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3014 (finish_step_over): Switch current_thread to lwp temporarily,
3015 and assert has_reinsert_breakpoints returns true.
3016 (proceed_one_lwp): Call maybe_hw_step.
3017 * mem-break.c (has_reinsert_breakpoints): New function.
3018 * mem-break.h (has_reinsert_breakpoints): Declare.
3019
0ae534d2
JT
30202016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3021
3022 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3023
fcdad592
YQ
30242016-05-17 Yao Qi <yao.qi@linaro.org>
3025
3026 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3027 instead of find_inferior.
3028
9e784964
YQ
30292016-05-05 Yao Qi <yao.qi@linaro.org>
3030
3031 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3032 Initialize res to zero.
3033
cf2ebb6e
YQ
30342016-05-05 Yao Qi <yao.qi@linaro.org>
3035
3036 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3037 to uint32_t.
3038
c1aebf87
UW
30392016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3040
3041 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3042 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3043 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3044
35fd2deb 30452016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3046 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3047
3048 * tracepoint.c (write_inferior_int8): New function.
3049 (cmd_qtenable_disable): Write enable flag using
3050 write_inferior_int8.
3051
484b3c32
YQ
30522016-04-25 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3055 (need_step_over_p): Return zero if the LWP has pending signals
3056 can be delivered on software single step target.
3057
85ba7d86
YQ
30582016-04-25 Yao Qi <yao.qi@linaro.org>
3059
3060 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3061 return instead of error.
3062
3539aa13
YQ
30632016-04-22 Yao Qi <yao.qi@linaro.org>
3064
3065 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3066 to 23.
3067
5b061e98
YQ
30682016-04-22 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3071 signal when stepping over breakpoint with software single
3072 step.
3073
3451269c
PA
30742016-04-21 Pedro Alves <palves@redhat.com>
3075
3076 * linux-s390-low.c (s390_collect_ptrace_register)
3077 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3078 add casts.
3079 (s390_check_regset): Use void * instead of gdb_byte *.
3080
a2358508
PA
30812016-04-20 Pedro Alves <palves@redhat.com>
3082
3083 * configure: Renegerate.
3084
6885166d
YQ
30852016-04-20 Yao Qi <yao.qi@linaro.org>
3086
3087 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3088 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3089 number 16.
3090 (arm_store_gregset): Likewise.
3091
2b863f51
WT
30922016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3093
3094 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3095 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3096 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3097 (amd64-avx-mpx-linux.c): New rules.
3098 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3099 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3100 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3101 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3102 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3103 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3104 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3105 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3106 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3107 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3108 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3109 * linux-x86-low.c (x86_linux_read_description): Add case for
3110 X86_XSTATE_AVX_MPX_MASK.
3111 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3112 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3113 init_registers_i386_avx_mpx_linux.
3114 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3115 (initialize_low_tracepoint): Call
3116 init_registers_i386_avx_mpx_linux.
3117 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3118 (initialize_low_tracepoint): Call
3119 init_registers_amd64_avx_mpx_linux.
3120 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3121 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3122 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3123 declarations.
3124
9b30624b
PA
31252016-04-18 Pedro Alves <palves@redhat.com>
3126
3127 * configure: Regenerate.
3128
45e3745e
AT
31292016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3130
3131 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3132 (aarch64_emit_sub): Likewise.
3133
2afc13ff
PA
31342016-04-12 Pedro Alves <palves@redhat.com>
3135
3136 * utils.c (prepare_to_throw_exception): Delete.
3137
6e774b13
SM
31382016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3141
4dca19f8
MK
31422016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3143
3144 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3145
d0a9981f
MK
31462016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3147
3148 * linux-aarch64-ipa.c: Add <elf.h> include.
3149 * linux-ppc-ipa.c: Add <elf.h> include.
3150 * linux-s390-ipa.c: Add <elf.h> include.
3151
252db07e
MK
31522016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3153
3154 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3155 (get_raw_reg_ptr): Likewise.
3156 (get_trace_state_variable_value_ptr): Likewise.
3157 (set_trace_state_variable_value_ptr): Likewise.
3158 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3159 char *.
3160
14e2b6d9
MK
31612016-03-31 Wei-cheng Wang <cole945@gmail.com>
3162 Marcin Kościelnicki <koriakin@0x04.net>
3163
3164 PR/17221
3165 * linux-ppc-low.c (emit_insns): New function.
3166 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3167 (ppc_emit_prologue): New function.
3168 (ppc_emit_epilogue): New function.
3169 (ppc_emit_add): New function.
3170 (ppc_emit_sub): New function.
3171 (ppc_emit_mul): New function.
3172 (ppc_emit_lsh): New function.
3173 (ppc_emit_rsh_signed): New function.
3174 (ppc_emit_rsh_unsigned): New function.
3175 (ppc_emit_ext): New function.
3176 (ppc_emit_zero_ext): New function.
3177 (ppc_emit_log_not): New function.
3178 (ppc_emit_bit_and): New function.
3179 (ppc_emit_bit_or): New function.
3180 (ppc_emit_bit_xor): New function.
3181 (ppc_emit_bit_not): New function.
3182 (ppc_emit_equal): New function.
3183 (ppc_emit_less_signed): New function.
3184 (ppc_emit_less_unsigned): New function.
3185 (ppc_emit_ref): New function.
3186 (ppc_emit_const): New function.
3187 (ppc_emit_reg): New function.
3188 (ppc_emit_pop): New function.
3189 (ppc_emit_stack_flush): New function.
3190 (ppc_emit_swap): New function.
3191 (ppc_emit_stack_adjust): New function.
3192 (ppc_emit_call): New function.
3193 (ppc_emit_int_call_1): New function.
3194 (ppc_emit_void_call_2): New function.
3195 (ppc_emit_if_goto): New function.
3196 (ppc_emit_goto): New function.
3197 (ppc_emit_eq_goto): New function.
3198 (ppc_emit_ne_goto): New function.
3199 (ppc_emit_lt_goto): New function.
3200 (ppc_emit_le_goto): New function.
3201 (ppc_emit_gt_goto): New function.
3202 (ppc_emit_ge_goto): New function.
3203 (ppc_write_goto_address): New function.
3204 (ppc_emit_ops_impl): New static variable.
3205 (ppc64v1_emit_prologue): New function.
3206 (ppc64v2_emit_prologue): New function.
3207 (ppc64_emit_epilogue): New function.
3208 (ppc64_emit_add): New function.
3209 (ppc64_emit_sub): New function.
3210 (ppc64_emit_mul): New function.
3211 (ppc64_emit_lsh): New function.
3212 (ppc64_emit_rsh_signed): New function.
3213 (ppc64_emit_rsh_unsigned): New function.
3214 (ppc64_emit_ext): New function.
3215 (ppc64_emit_zero_ext): New function.
3216 (ppc64_emit_log_not): New function.
3217 (ppc64_emit_bit_and): New function.
3218 (ppc64_emit_bit_or): New function.
3219 (ppc64_emit_bit_xor): New function.
3220 (ppc64_emit_bit_not): New function.
3221 (ppc64_emit_equal): New function.
3222 (ppc64_emit_less_signed): New function.
3223 (ppc64_emit_less_unsigned): New function.
3224 (ppc64_emit_ref): New function.
3225 (ppc64_emit_const): New function.
3226 (ppc64v1_emit_reg): New function.
3227 (ppc64v2_emit_reg): New function.
3228 (ppc64_emit_pop): New function.
3229 (ppc64_emit_stack_flush): New function.
3230 (ppc64_emit_swap): New function.
3231 (ppc64v1_emit_call): New function.
3232 (ppc64v2_emit_call): New function.
3233 (ppc64v1_emit_int_call_1): New function.
3234 (ppc64v2_emit_int_call_1): New function.
3235 (ppc64v1_emit_void_call_2): New function.
3236 (ppc64v2_emit_void_call_2): New function.
3237 (ppc64_emit_if_goto): New function.
3238 (ppc64_emit_eq_goto): New function.
3239 (ppc64_emit_ne_goto): New function.
3240 (ppc64_emit_lt_goto): New function.
3241 (ppc64_emit_le_goto): New function.
3242 (ppc64_emit_gt_goto): New function.
3243 (ppc64_emit_ge_goto): New function.
3244 (ppc64v1_emit_ops_impl): New static variable.
3245 (ppc64v2_emit_ops_impl): New static variable.
3246 (ppc_emit_ops): New function.
3247 (linux_low_target): Wire in ppc_emit_ops.
3248
a2174ba4
MK
32492016-03-31 Wei-cheng Wang <cole945@gmail.com>
3250 Marcin Kościelnicki <koriakin@0x04.net>
3251
3252 PR/17221
3253 * Makefile.in: Add powerpc-*-ipa.o
3254 * configure.srv: Add ipa_obj for powerpc*-linux.
3255 * linux-ppc-ipa.c: New file.
3256 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3257 includes.
3258 (PPC_FIELD): New macro.
3259 (PPC_SEXT): New macro.
3260 (PPC_OP6): New macro.
3261 (PPC_BO): New macro.
3262 (PPC_LI): New macro.
3263 (PPC_BD): New macro.
3264 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3265 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3266 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3267 (ppc_get_thread_area): New function.
3268 (is_elfv2_inferior): New function.
3269 (gen_ds_form): New function.
3270 (GEN_STD): New macro.
3271 (GEN_STDU): New macro.
3272 (GEN_LD): New macro.
3273 (GEN_LDU): New macro.
3274 (gen_d_form): New function.
3275 (GEN_ADDI): New macro.
3276 (GEN_ADDIS): New macro.
3277 (GEN_LI): New macro.
3278 (GEN_LIS): New macro.
3279 (GEN_ORI): New macro.
3280 (GEN_ORIS): New macro.
3281 (GEN_LWZ): New macro.
3282 (GEN_STW): New macro.
3283 (GEN_STWU): New macro.
3284 (gen_xfx_form): New function.
3285 (GEN_MFSPR): New macro.
3286 (GEN_MTSPR): New macro.
3287 (GEN_MFCR): New macro.
3288 (GEN_MTCR): New macro.
3289 (GEN_SYNC): New macro.
3290 (GEN_LWSYNC): New macro.
3291 (gen_x_form): New function.
3292 (GEN_OR): New macro.
3293 (GEN_MR): New macro.
3294 (GEN_LWARX): New macro.
3295 (GEN_STWCX): New macro.
3296 (GEN_CMPW): New macro.
3297 (gen_md_form): New function.
3298 (GEN_RLDICL): New macro.
3299 (GEN_RLDICR): New macro.
3300 (gen_i_form): New function.
3301 (GEN_B): New macro.
3302 (GEN_BL): New macro.
3303 (gen_b_form): New function.
3304 (GEN_BNE): New macro.
3305 (GEN_LOAD): New macro.
3306 (GEN_STORE): New macro.
3307 (gen_limm): New function.
3308 (gen_atomic_xchg): New function.
3309 (gen_call): New function.
3310 (ppc_relocate_instruction): New function.
3311 (ppc_install_fast_tracepoint_jump_pad): New function.
3312 (ppc_get_min_fast_tracepoint_insn_len): New function.
3313 (ppc_get_ipa_tdesc_idx): New function.
3314 (the_low_target): Wire in the new functions.
3315 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3316 tdescs.
3317 * linux-ppc-tdesc.h: New file.
3318
a13c4696
MK
33192016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3320
3321 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3322 (alloc_jump_pad_buffer): New function.
3323 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3324 (alloc_jump_pad_buffer): New function.
3325 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3326 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3327 (alloc_jump_pad_buffer): New function.
3328 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3329 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3330 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3331 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3332
1cda1512
MK
33332016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3334
3335 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3336 * linux-amd64-ipa.c: Likewise.
3337 * linux-i386-ipa.c: Likewise.
3338 * linux-s390-ipa.c: Likewise.
3339 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3340 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3341 set_trace_state_variable_value_ptr.
3342 (struct ipa_sym_addresses): Likewise.
3343 (symbol_list): Likewise.
3344 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3345 accessing gdb_collect directly.
3346 (gdb_collect_ptr_type): New typedef.
3347 (get_raw_reg_ptr_type): New typedef.
3348 (get_trace_state_variable_value_ptr_type): New typedef.
3349 (set_trace_state_variable_value_ptr_type): New typedef.
3350 (gdb_collect_ptr): New global.
3351 (get_raw_reg_ptr): New global.
3352 (get_trace_state_variable_value_ptr): New global.
3353 (set_trace_state_variable_value_ptr): New global.
3354 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3355 accessing get_raw_reg directly.
3356 (get_get_tsv_func_addr): Likewise for
3357 get_trace_state_variable_value_ptr.
3358 (get_set_tsv_func_addr): Likewise for
3359 set_trace_state_variable_value_ptr.
3360 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3361
72fb5488
SM
33622016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3363
3364 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3365
28170b88
MK
33662016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3367
3368 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3369 packets.
3370 (relocate_instruction): Remove own_buf.
3371 * server.c (own_buf): Make global.
3372 (handle_v_requests): Make global.
3373 * server.h (own_buf): New declaration.
3374 (handle_v_requests): New prototype.
3375
f39e8743
MK
33762016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3377
3378 PR 18377
3379 * linux-s390-low.c (add_insns): New function.
3380 (s390_emit_prologue): New function.
3381 (s390_emit_epilogue): New function.
3382 (s390_emit_add): New function.
3383 (s390_emit_sub): New function.
3384 (s390_emit_mul): New function.
3385 (s390_emit_lsh): New function.
3386 (s390_emit_rsh_signed): New function.
3387 (s390_emit_rsh_unsigned): New function.
3388 (s390_emit_ext): New function.
3389 (s390_emit_log_not): New function.
3390 (s390_emit_bit_and): New function.
3391 (s390_emit_bit_or): New function.
3392 (s390_emit_bit_xor): New function.
3393 (s390_emit_bit_not): New function.
3394 (s390_emit_equal): New function.
3395 (s390_emit_less_signed): New function.
3396 (s390_emit_less_unsigned): New function.
3397 (s390_emit_ref): New function.
3398 (s390_emit_if_goto): New function.
3399 (s390_emit_goto): New function.
3400 (s390_write_goto_address): New function.
3401 (s390_emit_litpool): New function.
3402 (s390_emit_const): New function.
3403 (s390_emit_call): New function.
3404 (s390_emit_reg): New function.
3405 (s390_emit_pop): New function.
3406 (s390_emit_stack_flush): New function.
3407 (s390_emit_zero_ext): New function.
3408 (s390_emit_swap): New function.
3409 (s390_emit_stack_adjust): New function.
3410 (s390_emit_set_r2): New function.
3411 (s390_emit_int_call_1): New function.
3412 (s390_emit_void_call_2): New function.
3413 (s390_emit_eq_goto): New function.
3414 (s390_emit_ne_goto): New function.
3415 (s390_emit_lt_goto): New function.
3416 (s390_emit_le_goto): New function.
3417 (s390_emit_gt_goto): New function.
3418 (s390_emit_ge_goto): New function.
3419 (s390x_emit_prologue): New function.
3420 (s390x_emit_epilogue): New function.
3421 (s390x_emit_add): New function.
3422 (s390x_emit_sub): New function.
3423 (s390x_emit_mul): New function.
3424 (s390x_emit_lsh): New function.
3425 (s390x_emit_rsh_signed): New function.
3426 (s390x_emit_rsh_unsigned): New function.
3427 (s390x_emit_ext): New function.
3428 (s390x_emit_log_not): New function.
3429 (s390x_emit_bit_and): New function.
3430 (s390x_emit_bit_or): New function.
3431 (s390x_emit_bit_xor): New function.
3432 (s390x_emit_bit_not): New function.
3433 (s390x_emit_equal): New function.
3434 (s390x_emit_less_signed): New function.
3435 (s390x_emit_less_unsigned): New function.
3436 (s390x_emit_ref): New function.
3437 (s390x_emit_if_goto): New function.
3438 (s390x_emit_const): New function.
3439 (s390x_emit_call): New function.
3440 (s390x_emit_reg): New function.
3441 (s390x_emit_pop): New function.
3442 (s390x_emit_stack_flush): New function.
3443 (s390x_emit_zero_ext): New function.
3444 (s390x_emit_swap): New function.
3445 (s390x_emit_stack_adjust): New function.
3446 (s390x_emit_int_call_1): New function.
3447 (s390x_emit_void_call_2): New function.
3448 (s390x_emit_eq_goto): New function.
3449 (s390x_emit_ne_goto): New function.
3450 (s390x_emit_lt_goto): New function.
3451 (s390x_emit_le_goto): New function.
3452 (s390x_emit_gt_goto): New function.
3453 (s390x_emit_ge_goto): New function.
3454 (s390_emit_ops): New function.
3455 (struct linux_target_ops): Fill in emit_ops hook.
3456
abd9baf9
MK
34572016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3458
3459 PR 18377
3460 * Makefile.in: Add s390 IPA files.
3461 * configure.srv: Build IPA for s390.
3462 * linux-s390-ipa.c: New file.
3463 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3464 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3465 (tdesc_s390_linux32): Likewise.
3466 (init_registers_s390_linux32v1): Likewise.
3467 (tdesc_s390_linux32v1): Likewise.
3468 (init_registers_s390_linux32v2): Likewise.
3469 (tdesc_s390_linux32v2): Likewise.
3470 (init_registers_s390_linux64): Likewise.
3471 (tdesc_s390_linux64): Likewise.
3472 (init_registers_s390_linux64v1): Likewise.
3473 (tdesc_s390_linux64v1): Likewise.
3474 (init_registers_s390_linux64v2): Likewise.
3475 (tdesc_s390_linux64v2): Likewise.
3476 (init_registers_s390_te_linux64): Likewise.
3477 (tdesc_s390_te_linux64): Likewise.
3478 (init_registers_s390_vx_linux64): Likewise.
3479 (tdesc_s390_vx_linux64): Likewise.
3480 (init_registers_s390_tevx_linux64): Likewise.
3481 (tdesc_s390_tevx_linux64): Likewise.
3482 (init_registers_s390x_linux64): Likewise.
3483 (tdesc_s390x_linux64): Likewise.
3484 (init_registers_s390x_linux64v1): Likewise.
3485 (tdesc_s390x_linux64v1): Likewise.
3486 (init_registers_s390x_linux64v2): Likewise.
3487 (tdesc_s390x_linux64v2): Likewise.
3488 (init_registers_s390x_te_linux64): Likewise.
3489 (tdesc_s390x_te_linux64): Likewise.
3490 (init_registers_s390x_vx_linux64): Likewise.
3491 (tdesc_s390x_vx_linux64): Likewise.
3492 (init_registers_s390x_tevx_linux64): Likewise.
3493 (tdesc_s390x_tevx_linux64): Likewise.
3494 (have_hwcap_s390_vx): New static variable.
3495 (s390_arch_setup): Fill have_hwcap_s390_vx.
3496 (s390_get_thread_area): New function.
3497 (s390_ft_entry_gpr_esa): New const.
3498 (s390_ft_entry_gpr_zarch): New const.
3499 (s390_ft_entry_misc): New const.
3500 (s390_ft_entry_fr): New const.
3501 (s390_ft_entry_vr): New const.
3502 (s390_ft_main_31): New const.
3503 (s390_ft_main_64): New const.
3504 (s390_ft_exit_fr): New const.
3505 (s390_ft_exit_vr): New const.
3506 (s390_ft_exit_misc): New const.
3507 (s390_ft_exit_gpr_esa): New const.
3508 (s390_ft_exit_gpr_zarch): New const.
3509 (append_insns): New function.
3510 (s390_relocate_instruction): New function.
3511 (s390_install_fast_tracepoint_jump_pad): New function.
3512 (s390_get_min_fast_tracepoint_insn_len): New function.
3513 (s390_get_ipa_tdesc_idx): New function.
3514 (struct linux_target_ops): Wire in the above functions.
3515 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3516 * linux-s390-tdesc.h: New file.
3517
a4105d04
MK
35182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3519
3520 * linux-s390-low.c (s390_supports_tracepoints): New function.
3521 (struct linux_target_ops): Fill supports_tracepoints hook.
3522
35ac8b3e
YQ
35232016-03-18 Yao Qi <yao.qi@linaro.org>
3524
3525 * linux-low.c (lwp_signal_can_be_delivered): New function.
3526 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3527
94610ec4
YQ
35282016-03-18 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3531 0 if signal is enqueued. Remove 'signal' from one debugging
3532 message. Move one debugging message to some lines below.
3533 Remove code setting 'signal' to 0.
3534
80aea927
YQ
35352016-03-18 Yao Qi <yao.qi@linaro.org>
3536
3537 * linux-low.c (linux_low_filter_event): Remove redundant
3538 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3539
b04fd3be
MK
35402016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3541
3542 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3543 (struct linux_target_ops): Wire in the above.
3544
c40c8d4b
YQ
35452016-03-03 Yao Qi <yao.qi@linaro.org>
3546
3547 * linux-low.c: Update comments to start_step_over.
3548
0f8288ae
YQ
35492016-03-03 Yao Qi <yao.qi@linaro.org>
3550
3551 PR server/19736
3552 * linux-low.c (handle_extended_wait): Set child suspended
3553 if event_lwp->bp_reinsert isn't zero.
3554
fdbd04a8
YQ
35552016-03-02 Yao Qi <yao.qi@linaro.org>
3556
3557 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3558 enqueue_pending_signal.
3559
6896a8fa
MK
35602016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3561
3562 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3563 is actually loaded.
3564
ab503087
MK
35652016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3566
3567 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3568 (s390_regmap_3264) [!__s390x__]: New global.
3569 (s390_collect_ptrace_register): Skip map entries containing -1.
3570 (s390_supply_ptrace_register): Ditto.
3571 (s390_fill_gprs_high): New function.
3572 (s390_store_gprs_high): New function.
3573 (s390_regsets): Add NT_S390_HIGH_GPRS.
3574 (s390_get_hwcap): Enable on 31-bit.
3575 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3576 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3577 Detect NT_S390_HIGH_GPRS.
3578 (s390_usrregs_info_3264): Enable on 31-bit.
3579 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3580 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3581
ae91f625
MK
35822016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3583
3584 PR gdb/13808
3585 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3586 * configure.srv: Ditto.
3587 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3588 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3589 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3590 (init_registers_amd64_linux): Remove prototype.
3591 (tdesc_amd64_linux): Remove declaration.
3592 (get_ipa_tdesc): New function.
3593 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3594 initialize remaining tdescs.
3595 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3596 (init_registers_i386_linux): Remove prototype.
3597 (tdesc_i386_linux): Remove declaration.
3598 (get_ipa_tdesc): New function.
3599 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3600 initialize remaining tdescs.
3601 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3602 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3603 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3604 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3605 (x86_get_ipa_tdesc_idx): New function.
3606 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3607 * linux-x86-tdesc.h: New file.
3608 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3609 (target_get_ipa_tdesc_idx): New macro.
3610 * tracepoint.c (ipa_tdesc_idx): New macro.
3611 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3612 (symbol_list): Add ipa_tdesc_idx.
3613 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3614 (ipa_tdesc): Remove.
3615 (ipa_tdesc_idx): New variable.
3616 (get_context_regcache): Use get_ipa_tdesc.
3617 (gdb_collect): Ditto.
3618 (gdb_probe): Ditto.
3619 * tracepoint.h (get_ipa_tdesc): New prototype.
3620 (ipa_tdesc): Remove.
3621
e7ad2f14
PA
36222016-02-24 Pedro Alves <palves@redhat.com>
3623
3624 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3625 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3626 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3627 Factor out common code between the USE_SIGTRAP_SIGINFO and
3628 !USE_SIGTRAP_SIGINFO blocks.
3629 (linux_low_filter_event): Call save_stop_reason instead of
3630 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3631 Update comments.
3632 (linux_wait_1): Update comments.
3633
657f9cde
WW
36342016-02-24 Wei-cheng Wang <cole945@gmail.com>
3635
3636 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3637 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3638 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3639 ppc_insert_point, ppc_remove_point.
3640
b00b61e1
MK
36412016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3642
3643 * linux-s390-low.c (s390_supports_z_point_type): New function.
3644 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3645
553cb527
YQ
36462016-02-16 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3649 PC. Get pc from regcache_read_pc.
3650
a5652c21
YQ
36512016-02-12 Yao Qi <yao.qi@linaro.org>
3652
3653 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3654 or linux_get_pc_32bit.
3655 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3656
ed443b61
YQ
36572016-02-12 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3660 arm_linux_get_next_pcs_fixup.
3661
020ecd38
MK
36622016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3663
3664 * tracepoint.c (x_tracepoint_action_download): Change
3665 write_inferior_data_ptr to write_inferior_data_pointer.
3666 (cmd_qtstart): Likewise.
3667 (write_inferior_data_ptr): Remove.
3668 (download_agent_expr): Change write_inferior_data_ptr to
3669 write_inferior_data_pointer.
3670 (download_tracepoint_1): Likewise.
3671 (download_tracepoint): Likewise.
3672 (download_trace_state_variables): Likewise.
3673
7cae9051
WW
36742016-02-11 Wei-cheng Wang <cole945@gmail.com>
3675 Marcin Kościelnicki <koriakin@0x04.net>
3676
3677 * tracepoint.c (struct tracepoint_action_ops): Remove.
3678 (struct tracepoint_action): Remove ops.
3679 (m_tracepoint_action_download, r_tracepoint_action_download)
3680 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3681 size and offset accordingly.
3682 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3683 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3684 (tracepoint_action_send, tracepoint_action_download): New functions.
3685 Helpers for trace action handlers.
3686 (add_tracepoint_action): Remove setup actions ops.
3687 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3688
9f6a71b4
YQ
36892016-02-10 Yao Qi <yao.qi@linaro.org>
3690
3691 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3692
1e94266c
SM
36932016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3694
3695 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3696 to AC_OUTPUT.
3697 * configure: Regenerate.
3698
8adce034
SM
36992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3700
3701 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3702 void * to gdb_byte *.
3703 * linux-low.c (siginfo_fixup): Likewise.
3704 (linux_xfer_siginfo): Likewise.
3705 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3706 Likewise.
3707 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3708
93813b37
WT
37092016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3710
3711 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3712 to srv_tgtobj.
3713 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3714 to srv_tgtobj.
3715 * linux-x86-low.c [__x86_64__]: Include
3716 "nat/amd64-linux-siginfo.h".
3717 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3718 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3719 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3720 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3721 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3722 (cpt_si_fd, si_timerid, si_overrun): Move from
3723 nat/amd64-linux-siginfo.c.
3724 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3725
8424cc97
SM
37262016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3727
3728 * server.c (skip_to_semicolon): Remove.
3729 (process_point_options): Use strchrnul instead of
3730 skip_to_semicolon.
3731
4d18591b
YQ
37322016-01-26 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3735 * linux-low.c (install_software_single_step_breakpoints): Don't
3736 call regcache_read_pc.
3737 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3738 argument pc.
3739
d8020970
YQ
37402016-01-26 Yao Qi <yao.qi@linaro.org>
3741
3742 * linux-low.c (install_software_single_step_breakpoints): Call
3743 regcache_read_pc instead of get_pc.
3744
8b207339
YQ
37452016-01-26 Yao Qi <yao.qi@linaro.org>
3746
3747 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3748 (unblock_async_io): Rename to ...
3749 (block_unblock_async_io): ... it. New function.
3750 (enable_async_io): Don't install SIGIO handler. Unblock it
3751 instead.
3752 (disable_async_io): Don't ignore SIGIO. Block it instead.
3753 (initialize_async_io): Install SIGIO handler. Don't call
3754 unblock_async_io.
3755
18879fef
YQ
37562016-01-26 Yao Qi <yao.qi@linaro.org>
3757
3758 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3759 first character is '\003', call *the_target->request_interrupt.
3760
a0f8e08a
YQ
37612016-01-25 Yao Qi <yao.qi@linaro.org>
3762
3763 * remote-utils.c (new_thread_notify): Remove.
3764 (dead_thread_notify): Likewise.
3765 * remote-utils.h (new_thread_notify): Remove declaration.
3766 (dead_thread_notify): Likewise.
3767
cc5fd9ab
MK
37682016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3769
3770 * gdb.trace/pending.exp: Fix expected message on continue.
3771
99e8eb11
MK
37722016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3773
3774 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3775 it works properly on big-endian machines where sizeof (CORE_ADDR)
3776 != sizeof (void *).
3777
a994041d
PA
37782016-01-21 Pedro Alves <palves@redhat.com>
3779
3780 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3781 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3782 * configure: Regenerate.
3783
f7a6a40d
YQ
37842016-01-21 Yao Qi <yao.qi@linaro.org>
3785
3786 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3787 is_thumb and set it according to CPSR saved on the stack.
3788 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3789 arm_sigreturn_next_pc.
3790
6f69e520
YQ
37912016-01-18 Yao Qi <yao.qi@linaro.org>
3792
3793 * linux-low.c (linux_set_pc_64bit): New function.
3794 (linux_get_pc_64bit): New function.
3795 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3796 Declare.
3797 * linux-sparc-low.c (debug_threads): Remove declaration.
3798 (sparc_get_pc): Remove.
3799 (the_low_target): Use linux_get_pc_64bit instead of
3800 sparc_get_pc.
3801 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3802 (the_low_target): Use linux_get_pc_64bit and
3803 linux_set_pc_64bit.
3804
276d4552
YQ
38052016-01-18 Yao Qi <yao.qi@linaro.org>
3806
3807 * linux-arm-low.c (debug_threads): Remove declaration.
3808 (arm_get_pc, arm_set_pc): Remove.
3809 (the_low_target): Use linux_get_pc_32bit and
3810 linux_set_pc_32bit.
3811 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3812 (the_low_target): Use linux_get_pc_32bit and
3813 linux_set_pc_32bit.
3814 * linux-cris-low.c (debug_threads): Remove declaration.
3815 (cris_get_pc, cris_set_pc,): Remove.
3816 (the_low_target): Use linux_get_pc_32bit and
3817 linux_set_pc_32bit.
3818 * linux-crisv32-low.c (debug_threads): Remove declaration.
3819 (cris_get_pc, cris_set_pc): Remove.
3820 (the_low_target): Use linux_get_pc_32bit and
3821 linux_set_pc_32bit.
3822 * linux-low.c: Include inttypes.h.
3823 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3824 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3825 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3826 (the_low_target): Use linux_get_pc_32bit and
3827 linux_set_pc_32bit.
3828 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3829 (the_low_target): Use linux_get_pc_32bit and
3830 linux_set_pc_32bit.
3831 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3832 (the_low_target): Use linux_get_pc_32bit and
3833 linux_set_pc_32bit.
3834 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3835 (the_low_target): Use linux_get_pc_32bit and
3836 linux_set_pc_32bit.
3837 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3838 (the_low_target): Use linux_get_pc_32bit and
3839 linux_set_pc_32bit.
3840
eb0edac8
GB
38412016-01-18 Gary Benson <gbenson@redhat.com>
3842
3843 * configure.ac (AC_FUNC_FORK): New check.
3844 * config.in: Regenerate.
3845 * configure: Likewise.
3846
1b451dda
YQ
38472016-01-14 Yao Qi <yao.qi@linaro.org>
3848
3849 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3850 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3851 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3852 arm_get_next_pcs_ctor.
3853
82075af2
JS
38542016-01-12 Josh Stone <jistone@redhat.com>
3855 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3856
3857 * inferiors.h: Include "gdb_vecs.h".
3858 (struct process_info): Add syscalls_to_catch.
3859 * inferiors.c (remove_process): Free syscalls_to_catch.
3860 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3861 syscall_return stops.
3862 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3863 * server.c (handle_general_set): Handle QCatchSyscalls.
3864 (handle_query): Report support for QCatchSyscalls.
3865 * target.h (struct target_ops): Add supports_catch_syscall.
3866 (target_supports_catch_syscall): New macro.
3867 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3868 (struct lwp_info): Add syscall_state.
3869 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3870 Maintain syscall_state and syscalls_to_catch across exec.
3871 (get_syscall_trapinfo): New function, proxy to the_low_target.
3872 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3873 (linux_low_filter_event): Toggle syscall_state entry/return for
3874 syscall traps, and set it ignored for all others.
3875 (gdb_catching_syscalls_p): New function.
3876 (gdb_catch_this_syscall_p): New function.
3877 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3878 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3879 (linux_supports_catch_syscall): New function.
3880 (linux_target_ops): Install it.
3881 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3882 (the_low_target): Install it.
3883
8f13a3ce
MF
38842016-01-12 Mike Frysinger <vapier@gentoo.org>
3885
3886 * acinclude.m4: Include new ../warning.m4 file.
3887 * configure: Regenerated.
3888 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3889
5b3da067
MF
38902016-01-12 Mike Frysinger <vapier@gentoo.org>
3891
3892 * ax.c (is_goto_target): Mark static.
3893 * linux-low.c (register_addr): Likewise.
3894 (linux_fetch_registers, linux_store_registers): Likewise.
3895 * mem-break.c (any_persistent_commands): Fix old prototype.
3896 (add_commands_to_breakpoint): Mark static.
3897 * regcache.c (find_register_by_name): Delete unused func.
3898 * remote-utils.c (hex_or_minus_one): Mark static.
3899 * server.c (monitor_show_help): Mark static.
3900 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3901 handle_v_requests): Likewise.
3902
bc504a31
PA
39032016-01-12 Pedro Alves <palves@redhat.com>
3904
3905 Remove use of the registered trademark symbol throughout.
3906
5a0dd67a
YQ
39072016-01-08 Yao Qi <yao.qi@linaro.org>
3908
3909 * remote-utils.c (getpkt): If c is '\003', call target hook
3910 request_interrupt.
3911
b2ca446f
YQ
39122016-01-06 Yao Qi <yao.qi@linaro.org>
3913
3914 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3915 linux-aarch32-low.c.
3916 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3917 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3918 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3919 (thumb2_breakpoint): Declare.
3920 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3921 linux-aarch32-low.h.
3922 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3923 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3924 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3925
edd88788
JB
39262016-01-01 Joel Brobecker <brobecker@adacore.com>
3927
3928 * gdbreplay.c (gdbreplay_version): Change copyright year in
3929 version message.
3930 * server.c (gdbserver_version): Likewise.
3931
65da7f14
PP
39322015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3933
3934 * server.c (crc32_table): Delete.
3935 (crc32): Use libiberty's xcrc32 function.
3936
4abd5ed2
JB
39372015-12-22 Joel Brobecker <brobecker@adacore.com>
3938
3939 * lynx-low.c (lynx_delete_thread_callback): New function.
3940 (lynx_mourn): Properly delete our process and all of its
3941 threads. Remove call to clear_inferiors.
3942
0e50fe5c
JB
39432015-12-22 Joel Brobecker <brobecker@adacore.com>
3944
3945 * target.c (thread_search_callback): Add check that
3946 the thread_stopped target callback is not NULL before
3947 calling it.
3948
35adc03f
YQ
39492015-12-21 Yao Qi <yao.qi@linaro.org>
3950
3951 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3952 arm breakpoint.
3953
bd2b2909
AT
39542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3955
3956 * server.c (handle_query): Call target_supports_software_single_step.
3957
7fe5e27e
AT
39582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3959
3960 * linux-low.c (single_step): New function.
3961 (linux_resume_one_lwp_throw): Call single_step.
3962 (start_step_over): Likewise.
3963
d9311bfa
AT
39642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3965
3966 * Makefile.in (SFILES): Append arch/arm-linux.c,
3967 arch/arm-get-next-pcs.c.
3968 (arm-linux.o): New rule.
3969 (arm-get-next-pcs.o): New rule.
3970 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3971 arm-linux.o.
3972 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3973 to linux-aarch32-low.c.
3974 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3975 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3976 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3977 (thumb2_breakpoint_len): Likewise.
3978 (arm_is_thumb_mode): Make non-static.
3979 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3980 from linux-aarch32-low.c.
3981 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3982 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3983 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3984 (thumb2_breakpoint_len): Likewise.
3985 (arm_is_thumb_mode): New declaration.
3986 * linux-arm-low.c: Include arch/arm-linux.h
3987 aarch/arm-get-next-pcs.h, sys/syscall.h.
3988 (get_next_pcs_ops): New struct.
3989 (get_next_pcs_addr_bits_remove): New function.
3990 (get_next_pcs_is_thumb): New function.
3991 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3992 (arm_sigreturn_next_pc): Likewise.
3993 (get_next_pcs_syscall_next_pc): Likewise.
3994 (arm_gdbserver_get_next_pcs): Likewise.
3995 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3996 Initialize.
3997 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3998 * server.h: Include gdb_vecs.h.
3999
68ce2059
AT
40002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4001
4002 * Makefile.in (SFILES): Append common/common-regcache.c.
4003 (OBS): Append common-regcache.o.
4004 (common-regcache.o): New rule.
4005 * regcache.c (init_register_cache): Initialize cache to
4006 REG_UNAVAILABLE.
4007 (regcache_raw_read_unsigned): New function.
4008 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4009 register_status enum.
4010
fa5308bd
AT
40112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4012
4013 * linux-aarch64-low.c (the_low_targets): Rename
4014 breakpoint_reinsert_addr to get_next_pcs.
4015 * linux-arm-low.c (the_low_targets): Likewise.
4016 * linux-bfin-low.c (the_low_targets): Likewise.
4017 * linux-cris-low.c (the_low_targets): Likewise.
4018 * linux-crisv32-low.c (the_low_targets): Likewise.
4019 * linux-low.c (can_software_single_step): Likewise.
4020 (install_software_single_step_breakpoints): New function.
4021 (start_step_over): Use install_software_single_step_breakpoints.
4022 * linux-low.h: New CORE_ADDR vector.
4023 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4024 get_next_pcs.
4025 * linux-mips-low.c (the_low_targets): Likewise.
4026 * linux-nios2-low.c (the_low_targets): Likewise.
4027 * linux-sparc-low.c (the_low_targets): Likewise.
4028
4a6ed09b
PA
40292015-12-17 Pedro Alves <palves@redhat.com>
4030
4031 * linux-low.c (linux_kill_one_lwp): Remove references to
4032 LinuxThreads.
4033 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4034 to 'kill'.
4035 (linux_init_signals): Delete.
4036 (initialize_low): Adjust.
4037 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4038
7544db95
PA
40392015-12-16 Pedro Alves <palves@redhat.com>
4040
4041 * configure.ac (compiler warning flags): When testing a
4042 -Wno-foo option, check whether -Wfoo works instead.
4043 * configure: Regenerate.
4044
8020350c
DB
40452015-12-11 Don Breazeal <donb@codesourcery.com>
4046
4047 * server.c (process_serial_event): Don't exit from gdbserver
4048 in remote mode if there are still active inferiors.
4049
db91f502
YQ
40502015-12-11 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4053 arm_breakpoint_at if the process is 32-bit.
4054
b37a6290
YQ
40552015-12-11 Yao Qi <yao.qi@linaro.org>
4056
4057 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4058 arm breakpoint.
4059
17b1509a
YQ
40602015-12-07 Yao Qi <yao.qi@linaro.org>
4061
4062 * configure.srv: Append arm.o to srv_tgtobj for
4063 aarch64*-*-linux* target.
4064 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4065 from linux-arm-low.c.
4066 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4067 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4068 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4069 (thumb2_breakpoint_len): Likewise.
4070 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4071 (arm_breakpoint_kinds): Likewise.
4072 (arm_breakpoint_kind_from_pc): Likewise.
4073 (arm_sw_breakpoint_from_kind): Likewise.
4074 (arm_breakpoint_kind_from_current_state): Likewise.
4075 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4076 (arm_sw_breakpoint_from_kind): Declare.
4077 (arm_breakpoint_kind_from_current_state): Declare.
4078 (arm_breakpoint_at): Declare.
4079 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4080 arm_sw_breakpoint_from_kind if process is 32-bit.
4081 (aarch64_breakpoint_kind_from_pc): New function.
4082 (aarch64_breakpoint_kind_from_current_state): New function.
4083 (the_low_target): Initialize fields breakpoint_kind_from_pc
4084 and breakpoint_kind_from_current_state.
4085 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4086 linux-aarch32-low.c.
4087 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4088 (arm_breakpoint, arm_breakpoint_len): Likewise.
4089 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4090 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4091 (arm_is_thumb_mode): Likewise.
4092 (arm_breakpoint_at): Likewise.
4093 (arm_breakpoint_kind_from_pc): Likewise.
4094 (arm_sw_breakpoint_from_kind): Likewise.
4095 (arm_breakpoint_kind_from_current_state): Likewise.
4096
4097 Revert:
4098 2015-08-04 Yao Qi <yao.qi@linaro.org>
4099
4100 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4101 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4102 * server.c (extended_protocol): Remove "static".
4103 * server.h (extended_protocol): Declare it.
4104
ece66d65
JS
41052015-12-04 Josh Stone <jistone@redhat.com>
4106
4107 * target.h (struct target_ops) <arch_setup>: Rename to ...
4108 (struct target_ops) <post_create_inferior>: ... this.
4109 (target_arch_setup): Rename to ...
4110 (target_post_create_inferior): ... this, calling post_create_inferior.
4111 * server.c (start_inferior): Update target_arch_setup calls to
4112 target_post_create_inferior.
4113 * linux-low.c (linux_low_ptrace_options): Forward declare.
4114 (linux_arch_setup): Update its comment for general use.
4115 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4116 (struct linux_target_ops): Use linux_post_create_inferior.
4117 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4118 to post_create_inferior.
4119 * nto-low.c (struct nto_target_ops): Likewise.
4120 * spu-low.c (struct spu_target_ops): Likewise.
4121 * win32-low.c (struct win32_target_ops): Likewise.
4122
e58c48b4
AT
41232015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4124
4125 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4126
fbec8956
AT
41272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4128
4129 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4130 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4131 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4132 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4133 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4134 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4135 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4136 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4137 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4138 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4139 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4140 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4141
9b4c5f87
AT
41422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4143
4144 * linux-low.c (linux_look_up_symbols): Don't call
4145 linux_supports_traceclone.
4146 * linux-low.h (thread_db_init): Remove use_events argument.
4147 * thread-db.c (thread_db_use_event): Remove global variable.
4148 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4149 (struct thread_db) <td_create_bp>: Remove field.
4150 (thread_db_create_event): Remove function.
4151 (thread_db_enable_reporting): Likewise.
4152 (find_one_thread): Don't check for thread_db_use_events.
4153 (attach_thread): Likewise.
4154 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4155 (try_thread_db_load_1): Don't check for thread_db_use_events.
4156 (thread_db_init): Remove use_events argument and thread events
4157 handling.
4158 (remove_thread_event_breakpoints): Remove function.
4159 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4160
7d00775e
AT
41612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4162
4163 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4164 New function.
4165 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4166 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4167 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4168 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4169 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4170 Initialize.
4171 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4172 New function.
4173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4174 * linux-low.c (can_hardware_single_step): Use
4175 supports_hardware_single_step.
4176 (can_software_single_step): New function.
4177 (start_step_over): Call can_software_single_step.
4178 (linux_supports_hardware_single_step): New function.
4179 (struct target_ops) <supports_software_single_step>: Initialize.
4180 * linux-low.h (struct linux_target_ops)
4181 <supports_hardware_single_step>: Initialize.
4182 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4183 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4184 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4185 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4186 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4187 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4188 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4189 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4190 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4191 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4192 Initialize.
4193 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4194 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4195 Initialize.
4196 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4197 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4198 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4199 New function.
4200 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4201 * target.h (struct target_ops): <supports_software_single_step>:
4202 New field.
4203 (target_supports_software_single_step): New macro.
4204
2d97cd35
AT
42052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4206
4207 * linux-low.c (linux_wait_1): Fix pc advance condition.
4208 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4209 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4210
769ef81f
AT
42112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4212
4213 * linux-arm-low.c (arm_is_thumb_mode): New function.
4214 (arm_breakpoint_at): Use arm_is_thumb_mode.
4215 (arm_breakpoint_kind_from_current_state): New function.
4216 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4217 Initialize.
4218 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4219 (linux_breakpoint_kind_from_current_state): New function.
4220 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4221 * linux-low.h (struct linux_target_ops)
4222 <breakpoint_kind_from_current_state>: New field.
4223 * target.h (struct target_ops): Likewise.
4224 (target_breakpoint_kind_from_current_state): New macro.
4225
1bebeeca
PA
42262015-11-30 Pedro Alves <palves@redhat.com>
4227
4228 * linux-low.c (linux_resume): Wake up the event loop before
4229 returning.
4230
a67a9fae
PA
42312015-11-30 Pedro Alves <palves@redhat.com>
4232
4233 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4234 check.
4235 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4236 to -1.
4237 * target.c (struct thread_search): New structure.
4238 (thread_search_callback): New function.
4239 (prev_general_thread): New global.
4240 (prepare_to_access_memory, done_accessing_memory): New functions.
4241 * target.h (prepare_to_access_memory, done_accessing_memory):
4242 Replace macros with function declarations.
4243
f2faf941
PA
42442015-11-30 Pedro Alves <palves@redhat.com>
4245
4246 PR 14618
4247 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4248 report TARGET_WAITKIND_NO_RESUMED.
4249 * remote-utils.c (prepare_resume_reply): Handle
4250 TARGET_WAITKIND_NO_RESUMED.
4251 * server.c (report_no_resumed): New global.
4252 (handle_query) <qSupported>: Handle "no-resumed+". Report
4253 "no-resumed+" support.
4254 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4255 return error if the client doesn't support no-resumed events.
4256 (push_stop_notification): New function.
4257 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4258 events if the client supports them.
4259
a681f9c9
PA
42602015-11-30 Pedro Alves <palves@redhat.com>
4261
4262 * linux-low.c (thread_still_has_status_pending_p): Don't check
4263 vCont;t here.
4264 (lwp_resumed): New function.
4265 (status_pending_p_callback): Return early if the LWP is not
4266 supposed to be resumed.
4267
65706a29
PA
42682015-11-30 Pedro Alves <palves@redhat.com>
4269
4270 * linux-low.c (handle_extended_wait): Assert that the LWP's
4271 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4272 thread create events, leave the new child's status pending.
4273 (linux_low_filter_event): If GDB wants to hear about thread exit
4274 events, leave the LWP marked dead and don't delete it.
4275 (linux_wait_for_event_filtered): Don't check for thread exit.
4276 (filter_exit_event): New function.
4277 (linux_wait_1): Use it, when returning an exit event.
4278 (linux_resume_one_lwp_throw): Assert that the LWP's
4279 waitstatus is TARGET_WAITKIND_IGNORE.
4280 * remote-utils.c (prepare_resume_reply): Handle
4281 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4282 * server.c (report_thread_events): New global.
4283 (handle_general_set): Handle QThreadEvents.
4284 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4285 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4286 TARGET_WAITKIND_THREAD_EXITED.
4287 * server.h (report_thread_events): Declare.
4288
56cf4bed
PA
42892015-11-30 Pedro Alves <palves@redhat.com>
4290
4291 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4292 the thread's last_resume_kind was resume_stop.
4293
500c1d85
PA
42942015-11-30 Pedro Alves <palves@redhat.com>
4295
4296 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4297 before returning.
4298
de979965
PA
42992015-11-30 Pedro Alves <palves@redhat.com>
4300
4301 * server.c (handle_v_requests): Handle vCtrlC.
4302
34c65914
PA
43032015-11-30 Pedro Alves <palves@redhat.com>
4304
4305 * gdbthread.h (find_any_thread_of_pid): Declare.
4306 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4307 functions.
4308 * server.c (handle_query): If current_thread is NULL, look for
4309 another thread of the selected process.
4310
79efa585 43112015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4312 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4313
4314 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4315 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4316 name in reply.
4317 * target.h (struct target_ops) <thread_name>: New field.
4318 (target_thread_name): New macro.
4319
80d82c19
JB
43202015-11-23 Joel Brobecker <brobecker@adacore.com>
4321
4322 * regcache.h (regcache_invalidate_pid): Add declaration.
4323 * regcache.c (regcache_invalidate_pid): New function, extracted
4324 from regcache_invalidate.
4325 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4326 Add trivial documentation comment.
4327 * lynx-low.c: Use regcache_invalidate_pid instead of
4328 regcache_invalidate.
4329
64da5dd5
JB
43302015-11-23 Joel Brobecker <brobecker@adacore.com>
4331
4332 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4333 and Elf64_auxv_t if the target is Android.
4334
37ce4055
DE
43352015-11-22 Doug Evans <xdje42@gmail.com>
4336
4337 * target.h: #include <sys/types.h>.
4338
06e03fff
PA
43392015-11-19 Pedro Alves <palves@redhat.com>
4340
4341 * linux-low.c (linux_process_qsupported): Change prototype.
4342 Adjust.
4343 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4344 Change prototype.
4345 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4346 and adjust to loop over all features.
4347 * server.c (handle_query) <qSupported>: Adjust to call
4348 target_process_qsupported once, passing it a vector of unprocessed
4349 features.
4350 * target.h (struct target_ops) <process_qsupported>: Change
4351 prototype.
4352 (target_process_qsupported): Adjust.
4353
9a084706
PA
43542015-11-19 Pedro Alves <palves@redhat.com>
4355
4356 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4357 mode.
4358 * configure: Regenerate.
4359
dad44a1f
PA
43602015-11-19 Pedro Alves <palves@redhat.com>
4361
4362 * configure: Regenerate.
4363
231c0592
YQ
43642015-11-19 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4367 type to uint32_t.
4368
6c1c9a8b
YQ
43692015-11-19 Yao Qi <yao.qi@linaro.org>
4370
4371 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4372 (struct aarch64_operand): Move enum out.
4373
9caa3311
YQ
43742015-11-19 Yao Qi <yao.qi@linaro.org>
4375
4376 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4377 struct user_fpsimd_state *.
4378 (aarch64_store_fpregset): Likewise.
4379
6a69a054
YQ
43802015-11-19 Yao Qi <yao.qi@linaro.org>
4381
4382 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4383 struct user_pt_regs *.
4384 (aarch64_store_gregset): Likewise.
4385
1798301e
PA
43862015-11-18 Pedro Alves <palves@redhat.com>
4387
4388 * Makefile.in (all_object_files): Add $IPA_OBJS.
4389
ce7715e2
PA
43902015-11-17 Pedro Alves <palves@redhat.com>
4391
4392 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4393 GDB_SIGNAL_0 and gdb_signal_to_string.
4394
c0879059
PA
43952015-11-17 Pedro Alves <palves@redhat.com>
4396
4397 * win32-low.c (handle_output_debug_string): Remove parameter.
4398 (win32_kill): Remove our_status local and adjust call to
4399 handle_output_debug_string.
4400 (get_child_debug_event): Adjust call to
4401 handle_output_debug_string.
4402
1996e237
SM
44032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4404
4405 * linux-mips-low.c (mips_fill_gregset): Add cast.
4406 (mips_store_gregset): Likewise.
4407 (mips_fill_fpregset): Likewise.
4408 (mips_store_fpregset): Likewise.
4409
cbec665b
SM
44102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4411
4412 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4413 priv.
4414
eb3e3c67
SM
44152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4416
4417 * linux-mips-low.c (mips_linux_new_thread): Change type of
4418 watch_type to enum target_hw_bp_type.
4419
171de4b8
SM
44202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4421
4422 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4423 Change return type to arm_hwbp_type.
4424
04248ead
SM
44252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4426
4427 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4428 (arm_store_gregset): Likewise.
4429 * linux-arm-low.c (arm_get_hwcap): Likewise.
4430 (arm_read_description): Likewise.
4431
04b3479c
SM
44322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4433
4434 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4435
2bc84e8a
SM
44362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4437
4438 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4439 (ppc_fill_vsxregset): Likewise.
4440 (ppc_store_vsxregset): Likewise.
4441 (ppc_fill_vrregset): Likewise.
4442 (ppc_store_vrregset): Likewise.
4443 (ppc_fill_evrregset): Likewise.
4444 (ppc_store_evrregset): Likewise.
4445
e6c5bb05
SM
44462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4447
4448 * linux-ppc-low.c (ppc_usrregs_info): Remove
4449 forward-declaration.
4450 (ppc_arch_setup): Move lower in file.
4451
7ea45d72
SM
44522015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4453
4454 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4455 (ps_pdwrite): Likewise.
4456
69291610
HW
44572015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4458
4459 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4460 to after assert checks.
4461
b42945fd
SM
44622015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4463
4464 * proc-service.c (ps_pdread): Add/adjust casts.
4465 (ps_pdwrite): Add/adjust casts.
4466
d6f85c84
SM
44672015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4468
4469 * server.c (handle_search_memory_1): Cast return value of
4470 memmem.
4471
f98cd059
SM
44722015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4473
4474 * server.c (write_qxfer_response): Change type of data to
4475 gdb_byte *.
4476
d2412fa5
PA
44772015-10-29 Pedro Alves <palves@redhat.com>
4478
4479 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4480
c17414a2
PA
44812015-10-29 Pedro Alves <palves@redhat.com>
4482
4483 * tracepoint.c (clear_installed_tracepoints): Add casts.
4484
e053fbc4
PA
44852015-10-29 Pedro Alves <palves@redhat.com>
4486
4487 * server.c (handle_v_cont, process_serial_event): Add enum
4488 gdb_signal casts to signal parsing code.
4489
add67df8
PA
44902015-10-29 Pedro Alves <palves@redhat.com>
4491
4492 * linux-low.h (NULL_REGSET): Define.
4493 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4494 * linux-arm-low.c (arm_regsets): Likewise.
4495 * linux-crisv32-low.c (cris_regsets): Likewise.
4496 * linux-m68k-low.c (m68k_regsets): Likewise.
4497 * linux-mips-low.c (mips_regsets): Likewise.
4498 * linux-nios2-low.c (nios2_regsets): Likewise.
4499 * linux-ppc-low.c (ppc_regsets): Likewise.
4500 * linux-s390-low.c (s390_regsets): Likewise.
4501 * linux-sh-low.c (sh_regsets): Likewise.
4502 * linux-sparc-low.c (sparc_regsets): Likewise.
4503 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4504 * linux-tile-low.c (tile_regsets): Likewise.
4505 * linux-x86-low.c (x86_regsets): Likewise.
4506 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4507
50bc912a
PA
45082015-10-29 Pedro Alves <palves@redhat.com>
4509
4510 * linux-low.h (NULL_REGSET): Define.
4511 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4512 * linux-arm-low.c (arm_regsets): Likewise.
4513 * linux-crisv32-low.c (cris_regsets): Likewise.
4514 * linux-m68k-low.c (m68k_regsets): Likewise.
4515 * linux-mips-low.c (mips_regsets): Likewise.
4516 * linux-nios2-low.c (nios2_regsets): Likewise.
4517 * linux-ppc-low.c (ppc_regsets): Likewise.
4518 * linux-s390-low.c (s390_regsets): Likewise.
4519 * linux-sh-low.c (sh_regsets): Likewise.
4520 * linux-sparc-low.c (sparc_regsets): Likewise.
4521 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4522 * linux-tile-low.c (tile_regsets): Likewise.
4523 * linux-x86-low.c (x86_regsets): Likewise.
4524 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4525
682b2546
DE
45262015-10-26 Doug Evans <dje@google.com>
4527
4528 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4529
963843d4
DE
45302015-10-26 Doug Evans <dje@google.com>
4531
4532 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4533
d41401ac
DE
45342015-10-26 Doug Evans <dje@google.com>
4535
4536 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4537 for debug_printf.
4538 (attach_thread, find_new_threads_callback): Ditto.
4539
3db28855
AT
45402015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4541
4542 * mem-break.h (set_breakpoint_data): Remove.
4543
fb78e89c
AT
45442015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4545
4546 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4547 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4548 (initialize_low): Remove set_breakpoint_data call.
4549 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4550 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4551 (initialize_low): Remove set_breakpoint_data call.
4552 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4553 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4554 (initialize_low): Remove set_breakpoint_data call.
4555
2e6ee069
AT
45562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4557
4558 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4559 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4560 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4561 * target.h (target_breakpoint_kind_from_pc): New macro.
4562
1652a986
AT
45632015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4564
4565 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4566 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4567 the default breakpoint kind.
4568
abeead09
AT
45692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4570
4571 * linux-arm-low.c (arm_supports_z_point_type): Add software
4572 breakpoint support.
4573
b0b4b501
AT
45742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4575
4576 * linux-arm-low.c: Refactor breakpoint definitions.
4577 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4578 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4579
8689682c
AT
45802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4581
4582 * Makefile.in: Add arm.c/o.
4583 * configure.srv: Likewise.
4584 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4585 (arm_breakpoint_kind_from_pc): New function.
4586 (arm_sw_breakpoint_from_kind): Return proper kind.
4587 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4588
27165294
AT
45892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4590
4591 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4592 removal.
4593 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4594 (struct raw_breakpoint) <size>: Remove.
4595 (struct raw_breakpoint) <kind>: Add.
4596 (bp_size): New function.
4597 (bp_opcode): Likewise.
4598 (find_raw_breakpoint_at): Adjust for kind.
4599 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4600 (remove_memory_breakpoint): Adjust for kind call bp_size.
4601 (set_raw_breakpoint_at): Adjust for kind.
4602 (set_breakpoint): Likewise.
4603 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4604 (delete_raw_breakpoint): Adjust for kind.
4605 (delete_breakpoint): Likewise.
4606 (find_gdb_breakpoint): Likewise.
4607 (set_gdb_breakpoint_1): Likewise.
4608 (set_gdb_breakpoint): Likewise.
4609 (delete_gdb_breakpoint_1): Likewise.
4610 (delete_gdb_breakpoint): Likewise.
4611 (uninsert_raw_breakpoint): Likewise.
4612 (reinsert_raw_breakpoint): Likewise.
4613 (set_breakpoint_data): Remove.
4614 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4615 (check_mem_read): Adjust for kind call bp_size.
4616 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4617 (clone_one_breakpoint): Adjust for kind.
4618 * mem-break.h (set_gdb_breakpoint): Likewise.
4619 (delete_gdb_breakpoint): Likewise.
4620 * server.c (process_serial_event): Likewise.
4621
dd373349
AT
46222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4623
4624 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4625 (struct linux_target_ops) <breakpoint>: Remove.
4626 (struct linux_target_ops) <breakpoint_len>: Remove.
4627 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4628 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4629 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4630 (arm_sw_breakpoint_from_kind): New function.
4631 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4632 (struct linux_target_ops) <breakpoint>: Remove.
4633 (struct linux_target_ops) <breakpoint_len>: Remove.
4634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4636 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4637 (struct linux_target_ops) <breakpoint>: Remove.
4638 (struct linux_target_ops) <breakpoint_len>: Remove.
4639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4641 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4642 (struct linux_target_ops) <breakpoint>: Remove.
4643 (struct linux_target_ops) <breakpoint_len>: Remove.
4644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4646 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4647 and sw_breakpoint_from_kind to increment the pc.
4648 (linux_breakpoint_kind_from_pc): New function.
4649 (linux_sw_breakpoint_from_kind): New function.
4650 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4651 (initialize_low): Call breakpoint_kind_from_pc and
4652 sw_breakpoint_from_kind to replace breakpoint_data/len.
4653 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4654 New field.
4655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4656 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4657 (struct linux_target_ops) <breakpoint>: Remove.
4658 (struct linux_target_ops) <breakpoint_len>: Remove.
4659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4661 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4662 (struct linux_target_ops) <breakpoint>: Remove.
4663 (struct linux_target_ops) <breakpoint_len>: Remove.
4664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4666 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4667 (struct linux_target_ops) <breakpoint>: Remove.
4668 (struct linux_target_ops) <breakpoint_len>: Remove.
4669 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4670 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4671 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4672 (struct linux_target_ops) <breakpoint>: Remove.
4673 (struct linux_target_ops) <breakpoint_len>: Remove.
4674 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4675 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4676 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4677 (struct linux_target_ops) <breakpoint>: Remove.
4678 (struct linux_target_ops) <breakpoint_len>: Remove.
4679 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4680 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4681 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4682 (struct linux_target_ops) <breakpoint>: Remove.
4683 (struct linux_target_ops) <breakpoint_len>: Remove.
4684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4685 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4686 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4687 (struct linux_target_ops) <breakpoint>: Remove.
4688 (struct linux_target_ops) <breakpoint_len>: Remove.
4689 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4690 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4691 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4692 (struct linux_target_ops) <breakpoint>: Remove.
4693 (struct linux_target_ops) <breakpoint_len>: Remove.
4694 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4695 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4696 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4697 (struct linux_target_ops) <breakpoint>: Remove.
4698 (struct linux_target_ops) <breakpoint_len>: Remove.
4699 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4700 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4701 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4702 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4703 (struct linux_target_ops) <breakpoint>: Remove.
4704 (struct linux_target_ops) <breakpoint_len>: Remove.
4705 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4706 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4707 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4708 (struct linux_target_ops) <breakpoint>: Remove.
4709 (struct linux_target_ops) <breakpoint_len>: Remove.
4710 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4711 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4712
4cd98a19
AT
47132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4714
4715 * linux-cris-low.c (cris_get_pc): Remove void arg.
4716
774ee6d2
AR
47172015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4718
4719 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4720 variable name.
4721
833dcd29
AR
47222015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4723
4724 * inferiors.c (thread_pid_matches_callback): New function.
4725 (find_thread_process): New function.
4726 (remove_thread): Reset current_thread.
4727 (remove_process): Assert threads have been removed first.
4728
8d689ee5
YQ
47292015-10-15 Yao Qi <yao.qi@linaro.org>
4730
4731 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4732 if it is 3.
4733 (aarch64_remove_point): Likewise.
4734 * regcache.c (regcache_register_size): New function.
4735
1c2e1515
YQ
47362015-10-12 Yao Qi <yao.qi@linaro.org>
4737
4738 * linux-aarch64-low.c: Update all callers as emit_load_store
4739 is renamed to aarch64_emit_load_store.
4740
e1c587c3
YQ
47412015-10-12 Yao Qi <yao.qi@linaro.org>
4742
4743 * linux-aarch64-low.c: Update all callers of function renaming
4744 from emit_insn to aarch64_emit_insn.
4745
b6542f81
YQ
47462015-10-12 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4749 arch/aarch64-insn.h.
4750 (struct aarch64_memory_operand): Likewise.
4751 (ENCODE): Likewise.
4752 (emit_insn): Move to arch/aarch64-insn.c.
4753 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4754 (emit_load_store): Move to arch/aarch64-insn.c.
4755 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4756 (can_encode_int32): Remove.
4757
246994ce
YQ
47582015-10-12 Yao Qi <yao.qi@linaro.org>
4759
4760 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4761 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4762 (aarch64_relocate_instruction): Likewise.
4763 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4764 (struct aarch64_insn_visitor): Likewise.
4765
0badd99f
YQ
47662015-10-12 Yao Qi <yao.qi@linaro.org>
4767
4768 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4769 (struct aarch64_insn_visitor): New.
4770 (struct aarch64_insn_relocation_data): New.
4771 (aarch64_ftrace_insn_reloc_b): New function.
4772 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4773 (aarch64_ftrace_insn_reloc_cb): Likewise.
4774 (aarch64_ftrace_insn_reloc_tb): Likewise.
4775 (aarch64_ftrace_insn_reloc_adr): Likewise.
4776 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4777 (aarch64_ftrace_insn_reloc_others): Likewise.
4778 (visitor): New.
4779 (aarch64_relocate_instruction): Use visitor.
4780
dfaffe9d
YQ
47812015-10-12 Yao Qi <yao.qi@linaro.org>
4782
4783 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4784 int. Add argument buf.
4785 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4786 aarch64_relocate_instruction.
4787
70b439f0
YQ
47882015-10-12 Yao Qi <yao.qi@linaro.org>
4789
4790 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4791 argument insn. Remove local variable insn. Don't call
4792 target_read_uint32.
4793 (aarch64_install_fast_tracepoint_jump_pad): Call
4794 target_read_uint32.
4795
7781c06f
YQ
47962015-09-30 Yao Qi <yao.qi@linaro.org>
4797
4798 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4799 (emit_load_store_pair): Likewise.
4800
9a3c8263
SM
48012015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4802
4803 * dll.c (match_dll): Add cast(s).
4804 (unloaded_dll): Likewise.
4805 * linux-low.c (second_thread_of_pid_p): Likewise.
4806 (delete_lwp_callback): Likewise.
4807 (count_events_callback): Likewise.
4808 (select_event_lwp_callback): Likewise.
4809 (linux_set_resume_request): Likewise.
4810 * server.c (accumulate_file_name_length): Likewise.
4811 (emit_dll_description): Likewise.
4812 (handle_qxfer_threads_worker): Likewise.
4813 (visit_actioned_threads): Likewise.
4814 * thread-db.c (any_thread_of): Likewise.
4815 * tracepoint.c (same_process_p): Likewise.
4816 (match_blocktype): Likewise.
4817 (build_traceframe_info_xml): Likewise.
4818
224c3ddb
SM
48192015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4820
4821 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4822 assignment.
4823 (gdb_unparse_agent_expr): Likewise.
4824 * hostio.c (require_data): Likewise.
4825 (handle_pread): Likewise.
4826 * linux-low.c (disable_regset): Likewise.
4827 (fetch_register): Likewise.
4828 (store_register): Likewise.
4829 (get_dynamic): Likewise.
4830 (linux_qxfer_libraries_svr4): Likewise.
4831 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4832 (set_fast_tracepoint_jump): Likewise.
4833 (uninsert_fast_tracepoint_jumps_at): Likewise.
4834 (reinsert_fast_tracepoint_jumps_at): Likewise.
4835 (validate_inserted_breakpoint): Likewise.
4836 (clone_agent_expr): Likewise.
4837 * regcache.c (init_register_cache): Likewise.
4838 * remote-utils.c (putpkt_binary_1): Likewise.
4839 (decode_M_packet): Likewise.
4840 (decode_X_packet): Likewise.
4841 (look_up_one_symbol): Likewise.
4842 (relocate_instruction): Likewise.
4843 (monitor_output): Likewise.
4844 * server.c (handle_search_memory): Likewise.
4845 (handle_qxfer_exec_file): Likewise.
4846 (handle_qxfer_libraries): Likewise.
4847 (handle_qxfer): Likewise.
4848 (handle_query): Likewise.
4849 (handle_v_cont): Likewise.
4850 (handle_v_run): Likewise.
4851 (captured_main): Likewise.
4852 * target.c (write_inferior_memory): Likewise.
4853 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4854 * tracepoint.c (init_trace_buffer): Likewise.
4855 (add_tracepoint_action): Likewise.
4856 (add_traceframe): Likewise.
4857 (add_traceframe_block): Likewise.
4858 (cmd_qtdpsrc): Likewise.
4859 (cmd_qtdv): Likewise.
4860 (cmd_qtstatus): Likewise.
4861 (response_source): Likewise.
4862 (response_tsv): Likewise.
4863 (cmd_qtnotes): Likewise.
4864 (gdb_collect): Likewise.
4865 (initialize_tracepoint): Likewise.
4866
afbe19f8
PL
48672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4868
4869 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4870 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4871 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4872 <NOP>: New.
4873 (enum aarch64_condition_codes): New enum.
4874 (w0): New static global.
4875 (fp): Likewise.
4876 (lr): Likewise.
4877 (struct aarch64_memory_operand) <type>: New
4878 MEMORY_OPERAND_POSTINDEX type.
4879 (postindex_memory_operand): New helper function.
4880 (emit_ret): New function.
4881 (emit_load_store_pair): New function, factored out of emit_stp
4882 with support for MEMORY_OPERAND_POSTINDEX.
4883 (emit_stp): Rewrite using emit_load_store_pair.
4884 (emit_ldp): New function.
4885 (emit_load_store): Likewise.
4886 (emit_ldr): Mention post-index instruction in comment.
4887 (emit_ldrh): New function.
4888 (emit_ldrb): New function.
4889 (emit_ldrsw): Mention post-index instruction in comment.
4890 (emit_str): Likewise.
4891 (emit_subs): New function.
4892 (emit_cmp): Likewise.
4893 (emit_and): Likewise.
4894 (emit_orr): Likewise.
4895 (emit_orn): Likewise.
4896 (emit_eor): Likewise.
4897 (emit_mvn): Likewise.
4898 (emit_lslv): Likewise.
4899 (emit_lsrv): Likewise.
4900 (emit_asrv): Likewise.
4901 (emit_mul): Likewise.
4902 (emit_sbfm): Likewise.
4903 (emit_sbfx): Likewise.
4904 (emit_ubfm): Likewise.
4905 (emit_ubfx): Likewise.
4906 (emit_csinc): Likewise.
4907 (emit_cset): Likewise.
4908 (emit_nop): Likewise.
4909 (emit_ops_insns): New helper function.
4910 (emit_pop): Likewise.
4911 (emit_push): Likewise.
4912 (aarch64_emit_prologue): New function.
4913 (aarch64_emit_epilogue): Likewise.
4914 (aarch64_emit_add): Likewise.
4915 (aarch64_emit_sub): Likewise.
4916 (aarch64_emit_mul): Likewise.
4917 (aarch64_emit_lsh): Likewise.
4918 (aarch64_emit_rsh_signed): Likewise.
4919 (aarch64_emit_rsh_unsigned): Likewise.
4920 (aarch64_emit_ext): Likewise.
4921 (aarch64_emit_log_not): Likewise.
4922 (aarch64_emit_bit_and): Likewise.
4923 (aarch64_emit_bit_or): Likewise.
4924 (aarch64_emit_bit_xor): Likewise.
4925 (aarch64_emit_bit_not): Likewise.
4926 (aarch64_emit_equal): Likewise.
4927 (aarch64_emit_less_signed): Likewise.
4928 (aarch64_emit_less_unsigned): Likewise.
4929 (aarch64_emit_ref): Likewise.
4930 (aarch64_emit_if_goto): Likewise.
4931 (aarch64_emit_goto): Likewise.
4932 (aarch64_write_goto_address): Likewise.
4933 (aarch64_emit_const): Likewise.
4934 (aarch64_emit_call): Likewise.
4935 (aarch64_emit_reg): Likewise.
4936 (aarch64_emit_pop): Likewise.
4937 (aarch64_emit_stack_flush): Likewise.
4938 (aarch64_emit_zero_ext): Likewise.
4939 (aarch64_emit_swap): Likewise.
4940 (aarch64_emit_stack_adjust): Likewise.
4941 (aarch64_emit_int_call_1): Likewise.
4942 (aarch64_emit_void_call_2): Likewise.
4943 (aarch64_emit_eq_goto): Likewise.
4944 (aarch64_emit_ne_goto): Likewise.
4945 (aarch64_emit_lt_goto): Likewise.
4946 (aarch64_emit_le_goto): Likewise.
4947 (aarch64_emit_gt_goto): Likewise.
4948 (aarch64_emit_ge_got): Likewise.
4949 (aarch64_emit_ops_impl): New static global variable.
4950 (aarch64_emit_ops): New target function, return
4951 &aarch64_emit_ops_impl.
4952 (struct linux_target_ops): Install it.
4953
bb903df0
PL
49542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4955
4956 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4957 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4958 aarch64-ipa.o.
4959 * linux-aarch64-ipa.c: New file.
4960 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4961 and endian.h.
4962 (aarch64_get_thread_area): New target method.
4963 (extract_signed_bitfield): New helper function.
4964 (aarch64_decode_ldr_literal): New function.
4965 (enum aarch64_opcodes): New enum.
4966 (struct aarch64_register): New struct.
4967 (struct aarch64_operand): New struct.
4968 (x0): New static global.
4969 (x1): Likewise.
4970 (x2): Likewise.
4971 (x3): Likewise.
4972 (x4): Likewise.
4973 (w2): Likewise.
4974 (ip0): Likewise.
4975 (sp): Likewise.
4976 (xzr): Likewise.
4977 (aarch64_register): New helper function.
4978 (register_operand): Likewise.
4979 (immediate_operand): Likewise.
4980 (struct aarch64_memory_operand): New struct.
4981 (offset_memory_operand): New helper function.
4982 (preindex_memory_operand): Likewise.
4983 (enum aarch64_system_control_registers): New enum.
4984 (ENCODE): New macro.
4985 (emit_insn): New helper function.
4986 (emit_b): New function.
4987 (emit_bcond): Likewise.
4988 (emit_cb): Likewise.
4989 (emit_tb): Likewise.
4990 (emit_blr): Likewise.
4991 (emit_stp): Likewise.
4992 (emit_ldp_q_offset): Likewise.
4993 (emit_stp_q_offset): Likewise.
4994 (emit_load_store): Likewise.
4995 (emit_ldr): Likewise.
4996 (emit_ldrsw): Likewise.
4997 (emit_str): Likewise.
4998 (emit_ldaxr): Likewise.
4999 (emit_stxr): Likewise.
5000 (emit_stlr): Likewise.
5001 (emit_data_processing_reg): Likewise.
5002 (emit_data_processing): Likewise.
5003 (emit_add): Likewise.
5004 (emit_sub): Likewise.
5005 (emit_mov): Likewise.
5006 (emit_movk): Likewise.
5007 (emit_mov_addr): Likewise.
5008 (emit_mrs): Likewise.
5009 (emit_msr): Likewise.
5010 (emit_sevl): Likewise.
5011 (emit_wfe): Likewise.
5012 (append_insns): Likewise.
5013 (can_encode_int32_in): New helper function.
5014 (aarch64_relocate_instruction): New function.
5015 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5016 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5017 (struct linux_target_ops): Install aarch64_get_thread_area,
5018 aarch64_install_fast_tracepoint_jump_pad and
5019 aarch64_get_min_fast_tracepoint_insn_len.
5020
787749ea
PL
50212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5022
5023 * Makefile.in (aarch64-insn.o): New rule.
5024 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5025
9812b2e6
YQ
50262015-09-21 Yao Qi <yao.qi@linaro.org>
5027
5028 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5029
18fe412b
YQ
50302015-09-21 Yao Qi <yao.qi@linaro.org>
5031
5032 * tracepoint.c (max_jump_pad_size): Remove.
5033
a0cc84cd
YQ
50342015-09-18 Yao Qi <yao.qi@linaro.org>
5035
5036 * linux-aarch64-low.c: Don't include sys/uio.h.
5037 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5038
d78908cf
WW
50392015-09-16 Wei-cheng Wang <cole945@gmail.com>
5040
5041 * tracepoint.c (eval_result_type): Change prototype.
5042 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5043
d57e0d50
PA
50442015-09-15 Pedro Alves <palves@redhat.com>
5045
5046 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5047 Check whether to report exec events instead of checking whether
5048 multiprocess is enabled.
5049
5a676acc
PA
50502015-09-15 Pedro Alves <palves@redhat.com>
5051
5052 PR remote/18965
5053 * remote-utils.c (prepare_resume_reply): Merge
5054 TARGET_WAITKIND_VFORK_DONE switch case with the
5055 TARGET_WAITKIND_FORKED case.
5056
7c5d0fad
YQ
50572015-09-15 Yao Qi <yao.qi@linaro.org>
5058
5059 * server.c (handle_query): Check string comparison using
5060 "else if" instead of "if".
5061
750ce8d1
YQ
50622015-09-15 Yao Qi <yao.qi@linaro.org>
5063
5064 * server.c (vCont_supported): New global variable.
5065 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5066 matches. Append ";vContSupported+" to own_buf.
5067 (handle_v_requests): Append ";s;S" to own_buf if target supports
5068 hardware single step or vCont_supported is false.
5069 (capture_main): Set vCont_supported to zero.
5070
70b90b91
YQ
50712015-09-15 Yao Qi <yao.qi@linaro.org>
5072
5073 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5074 it to ...
5075 (linux_supports_hardware_single_step): ... New function.
5076 (linux_target_ops): Update.
5077 * lynx-low.c (lynx_target_ops): Set field
5078 supports_hardware_single_step to target_can_do_hardware_single_step.
5079 * nto-low.c (nto_target_ops): Likewise.
5080 * spu-low.c (spu_target_ops): Likewise.
5081 * win32-low.c (win32_target_ops): Likewise.
5082 * target.c (target_can_do_hardware_single_step): New function.
5083 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5084 Remove. <supports_hardware_single_step>: New field.
5085 (target_supports_conditional_breakpoints): Remove.
5086 (target_supports_hardware_single_step): New macro.
5087 (target_can_do_hardware_single_step): Declare.
5088 * server.c (handle_query): Use target_supports_hardware_single_step
5089 instead of target_supports_conditional_breakpoints.
5090
ade90bde
YQ
50912015-09-15 Yao Qi <yao.qi@linaro.org>
5092
5093 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5094 function.
5095 (struct linux_target_ops the_low_target): Install
5096 aarch64_linux_siginfo_fixup.
5097
94585166
DB
50982015-09-11 Don Breazeal <donb@codesourcery.com>
5099 Luis Machado <lgustavo@codesourcery.com>
5100
5101 * linux-low.c (linux_mourn): Static declaration.
5102 (linux_arch_setup): Move in front of
5103 handle_extended_wait.
5104 (linux_arch_setup_thread): New function.
5105 (handle_extended_wait): Handle exec events. Call
5106 linux_arch_setup_thread. Make event_lwp argument a
5107 pointer-to-a-pointer.
5108 (check_zombie_leaders): Do not check stopped threads.
5109 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5110 (linux_low_filter_event): Add lwp and thread for exec'ing
5111 non-leader thread if leader thread has been deleted.
5112 Refactor code into linux_arch_setup_thread and call it.
5113 Pass child lwp pointer by reference to handle_extended_wait.
5114 (linux_wait_for_event_filtered): Update comment.
5115 (linux_wait_1): Prevent clobbering exec event status.
5116 (linux_supports_exec_events): New function.
5117 (linux_target_ops) <supports_exec_events>: Initialize new member.
5118 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5119 new member.
5120 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5121 * server.c (report_exec_events): New global variable.
5122 (handle_query): Handle qSupported query for exec-events feature.
5123 (captured_main): Initialize report_exec_events.
5124 * server.h (report_exec_events): Declare new global variable.
5125 * target.h (struct target_ops) <supports_exec_events>: New
5126 member.
5127 (target_supports_exec_events): New macro.
5128 * win32-low.c (win32_target_ops) <supports_exec_events>:
5129 Initialize new member.
5130
0568462b
MM
51312015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5132
5133 * linux-low.c (linux_low_enable_btrace): Remove.
5134 (linux_target_ops): Replace linux_low_enable_btrace with
5135 linux_enable_btrace.
5136
39edd165
YQ
51372015-09-03 Yao Qi <yao.qi@linaro.org>
5138
5139 * linux-aarch64-low.c (aarch64_insert_point): Call
5140 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5141 returns true.
5142
1db33b5a
UW
51432015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5144
5145 * linux-low.c (check_stopped_by_breakpoint): Use
5146 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5147
ab290430
PA
51482015-08-27 Pedro Alves <palves@redhat.com>
5149
5150 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5151
8d749320
SM
51522015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5153
6711b7f8
SM
5154 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5155 the XNEW-family equivalent.
8d749320
SM
5156 (compile_bytecodes): Likewise.
5157 * dll.c (loaded_dll): Likewise.
5158 * event-loop.c (append_callback_event): Likewise.
5159 (create_file_handler): Likewise.
5160 (create_file_event): Likewise.
5161 * hostio.c (handle_open): Likewise.
5162 * inferiors.c (add_thread): Likewise.
5163 (add_process): Likewise.
5164 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5165 * linux-arm-low.c (arm_new_process): Likewise.
5166 (arm_new_thread): Likewise.
5167 * linux-low.c (add_to_pid_list): Likewise.
5168 (linux_add_process): Likewise.
5169 (handle_extended_wait): Likewise.
5170 (add_lwp): Likewise.
5171 (enqueue_one_deferred_signal): Likewise.
5172 (enqueue_pending_signal): Likewise.
5173 (linux_resume_one_lwp_throw): Likewise.
5174 (linux_resume_one_thread): Likewise.
5175 (linux_read_memory): Likewise.
5176 (linux_write_memory): Likewise.
5177 * linux-mips-low.c (mips_linux_new_process): Likewise.
5178 (mips_linux_new_thread): Likewise.
5179 (mips_add_watchpoint): Likewise.
5180 * linux-x86-low.c (initialize_low_arch): Likewise.
5181 * lynx-low.c (lynx_add_process): Likewise.
5182 * mem-break.c (set_raw_breakpoint_at): Likewise.
5183 (set_breakpoint): Likewise.
5184 (add_condition_to_breakpoint): Likewise.
5185 (add_commands_to_breakpoint): Likewise.
5186 (clone_agent_expr): Likewise.
5187 (clone_one_breakpoint): Likewise.
5188 * regcache.c (new_register_cache): Likewise.
5189 * remote-utils.c (look_up_one_symbol): Likewise.
5190 * server.c (queue_stop_reply): Likewise.
5191 (start_inferior): Likewise.
5192 (queue_stop_reply_callback): Likewise.
5193 (handle_target_event): Likewise.
5194 * spu-low.c (fetch_ppc_memory): Likewise.
5195 (store_ppc_memory): Likewise.
5196 * target.c (set_target_ops): Likewise.
5197 * thread-db.c (thread_db_load_search): Likewise.
5198 (try_thread_db_load_1): Likewise.
5199 * tracepoint.c (add_tracepoint): Likewise.
5200 (add_tracepoint_action): Likewise.
5201 (create_trace_state_variable): Likewise.
5202 (cmd_qtdpsrc): Likewise.
5203 (cmd_qtro): Likewise.
5204 (add_while_stepping_state): Likewise.
5205 * win32-low.c (child_add_thread): Likewise.
5206 (get_image_name): Likewise.
5207
ed8b7b42
YQ
52082015-08-25 Yao Qi <yao.qi@linaro.org>
5209
5210 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5211
db3cb7cb
YQ
52122015-08-25 Yao Qi <yao.qi@linaro.org>
5213
5214 * Makefile.in (aarch64-linux.o): New rule.
5215 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5216 srv_tgtobj.
5217 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5218 (aarch64_init_debug_reg_state): Make it extern.
5219 (aarch64_linux_prepare_to_resume): Remove.
5220
f6011a1c
YQ
52212015-08-25 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5224 lwp_arch_private_info and ptid_of_lwp.
5225
88e2cf7e
YQ
52262015-08-25 Yao Qi <yao.qi@linaro.org>
5227
5228 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5229 Find proc_info by find_process_pid. All callers updated.
5230
5e35436e
YQ
52312015-08-25 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5234 Remove.
5235 (debug_reg_change_callback): Remove.
5236 (aarch64_notify_debug_reg_change): Remove.
5237
4a8a7965
YQ
52382015-08-25 Yao Qi <yao.qi@linaro.org>
5239
5240 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5241 Call current_lwp_ptid.
5242
32a271ee
YQ
52432015-08-25 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-aarch64-low.c (debug_reg_change_callback): Use
5246 debug_printf.
5247
0d51c8d7
YQ
52482015-08-25 Yao Qi <yao.qi@linaro.org>
5249
5250 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5251
31a43dd5
YQ
52522015-08-25 Yao Qi <yao.qi@linaro.org>
5253
5254 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5255
8ee52567
YQ
52562015-08-25 Yao Qi <yao.qi@linaro.org>
5257
5258 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5259 the code.
5260
ff3f0f45
YQ
52612015-08-25 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5264 Remove.
5265 (debug_reg_change_callback): Remove argument entry and add argument
5266 lwp. Remove local variable thread. Don't print thread id in the
5267 debugging output. Don't check whether pid of thread equals to pid.
5268 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5269 iterate_over_lwps instead find_inferior.
5270
3d40fbb5
PA
52712015-08-24 Pedro Alves <palves@redhat.com>
5272
5273 * inferiors.c (get_first_process): New function.
5274 * inferiors.h (get_first_process): New declaration.
5275 * remote-utils.c (read_ptid): Default to the first process in the
5276 list, instead of to the current thread's process.
5277
438e1e42
PA
52782015-08-24 Pedro Alves <palves@redhat.com>
5279
5280 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5281 * event-loop.c: Likewise.
5282 * remote-utils.c: Likewise.
5283 * tracepoint.c: Likewise.
5284
a8c6d4fc
PA
52852015-08-24 Pedro Alves <palves@redhat.com>
5286
5287 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5288 ptid_get_lwp.
5289
99b0bb12
PA
52902015-08-21 Pedro Alves <palves@redhat.com>
5291
5292 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5293 instead of literal 1.
5294
f8904751
PA
52952015-08-21 Pedro Alves <palves@redhat.com>
5296
5297 * tdesc.c (default_description): Explicitly zero-initialize.
5298
465a859e
PA
52992015-08-21 Pedro Alves <palves@redhat.com>
5300
5301 PR gdb/18749
5302 * inferiors.c (remove_thread): Discard any pending stop reply for
5303 this thread.
5304 * server.c (remove_all_on_match_pid): Rename to ...
5305 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5306 instead of a pid.
5307 (discard_queued_stop_replies): Change parameter to a ptid. Now
5308 extern.
5309 (handle_v_kill, kill_inferior_callback, captured_main)
5310 (process_serial_event): Adjust.
5311 * server.h (discard_queued_stop_replies): Declare.
5312
f0db101d
PA
53132015-08-21 Pedro Alves <palves@redhat.com>
5314
5315 * linux-low.c (wait_for_sigstop): Always switch to no thread
5316 selected if the previously current thread dies.
5317 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5318 process instead of the current thread's.
5319 * remote-utils.c (input_interrupt): Don't check if there's no
5320 current thread.
5321 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5322 current thread to the general thread fails, error out.
5323 (handle_qxfer_auxv, handle_qxfer_libraries)
5324 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5325 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5326 (handle_query): Check if there's a thread selected instead of
5327 checking whether there's any thread in the thread list.
5328 (handle_qxfer_threads, handle_qxfer_btrace)
5329 (handle_qxfer_btrace_conf): Don't error out early if there's no
5330 thread in the thread list.
5331 (handle_v_cont, myresume): Don't set the current thread to the
5332 continue thread.
5333 (process_serial_event) <Hg handling>: Also set thread_id if the
5334 previous general thread is still alive.
5335 (process_serial_event) <g/G handling>: If setting the current
5336 thread to the general thread fails, error out.
5337 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5338 thread's lwp instead of the current thread's.
5339 * target.c (set_desired_thread): If the desired thread was not
5340 found, leave the current thread pointing to NULL. Return an int
5341 (boolean) indicating success.
5342 * target.h (set_desired_thread): Change return type to int.
5343
40045d91
MF
53442015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5345
5346 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5347 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5348 #includes.
5349 (ps_get_thread_area): New function.
5350
45face3b
GB
53512015-08-19 Gary Benson <gbenson@redhat.com>
5352
5353 * hostio.c (handle_pread): Do not attempt to read more data
5354 than hostio_reply_with_data can fit in a packet.
5355
16d5f642
JB
53562015-08-18 Joel Brobecker <brobecker@adacore.com>
5357
5358 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5359
a738da3a
MF
53602015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5361
5362 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5363
33ebda9d
PA
53642015-08-06 Pedro Alves <palves@redhat.com>
5365
5366 * tracepoint.c (expr_eval_result): Now an int.
5367
a44892be
PA
53682015-08-06 Pedro Alves <palves@redhat.com>
5369
5370 * gdbthread.h (struct regcache): Forward declare.
5371 (struct thread_info) <regcache_data>: Now a struct regcache
5372 pointer.
5373 * inferiors.c (inferior_regcache_data)
5374 (set_inferior_regcache_data): Now work with struct regcache
5375 pointers.
5376 * inferiors.h (struct regcache): Forward declare.
5377 (inferior_regcache_data, set_inferior_regcache_data): Now work
5378 with struct regcache pointers.
5379 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5380 (free_register_cache_thread): Remove struct regcache pointer
5381 casts.
5382
608a1e46
PA
53832015-08-06 Pedro Alves <palves@redhat.com>
5384
5385 * server.c (captured_main): On error, print the exception message
5386 to stderr, and if run_once is set, throw a quit.
5387
f0ce0d3a
PA
53882015-08-06 Pedro Alves <palves@redhat.com>
5389
5390 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5391 the current thread.
5392
bf47e248
PA
53932015-08-06 Pedro Alves <palves@redhat.com>
5394
5395 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5396 reading beyond the passed in buffer length.
5397
b6b9ffcc
PL
53982015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5399
5400 * tracepoint.c (symbol_list) <required>: Remove.
5401
863d01bd
PA
54022015-08-06 Pedro Alves <palves@redhat.com>
5403
5404 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5405 count if stopping and suspending threads.
5406 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5407 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5408 (linux_detach): Complete an ongoing step-over.
5409 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5410 throughout.
5411 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5412 (linux_wait_1): If passing a signal to the inferior after
5413 finishing a step-over, unsuspend and re-resume all lwps. If we
5414 see a single-step event but the thread should be continuing, don't
5415 pass the trap to gdb.
5416 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5417 internal_error instead of gdb_assert.
5418 (enqueue_pending_signal): New function.
5419 (check_ptrace_stopped_lwp_gone): Add debug output.
5420 (start_step_over): Use internal_error instead of gdb_assert.
5421 (complete_ongoing_step_over): New function.
5422 (linux_resume_one_thread): Don't resume a suspended thread.
5423 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5424 it stepping.
5425
00db26fa
PA
54262015-08-06 Pedro Alves <palves@redhat.com>
5427
5428 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5429 (linux_thread_alive): Use lwp_is_marked_dead.
5430 (extended_event_reported): Delete.
5431 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5432 instead of extended_event_reported.
5433 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5434 as well.
5435 (lwp_is_marked_dead): New function.
5436 (lwp_running): Use lwp_is_marked_dead.
5437 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5438 comment.
5439
ad071a30
PA
54402015-08-06 Pedro Alves <palves@redhat.com>
5441
5442 * linux-low.c (linux_wait_1): Move fork event output out of the
5443 !report_to_gdb check. Pass event_child->waitstatus to
5444 target_waitstatus_to_string instead of ourstatus.
5445
524b57e6
YQ
54462015-08-04 Yao Qi <yao.qi@linaro.org>
5447
5448 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5449 if current_thread is 32 bit.
5450
6085d6f6
YQ
54512015-08-04 Yao Qi <yao.qi@linaro.org>
5452
5453 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5454 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5455 * server.c (extended_protocol): Remove "static".
5456 * server.h (extended_protocol): Declare it.
5457
8a7e4587
YQ
54582015-08-04 Yao Qi <yao.qi@linaro.org>
5459
5460 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5461 both aarch64 and aarch32.
5462 (aarch64_set_pc): Likewise.
5463
3b53ae99
YQ
54642015-08-04 Yao Qi <yao.qi@linaro.org>
5465
5466 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5467 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5468 arm-with-neon.xml to srv_xmlfiles.
5469 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5470 (is_64bit_tdesc): New function.
5471 (aarch64_linux_read_description): New function.
5472 (aarch64_arch_setup): Call aarch64_linux_read_description.
5473 (regs_info): Rename to regs_info_aarch64.
5474 (aarch64_regs_info): Return right regs_info.
5475 (initialize_low_arch): Call initialize_low_arch_aarch32.
5476
bd9e6534
YQ
54772015-08-04 Yao Qi <yao.qi@linaro.org>
5478
5479 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5480 * linux-aarch32-low.c: New file.
5481 * linux-aarch32-low.h: New file.
5482 * linux-arm-low.c (arm_fill_gregset): Move it to
5483 linux-aarch32-low.c.
5484 (arm_store_gregset): Likewise.
5485 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5486 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5487 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5488 (regs_info): Rename to regs_info_arm.
5489 (arm_regs_info): Return regs_info_aarch32 if
5490 have_ptrace_getregset is 1 and target description is
5491 arm_with_neon or arm_with_vfpv3.
5492 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5493 Call initialize_low_arch_aarch32 instead.
5494
ded48a5e
YQ
54952015-08-04 Yao Qi <yao.qi@linaro.org>
5496
5497 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5498 * linux-low.c: ... here.
5499 * linux-low.h (have_ptrace_getregset): Declare it.
5500
96e9210f
PA
55012015-08-04 Pedro Alves <palves@redhat.com>
5502
5503 * thread-db.c (struct thread_db): Use new typedefs.
5504 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5505 CHK calls.
5506 (disable_thread_event_reporting): Cast result of dlsym to
5507 destination function pointer type.
5508 (thread_db_mourn): Use td_ta_delete_ftype.
5509
af60a1ef
SL
55102015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5511
5512 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5513 arch variant.
5514 (CDX_BREAKPOINT): Define for R2.
5515 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5516 (the_low_target): Add comments.
5517
e8b41681
YQ
55182015-07-30 Yao Qi <yao.qi@linaro.org>
5519
5520 * linux-arm-low.c (arm_hwcap): Remove it.
5521 (arm_read_description): New local variable arm_hwcap. Don't
5522 set arm_hwcap to zero.
5523
89abb039
YQ
55242015-07-30 Yao Qi <yao.qi@linaro.org>
5525
5526 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5527 Use regcache->tdesc instead.
5528 (arm_store_wmmxregset): Likewise.
5529 (arm_fill_vfpregset): Likewise.
5530 (arm_store_vfpregset): Likewise.
5531
deca266c
YQ
55322015-07-30 Yao Qi <yao.qi@linaro.org>
5533
5534 * linux-arm-low.c: Include arch/arm.h.
5535 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5536 (arm_store_gregset): Likewise.
5537
aa58a496
SM
55382015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5539
5540 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5541 ptrace's 4th parameter.
5542
50904b25
YQ
55432015-07-27 Yao Qi <yao.qi@linaro.org>
5544
5545 * configure.srv (case aarch64*-*-linux*): Don't set
5546 srv_linux_usrregs.
5547
5826e159
PA
55482015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5549
5550 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5551 sys/ptrace.h.
5552 * linux-arm-low.c: Likewise.
5553 * linux-cris-low.c: Likewise.
5554 * linux-crisv32-low.c: Likewise.
5555 * linux-low.c: Likewise.
5556 * linux-m68k-low.c: Likewise.
5557 * linux-mips-low.c: Likewise.
5558 * linux-nios2-low.c: Likewise.
5559 * linux-s390-low.c: Likewise.
5560 * linux-sparc-low.c: Likewise.
5561 * linux-tic6x-low.c: Likewise.
5562 * linux-tile-low.c: Likewise.
5563 * linux-x86-low.c: Likewise.
5564
54019719
PA
55652015-07-24 Pedro Alves <palves@redhat.com>
5566
5567 * config.in: Regenerate.
5568 * configure: Regenerate.
5569
eb7aa561
PA
55702015-07-24 Pedro Alves <palves@redhat.com>
5571
5572 * acinclude.m4: Include ../ptrace.m4.
5573 * configure.ac: Call GDB_AC_PTRACE.
5574 * config.in, configure: Regenerate.
5575
55d7b841
YQ
55762015-07-24 Yao Qi <yao.qi@linaro.org>
5577
5578 * linux-low.c (linux_create_inferior): Remove setting to
5579 proc->priv->new_inferior.
5580 (linux_attach): Likewise.
5581 (linux_low_filter_event): Likewise.
5582 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5583
c06cbd92
YQ
55842015-07-24 Yao Qi <yao.qi@linaro.org>
5585
5586 * linux-low.c (linux_arch_setup): New function.
5587 (linux_low_filter_event): If proc->tdesc is NULL and
5588 proc->attached is true, call the_low_target.arch_setup.
5589 Otherwise, keep status pending, and return.
5590 (linux_resume_one_lwp_throw): Don't call get_pc if
5591 thread->while_stepping isn't NULL. Don't call
5592 get_thread_regcache if proc->tdesc is NULL.
5593 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5594 (linux_target_ops): Install arch_setup.
5595 * server.c (start_inferior): Call the_target->arch_setup.
5596 * target.h (struct target_ops) <arch_setup>: New field.
5597 (target_arch_setup): New marco.
5598 * lynx-low.c (lynx_target_ops): Update.
5599 * nto-low.c (nto_target_ops): Update.
5600 * spu-low.c (spu_target_ops): Update.
5601 * win32-low.c (win32_target_ops): Update.
5602
5ae3ebba
YQ
56032015-07-24 Yao Qi <yao.qi@linaro.org>
5604
5605 * linux-low.c (linux_add_process): Don't set
5606 proc->priv->new_inferior.
5607 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5608 (linux_attach): Likewise.
5609
eb97750b
YQ
56102015-07-24 Yao Qi <yao.qi@linaro.org>
5611
5612 * server.c (start_inferior): Code refactor.
5613
51aee833
YQ
56142015-07-24 Yao Qi <yao.qi@linaro.org>
5615
5616 * server.c (process_serial_event): Set general_thread.
5617
af1b22f3
YQ
56182015-07-21 Yao Qi <yao.qi@linaro.org>
5619
5620 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5621 aarch64_linux_get_debug_reg_capacity.
5622
554717a3
YQ
56232015-07-17 Yao Qi <yao.qi@linaro.org>
5624
5625 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5626 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5627 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5628 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5629 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5630 (AARCH64_HWP_ALIGNMENT): Likewise.
5631 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5632 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5633 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5634 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5635 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5636 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5637 (struct aarch64_debug_reg_state): Likewise.
5638 (struct arch_lwp_info): Likewise.
5639 (aarch64_align_watchpoint): Likewise.
5640 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5641 (aarch64_watchpoint_length): Likewise.
5642 (aarch64_point_encode_ctrl_reg): Likewise
5643 (aarch64_point_is_aligned): Likewise.
5644 (aarch64_align_watchpoint): Likewise.
5645 (aarch64_linux_set_debug_regs):
5646 (aarch64_dr_state_insert_one_point): Likewise.
5647 (aarch64_dr_state_remove_one_point): Likewise.
5648 (aarch64_handle_breakpoint): Likewise.
5649 (aarch64_handle_aligned_watchpoint): Likewise.
5650 (aarch64_handle_unaligned_watchpoint): Likewise.
5651 (aarch64_handle_watchpoint): Likewise.
5652
c67ca4de
YQ
56532015-07-17 Yao Qi <yao.qi@linaro.org>
5654
5655 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5656 and don't aarch64_get_debug_reg_state. All callers update.
5657 (aarch64_handle_aligned_watchpoint): Likewise.
5658 (aarch64_handle_unaligned_watchpoint): Likewise.
5659 (aarch64_handle_watchpoint): Likewise.
5660 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5661 (aarch64_remove_point): Likewise.
5662
25abf979
YQ
56632015-07-17 Yao Qi <yao.qi@linaro.org>
5664
5665 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5666 debug_printf.
5667 (aarch64_handle_unaligned_watchpoint): Likewise.
5668
db1ff28b
JK
56692015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5670
5671 Revert the previous 3 commits:
5672 Move gdb_regex* to common/
5673 Move linux_find_memory_regions_full & co.
5674 gdbserver build-id attribute generator
5675
700ca40f
JK
56762015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5677 Jan Kratochvil <jan.kratochvil@redhat.com>
5678
5679 gdbserver build-id attribute generator.
5680 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5681 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5682 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5683 (find_phdr): New.
5684 (get_dynamic): Use find_pdhr to traverse program headers.
5685 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5686 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5687 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5688 (get_hex_build_id): New.
5689 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5690 to reply XML document.
5691
9904185c
JK
56922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5693 Jan Kratochvil <jan.kratochvil@redhat.com>
5694
5695 * target.c: Include target/target-utils.h and fcntl.h.
5696 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5697 (target_fileio_read_stralloc): New functions.
5698
6e5b4429
JK
56992015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5700
5701 * Makefile.in (OBS): Add gdb_regex.o.
5702 (gdb_regex.o): New.
5703 * config.in: Rebuilt.
5704 * configure: Rebuilt.
5705
ddc98fbf
JK
57062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5707 Jan Kratochvil <jan.kratochvil@redhat.com>
5708
5709 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5710 * Makefile.in (OBS): Add target-utils.o.
5711 (linux-maps.o, target-utils.o): New.
5712 * configure.srv (srv_linux_obj): Add linux-maps.o.
5713
e57bb7a0
PL
57142015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5715
5716 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5717 function, return 1.
5718 (the_low_target): Install it.
5719
586b02a9
PA
57202015-07-14 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5723 Instead, ignore ECHILD, and throw an error for other errnos.
5724
58c1b36c
PA
57252015-07-10 Pedro Alves <palves@redhat.com>
5726
5727 * event-loop.c (struct callback_event) <data>: Change type to
5728 gdb_client_data instance instead of gdb_client_data pointer.
5729 (append_callback_event): Adjust.
5730
421530db
PL
57312015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5732
5733 * linux-aarch64-low.c: Add comments for each linux_target_ops
5734 method. Remove comments already covered in target_ops and
5735 linux_target_ops definitions.
5736 (the_low_target): Add comments for each unimplemented method.
5737
c2d65f38
YQ
57382015-07-09 Yao Qi <yao.qi@linaro.org>
5739
5740 * linux-aarch64-low.c (aarch64_regmap): Remove.
5741 (aarch64_usrregs_info): Remove.
5742 (regs_info): Set field usrregs to NULL.
5743
b20a6524
MM
57442015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5745
5746 * linux-low.c: Include "rsp-low.h"
5747 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5748 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5749 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5750 (handle_btrace_enable_pt): New.
5751 (handle_btrace_general_set): Support "pt".
5752 (handle_btrace_conf_general_set): Support "pt:size".
5753
96c97461
PL
57542015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5755
5756 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5757 Z_PACKET_SW_BP.
5758
37d66942
PL
57592015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5760
5761 * linux-aarch64-low.c: Remove comment about endianness.
5762 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5763 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5764 memcmp.
5765
dc06243f
GB
57662015-06-24 Gary Benson <gbenson@redhat.com>
5767
5768 * linux-i386-ipa.c (stdint.h): Do not include.
5769 * lynx-i386-low.c (stdint.h): Likewise.
5770 * lynx-ppc-low.c (stdint.h): Likewise.
5771 * mem-break.c (stdint.h): Likewise.
5772 * thread-db.c (stdint.h): Likewise.
5773 * tracepoint.c (stdint.h): Likewise.
5774 * win32-low.c (stdint.h): Likewise.
5775
124e13d9
SM
57762015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5777
5778 * server.c (write_qxfer_response): Update call to
5779 remote_escape_output.
5780
909c2cda
JK
57812015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5782 Jan Kratochvil <jan.kratochvil@redhat.com>
5783
5784 Merge multiple hex conversions.
5785 * gdbreplay.c (tohex): Rename to 'fromhex'.
5786 (logchar): Use fromhex.
5787
24c05f46
JK
57882015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5789
5790 * server.c (handle_qxfer_libraries): Set `version' attribute for
5791 <library-list>.
5792
14d2069a
GB
57932015-06-10 Gary Benson <gbenson@redhat.com>
5794
5795 * target.h (struct target_ops) <multifs_open>: New field.
5796 <multifs_unlink>: Likewise.
5797 <multifs_readlink>: Likewise.
5798 * linux-low.c (nat/linux-namespaces.h): New include.
5799 (linux_target_ops): Initialize the_target->multifs_open,
5800 the_target->multifs_unlink and the_target->multifs_readlink.
5801 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5802 * hostio.c (hostio_fs_pid): New static variable.
5803 (hostio_handle_new_gdb_connection): New function.
5804 (handle_setfs): Likewise.
5805 (handle_open): Use the_target->multifs_open as appropriate.
5806 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5807 (handle_readlink): Use the_target->multifs_readlink as
5808 appropriate.
5809 (handle_vFile): Handle vFile:setfs packets.
5810 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5811 after target_handle_new_gdb_connection.
5812
4b8b5e72
GB
58132015-06-10 Gary Benson <gbenson@redhat.com>
5814
5815 * configure.ac (AC_CHECK_FUNCS): Add setns.
5816 * config.in: Regenerate.
5817 * configure: Likewise.
5818 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5819 (linux-namespaces.o): New rule.
5820 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5821
3ac2e371
GB
58222015-06-09 Gary Benson <gbenson@redhat.com>
5823
5824 * hostio.c (handle_open): Process mode argument with
5825 fileio_to_host_mode.
5826
ca9b78ce
YQ
58272015-06-01 Yao Qi <yao.qi@linaro.org>
5828
5829 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5830 * linux-x86-low.c: Likewise.
5831
bfacd19d
DB
58322015-05-28 Don Breazeal <donb@codesourcery.com>
5833
5834 * linux-low.c (handle_extended_wait): Initialize
5835 thread_info.last_resume_kind for new fork children.
5836
452003ef
PA
58372015-05-15 Pedro Alves <palves@redhat.com>
5838
5839 * target.h (target_handle_new_gdb_connection): Rewrite using if
5840 wrapped in do/while.
5841
1041a03c
JB
58422015-05-14 Joel Brobecker <brobecker@adacore.com>
5843
5844 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5845 * configure, config.in: Regenerate.
5846 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5847 Declare typedef.
5848
c269dbdb
DB
58492015-05-12 Don Breazeal <donb@codesourcery.com>
5850
5851 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5852 PTRACE_EVENT_VFORK_DONE.
5853 (linux_low_ptrace_options, extended_event_reported): Add vfork
5854 events.
5855 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5856 and "vforkdone" for RSP 'T' Stop Reply Packet.
5857 * server.h (report_vfork_events): Declare
5858 global variable.
5859
3a8a0396
DB
58602015-05-12 Don Breazeal <donb@codesourcery.com>
5861
5862 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5863 (the_low_target) <new_fork>: Initialize new member.
5864 * linux-arm-low.c (arm_new_fork): New function.
5865 (the_low_target) <new_fork>: Initialize new member.
5866 * linux-low.c (handle_extended_wait): Call new target function
5867 new_fork.
5868 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5869 * linux-mips-low.c (mips_add_watchpoint): New function
5870 extracted from mips_insert_point.
5871 (the_low_target) <new_fork>: Initialize new member.
5872 (mips_linux_new_fork): New function.
5873 (mips_insert_point): Call mips_add_watchpoint.
5874 * linux-x86-low.c (x86_linux_new_fork): New function.
5875 (the_low_target) <new_fork>: Initialize new member.
5876
de0d863e
DB
58772015-05-12 Don Breazeal <donb@codesourcery.com>
5878
5879 * linux-low.c (handle_extended_wait): Implement return value,
5880 rename argument 'event_child' to 'event_lwp', handle
5881 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5882 (linux_low_ptrace_options): New function.
5883 (linux_low_filter_event): Call linux_low_ptrace_options,
5884 use different argument fo linux_enable_event_reporting,
5885 use return value from handle_extended_wait.
5886 (extended_event_reported): New function.
5887 (linux_wait_1): Call extended_event_reported and set
5888 status to report fork events.
5889 (linux_write_memory): Add pid to debug message.
5890 (reset_lwp_ptrace_options_callback): New function.
5891 (linux_handle_new_gdb_connection): New function.
5892 (linux_target_ops): Initialize new structure member.
5893 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5894 * lynx-low.c: Initialize new structure member.
5895 * remote-utils.c (prepare_resume_reply): Implement stop reason
5896 "fork" for "T" stop message.
5897 * server.c (handle_query): Call handle_new_gdb_connection.
5898 * server.h (report_fork_events): Declare global flag.
5899 * target.h (struct target_ops) <handle_new_gdb_connection>:
5900 New member.
5901 (target_handle_new_gdb_connection): New macro.
5902 * win32-low.c: Initialize new structure member.
5903
ddcbc397
DB
59042015-05-12 Don Breazeal <donb@codesourcery.com>
5905
5906 * mem-break.c (APPEND_TO_LIST): Define macro.
5907 (clone_agent_expr): New function.
5908 (clone_one_breakpoint): New function.
5909 (clone_all_breakpoints): New function.
5910 * mem-break.h: Declare new functions.
5911
89245bc0
DB
59122015-05-12 Don Breazeal <donb@codesourcery.com>
5913
5914 * linux-low.c (linux_supports_fork_events): New function.
5915 (linux_supports_vfork_events): New function.
5916 (linux_target_ops): Initialize new structure members.
5917 (initialize_low): Call linux_check_ptrace_features.
5918 * lynx-low.c (lynx_target_ops): Initialize new structure
5919 members.
5920 * server.c (report_fork_events, report_vfork_events):
5921 New global flags.
5922 (handle_query): Add new features to qSupported packet and
5923 response.
5924 (captured_main): Initialize new global variables.
5925 * target.h (struct target_ops) <supports_fork_events>:
5926 New member.
5927 <supports_vfork_events>: New member.
5928 (target_supports_fork_events): New macro.
5929 (target_supports_vfork_events): New macro.
5930 * win32-low.c (win32_target_ops): Initialize new structure
5931 members.
5932
835205d0
GB
59332015-05-12 Gary Benson <gbenson@redhat.com>
5934
5935 * server.c (handle_qxfer_exec_file): Use current process
5936 if annex is empty.
5937
21e94bd9
SL
59382015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5939
5940 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5941 Remove HAVE_PTRACE_GETREGS conditionals.
5942 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5943 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5944
45614f15
YQ
59452015-05-08 Yao Qi <yao.qi@linaro.org>
5946
5947 * linux-low.c (linux_supports_conditional_breakpoints): New
5948 function.
5949 (linux_target_ops): Install new target method.
5950 * lynx-low.c (lynx_target_ops): Install NULL hook for
5951 supports_conditional_breakpoints.
5952 * nto-low.c (nto_target_ops): Likewise.
5953 * spu-low.c (spu_target_ops): Likewise.
5954 * win32-low.c (win32_target_ops): Likewise.
5955 * server.c (handle_query): Check
5956 target_supports_conditional_breakpoints.
5957 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5958 New field.
5959 (target_supports_conditional_breakpoints): New macro.
5960
80ad801e
PA
59612015-05-06 Pedro Alves <palves@redhat.com>
5962
5963 PR server/18081
5964 * server.c (start_inferior): If the process exits, mourn it.
5965
819843c7
GB
59662015-04-21 Gary Benson <gbenson@redhat.com>
5967
5968 * hostio.c (fileio_open_flags_to_host): Factored out to
5969 fileio_to_host_openflags in common/fileio.c. Single use
5970 updated.
5971
a2d5a9d7
MF
59722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5973
5974 * linux-xtensa-low.c (xtensa_fill_gregset)
5975 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5976 XCHAL_HAVE_LOOP.
5977
deb44829
MF
59782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5979
5980 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5981 (regs_info): Replace usrregs pointer with NULL.
5982
e57f1de3
GB
59832015-04-17 Gary Benson <gbenson@redhat.com>
5984
5985 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5986 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5987 * server.c (handle_qxfer_exec_file): New function.
5988 (qxfer_packets): Add exec-file entry.
5989 (handle_query): Report qXfer:exec-file:read as supported packet.
5990
62828379
RN
59912015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5992
5993 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5994
b88bb450
GB
59952015-04-09 Gary Benson <gbenson@redhat.com>
5996
5997 * hostio-errno.c (errno_to_fileio_error): Remove function.
5998 Update caller to use remote_fileio_to_fio_error.
5999
c8f4bfdd
YQ
60002015-04-09 Yao Qi <yao.qi@linaro.org>
6001
6002 * linux-low.c (linux_insert_point): Call
6003 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6004 (linux_remove_point): Call remove_memory_breakpoint if type is
6005 raw_bkpt_type_sw.
6006 * linux-x86-low.c (x86_insert_point): Don't call
6007 insert_memory_breakpoint.
6008 (x86_remove_point): Don't call remove_memory_breakpoint.
6009
41f98f02
PA
60102015-04-01 Pedro Alves <palves@redhat.com>
6011 Cleber Rosa <crosa@redhat.com>
6012
6013 * server.c (gdbserver_usage): Reorganize and extend the usage
6014 message.
6015
2bf6fb9d
PA
60162015-03-24 Pedro Alves <palves@redhat.com>
6017
6018 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6019 output. Also dump TRAP_TRACE.
6020 (linux_low_filter_event): In debug output, distinguish a
6021 resume_stop SIGSTOP from a delayed SIGSTOP.
6022
369f6daa
GB
60232015-03-24 Gary Benson <gbenson@redhat.com>
6024
6025 * linux-x86-low.c (x86_linux_new_thread): Moved to
6026 nat/x86-linux.c.
6027 (x86_linux_prepare_to_resume): Likewise.
6028
8e5d4070
GB
60292015-03-24 Gary Benson <gbenson@redhat.com>
6030
6031 * Makefile.in (x86-linux-dregs.o): New rule.
6032 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6033 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6034 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6035 (x86_linux_dr_get): Likewise.
6036 (x86_linux_dr_set): Likewise.
6037 (update_debug_registers_callback): Likewise.
6038 (x86_linux_dr_set_addr): Likewise.
6039 (x86_linux_dr_get_addr): Likewise.
6040 (x86_linux_dr_set_control): Likewise.
6041 (x86_linux_dr_get_control): Likewise.
6042 (x86_linux_dr_get_status): Likewise.
6043 (x86_linux_update_debug_registers): Likewise.
6044
2b95d440
GB
60452015-03-24 Gary Benson <gbenson@redhat.com>
6046
6047 * linux-x86-low.c (x86_linux_update_debug_registers):
6048 New function, factored out from...
6049 (x86_linux_prepare_to_resume): ...this.
6050
14b0bc68
GB
60512015-03-24 Gary Benson <gbenson@redhat.com>
6052
6053 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6054 (x86_linux_dr_set): Likewise.
6055 (update_debug_registers_callback): Likewise.
6056 (x86_linux_dr_set_addr): Likewise.
6057 (x86_linux_dr_get_addr): Likewise.
6058 (x86_linux_dr_set_control): Likewise.
6059 (x86_linux_dr_get_control): Likewise.
6060 (x86_linux_dr_get_status): Likewise.
6061 (x86_linux_prepare_to_resume): Likewise.
6062
5dfe6ca8
GB
60632015-03-24 Gary Benson <gbenson@redhat.com>
6064
6065 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6066 Use perror_with_name. Pass string through gettext.
6067 (x86_linux_dr_set): Likewise.
6068
d33472ad
GB
60692015-03-24 Gary Benson <gbenson@redhat.com>
6070
6071 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6072 (x86_linux_dr_set_addr): ...this.
6073 (x86_dr_low_get_addr): Rename to...
6074 (x86_linux_dr_get_addr): ...this.
6075 (x86_dr_low_set_control): Rename to...
6076 (x86_linux_dr_set_control): ...this.
6077 (x86_dr_low_get_control): Rename to...
6078 (x86_linux_dr_get_control): ...this.
6079 (x86_dr_low_get_status): Rename to...
6080 (x86_linux_dr_get_status): ...this.
6081 (x86_dr_low): Update with new function names.
6082
4b134ca1
GB
60832015-03-24 Gary Benson <gbenson@redhat.com>
6084
6085 * Makefile.in (x86-linux.o): New rule.
6086 * configure.srv: Add x86-linux.o to relevant targets.
6087 * linux-low.c (lwp_set_arch_private_info): New function.
6088 (lwp_arch_private_info): Likewise.
6089 * linux-x86-low.c: Include nat/x86-linux.h.
6090 (arch_lwp_info): Removed structure.
6091 (update_debug_registers_callback):
6092 Use lwp_set_debug_registers_changed.
6093 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6094 and lwp_set_debug_registers_changed.
6095 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6096
34c703da
GB
60972015-03-24 Gary Benson <gbenson@redhat.com>
6098
6099 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6100 * linux-arm-low.c (arm_new_thread): Likewise.
6101 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6102 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6103 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6104 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6105
cff068da
GB
61062015-03-24 Gary Benson <gbenson@redhat.com>
6107
6108 * linux-low.c (ptid_of_lwp): New function.
6109 (lwp_is_stopped): Likewise.
6110 (lwp_stop_reason): Likewise.
6111 * linux-x86-low.c (update_debug_registers_callback):
6112 Use lwp_is_stopped.
6113 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6114 lwp_stop_reason.
6115
b2f7c7e8
GB
61162015-03-24 Gary Benson <gbenson@redhat.com>
6117
6118 * linux-low.h (linux_stop_lwp): Remove declaration.
6119
6d4ee8c6
GB
61202015-03-24 Gary Benson <gbenson@redhat.com>
6121
6122 * linux-low.h: Include nat/linux-nat.h.
6123 * linux-low.c (iterate_over_lwps_args): New structure.
6124 (iterate_over_lwps_filter): New function.
6125 (iterate_over_lwps): Likewise.
6126 * linux-x86-low.c (update_debug_registers_callback):
6127 Update signature to what iterate_over_lwps expects.
6128 Remove PID check that iterate_over_lwps now performs.
6129 (x86_dr_low_set_addr): Use iterate_over_lwps.
6130 (x86_dr_low_set_control): Likewise.
6131
70a0bb6b
GB
61322015-03-24 Gary Benson <gbenson@redhat.com>
6133
6134 * linux-x86-low.c (x86_debug_reg_state): New function.
6135 (x86_linux_prepare_to_resume): Use the above.
6136
7b669087
GB
61372015-03-24 Gary Benson <gbenson@redhat.com>
6138
6139 * linux-low.c (current_lwp_ptid): New function.
6140 * linux-x86-low.c: Include nat/linux-nat.h.
6141 (x86_dr_low_get_addr): Use current_lwp_ptid.
6142 (x86_dr_low_get_control): Likewise.
6143 (x86_dr_low_get_status): Likewise.
6144
eef49a3d
PA
61452015-03-20 Pedro Alves <palves@redhat.com>
6146
6147 * tracepoint.c (cmd_qtstatus): Make "str" const.
6148
b2333d22
PA
61492015-03-20 Pedro Alves <palves@redhat.com>
6150
6151 * server.c (handle_general_set): Make "req_str" const.
6152
23f238d3
PA
61532015-03-19 Pedro Alves <palves@redhat.com>
6154
6155 * linux-low.c (linux_resume_one_lwp): Rename to ...
6156 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6157 instead call perror_with_name.
6158 (check_ptrace_stopped_lwp_gone): New function.
6159 (linux_resume_one_lwp): Reimplement as wrapper around
6160 linux_resume_one_lwp_throw that swallows errors if the LWP is
6161 gone.
6162
91baf43f
PA
61632015-03-19 Pedro Alves <palves@redhat.com>
6164
6165 * linux-low.c (count_events_callback, select_event_lwp_callback):
6166 No longer check whether the thread has resume_stop as last resume
6167 kind.
6168
8bf3b159
PA
61692015-03-19 Pedro Alves <palves@redhat.com>
6170
6171 * linux-low.c (count_events_callback, select_event_lwp_callback):
6172 Use the lwp's status_pending_p field, not the thread's.
6173
b90fc188
PA
61742015-03-19 Pedro Alves <palves@redhat.com>
6175
6176 * linux-low.c (select_event_lwp_callback): Update comments to
6177 no longer mention SIGTRAP.
6178
464b0089
GB
61792015-03-18 Gary Benson <gbenson@redhat.com>
6180
6181 * server.c (handle_query): Do not report vFile:fstat as supported.
6182
aa9e327f
GB
61832015-03-11 Gary Benson <gbenson@redhat.com>
6184
6185 * hostio.c (sys/types.h): New include.
6186 (sys/stat.h): Likewise.
6187 (common-remote-fileio.h): Likewise.
6188 (handle_fstat): New function.
6189 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6190
791c0056
GB
61912015-03-11 Gary Benson <gbenson@redhat.com>
6192
6193 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6194 struct stat.st_blocks and struct stat.st_blksize.
6195 * configure: Regenerate.
6196 * config.in: Likewise.
6197 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6198 (OBS): Add common-remote-fileio.o.
6199 (common-remote-fileio.o): New rule.
6200
9a9df970
PA
62012015-03-09 Pedro Alves <palves@redhat.com>
6202
6203 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6204 'struct sockaddr' pointer in 'accept' call.
6205
9eb1356e
PA
62062015-03-09 Pedro Alves <palves@redhat.com>
6207
6208 Revert:
6209 2015-03-07 Pedro Alves <palves@redhat.com>
6210 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6211 or <winsock2.h> here. Instead include "gdb_socket.h".
6212 (remote_open): Use union gdb_sockaddr_u.
6213 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6214 or <winsock2.h> here. Instead include "gdb_socket.h".
6215 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6216 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6217 or <sys/un.h>.
6218 (init_named_socket, gdb_agent_helper_thread): Use union
6219 gdb_sockaddr_u.
6220
aac331e4
PA
62212015-03-07 Pedro Alves <palves@redhat.com>
6222
6223 * configure.ac (build_warnings): Move
6224 -Wdeclaration-after-statement to the C-specific set.
6225 * configure: Regenerate.
6226
366c75fc
PA
62272015-03-07 Pedro Alves <palves@redhat.com>
6228
6229 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6230 or <winsock2.h> here. Instead include "gdb_socket.h".
6231 (remote_open): Use union gdb_sockaddr_u.
6232 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6233 or <winsock2.h> here. Instead include "gdb_socket.h".
6234 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6235 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6236 or <sys/un.h>.
6237 (init_named_socket, gdb_agent_helper_thread): Use union
6238 gdb_sockaddr_u.
6239
492d29ea
PA
62402015-03-07 Pedro Alves <palves@redhat.com>
6241
6242 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6243 instead.
6244
60a191ed
YQ
62452015-03-06 Yao Qi <yao.qi@linaro.org>
6246
6247 * linux-aarch64-low.c (aarch64_insert_point): Use
6248 show_debug_regs as a boolean.
6249 (aarch64_remove_point): Likewise.
6250
f5771b1d
PA
62512015-03-05 Pedro Alves <palves@redhat.com>
6252
6253 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6254 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6255 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6256 * nto-low.c (nto_target_ops): Likewise.
6257 * spu-low.c (spu_target_ops): Likewise.
6258 * win32-low.c (win32_target_ops): Likewise.
6259
3e572f71
PA
62602015-03-04 Pedro Alves <palves@redhat.com>
6261
72f4393d 6262 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6263 Decide whether a breakpoint triggered based on the SIGTRAP's
6264 siginfo.si_code.
72f4393d
L
6265 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6266 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6267 (linux_low_filter_event): Check for breakpoints before checking
6268 watchpoints.
6269 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6270 siginfo.si_code.
72f4393d
L
6271 (linux_stopped_by_sw_breakpoint)
6272 (linux_supports_stopped_by_sw_breakpoint)
6273 (linux_stopped_by_hw_breakpoint)
6274 (linux_supports_stopped_by_hw_breakpoint): New functions.
6275 (linux_target_ops): Install new target methods.
3e572f71 6276
1ec68e26
PA
62772015-03-04 Pedro Alves <palves@redhat.com>
6278
6279 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6280 * server.c (swbreak_feature, hwbreak_feature): New globals.
6281 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6282 (captured_main): Clear swbreak_feature and hwbreak_feature.
6283 * server.h (swbreak_feature, hwbreak_feature): Declare.
6284 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6285 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6286 supports_stopped_by_hw_breakpoint>: New fields.
6287 (target_supports_stopped_by_sw_breakpoint)
6288 (target_stopped_by_sw_breakpoint)
6289 (target_supports_stopped_by_hw_breakpoint)
6290 (target_stopped_by_hw_breakpoint): Declare.
6291
15c66dd6
PA
62922015-03-04 Pedro Alves <palves@redhat.com>
6293
6294 enum lwp_stop_reason -> enum target_stop_reason
6295 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6296 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6297 (linux_wait_1, stuck_in_jump_pad_callback)
6298 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6299 (linux_stopped_by_watchpoint):
6300 * linux-low.h (enum lwp_stop_reason): Delete.
6301 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6302 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6303
98fc70d6
YQ
63042015-03-04 Yao Qi <yao.qi@linaro.org>
6305
6306 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6307
dd2ac174
GB
63082015-03-03 Gary Benson <gbenson@redhat.com>
6309
6310 * hostio.c (handle_vFile): Fix prefix lengths.
6311
d68e53f4
MM
63122015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6313
6314 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6315 ptr_bits.
6316
bf2d68ab
AA
63172015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6318
6319 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6320 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6321 (clean): Add "rm -f" for above C files.
6322 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6323 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6324 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6325 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6326 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6327 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6328 (init_registers_s390x_vx_linux64)
6329 (init_registers_s390x_tevx_linux64)
6330 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6331 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6332 declarations.
6333 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6334 (s390_store_vxrs_high): New functions.
6335 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6336 NT_S390_VXRS_HIGH.
6337 (s390_arch_setup): Add logic for selecting one of the new target
6338 descriptions. Activate the new vector regsets if applicable.
6339 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6340 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6341 and init_registers_s390x_tevx_linux64.
6342
c966a859
PA
63432015-03-01 Pedro Alves <palves@redhat.com>
6344
6345 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6346 parameter.
6347
4180215b
PA
63482015-02-27 Pedro Alves <palves@redhat.com>
6349
6350 * linux-x86-low.c (u_debugreg_offset): New function.
6351 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6352
749bab01
PA
63532015-02-27 Pedro Alves <palves@redhat.com>
6354
6355 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6356 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6357 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6358 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6359 (ps_lsetfpregs, ps_getpid)
6360 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6361 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6362 (ps_lsetxregs, ps_plog): Declare.
6363
3c14e5a3
PA
63642015-02-27 Pedro Alves <palves@redhat.com>
6365
6366 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6367 IP_AGENT_EXPORT_FUNC.
6368 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6369 IP_AGENT_EXPORT_FUNC.
6370 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6371 (IP_AGENT_EXPORT): Delete.
6372 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6373 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6374 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6375 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6376 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6377 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6378 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6379 (traceframe_read_count, traceframe_write_count)
6380 (traceframes_created, trace_state_variables, get_raw_reg)
6381 (get_trace_state_variable_value, set_trace_state_variable_value)
6382 (ust_loaded, helper_thread_id, cmd_buf): Use
6383 IPA_SYM_EXPORTED_NAME.
6384 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6385 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6386 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6387 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6388 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6389 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6390 EXTERN_C_PUSH/EXTERN_C_POP.
6391 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6392 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6393 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6394 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6395 (traceframe_write_count, traceframe_read_count)
6396 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6397 (about_to_request_buffer_space, get_trace_state_variable_value)
6398 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6399 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6400 EXTERN_C_PUSH/EXTERN_C_POP.
6401 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6402 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6403 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6404 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6405 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6406 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6407 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6408 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6409 Define.
6410 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6411 (IP_AGENT_EXPORT_VAR_DECL): Define.
6412 (tracing): Declare.
6413 (gdb_agent_get_raw_reg): Declare.
6414
fe978cb0
PA
64152015-02-27 Tom Tromey <tromey@redhat.com>
6416 Pedro Alves <palves@redhat.com>
6417
6418 Rename symbols whose names are reserved C++ keywords throughout.
6419
3bc3d82a
PA
64202015-02-27 Pedro Alves <palves@redhat.com>
6421
6422 * Makefile.in (COMPILER): New, get it from autoconf.
6423 (CXX): Get from autoconf instead.
6424 (COMPILE.pre): Use COMPILER.
6425 (CC-LD): Rename to ...
6426 (CC_LD): ... this. Use COMPILER.
6427 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6428 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6429 * acinclude.m4: Include build-with-cxx.m4.
6430 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6431 Disable -Werror by default if building in C++ mode.
6432 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6433 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6434 the C++ compiler. Save/restore CXXFLAGS too.
6435 * configure: Regenerate.
6436
07697489
PA
64372015-02-27 Pedro Alves <palves@redhat.com>
6438
6439 * acinclude.m4: Include libiberty.m4.
6440 * configure.ac: Call libiberty_INIT.
6441 * config.in, configure: Regenerate.
6442
9beb7c4e
PA
64432015-02-26 Pedro Alves <palves@redhat.com>
6444
6445 * linux-low.c (linux_wait_1): When incrementing the PC past a
6446 program breakpoint always use the_low_target.breakpoint_len as
6447 increment, rather than the maximum between that and
6448 the_low_target.decr_pc_after_break.
6449
8090aef2
PA
64502015-02-23 Pedro Alves <palves@redhat.com>
6451
6452 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6453 thread was doing a step-over; always adjust the PC if
6454 we stepped over a permanent breakpoint.
6455 (linux_wait_1): If we stepped over breakpoint that was on top of a
6456 permanent breakpoint, manually advance the PC past it.
6457
bc9540e8
PA
64582015-02-23 Pedro Alves <palves@redhat.com>
6459
6460 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6461 modes.
6462 (x86_fill_gregset, x86_store_gregset): Use it when handling
6463 $orig_eax.
6464
2db9a427
PA
64652015-02-20 Pedro Alves <palves@redhat.com>
6466
6467 * thread-db.c: Include "nat/linux-procfs.h".
6468 (thread_db_init): Skip listing new threads if the kernel supports
6469 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6470
afa8d396
PA
64712015-02-20 Pedro Alves <palves@redhat.com>
6472
6473 * linux-low.c (status_pending_p_callback): Use ptid_match.
6474
c9587f88
AT
64752015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6476
6477 PR breakpoints/16812
6478 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6479 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6480 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6481
b05ec7a5
AT
64822015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6483
6484 PR breakpoints/15956
6485 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6486
d33501a5
MM
64872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6488
6489 * linux-low.c (linux_low_btrace_conf): Print size.
6490 * server.c (handle_btrace_conf_general_set): New.
6491 (hanle_general_set): Call handle_btrace_conf_general_set.
6492 (handle_query): Report Qbtrace-conf:bts:size as supported.
6493
f4abbc16
MM
64942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6495
6496 * linux-low.c (linux_low_enable_btrace): Update parameters.
6497 (linux_low_btrace_conf): New.
6498 (linux_target_ops)<to_btrace_conf>: Initialize.
6499 * server.c (current_btrace_conf): New.
6500 (handle_btrace_enable): Rename to ...
6501 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6502 to target_enable_btrace. Update comment. Update users.
6503 (handle_qxfer_btrace_conf): New.
6504 (qxfer_packets): Add btrace-conf entry.
6505 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6506 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6507 (target_ops)<read_btrace_conf>: New.
6508 (target_enable_btrace): Update parameters.
6509 (target_read_btrace_conf): New.
6510
043c3577
MM
65112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6512
6513 * server.c (handle_btrace_general_set): Remove call to
6514 target_supports_btrace.
6515 (supported_btrace_packets): New.
6516 (handle_query): Call supported_btrace_packets.
6517 * target.h: include btrace-common.h.
6518 (btrace_target_info): Removed.
6519 (supports_btrace, target_supports_btrace): Update parameters.
6520
734b0e4b
MM
65212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6522
6523 * Makefile.in (SFILES): Add common/btrace-common.c.
6524 (OBS): Add common/btrace-common.o.
6525 (btrace-common.o): Add build rules.
6526 * linux-low: Include btrace-common.h.
6527 (linux_low_read_btrace): Use struct btrace_data. Call
6528 btrace_data_init and btrace_data_fini.
6529
d6c146e9
PA
65302015-02-06 Pedro Alves <palves@redhat.com>
6531
6532 * thread-db.c (find_new_threads_callback): Add debug output.
6533
20ba1ce6
PA
65342015-02-04 Pedro Alves <palves@redhat.com>
6535
6536 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6537 (resume_stopped_resumed_lwps): New function.
6538 (linux_wait_for_event_filtered): Use it.
6539
8cc73a39
SDJ
65402015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6541
6542 * Makefile.in (SFILES): Add linux-personality.c.
6543 (linux-personality.o): New rule.
6544 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6545 list of objects to be built.
6546 * linux-low.c: Include nat/linux-personality.h.
6547 (linux_create_inferior): Remove code to disable address space
6548 randomization (moved to ../nat/linux-personality.c). Create
6549 cleanup to disable address space randomization.
6550
fb23d554
SDJ
65512015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6552
6553 * Makefile.in (posix-strerror.o): New rule.
6554 (mingw-strerror.o): Likewise.
6555 * configure: Regenerated.
6556 * configure.ac: Source file ../common/common.host. Initialize new
6557 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6558
cdf43629
YQ
65592015-01-14 Yao Qi <yao@codesourcery.com>
6560
6561 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6562 (ppc-linux.o): New rule.
6563 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6564 * configure.ac: AC_CHECK_FUNCS(getauxval).
6565 * config.in: Re-generated.
6566 * configure: Re-generated.
6567 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6568 ppc64_64bit_inferior_p
6569
514c5338
YQ
65702015-01-14 Yao Qi <yao@codesourcery.com>
6571
6572 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6573 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6574 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6575 (PT_ORIG_R3, PT_TRAP): Likewise.
6576 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6577 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6578 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6579
3368c1e5
JB
65802015-01-10 Joel Brobecker <brobecker@adacore.com>
6581
6582 * i387-fp.c (i387_cache_to_xsave): In look over
6583 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6584 zmmh_low_space field by use of zmmh_high_space.
6585
582511be
PA
65862015-01-09 Pedro Alves <palves@redhat.com>
6587
6588 * linux-low.c (step_over_bkpt): Move higher up in the file.
6589 (handle_extended_wait): Don't store the stop_pc here.
6590 (get_stop_pc): Adjust comments and rename to ...
6591 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6592 stopped for a software breakpoint or hardware breakpoint.
6593 (thread_still_has_status_pending_p): New function.
6594 (status_pending_p_callback): Use
6595 thread_still_has_status_pending_p. If the event is no longer
6596 interesting, resume the LWP.
6597 (handle_tracepoints): Add assert.
6598 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6599 (wstatus_maybe_breakpoint): New function.
6600 (cancel_breakpoint): Delete function.
6601 (check_stopped_by_watchpoint): New function, factored out from
6602 linux_low_filter_event.
6603 (lp_status_maybe_breakpoint): Delete function.
6604 (linux_low_filter_event): Remove filter_ptid argument.
6605 Leave thread group exits pending here. Store the LWP's stop PC.
6606 Always leave events pending.
6607 (linux_wait_for_event_filtered): Pull all events out of the
6608 kernel, and leave them all pending.
6609 (count_events_callback, select_event_lwp_callback): Consider all
6610 events.
6611 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6612 (select_event_lwp): Only give preference to the stepping LWP in
6613 all-stop mode. Adjust comments.
6614 (ignore_event): New function.
6615 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6616 references to cancel_breakpoints. Adjust to renames. Also give
6617 equal priority to all LWPs that have had events in non-stop mode.
6618 If reporting a software breakpoint event, unadjust the LWP's PC.
6619 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6620 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6621 Adjust.
6622 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6623 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6624 (linux_stopped_by_watchpoint): Adjust.
6625 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6626 * linux-low.h (enum lwp_stop_reason): New.
6627 (struct lwp_info) <stop_pc>: Adjust comment.
6628 <stopped_by_watchpoint>: Delete field.
6629 <stop_reason>: New field.
6630 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6631 * mem-break.c (software_breakpoint_inserted_here)
6632 (hardware_breakpoint_inserted_here): New function.
6633 * mem-break.h (software_breakpoint_inserted_here)
6634 (hardware_breakpoint_inserted_here): Declare.
6635 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6636 (cancel_breakpoints): Delete.
6637 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6638 (upload_fast_traceframes): Remove references to
6639 cancel_breakpoints.
6640
a33e3959
PA
66412015-01-09 Pedro Alves <palves@redhat.com>
6642
6643 * thread-db.c (find_new_threads_callback): Ignore thread if the
6644 kernel thread ID is -1.
6645
8784d563
PA
66462015-01-09 Pedro Alves <palves@redhat.com>
6647
6648 * linux-low.c (linux_attach_fail_reason_string): Move to
6649 nat/linux-ptrace.c, and rename.
6650 (linux_attach_lwp): Update comment.
6651 (attach_proc_task_lwp_callback): New function.
6652 (linux_attach): Adjust to rename and use
6653 linux_proc_attach_tgid_threads.
6654 (linux_attach_fail_reason_string): Delete declaration.
6655
76f2b779
JB
66562015-01-01 Joel Brobecker <brobecker@adacore.com>
6657
6658 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6659 * server.c (gdbserver_version): Likewise.
6660
fafcc06a
SDJ
66612014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6662
6663 * remote-utils.c: Include ctype.h.
6664 (input_interrupt): Explicitly handle the case when the char
6665 received is the NUL byte. Improve the printing of non-ASCII
6666 characters.
6667
beed38b8
JB
66682014-12-16 Joel Brobecker <brobecker@adacore.com>
6669
6670 * linux-low.c (linux_low_filter_event): Update call to
6671 linux_enable_event_reporting following the addition of
6672 a new parameter to that function.
6673
bf330350
CU
66742014-12-16 Catalin Udma <catalin.udma@freescale.com>
6675
6676 PR server/17457
6677 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6678 (AARCH64_FPCR_REGNO): Likewise.
6679 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6680 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6681 (aarch64_store_fpregset): Likewise.
6682
5227d625
JB
66832014-12-15 Joel Brobecker <brobecker@adacore.com>
6684
6685 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6686 Remove FIXME comment about assumption about N.
6687
f93b65a0
JB
66882014-12-13 Joel Brobecker <brobecker@adacore.com>
6689
6690 * configure.ac: If large-file support is disabled in GDBserver,
6691 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6692 * configure: Regenerate.
6693
e5a9158d
AA
66942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6695
6696 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6697 warning upon ENODATA from ptrace.
6698 * linux-s390-low.c (s390_store_tdb): New.
6699 (s390_regsets): Add regset for NT_S390_TDB.
6700
feea5f36
AA
67012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6702
6703 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6704 without a fill_function.
6705 * linux-s390-low.c (s390_fill_last_break): Remove.
6706 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6707 (s390_arch_setup): Use regset's size instead of fill_function for
6708 loop end condition.
6709
098dbe61
AA
67102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6711
6712 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6713 the regset's store function when ptrace returned an error.
6714 * regcache.c (get_thread_regcache): Invalidate register cache
6715 before fetching inferior's registers.
6716
28eef672
AA
67172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6718
6719 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6720 while-loop as for-loop.
6721 (regsets_store_inferior_registers): Likewise.
6722
bdca27a2
YQ
67232014-11-28 Yao Qi <yao@codesourcery.com>
6724
6725 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6726 * config.in, configure: Re-generate.
6727 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6728 is defined.
6729
9c232dda
YQ
67302014-11-21 Yao Qi <yao@codesourcery.com>
6731
6732 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6733 (AC_CHECK_HEADERS): Remove malloc.h.
6734 * configure: Re-generated.
6735 * config.in: Re-generated.
6736 * server.h: Don't include alloca.h and malloc.h.
6737 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6738 Don't include malloc.h.
6739
43968415
JB
67402014-11-17 Joel Brobecker <brobecker@adacore.com>
6741
6742 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6743 corresponding ERRNO check in same block.
6744
40e91bc7
PA
67452014-11-12 Pedro Alves <palves@redhat.com>
6746
6747 * server.c (cont_thread): Update comment.
6748 (start_inferior, attach_inferior): No longer clear cont_thread.
6749 (handle_v_cont): No longer set cont_thread.
6750 (captured_main): Clear cont_thread each time a GDB connects.
6751
c2c118cf
PA
67522014-11-12 Pedro Alves <palves@redhat.com>
6753
6754 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6755 thread, and don't resume all threads if the Hc thread has exited.
6756
78708b7c
PA
67572014-11-12 Pedro Alves <palves@redhat.com>
6758
6759 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6760 the process group instead of to a specific LWP.
6761
a2abc7de
PA
67622014-10-15 Pedro Alves <palves@redhat.com>
6763
6764 PR server/17487
6765 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6766 parameter.
6767 (arm_set_thread_context): Delete.
6768 (the_low_target): Adjust.
6769 * win32-i386-low.c (debug_registers_changed)
6770 (debug_registers_used): Delete.
6771 (update_debug_registers_callback): New function.
6772 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6773 needing to update their debug registers.
6774 (win32_get_current_dr): New function.
6775 (x86_dr_low_get_addr, x86_dr_low_get_control)
6776 (x86_dr_low_get_status): Fetch the debug register from the thread
6777 record's context.
6778 (i386_initial_stuff): Adjust.
6779 (i386_get_thread_context): Remove current_event parameter. Don't
6780 clear debug_registers_changed nor copy DR values to
6781 debug_reg_state.
6782 (i386_set_thread_context): Delete.
6783 (i386_prepare_to_resume): New function.
6784 (i386_thread_added): Mark the thread as needing to update irs
6785 debug registers.
6786 (the_low_target): Remove i386_set_thread_context and install
6787 i386_prepare_to_resume.
6788 * win32-low.c (win32_get_thread_context): Adjust.
6789 (win32_set_thread_context): Use SetThreadContext
6790 directly.
6791 (win32_prepare_to_resume): New function.
6792 (win32_require_context): New function, factored out from ...
6793 (thread_rec): ... this.
6794 (continue_one_thread): Call win32_prepare_to_resume on each thread
6795 we're about to continue.
6796 (win32_resume): Call win32_prepare_to_resume on the event thread.
6797 * win32-low.h (struct win32_thread_info)
6798 <debug_registers_changed>: New field.
6799 (struct win32_target_ops): Change prototype of set_thread_context,
6800 delete set_thread_context and add prepare_to_resume.
6801 (win32_require_context): New declaration.
6802
a442d071
GB
68032014-10-08 Gary Benson <gbenson@redhat.com>
6804
6805 * server.h: Do not include common-exceptions.h.
6806
6f1947e8
GB
68072014-10-08 Gary Benson <gbenson@redhat.com>
6808
6809 * server.h: Do not include cleanups.h.
6810
63b434a4
JH
68112014-09-30 James Hogan <james.hogan@imgtec.com>
6812
6813 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6814 mips64-dsp-linux.c.
6815
c4d9ceb6
YQ
68162014-09-23 Yao Qi <yao@codesourcery.com>
6817
6818 * linux-low.c (lp_status_maybe_breakpoint): New function.
6819 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6820 (count_events_callback): Likewise.
6821 (select_event_lwp_callback): Likewise.
6822 (cancel_breakpoints_callback): Likewise.
6823
89a5711c
DB
68242014-09-19 Don Breazeal <donb@codesourcery.com>
6825
6826 * linux-low.c (handle_extended_wait): Call
6827 linux_ptrace_get_extended_event.
6828 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6829 linux_is_extended_waitstatus.
6830
bffc0964
JB
68312014-09-16 Joel Brobecker <brobecker@adacore.com>
6832
6833 * Makefile.in (CPPFLAGS): Define.
6834 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6835 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6836
0bfdf32f
GB
68372014-09-16 Gary Benson <gbenson@redhat.com>
6838
6839 * inferiors.h (current_inferior): Renamed as...
6840 (current_thread): New variable. All uses updated.
6841 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6842 (maybe_move_out_of_jump_pad): Likewise.
6843 (cancel_breakpoint): Likewise.
6844 (linux_low_filter_event): Likewise.
6845 (wait_for_sigstop): Likewise.
6846 (linux_resume_one_lwp): Likewise.
6847 (need_step_over_p): Likewise.
6848 (start_step_over): Likewise.
6849 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6850 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6851 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6852 and save_inferior as saved_thread.
6853 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6854 saved_thread.
6855 (regcache_invalidate_thread): Likewise.
6856 * remote-utils.c (prepare_resume_reply): Likewise.
6857 * thread-db.c (thread_db_get_tls_address): Likewise.
6858 (disable_thread_event_reporting): Likewise.
6859 (remove_thread_event_breakpoints): Likewise.
6860 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6861 as saved_thread.
6862 * target.h (set_desired_inferior): Renamed as...
6863 (set_desired_thread): New declaration. All uses updated.
6864 * server.c (myresume): Updated comment to reference thread instead
6865 of inferior.
6866 (handle_serial_event): Likewise.
6867 (handle_target_event): Likewise.
6868
361c8ade
GB
68692014-09-12 Tom Tromey <tromey@redhat.com>
6870 Gary Benson <gbenson@redhat.com>
6871
6872 * regcache.h: Include common-regcache.h.
6873 (regcache_read_pc): Don't declare.
6874 * regcache.c (get_thread_regcache_for_ptid): New function.
6875
bd9269f7
GB
68762014-09-11 Tom Tromey <tromey@redhat.com>
6877 Gary Benson <gbenson@redhat.com>
6878
6879 * symbol.c: New file.
6880 * Makefile.in (SFILES): Add symbol.c.
6881 (OBS): Add symbol.o.
6882
f8c1d06b
GB
68832014-09-11 Gary Benson <gbenson@redhat.com>
6884
6885 * target.c (target_stop_ptid, target_continue_ptid): New
6886 functions.
6887
721ec300
GB
68882014-09-11 Tom Tromey <tromey@redhat.com>
6889 Gary Benson <gbenson@redhat.com>
6890
6891 * target.h: Include target/target.h.
6892 * target.c (target_read_memory, target_read_uint32)
6893 (target_write_memory): New functions.
6894
c5e92cca
GB
68952014-09-11 Gary Benson <gbenson@redhat.com>
6896
6897 * server.h (debug_hw_points): Don't declare.
6898 * server.c (debug_hw_points): Don't define. Replace all uses
6899 with show_debug_regs.
6900 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6901 all uses with show_debug_regs.
6902
2e4bb98a
EBM
69032014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6904
6905 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6906 endianness into account.
6907 (ppc_supply_ptrace_register): Likewise.
6908
ac740bc7
JH
69092014-09-03 James Hogan <james.hogan@imgtec.com>
6910
6911 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6912 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6913
97ea6506
GB
69142014-09-03 Gary Benson <gbenson@redhat.com>
6915
6916 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6917 ALL_DEBUG_ADDRESS_REGISTERS.
6918
df7e5265
GB
69192014-09-02 Gary Benson <gbenson@redhat.com>
6920
6921 * i386-low.h: Renamed as...
6922 * x86-low.h: New file. All type, function and variable name
6923 prefixes changed from "i386_" to "x86_". All references updated.
6924 * i386-low.c: Renamed as...
6925 * x86-low.c: New file. All type, function and variable name
6926 prefixes changed from "i386_" to "x86_". All references updated.
6927
ed859da7
GB
69282014-09-02 Gary Benson <gbenson@redhat.com>
6929
6930 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6931 (x86_linux_new_thread): Likewise.
6932
860789c7
GB
69332014-08-29 Gary Benson <gbenson@redhat.com>
6934
6935 * server.h (setjmp.h): Do not include.
6936 (toplevel): Do not declare.
6937 (common-exceptions.h): Include.
6938 (cleanups.h): Likewise.
6939 * server.c (toplevel): Do not define.
6940 (exit_code): New static global.
6941 (detach_or_kill_for_exit_cleanup): New function.
6942 (main): New function. Original main renamed to...
6943 (captured_main): New function.
6944 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6945
ff55e1b5
GB
69462014-08-29 Gary Benson <gbenson@redhat.com>
6947
6948 * Makefile.in (SFILES): Add common/common-exceptions.c.
6949 (OBS): Add common-exceptions.o.
6950 (common-exceptions.o): New rule.
6951 * utils.c (prepare_to_throw_exception): New function.
6952
e9bcb658
GB
69532014-08-29 Gary Benson <gbenson@redhat.com>
6954
6955 * config.in: Regenerate.
6956 * configure: Likewise.
6957
e3180625
GB
69582014-08-29 Gary Benson <gbenson@redhat.com>
6959
6960 * Makefile.in (SFILES): Add common/cleanups.c.
6961 (OBS): cleanups.o.
6962 (cleanups.o): New rule.
6963
e3d6ba5d
GB
69642014-08-29 Gary Benson <gbenson@redhat.com>
6965
6966 * utils.c (internal_vwarning): New function.
6967
7096e886
GB
69682014-08-28 Gary Benson <gbenson@redhat.com>
6969
6970 * utils.h (fatal): Remove declaration.
6971 * utils.c (fatal): Remove function.
6972
14ce3192
GB
69732014-08-28 Gary Benson <gbenson@redhat.com>
6974
6975 * tracepoint.c (gdb_agent_init): Replace fatal with
6976 perror_with_name.
6977 (initialize_tracepoint): Likewise.
6978
50278d59
GB
69792014-08-28 Gary Benson <gbenson@redhat.com>
6980
6981 * remote-utils.c (remote_prepare): Replace fatal with error.
6982
aa96c426
GB
69832014-08-28 Gary Benson <gbenson@redhat.com>
6984
6985 * linux-low.c (linux_async): Replace fatal with warning.
6986 Tidy up and return.
6987 (linux_start_non_stop): Return -1 if linux_async failed.
6988
f7160e97
GB
69892014-08-28 Gary Benson <gbenson@redhat.com>
6990
6991 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6992 gdb_assert.
6993 (i386_dr_low_get_addr): Remove vague comment.
6994 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6995 gdb_assert.
6996
38e08fca
GB
69972014-08-28 Gary Benson <gbenson@redhat.com>
6998
6999 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7000 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7001 internal_error.
7002 (linux_resume_one_lwp): Likewise.
7003 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7004 gdb_assert.
7005 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7006 with internal_error.
7007 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7008 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7009 (find_register_by_name): Replace fatal with internal_error.
7010 (find_regno): Likewise.
7011 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7012 * thread-db.c (thread_db_create_event): Likewise.
7013 (thread_db_load_search): Likewise.
7014 (try_thread_db_load_1): Likewise.
7015 * tracepoint.c (get_jump_space_head): Replace fatal with
7016 internal_error.
7017 (claim_trampoline_space): Likewise.
7018 (have_fast_tracepoint_trampoline_buffer): Likewise.
7019 (cmd_qtstart): Likewise.
7020 (stop_tracing): Likewise.
7021 (fast_tracepoint_collecting): Likewise.
7022 (target_malloc): Likewise.
7023 (download_tracepoint): Likewise.
7024 (download_trace_state_variables): Replace check with gdb_assert.
7025 (upload_fast_traceframes): Replace fatal with internal_error.
7026
34abf635
GB
70272014-08-19 Tom Tromey <tromey@redhat.com>
7028 Gary Benson <gbenson@redhat.com>
7029
7030 * Makefile.in (SFILES): Add common/common-debug.c.
7031 (OBS): Add common-debug.o.
7032 (common-debug.o): New rule.
7033 * debug.h (debug_printf): Don't declare.
7034 * debug.c (debug_printf): Renamed and rewritten as...
7035 (debug_vprintf): New function.
7036
f6e94d78
GB
70372014-08-19 Gary Benson <gbenson@redhat.com>
7038
7039 * utils.h: Do not include print-utils.h.
7040
9239eeab
GB
70412014-08-19 Tom Tromey <tromey@redhat.com>
7042 Gary Benson <gbenson@redhat.com>
7043
7044 * server.h: Add static assertion.
7045 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7046
ef87c8bb
GB
70472014-08-19 Tom Tromey <tromey@redhat.com>
7048 Gary Benson <gbenson@redhat.com>
7049
7050 * Makefile.in (SFILES): Add common/errors.c.
7051 (OBS): Add errors.o.
7052 (IPA_OBS): Add errors-ipa.o.
7053 (errors.o): New rule.
7054 (errors-ipa.o): Likewise.
7055 * utils.h (perror_with_name, error, warning): Don't declare.
7056 * utils.c (warning): Renamed and rewritten as...
7057 (vwarning): New function.
7058 (error): Renamed and rewritten as...
7059 (verror): New function.
7060 (internal_error): Renamed and rewritten as...
7061 (internal_verror): New function.
7062
bb974a24
GB
70632014-08-07 Gary Benson <gbenson@redhat.com>
7064
7065 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7066 * configure: Regenerate.
7067 * config.in: Likewise.
7068 * server.h: Do not include errno.h.
7069 * event-loop.c: Likewise.
7070 * hostio-errno.c: Likewise.
7071 * linux-low.c: Likewise.
7072 * remote-utils.c: Likewise.
7073 * spu-low.c: Likewise.
7074 * utils.c: Likewise.
7075 * gdbreplay.c: Unconditionally include errno.h.
7076
6d3d12eb
GB
70772014-08-07 Gary Benson <gbenson@redhat.com>
7078
7079 * server.h: Do not include string.h.
7080 * event-loop.c: Likewise.
7081 * linux-low.c: Likewise.
7082 * regcache.c: Likewise.
7083 * remote-utils.c: Likewise.
7084 * spu-low.c: Likewise.
7085 * utils.c: Likewise.
7086
dccbb609
GB
70872014-08-07 Gary Benson <gbenson@redhat.com>
7088
7089 * server.h: Do not include gdb_assert.h.
7090
e76df0d0
GB
70912014-08-07 Gary Benson <gbenson@redhat.com>
7092
7093 * server.h: Do not include common-utils.h.
7094
4cb9c816
GB
70952014-08-07 Gary Benson <gbenson@redhat.com>
7096
7097 * server.h: Do not include ptid.h.
7098 * notif.h: Likewise.
7099
3995eeee
GB
71002014-08-07 Gary Benson <gbenson@redhat.com>
7101
7102 * server.h: Do not include gdb_locale.h.
7103
cb9f1a9b
GB
71042014-08-07 Gary Benson <gbenson@redhat.com>
7105
7106 * server.h: Do not include gdb/signals.h.
7107 * win32-low.c: Likewise.
7108
a5fceff8
GB
71092014-08-07 Gary Benson <gbenson@redhat.com>
7110
7111 * server.h: Do not include pathmax.h.
7112
b9391142
GB
71132014-08-07 Gary Benson <gbenson@redhat.com>
7114
7115 * server.h: Do not include libiberty.h.
7116 * linux-bfin-low.c: Likewise.
7117
0e443c87
GB
71182014-08-07 Gary Benson <gbenson@redhat.com>
7119
7120 * server.h: Do not include ansidecl.h.
7121
8ebb3f56
GB
71222014-08-07 Gary Benson <gbenson@redhat.com>
7123
7124 * linux-x86-low.c: Do not include stddef.h.
7125 * lynx-ppc-low.c: Likewise.
7126 * tracepoint.c: Likewise.
7127
8980bdf6
GB
71282014-08-07 Gary Benson <gbenson@redhat.com>
7129
7130 * server.h: Do not include stdarg.h.
7131 * nto-low.c: Likewise.
7132
d7096f71
GB
71332014-08-07 Gary Benson <gbenson@redhat.com>
7134
7135 * server.h: Do not include stdlib.h.
7136 * inferiors.c: Likewise.
7137 * linux-low.c: Likewise.
7138 * regcache.c: Likewise.
7139 * spu-low.c: Likewise.
7140 * tracepoint.c: Likewise.
7141 * utils.c: Likewise.
7142
d02f550d
GB
71432014-08-07 Gary Benson <gbenson@redhat.com>
7144
7145 * server.h: Do not include stdio.h.
7146 * linux-low.c: Likewise.
7147 * remote-utils.c: Likewise.
7148 * spu-low.c: Likewise.
7149 * utils.c: Likewise.
7150 * wincecompat.c: Likewise.
7151
87f6c4e3
GB
71522014-08-06 Gary Benson <gbenson@redhat.com>
7153
7154 * regcache.c (init_register_cache): Move conditionals inside if.
7155
7089dca4
GB
71562014-08-06 Gary Benson <gbenson@redhat.com>
7157
7158 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7159
462f517e
GB
71602014-07-31 Gary Benson <gbenson@redhat.com>
7161
7162 * ax.h: Do not include server.h.
7163 * gdbthread.h: Likewise.
7164 * lynx-low.h: Likewise.
7165 * notif.h: Likewise.
7166
976411d6
GB
71672014-07-30 Gary Benson <gbenson@redhat.com>
7168
7169 * server.h: Include common-defs.h.
7170 Do not include config.h or build-gnulib-gdbserver/config.h.
7171
d41f6d8e
GB
71722014-07-30 Gary Benson <gbenson@redhat.com>
7173
7174 * hostio-errno.c: Move server.h to top of includes list.
7175 * inferiors.c: Likewise.
7176 * linux-x86-low.c: Likewise.
7177 * notif.c: Include server.h.
7178
314c6a35
TT
71792014-07-24 Tom Tromey <tromey@redhat.com>
7180 Gary Benson <gbenson@redhat.com>
7181
7182 * server.h (CORE_ADDR): Now unsigned.
7183
69ff6be5
PA
71842014-07-16 Pedro Alves <palves@redhat.com>
7185
7186 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7187
ce9e3fe7
PA
71882014-07-15 Pedro Alves <palves@redhat.com>
7189
7190 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7191 copy.
7192
e76126e8
PA
71932014-07-11 Pedro Alves <palves@redhat.com>
7194
7195 * linux-low.c (kill_wait_lwp): New function, based on
7196 kill_one_lwp_callback, but use my_waitpid directly.
7197 (kill_one_lwp_callback, linux_kill): Use it.
7198
8e9db26e
PA
71992014-06-23 Pedro Alves <palves@redhat.com>
7200
7201 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7202 before setting DR0..DR3.
7203
698b3e08
GB
72042014-06-20 Gary Benson <gbenson@redhat.com>
7205
7206 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7207 * configure: Regenerated.
7208 * config.in: Likewise.
7209
125f8a3d
GB
72102014-06-20 Gary Benson <gbenson@redhat.com>
7211
7212 * Makefile.in (SFILES): Update locations for files moved
7213 from common to nat.
7214 (object file files): Reordered.
7215
42995dbd
GB
72162014-06-20 Gary Benson <gbenson@redhat.com>
7217
7218 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7219 (i386_dr_low_set_addr): Likewise.
7220 (i386_dr_low_get_addr): Likewise.
7221 (i386_dr_low_can_set_control): Likewise.
7222 (i386_dr_low_set_control): Likewise.
7223 (i386_dr_low_get_control): Likewise.
7224 (i386_dr_low_get_status): Likewise.
7225 (i386_get_debug_register_length): Likewise.
7226 * linux-x86-low.c (i386_dr_low_set_addr):
7227 Changed signature. Made static.
7228 (i386_dr_low_get_addr): Likewise.
7229 (i386_dr_low_set_control): Likewise.
7230 (i386_dr_low_get_control): Likewise.
7231 (i386_dr_low_get_status): Likewise.
7232 (i386_dr_low): New global variable.
7233 * win32-i386-low.c (i386_dr_low_set_addr):
7234 Changed signature. Made static.
7235 (i386_dr_low_get_addr): Likewise.
7236 (i386_dr_low_set_control): Likewise.
7237 (i386_dr_low_get_control): Likewise.
7238 (i386_dr_low_get_status): Likewise.
7239 (i386_dr_low): New global variable.
7240
e1d2394b
MS
72412014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7242
7243 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7244 * Makefile.in (AR, AR_FLAGS): Define.
7245 * configure: Regenerate.
7246
3a8ee006
GB
72472014-06-19 Gary Benson <gbenson@redhat.com>
7248
7249 * Makefile.in (i386-dregs.o): New rule.
7250 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7251 * i386-low.c (target.h): Remove include.
7252 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7253 (DR_CONTROL_SHIFT): Likewise.
7254 (DR_CONTROL_SIZE): Likewise.
7255 (DR_RW_EXECUTE): Likewise.
7256 (DR_RW_WRITE): Likewise.
7257 (DR_RW_READ): Likewise.
7258 (DR_RW_IORW): Likewise.
7259 (DR_LEN_1): Likewise.
7260 (DR_LEN_2): Likewise.
7261 (DR_LEN_4): Likewise.
7262 (DR_LEN_8): Likewise.
7263 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7264 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7265 (DR_ENABLE_SIZE): Likewise.
7266 (DR_LOCAL_SLOWDOWN): Likewise.
7267 (DR_GLOBAL_SLOWDOWN): Likewise.
7268 (DR_CONTROL_RESERVED): Likewise.
7269 (I386_DR_CONTROL_MASK): Likewise.
7270 (I386_DR_VACANT): Likewise.
7271 (I386_DR_LOCAL_ENABLE): Likewise.
7272 (I386_DR_GLOBAL_ENABLE): Likewise.
7273 (I386_DR_DISABLE): Likewise.
7274 (I386_DR_SET_RW_LEN): Likewise.
7275 (I386_DR_GET_RW_LEN): Likewise.
7276 (I386_DR_WATCH_HIT): Likewise.
7277 (i386_wp_op_t): Likewise.
7278 (i386_show_dr): Likewise.
7279 (i386_length_and_rw_bits): Likewise.
7280 (i386_insert_aligned_watchpoint): Likewise.
7281 (i386_remove_aligned_watchpoint): Likewise.
7282 (i386_handle_nonaligned_watchpoint): Likewise.
7283 i386_update_inferior_debug_regs(): Likewise.
7284 (i386_dr_insert_watchpoint): Likewise.
7285 (i386_dr_remove_watchpoint): Likewise.
7286 (i386_dr_region_ok_for_watchpoint): Likewise.
7287 (i386_dr_stopped_data_address): Likewise.
7288 (i386_dr_stopped_by_watchpoint): Likewise.
7289
8f26655c
GB
72902014-06-19 Gary Benson <gbenson@redhat.com>
7291
7292 * i386-low.c (i386_dr_show): Renamed to
7293 i386_show_dr and made static. All uses updated.
7294 (i386_dr_length_and_rw_bits): Renamed to
7295 i386_length_and_rw_bits and made static.
7296 All uses updated.
7297 (i386_dr_insert_aligned_watchpoint): Renamed to
7298 i386_insert_aligned_watchpoint and made static.
7299 All uses updated.
7300 (i386_dr_remove_aligned_watchpoint): Renamed to
7301 i386_remove_aligned_watchpoint and made static.
7302 All uses updated.
7303 (i386_dr_update_inferior_debug_regs): Renamed to
7304 i386_update_inferior_debug_regs and made static.
7305 All uses updated.
7306
b9228891
GB
73072014-06-18 Gary Benson <gbenson@redhat.com>
7308
5171def3
GB
7309 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7310 (i386_dr_low_can_set_control): Likewise.
7311 (i386_get_debug_register_length): Likewise.
7312 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7313 (i386_dr_low_can_set_control): Likewise.
7314 (i386_get_debug_register_length): Likewise.
7315
73162014-06-17 Gary Benson <gbenson@redhat.com>
7317
b9228891
GB
7318 * i386-low.h (i386-dregs.h): New include.
7319 (DR_FIRSTADDR): Now in i386-dregs.h.
7320 (DR_LASTADDR): Likewise.
7321 (DR_NADDR): Likewise.
7322 (DR_STATUS): Likewise.
7323 (DR_CONTROL): Likewise.
7324 (i386_debug_reg_state): Likewise.
7325 (i386_dr_insert_watchpoint): Likewise.
7326 (i386_dr_remove_watchpoint): Likewise.
7327 (i386_dr_region_ok_for_watchpoint): Likewise.
7328 (i386_dr_stopped_data_address): Likewise.
7329 (i386_dr_stopped_by_watchpoint): Likewise.
7330 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7331
4be83cc2
GB
73322014-06-18 Gary Benson <gbenson@redhat.com>
7333
7334 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7335 i386_dr_insert_watchpoint.
7336 (i386_low_remove_watchpoint): Renamed to
7337 i386_dr_remove_watchpoint.
7338 (i386_low_region_ok_for_watchpoint): Renamed to
7339 i386_dr_region_ok_for_watchpoint.
7340 (i386_low_stopped_data_address): Renamed to
7341 i386_dr_stopped_data_address.
7342 (i386_low_stopped_by_watchpoint): Renamed to
7343 i386_dr_stopped_by_watchpoint.
7344 * i386-low.c (i386_show_dr): Renamed to
7345 i386_dr_show and made nonstatic. All uses updated.
7346 (i386_length_and_rw_bits): Renamed to
7347 i386_dr_length_and_rw_bits and made nonstatic.
7348 All uses updated.
7349 (i386_insert_aligned_watchpoint): Renamed to
7350 i386_dr_insert_aligned_watchpoint and made nonstatic.
7351 All uses updated.
7352 (i386_remove_aligned_watchpoint): Renamed to
7353 i386_dr_remove_aligned_watchpoint and made nonstatic.
7354 All uses updated.
7355 (i386_update_inferior_debug_regs): Renamed to
7356 i386_dr_update_inferior_debug_regs and made nonstatic.
7357 All uses updated.
7358 (i386_low_insert_watchpoint): Renamed to
7359 i386_dr_insert_watchpoint. All uses updated.
7360 (i386_low_remove_watchpoint): Renamed to
7361 i386_dr_remove_watchpoint. All uses updated.
7362 (i386_low_region_ok_for_watchpoint): Renamed to
7363 i386_dr_region_ok_for_watchpoint. All uses updated.
7364 (i386_low_stopped_data_address): Renamed to
7365 i386_dr_stopped_data_address. All uses updated.
7366 (i386_low_stopped_by_watchpoint): Renamed to
7367 i386_dr_stopped_by_watchpoint. All uses updated.
7368
131aa0d4
GB
73692014-06-18 Gary Benson <gbenson@redhat.com>
7370
7371 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7372 (i386_dr_low_can_set_control): Likewise.
7373 (i386_insert_aligned_watchpoint): New check.
7374
d9305f7f
GB
73752014-06-18 Gary Benson <gbenson@redhat.com>
7376
7377 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7378 Renamed to state.
7379
e927c9fc
GB
73802014-06-18 Gary Benson <gbenson@redhat.com>
7381
7382 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7383 instead of fatal and error.
7384 (i386_handle_nonaligned_watchpoint): Likewise.
7385
1b6d4134
GB
73862014-06-18 Gary Benson <gbenson@redhat.com>
7387
7388 * i386-low.c (i386_get_debug_register_length): New macro.
7389 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7390 (i386_show_dr): Use debug_printf instead of fprintf. Use
7391 phex to format values.
7392
6e62758f
GB
73932014-06-18 Gary Benson <gbenson@redhat.com>
7394
7395 * i386-low.h: Comment changes.
7396 * i386-low.c: Likewise.
7397
fc6e2f03
GB
73982014-06-18 Gary Benson <gbenson@redhat.com>
7399
7400 * i386-low.c: Whitespace changes.
7401
f9d1eeed
TT
74022014-06-12 Tom Tromey <tromey@redhat.com>
7403
7404 * utils.c (freeargv): Remove.
7405
0b04e523
TT
74062014-06-12 Tom Tromey <tromey@redhat.com>
7407
7408 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7409 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7410 (parse_debug_format_options): Likewise.
7411 (gdbserver_usage): Likewise.
7412 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7413 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7414 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7415 against libiberty.
7416 ($(LIBGNU)): Depend on libiberty.
7417 (all-lib): Recurse into all subdirs.
7418 (install-only): Invoke "install" target in subdirs.
7419 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7420 targets.
7421 * configure: Rebuild.
7422 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7423 for vasprintf, vsnprintf, or gettimeofday.
7424 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7425 srv_tgtobj.
7426
270c9937
JB
74272014-06-05 Joel Brobecker <brobecker@adacore.com>
7428
7429 * development.sh: Delete.
7430 * Makefile.in (config.status): Adjust dependency on development.sh.
7431 * configure.ac: Adjust development.sh source call.
7432 * configure: Regenerate.
7433
0a261ed8
PA
74342014-06-02 Pedro Alves <palves@redhat.com>
7435
7436 * ax.c (gdb_free_agent_expr): New function.
7437 * ax.h (gdb_free_agent_expr): New declaration.
7438 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7439 list.
7440 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7441 static.
7442 (clear_breakpoint_conditions_and_commands): New function.
7443 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7444 (clear_breakpoint_conditions_and_commands): New declaration.
7445
e9dae05e
RR
74462014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7447
7448 * linux-aarch64-low.c (asm/ptrace.h): Include.
7449
5876f503
JK
74502014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7451
7452 Fix TLS access for -static -pthread.
7453 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7454 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7455 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7456
802e8e6d
PA
74572014-05-20 Pedro Alves <palves@redhat.com>
7458
7459 * linux-aarch64-low.c (aarch64_insert_point)
7460 (aarch64_remove_point): No longer check whether the type is
7461 supported here. Adjust to new interface.
7462 (the_low_target): Install aarch64_supports_z_point_type as
7463 supports_z_point_type method.
7464 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7465 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7466 instead of a Z packet char. Adjust.
7467 (arm_supports_z_point_type): New function.
7468 (arm_insert_point, arm_remove_point): Adjust to new interface.
7469 (the_low_target): Install arm_supports_z_point_type.
7470 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7471 (cris_insert_point, cris_remove_point): Adjust to new interface.
7472 Don't check whether the type is supported here.
7473 (the_low_target): Install cris_supports_z_point_type.
7474 * linux-low.c (linux_supports_z_point_type): New function.
7475 (linux_insert_point, linux_remove_point): Adjust to new interface.
7476 * linux-low.h (struct linux_target_ops) <insert_point,
7477 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7478 raw_breakpoint pointer parameter.
7479 <supports_z_point_type>: New method.
7480 * linux-mips-low.c (mips_supports_z_point_type): New function.
7481 (mips_insert_point, mips_remove_point): Adjust to new interface.
7482 Use mips_supports_z_point_type.
7483 (the_low_target): Install mips_supports_z_point_type.
7484 * linux-ppc-low.c (the_low_target): Install NULL as
7485 supports_z_point_type method.
7486 * linux-s390-low.c (the_low_target): Install NULL as
7487 supports_z_point_type method.
7488 * linux-sparc-low.c (the_low_target): Install NULL as
7489 supports_z_point_type method.
7490 * linux-x86-low.c (x86_supports_z_point_type): New function.
7491 (x86_insert_point): Adjust to new insert_point interface. Use
7492 insert_memory_breakpoint. Adjust to new
7493 i386_low_insert_watchpoint interface.
7494 (x86_remove_point): Adjust to remove_point interface. Use
7495 remove_memory_breakpoint. Adjust to new
7496 i386_low_remove_watchpoint interface.
7497 (the_low_target): Install x86_supports_z_point_type.
7498 * lynx-low.c (lynx_target_ops): Install NULL as
7499 supports_z_point_type callback.
7500 * nto-low.c (nto_supports_z_point_type): New.
7501 (nto_insert_point, nto_remove_point): Adjust to new interface.
7502 (nto_target_ops): Install nto_supports_z_point_type.
7503 * mem-break.c: Adjust intro comment.
7504 (struct raw_breakpoint) <raw_type, size>: New fields.
7505 <inserted>: Update comment.
7506 <shlib_disabled>: Delete field.
7507 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7508 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7509 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7510 (raw_bkpt_type_to_target_hw_bp_type): New function.
7511 (find_enabled_raw_code_breakpoint_at): New function.
7512 (find_raw_breakpoint_at): New type and size parameters. Use them.
7513 (insert_memory_breakpoint): New function, based off
7514 set_raw_breakpoint_at.
7515 (remove_memory_breakpoint): New function.
7516 (set_raw_breakpoint_at): Reimplement.
7517 (set_breakpoint): New, based on set_breakpoint_at.
7518 (set_breakpoint_at): Reimplement.
7519 (delete_raw_breakpoint): Go through the_target->remove_point
7520 instead of assuming memory breakpoints.
7521 (find_gdb_breakpoint_at): Delete.
7522 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7523 (find_gdb_breakpoint): New function.
7524 (set_gdb_breakpoint_at): Delete.
7525 (z_type_supported): New function.
7526 (set_gdb_breakpoint_1): New function, loosely based off
7527 set_gdb_breakpoint_at.
7528 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7529 (delete_gdb_breakpoint_at): Delete.
7530 (delete_gdb_breakpoint_1): New function, loosely based off
7531 delete_gdb_breakpoint_at.
7532 (delete_gdb_breakpoint): New function.
7533 (clear_gdb_breakpoint_conditions): Rename to ...
7534 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7535 breakpoint.
7536 (add_condition_to_breakpoint): Make static.
7537 (add_breakpoint_condition): Take a struct breakpoint pointer
7538 instead of an address. Adjust.
7539 (gdb_condition_true_at_breakpoint): Rename to ...
7540 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7541 z_type parameter.
7542 (gdb_condition_true_at_breakpoint): Reimplement.
7543 (add_breakpoint_commands): Take a struct breakpoint pointer
7544 instead of an address. Adjust.
7545 (gdb_no_commands_at_breakpoint): Rename to ...
7546 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7547 parameter. Return true if no breakpoint was found. Change debug
7548 output.
7549 (gdb_no_commands_at_breakpoint): Reimplement.
7550 (run_breakpoint_commands): Rename to ...
7551 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7552 and change return type to boolean.
7553 (run_breakpoint_commands): New function.
7554 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7555 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7556 breakpoint. Go through the_target->remove_point instead of
7557 assuming memory breakpoint.
7558 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7559 software and hardware breakpoints.
7560 (reinsert_raw_breakpoint): Go through the_target->insert_point
7561 instead of assuming memory breakpoint.
7562 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7563 software and hardware breakpoints.
7564 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7565 Check both software and hardware breakpoints.
7566 (validate_inserted_breakpoint): Assert the breakpoint is a
7567 software breakpoint. Set the inserted flag to -1 instead of
7568 setting shlib_disabled.
7569 (delete_disabled_breakpoints): Adjust.
7570 (validate_breakpoints): Only validate software breakpoints.
7571 Adjust to inserted flag change.
7572 (check_mem_read, check_mem_write): Skip breakpoint types other
7573 than software breakpoints. Adjust to inserted flag change.
7574 * mem-break.h (enum raw_bkpt_type): New enum.
7575 (raw_breakpoint, struct process_info): Forward declare.
7576 (Z_packet_to_target_hw_bp_type): Delete declaration.
7577 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7578 (set_gdb_breakpoint, delete_gdb_breakpoint)
7579 (clear_breakpoint_conditions): New declarations.
7580 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7581 (breakpoint_inserted_here): Update comment.
7582 (add_breakpoint_condition, add_breakpoint_commands): Replace
7583 address parameter with a breakpoint pointer parameter.
7584 (gdb_breakpoint_here): Update comment.
7585 (delete_gdb_breakpoint_at): Delete.
7586 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7587 * server.c (process_point_options): Take a struct breakpoint
7588 pointer instead of an address. Adjust.
7589 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7590 delete_gdb_breakpoint.
7591 * spu-low.c (spu_target_ops): Install NULL as
7592 supports_z_point_type method.
7593 * target.h: Include mem-break.h.
7594 (struct target_ops) <prepare_to_access_memory>: Update comment.
7595 <supports_z_point_type>: New field.
7596 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7597 instead of a char. Also take a raw breakpoint pointer.
7598 * win32-arm-low.c (the_low_target): Install NULL as
7599 supports_z_point_type.
7600 * win32-i386-low.c (i386_supports_z_point_type): New function.
7601 (i386_insert_point, i386_remove_point): Adjust to new interface.
7602 (the_low_target): Install i386_supports_z_point_type.
7603 * win32-low.c (win32_supports_z_point_type): New function.
7604 (win32_insert_point, win32_remove_point): Adjust to new interface.
7605 (win32_target_ops): Install win32_supports_z_point_type.
7606 * win32-low.h (struct win32_target_ops):
7607 <supports_z_point_type>: New method.
7608 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7609 instead of a char. Also take a raw breakpoint pointer.
7610
932539e3
PA
76112014-05-20 Pedro Alves <palves@redhat.com>
7612
7613 * mem-break.h: Include break-common.h.
7614 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7615 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7616 (Z_packet_to_target_hw_bp_type): New declaration.
7617 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7618 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7619 (Z_PACKET_ACCESS_WP): Delete macros.
7620 (Z_packet_to_hw_type): Delete function.
7621 * i386-low.h: Don't include break-common.h here.
7622 (Z_packet_to_hw_type): Delete declaration.
7623 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7624 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7625 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7626 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7627 * linux-aarch64-low.c: Don't include break-common.h here.
7628 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7629 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7630 (Z_packet_to_target_hw_bp_type): Delete function.
7631 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7632 function.
7633 (mips_insert_point, mips_remove_point): Use
7634 Z_packet_to_target_hw_bp_type.
7635
4ff0d3d8
PA
76362014-05-20 Pedro Alves <palves@redhat.com>
7637
7638 * linux-aarch64-low.c: Include break-common.h.
7639 (enum target_point_type): Delete.
7640 (Z_packet_to_point_type): Rename to ...
7641 (Z_packet_to_target_hw_bp_type): ... this, and return a
7642 target_hw_bp_type instead.
7643 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7644 instead of an enum target_point_type.
7645 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7646 breakpoint type.
7647 (aarch64_dr_state_insert_one_point)
7648 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7649 (aarch64_handle_aligned_watchpoint)
7650 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7651 Take an enum target_hw_bp_type instead of an enum
7652 target_point_type.
7653 (aarch64_supports_z_point_type): New function.
7654 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7655 use Z_packet_to_target_hw_bp_type.
7656
786dc519
JB
76572014-05-20 Joel Brobecker <brobecker@adacore.com>
7658
7659 * configure.ac: Only use -Werror by default when DEVELOPMENT
7660 is true.
7661 * configure: Regenerate.
7662
9e0aa64f
JK
76632014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7664
7665 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7666 * linux-x86-low.c (X86_64_USER_REGS): New.
7667 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7668
2b577b92
YQ
76692014-04-28 Yao Qi <yao@codesourcery.com>
7670
7671 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7672 name.
7673
94611da2
PA
76742014-04-25 Pedro Alves <palves@redhat.com>
7675
7676 PR server/16255
7677 * linux-low.c (linux_attach_fail_reason_string): New function.
7678 (linux_attach_lwp): Delete.
7679 (linux_attach_lwp_1): Rename to ...
7680 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7681 argument. Remove "initial" parameter. Return int instead of
7682 void. Don't error or warn here.
7683 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7684 failure to attach to the tgid. Call warning when failing to
7685 attach to an lwp.
7686 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7687 argument. Remove "initial" parameter. Return int instead of
7688 void. Don't error or warn here.
7689 (linux_attach_fail_reason_string): New declaration.
7690 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7691 interface change. Use linux_attach_fail_reason_string.
7692
01f9f808
MS
76932014-04-24 Michael Sturm <michael.sturm@mintel.com>
7694 Walfred Tedeschi <walfred.tedeschi@intel.com>
7695
7696 * Makefile.in: Added rules to handle new files
7697 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7698 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7699 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7700 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7701 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7702 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7703 x32-avx512-linux.o.
7704 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7705 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7706 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7707 i386/x32-avx512.xml.
7708 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7709 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7710 i386/x32-avx512-linux.xml.
7711 * i387-fp.c (num_avx512_k_registers): New constant for number
7712 of K registers.
7713 (num_avx512_zmmh_low_registers): New constant for number of
7714 lower ZMM registers (0-15).
7715 (num_avx512_zmmh_high_registers): New constant for number of
7716 higher ZMM registers (16-31).
7717 (num_avx512_ymmh_registers): New contant for number of higher
7718 YMM registers (ymm16-31 added by avx521 on x86_64).
7719 (num_avx512_xmm_registers): New constant for number of higher
7720 XMM registers (xmm16-31 added by AVX512 on x86_64).
7721 (struct i387_xsave): Add space for AVX512 registers.
7722 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7723 Add code to handle AVX512 registers.
7724 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7725 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7726 prototypei from generated file.
7727 (tdesc_amd64_avx512_linux): Likewise.
7728 (init_registers_x32_avx512_linux): Likewise.
7729 (tdesc_x32_avx512_linux): Likewise.
7730 (init_registers_i386_avx512_linux): Likewise.
7731 (tdesc_i386_avx512_linux): Likewise.
7732 (x86_64_regmap): Add AVX512 registers.
7733 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7734 mask.
7735 (initialize_low_arch): Add code to initialize AVX512 registers.
7736
51aa91f9
PA
77372014-04-23 Pedro Alves <palves@redhat.com>
7738
7739 * mem-break.c (find_gdb_breakpoint_at): Make static.
7740 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7741
a4165e94
PA
77422014-04-23 Pedro Alves <palves@redhat.com>
7743
7744 * i386-low.c: Don't include break-common.h here.
7745 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7746 prototype to take target_hw_bp_type as argument instead of a Z
7747 packet char.
7748 * i386-low.h: Include break-common.h here.
7749 (Z_packet_to_hw_type): Declare.
7750 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7751 prototypes.
7752 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7753 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7754 (x86_remove_point): Convert the packet number to a
7755 target_hw_bp_type before calling i386_low_remove_watchpoint.
7756 * win32-i386-low.c (i386_insert_point): Convert the packet number
7757 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7758 (i386_remove_point): Convert the packet number to a
7759 target_hw_bp_type before calling i386_low_remove_watchpoint.
7760
b8acf843
PA
77612014-04-23 Pedro Alves <palves@redhat.com>
7762
7763 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7764
d708bcd1
PA
77652014-04-10 Pedro Alves <palves@redhat.com>
7766
7767 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7768 Check if the condition or command is NULL before checking if the
7769 breakpoint is known. On success, return true.
7770 * mem-break.h (add_breakpoint_condition): Document return.
7771 (add_breakpoint_commands): Add describing comment.
7772 * server.c (skip_to_semicolon): New function.
7773 (process_point_options): Use it.
7774
2eec7d5b
PA
77752014-04-09 Pedro Alves <palves@redhat.com>
7776
7777 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7778 to lwpid_of.
7779
fa96cb38
PA
77802014-02-27 Pedro Alves <palves@redhat.com>
7781
7782 PR 12702
7783 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7784 macros.
7785 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7786 output.
7787 (last_thread_of_process_p): Take a PID argument instead of a
7788 thread pointer.
7789 (linux_wait_for_lwp): Delete.
7790 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7791 functions.
7792 (linux_low_filter_event): New function, party factored out from
7793 linux_wait_for_event.
7794 (linux_wait_for_event): Rename to ...
7795 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7796 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7797 sigsuspend. Check for zombie leaders.
7798 (linux_wait_for_event): Reimplement as wrapper around
7799 linux_wait_for_event_filtered.
7800 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7801 a normal or signal exit is seen, it's the whole process exiting.
7802 (wait_for_sigstop): No longer a for_each_inferior callback.
7803 Rewrite on top of linux_wait_for_event_filtered.
7804 (stop_all_lwps): Call wait_for_sigstop directly.
7805 * server.c (resume, handle_target_event): Handle
7806 TARGET_WAITKIND_NO_RESUMED.
7807
d763de10
JB
78082014-02-26 Joel Brobecker <brobecker@adacore.com>
7809
7810 * win32-low.c (psapi_get_dll_name,
7811 * win32_CreateToolhelp32Snapshot): Delete.
7812 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7813 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7814 Delete.
7815 (handle_load_dll): Add function description.
7816 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7817
850a0f76
JB
78182014-02-26 Joel Brobecker <brobecker@adacore.com>
7819
7820 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7821 Add comment.
7822 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7823 base address when calling win32_add_one_solib.
7824 (handle_load_dll): Delete local variable load_addr.
7825 Remove 0x1000 offset applied to DLL base address when calling
7826 win32_add_one_solib.
7827 (handle_unload_dll): Add comment.
7828
f25b3fc3
JB
78292014-02-26 Joel Brobecker <brobecker@adacore.com>
7830
7831 * win32-low.c (win32_add_all_dlls): Renames
7832 win32_ensure_ntdll_loaded. Rewrite function documentation.
7833 Adjust implementation to always load all DLLs.
7834 Add 0x1000 offset to DLL base address when calling
7835 win32_add_one_solib.
7836 (child_initialization_done): New static global.
7837 (do_initial_child_stuff): Set child_initialization_done to
7838 zero during child initialization, and 1 after. Replace call
7839 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7840 Add comment.
7841 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7842 (handle_unload_dll): Add function documentation.
7843 (get_child_debug_event): Ignore load and unload DLL events
7844 during child initialization.
7845
d86d4aaf
DE
78462014-02-20 Doug Evans <dje@google.com>
7847
3bc32da3 7848 Remove global all_lwps.
d86d4aaf
DE
7849 * inferiors.h (ptid_of): Move here from linux-low.h.
7850 (pid_of, lwpid_of): Ditto.
7851 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7852 parameter is a struct thread_info * now.
7853 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7854 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7855 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7856 directly.
7857 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7858 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7859 * linux-arm-low.c (update_registers_callback): Update, "entry"
7860 parameter is a struct thread_info * now.
7861 Fetch lwpid from current_inferior directly.
7862 (arm_insert_point): Pass &all_threads to find_inferior instead of
7863 &all_lwps.
7864 (arm_remove_point): Ditto.
7865 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7866 (arm_prepare_to_resume): Fetch pid from thread.
7867 (arm_read_description): Fetch lwpid from current_inferior directly.
7868 * linux-low.c (all_lwps): Delete.
7869 (delete_lwp): Delete call to remove_inferior.
7870 (handle_extended_wait): Fetch lwpid from thread.
7871 (add_lwp): Don't set lwp->entry.id. Remove call to
7872 add_inferior_to_list.
7873 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7874 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7875 (kill_one_lwp_callback): Ditto.
7876 (linux_kill): Don't dereference NULL pointer.
7877 Fetch ptid,lwpid from thread.
7878 (get_detach_signal): Fetch ptid from thread.
7879 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7880 Simplify call to regcache_invalidate_thread.
7881 (delete_lwp_callback): Update, "entry" parameter is a
7882 struct thread_info * now. Fetch pid from thread.
7883 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7884 (status_pending_p_callback): Update, "entry" parameter is a
7885 struct thread_info * now. Fetch ptid from thread.
7886 (find_lwp_pid): Update, "entry" parameter is a
7887 struct thread_info * now.
7888 (linux_wait_for_lwp): Fetch pid from thread.
7889 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7890 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7891 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7892 (dequeue_one_deferred_signal): Ditto.
7893 (cancel_breakpoint): Fetch ptid from current_inferior.
7894 (linux_wait_for_event): Pass &all_threads to find_inferior,
7895 not &all_lwps. Fetch ptid, lwpid from thread.
7896 (count_events_callback): Update, "entry" parameter is a
7897 struct thread_info * now.
7898 (select_singlestep_lwp_callback): Ditto.
7899 (select_event_lwp_callback): Ditto.
7900 (cancel_breakpoints_callback): Ditto.
7901 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7902 not &all_lwps.
7903 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7904 (unsuspend_one_lwp): Update, "entry" parameter is a
7905 struct thread_info * now.
7906 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7907 not &all_lwps.
7908 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7909 Fetch lwpid from thread, not lwp.
7910 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7911 Pass &all_threads to find_inferior, not &all_lwps.
7912 (send_sigstop): Fetch lwpid from thread, not lwp.
7913 (send_sigstop_callback): Update, "entry" parameter is a
7914 struct thread_info * now.
7915 (suspend_and_send_sigstop_callback): Ditto.
7916 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7917 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7918 struct thread_info * now.
7919 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7920 from thread, lwp.
7921 (lwp_running): Update, "entry" parameter is a
7922 struct thread_info * now.
7923 (stop_all_lwps): Fetch ptid from thread.
7924 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7925 (linux_resume_one_lwp): Fetch lwpid from thread.
7926 (linux_set_resume_request): Update, "entry" parameter is a
7927 struct thread_info * now. Fetch pid, lwpid from thread.
7928 (resume_status_pending_p): Update, "entry" parameter is a
7929 struct thread_info * now.
7930 (need_step_over_p): Ditto. Fetch lwpid from thread.
7931 (start_step_over): Fetch lwpid from thread.
7932 (linux_resume_one_thread): Update, "entry" parameter is a
7933 struct thread_info * now. Fetch lwpid from thread.
7934 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7935 (proceed_one_lwp): Update, "entry" parameter is a
7936 struct thread_info * now. Fetch lwpid from thread.
7937 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7938 struct thread_info * now.
7939 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7940 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7941 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7942 directly.
7943 (regsets_store_inferior_registers): Ditto.
7944 (fetch_register, store_register): Ditto.
7945 (linux_read_memory, linux_write_memory): Ditto.
7946 (linux_request_interrupt): Ditto.
7947 (linux_read_auxv): Ditto.
7948 (linux_xfer_siginfo): Ditto.
7949 (linux_qxfer_spu): Ditto.
7950 (linux_qxfer_libraries_svr4): Ditto.
7951 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7952 moved to inferiors.h.
7953 (get_lwp): Delete.
7954 (get_thread_lwp): Update.
7955 (struct lwp_info): Delete member "entry". Simplify comment for
7956 member "thread".
7957 (all_lwps): Delete.
7958 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7959 current_inferior directly.
7960 (update_watch_registers_callback): Update, "entry" parameter is a
7961 struct thread_info * now. Fetch pid from thread.
7962 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7963 (mips_insert_point): Fetch lwpid from current_inferior.
7964 Pass &all_threads to find_inferior, not &all_lwps.
7965 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7966 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7967 directly.
7968 (mips_stopped_data_address): Ditto.
7969 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7970 directly.
7971 * linux-tile-low.c (tile_arch_setup): Ditto.
7972 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7973 (update_debug_registers_callback): Update, "entry" parameter is a
7974 struct thread_info * now. Fetch pid from thread.
7975 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7976 Pass &all_threads to find_inferior, not &all_lwps.
7977 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7978 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7979 Pass &all_threads to find_inferior, not &all_lwps.
7980 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7981 (i386_dr_low_get_status): Ditto.
7982 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7983 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7984 (x86_linux_read_description): Ditto.
7985 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7986
3b8361aa
DE
79872014-02-20 Doug Evans <dje@google.com>
7988
7989 * inferiors.c (get_first_inferior): Fix buglet.
7990
f7667f0d
DE
79912014-02-19 Doug Evans <dje@google.com>
7992
7993 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7994 * inferiors.c (add_thread): Change result type to struct thread_info *.
7995 All callers updated.
7996 (add_lwp): Call add_thread here instead of in callers.
7997 All callers updated.
7998 * linux-low.h (get_lwp_thread): Rewrite.
7999 (struct lwp_info): New member "thread".
8000
b3312d80
DE
80012014-02-19 Doug Evans <dje@google.com>
8002
8003 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8004 All callers updated.
8005
ecc6f45c
DE
80062014-02-19 Doug Evans <dje@google.com>
8007
8008 * inferiors.c (add_thread): Fix whitespace.
8009
649ebbca
DE
80102014-02-19 Doug Evans <dje@google.com>
8011
8012 * dll.c (clear_dlls): Replace accessing list implemention details
8013 with API function.
8014 * gdbthread.h (get_first_thread): Declare.
8015 * inferiors.c (for_each_inferior_with_data): New function.
8016 (get_first_thread): New function.
8017 (find_thread_ptid): Simplify.
8018 (get_first_inferior): New function.
8019 (clear_list): Delete.
8020 (one_inferior_p): New function.
8021 (clear_inferior_list): New function.
8022 (clear_inferiors): Update.
8023 * inferiors.h (for_each_inferior_with_data): Declare.
8024 (clear_inferior_list): Declare.
8025 (one_inferior_p): Declare.
8026 (get_first_inferior): Declare.
8027 * linux-low.c (linux_wait_for_event): Replace accessing list
8028 implemention details with API function.
8029 * server.c (target_running): Ditto.
8030 (accumulate_file_name_length): New function.
8031 (emit_dll_description): New function.
8032 (handle_qxfer_libraries): Replace accessing list implemention
8033 details with API function.
8034 (handle_qxfer_threads_worker): New function.
8035 (handle_qxfer_threads_proper): Replace accessing list implemention
8036 details with API function.
8037 (handle_query): Ditto.
8038 (visit_actioned_threads_callback_ftype): New typedef.
8039 (visit_actioned_threads_data): New struct.
8040 (visit_actioned_threads): Rewrite to be find_inferior callback.
8041 (resume): Call find_inferior.
8042 (handle_status): Replace accessing list implemention
8043 details with API function.
8044 (process_serial_event): Replace accessing list implemention details
8045 with API function.
8046 * target.c (set_desired_inferior): Replace accessing list implemention
8047 details with API function.
8048 * tracepoint.c (same_process_p): New function.
8049 (gdb_agent_about_to_close): Replace accessing list implemention
8050 details with API function.
8051 * win32-low.c (child_delete_thread): Replace accessing list
8052 implemention details with API function.
8053 (match_dll_by_basename): New function.
8054 (dll_is_loaded_by_basename): New function.
8055 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8056 details call to dll_is_loaded_by_basename.
8057
80894984
DE
80582014-02-19 Doug Evans <dje@google.com>
8059
8060 * dll.h (struct dll_info): Add comment.
8061 * gdbthread.h (struct thread_info): Add comment.
8062 (current_ptid): Simplify.
8063 * inferiors.c (add_process): Update.
8064 (remove_process): Update.
8065 * inferiors.h (struct process_info): Rename member "head" to "entry".
8066 * linux-low.c (delete_lwp): Update.
8067 (add_lwp): Update.
8068 (last_thread_of_process_p): Update.
8069 (kill_one_lwp_callback, linux_kill): Update.
8070 (status_pending_p_callback): Update.
8071 (wait_for_sigstop): Update. Simplify read of ptid.
8072 (start_step_over): Update.
8073 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8074 (get_lwp_thread): Update.
8075 (struct lwp_info): Rename member "head" to "entry".
8076 * regcache.h (inferior_list_entry): Delete.
8077 * server.c (kill_inferior_callback): Update.
8078 (detach_or_kill_inferior_callback): Update.
8079 (print_started_pid): Update.
8080 (print_attached_pid): Update.
8081 (process_serial_event): Simplify read of ptid.
8082 * thread-db.c (thread_db_create_event): Update.
8083 (thread_db_get_tls_address): Update.
8084 * win32-low.c (current_inferior_ptid): Simplify.
8085
46917d26
TT
80862014-02-19 Tom Tromey <tromey@redhat.com>
8087
8088 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8089 argument.
8090 (target_supports_btrace): Update.
8091
0759a81e
YQ
80922014-02-14 Yao Qi <yao@codesourcery.com>
8093
8094 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8095 (rsp-low-ipa.o): New target.
8096
a7191e8b
TT
80972014-02-12 Tom Tromey <tromey@redhat.com>
8098
8099 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8100 convert_ascii_to_int.
8101 * regcache.c (registers_to_string): Likewise.
8102 * remote-utils.c (decode_M_packet): Likewise.
8103 * server.c (process_serial_event): Likewise.
8104
ff0e980e
TT
81052014-02-12 Tom Tromey <tromey@redhat.com>
8106
8107 * server.c (handle_query, handle_v_run): Use hex2bin, not
8108 unhexify.
8109 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8110
e9371aff
TT
81112014-02-12 Tom Tromey <tromey@redhat.com>
8112
8113 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8114 convert_int_to_ascii.
8115 * regcache.c (registers_to_string, collect_register_as_string):
8116 Likewise.
8117 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8118 Likewise.
8119 * server.c (process_serial_event): Likewise.
8120 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8121 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8122
971dc0b8
TT
81232014-02-12 Tom Tromey <tromey@redhat.com>
8124
8125 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8126 bin2hex, not hexify.
8127 * tracepoint.c (cmd_qtstatus): Likewise.
8128
0a822afb
TT
81292014-02-12 Tom Tromey <tromey@redhat.com>
8130
8131 * remote-utils.c (monitor_output): Pass explicit length to
8132 hexify.
8133
9c3d6531
TT
81342014-02-12 Tom Tromey <tromey@redhat.com>
8135
8136 * tracepoint.c: Include rsp-low.h.
8137 * server.c: Include rsp-low.h.
8138 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8139 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8140 declare.
8141 * remote-utils.c: Include rsp-low.h.
8142 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8143 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8144 (convert_int_to_ascii, convert_ascii_to_int): Move to
8145 common/rsp-low.c.
8146 * regcache.c: Include rsp-low.h.
8147 * ax.c: Include rsp-low.h.
8148 * Makefile.in (SFILES): Add common/rsp-low.c.
8149 (OBS): Add rsp-low.o.
8150 (rsp-low.o): New target.
8151
01fd3ea5
TT
81522014-02-12 Tom Tromey <tromey@redhat.com>
8153
8154 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8155 Include print-utils.h.
8156 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8157 (plongest, thirty_two, phex_nz): Remove.
8158 * Makefile.in (SFILES): Add common/print-utils.c.
8159 (OBS): Add print-utils.o.
8160 (print-utils-ipa.o): New target.
8161 (print-utils.o): New target.
8162 (IPA_OBJS): Add print-utils-ipa.o.
8163
e99dc820
TT
81642014-02-06 Tom Tromey <tromey@redhat.com>
8165
8166 * Makefile.in (SFILES): Fix indentation.
8167
ee1e2d4f
DE
81682014-02-05 Doug Evans <dje@google.com>
8169
8170 * linux-low.c (linux_wait_for_event): Improve comment.
8171 (linux_wait_1): Keep current_inferior in sync with event_child.
8172
f5a02773
DE
81732014-01-22 Doug Evans <dje@google.com>
8174
8175 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8176
87ce2a04
DE
81772014-01-22 Doug Evans <dje@google.com>
8178
8179 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8180 * configure: Regenerate.
8181 * config.in: Regenerate.
8182 * Makefile.in (SFILES): Add debug.c.
8183 (OBS): Add debug.o.
8184 * debug.c: New file.
8185 * debug.h: New file.
8186 * linux-aarch64-low.c (*): Update all debugging printfs to use
8187 debug_printf instead of fprintf.
8188 * linux-arm-low.c (*): Ditto.
8189 * linux-cris-low.c (*): Ditto.
8190 * linux-crisv32-low.c (*): Ditto.
8191 * linux-m32r-low.c (*): Ditto.
8192 * linux-sparc-low.c (*): Ditto.
8193 * linux-x86.c (*): Ditto.
8194 * linux-low.c (*): Ditto.
8195 (linux_wait_1): Add calls to debug_enter, debug_exit.
8196 (linux_wait): Remove redundant debugging printf.
8197 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8198 (linux_resume, unstop_all_lwps): Ditto.
8199 * mem-break.c (*): Update all debugging printfs to use
8200 debug_printf instead of fprintf.
8201 * remote-utils.c (*): Ditto.
8202 * thread-db.c (*): Ditto.
8203 * server.c #include <ctype.h>, "gdb_vecs.h".
8204 (debug_threads): Moved to debug.c.
8205 (*): Update all debugging printfs to use debug_printf instead of
8206 fprintf.
8207 (start_inferior): Replace call to fflush with call to debug_flush.
8208 (monitor_show_help): Mention set debug-format.
8209 (parse_debug_format_options): New function.
8210 (handle_monitor_command): Handle "monitor set debug-format".
8211 (gdbserver_usage): Mention --debug-format.
8212 (main): Parse --debug-format.
8213 * server.h (debug_threads): Declaration moved to debug.h.
8214 #include "debug.h".
8215 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8216 trace_debug_1 that uses debug_printf.
8217 (tracepoint_look_up_symbols): Update all debugging printfs to use
8218 debug_printf instead of fprintf.
8219
e671835b
BS
82202014-01-20 Baruch Siach <baruch@tkos.co.il>
8221
8222 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8223 sys/ptrace.h.
8224
b5737fa9
PA
82252014-01-17 Pedro Alves <palves@redhat.com>
8226
ea38d2a9 8227 PR build/16445
c7faa97a
PA
8228 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8229 defined after including gdb_proc_service.h.
b5737fa9 8230
40ed484e
DE
82312014-01-16 Doug Evans <dje@google.com>
8232
8233 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8234 (match_dll): Use it.
8235
969c39fb
MM
82362014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8237
8238 * target.h (target_ops) <read_btrace>: Change parameters and
8239 return type to allow error reporting.
8240 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8241 trace reading errors on.
8242 * linux-low.c (linux_low_read_btrace): Pass trace reading
8243 errors on.
8244 (linux_low_disable_btrace): New.
8245
ab7f45ba
DE
82462014-01-15 Doug Evans <dje@google.com>
8247
8248 * inferiors.c (thread_id_to_gdb_id): Delete.
8249 * inferiors.h (thread_id_to_gdb_id): Delete.
8250
66af0f44
EZ
82512014-01-13 Eli Zaretskii <eliz@gnu.org>
8252
8253 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8254 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8255 versions.
8256
9939e131
PA
82572014-01-08 Pedro Alves <palves@redhat.com>
8258
8259 * server.c (handle_status): Don't discard previous queued stop
8260 replies or thread's pending status here.
8261 (main) <disconnection>: Do it here instead.
8262
b7ea362b
PA
82632014-01-08 Pedro Alves <palves@redhat.com>
8264
8265 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8266 * server.c (visit_actioned_threads, handle_pending_status): New
8267 function.
8268 (handle_v_cont): Factor out parts to ...
8269 (resume): ... this new function. If in all-stop, and a thread
8270 being resumed has a pending status, report it without actually
8271 resuming.
8272 (myresume): Adjust to use the new 'resume' function.
8273 (clear_pending_status_callback, set_pending_status_callback)
8274 (find_status_pending_thread_callback): New functions.
8275 (handle_status): Handle the case of multiple threads having
8276 interesting statuses to report. Report threads' real last signal
8277 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8278 with an interesting thread to report the status for, instead of
8279 always reporting the status of the first thread.
8280
28498c42
JB
82812014-01-01 Joel Brobecker <brobecker@adacore.com>
8282
8283 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8284 * gdbreplay.c (gdbreplay_version): Likewise.
8285
f45c82da
YZ
82862013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8287
8288 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8289 iov.iov_len with the real length in use.
8290
379a5e2d
JB
82912013-12-13 Joel Brobecker <brobecker@adacore.com>
8292
8293 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8294 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8295 for all targets that use win32-low.c.
8296 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8297 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8298
4210d83e
PA
82992013-12-13 Pedro Alves <palves@redhat.com>
8300
8301 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8302 if equal to TARGET_WAITKIND_LOADED.
8303 * win32-low.c (cached_status): New static global.
8304 (win32_wait): Add declaration.
8305 (do_initial_child_stuff): Flush all initial pending debug events
8306 up to the initial breakpoint.
8307 (win32_wait): If CACHED_STATUS was set, return that instead
8308 of doing a real wait. Remove the code resuming the execution
8309 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8310 during the initial phase. Also remove the code changing
8311 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8312 TARGET_WAITKIND_STOPPED.
8313
e7f0d979
YQ
83142013-12-11 Yao Qi <yao@codesourcery.com>
8315
8316 * notif.c (handle_notif_ack): Return 0 if no notification
8317 matches.
8318
ebcf782c
DE
83192013-11-20 Doug Evans <dje@google.com>
8320
8321 * linux-low.c (linux_set_resume_request): Fix comment.
8322
20ad9378
DE
83232013-11-20 Doug Evans <dje@google.com>
8324
8325 * linux-low.c (resume_status_pending_p): Tweak comment.
8326
a196ebeb
WT
83272013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8328
8329 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8330 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8331 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8332 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8333 (srv_amd64_regobj): Add amd64-mpx.o.
8334 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8335 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8336 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8337 * i387-fp.c (num_pl_bnd_register) Added constant.
8338 (num_pl_bnd_cfg_registers) Added constant.
8339 (struct i387_xsave) Added reserved area and MPX fields.
8340 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8341 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8342 function.
8343 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8344 (init_registers_amd64_mpx_linux): Declare new function.
8345 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8346 (x86_64_regmap): Add MPX registers.
8347 (x86_linux_read_description): Add MPX case.
8348 (initialize_low_arch): Initialize MPX targets.
8349
0080a2f6
TT
83502013-11-18 Tom Tromey <tromey@redhat.com>
8351
8352 * configure: Rebuild.
8353 * configure.ac: Don't check for stdlib.h.
8354 * gdbreplay.c: Unconditionally include stdlib.h.
8355
2978b111
TT
83562013-11-18 Tom Tromey <tromey@redhat.com>
8357
8358 * config.in: Rebuild.
8359 * configure: Rebuild.
8360 * configure.ac: Don't use AC_HEADER_DIRENT.
8361
a3d08894
TT
83622013-11-18 Tom Tromey <tromey@redhat.com>
8363
8364 * server.h: Don't check HAVE_STRING_H.
8365 * gdbreplay.c: Don't check HAVE_STRING_H.
8366 * configure: Rebuild.
8367
0a5dd17d
TT
83682013-11-18 Tom Tromey <tromey@redhat.com>
8369
8370 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8371 LIBGNU.
8372
1bd2f0ba
TT
83732013-11-08 Tom Tromey <tromey@redhat.com>
8374
8375 * configure, config.in: Rebuild.
8376 * configure.ac: Remove unused configury.
8377
3266f10b
TT
83782013-11-08 Tom Tromey <tromey@redhat.com>
8379
8380 * acinclude.m4: Include common.m4, codeset.m4.
8381 * configure, config.in: Rebuild.
8382 * configure.ac: Use GDB_AC_COMMON.
8383
6682d959
AA
83842013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8385
8386 * linux-s390-low.c (HWCAP_S390_TE): New define.
8387 (s390_arch_setup): Consider the TE field in the HWCAP for
8388 determining 'have_regset_tdb'.
8389
fd0a4d76
SDJ
83902013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8391
8392 PR gdb/16014
8393 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8394 call to sizeof.
8395
1a3d890b
PA
83962013-10-02 Pedro Alves <palves@redhat.com>
8397
8398 * server.c (process_serial_event): Don't output "GDBserver
8399 exiting" if GDB is connected through stdio.
8400 * target.c (mywait): Likewise, be silent if GDB is connected
8401 through stdio.
8402
97ad4581
JB
84032013-10-01 Joel Brobecker <brobecker@adacore.com>
8404
8405 * lynx-low.c (lynx_add_threads_after_attach): New function.
8406 (lynx_attach): Remove call to add_thread. Add call to
8407 lynx_add_threads_after_attach instead.
8408
5b4e221c
MF
84092013-09-28 Mike Frysinger <vapier@gentoo.org>
8410
8411 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8412 * config.in, configure: Regenerated.
8413
ee47b2f8
YQ
84142013-09-18 Yao Qi <yao@codesourcery.com>
8415
8416 PR server/15959
8417 * server.c (start_inferior): Clear 'resume_info'.
8418
d6707650 84192013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8420
d6707650
JW
8421 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8422 for each register.
8423
9243dd0e 84242013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8425
9243dd0e
JW
8426 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8427 linux-tile-low.o to srv_tgtobj.
8428
c623a6ef
WN
84292013-09-16 Will Newton <will.newton@linaro.org>
8430
8431 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8432 out regs.
8433
fb71d39e
PA
84342013-09-06 Pedro Alves <palves@redhat.com>
8435
8436 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8437 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8438 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8439 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8440 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8441 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8442
8e7e9910
PA
84432013-09-06 Pedro Alves <palves@redhat.com>
8444
8445 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8446 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8447
7c3a12ca
PA
84482013-09-06 Pedro Alves <palves@redhat.com>
8449
8450 * linux-amd64-ipa.c: Include tracepoint.h.
8451 * linux-i386-ipa.c: Include tracepoint.h.
8452
8eb3d7b6
RW
84532013-09-06 Ricard Wanderlof <ricardw@axis.com>
8454
8455 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8456 (ps_get_thread_area): New function.
8457
eddddb9d
RW
84582013-09-06 Ricard Wanderlof <ricardw@axis.com>
8459
8460 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8461 (initialize_low_arch): Call init_registers_crisv32 rather than
8462 init_register_crisv32.
8463
533b0600
PA
84642013-09-05 Pedro Alves <palves@redhat.com>
8465
8466 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8467 to ...
8468 * hostio.h: ... this new file.
8469 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8470 win32-low.c: Include hostio.h.
8471
0ce3d3b5
PA
84722013-09-05 Pedro Alves <palves@redhat.com>
8473
8474 * server.h (gdb_client_data, handler_func, callback_handler_func)
8475 (delete_file_handler, add_file_handler, append_callback_event)
8476 (delete_callback_event, start_event_loop, initialize_event_loop):
8477 Move to event-loop.h and include it.
8478 * event-loop.h: New file.
8479
799cdc37
PA
84802013-09-05 Pedro Alves <palves@redhat.com>
8481
8482 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8483 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8484 (loaded_dll, unloaded_dll): Move to ...
8485 * dll.h: ... this new file.
8486 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8487
6a6bbd9d
PA
84882013-09-05 Pedro Alves <palves@redhat.com>
8489
8490 * server.h (current_process, get_thread_process, all_processes)
8491 (add_inferior_to_list, for_each_inferior, current_inferior)
8492 (remove_inferior, add_process, remove_process, find_process_pid)
8493 (have_started_inferiors_p, have_attached_inferiors_p)
8494 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8495 (clear_inferiors, find_inferior, find_inferior_id)
8496 (inferior_target_data, set_inferior_target_data)
8497 (inferior_regcache_data, set_inferior_regcache_data): Move to
8498 inferiors.h, and include it.
8499 * inferiors.h: New file.
8500
f699aaba
PA
85012013-09-05 Pedro Alves <palves@redhat.com>
8502
8503 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8504 Move ...
72f4393d 8505 * ax.h: ... here.
f699aaba 8506
c144c7a0
PA
85072013-09-05 Pedro Alves <palves@redhat.com>
8508
8509 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8510 tracepoint.h.
8511 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8512 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8513 (handle_tracepoint_general_set, handle_tracepoint_query)
8514 (tracepoint_finished_step, tracepoint_was_hit)
8515 (release_while_stepping_state_list, current_traceframe)
8516 (in_readonly_region, traceframe_read_mem)
8517 (fetch_traceframe_registers, traceframe_read_sdata)
8518 (traceframe_read_info, struct fast_tpoint_collect_status)
8519 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8520 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8521 (supply_fast_tracepoint_registers)
8522 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8523 (ipa_tdesc, claim_trampoline_space)
8524 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8525 (agent_mem_read, agent_get_trace_state_variable_value)
8526 (agent_set_trace_state_variable_value, agent_tsv_read)
8527 (agent_mem_read_string, get_raw_reg_func_addr)
8528 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8529 * tracepoint.h: ... this new file.
8530
ff42e6ab
PA
85312013-09-05 Pedro Alves <palves@redhat.com>
8532
8533 * server.h (perror_with_name, error, fatal, warning, paddress)
8534 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8535 include it.
8536 * utils.h: New file.
8537
541af0f4
PA
85382013-09-05 Pedro Alves <palves@redhat.com>
8539
8540 * server.h (remote_debug, noack_mode, transport_is_reliable)
8541 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8542 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8543 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8544 (write_enn, initialize_async_io, enable_async_io)
8545 (disable_async_io, check_remote_input_interrupt_request)
8546 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8547 (dead_thread_notify, prepare_resume_reply)
8548 (decode_address_to_semicolon, decode_address, decode_m_packet)
8549 (decode_M_packet, decode_X_packet, decode_xfer_write)
8550 (decode_search_memory_packet, unhexify, hexify)
8551 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8552 (look_up_one_symbol, relocate_instruction)
8553 (monitor_output): Move to remote-utils.h, and include it.
8554 * remote-utils.h: New file.
8555
eebdf26b
PA
85562013-09-05 Pedro Alves <palves@redhat.com>
8557
8558 * server.h (_): Delete.
8559
3aafd2ff
PA
85602013-09-02 Pedro Alves <palves@redhat.com>
8561
8562 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8563 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8564 allocated.
8565 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8566
cee83bcb
PM
85672013-09-02 Pierre Muller <muller@sourceware.org>
8568
8569 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8570 or WriteProcessMemory complete successfully and handle
8571 ERROR_PARTIAL_COPY error.
8572
9a13b2fa
PA
85732013-09-02 Pedro Alves <palves@redhat.com>
8574
8575 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8576 error instead of EIO.
8577
602e3198
JK
85782013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8579
8580 PR server/15604
8581 * linux-low.c: Include filestuff.h.
8582 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8583 * lynx-low.c: Include filestuff.h.
8584 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8585 * server.c: Include filestuff.h.
8586 (main): Call notice_open_fds.
8587 * spu-low.c: Include filestuff.h.
8588 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8589
96d7229d
LM
85902013-08-22 Luis Machado <lgustavo@codesourcery.com>
8591
8592 * Makefile.in: Explain why ../target and ../nat are not
8593 listed as include file search paths.
8594 (linux-waitpid.o): New object file rule.
8595 * configure.srv (srv_native_linux_obj): New variable.
8596 Replace all occurrences of linux native object files with
8597 $srv_native_linux_obj.
8598 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8599 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8600 (linux_enable_event_reporting): Remove declaration.
8601 (my_waitpid): Moved to common/linux-waitpid.c.
8602 (linux_wait_for_event): Pass ptid when calling
8603 linux_enable_event_reporting.
8604 (linux_supports_tracefork_flag): Remove.
8605 (linux_enable_event_reporting): Likewise.
8606 (linux_tracefork_grandchild): Remove.
8607 (STACK_SIZE): Moved to common/linux-ptrace.c.
8608 (linux_tracefork_child): Remove.
8609 (linux_test_for_tracefork): Remove.
8610 (linux_look_up_symbols): Call linux_supports_traceclone.
8611 (initialize_low): Remove call to linux_test_for_tracefork.
8612 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8613 common/linux-ptrace.h.
8614 (PTRACE_TYPE_ARG4): Likewise.
8615 Include linux-ptrace.h.
8616
32940073
PA
86172013-08-21 Pedro Alves <palves@redhat.com>
8618
8619 * config.in: Renegerate.
8620
33b60d58 86212013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8622
33b60d58
LM
8623 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8624 (SFILES): Remove $(srcdir)/common/target-common.c and
8625 add $(srcdir)/target/waitstatus.c.
8626 (OBS): Remove target-common.o and add waitstatus.o.
8627 (server_h): Remove $(srcdir)/../common/target-common.h and
8628 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8629 and $(srcdir)/../target/waitstatus.h.
8630 (target-common.o): Remove.
8631 (waitstatus.o): New target object file.
8632 * target.h: Do not include target-common.h and
8633 include target/resume.h, target/wait.h and
8634 target/waitstatus.h.
8635
b8e1b30e
LM
86362013-08-13 Luis Machado <lgustavo@codesourcery.com>
8637
8638 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8639 to PTRACE_TYPE_ARG3.
8640 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8641 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8642 PTRACE_TYPE_ARG4.
8643 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8644 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8645
7a60ad40
YQ
86462013-07-27 Jie Zhang <jie@codesourcery.com>
8647 Daniel Jacobowitz <dan@codesourcery.com>
8648 Yao Qi <yao@codesourcery.com>
8649
8650 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8651 (mips-linux-watch.o): New rule.
8652 (mips_linux_watch_h): New variable.
8653 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8654 srv_tgtobj.
8655 * linux-mips-low.c: Include mips-linux-watch.h.
8656 (struct arch_process_info, struct arch_lwp_info): New.
8657 (update_watch_registers_callback): New function.
8658 (mips_linux_new_process, mips_linux_new_thread) New functions.
8659 (mips_linux_prepare_to_resume, mips_insert_point): New
8660 functions.
8661 (mips_remove_point, mips_stopped_by_watchpoint): New
8662 functions.
8663 (rsp_bp_type_to_target_hw_bp_type): New function.
8664 (mips_stopped_data_address): New function.
8665 (the_low_target): Add watchpoint support functions.
8666
de6f69ad
YQ
86672013-07-27 Yao Qi <yao@codesourcery.com>
8668
8669 * i386-low.c: Include break-common.h.
8670 (enum target_hw_bp_type): Remove.
8671
3360c0bf
LM
86722013-07-24 Luis Machado <lgustavo@codesourcery.com>
8673
8674 * Makefile.in (SFILES): /common/target-common.c.
8675 (OBS): Add target-common.o.
8676 (server_h): Add $(srcdir)/../common/target-common.h.
8677 (target-common.o): New target.
8678 * server.c (queue_stop_reply_callback): Free
8679 status string after use.
8680 * target.c (target_waitstatus_to_string): Remove.
8681 * target.h: Include target-common.h.
8682 (resume_kind): Likewise.
8683 (target_waitkind): Likewise.
8684 (target_waitstatus): Likewise.
8685 (TARGET_WNOHANG): Likewise.
8686
bd885420
YQ
86872013-07-04 Yao Qi <yao@codesourcery.com>
8688
8689 * Makefile.in (host_alias): Use @host_noncanonical@.
8690 (target_alias): Use @target_noncanonical@.
8691 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8692 ACX_NONCANONICAL_HOST.
8693 * configure: Regenerated.
8694
8695 Revert:
8696 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8697
8698 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8699 * configure: Rebuild.
8700 * Makefile.in (version_host, version_target): Get from configure.
8701 (version.c): Use $(version_host) and $(version_target).
8702
17ef446e
PA
87032013-07-03 Pedro Alves <palves@redhat.com>
8704
8705 * Makefile.in (config.status): Depend on development.sh.
8706 * acinclude.m4: Include libmcheck.m4.
8707 * configure: Regenerate.
8708
7a9a7487
MG
87092013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8710
8711 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8712 attribute inside the parentheses.
8713 (winapi_DebugSetProcessKillOnExit): Ditto.
8714 (winapi_DebugBreakProcess): Ditto.
8715 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8716
49b64de6
MG
87172013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8718
8719 * notif.h (notif_event): Add a dummy member to avoid compiler
8720 errors.
8721
d5749ee7
PA
87222013-07-01 Pedro Alves <palves@redhat.com>
8723
8724 * hostio.c (HOSTIO_PATH_MAX): Define.
8725 (require_filename, handle_open, handle_unlink, handle_readlink):
8726 Use it.
8727
d8d2a3ee
PA
87282013-07-01 Pedro Alves <palves@redhat.com>
8729
8730 * server.h: Include "pathmax.h".
8731 * linux-low.c: Don't include sys/param.h.
8732 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8733 MAXPATHLEN.
8734 * win32-low.c: Don't include sys/param.h.
8735 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8736
bc7dea8d
PA
87372013-07-01 Pedro Alves <palves@redhat.com>
8738
8739 * event-loop.c: Don't check HAVE_UNISTD_H before including
8740 <unistd.h>.
8741 * gdbreplay.c: Likewise.
8742 * remote-utils.c: Likewise.
8743 * server.c: Likewise.
8744 * configure.ac: Don't check for unistd.h.
8745 * configure: Regenerate.
8746
d6c2da54
TT
87472013-06-28 Tom Tromey <tromey@redhat.com>
8748
8749 * Makefile.in (version.c): Use version.in, not
8750 common/version.in.
8751
257b6bec
MG
87522013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8753
8754 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8755 * configure: Rebuild.
8756 * Makefile.in (version_host, version_target): Get from configure.
8757 (version.c): Use $(version_host) and $(version_target).
8758
86ebe149
DK
87592013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8760
8761 Fix trace-status to output user name without trailing colon.
8762 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8763
f30aa5af
DK
87642013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8765
8766 Fix trace-status to output proper start-time and stop-time.
8767 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8768 output start time and stop time in hex as gdb expects.
8769
28a93511
YQ
87702013-06-26 Pedro Alves <pedro@codesourcery.com>
8771
8772 * tracepoint.c (build_traceframe_info_xml): Output trace state
8773 variables present in the trace buffer.
8774
01208463
TT
87752013-06-24 Tom Tromey <tromey@redhat.com>
8776
8777 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8778 create-version.sh.
8779 (version.o): Remove.
8780 * gdbreplay.c: Include version.h.
8781 (version, host_name): Don't declare.
8782 * server.h: Include version.h.
8783 (version, host_name): Don't declare.
8784
760256f9
PA
87852013-06-12 Pedro Alves <palves@redhat.com>
8786
8787 * linux-x86-low.c (linux_is_elf64): Delete global.
8788 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8789 with local linux_pid_exe_is_elf_64_file use.
8790
030031ee
PA
87912013-06-11 Pedro Alves <palves@redhat.com>
8792
8793 * linux-low.c (regset_disabled, disable_regset): New functions.
8794 (regsets_fetch_inferior_registers)
8795 (regsets_store_inferior_registers): Use them.
8796 (initialize_regsets_info); Don't allocate the disabled_regsets
8797 array here.
8798 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8799 comment.
8800
5da6eb0a
PA
88012013-06-11 Pedro Alves <palves@redhat.com>
8802
8803 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8804 xmalloc.
8805
7e5aaa09
PA
88062013-06-11 Pedro Alves <palves@redhat.com>
8807
8808 * linux-x86-low.c (initialize_low_arch): Call
8809 init_registers_x32_avx_linux.
8810
d878444c
JK
88112013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8812
8813 Fix compatibility with Android Bionic.
8814 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8815 it is not empty.
8816
3aee8918
PA
88172013-06-07 Pedro Alves <palves@redhat.com>
8818
5f2b57b5 8819 PR server/14823
3aee8918
PA
8820 * Makefile.in (OBS): Add tdesc.o.
8821 (IPA_OBJS): Add tdesc-ipa.o.
8822 (tdesc-ipa.o): New rule.
8823 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8824 interface.
8825 * linux-low.c (new_inferior): Delete.
8826 (disabled_regsets, num_regsets): Delete.
8827 (linux_add_process): Adjust to set the new per-process
8828 new_inferior flag.
8829 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8830 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8831 was a stop. When calling arch_setup, switch the current inferior
8832 to the thread that got an event.
8833 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8834 (regsets_fetch_inferior_registers)
8835 (regsets_store_inferior_registers): New regsets_info parameter.
8836 Adjust to use it.
8837 (linux_register_in_regsets): New regs_info parameter. Adjust to
8838 use it.
8839 (register_addr, fetch_register, store_register): New usrregs_info
8840 parameter. Adjust to use it.
8841 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8842 parameter regs_info. Adjust to use it.
8843 (linux_fetch_registers): Get the current inferior's regs_info, and
8844 adjust to use it.
8845 (linux_store_registers): Ditto.
8846 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8847 (initialize_low): Don't initialize the target_regsets here. Call
8848 initialize_low_arch.
8849 * linux-low.h (target_regsets): Delete declaration.
8850 (struct regsets_info): New.
8851 (struct usrregs_info): New.
8852 (struct regs_info): New.
8853 (struct process_info_private) <new_inferior>: New field.
8854 (struct linux_target_ops): Delete the num_regs, regmap, and
8855 regset_bitmap fields. New field regs_info.
8856 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8857 * i387-fp.c (num_xmm_registers): Delete.
8858 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8859 calls to new interface.
8860 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8861 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8862 Infer the number of xmm registers from the regcache's target
8863 description.
8864 * i387-fp.h (num_xmm_registers): Delete.
8865 * inferiors.c (add_thread): Don't install the thread's regcache
8866 here.
8867 * proc-service.c (gregset_info): Fetch the current inferior's
8868 regs_info. Adjust to use it.
8869 * regcache.c: Include tdesc.h.
8870 (register_bytes, reg_defs, num_registers)
8871 (gdbserver_expedite_regs): Delete.
8872 (get_thread_regcache): If the thread doesn't have a regcache yet,
8873 create one, instead of aborting gdbserver.
8874 (regcache_invalidate_one): Rename to ...
8875 (regcache_invalidate_thread): ... this.
8876 (regcache_invalidate_one): New.
8877 (regcache_invalidate): Only invalidate registers of the current
8878 process.
8879 (init_register_cache): Add target_desc parameter, and use it.
8880 (new_register_cache): Ditto. Assert the target description has a
8881 non zero registers_size.
8882 (regcache_cpy): Add assertions. Adjust.
8883 (realloc_register_cache, set_register_cache): Delete.
8884 (registers_to_string, registers_from_string): Adjust.
8885 (find_register_by_name, find_regno, find_register_by_number)
8886 (register_cache_size): Add target_desc parameter, and use it.
8887 (free_register_cache_thread, free_register_cache_thread_one)
8888 (regcache_release, register_cache_size): New.
8889 (register_size): Add target_desc parameter, and use it.
8890 (register_data, supply_register, supply_register_zeroed)
8891 (supply_regblock, supply_register_by_name, collect_register)
8892 (collect_register_as_string, collect_register_by_name): Adjust.
8893 * regcache.h (struct target_desc): Forward declare.
8894 (struct regcache) <tdesc>: New field.
8895 (init_register_cache, new_register_cache): Add target_desc
8896 parameter.
8897 (regcache_invalidate_thread): Declare.
8898 (regcache_invalidate_one): Delete declaration.
8899 (regcache_release): Declare.
8900 (find_register_by_number, register_cache_size, register_size)
8901 (find_regno): Add target_desc parameter.
8902 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8903 declarations.
8904 * remote-utils.c: Include tdesc.h.
8905 (outreg, prepare_resume_reply): Adjust.
8906 * server.c: Include tdesc.h.
8907 (gdbserver_xmltarget): Delete declaration.
8908 (get_features_xml, process_serial_event): Adjust.
8909 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8910 declare.
8911 (struct process_info) <tdesc>: New field.
8912 (ipa_tdesc): Declare.
8913 * tdesc.c: New file.
8914 * tdesc.h: New file.
8915 * tracepoint.c: Include tdesc.h.
8916 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8917 (get_context_regcache): Adjust to pass ipa_tdesc down.
8918 (do_action_at_tracepoint): Adjust to get the register cache size
8919 from the context regcache's description.
8920 (traceframe_walk_blocks): Adjust to get the register cache size
8921 from the current trace frame's description.
8922 (traceframe_get_pc): Adjust to get current trace frame's
8923 description and pass it down.
8924 (gdb_collect): Adjust to get the register cache size from the
8925 IPA's description.
8926 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8927 (gdbserver_xmltarget): Delete.
8928 (initialize_low_tracepoint): Set the ipa's target description.
8929 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8930 (initialize_low_tracepoint): Set the ipa's target description.
8931 * linux-x86-low.c: Include tdesc.h.
8932 [__x86_64__] (is_64bit_tdesc): New.
8933 (ps_get_thread_area, x86_get_thread_area): Use it.
8934 (i386_cannot_store_register): Rename to ...
8935 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8936 (i386_cannot_fetch_register): Rename to ...
8937 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8938 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8939 to new interface.
8940 (target_regsets): Rename to ...
8941 (x86_regsets): ... this.
8942 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8943 interface.
8944 (x86_siginfo_fixup): Use is_64bit_tdesc.
8945 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8946 (tdesc_x32_avx_linux, tdesc_x32_linux)
8947 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8948 Declare.
8949 (x86_linux_update_xmltarget): Delete.
8950 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8951 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8952 (AMD64_LINUX_USER64_CS): New.
8953 (x86_linux_read_description): New, based on
8954 x86_linux_update_xmltarget.
8955 (same_process_callback): New.
8956 (x86_arch_setup_process_callback): New.
8957 (x86_linux_update_xmltarget): New.
8958 (x86_regsets_info): New.
8959 (amd64_linux_regs_info): New.
8960 (i386_linux_usrregs_info): New.
8961 (i386_linux_regs_info): New.
8962 (x86_linux_regs_info): New.
8963 (x86_arch_setup): Reimplement.
8964 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8965 (x86_emit_ops): Ditto.
8966 (the_low_target): Adjust. Install x86_linux_regs_info,
8967 x86_cannot_fetch_register, and x86_cannot_store_register.
8968 (initialize_low_arch): New.
8969 * linux-ia64-low.c (tdesc_ia64): Declare.
8970 (ia64_fetch_register): Adjust.
8971 (ia64_usrregs_info, regs_info): New globals.
8972 (ia64_regs_info): New function.
8973 (the_low_target): Adjust.
8974 (initialize_low_arch): New function.
8975 * linux-sparc-low.c (tdesc_sparc64): Declare.
8976 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8977 Adjust.
8978 (sparc_arch_setup): New function.
8979 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8980 (the_low_target): Adjust.
8981 (initialize_low_arch): New function.
8982 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8983 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8984 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8985 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8986 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8987 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8988 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8989 (tdesc_powerpc_isa205_vsx64l): Declare.
8990 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8991 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8992 (ppc_set_pc, ppc_get_hwcap): Adjust.
8993 (ppc_usrregs_info): Forward declare.
8994 (!__powerpc64__) ppc_regmap_adjusted: New global.
8995 (ppc_arch_setup): Adjust to the current process'es target
8996 description.
8997 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8998 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8999 (ppc_store_evrregset): Adjust.
9000 (target_regsets): Rename to ...
9001 (ppc_regsets): ... this, and make static.
9002 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9003 (ppc_regs_info): New function.
9004 (the_low_target): Adjust.
9005 (initialize_low_arch): New function.
9006 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9007 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9008 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9009 (tdesc_s390x_linux64v2): Declare.
9010 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9011 (s390_fill_gregset, s390_store_last_break): Adjust.
9012 (target_regsets): Rename to ...
9013 (s390_regsets): ... this, and make static.
9014 (s390_get_pc, s390_set_pc): Adjust.
9015 (s390_get_hwcap): New target_desc parameter, and use it.
9016 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9017 (s390_arch_setup): Adjust to set the current process'es target
9018 description. Don't adjust the regmap.
9019 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9020 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9021 (regs_info_3264): New globals.
9022 (s390_regs_info): New function.
9023 (the_low_target): Adjust.
9024 (initialize_low_arch): New function.
9025 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9026 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9027 [__mips64] (init_registers_mips_linux)
9028 (init_registers_mips_dsp_linux): Delete defines.
9029 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9030 (have_dsp): New global.
9031 (mips_read_description): New, based on mips_arch_setup.
9032 (mips_arch_setup): Reimplement.
9033 (get_usrregs_info): New function.
9034 (mips_cannot_fetch_register, mips_cannot_store_register)
9035 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9036 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9037 (target_regsets): Rename to ...
9038 (mips_regsets): ... this, and make static.
9039 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9040 (dsp_regs_info, regs_info): New globals.
9041 (mips_regs_info): New function.
9042 (the_low_target): Adjust.
9043 (initialize_low_arch): New function.
9044 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9045 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9046 Declare.
9047 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9048 (arm_read_description): New, with bits factored from
9049 arm_arch_setup.
9050 (arm_arch_setup): Reimplement.
9051 (target_regsets): Rename to ...
9052 (arm_regsets): ... this, and make static.
9053 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9054 (arm_regs_info): New function.
9055 (the_low_target): Adjust.
9056 (initialize_low_arch): New function.
9057 * linux-m68k-low.c (tdesc_m68k): Declare.
9058 (target_regsets): Rename to ...
9059 (m68k_regsets): ... this, and make static.
9060 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9061 (m68k_regs_info): New function.
9062 (m68k_arch_setup): New function.
9063 (the_low_target): Adjust.
9064 (initialize_low_arch): New function.
9065 * linux-sh-low.c (tdesc_sharch): Declare.
9066 (target_regsets): Rename to ...
9067 (sh_regsets): ... this, and make static.
9068 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9069 (sh_regs_info, sh_arch_setup): New functions.
9070 (the_low_target): Adjust.
9071 (initialize_low_arch): New function.
9072 * linux-bfin-low.c (tdesc_bfin): Declare.
9073 (bfin_arch_setup): New function.
9074 (bfin_usrregs_info, regs_info): New globals.
9075 (bfin_regs_info): New function.
9076 (the_low_target): Adjust.
9077 (initialize_low_arch): New function.
9078 * linux-cris-low.c (tdesc_cris): Declare.
9079 (cris_arch_setup): New function.
9080 (cris_usrregs_info, regs_info): New globals.
9081 (cris_regs_info): New function.
9082 (the_low_target): Adjust.
9083 (initialize_low_arch): New function.
9084 * linux-cris-low.c (tdesc_crisv32): Declare.
9085 (cris_arch_setup): New function.
9086 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9087 (cris_regs_info): New function.
9088 (the_low_target): Adjust.
9089 (initialize_low_arch): New function.
9090 * linux-m32r-low.c (tdesc_m32r): Declare.
9091 (m32r_arch_setup): New function.
9092 (m32r_usrregs_info, regs_info): New globals.
9093 (m32r_regs_info): Adjust.
9094 (initialize_low_arch): New function.
9095 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9096 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9097 (tic6x_usrregs_info): Forward declare.
9098 (tic6x_read_description): New function, based on ...
9099 (tic6x_arch_setup): ... this. Reimplement.
9100 (target_regsets): Rename to ...
9101 (tic6x_regsets): ... this, and make static.
9102 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9103 (tic6x_regs_info): New function.
9104 (the_low_target): Adjust.
9105 (initialize_low_arch): New function.
9106 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9107 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9108 (target_regsets): Rename to ...
9109 (xtensa_regsets): ... this, and make static.
9110 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9111 globals.
9112 (xtensa_arch_setup, xtensa_regs_info): New functions.
9113 (the_low_target): Adjust.
9114 (initialize_low_arch): New function.
9115 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9116 (nios2_arch_setup): Set the current process'es tdesc.
9117 (target_regsets): Rename to ...
9118 (nios2_regsets): ... this.
9119 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9120 (nios2_regs_info): New function.
9121 (the_low_target): Adjust.
9122 (initialize_low_arch): New function.
a261b8f5
PA
9123 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9124 (aarch64_arch_setup): Set the current process'es tdesc.
9125 (target_regsets): Rename to ...
9126 (aarch64_regsets): ... this.
9127 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9128 (aarch64_regs_info): New function.
9129 (the_low_target): Adjust.
9130 (initialize_low_arch): New function.
3aee8918
PA
9131 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9132 globals.
9133 (target_regsets): Rename to ...
9134 (tile_regsets): ... this.
9135 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9136 (tile_regs_info): New function.
9137 (tile_arch_setup): Set the current process'es tdesc.
9138 (the_low_target): Adjust.
9139 (initialize_low_arch): New function.
9140 * spu-low.c (tdesc_spu): Declare.
9141 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9142 * win32-arm-low.c (tdesc_arm): Declare.
9143 (arm_arch_setup): New function.
9144 (the_low_target): Install arm_arch_setup instead of
9145 init_registers_arm.
9146 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9147 (init_windows_x86): Rename to ...
9148 (i386_arch_setup): ... this. Set `win32_tdesc'.
9149 (the_low_target): Adjust.
9150 * win32-low.c (win32_tdesc): New global.
9151 (child_add_thread): Don't create the thread cache here.
9152 (do_initial_child_stuff): Set the new process'es tdesc.
9153 * win32-low.h (struct target_desc): Forward declare.
9154 (win32_tdesc): Declare.
9155 * lynx-i386-low.c (tdesc_i386): Declare global.
9156 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9157 * lynx-low.c (lynx_tdesc): New global.
9158 (lynx_add_process): Set the new process'es tdesc.
9159 * lynx-low.h (struct target_desc): Forward declare.
9160 (lynx_tdesc): Declare global.
9161 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9162 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9163 * nto-low.c (nto_tdesc): New global.
9164 (do_attach): Set the new process'es tdesc.
9165 * nto-low.h (struct target_desc): Forward declare.
9166 (nto_tdesc): Declare.
9167 * nto-x86-low.c (tdesc_i386): Declare.
9168 (nto_x86_arch_setup): Set `nto_tdesc'.
9169
b1fbec62
GB
91702013-06-04 Gary Benson <gbenson@redhat.com>
9171
9172 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9173 to qSupported response when appropriate.
9174 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9175 with nonzero-length annex.
9176 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9177 arguments supplied in annex.
9178
d1ec4ce7
DE
91792013-05-31 Doug Evans <dje@google.com>
9180
ac44adcb 9181 PR server/15594
d1ec4ce7
DE
9182 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9183 64 bits in 64-cross-32 environment.
9184
9b25f2d3
PA
91852013-05-28 Pedro Alves <palves@redhat.com>
9186
9187 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9188 (aarch64-without-fpu.c): Delete rule.
9189 * configure.srv (aarch64*-*-linux*): Remove references to
9190 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9191 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9192 declaration.
9193
6740dc9c
PA
91942013-05-24 Pedro Alves <palves@redhat.com>
9195
9196 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9197 instead of strchr/decode_address. Error if the range isn't split
9198 with a ','. Don't assume there's be a ':' in the action.
9199
c2d6af84
PA
92002013-05-23 Yao Qi <yao@codesourcery.com>
9201 Pedro Alves <palves@redhat.com>
9202
9203 * linux-low.c (lwp_in_step_range): New function.
9204 (linux_wait_1): If the thread was range stepping and stopped
9205 outside the stepping range, report the stop to GDB. Otherwise,
9206 continue stepping. Add range stepping debug output.
9207 (linux_set_resume_request): Copy the step range from the resume
9208 request to the lwp.
9209 (linux_supports_range_stepping): New.
9210 (linux_target_ops) <supports_range_stepping>: Set to
9211 linux_supports_range_stepping.
9212 * linux-low.h (struct linux_target_ops)
9213 <supports_range_stepping>: New field.
9214 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9215 * linux-x86-low.c (x86_supports_range_stepping): New.
9216 (the_low_target) <supports_range_stepping>: Set to
9217 x86_supports_range_stepping.
9218 * server.c (handle_v_cont): Handle 'r' action.
9219 (handle_v_requests): Append ";r" if the target supports range
9220 stepping.
9221 * target.h (struct thread_resume) <step_range_start,
9222 step_range_end>: New fields.
9223 (struct target_ops) <supports_range_stepping>:
9224 New field.
9225 (target_supports_range_stepping): New macro.
9226
58794e1a
JB
92272013-05-17 Joel Brobecker <brobecker@adacore.com>
9228
9229 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9230 confusion in comment.
9231
d631c5a7
JB
92322013-05-17 Joel Brobecker <brobecker@adacore.com>
9233
9234 * lynx-low.c (struct process_info_private): New type.
9235 (lynx_add_process): New function.
9236 (lynx_create_inferior, lynx_attach): Replace calls to
9237 add_process by calls to lynx_add_process.
9238 (lynx_resume): If PTID is null, then try using
9239 current_process()->private->last_wait_event_ptid.
9240 Add comments.
9241 (lynx_clear_inferiors): Delete. The contents of that function
9242 has been inlined in lynx_mourn;
9243 (lynx_wait_1): Save the ptid in the process's private data.
9244 (lynx_mourn): Free the process' private data. Replace call
9245 to lynx_clear_inferiors by call to clear_inferiors.
9246
96f7a20f
YQ
92472013-05-17 Yao Qi <yao@codesourcery.com>
9248
9249 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9250 the right place.
9251
db0dfaa0
LM
92522013-05-16 Luis Machado <lgustavo@codesourcery.com>
9253
9254 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9255 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9256 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9257 PT_TEXT_END_ADDR guards. Update comments.
9258 (linux_target_op) <read_offsets>: Conditionally define to
9259 linux_read_offsets if the target is UCLIBC and if it defines
9260 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9261
68f5f838
SL
92622013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9263 Andrew Jenner <andrew@codesourcery.com>
9264
9265 * Makefile.in (SFILES): Add linux-nios2-low.c.
9266 (clean): Add action to delete nios2-linux.c.
9267 (nios2-linux.c): New rule.
9268 * configure.srv: Add nios2*-*-linux*.
9269 * linux-nios2-low.c: New.
9270
1ebff1fd
HAQ
92712013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9272
9273 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9274
f6150862
HZ
92752013-04-25 Hui Zhu <hui@codesourcery.com>
9276
9277 PR gdb/15186
f6150862
HZ
9278 * ax.c (ax_printf): Add fflush.
9279
614c279d
TT
92802013-04-22 Tom Tromey <tromey@redhat.com>
9281
9282 * Makefile.in (SFILES): Add filestuff.c.
9283 (OBS): Add filestuff.o.
9284 (filestuff.o): New target.
9285 * config.in, configure: Rebuild.
9286 * configure.ac: Check for fdwalk, pipe2.
9287
7d4e5717
PA
92882013-04-17 Pedro Alves <palves@redhat.com>
9289
9290 * configure.ac (USE_THREAD_DB): Delete variable.
9291 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9292 Don't AC_SUBST USE_THREAD_DB.
9293 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9294 * config.in, configure: Regenerate.
9295
d5c93e41
PA
92962013-04-16 Pedro Alves <palves@redhat.com>
9297
9298 * linux-low.h (struct lwp_info) <thread_known>: Move under
9299 the USE_THREAD_DB #ifdef.
9300
04f5fe89
PA
93012013-04-16 Pedro Alves <palves@redhat.com>
9302
9303 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9304 (linux-low.o): Delete rule.
9305 * linux-low.h: Always include "gdb_thread_db.h" instead of
9306 conditionally including thread_db.h.
9307 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9308 HAVE_THREAD_DB_H.
9309
480b27bf
JK
93102013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9311
9312 * Makefile.in (install-only): Fix make install regression.
9313
43662968
JK
93142013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9315
9316 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9317 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9318 installation.
9319 * gdbserver.1: Remove.
9320
3e74e146
PA
93212013-03-22 Pedro Alves <palves@redhat.com>
9322
9323 * linux-low.c (handle_extended_wait): Don't call
9324 linux_enable_event_reporting.
9325
a8347a2a
TT
93262013-03-15 Tony Theodore <tonyt@logyst.com>
9327
9328 PR build/9098:
9329 * Makefile.in (SHELL): Use @SHELL@.
9330
eeb56fa7
SDJ
93312013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9332
9333 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9334 compiler warning.
9335
4fa7e2ff
JB
93362013-03-13 Joel Brobecker <brobecker@adacore.com>
9337
9338 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9339 Remove extraneous NULL element.
9340
8ddb1965
YQ
93412013-03-13 Yao Qi <yao@codesourcery.com>
9342
9343 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9344 'V' block in trace frame.
9345
9accd112
MM
93462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9347
9348 * target.h (struct target_ops): Add btrace ops.
9349 (target_supports_btrace): New macro.
9350 (target_enable_btrace): New macro.
9351 (target_disable_btrace): New macro.
9352 (target_read_btrace): New macro.
9353 * gdbthread.h (struct thread_info): Add btrace field.
9354 * server.c: Include btrace-common.h.
9355 (handle_btrace_general_set): New function.
9356 (handle_btrace_enable): New function.
9357 (handle_btrace_disable): New function.
9358 (handle_general_set): Call handle_btrace_general_set.
9359 (handle_qxfer_btrace): New function.
9360 (struct qxfer qxfer_packets[]): Add btrace entry.
9361 * inferiors.c (remove_thread): Disable btrace.
9362 * linux-low: Include linux-btrace.h.
9363 (linux_low_enable_btrace): New function.
9364 (linux_low_read_btrace): New function.
9365 (linux_target_ops): Add btrace ops.
9366 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9367 Add srv_linux_btrace=yes.
9368 (x86_64-*-linux*): Add linux-btrace.o.
9369 Add srv_linux_btrace=yes.
9370 * configure.ac: Define HAVE_LINUX_BTRACE.
9371 * config.in: Regenerated.
9372 * configure: Regenerated.
9373
5cc22e4c
MM
93742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9375
9376 * server.c (handle_qxfer): Preserve error message if -3 is
9377 returned.
9378 (qxfer): Document the -3 return value.
9379
7c97f91e
MM
93802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9381
9382 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9383 (linux_btrace_h): New variable.
9384 (linux-btrace.o): New rule.
9385
be9a119c 93862013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9387 Hafiz Abid Qadeer <abidh@codesourcery.com>
9388
9389 * tracepoint.c (trace_buffer_size): New global.
9390 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9391 (init_trace_buffer): Change to one-argument function. Allocate
9392 trace buffer memory.
9393 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9394 handle QTBuffer:size packet.
9395 (cmd_bigqtbuffer_size): New function.
9396 (initialize_tracepoint): Call init_trace_buffer with
9397 DEFAULT_TRACE_BUFFER_SIZE.
9398 * server.c (handle_query): Add QTBuffer:size in the
9399 supported packets.
9400
e64f7499
YQ
94012013-03-07 Yao Qi <yao@codesourcery.com>
9402
9403 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9404 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9405 of -1.
9406 (cmd_qtsp): Adjust condition. Do post increment.
9407 Set cur_action and cur_step_action back to 0.
9408
f0ae6fc3
PA
94092013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9410
9411 PR server/15236
9412 * linux-low.c (linux_write_memory): Return early success if LEN is
9413 zero.
9414
b5b0b0af
CV
94152013-03-05 Corinna Vinschen <vinschen@redhat.de>
9416
334ad4a8 9417 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9418
589bc927
TT
94192013-02-28 Tom Tromey <tromey@redhat.com>
9420
9421 * configure.ac: Invoke AC_SYS_LARGEFILE.
9422 * configure, config.in: Rebuild.
9423
dfe07582
CV
94242013-02-28 Corinna Vinschen <vinschen@redhat.com>
9425
9426 * win32-low.c: Throughout, fix format strings and casts of
9427 printf-like functions to avoid type related warnings on all
9428 platforms.
9429 (get_child_debug_event): Print dwDebugEventCode as hex since
9430 that's how it's usually documented.
9431
736cd585
YQ
94322013-02-28 Yao Qi <yao@codesourcery.com>
9433
9434 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9435 pulongest.
9436
e1f58301
JW
94372013-02-27 Jiong Wang <jiwang@tilera.com>
9438
9439 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9440 (reg-tilegx32.c): New rule.
9441 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9442 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9443 different register info initializer according to elf class.
9444 (init_registers_tilgx32): New function. The tilegx32 register info
9445 initializer.
9446 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9447 (tile_store_gregset): Likewise.
9448
d171ca78
YQ
94492013-02-27 Yao Qi <yao@codesourcery.com>
9450
9451 * server.c (process_point_options): Print debug message when
9452 debug_threads is true.
9453
282bbdf3
YQ
94542013-02-26 Yao Qi <yao@codesourcery.com>
9455
9456 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9457
aca22551
PA
94582013-02-19 Pedro Alves <palves@redhat.com>
9459 Kai Tietz <ktietz@redhat.com>
9460
9461 PR gdb/15161
9462
9463 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9464 instead of strtoul to extract address from packet.
9465 (process_serial_event) <'z'>: Likewise.
9466
4f3cee1c
YQ
94672013-02-18 Yao Qi <yao@codesourcery.com>
9468
9469 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9470
8e1d55a3
PA
94712013-02-14 Pedro Alves <palves@redhat.com>
9472
9473 Plug memory leak.
9474
9475 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9476 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9477
458820da
PA
94782013-02-14 Pedro Alves <palves@redhat.com>
9479
9480 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9481
baea0dae
PA
94822013-02-14 Pedro Alves <palves@redhat.com>
9483
9484 * tracepoint.c (save_string): Delete.
9485 (add_tracepoint_action): Use savestring instead of save_string.
9486
0b1afbb3
PA
94872013-02-12 Pedro Alves <palves@redhat.com>
9488
9489 * linux-xtensa-low.c: Ditto.
9490 * xtensa-xtregs.c: Ditto.
9491
8a4ac37e
PA
94922013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9493
9494 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9495 thread_db.
9496
148de6bb
MS
94972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9498
9499 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9500 aarch64_num_wp_regs and aarch64_num_bp_regs to
9501 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9502
55fac6e0
MS
95032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9504
9505 * linux-aarch64-low.c (ps_get_thread_area): Replace
9506 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9507
176eb98c
MS
95082013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9509 Marcus Shawcroft <marcus.shawcroft@arm.com>
9510 Nigel Stephens <nigel.stephens@arm.com>
9511 Yufeng Zhang <yufeng.zhang@arm.com>
9512
9513 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9514 (aarch64.c, aarch64-without-fpu.c): New targets.
9515 * configure.srv (aarch64*-*-linux*): New.
9516 * linux-aarch64-low.c: New file.
9517
56f7af9c
MS
95182013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9519
43aaf8b6 9520 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9521 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9522 (dequeue_one_deferred_signal, linux_resume_one_thread)
9523 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9524 (linux_tracefork_grandchild, linux_test_for_tracefork)
9525 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9526 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9527 where the argument is 0.
9528
60f662b0
YQ
95292013-01-25 Yao Qi <yao@codesourcery.com>
9530
9531 * event-loop.c: Include "queue.h".
9532 (gdb_event_p): New typedef.
9533 (struct gdb_event) <next_event>: Remove.
9534 (event_queue): Change to QUEUE(gdb_event_p).
9535 (async_queue_event): Remove.
9536 (gdb_event_xfree): New.
9537 (initialize_event_loop): New.
9538 (process_event): Use API from QUEUE.
9539 (wait_for_event): Likewise.
9540 * server.c (main): Call initialize_event_loop.
9541 * server.h (initialize_event_loop): Declare.
9542
5ae4861a
YQ
95432013-01-18 Yao Qi <yao@codesourcery.com>
9544
9545 * ax.h (struct eval_agent_expr_context): New.
9546 (gdb_eval_agent_expr): Update declaration.
9547 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9548 TFRAME. Add new argument CTX.
9549 * server.h (struct eval_agent_expr_context): Declare.
9550 (agent_mem_read, agent_tsv_read): Update declaration.
9551 (agent_mem_read_string): Likewise.
9552 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9553 (add_traceframe_block): Add new argument TPOINT.
9554 Increase TPOINT->traceframe_usage.
9555 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9556 eval_tracepoint_agent_expr.
9557 (condition_true_at_tracepoint): Likewise.
9558 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9559 (agent_mem_read_string, agent_tsv_read): Likewise.
9560
85e00e85
YQ
95612013-01-16 Yao Qi <yao@codesourcery.com>
9562
9563 * linux-low.c (linux_resume_one_lwp): Don't check
9564 'lwp->bp_reinsert != 0'.
9565
4039cf45
JB
95662013-01-07 Joel Brobecker <brobecker@adacore.com>
9567 Pedro Alves <palves@redhat.com>
9568
9569 * lynx-low.c (ptrace_request_to_str): Define a temporary
9570 macro and use it to simplify this function's implementation.
9571
9044dee2
JB
95722013-01-07 Joel Brobecker <brobecker@adacore.com>
9573
9574 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9575 sets errno.
9576
e6352c8f
JB
95772013-01-07 Joel Brobecker <brobecker@adacore.com>
9578
9579 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9580
50681a27
JB
95812013-01-07 Joel Brobecker <brobecker@adacore.com>
9582
9583 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9584
3f6e77ef
JB
95852013-01-07 Joel Brobecker <brobecker@adacore.com>
9586
9587 * lynx-low.c (lynx_resume): Use the resume_info parameter
9588 to determine the ptid for the lynx_ptrace call, unless
9589 it is equal to minus_one_ptid, in which case we use the
9590 ptid of the current_inferior.
9591 (lynx_wait_1): After having received a thread create/exit
9592 event, resume the inferior's execution using the signaling
9593 thread's ptid, rather than the old ptid.
9594
7fda33ae
JB
95952013-01-07 Joel Brobecker <brobecker@adacore.com>
9596
9597 * lynx-low.c (lynx_resume): Delete variable ret.
9598
b9786c74
JB
95992013-01-01 Joel Brobecker <brobecker@adacore.com>
9600
9601 * gdbreplay.c (gdbreplay_version): Update copyright year.
9602 * server.c (gdbserver_version): Likewise.
9603
8b93d60f
JB
96042012-12-17 Joel Brobecker <brobecker@adacore.com>
9605
9606 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9607 new thread.
9608
037335a7
JB
96092012-12-17 Joel Brobecker <brobecker@adacore.com>
9610
9611 * lynx-low.c (ptrace_request_to_str): Add handling for
9612 PTRACE_GETTRACESIG.
9613
52d4cbd8
JB
96142012-12-17 Joel Brobecker <brobecker@adacore.com>
9615
9616 * lynx-low.c (lynx_attach): Delete variable new_process.
9617
ab8f6ca9
JB
96182012-12-17 Joel Brobecker <brobecker@adacore.com>
9619
9620 * lynx-low.c (lynx_create_inferior): Delete variable
9621 new_process.
9622
78cbc024
JB
96232012-12-17 Joel Brobecker <brobecker@adacore.com>
9624
9625 * lynx-low.c (ptrace_request_to_str): Do not handle
9626 PTRACE_GETTHREADLIST if this macro does not exist.
9627
14a00470
YQ
96282012-12-15 Yao Qi <yao@codesourcery.com>
9629
9630 * Makefile.in (OBS): Add notif.o.
9631 * notif.c, notif.h: New.
9632 * server.c: Include "notif.h".
9633 (struct vstop_notif) <next>: Remove.
9634 <base>: New field.
9635 (queue_stop_reply): Update.
9636 (push_event, send_next_stop_reply): Remove.
9637 (discard_queued_stop_replies): Update.
9638 (notif_stop): New variable.
9639 (handle_v_stopped): Remove.
9640 (handle_v_requests): Don't call handle_v_stopped. Call
9641 handle_ack_notif instead.
9642 (queue_stop_reply_callback): Call notif_event_enque instead
9643 of queue_stop_reply.
9644 (handle_status): Don't call send_next_stop_reply, call
9645 notif_write_event instead.
9646 (kill_inferior_callback): Likewise.
9647 (detach_or_kill_inferior_callback): Likewise.
9648 (main): Call initialize_notif.
9649 (process_serial_event): Call QUEUE_is_empty.
9650 (handle_target_event): Call notif_push instead of push event.
9651 * server.h (push_event): Remove declaration.
9652
61c125b9
TT
96532012-12-10 Tom Tromey <tromey@redhat.com>
9654
9655 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9656 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9657 macros.
9658 (.c.o): Rewrite.
9659 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9660 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9661 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9662 (amd64-linux-ipa.o, ax.o): Rewrite.
9663 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9664 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9665 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9666 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9667 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9668 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9669 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9670 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9671 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9672 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9673 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9674 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9675 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9676 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9677 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9678 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9679 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9680 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9681 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9682 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9683 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9684 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9685 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9686 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9687 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9688 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9689 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9690 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9691 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9692 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9693 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9694 (reg-tilegx.o): Remove.
9695 (all_object_files): New macro.
9696 Include .deps files.
9697 * aclocal.m4, configure: Rebuild.
9698 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9699 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9700 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9701
e90e9ad9
TT
97022012-12-05 Tom Tromey <tromey@redhat.com>
9703
9704 PR gdb/14917:
9705 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9706
02d403bf 97072012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9708
9709 * configure.ac: Check for linux/perf_event.h.
9710 * config.in: Regenerated.
9711 * configure: Regenerated.
9712
0270a750
PA
97132012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9714
9715 * hostio.c (handle_readlink): Decrease buffer size
9716 parameter passed to readlink by one byte.
9717
8c29b58e
YQ
97182012-11-26 Yao Qi <yao@codesourcery.com>
9719
9720 * configure.ac (build_warnings): Append '-Wempty-body'.
9721 * configure: Regenerated.
9722 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9723 body.
9724
8bdce1ff
PM
97252012-11-15 Pierre Muller <muller@sourceware.org>
9726
9727 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9728 * config.in: Regenerate.
9729 * configure: Regenerate.
9730 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9731 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9732 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9733 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9734 header.
9735 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9736 instead of <sys/wait.h> header.
9737 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9738
02d403bf 97392012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9740
9741 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9742 (various make rules): Remove -DGDBSERVER
9743
fbd5db48
YQ
97442012-11-09 Yao Qi <yao@codesourcery.com>
9745
9746 * spu-low.c (current_ptid): Move it to ..
9747 * gdbthread.h: ... here. New.
9748 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9749 * server.c (myresume, process_serial_event): Likewise.
9750 * thread-db.c (thread_db_find_new_threads): Likewise.
9751 * tracepoint.c (run_inferior_command): Likewise.
9752
b3dc46ff
AB
97532012-10-01 Andrew Burgess <aburgess@broadcom.com>
9754
9755 * server.c (handle_search_memory_1): Include access length in
9756 warning message.
9757
07c04788
HPN
97582012-09-05 Michael Brandt <michael.brandt@axis.com>
9759
9760 * linux-crisv32-low.c: Fix compile errors.
9761
918d227b
YQ
97622012-09-04 Yao Qi <yao@codesourcery.com>
9763
9764 * tracepoint.c (cmd_qtsv): Adjust debug message.
9765 Don't check CUR_TPOINT.
9766
18c1b81a
YQ
97672012-08-28 Yao Qi <yao@codesourcery.com>
9768
9769 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9770 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9771 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9772 Remove declarations of xmalloc, xreallloc, xstrdup and
9773 freeargv.
9774 * Makefile.in (libiberty_h): New.
9775 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9776 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9777
dc82f37b
YQ
97782012-08-23 Yao Qi <yao@codesourcery.com>
9779
9780 * server.h: Remove declaration of 'xsnprintf'.
9781
406b1477
KS
97822012-08-22 Keith Seitz <keiths@redhat.com>
9783
9784 * server.h: Include build-gnulib-gbserver/config.h.
9785 * gdbreplay.c: Likewise.
9786
e6712ff1
DE
97872012-08-08 Doug Evans <dje@google.com>
9788
9789 * Makefile.in (SFILES): Add gdb_vecs.c.
9790 (OBS): Add gdb_vecs.o.
9791 (gdb_vecs_h, host_defs_h): New variables.
9792 (thread-db.o): Add $(gdb_vecs_h) dependency.
9793 (gdb_vecs.o): New rule.
9794 * thread-db.c: #include "gdb_vecs.h".
9795 (thread_db_load_search): Use a vector to iterate over path elements.
9796 Handle text appearing after "$pdir".
9797
9798 * configure.ac: Add check for strstr.
9799 * config.in: Regenerate.
9800 * configure: Regenerate.
9801
7c3270ae
UW
98022012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9803
9804 * hostio.c (handle_pread): If pread fails, fall back to attempting
9805 lseek/read.
9806 (handle_pwrite): Likewise for pwrite.
9807
b62e2b27
UW
98082012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9809
9810 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9811 between unsupported TYPE and unimplementable ADDR/LEN combination.
9812 (arm_insert_point): Act on new return value.
9813
78a99e91
PA
98142012-07-31 Pedro Alves <palves@redhat.com>
9815
9816 * server.c (process_point_options): Only skip tokens if we find
9817 one that is unrecognized. Don't treat 'X' specially while
9818 skipping unrecognized tokens.
9819
fcf303ab
UW
98202012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9821
9822 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9823 to 4-byte-align HW breakpoint addresses for Thumb.
9824
7255706c
YQ
98252012-07-27 Yao Qi <yao@codesourcery.com>
9826
9827 PR remote/14161.
9828
9829 * server.h: Declare gdb_agent_about_to_close.
9830 * target.c (kill_inferior): Include "agent.h".
9831 New. Send command 'kill'.
9832 * target.h (kill_inferior): Removed macro.
9833 * tracepoint.c (gdb_agent_about_to_close): New.
9834 (gdb_agent_helper_thread): Handle command 'close'.
9835 Wait endlessly until the inferior stops.
9836 Install gdb_agent_remove_socket to atexit hook.
9837 (agent_socket_name): New static variable.
9838 (gdb_agent_socket_init): Replace local variable 'name' with
9839 'agent_socket_name'.
9840 (gdb_agent_remove_socket): New.
9841
5a3f286f
YQ
98422012-07-27 Yao Qi <yao@codesourcery.com>
9843
9844 * server.c (process_point_options): Stop at 'X' when parsing.
9845
961bd387
ME
98462012-07-19 Michael Eager <eager@eagercon.com>
9847
a261b8f5 9848 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9849 to hw_execute.
9850 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9851 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9852 hardware breakpoint.
9853
aa7c7447
JK
98542012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9855
9856 * gdbserver/linux-low.c (initialize_low): Call
9857 linux_ptrace_init_warnings.
9858
7f216e7c
DE
98592012-07-02 Doug Evans <dje@google.com>
9860
9861 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9862 pointer to int.
9863
d3ce09f5
SS
98642012-07-02 Stan Shebs <stan@codesourcery.com>
9865
9866 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9867 (ax.o): Add it to build rule.
9868 (ax-ipa.o): Ditto.
9869 (OBS): Add format.o.
9870 (IPA_OBS): Add format.o.
9871 * server.c (handle_query): Claim support for breakpoint commands.
9872 (process_point_options): Add command case.
9873 (process_serial_event): Leave running if there are printfs in
9874 effect.
9875 * mem-break.h (any_persistent_commands): Declare.
9876 (add_breakpoint_commands): Declare.
9877 (gdb_no_commands_at_breakpoint): Declare.
9878 (run_breakpoint_commands): Declare.
9879 * mem-break.c (struct point_command_list): New struct.
9880 (struct breakpoint): New field command_list.
9881 (any_persistent_commands): New function.
9882 (add_commands_to_breakpoint): New function.
9883 (add_breakpoint_commands): New function.
9884 (gdb_no_commands_at_breakpoint): New function.
9885 (run_breakpoint_commands): New function.
9886 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9887 locally.
9888 * ax.c: Include format.h.
9889 (ax_printf): New function.
9890 (gdb_eval_agent_expr): Add printf opcode.
9891
2f8f6aed
YQ
98922012-06-13 Yao Qi <yao@codesourcery.com>
9893
9894 * server.c (start_inferior): Remove duplicated writes to fields
9895 'last_resume_kind' and 'last_status' of 'current_inferior'.
9896
0c9070b3
YQ
98972012-06-12 Yao Qi <yao@codesourcery.com>
9898 Pedro Alves <palves@redhat.com>
9899
9900 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9901 comment.
9902 * server.c (handle_v_cont): Extend comment.
9903
c52daf70
YQ
99042012-06-11 Yao Qi <yao@codesourcery.com>
9905
9906 * linux-low.c (linux_attach): Add 'static'.
9907
d38bbb0a
YQ
99082012-06-06 Yao Qi <yao@codesourcery.com>
9909
9910 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9911
89dc0afd
JK
99122012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9913
9914 Fix gcc -flto compilation warning.
9915 * server.c (main): Make variable multi_mode and attach volatile.
9916
75f62ce7
TJB
99172012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9918
9919 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9920 if the platform doesn't know about it.
9921
65f479b6
PA
99222012-05-30 Jeff Kenton <jkenton@tilera.com>
9923
9924 * Makefile.in (SFILES): Add linux-tile-low.c.
9925 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9926 * configure.srv: Handle tilegx-*-linux*.
9927 * linux-tile-low.c: New file.
9928
0c5bf5a9
JK
99292012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9930
9931 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9932
a493e3e2
PA
99332012-05-24 Pedro Alves <palves@redhat.com>
9934
9935 PR gdb/7205
9936
43aaf8b6 9937 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9938
2ea28649
PA
99392012-05-24 Pedro Alves <palves@redhat.com>
9940
9941 PR gdb/7205
9942
9943 Replace target_signal with gdb_signal throughout.
9944
8d409d16
MR
99452012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9946
9947 * linux-low.c (linux_store_registers): Avoid the copying sequence
9948 when no data has been retrieved by ptrace.
9949
23512c01
MGD
99502012-05-22 Will Deacon <will.deacon@arm.com>
9951
9952 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9953 Include asm/ptrace.h.
9954 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9955 already defined.
9956
4934b29e
MR
99572012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9958
9959 * linux-low.c (linux_store_registers): Don't re-retrieve data
9960 with ptrace that has already been obtained from /proc. Always
9961 copy any data retrieved with ptrace to the buffer supplied.
9962
bde24c0a
PA
99632012-05-11 Yao Qi <yao@codesourcery.com>
9964 Pedro Alves <palves@redhat.com>
9965
9966 * linux-low.c (enum stopping_threads_kind): New.
9967 (stopping_threads): Change type to `enum stopping_threads_kind'.
9968 (handle_extended_wait): If stopping and suspending threads, leave
9969 the new_lwp suspended too.
9970 (linux_wait_for_event): Adjust.
9971 (stop_all_lwps): Set `stopping_threads' to
9972 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9973 whether we're suspending threads or just stopping them. Assert no
9974 recursion happens.
9975
623b6bdf
YQ
99762012-04-29 Yao Qi <yao@codesourcery.com>
9977
9978 * server.h: Move some code to ...
9979 * gdbthread.h: ... here. New.
9980 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9981 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9982 (nto-low.o, win32-low.o): Likewise.
9983 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9984 * regcache.c, remote-utils.c, server.c: Likewise.
9985 * target.c, tracepoint.c, win32-low.c: Likewise.
9986
f15f9948
TJB
99872012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9988
9989 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9990 (PTRACE_ARG4_TYPE): Likewise.
9991 (PTRACE_XFER_TYPE): Likewise.
9992 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9993 ptrace to PTRACE_ARG3_TYPE.
9994 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9995 (PTRACE_ARG4_TYPE): Likewise.
9996 (PTRACE_XFER_TYPE): Likewise.
9997 (linux_detach_one_lwp): Cast fourth argument of
9998 ptrace to long then PTRACE_ARG4_TYPE.
9999 (regsets_fetch_inferior_registers): Cast third argument of
10000 ptrace to long then PTRACE_ARG3_TYPE.
10001 (regsets_store_inferior_registers): Likewise.
10002
38ea300a
PA
100032012-04-20 Pedro Alves <palves@redhat.com>
10004
10005 * configure: Regenerate.
10006
c971b7fa
PA
100072012-04-19 Pedro Alves <palves@redhat.com>
10008
43aaf8b6 10009 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10010 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10011 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10012 (all, install-only, uninstall, clean-info, all-lib, clean): No
10013 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10014 (maintainer-clean realclean distclean): Use subdir_do.
10015 (subdir_do): New.
10016 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10017 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10018 * acinclude.m4: Include acx_configure_dir.m4.
10019 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10020 calls. Call AC_PROG_RANLIB. Configure gnulib using
10021 ACX_CONFIGURE_DIR.
10022 (GNULIB): New.
10023 (GNULIB_STDINT_H): Adjust.
10024 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10025 * gdbreplay.c: Include build-gnulib/config.h.
10026 * server.h: Likewise.
10027 * aclocal.m4: Regenerate.
10028 * config.in: Regenerate.
10029 * configure: Regenerate.
c971b7fa 10030
809277f8
PA
100312012-04-19 Pedro Alves <palves@redhat.com>
10032
10033 * Makefile.in (LIBGNU, INCGNU): Adjust.
10034 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10035 (all, install-only, uninstall, clean-info, all-lib, clean)
10036 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10037 * configure.ac: Adjust AC_OUTPUT output.
10038 * aclocal.m4: Regenerate.
10039 * configure: Regenerate.
10040
fd9bb8b8
PA
100412012-04-19 Pedro Alves <palves@redhat.com>
10042
10043 * Makefile.in (generated_files): New.
10044 (server_h): Remove the explicit dependency on config.h, and depend
10045 on $generated_files.
10046
1c298c66
PA
100472012-04-19 Pedro Alves <palves@redhat.com>
10048
10049 * Makefile.in (INCGNU): Add -Ignulib.
10050
57c4b50b
PA
100512012-04-19 Pedro Alves <palves@redhat.com>
10052
10053 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10054 (INCGNU): ... this, and spell out -I here.
10055 (GNULIB_LIB): Rename to ...
10056 (LIBGNU): ... this.
10057 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10058
1030e047
PA
100592012-04-19 Pedro Alves <palves@redhat.com>
10060
10061 * config.in: Regenerate.
10062
447d4319
PA
100632012-04-19 Pedro Alves <palves@redhat.com>
10064
10065 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10066 * server.h (memmem): Remove declaration.
10067 * config.in: Regenerate.
10068 * configure: Regenerate.
10069
aad9eab9
YQ
100702012-04-19 Yao Qi <yao@codesourcery.com>
10071
10072 * Makefile.in (SFILES): Add common/vec.c.
10073 (OBS): Add vec.o.
10074 (vec.o): New rule.
10075
3e10640f
YQ
100762012-04-19 Yao Qi <yao@codesourcery.com>
10077
10078 * remote-utils.c (prepare_resume_reply): Replace with macro
10079 target_core_of_thread.
10080 * server.c (handle_qxfer_threads_proper): Likewise.
10081 * target.h (traget_core_of_thread): New macro.
10082
71622373
PA
100832012-04-18 Pedro Alves <palves@redhat.com>
10084
10085 * aclocal.m4: Regenerate.
10086 * configure: Regenerate.
10087
80d26939
YQ
100882012-04-16 Yao Qi <yao@codesourcery.com>
10089
10090 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10091 duplicated on address.
10092
42476b70
YQ
100932012-04-16 Yao Qi <yao@codesourcery.com>
10094
10095 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10096 (struct tracepoint_action_ops) <send>: New field.
10097 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10098 (agent_expr_send, x_tracepoint_action_send): New.
10099 (l_tracepoint_action_send): New.
10100 (cmd_qtdp): Download and install tracepoint
10101 according to `use_agent'.
10102 (run_inferior_command): Add one more parameter `len'.
10103 Update callers.
10104 (tracepoint_send_agent): New.
10105 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10106
7bc83639
YQ
101072012-04-16 Yao Qi <yao@codesourcery.com>
10108
10109 * tracepoint.c (download_tracepoints): Moved to ...
10110 (cmd_qtstart): ... here.
10111
5f18041e
YQ
101122012-04-14 Yao Qi <yao@codesourcery.com>
10113
10114 * tracepoint.c: Include inttypes.h.
10115 (struct collect_memory_action): Use sized types.
10116 (struct tracepoint): Likewise.
10117 (cmd_qtdp, stop_tracing): Update print specifiers.
10118 (cmd_qtp, response_tracepoint): Likewise.
10119 (collect_data_at_tracepoint): Likewise.
10120 (collect_data_at_step): Likewise.
10121
55a8c076
YQ
101222012-04-14 Yao Qi <yao@codesourcery.com>
10123
10124 Import gnulib module inttypes.
10125 * aclocal.m4, config.in, configure: Regenerated.
10126
dc750257
YQ
101272012-04-14 Yao Qi <yao@codesourcery.com>
10128
10129 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10130 Makefile and config.status at last.
10131
0ab5faf9
YQ
101322012-04-13 Yao Qi <yao@codesourcery.com>
10133
10134 * tracepoint.c: Include stdint.h unconditionally.
10135
18f5fd81
TJB
101362012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10137
10138 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10139 on BFD_HAVE_SYS_PROCFS_TYPE.
10140 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10141 * configure: Regenerate.
10142 * config.in: Likewise.
10143
4d47af5c
L
101442012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10145
10146 * Makefile.in (clean): Also remove x32.c x32-linux.c
10147 x32-avx.c x32-avx-linux.c.
10148 (x32.o): New target.
10149 (x32.c): Likewise.
10150 (x32-linux.o): Likewise.
10151 (x32-linux.c): Likewise.
10152 (x32-avx.o): Likewise.
10153 (x32-avx.c): Likewise.
10154 (x32-avx-linux.o): Likewise.
10155 (x32-avx-linux.c): Likewise.
10156
10157 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10158 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10159 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10160 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10161 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10162 i386/x32-avx-linux.xml.
10163
10164 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10165 (init_registers_x32_avx_linux): Likwise.
10166 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10167 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10168
ecedbe58
PA
101692012-04-13 Pedro Alves <palves@redhat.com>
10170
10171 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10172 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10173 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10174 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10175 the sub-make.
10176
c92b5177
L
101772012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10178
10179 * linux-x86-low.c (compat_x32_clock_t): New.
10180 (compat_x32_siginfo_t): Likewise.
10181 (compat_x32_siginfo_from_siginfo): Likewise.
10182 (siginfo_from_compat_x32_siginfo): Likewise.
10183 (linux_is_elf64): Likewise.
10184 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10185 and siginfo_from_compat_x32_siginfo for x32.
10186 (x86_arch_setup): Set linux_is_elf64.
10187
214d508e
L
101882012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10189
10190 PR gdb/13969
10191 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10192 e_machine field.
10193 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10194 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10195 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10196 compatible with process.
10197
c9a1864a
YQ
101982012-04-12 Yao Qi <yao@codesourcery.com>
10199
10200 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10201 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10202 (install-only, install-info, clean): Handle sub dir gnulib.
10203 (all-lib, am--refresh): New targets.
10204 (memmem.o): Remove target.
10205 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10206 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10207 (AC_REPLACE_FUNCS): Remove memmem.
10208 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10209 (AC_OUTPUT): Generate Makefile in gnulib/.
10210 * aclocal.m4, config.in, configure: Regenerated.
10211
367ba2c2
MR
102122012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10213
10214 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10215
9d236627
PA
102162012-04-05 Pedro Alves <palves@redhat.com>
10217
10218 -Werror=strict-aliasing
10219
10220 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10221 pointer.
10222
111217b3
PA
102232012-04-04 Pedro Alves <palves@redhat.com>
10224
10225 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10226 (sparc_store_gregset_from_stack, sparc_store_gregset)
10227 (sparc_breakpoint_at): Fix formatting.
10228
8365dcf5
TJB
102292012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10230
10231 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10232 are available.
10233 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10234 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10235 * config.in: Regenerate.
10236 * configure: Likewise.
10237
689cc2ae
PA
102382012-03-29 Pedro Alves <palves@redhat.com>
10239
10240 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10241 Correct ptrace arguments.
10242
c14dfd32
PA
102432012-03-28 Pedro Alves <palves@redhat.com>
10244
10245 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10246 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10247 (IA64_FR1_REGNUM): New defines.
10248 (ia64_fetch_register): New.
10249 (the_low_target): Install it.
10250 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10251 field.
10252 * linux-low.c (linux_fetch_registers): Try the
10253 the_low_target.fetch_register hook first.
10254
10255 * linux-arm-low.c (the_low_target): Adjust.
10256 * linux-bfin-low.c (the_low_target): Adjust.
10257 * linux-cris-low.c (the_low_target): Adjust.
10258 * linux-crisv32-low.c (the_low_target): Adjust.
10259 * linux-m32r-low.c (the_low_target): Adjust.
10260 * linux-m68k-low.c (the_low_target): Adjust.
10261 * linux-mips-low.c (the_low_target): Adjust.
10262 * linux-ppc-low.c (the_low_target): Adjust.
10263 * linux-s390-low.c (the_low_target): Adjust.
10264 * linux-sh-low.c (the_low_target): Adjust.
10265 * linux-sparc-low.c (the_low_target): Adjust.
10266 * linux-tic6x-low.c (the_low_target): Adjust.
10267 * linux-x86-low.c (the_low_target): Adjust.
10268 * linux-xtensa-low.c (the_low_target): Adjust.
10269
63c88e13
PA
102702012-03-26 Pedro Alves <palves@redhat.com>
10271
10272 * server.c (handle_qxfer_libraries): Don't bail early if
10273 the_target->qxfer_libraries_svr4 is not NULL.
10274
fb723180
PA
102752012-03-26 Pedro Alves <palves@redhat.com>
10276
10277 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10278
0afae3cf
PA
102792012-03-23 Pedro Alves <palves@redhat.com>
10280
10281 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10282 "library-list-svr4" element's start tag when the the DSO list is
10283 empty.
10284
485f1ee4
PA
102852012-03-23 Pedro Alves <palves@redhat.com>
10286
10287 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10288 a variable whose type size is the same as the inferior's pointer
10289 size.
10290
a5362b9a
TS
102912012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10292
10293 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10294 struct siginfo.
10295 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10296 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10297 * linux-low.h: Include <signal.h>.
10298 (struct siginfo): Remove forward declaration.
10299 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10300 struct siginfo.
10301
d226c142
MF
103022012-03-21 Mike Frysinger <vapier@gentoo.org>
10303
10304 * .gitignore: Ignore more files.
10305
122f36ef
PA
103062012-03-19 Pedro Alves <palves@redhat.com>
10307 Jan Kratochvil <jan.kratochvil@redhat.com>
10308
10309 * server.c (cont_thread, general_thread): Add describing comments.
10310 (start_inferior): Clear `cont_thread'.
10311 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10312 of a process.
10313
fc3e5175
YQ
103142012-03-15 Yao Qi <yao@codesourcery.com>
10315
10316 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10317 handling to ...
10318 (cmd_qtdp): ... here.
10319
8d0d92cd
YQ
103202012-03-15 Yao Qi <yao@codesourcery.com>
10321
10322 * tracepoint.c (struct tracepoint_action_ops): New.
10323 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10324 (m_tracepoint_action_download): New.
10325 (r_tracepoint_action_download): New.
10326 (x_tracepoint_action_download): New.
10327 (l_tracepoint_action_download): New.
10328 (add_tracepoint_action): Install `action->ops' according type.
10329 (download_tracepoint_1): Move code `download' function pointer
10330 of various tracepoint_action_ops.
10331
87b0bb13
JK
103322012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10333
10334 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10335 linux_ptrace_attach_warnings.
10336
5f572dec
JK
103372012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10338
10339 * Makefile.in (linux-ptrace.o): New.
10340 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10341 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10342 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10343 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10344 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10345 of these targets.
10346 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10347
f4647387
YQ
103482012-03-08 Yao Qi <yao@codesourcery.com>
10349 Pedro Alves <palves@redhat.com>
10350
10351 Fix PR server/13392.
10352 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10353 offset of JMP insn.
10354 * tracepoint.c (remove_tracepoint): New.
10355 (cmd_qtdp): Call remove_tracepoint when failed to install.
10356
9b224c5e
PA
103572012-03-07 Pedro Alves <palves@redhat.com>
10358
10359 * linux-low.c (get_detach_signal): New.
10360 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10361 Pass on pending signals to PTRACE_DETACH. Check the result of the
10362 ptrace call.
10363 * server.c (program_signals, program_signals_p): New.
10364 (handle_general_set): Handle QProgramSignals.
10365 * server.h (program_signals, program_signals_p): Declare.
10366
e237a7e2
JK
103672012-03-05 Pedro Alves <palves@redhat.com>
10368 Jan Kratochvil <jan.kratochvil@redhat.com>
10369
10370 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10371 New comment why.
10372
5808517f
YQ
103732012-03-03 Yao Qi <yao@codesourcery.com>
10374
10375 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10376 agent_look_up_symbols.
10377
58b4daa5
YQ
103782012-03-03 Yao Qi <yao@codesourcery.com>
10379
10380 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10381 (linux-x86-low.o): Likewise.
10382 * server.h: Remove in_process_agent_loaded.
10383 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10384 common/agent.c.
10385 Update callers.
10386
8ffcbaaf
YQ
103872012-03-03 Yao Qi <yao@codesourcery.com>
10388
10389 * tracepoint.c (gdb_agent_capability): New global.
10390 (in_process_agent_loaded_ust): Renamed to
10391 `in_process_agent_supports_ust'.
10392 Update callers.
10393 (in_process_agent_supports_ust): Call agent_capability_check.
10394 (clear_installed_tracepoints): Assert that agent supports
10395 agent.
10396
d1feda86
YQ
103972012-03-03 Yao Qi <yao@codesourcery.com>
10398
10399 * linux-low.c (linux_supports_agent): New.
10400 (linux_target_ops): Initialize field `supports_agent' with
10401 linux_supports_agent.
10402 * target.h (struct target_ops) <supports_agent>: New.
10403 (target_supports_agent): New macro.
10404 * server.c (handle_general_set): Handle packet 'QAgent'.
10405 (handle_query): Send `QAgent+'.
10406 * Makefile.in (server.o): Depends on agent.h.
10407
2fa291ac
YQ
104082012-03-03 Yao Qi <yao@codesourcery.com>
10409
10410 * Makefile.in (OBS): Add agent.o.
10411 Add new rule for agent.o.
10412 Track dependence of tracepoint.c on agent.h.
10413 * tracepoint.c (run_inferior_command_1):
10414 (run_inferior_command): Call agent_run_command.
10415 (gdb_ust_connect_sync_socket): Deleted. Move it to
10416 common/agent.c.
10417 (resume_thread, stop_thread): Likewise.
10418 (gdb_ust_socket_init): Renamed to ...
10419 (gdb_agent_socket_init): ... New.
10420 (gdb_ust_thread): Renamed to ...
10421 (gdb_agent_helper_thread): ... New.
10422 (gdb_ust_init): Move some code to ...
10423 (gdb_agent_init): ... here. New.
10424 [HAVE_UST]: Call gdb_ust_init.
10425 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10426 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10427 * config.in, configure: Regenerated.
10428
05044653
PA
104292012-03-02 Pedro Alves <palves@redhat.com>
10430
10431 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10432 * linux-low.c (struct simple_pid_list): New.
10433 (stopped_pids): New a struct simple_pid_list pointer.
10434 (add_to_pid_list, pull_pid_from_list): New.
10435 (handle_extended_wait): Don't assume the first signal new children
10436 report is SIGSTOP. Adjust call to pull_pid_from_list.
10437 (linux_wait_for_lwp): Adjust.
10438
8d00225b
YQ
104392012-03-02 Yao Qi <yao@codesourcery.com>
10440
10441 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10442 debug log.
10443
19560ba5
YQ
104442012-03-02 Yao Qi <yao@codesourcery.com>
10445
10446 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10447 `stop_pc' and `tpoint'. Update caller.
10448
1faeff08
MR
104492012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10450
10451 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10452 * linux-low.c (use_linux_regsets): New macro.
10453 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10454 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10455 (linux_register_in_regsets): New function.
10456 (usr_fetch_inferior_registers): Skip registers covered by
10457 regsets.
10458 (usr_store_inferior_registers): Likewise.
10459 (usr_fetch_inferior_registers): New macro.
10460 (usr_store_inferior_registers): Likewise.
10461 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10462 (linux_store_registers): Likewise.
10463 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10464 prototype.
10465 (init_registers_mips64_dsp_linux): Likewise.
10466 (init_registers_mips_linux): New macro.
10467 (init_registers_mips_dsp_linux): Likewise.
10468 (mips_dsp_num_regs): Likewise.
10469 (DSP_BASE, DSP_CONTROL): New fallback macros.
10470 (mips_base_regs): New macro.
10471 (mips_regmap): Use it. Fix the size.
10472 (mips_dsp_regmap): New variable.
10473 (mips_dsp_regset_bitmap): Likewise.
10474 (mips_arch_setup): New function.
10475 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10476 than mips_regmap.
10477 (mips_cannot_store_register): Likewise.
10478 (the_low_target): Update .arch_setup, .num_regs and .regmap
10479 initializers. Add .regset_bitmap initializer.
10480 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10481 initializer.
10482 * linux-bfin-low.c (the_low_target): Likewise.
10483 * linux-cris-low.c (the_low_target): Likewise.
10484 * linux-crisv32-low.c (the_low_target): Likewise.
10485 * linux-ia64-low.c (the_low_target): Likewise.
10486 * linux-m32r-low.c (the_low_target): Likewise.
10487 * linux-m68k-low.c (the_low_target): Likewise.
10488 * linux-ppc-low.c (the_low_target): Likewise.
10489 * linux-s390-low.c (the_low_target): Likewise.
10490 * linux-sh-low.c (the_low_target): Likewise.
10491 * linux-sparc-low.c (the_low_target): Likewise.
10492 * linux-tic6x-low.c (the_low_target): Likewise.
10493 * linux-x86-low.c (the_low_target): Likewise.
10494 * linux-xtensa-low.c (the_low_target): Likewise.
10495 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10496 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10497 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10498 srv_xmlfiles.
10499 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10500 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10501
c03e6ccc
YQ
105022012-02-29 Yao Qi <yao@codesourcery.com>
10503 Pedro Alves <palves@redhat.com>
10504
10505 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10506 `step_over_finished' is true.
10507
644cebc9
PA
105082012-02-27 Pedro Alves <palves@redhat.com>
10509
10510 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10511 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10512
c14d7ab2
PA
105132012-02-27 Pedro Alves <palves@redhat.com>
10514
10515 PR server/9684
10516 * linux-low.c (pid_is_stopped): New.
10517 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10518
412c89dd
LM
105192012-02-25 Luis Machado <lgustavo@codesourcery.com>
10520
10521 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10522 of conditions.
10523
b745defe
MR
105242012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10525
10526 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10527
9f3a5c85
LM
105282012-02-24 Luis Machado <lgustavo@codesourcery>
10529
10530 * server.c (handle_query): Advertise support for target-side
10531 breakpoint condition evaluation.
10532 (process_point_options): New function.
10533 (process_serial_event): When inserting a breakpoint, check for
10534 a target-side condition that should be evaluated.
10535
10536 * mem-break.c: Include regcache.h and ax.h.
10537 (point_cond_list_t): New data structure.
10538 (breakpoint) <cond_list>: New field.
10539 (find_gdb_breakpoint_at): Make non-static.
10540 (delete_gdb_breakpoint_at): Clear any target-side
10541 conditions.
10542 (clear_gdb_breakpoint_conditions): New function.
10543 (add_condition_to_breakpoint): Likewise.
10544 (add_breakpoint_condition): Likewise.
10545 (gdb_condition_true_at_breakpoint): Likewise.
10546 (gdb_breakpoint_here): Return result directly instead
10547 of going through a local variable.
10548
10549 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10550 (clear_gdb_breakpoint_conditions): Likewise.
10551 (add_breakpoint_condition): Likewise.
10552 (gdb_condition_true_at_breakpoint): Likewise.
10553
10554 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10555 (need_step_over_p): Take target-side breakpoint condition into
10556 consideration.
10557
5e1dc496
LM
105582012-02-24 Luis Machado <lgustavo@codesourcery>
10559
10560 * server.h: Include tracepoint.h.
10561 (agent_mem_read, agent_get_trace_state_variable_value,
10562 agent_set_trace_state_variable_value,
10563 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10564 get_set_tsv_func_addr): New prototypes.
10565
10566 * ax.h: New include file.
10567 * ax.c: New source file.
10568
10569 * tracepoint.c: Include ax.h.
10570 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10571 agent_expr, eval_result_type): Move to ax.h.
10572 (parse_agent_expr): Rename to ...
10573 (gdb_parse_agent_expr): ... this, make it non-static and move
10574 to ax.h.
10575 (unparse_agent_expr) Rename to ...
10576 (gdb_unparse_agent_expr): ... this, make it non-static and move
10577 to ax.h.
10578 (eval_agent_expr): Rename to ...
10579 (eval_tracepoint_agent_expr): ... this.
10580 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10581 forward declarations.
10582 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10583 (agent_get_trace_state_variable_value): New function.
10584 (agent_set_trace_state_variable_value): New function.
10585 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10586 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10587 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10588 (condition_true_at_tracepoint): Likewise.
10589 (parse_agent_expr): Rename to ...
10590 (gdb_parse_agent_expr): ... this and move to ax.c.
10591 (unparse_agent_expr): Rename to ...
10592 (gdb_unparse_agent_expr): ... this and move to ax.c.
10593 (gdb_agent_op_name): Move to ax.c.
10594 (eval_agent_expr): Rename to ...
10595 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10596 and move to ax.c.
10597 (eval_tracepoint_agent_expr): New function.
10598 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10599 non-static.
5e1dc496
LM
10600 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10601 ax.c.
10602 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10603 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10604 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10605 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10606 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10607 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10608 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10609 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10610 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10611 (compile_bytecodes): Remove forward declaration.
10612 (is_goto_target): Move to ax.c.
10613 (compile_bytecodes): Move to ax.c and call
10614 agent_get_trace_state_variable_value (...) and
10615 agent_set_trace_state_variable_value (...).
10616
10617 * Makefile.in: Update ax.c and IPA dependencies.
10618
277e4e52
PA
106192012-02-24 Pedro Alves <palves@redhat.com>
10620
10621 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10622 (cmd_bigqtbuffer_circular): ... this. Only handle
10623 'QTBuffer:circular:'.
10624 (handle_tracepoint_general_set): Adjust.
10625
bf4c19f7
YQ
106262012-02-16 Yao Qi <yao@codesourcery.com>
10627
10628 * inferiors.c: Move code to ...
10629 * dll.c: .... here. New.
10630 * server.h: Declare clear_dlls.
10631 * Makefile.in (SFILES): Add dll.c.
10632 (OBS): Add dll.o
10633 (dll.o): New rule.
10634
d73f2619
YQ
106352012-02-11 Yao Qi <yao@codesourcery.com>
10636
10637 * server.c: (handle_monitor_command): Add a new parameter
10638 `own_buf'.
10639 (handle_query): Update caller.
10640
f8255c2a
JB
106412012-02-09 Joel Brobecker <brobecker@adacore.com>
10642
10643 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10644 * configure, config.in: Regenerate.
10645 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10646 is not defined.
10647
da84f473
PA
106482012-02-02 Pedro Alves <palves@redhat.com>
10649
10650 Try SIGKILL first, then PTRACE_KILL.
10651 * linux-low.c (linux_kill_one_lwp): New.
10652 (linux_kill_one_lwp): Rename to ...
10653 (kill_one_lwp_callback): ... this. Use the new
10654 linux_kill_one_lwp.
10655
e886a173
PA
106562012-02-02 Pedro Alves <palves@redhat.com>
10657
10658 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10659 inferior.
10660
be07f1a2
PA
106612012-01-27 Pedro Alves <palves@redhat.com>
10662
10663 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10664 (elf_64_file_p): Make static.
10665 (linux_pid_exe_is_elf_64_file): New.
10666 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10667 Delete declarations.
10668 (linux_pid_exe_is_elf_64_file): Declare.
10669 * linux-x86-low.c (x86_arch_setup): Use
10670 linux_pid_exe_is_elf_64_file.
10671
d8301ad1
JK
106722012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10673
10674 * linux-low.c (linux_wait_for_event_1): Rename to ...
10675 (linux_wait_for_event): ... here and merge it with former
10676 linux_wait_for_event - new variable wait_ptid, use it.
10677 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10678
01b17894
PA
106792012-01-23 Pedro Alves <palves@redhat.com>
10680
10681 * server.c (main): Avoid yet another case of infinite loop while
10682 detaching/killing after a longjmp.
10683
e825046f
JK
106842012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10685
10686 Code cleanup.
10687 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10688
b9e7b9c3
UW
106892012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10690
10691 * hostio.c (handle_readlink): New function.
10692 (handle_vFile): Call it to handle "vFile:readlink" packets.
10693
901f9912
UW
106942012-01-20 Pedro Alves <palves@redhat.com>
10695 Ulrich Weigand <ulrich.weigand@linaro.org>
10696
10697 * server.c (handle_v_requests): Only support vAttach and vRun to
10698 start multiple processes when in extended protocol mode.
10699
fc1ab1a0
PA
107002012-01-17 Pedro Alves <palves@redhat.com>
10701
10702 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10703 memalign plus mprotect to allocate the scratch buffer.
10704
7d5d4e98
PA
107052012-01-13 Pedro Alves <palves@redhat.com>
10706
10707 * server.c (attach_inferior): Clear `cont_thread'.
10708
f128d5e9
PA
107092012-01-13 Pedro Alves <palves@redhat.com>
10710
10711 * server.c (main): Avoid infinite loop while detaching/killing
10712 after a longjmp.
10713
06db92f0
DE
107142012-01-09 Doug Evans <dje@google.com>
10715
10716 * server.c (start_inferior): Set last_ptid in --wrapper case.
10717
32d92999
YQ
107182012-01-06 Yao Qi <yao@codesourcery.com>
10719
10720 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10721 defined.
10722 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10723
5e0a92a9
YQ
107242012-01-04 Yao Qi <yao@codesourcery.com>
10725
10726 * tracepoint.c (cmd_qtdp): Print debug message
10727 for static tracepoint.
10728
ae639e8c
YQ
107292012-01-04 Yao Qi <yao@codesourcery.com>
10730
10731 * tracepoint.c (trace_vdebug): Differentiate debug message
10732 between gdbserver and IPA.
10733
f72429c5
YQ
107342012-01-03 Yao Qi <yao@codesourcery.com>
10735
10736 * tracepoint.c (tracepoint_was_hit): Don't collect for
10737 static tracepoint.
10738
12c3e59c
JB
107392012-01-02 Joel Brobecker <brobecker@adacore.com>
10740
10741 * terminal.h: Reformat copyright header.
10742
67827812
JB
107432012-01-02 Joel Brobecker <brobecker@adacore.com>
10744
10745 * server.c (gdbserver_version): Update copyright year.
10746 * gdbreplay.c (gdbreplay_version): Likewise.
10747
3e52c33d
JK
107482011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10749
10750 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10751
10752 Revert:
10753 2011-12-18 Hui Zhu <teawater@gmail.com>
10754 * linux-low.c (linux_create_inferior): Save return value to ret.
10755
66f1260e
HZ
107562011-12-18 Hui Zhu <teawater@gmail.com>
10757
10758 * linux-low.c (linux_create_inferior): Save return value to ret.
10759
e77616d7
DE
107602011-12-16 Doug Evans <dje@google.com>
10761
e7b06c57
DE
10762 * linux-low.c (linux_create_inferior): If stdio connection,
10763 redirect stdin from /dev/null, stdout to stderr.
10764 * remote-utils.c (remote_is_stdio): New static global.
10765 (remote_connection_is_stdio): New function.
10766 (remote_prepare): Handle stdio connection.
10767 (remote_open): Ditto.
10768 (remote_close): Don't close stdin for stdio connections.
10769 (read_prim,write_prim): New functions. Replace all calls to
10770 read/write to these.
10771 * server.c (main): Watch for "-" argument. Move call to
10772 remote_prepare before start_inferior.
10773 * server.h (STDIO_CONNECTION_NAME): New macro.
10774 (remote_connection_is_stdio): Declare.
10775
e77616d7
DE
10776 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10777 in debugging output.
10778
82067193
YQ
107792011-12-15 Yao Qi <yao@codesourcery.com>
10780
10781 * tracepoint.c: Include sys/syscall.h.
10782 (gdb_ust_thread): Remove preprocessor conditional.
10783
82bfbe7e
PA
107842011-12-14 Pedro Alves <pedro@codesourcery.com>
10785
10786 * linux-low.c (linux_detach_one_lwp): Call
10787 the_low_target.prepare_to_resume before detaching.
10788
712c6575
YQ
107892011-12-14 Yao Qi <yao@codesourcery.com>
10790
10791 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10792 of write.
10793
d54d1edf
YQ
107942011-12-14 Yao Qi <yao@codesourcery.com>
10795
10796 * i386-low.c (i386_low_stopped_data_address): Initialize local
10797 variable `control'.
10798
6210a125
PA
107992011-12-13 Pedro Alves <pedro@codesourcery.com>
10800
10801 PR remote/13492
10802
10803 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10804 DR_CONTROL unless necessary. Extend comments.
10805 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10806 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10807
2ece8244
YQ
108082011-12-13 Yao Qi <yao@codesourcery.com>
10809
10810 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10811 macros.
10812 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10813
784867a5
JK
108142011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10815
10816 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10817 Print new debug message for such case.
10818
6bf36717
JK
108192011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10820
10821 Fix overlapping memcpy.
10822 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10823 the read_inferior_memory transfer.
10824 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10825 write_inferior_memory transfer.
10826 (set_fast_tracepoint_jump): New variable buf. Use it for the
10827 read_inferior_memory and write_inferior_memory transfers.
10828 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10829 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10830 Use it for the write_inferior_memory transfer.
10831 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10832 buffers.
10833
50275556
MR
108342011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10835
10836 * linux-low.c (fetch_register, store_register): Make code
10837 consistent, fix formatting.
10838
7325beb4
MR
108392011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10840
10841 * linux-low.c (usr_store_inferior_registers): Factor out code
10842 to handle individual registers into...
10843 (store_register): ... this new function.
10844
c642a434
UW
108452011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10846
10847 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10848 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10849 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10850 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10851 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10852 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10853 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10854 (srv_xmlfiles): Add new XML files.
10855
10856 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10857 and <sys/uio.h>.
10858 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10859 (init_registers_s390_linux32v1): Add prototype.
10860 (init_registers_s390_linux32v2): Likewise.
10861 (init_registers_s390_linux64v1): Likewise.
10862 (init_registers_s390_linux64v2): Likewise.
10863 (init_registers_s390x_linux64v1): Likewise.
10864 (init_registers_s390x_linux64v2): Likewise.
10865 (s390_num_regs): Increment to 52.
10866 (s390_regmap): Add orig_r2 register.
10867 (s390_num_regs_3264): Increment to 68.
10868 (s390_regmap_3264): Add orig_r2 register.
10869 (s390_collect_ptrace_register): Handle orig_r2 register.
10870 (s390_supply_ptrace_register): Likewise.
10871 (s390_fill_last_break): New function.
10872 (s390_store_last_break): Likewise.
10873 (s390_fill_system_call): New function.
10874 (s390_store_system_call): Likewise.
10875 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10876 register sets.
10877 (s390_check_regset): New function.
10878 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10879 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10880 Update target_regsets for available register sets.
10881
2268b414
JK
108822011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10883 Jan Kratochvil <jan.kratochvil@redhat.com>
10884
10885 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10886 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10887 New.
10888 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10889 * linux-low.h (struct process_info_private): New member r_debug.
10890 * server.c (handle_qxfer_libraries): Call
10891 the_target->qxfer_libraries_svr4.
10892 (handle_qxfer_libraries_svr4): New function.
10893 (qxfer_packets): New entry "libraries-svr4".
10894 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10895 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10896 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10897 PACKET_qXfer_libraries_svr4.
10898
d6db1fab
UW
108992011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10900
10901 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10902 PSW address/mask between 8-byte and 16-byte formats.
10903 (s390_supply_ptrace_register): Likewise.
10904 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10905 basic addressing mode bit.
10906
242f5f1c
SS
109072011-11-24 Stan Shebs <stan@codesourcery.com>
10908
10909 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10910
f196051f
SS
109112011-11-17 Stan Shebs <stan@codesourcery.com>
10912
10913 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10914 (tracing_start_time): New global.
10915 (tracing_stop_time): New global.
10916 (tracing_user_name): New global.
10917 (tracing_notes): New global.
10918 (tracing_stop_note): New global.
10919 (cmd_qtstart): Set traceframe_usage, start_time.
10920 (stop_tracing): Set stop_time.
10921 (cmd_qtstatus): Report additional status.
10922 (cmd_qtp): New function.
10923 (handle_tracepoint_query): Call it.
10924 (cmd_qtnotes): New function.
10925 (handle_tracepoint_general_set): Call it.
10926 (get_timestamp): Rename from tsv_get_timestamp.
10927
405f8e94
SS
109282011-11-14 Stan Shebs <stan@codesourcery.com>
10929 Kwok Cheung Yeung <kcy@codesourcery.com>
10930
10931 * linux-x86-low.c (small_jump_insn): New.
10932 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10933 trampoline and error message, build a trampoline and issue a small
10934 jump instruction to it.
10935 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10936 trampoline and error message.
10937 (x86_get_min_fast_tracepoint_insn_len): New.
10938 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10939 * linux-low.h (struct linux_target_ops): Add arguments to
10940 install_fast_tracepoint_jump_pad operation, add new operation.
10941 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10942 arguments.
10943 (linux_get_min_fast_tracepoint_insn_len): New function.
10944 (linux_target_op): Add new operation.
10945 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10946 (gdb_trampoline_buffer_end): Ditto.
10947 (gdb_trampoline_buffer_error): Ditto.
10948 (struct ipa_sym_addresses): Add fields for new IPA variables.
10949 (symbol_list): Add entries for new IPA variables.
10950 (struct tracepoint): Add fields to hold the address range of the
10951 trampoline used by the tracepoint.
10952 (trampoline_buffer_head): New static variable.
10953 (trampoline_buffer_tail): Ditto.
10954 (claim_trampoline_space): New function.
10955 (have_fast_tracepoint_trampoline_buffer): New function.
10956 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10957 structure.
10958 (install_fast_tracepoint): Ditto, also add error buffer argument.
10959 (cmd_qtminftpilen): New function.
10960 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10961 (fast_tracepoint_from_trampoline_address): New function.
10962 (fast_tracepoint_collecting): Handle trampoline as part of jump
10963 pad space.
10964 (set_trampoline_buffer_space): New function.
10965 (initialize_tracepoint): Initialize new IPA variables.
10966 * target.h (struct target_ops): Add arguments to
10967 install_fast_tracepoint_jump_pad operation, add new
10968 get_min_fast_tracepoint_insn_len operation.
10969 (target_get_min_fast_tracepoint_insn_len): New.
10970 (install_fast_tracepoint_jump_pad): Add arguments.
10971 * server.h (IPA_BUFSIZ): Define.
10972 * linux-i386-ipa.c: Include extra header files.
10973 (initialize_fast_tracepoint_trampoline_buffer): New function.
10974 (initialize_low_tracepoint): Call it.
10975 * server.h (set_trampoline_buffer_space): Declare.
10976 (claim_trampoline_space): Ditto.
10977 (have_fast_tracepoint_trampoline_buffer): Ditto.
10978
1e4d1764
YQ
109792011-11-14 Yao Qi <yao@codesourcery.com>
10980
10981 * server.c (handle_query): Handle InstallInTrace for qSupported.
10982 * tracepoint.c (add_tracepoint): Sort list.
10983 (install_tracepoint, download_tracepoint): New.
10984 (cmd_qtdp): Call them to install and download tracepoints.
10985 (sort_tracepoints): Removed.
10986 (cmd_qtstart): Update.
10987
5c73ff4e
YQ
109882011-11-14 Yao Qi <yao@codesourcery.com>
10989
10990 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10991 * mem-break.h: Declare.
10992 * tracepoint.c (cmd_qtstart): Move some code to ...
10993 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10994 New.
10995 (download_tracepoints): Move some code to ...
10996 (download_tracepoint_1): ... here. New.
10997
86a30030
YQ
109982011-11-08 Yao Qi <yao@codesourcery.com>
10999
11000 * remote-utils.c (relocate_instruction): A comment fix.
11001
8d26e50c
JB
110022011-11-07 Joel Brobecker <brobecker@adacore.com>
11003
11004 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11005 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11006 dr_status_mirror and dr_control_mirror from debug_reg_state.
11007 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11008 (i386_initial_stuff): Remove use of deleted globals.
11009 (i386_get_thread_context, i386_set_thread_context,
11010 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11011 from debug_reg_state.
11012
a59306a3
YQ
110132011-11-05 Yao Qi <yao@codesourcery.com>
11014
11015 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11016 address as TPOINT's.
11017
3065dfb6
SS
110182011-11-02 Stan Shebs <stan@codesourcery.com>
11019
11020 * tracepoint.c (agent_mem_read_string): New function.
11021 (eval_agent_expr): Call it for tracenz.
11022 * server.c (handle_query): Report support for tracenz.
11023
fd0d8c7c
YQ
110242011-11-02 Yao Qi <yao@codesourcery.com>
11025
11026 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11027
609086b1
YQ
110282011-11-02 Yao Qi <yao@codesourcery.com>
11029
11030 * target.h: Fix a typo in comment.
11031
b9fd1791
PA
110322011-10-31 Pedro Alves <pedro@codesourcery.com>
11033
11034 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11035 clobber the breakpoints' shadows with fast tracepoint jumps.
11036 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11037 * target.c (write_inferior_memory): Also pass MYADDR down to
11038 check_mem_write.
11039
03583c20
UW
110402011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11041
11042 * configure.ac: Check support for personality routine.
11043 * configure: Regenerate.
11044 * config.in: Likewise.
11045 * linux-low.c: Include <sys/personality.h>.
11046 Define ADDR_NO_RANDOMIZE if necessary.
11047 (linux_create_inferior): Disable address space randomization when
11048 forking inferior, if requested.
11049 (linux_supports_disable_randomization): New function.
11050 (linux_target_ops): Install it.
11051 * server.h (disable_randomization): Declare.
11052 * server.c (disable_randomization): New global variable.
11053 (handle_general_set): Handle QDisableRandomization.
11054 (handle_query): Likewise for qSupported.
11055 (main): Support --disable-randomization and --no-disable-randomization
11056 command line arguments.
11057 * target.h (struct target_ops): Add supports_disable_randomization.
11058 (target_supports_disable_randomization): New macro.
11059
723b724b
MF
110602011-09-29 Mike Frysinger <vapier@gentoo.org>
11061
11062 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11063 ifdef check.
11064 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11065 [!PT_GETDSBT] (target_loadmap): New definition.
11066 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11067 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11068 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11069 and PT_GETDSBT to LINUX_LOADMAP.
11070 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11071 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11072
55329a5c 110732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11074
11075 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11076 (arm_linux_hwbp_cap): New static variable.
11077 (arm_linux_get_hwbp_cap): Replace by ...
11078 (arm_linux_init_hwbp_cap): ... this new function.
11079 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11080 (arm_linux_get_hw_watchpoint_count): Likewise.
11081 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11082 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11083 (arm_prepare_to_resume): Use perror_with_name instead of error.
11084
55329a5c 110852011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11086
11087 * linux-arm-low.c: Include <signal.h>.
11088 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11089 (struct arm_linux_hwbp_cap): New data type.
11090 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11091 (struct arm_linux_hw_breakpoint): New data type.
11092 (MAX_BPTS, MAX_WPTS): Define.
11093 (struct arch_process_info, struct arch_lwp_info): New data types.
11094 (arm_linux_get_hwbp_cap): New function.
11095 (arm_linux_get_hw_breakpoint_count): Likewise.
11096 (arm_linux_get_hw_watchpoint_count): Likewise.
11097 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11098 (arm_hwbp_control_initialize): Likewise.
11099 (arm_hwbp_control_is_enabled): Likewise.
11100 (arm_hwbp_control_is_initialized): Likewise.
11101 (arm_hwbp_control_disable): Likewise.
11102 (arm_linux_hw_breakpoint_equal): Likewise.
11103 (arm_linux_hw_point_initialize): Likewise.
11104 (struct update_registers_data): New data structure.
11105 (update_registers_callback: New function.
11106 (arm_insert_point): Likewise.
11107 (arm_remove_point): Likewise.
11108 (arm_stopped_by_watchpoint): Likewise.
11109 (arm_stopped_data_address): Likewise.
11110 (arm_new_process): Likewise.
11111 (arm_new_thread): Likewise.
11112 (arm_prepare_to_resume): Likewise.
11113 (the_low_target): Register arm_insert_point, arm_remove_point,
11114 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11115 arm_new_thread, and arm_prepare_to_resume.
11116
6b9801d4
SS
111172011-09-15 Stan Shebs <stan@codesourcery.com>
11118
11119 * server.h (struct emit_ops): Add compare-goto fields.
11120 * tracepoint.c (gdb_agent_op_sizes): New table.
11121 (emit_eq_goto): New function.
11122 (emit_ne_goto): New function.
11123 (emit_lt_goto): New function.
11124 (emit_le_goto): New function.
11125 (emit_gt_goto): New function.
11126 (emit_ge_goto): New function.
11127 (is_goto_target): New function.
11128 (compile_bytecodes): Recognize special cases of compare-goto
11129 combinations and call specialized emitters for them.
11130 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11131 (amd64_emit_ne_goto): New function.
11132 (amd64_emit_lt_goto): New function.
11133 (amd64_emit_le_goto): New function.
11134 (amd64_emit_gt_goto): New function.
11135 (amd64_emit_ge_goto): New function.
11136 (amd64_emit_ops): Add the new functions.
11137 (i386_emit_eq_goto): New function.
11138 (i386_emit_ne_goto): New function.
11139 (i386_emit_lt_goto): New function.
11140 (i386_emit_le_goto): New function.
11141 (i386_emit_gt_goto): New function.
11142 (i386_emit_ge_goto): New function.
11143 (i386_emit_ops): Add the new functions.
11144
bf15cbda
SS
111452011-09-08 Stan Shebs <stan@codesourcery.com>
11146
11147 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11148 (i386_emit_epilogue): Restore %ebx.
11149
943ca1dd
JZ
111502011-08-31 Jie Zhang <jzhang918@gmail.com>
11151
11152 * server.c (step_thread): Remove definition.
11153 (process_serial_event): Don't handle Hs.
11154 * server.h (step_thread): Remove declaration.
11155 * target.c (set_desired_inferior): Remove use of step_thread.
11156
e3deef73
LM
111572011-08-24 Luis Machado <lgustavo@codesourcery.com>
11158
11159 * linux-low.c: Include linux-procfs.h.
11160 (linux_attach_lwp_1): Update comments.
11161 (linux_attach): Scan for existing threads when attaching to a
11162 process that is the tgid.
11163 * Makefile.in: Update dependencies.
11164
13da1c97
LM
111652011-08-24 Luis Machado <lgustavo@codesourcery.com>
11166
11167 * configure.srv: Add linux-procfs.o dependencies.
11168
881127c9
YQ
111692011-08-14 Yao Qi <yao@codesourcery.com>
11170
11171 * target.h (struct target_ops): Fix indent.
11172 * win32-low.c (win32_target_ops): Fix comment.
11173
58dbd541
YQ
111742011-08-14 Andrew Jenner <andrew@codesourcery.com>
11175 Yao Qi <yao@codesourcery.com>
11176
11177 * Makefile.in (clean): Remove tic6x-*.c files.
11178 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11179 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11180 (tic6x-c64xp-linux.c): Likewise.
11181 * configure.srv: Add support for tic6x-*-uclinux.
11182 * linux-tic6x-low.c: New.
11183 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11184
78d85199
YQ
111852011-08-14 Andrew Stubbs <ams@codesourcery.com>
11186 Yao Qi <yao@codesourcery.com>
11187
11188 * target.h (struct target_ops): Add read_loadmap.
11189 * linux-low.c (struct target_loadseg): New type.
11190 (struct target_loadmap): New type.
11191 (linux_read_loadmap): New function.
11192 (linux_target_ops): Add linux_read_loadmap.
11193 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11194 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11195 to NULL.
78d85199 11196
a959a88d
EZ
111972011-08-05 Eli Zaretskii <eliz@gnu.org>
11198
11199 * win32-low.c: Include <stdint.h>.
11200
1ced966e
PA
112012011-07-22 Pedro Alves <pedro@codesourcery.com>
11202
11203 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11204 to the inferior here.
11205 (i386_remove_aligned_watchpoint): Ditto.
11206 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11207 fit part of the watchpoint in the debug registers.
11208 (i386_update_inferior_debug_regs): New.
11209 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11210 registers, and only update the inferior on success.
11211 (i386_low_remove_watchpoint): Ditto.
11212
d26e3629
KY
112132011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11214
11215 * linux-low.c (compare_ints, unique, list_threads, show_process,
11216 linux_core_of_thread): Delete.
11217 (linux_target_ops): Change linux_core_of_thread to
11218 linux_common_core_of_thread.
11219 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11220 * utils.c (malloc_failure): Change type of argument.
11221 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11222 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11223 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11224 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11225 (IPA_OBJS): Add common-utils-ipa.o.
11226 (ptid_h, linux_osdata_h): New macros.
11227 (server_h): Add common/common-utils.h, common/xml-utils.h,
11228 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11229 common/ptid.h.
11230 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11231 ptid.o, buffer.o): New rules.
11232 (linux-low.o): Add common/linux-osdata.h as a dependency.
11233 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11234 * configure.ac: Add AC_HEADER_DIRENT check.
11235 * config.in: Regenerate.
11236 * configure: Regenerate.
11237 * remote-utils.c (xml_escape_text): Delete.
11238 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11239 buffer_xml_printf): Move to common/buffer.c.
11240 * server.c (main): Remove call to initialize_inferiors.
11241 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11242 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11243 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11244 internal_error, gdb_assert, gdb_assert_fail): Delete.
11245 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11246 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11247 common/buffer.h.
11248 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11249 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11250 initialize_inferiors): Delete.
11251
2275a1a7
PA
112522011-07-20 Pedro Alves <pedro@codesourcery.com>
11253
11254 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11255 symbol error.
11256
0a5b1e09
PA
112572011-05-31 Pedro Alves <pedro@codesourcery.com>
11258
11259 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11260 assertion.
11261 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11262
6938fd34
YQ
112632011-05-26 Yao Qi <yao@codesourcery.com>
11264
11265 * Makefile.in (thread-db.o): Track dependence to
11266 common/gdb_thread_db.h.
11267 * thread-db.c: include gdb_thread_db.h from right place.
11268
b481f9e0
TT
112692011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11270
11271 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11272 __FILE__ and __LINE__ to internal_error.
11273
98a5dd13
DE
112742011-05-13 Doug Evans <dje@google.com>
11275
11276 * thread-db.c (try_thread_db_load_from_sdir): New function.
11277 (try_thread_db_load_from_dir): New function.
11278 (thread_db_load_search): Handle $sdir, ignore $pdir.
11279 Remove trying of system directories if search of
11280 libthread-db-search-path fails, that is now done via $sdir.
11281
d248b706
KY
112822011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11283
11284 * server.c (handle_query): Add EnableDisableTracepoints to the list
11285 of supported features.
43aaf8b6 11286 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11287 tracepoints.
43aaf8b6
PA
11288 (cmd_qtenable_disable): New.
11289 (cmd_qtstart): Install tracepoints even if disabled.
11290 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11291 receiving a QTEnable or QTDisable packet.
11292 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11293 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11294 tracepoints.
11295 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11296
84e578fb
DE
112972011-05-10 Doug Evans <dje@google.com>
11298
11299 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11300
71f55dd8
DE
113012011-05-04 Doug Evans <dje@google.com>
11302
11303 * linux-low.c (linux_join): Skip process lookup.
11304 * spu-low.c (spu_join): Ditto.
11305 * server.c (join_inferiors_callback): Delete.
11306 (process_serial_event): For 'D' packet (detach) call join_inferior
11307 directly.
11308
4d393d60
JM
113092011-05-04 Joseph Myers <joseph@codesourcery.com>
11310
11311 * README: Don't mention xscale*-*-linux*.
11312 * configure.srv (xscale*-*-linux*): Don't handle target.
11313
b00ad6ff
NF
113142011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11315
11316 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11317 casting pointers.
11318 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11319 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11320 (i386_emit_void_call_2): Likewise.
11321
af96c192
YQ
113222011-04-26 Yao Qi <yao@codesourcery.com>
11323
43aaf8b6
PA
11324 * linux-low.c: Move common macros to linux-ptrace.h.
11325 Include linux-ptrace.h.
af96c192
YQ
11326 * Makefile.in (linux_ptrace_h): New.
11327 (linux-low.o): Depends on linux-ptrace.h.
11328
03f2bd59
JK
113292011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11330
11331 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11332 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11333 (remote_prepare): New function with most of the TCP code from ...
11334 (remote_open): ... here. Detect PORT here unconditionally. Move also
11335 setting transport_is_reliable.
11336 * server.c (run_once): New variable.
11337 (gdbserver_usage): Document it.
11338 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11339 the first run if RUN_ONCE.
11340 * server.h (run_once, remote_prepare): New declarations.
11341
7a9dd1b2
TT
113422011-04-19 Tom Tromey <tromey@redhat.com>
11343
11344 * win32-low.c (handle_load_dll): Remove duplicate "the".
11345
81239425
PM
113462011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11347
11348 Remove support for old Cygwin 1.5 versions.
11349 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11350 function to avoid warning.
11351 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11352 warning.
11353
9e0627f1
PM
113542011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11355
11356 * gdbserver/server.h (Macro _): Define it if not available.
11357
588eebee
MS
113582011-03-14 Michael Snyder <msnyder@vmware.com>
11359
348af9f7 11360 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11361
43f70d4c
JB
113622011-03-10 Joel Brobecker <brobecker@adacore.com>
11363
11364 * Makefile.in (maintainer-clean realclean distclean): Remove
11365 "make ... subdir_do" command.
11366
348af9f7
MS
113672011-03-10 Michael Snyder <msnyder@vmware.com>
11368
11369 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11370
11371 * server.c (handle_v_run): Free alloced buffer on early return.
11372
e637a4f5
YQ
113732011-03-09 Yao Qi <yao@codesourcery.com>
11374
11375 Revert:
11376 2011-03-04 Yao Qi <yao@codesourcery.com>
11377
11378 * Makefile.in: Remove GNU make feature --directory.
11379
11380 2011-03-05 Yao Qi <yao@codesourcery.com>
11381
11382 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11383 (subdir_do): New make target. Copied from gdb/Makefile.
11384 (maintainer-clean, realclean, distclean, clean): Call corresponding
11385 make targets in common/Makefile.
11386
11387 2011-02-11 Yao Qi <yao@codesourcery.com>
11388
11389 * configure.ac: Call AC_PROG_RANLIB.
11390 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11391 * configure: Regenerate.
11392
e6edda56
JK
113932011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11394
11395 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11396
e5141119
JB
113972011-03-06 Yao Qi <yao@codesourcery.com>
11398
11399 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11400
64794aa4
JB
114012011-03-05 Yao Qi <yao@codesourcery.com>
11402
11403 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11404 (subdir_do): New make target. Copied from gdb/Makefile.
11405 (maintainer-clean, realclean, distclean, clean): Call corresponding
11406 make targets in common/Makefile.
11407
7a762829
YQ
114082011-03-04 Yao Qi <yao@codesourcery.com>
11409
11410 * Makefile.in: Remove GNU make feature --directory.
11411
348af9f7
MS
114122011-03-04 Michael Snyder <msnyder@vmware.com>
11413
11414 * server.c (queue_stop_reply): Call xmalloc not malloc.
11415
114162011-03-02 Michael Snyder <msnyder@vmware.com>
11417
11418 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11419
9f72fee2
MS
114202011-02-28 Michael Snyder <msnyder@vmware.com>
11421
588eebee
MS
11422 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11423 (cmd_qtframe): Ditto.
11424 (cmd_qtbuffer): Ditto.
11425 (cmd_bigqtbuffer): Ditto.
11426
9f72fee2
MS
11427 * utils.c (decimal2str): Initialize 'width' to nine, then
11428 don't mess with it.
11429
8040bd49
UW
114302011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11431
11432 * hostio.c (require_data): Free *data, not data.
11433
7e52cbd0
JK
114342011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11435
11436 * hostio.c (require_data): Use free, not xfree.
11437
9130f83e
MS
114382011-02-27 Michael Snyder <msnyder@vmware.com>
11439
4b812f4e
MS
11440 * server.c (handle_query): Discard unused value.
11441
9130f83e
MS
11442 * hostio.c (require_data): Free malloc memory before returning
11443 error.
11444
69d37113
MS
114452011-02-26 Michael Snyder <msnyder@vmware.com>
11446
11447 * linux-low.c (list_threads): Call closedir for dirent.
11448
35f5825a
MS
114492011-02-27 Michael Snyder <msnyder@vmware.com>
11450
2a589cef
MS
11451 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11452 a case statement falls through.
11453
0adea5f7
MS
11454 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11455
35f5825a
MS
11456 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11457 in comparison.
11458
238f1c74
MS
114592011-02-26 Michael Snyder <msnyder@vmware.com>
11460
11461 * utils.c (decimal2str): Eliminate dead code and dead param.
11462 (pulongest): Drop dead param from call to decimal2str.
11463 (plongest): Ditto.
11464
633ff500
JB
114652011-02-24 Joel Brobecker <brobecker@adacore.com>
11466
11467 Revert the following patch (not approved yet):
11468 2011-02-21 Hui Zhu <teawater@gmail.com>
11469 * tracepoint.c (tp_printf): New function.
11470 (eval_agent_expr): Handle gdb_agent_op_printf.
11471
f9c6ff72
HZ
114722011-02-21 Hui Zhu <teawater@gmail.com>
11473
11474 * tracepoint.c (tp_printf): New function.
11475 (eval_agent_expr): Handle gdb_agent_op_printf.
11476
94d5e490
TT
114772011-02-18 Tom Tromey <tromey@redhat.com>
11478
11479 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11480 (tracepoint.o): Likewise.
11481 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11482 (gdb_agent_op_names): Likewise.
11483
c7f96d2b
TT
114842011-02-18 Tom Tromey <tromey@redhat.com>
11485
11486 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11487 gdb_agent_op_rot>: New constants.
11488 (gdb_agent_op_names): Add pick and roll.
11489 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11490 cases.
11491
0feedb2c
JK
114922011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11493
11494 * aclocal.m4: Regenerated with aclocal-1.11.1.
11495
b3b9301e
PA
114962011-02-14 Pedro Alves <pedro@codesourcery.com>
11497
11498 * server.c (handle_qxfer_traceframe_info): New.
11499 (qxfer_packets): Register "traceframe-info".
11500 (handle_query): Report support for qXfer:traceframe-info:read+.
11501 * tracepoint.c (match_blocktype): New.
11502 (traceframe_find_block_type): Rename to ...
11503 (traceframe_walk_blocks): ... this. Add callback filter argument,
11504 and use it.
11505 (traceframe_find_block_type): New, reimplemented on top of
11506 traceframe_walk_blocks.
11507 (build_traceframe_info_xml): New.
11508 (traceframe_read_info): New.
11509 * server.h (traceframe_read_info): Declare.
11510
4f3e6fb7
YQ
115112011-02-11 Yao Qi <yao@codesourcery.com>
11512
11513 * configure.ac: Call AC_PROG_RANLIB.
11514 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11515 * configure: Regenerate.
11516
764880b7
PA
115172011-02-07 Pedro Alves <pedro@codesourcery.com>
11518
11519 * server.c (gdb_read_memory): Change return semantics to allow
11520 partial transfers.
11521 (handle_search_memory_1): Adjust.
11522 (process_serial_event) <'m' packet>: Handle partial transfers.
11523 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11524
1c79eb8a
PA
115252011-01-28 Pedro Alves <pedro@codesourcery.com>
11526
11527 * regcache.c (init_register_cache): Initialize
11528 regcache->register_status.
11529 (free_register_cache): Release regcache->register_status.
11530 (regcache_cpy): Copy register_status.
11531 (registers_to_string): Print 'x's for unavailable registers.
11532 (supply_register): Mark the register's status valid or
11533 unavailable, depending on whether a buffer was passed in or not.
11534 (supply_register_zeroed): New.
11535 (supply_regblock): Mark the registers' status valid or
11536 unavailable, depending on whether a buffer was passed in or not.
11537 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11538 (struct regcache): New `register_status' field.
11539 (supply_register_zeroed): Declare.
11540 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11541 supply_register_zeroed, rather than passing a NULL buffer to
11542 supply_register.
11543 * tracepoint.c (fetch_traceframe_registers): Update comment.
11544
85724a0e
PA
115452011-01-28 Pedro Alves <pedro@codesourcery.com>
11546
11547 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11548 buffer explicit.
11549
d08aafef
PA
115502011-01-25 Pedro Alves <pedro@codesourcery.com>
11551
11552 * server.h (decode_xfer_write): Change prototype.
11553 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11554 and don't extract the annex here.
11555 * server.c (decode_xfer_read): Remove `annex' parameter,
11556 and don't extract the annex here.
11557 (decode_xfer): New.
11558 (struct qxfer): New.
11559 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11560 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11561 (handle_qxfer_statictrace): New functions, abstracted out from
11562 handle_query, and made to use the struct qxfer interface.
11563 (handle_threads_qxfer_proper): Rename to ...
11564 (handle_qxfer_threads_proper): ... this.
11565 (handle_threads_qxfer): Rename to ...
11566 (handle_qxfer_threads): ... this. Adjust.
11567 (qxfer_packets): New array.
11568 (handle_qxfer): New function.
11569 (handle_query): Use handle_qxfer.
11570
493e2a69
MS
115712011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11572
11573 * gdbreplay.c: Shorten lines of >= 80 columns.
11574 * linux-low.c: Ditto.
11575 * linux-ppc-low.c: Ditto.
11576 * linux-s390-low.c: Ditto.
11577 * linux-sparc-low.c: Ditto.
11578 * linux-x86-low.c: Ditto.
11579 * linux-xtensa-low.c: Ditto.
11580 * mem-break.c: Ditto.
11581 * nto-low.c: Ditto.
11582 * regcache.h: Ditto.
11583 * remote-utils.c: Ditto.
11584 * server.c: Ditto.
11585 * server.h: Ditto.
11586 * thread-db.c: Ditto.
11587 * tracepoint.c: Ditto.
11588 * utils.c: Ditto.
11589 * win32-low.h: Ditto.
11590
44944448
JB
115912011-01-05 Joel Brobecker <brobecker@adacore.com>
11592
11593 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11594 update.
11595
71ce852c
JB
115962011-01-01 Joel Brobecker <brobecker@adacore.com>
11597
11598 * server.c (gdbserver_version): Update copyright year in version
11599 output.
11600 * gdbreplay.c (gdbreplay_version): Ditto.
11601
eb826dc6
MF
116022010-12-29 Jie Zhang <jie.zhang@analog.com>
11603
11604 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11605 * linux-bfin-low.c: New file.
11606 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11607 PT_DATA_ADDR for BFIN targets.
11608 * Makefile.in (SFILES): Add linux-bfin-low.c.
11609 (clean): Remove reg-bfin.c.
11610 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11611 * README: Mention supported Blackfin targets.
11612
39ab222a
MF
116132010-12-23 Mike Frysinger <vapier@gentoo.org>
11614
11615 * .gitignore: New file.
11616
a1f2ce7d
MF
116172010-11-16 Mike Frysinger <vapier@gentoo.org>
11618
11619 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11620
f474844c
JZ
116212010-10-22 Jie Zhang <jie@codesourcery.com>
11622
11623 * Makefile.in: Add FLAGS_TO_PASS variable.
11624 (install): Remove dependency of install-only and recursively
11625 invoke make for install-only.
11626
f1048712
DE
116272010-10-04 Doug Evans <dje@google.com>
11628
11629 * Makefile.in (uninstall): Use $(DESTDIR).
11630
b53a1623
PA
116312010-09-24 Pedro Alves <pedro@codesourcery.com>
11632
e6ee044d
PA
11633 PR gdb/11842
11634
b53a1623
PA
11635 * linux-x86-low.c (compat_siginfo_from_siginfo)
11636 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11637 si_code is < 0. Check for si_code == SI_TIMER before checking for
11638 si_code < 0.
11639
fa1bd1e4
JB
116402010-09-13 Joel Brobecker <brobecker@adacore.com>
11641
11642 * lynx-i386-low.c: New file.
11643 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11644
47fac8f8
JB
116452010-09-13 Joel Brobecker <brobecker@adacore.com>
11646
11647 * lynx-low.c (ptrace_request_to_str): Remove handling for
11648 request values that have been removed in LynxOS 5.x.
11649
1adfc54d
JB
116502010-09-13 Joel Brobecker <brobecker@adacore.com>
11651
11652 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11653 <ptrace.h>
11654
c2a66c29
NS
116552010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11656
11657 * configure.ac: Add --enable-inprocess-agent option.
11658 * configure: Rebuilt.
11659
32fcada3
YQ
116602010-09-06 Yao Qi <yao@codesourcery.com>
11661
11662 * linux-low.c (linux_kill): Remove unused variable.
11663 (linux_stabilize_threads): Likewise.
11664 * server.c (start_inferior): Likewise.
11665 (queue_stop_reply_callback): Likewise.
11666 * tracepoint.c (do_action_at_tracepoint): Likewise.
11667
0cccb683
YQ
116682010-09-06 Yao Qi <yao@codesourcery.com>
11669
11670 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11671 on return.
11672
423ec54c
JK
116732010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11674
11675 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11676
12ac6819
PA
116772010-09-06 Pedro Alves <pedro@codesourcery.com>
11678
11679 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11680 "$(IPA_DEPFILES)".
11681
8ed54b31
JB
116822010-09-01 Joel Brobecker <brobecker@adacore.com>
11683
11684 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11685 gdbserver/lynx-ppc-low.c: New files.
11686 * Makefile.in (lynx_low_h): New variable.
11687 (lynx-low.o, lynx-ppc-low.o): New rules.
11688 * configure.ac: On LynxOS, link with -lnetinet.
11689 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11690 * configure: regenerate.
11691
bb0116a4
JB
116922010-09-01 Joel Brobecker <brobecker@adacore.com>
11693
11694 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11695 * configure.ac: Add check for vasprintf and vsnprintf.
11696 * configure, config.in: Regenerate.
11697 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11698
a778ab81 116992010-09-01 Joel Brobecker <brobecker@adacore.com>
11700
11701 * gdbreplay.c: Move include of alloca.h up, next to include of
11702 malloc.h.
11703 * server.h: Add include of malloc.h.
11704 * mem-break.c: Remove include of malloc.h.
11705 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11706
8b034a19 117072010-09-01 Joel Brobecker <brobecker@adacore.com>
11708
11709 * Makefile.in (memmem.o): Build with -Wno-error.
11710
117112010-09-01 Joel Brobecker <brobecker@adacore.com>
11712
11713 * utils.c (xsnprintf): Make non-static.
11714 * server.h: Add xsnprintf declaration.
11715 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11716 replace calls to snprintf by calls to xsnprintf throughout.
11717
117182010-09-01 Joel Brobecker <brobecker@adacore.com>
11719
11720 * configure.ac: Add configure check for alloca.
11721 * configure, config.in: Regenerate.
11722 * server.h: Include alloca.h if it exists.
11723 * gdbreplay.c: Include alloca.h if it exists.
11724
1a981360
PA
117252010-08-28 Pedro Alves <pedro@codesourcery.com>
11726
11727 * linux-low.c (__SIGRTMIN): Define if not already defined.
11728 (linux_create_inferior): Check for __ANDROID__ rather than
11729 __SIGRTMIN.
11730 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11731 are already deferred.
11732 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11733 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11734 stopped and already has a pending signal to report.
11735 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11736 a pending signal to report or is moving out of a jump pad.
11737 (linux_init_signals): Check for __ANDROID__ rather than
11738 __SIGRTMIN.
11739
b4d51a55
PA
117402010-08-28 Pedro Alves <pedro@codesourcery.com>
11741
11742 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11743 debug_threads check. Avoid a linear search when not doing debug
11744 output.
11745
ec48365d
PA
117462010-08-27 Pedro Alves <pedro@codesourcery.com>
11747
11748 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11749 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11750 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11751 (process_event): Change local fd's type to gdb_fildes_t.
11752 (create_file_handler): Adjust prototype.
11753 (delete_file_handler): Adjust prototype.
11754 (handle_file_event): Adjust prototype. Use pfildes.
11755 (create_file_event): Adjsut prototype.
11756 * remote-utils.c (remote_desc, listen_desc): Change type to
11757 gdb_fildes_t.
11758 * server.h: New gdb_fildes_t typedef.
11759 [USE_WIN32API]: Include winsock2.h.
11760 (delete_file_handler, add_file_handler): Adjust prototypes.
11761 (pfildes): Declare.
11762 * utils.c (pfildes): New.
11763
854d88f0
PA
117642010-08-27 Pedro Alves <pedro@codesourcery.com>
11765
11766 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11767 * configure: Regenerate.
11768
0146f85b
PA
117692010-08-27 Pedro Alves <pedro@codesourcery.com>
11770
11771 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11772 (linux_done_accessing_memory): ... this.
11773 (linux_target_ops): Adjust.
11774 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11775 * nto-low.c (nto_target_ops): Adjust comment.
11776 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11777 * spu-low.c (spu_target_ops): Adjust comment.
11778 * target.h (target_ops): Rename unprepare_to_access_memory field
11779 to done_accessing_memory.
11780 (unprepare_to_access_memory): Rename to ...
11781 (done_accessing_memory): ... this.
11782
90d74c30
PA
117832010-08-26 Pedro Alves <pedro@codesourcery.com>
11784
11785 * linux-low.c (linux_prepare_to_access_memory): New.
11786 (linux_unprepare_to_access_memory): New.
11787 (linux_target_ops): Install them.
11788 * server.c (read_memory): Rename to ...
11789 (gdb_read_memory): ... this. Use
11790 prepare_to_access_memory/prepare_to_access_memory.
11791 (write_memory): Rename to ...
11792 (gdb_write_memory): ... this. Use
11793 prepare_to_access_memory/prepare_to_access_memory.
11794 (handle_search_memory_1): Adjust.
11795 (process_serial_event): Adjust.
11796 * target.h (struct target_ops): New fields
11797 prepare_to_access_memory and unprepare_to_access_memory.
11798 (prepare_to_access_memory, unprepare_to_access_memory): New.
11799 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11800 prepare_to_access_memory/prepare_to_access_memory.
11801 * nto-low.c (nto_target_ops): Adjust.
11802 * spu-low.c (spu_target_ops): Adjust.
11803 * win32-low.c (win32_target_ops): Adjust.
11804
fd467969
PA
118052010-08-26 Pedro Alves <pedro@codesourcery.com>
11806
11807 * Makefile.in (WARN_CFLAGS): Get it from configure.
11808 (WERROR_CFLAGS): New.
11809 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11810 * configure.ac: Introduce --enable-werror, which adds -Werror to
11811 the compiler command line. Enabled by default. Disable with
11812 --disable-werror. Add -Wdeclaration-after-statement
11813 Wpointer-arith and -Wformat-nonliteral to warning flags.
11814 * configure: Regenerate.
11815
331e2f5f
PA
118162010-08-26 Pedro Alves <pedro@codesourcery.com>
11817
11818 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11819
e581f2b4
PA
118202010-08-26 Pedro Alves <pedro@codesourcery.com>
11821
11822 * gdbreplay.c (remote_error): New.
11823 (gdbchar): New.
11824 (expect): Use gdbchar. Check for error reading from GDB.
11825 Clarify sync error output.
11826 (play): Check for errors writing to GDB.
11827 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11828 * remote-utils.c (getpkt): Check for errors writing to the remote
11829 descriptor.
11830
3c11dd79
PA
118312010-08-25 Pedro Alves <pedro@codesourcery.com>
11832
11833 * linux-low.c (linux_wait_1): Move non-debugging code out of
11834 `debug_threads' control.
11835
d20a8ad9
PA
118362010-08-25 Pedro Alves <pedro@codesourcery.com>
11837
11838 * linux-low.c (linux_wait_1): Don't set last_status here.
11839 * server.c (push_event, queue_stop_reply_callback): Assert we're
11840 not pushing a TARGET_WAITKIND_IGNORE event.
11841 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11842 (myresume, handle_target_event): Set the thread's last_resume_kind
11843 and last_status from the target returned status.
11844
964e4306
PA
118452010-08-25 Pedro Alves <pedro@codesourcery.com>
11846
11847 PR threads/10729
11848
11849 * linux-x86-low.c (update_debug_registers_callback): New.
11850 (i386_dr_low_set_addr): Use it.
11851 (i386_dr_low_get_addr): New.
11852 (i386_dr_low_set_control): Use update_debug_registers_callback.
11853 (i386_dr_low_get_control): New.
11854 (i386_dr_low_get_status): Adjust.
11855 * linux-low.c (linux_stop_lwp): New.
11856 * linux-low.h (linux_stop_lwp): Declare.
11857
11858 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11859 argument instead of a i386_debug_reg_state.
11860 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11861 a i386_debug_reg_state.
11862 (i386_insert_aligned_watchpoint): Adjust.
11863 (i386_remove_aligned_watchpoint): Adjust.
11864 (i386_low_stopped_data_address): Read the debug registers from the
11865 inferior instead of from the mirrors.
11866 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11867 (i386_dr_low_get_addr): Declare.
11868 (i386_dr_low_get_control): Declare.
11869 (i386_dr_low_get_status): Change prototype.
11870
11871 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11872 (i386_dr_low_get_addr): New.
11873 (i386_dr_low_get_control): New.
11874 (i386_dr_low_get_status): Adjust prototype. Return
11875 dr_status_mirror.
11876 (i386_initial_stuff): Clear dr_status_mirror and
11877 dr_control_mirror.
11878 (i386_get_thread_context): Adjust.
11879 (i386_set_thread_context): Adjust.
11880 (i386_thread_added): Adjust.
11881
5f21a75b
PA
118822010-08-24 Pedro Alves <pedro@codesourcery.com>
11883
11884 * linux-low.h (linux_thread_area): Delete declaration.
11885
3e4c1235
TS
118862010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11887
11888 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11889 after its termination.
11890
1971b033
PA
118912010-08-09 Pedro Alves <pedro@codesourcery.com>
11892
11893 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11894 (gdb_wants_all_stopped): Delete.
11895 (linux_wait_1): Don't call them.
11896 * server.c (handle_v_cont): Tag all threads as want-stopped.
11897 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11898 stopped as "client-wants-stopped".
11899
310444ac
PA
119002010-07-31 Pedro Alves <pedro@codesourcery.com>
11901
11902 * Makefile.in (signals_h): New.
11903 (server_h): Depend on it.
11904 (server.o): Don't depend on $(signals_def).
11905 (signals.o): Depend on $(signals_def).
11906
a19cae16
JK
119072010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11908
11909 * Makefile.in (signals_def): New.
11910 (server_h): Append include/gdb/signals.h and signals_def.
11911 (server.o): Append signals_def.
11912
30d50328
JK
119132010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11914
11915 * server.c (handle_target_event): Use target_signal_to_host for
11916 resume_info.sig initialization.
11917 * target.h (struct thread_resume) <sig>: New comment.
11918
5c3216e2
OS
119192010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11920
c6f46ca0
OS
11921 * server.c (handle_query): strcpy() the returned string from paddress()
11922 instead of sprintf().
5c3216e2
OS
11923 * utils.c (paddress): Return phex_nz().
11924
6bd31874
JB
119252010-07-07 Joel Brobecker <brobecker@adacore.com>
11926
11927 * server.c (handle_v_cont): Call mourn_inferior if process
11928 just exited.
11929 (myresume): Likewise.
11930
0fb4aa4b
PA
119312010-07-01 Pedro Alves <pedro@codesourcery.com>
11932
11933 Static tracepoints, and integration with UST.
11934
11935 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11936 * mem-break.c (uninsert_all_breakpoints)
11937 (reinsert_all_breakpoints): New.
11938 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11939 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11940 (gdb_agent_ust_loaded, helper_thread_id)
11941 (gdb_agent_helper_thread_id): New macros.
11942 (struct ipa_sym_addresses): Add addr_ust_loaded,
11943 addr_helper_thread_id, addr_cmd_buf.
11944 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11945 (in_process_agent_loaded_ust): New.
11946 (write_e_ust_not_loaded): New.
11947 (maybe_write_ipa_ust_not_loaded): New.
11948 (struct collect_static_trace_data_action): New.
11949 (enum tracepoint_type) <static_tracepoint>: New.
11950 (struct tracepoint) <handle>: Mention static tracepoints.
11951 (struct static_tracepoint_ctx): New.
11952 (CMD_BUF_SIZE): New.
11953 (add_tracepoint_action): Handle static tracepoint actions.
11954 (unprobe_marker_at): New.
11955 (clear_installed_tracepoints): Handle static tracepoints.
11956 (cmd_qtdp): Handle static tracepoints.
11957 (probe_marker_at): New.
11958 (cmd_qtstart): Handle static tracepoints.
11959 (response_tracepoint): Handle static tracepoints.
11960 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11961 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11962 (get_context_regcache): Handle static tracepoints.
11963 (do_action_at_tracepoint): Handle static tracepoint actions.
11964 (traceframe_find_block_type): Handle static trace data blocks.
11965 (traceframe_read_sdata): New.
11966 (download_tracepoints): Download static tracepoint actions.
11967 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11968 (GDB_PROBE_NAME): New.
11969 (ust_ops): New.
11970 (GET_UST_SYM): New.
11971 (USTF): New.
11972 (dlsym_ust): New.
11973 (ust_marker_to_static_tracepoint): New.
11974 (gdb_probe): New.
11975 (collect_ust_data_at_tracepoint): New.
11976 (gdb_ust_probe): New.
11977 (UNIX_PATH_MAX, SOCK_DIR): New.
11978 (gdb_ust_connect_sync_socket): New.
11979 (resume_thread, stop_thread): New.
11980 (run_inferior_command): New.
11981 (init_named_socket): New.
11982 (gdb_ust_socket_init): New.
11983 (cstr_to_hexstr): New.
11984 (next_st): New.
11985 (first_marker, next_marker): New.
11986 (response_ust_marker): New.
11987 (cmd_qtfstm, cmd_qtsstm): New.
11988 (unprobe_marker_at, probe_marker_at): New.
11989 (cmd_qtstmat, gdb_ust_thread): New.
11990 (gdb_ust_init): New.
11991 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11992 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11993 (ST_REGENTRY): New.
11994 (x86_64_st_collect_regmap): New.
11995 (X86_64_NUM_ST_COLLECT_GREGS): New.
11996 (AMD64_RIP_REGNUM): New.
11997 (supply_static_tracepoint_registers): New.
11998 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11999 (ST_REGENTRY): New.
12000 (i386_st_collect_regmap): New.
12001 (i386_NUM_ST_COLLECT_GREGS): New.
12002 (supply_static_tracepoint_registers): New.
12003 * server.c (handle_query): Handle qXfer:statictrace:read.
12004 <qSupported>: Report support for StaticTracepoints, and
12005 qXfer:statictrace:read features.
12006 * server.h (traceframe_read_sdata)
12007 (supply_static_tracepoint_registers): Declare.
12008 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12009 (unpack_varlen_hex): Include in IPA build.
12010 * Makefile.in (ustlibs, ustinc): New.
12011 (IPA_OBJS): Add remote-utils-ipa.o.
12012 ($(IPA_LIB)): Link -ldl and -lpthread.
12013 (UST_CFLAGS): New.
12014 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12015 * config.in, configure: Regenerate.
12016
9e4344e5
PA
120172010-06-20 Ian Lance Taylor <iant@google.com>
12018 Pedro Alves <pedro@codesourcery.com>
12019
12020 * linux-x86-low.c (always_true): Delete.
12021 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12022 trying to fool the compiler with always_true.
12023
c6beb2cb
PA
120242010-06-20 Pedro Alves <pedro@codesourcery.com>
12025
12026 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12027 conditions in gdbserver.
12028
d2ed6730
UW
120292010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12030
12031 * spu-low.c (spu_read_memory): Wrap around local store limit.
12032 (spu_write_memory): Likewise.
12033
4e29fb54
PA
120342010-06-15 Pedro Alves <pedro@codesourcery.com>
12035
12036 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12037 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12038 LONGEST uses.
12039 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12040 uses.
12041 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12042 uses with LONGEST uses.
12043
6a271cae
PA
120442010-06-14 Stan Shebs <stan@codesourcery.com>
12045 Pedro Alves <pedro@codesourcery.com>
12046
12047 Bytecode compiler.
12048
12049 * linux-x86-low.c: Include limits.h.
12050 (add_insns): New.
12051 (always_true): New.
12052 (EMIT_ASM): New.
12053 (EMIT_ASM32): New.
12054 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12055 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12056 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12057 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12058 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12059 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12060 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12061 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12062 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12063 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12064 (amd64_emit_void_call_2): New.
12065 (amd64_emit_ops): New.
12066 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12067 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12068 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12069 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12070 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12071 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12072 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12073 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12074 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12075 (i386_emit_stack_adjust, i386_emit_int_call_1)
12076 (i386_emit_void_call_2): New.
12077 (i386_emit_ops): New.
12078 (x86_emit_ops): New.
12079 (the_low_target): Install x86_emit_ops.
12080 * server.h (struct emit_ops): New.
12081 (get_raw_reg_func_addr): Declare.
12082 (current_insn_ptr, emit_error): Declare.
12083 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12084 (set_trace_state_variable_value): New defines.
12085 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12086 addr_get_trace_state_variable_value and
12087 addr_set_trace_state_variable_value.
12088 (symbol_list): New fields for get_raw_reg,
12089 get_trace_state_variable_value and set_trace_state_variable_value.
12090 (condfn): New typedef.
12091 (struct tracepoint): New field `compiled_cond'.
12092 (do_action_at_tracepoint): Clear compiled_cond.
12093 (get_trace_state_variable_value, set_trace_state_variable_value):
12094 Export in the IPA.
12095 (condition_true_at_tracepoint): If there's a compiled condition,
12096 run that.
12097 (current_insn_ptr, emit_error): New globals.
12098 (struct bytecode_address): New.
12099 (get_raw_reg_func_addr): New.
12100 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12101 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12102 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12103 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12104 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12105 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12106 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12107 (compile_tracepoint_condition, compile_bytecodes): New.
12108 * target.h (emit_ops): Forward declare.
12109 (struct target_ops): New field emit_ops.
12110 (target_emit_ops): New.
12111 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12112 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12113 * linux-low.c (linux_emit_ops): New.
12114 (linux_target_ops): Install it.
12115 * linux-low.h (struct linux_target_ops): New field emit_ops.
12116
92b72907
UW
121172010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12118
12119 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12120 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12121
fa593d66
PA
121222010-06-01 Pedro Alves <pedro@codesourcery.com>
12123 Stan Shebs <stan@codesourcery.com>
12124
12125 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12126 (all): Depend on $(extra_libraries).
12127 (install-only): Install the IPA.
12128 (IPA_OBJS, IPA_LIB): New.
12129 (clean): Remove the IPA lib.
12130 (IPAGENT_CFLAGS): New.
12131 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12132 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12133 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12134 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12135 * configure.ac: Check for atomic builtins support in the compiler.
12136 (IPA_DEPFILES, extra_libraries): Define.
12137 * configure.srv (ipa_obj): Add description.
12138 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12139 (i[34567]86-*-linux*): Set ipa_obj.
12140 (x86_64-*-linux*): Set ipa_obj.
12141 * linux-low.c (stabilizing_threads): New.
12142 (supports_fast_tracepoints): New.
12143 (linux_detach): Stabilize threads before detaching.
12144 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12145 the lwp is either not stabilizing, or is moving out of a jump pad.
12146 (linux_fast_tracepoint_collecting): New.
12147 (maybe_move_out_of_jump_pad): New.
12148 (enqueue_one_deferred_signal): New.
12149 (dequeue_one_deferred_signal): New.
12150 (linux_wait_for_event_1): If moving out of a jump pad, defer
12151 pending signals to later.
12152 (linux_stabilize_threads): New.
12153 (linux_wait_1): Check if threads need moving out of jump pads, and
12154 do it if so.
12155 (stuck_in_jump_pad_callback): New.
12156 (move_out_of_jump_pad_callback): New.
12157 (lwp_running): New.
12158 (linux_resume_one_lwp): Handle moving out of jump pads.
12159 (linux_set_resume_request): Dequeue deferred signals.
12160 (need_step_over_p): Also step over fast tracepoint jumps.
12161 (start_step_over): Also uninsert fast tracepoint jumps.
12162 (finish_step_over): Also reinsert fast tracepoint jumps.
12163 (linux_install_fast_tracepoint_jump): New.
12164 (linux_target_ops): Install linux_stabilize_threads and
12165 linux_install_fast_tracepoint_jump_pad.
12166 * linux-low.h (linux_target_ops) <get_thread_area,
12167 install_fast_tracepoint_jump_pad>: New fields.
12168 (struct lwp_info) <collecting_fast_tracepoint,
12169 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12170 (linux_get_thread_area): Declare.
12171 * linux-x86-low.c (jump_insn): New.
12172 (x86_get_thread_area): New.
12173 (append_insns): New.
12174 (push_opcode): New.
12175 (amd64_install_fast_tracepoint_jump_pad): New.
12176 (i386_install_fast_tracepoint_jump_pad): New.
12177 (x86_install_fast_tracepoint_jump_pad): New.
12178 (the_low_target): Install x86_get_thread_area and
12179 x86_install_fast_tracepoint_jump_pad.
12180 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12181 (struct fast_tracepoint_jump): New.
12182 (fast_tracepoint_jump_insn): New.
12183 (fast_tracepoint_jump_shadow): New.
12184 (find_fast_tracepoint_jump_at): New.
12185 (fast_tracepoint_jump_here): New.
12186 (delete_fast_tracepoint_jump): New.
12187 (set_fast_tracepoint_jump): New.
12188 (uninsert_fast_tracepoint_jumps_at): New.
12189 (reinsert_fast_tracepoint_jumps_at): New.
12190 (set_breakpoint_at): Use write_inferior_memory.
12191 (uninsert_raw_breakpoint): Use write_inferior_memory.
12192 (check_mem_read): Mask out fast tracepoint jumps.
12193 (check_mem_write): Mask out fast tracepoint jumps.
12194 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12195 (set_fast_tracepoint_jump): Declare.
12196 (delete_fast_tracepoint_jump)
12197 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12198 (reinsert_fast_tracepoint_jumps_at): Declare.
12199 * regcache.c: Don't compile many functions when building the
12200 in-process agent library.
12201 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12202 the register buffer in the heap.
12203 (free_register_cache): If the register buffer isn't owned by the
12204 regcache, don't free it.
12205 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12206 pre-existing register caches.
12207 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12208 type.
12209 (convert_ascii_to_int): : Constify `from' parameter type.
12210 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12211 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12212 the needed buffer in-place.
12213 (relocate_instruction): New.
12214 * server.c (handle_query) <qSymbols>: If the target supports
12215 tracepoints, give it a chance of looking up symbols. Report
12216 support for fast tracepoints.
12217 (handle_status): Stabilize threads.
12218 (process_serial_event): Adjust.
12219 * server.h (struct fast_tracepoint_jump): Forward declare.
12220 (struct process_info) <fast_tracepoint_jumps>: New field.
12221 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12222 (decode_X_packet, decode_M_packet): Adjust.
12223 (relocate_instruction): Declare.
12224 (in_process_agent_loaded): Declare.
12225 (tracepoint_look_up_symbols): Declare.
12226 (struct fast_tpoint_collect_status): Declare.
12227 (fast_tracepoint_collecting): Declare.
12228 (force_unlock_trace_buffer): Declare.
12229 (handle_tracepoint_bkpts): Declare.
12230 (initialize_low_tracepoint)
12231 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12232 * target.h (struct target_ops) <stabilize_threads,
12233 install_fast_tracepoint_jump_pad>: New fields.
12234 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12235 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12236 [HAVE_STDINT_H]: Include stdint.h.
12237 (trace_debug_1): Rename to ...
12238 (trace_vdebug): ... this.
12239 (trace_debug): Rename to ...
12240 (trace_debug_1): ... this. Add `level' parameter.
12241 (trace_debug): New.
12242 (ATTR_USED, ATTR_NOINLINE): New.
12243 (IP_AGENT_EXPORT): New.
12244 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12245 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12246 (about_to_request_buffer_space, trace_buffer_is_full)
12247 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12248 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12249 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12250 (traceframe_write_count, traceframes_created)
12251 (trace_state_variables)
12252 New renaming defines.
12253 (struct ipa_sym_addresses): New.
12254 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12255 (symbol_list): New.
12256 (ipa_sym_addrs): New.
12257 (all_tracepoint_symbols_looked_up): New.
12258 (in_process_agent_loaded): New.
12259 (write_e_ipa_not_loaded): New.
12260 (maybe_write_ipa_not_loaded): New.
12261 (tracepoint_look_up_symbols): New.
12262 (debug_threads) [IN_PROCESS_AGENT]: New.
12263 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12264 (UNKNOWN_SIDE_EFFECTS): New.
12265 (stop_tracing): New.
12266 (flush_trace_buffer): New.
12267 (stop_tracing_bkpt): New.
12268 (flush_trace_buffer_bkpt): New.
12269 (read_inferior_integer): New.
12270 (read_inferior_uinteger): New.
12271 (read_inferior_data_pointer): New.
12272 (write_inferior_data_pointer): New.
12273 (write_inferior_integer): New.
12274 (write_inferior_uinteger): New.
12275 (struct collect_static_trace_data_action): Delete.
12276 (enum tracepoint_type): New.
12277 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12278 <actions_str, step_actions, step_actions_str>: Only include in
12279 GDBserver.
fa593d66
PA
12280 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12281 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12282 (tracepoints): Use IP_AGENT_EXPORT.
12283 (last_tracepoint): Don't include in the IPA.
12284 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12285 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12286 (alloced_trace_state_variables): New.
12287 (trace_state_variables): Use IP_AGENT_EXPORT.
12288 (traceframe_t): Delete unused variable.
12289 (circular_trace_buffer): Don't include in the IPA.
12290 (trace_buffer_start): Delete.
12291 (struct trace_buffer_control): New.
12292 (trace_buffer_free): Delete.
12293 (struct ipa_trace_buffer_control): New.
12294 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12295 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12296 New.
12297 (trace_buffer_ctrl): New.
12298 (TRACE_BUFFER_CTRL_CURR): New.
12299 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12300 Reimplement as macros.
12301 (trace_buffer_wrap): Delete.
12302 (traceframe_write_count, traceframe_read_count)
12303 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12304 (struct tracepoint_hit_ctx) <type>: New field.
12305 (struct fast_tracepoint_ctx): New.
12306 (memory_barrier): New.
12307 (cmpxchg): New.
12308 (record_tracepoint_error): Update atomically in the IPA.
12309 (clear_inferior_trace_buffer): New.
12310 (about_to_request_buffer_space): New.
12311 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12312 updating the same buffer.
12313 (add_tracepoint): Default the tracepoint's type to trap
12314 tracepoint, and orig_size to -1.
12315 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12316 internal variables.
12317 (create_trace_state_variable): New parameter `gdb'. Handle it.
12318 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12319 (cmd_qtdp): Handle fast tracepoints.
12320 (cmd_qtdv): Adjust.
12321 (max_jump_pad_size): New.
12322 (gdb_jump_pad_head): New.
12323 (get_jump_space_head): New.
12324 (claim_jump_space): New.
12325 (sort_tracepoints): New.
12326 (MAX_JUMP_SIZE): New.
12327 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12328 IPA.
12329 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12330 support. Upload fast traceframes, and delete internal IPA
12331 breakpoints.
12332 (stop_tracing_handler): New.
12333 (flush_trace_buffer_handler): New.
12334 (cmd_qtstop): Upload fast tracepoints.
12335 (response_tracepoint): Handle fast tracepoints.
12336 (tracepoint_finished_step): Upload fast traceframes. Set the
12337 tracepoint hit context's tracepoint type.
12338 (handle_tracepoint_bkpts): New.
12339 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12340 type. Add comment about fast tracepoints.
12341 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12342 non-existing action_str field.
12343 (get_context_regcache): Handle fast tracepoints.
12344 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12345 to the regcache.
12346 (fast_tracepoint_from_jump_pad_address): New.
12347 (fast_tracepoint_from_ipa_tpoint_address): New.
12348 (collecting_t): New.
12349 (force_unlock_trace_buffer): New.
12350 (fast_tracepoint_collecting): New.
12351 (collecting): New.
12352 (gdb_collect): New.
12353 (write_inferior_data_ptr): New.
12354 (target_tp_heap): New.
12355 (target_malloc): New.
12356 (download_agent_expr): New.
12357 (UALIGN): New.
12358 (download_tracepoints): New.
12359 (download_trace_state_variables): New.
12360 (upload_fast_traceframes): New.
12361 (IPA_FIRST_TRACEFRAME): New.
12362 (IPA_NEXT_TRACEFRAME_1): New.
12363 (IPA_NEXT_TRACEFRAME): New.
12364 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12365 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12366 (gdb_jump_pad_buffer_end): New.
12367 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12368 (initialize_tracepoint): Adjust.
12369 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12370 buffer. Initialize the low module.
12371 * utils.c (PREFIX, TOOLNAME): New.
12372 (malloc_failure): Use PREFIX.
12373 (error): In the IPA, an error causes an exit.
12374 (fatal, warning): Use PREFIX.
12375 (internal_error): Use TOOLNAME.
12376 (NUMCELLS): Increase to 10.
12377 * configure, config.in: Regenerate.
12378
d149dd1d
PA
123792010-06-01 Pedro Alves <pedro@codesourcery.com>
12380
12381 * server.c (handle_query) <qSupported>: Do two passes over the
12382 qSupported string to avoid nesting strtok.
12383
f6528abd
JK
123842010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12385
12386 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12387 (CDEPS): New.
12388 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12389 -Wl,--dynamic-list.
12390 * configure: Regenerate.
12391 * proc-service.list: New.
12392
ca2a87a0
JK
123932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12394
12395 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12396 New comment.
12397
363a6e9f
OS
123982010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12399
12400 * gdbreplay.c (remote_open): Check error return from socket() call by
12401 its equality to -1 not by it being negative.
12402 * remote-utils.c (remote_open): Likewise.
12403
d23b6cb1
PA
124042010-05-23 Pedro Alves <pedro@codesourcery.com>
12405
12406 * config.h: Regenerate.
12407
28d3cf85
MK
124082010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12409
12410 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12411 doesn't provide PTRACE_GET_THREAD_AREA.
12412
fea36a59
MK
124132010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12414
12415 * linux-m68k-low.c: Include <asm/ptrace.h>
12416 (ps_get_thread_area): Implement.
12417
24b066ba
DE
124182010-05-03 Doug Evans <dje@google.com>
12419
12420 * event-loop.c (struct callback_event): New struct.
12421 (callback_list): New global.
12422 (append_callback_event, delete_callback_event): New functions.
12423 (process_callback): New function.
12424 (start_event_loop): Call it.
12425 * remote-utils.c (NOT_SCHEDULED): Define.
12426 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12427 moved out of readchar.
12428 (readchar): Rewrite. Call reschedule before returning.
12429 (reset_readchar): New function.
12430 (remote_close): Call it.
12431 (process_remaining, reschedule): New functions.
12432 * server.h (callback_handler_func): New typedef.
12433 (append_callback_event, delete_callback_event): Declare.
12434
9836d6ea
PA
124352010-05-03 Pedro Alves <pedro@codesourcery.com>
12436
12437 * proc-service.c (ps_pglobal_lookup): Use
12438 thread_db_look_up_one_symbol.
12439 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12440 parameter. Use it instead of all_symbols_looked_up.
12441 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12442 field.
12443 (all_symbols_looked_up): Don't declare.
12444 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12445 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12446 field.
12447 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12448 Set all_symbols_looked_up here.
12449 (thread_db_look_up_one_symbol): New.
12450 (thread_db_get_tls_address): Adjust.
12451 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12452 thread_db object on the heap, and tentatively set it in the
12453 process structure.
12454 (thread_db_init): Don't set all_symbols_looked_up here.
12455 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12456
7984d532
PA
124572010-05-03 Pedro Alves <pedro@codesourcery.com>
12458
12459 * linux-low.c (linux_kill, linux_detach): Adjust.
12460 (status_pending_p_callback): Remove redundant statement. Check
12461 for !TARGET_WAITIKIND_IGNORE, instead of
12462 TARGET_WAITKIND_STOPPED.
12463 (handle_tracepoints): Make sure LWP is locked. Adjust.
12464 (linux_wait_for_event_1): Adjust.
12465 (linux_cancel_breakpoints): New.
12466 (unsuspend_one_lwp): New.
12467 (unsuspend_all_lwps): New.
12468 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12469 (send_sigstop_callback): Change return type to int, add new
12470 `except' parameter and handle it.
12471 (suspend_and_send_sigstop_callback): New.
12472 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12473 pass them down. If SUSPEND, also increment the lwp's suspend
12474 count.
12475 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12476 (need_step_over_p): Don't consider suspended LWPs.
12477 (start_step_over): Adjust.
12478 (proceed_one_lwp): Change return type to int, add new `except'
12479 parameter and handle it.
12480 (unsuspend_and_proceed_one_lwp): New.
12481 (proceed_all_lwps): Use find_inferior instead of
12482 for_each_inferior.
12483 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12484 also decrement the suspend count of LWPs. Pass `except' down,
12485 instead of hacking its suspend count.
12486 (linux_pause_all): Add `freeze' parameter. Adjust.
12487 (linux_unpause_all): New.
12488 (linux_target_ops): Install linux_unpause_all.
12489 * server.c (handle_status): Adjust.
12490 * target.h (struct target_ops): New fields `unpause_all' and
12491 `cancel_breakpoints'. Add new parameter to `pause_all'.
12492 (pause_all): Add new `freeze' parameter.
12493 (unpause_all): New.
12494 (cancel_breakpoints): New.
12495 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12496 cancel breakpoints.
12497 (cmd_qtstart): Pause threads.
12498 (stop_tracing): Pause threads, and cancel breakpoints.
12499 * win32-low.c (win32_target_ops): Adjust.
12500
e471f25b
PA
125012010-05-03 Pedro Alves <pedro@codesourcery.com>
12502
12503 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12504 the inferior right away from here...
12505 (linux_wait_1): ... to here, and adjust to check the thread's
12506 last_resume_kind instead of the lwp's step or stop_expected flags.
12507
1915ef4f
PA
125082010-05-02 Pedro Alves <pedro@codesourcery.com>
12509
12510 * README: Use consistent `GDB' and `GDBserver' spellings.
12511
f9e39928
PA
125122010-05-02 Pedro Alves <pedro@codesourcery.com>
12513
12514 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12515 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12516 (linux_detach_one_lwp): Assume the lwp is stopped.
12517 (any_thread_of): Delete.
12518 (linux_detach): Stop all lwps here. Don't blindly delete all
12519 breakpoints.
12520 (delete_lwp_callback): New.
12521 (linux_mourn): Delete all lwps of the process that is gone.
12522 (linux_wait_1): Don't delete the last lwp of the process here.
12523 * mem-break.h (mark_breakpoints_out): Declare.
12524 * mem-break.c (mark_breakpoints_out): New.
12525 (free_all_breakpoints): Use it.
12526 * server.c (handle_target_event): If the process is gone, mark
12527 breakpoints out.
12528 * thread-db.c (struct thread_db) <create_bp>: New field.
12529 (thread_db_enable_reporting): Fix prototype. Store a thread event
12530 breakpoint reference in the thread_db struct.
12531 (thread_db_load_search): Clear the thread_db object.
12532 (try_thread_db_load_1): Ditto.
12533 (switch_to_process): New.
12534 (disable_thread_event_reporting): Use it.
12535 (remove_thread_event_breakpoints): New.
12536 (thread_db_detach, thread_db_mourn): Use it.
12537
1e7fc18c
PA
125382010-05-01 Pedro Alves <pedro@codesourcery.com>
12539
12540 * linux-low.c (linux_enable_event_reporting): New.
12541 (linux_wait_for_event_1, handle_extended_wait): Use it.
12542
02fc4de7
PA
125432010-04-30 Pedro Alves <pedro@codesourcery.com>
12544
12545 * linux-low.c (linux_kill_one_lwp, linux_kill)
12546 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12547 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12548 SIGSTOP even if the LWP is stopped.
12549 (send_sigstop_callback): New.
12550 (stop_all_lwps): Use send_sigstop_callback instead.
12551 (linux_resume_one_thread): Adjust.
12552 (proceed_one_lwp): Still proceed an LWP that the client has
12553 requested to stop, if we haven't reported it as stopped yet. Make
12554 sure that LWPs the client want stopped, have a pending SIGSTOP.
12555
bc3b5632
DE
125562010-04-26 Doug Evans <dje@google.com>
12557
ae1ada35
DE
12558 * server.c (handle_general_set): Make static.
12559
bc3b5632
DE
12560 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12561 Print received char after testing for error/eof instead of before.
12562 (input_interrupt): Tweak comment.
12563
65730243
DE
125642010-04-23 Doug Evans <dje@google.com>
12565
12566 * server.c (start_inferior): Print inferior argv if --debug.
12567
a8ae7dc0
AR
125682010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12569
12570 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12571 * nto-x86-low.c: Include server.h
12572
1c07cc19
PM
125732010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12574
12575 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12576 be consistent with other sources of this directory.
12577 (init_registers_amd64): Correct name of source file of this function
12578 in the comment.
12579
e0a61e09
PM
125802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12581
12582 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12583 64-bit executables.
12584
54709339
PM
125852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12586
12587 * win32-i386-low.c: Add 64-bit support.
12588 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12589 (init_registers_amd64): Declare.
12590 (mappings): Add 64-bit version of array.
12591 (init_windows_x86): New function.
12592 (the_low_target): Change init_arch field to init_windows_x86.
12593
e8f0053d
PM
125942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12595
12596 * win32-low.c: Adapt to support also 64-bit architecture.
12597 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12598 (get_image_name): Use SIZE_T type for local variable `done'.
12599 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12600 (toolhelp_get_dll_name): Idem.
12601 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12602 Use uintptr_t typecast to avoid warning.
12603 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12604 (handle_exception): Use phex_nz to avoid warning.
12605 (win32_wait): Remove unused local variable `process'.
12606
c481e77e
PM
126072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12608
12609 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12610 `amd64-avx.o'.
12611
12ea4b69
PM
126122010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12613
12614 * configure.ac: Use `ws2_32' library for srv_mingw.
12615 * configure: Regenerate.
12616 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12617 * remote-utils.c: Likewise.
12618
f6d1620c
L
126192010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12620
12621 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12622 if __x86_64__ is defined.
12623
8e642873
PM
126242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12625
12626 * configure: Regenerate.
12627
711e434b
PM
126282010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12629
12630 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12631 * target.h (target_ops): New get_tib_address field.
12632 * win32-low.h (win32_thread_info): Add thread_local_base field.
12633 * win32-low.c (child_add_thread): Add tlb argument.
12634 Set thread_local_base field to TLB.
12635 (get_child_debug_event): Adapt to child_add_thread change.
12636 (win32_get_tib_address): New function.
12637 (win32_target_ops): Set get_tib_address field to
12638 win32_get_tib_address.
12639 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12640
505106cd
PA
126412010-04-12 Pedro Alves <pedro@codesourcery.com>
12642
505106cd
PA
12643 * linux-low.c (linux_mourn): Also remove the process.
12644 * server.c (handle_target_event): Don't remove the process here.
12645 * nto-low.c (nto_mourn): New.
12646 (nto_target_ops): Install it.
12647 * spu-low.c (spu_mourn): New.
12648 (spu_target_ops): Install it.
12649 * win32-low.c (win32_mourn): New.
12650 (win32_target_ops): Install it.
12651
e8470a06
PA
126522010-04-12 Pedro Alves <pedro@codesourcery.com>
12653
12654 * server.h (buffer_xml_printf): Remove redundant `;'.
12655
45ba0d02
PA
126562010-04-12 Pedro Alves <pedro@codesourcery.com>
12657
12658 * regcache.c (set_register_cache): Invalidate regcaches before
12659 changing the register cache layout.
12660 (regcache_invalidate_one): Allow a NULL regcache.
12661 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12662 regcaches before changing the register cache layout or the target
12663 regsets.
12664
59e04013
L
126652010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12666
12667 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12668 variable warning on Linux/x86-64.
12669
8336d594
PA
126702010-04-11 Pedro Alves <pedro@codesourcery.com>
12671
12672 GDBserver disconnected tracing support.
12673
12674 * linux-low.c (linux_remove_process): Delete.
12675 (add_lwp): Don't set last_resume_kind here.
12676 (linux_kill): Use `mourn'.
12677 (linux_detach): Use `thread_db_detach', and `mourn'.
12678 (linux_mourn): New.
12679 (linux_attach_lwp_1): Adjust comment.
12680 (linux_attach): last_resume_kind moved the thread_info; adjust.
12681 (status_pending_p_callback): Adjust.
12682 (linux_wait_for_event_1): Adjust.
12683 (count_events_callback, select_singlestep_lwp_callback)
12684 (select_event_lwp_callback, cancel_breakpoints_callback)
12685 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12686 (proceed_one_lwp): Adjust.
12687 (linux_async): Add debug output.
12688 (linux_thread_stopped): New.
12689 (linux_pause_all): New.
12690 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12691 linux_pause_all.
12692 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12693 (thread_db_free): Delete declaration.
12694 (thread_db_detach, thread_db_mourn): Declare.
12695 * thread-db.c (thread_db_init): Use thread_db_mourn.
12696 (thread_db_free): Delete, split in two.
12697 (disable_thread_event_reporting): New.
12698 (thread_db_detach): New.
12699 (thread_db_mourn): New.
12700
12701 * server.h (struct thread_info) <last_resume_kind>: New field.
12702 <attached>: Add comment.
12703 <gdb_detached>: New field.
12704 (handler_func): Change return type to int.
12705 (handle_serial_event, handle_target_event): Ditto.
12706 (gdb_connected): Declare.
12707 (tracing): Delete.
12708 (disconnected_tracing): Declare.
12709 (stop_tracing): Declare.
12710
12711 * server.c (handle_query) <qSupported>: Report support for
12712 disconnected tracing.
12713 (queue_stop_reply_callback): Account for running threads.
12714 (gdb_wants_thread_stopped): New.
12715 (gdb_wants_all_threads_stopped): New.
12716 (gdb_reattached_process): New.
12717 (handle_status): Clear the `gdb_detached' flag of all processes.
12718 In all-stop, stop all threads.
12719 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12720 (process_serial_event): If the remote connection breaks, or if an
12721 exit was forced with "monitor exit", force an event loop exit.
12722 Handle disconnected tracing on detach.
12723 (handle_serial_event): Adjust.
12724 (handle_target_event): If GDB isn't connected, forward events back
12725 to the inferior, unless the last process exited, in which case,
12726 exit gdbserver. Adjust interface.
12727
12728 * remote-utils.c (remote_open): Don't block in accept. Instead
12729 register an event loop source on the listen socket file
12730 descriptor. Refactor bits into ...
12731 (listen_desc): ... this new global.
12732 (gdb_connected): ... this new function.
12733 (enable_async_notification): ... this new function.
12734 (handle_accept_event): ... this new function.
12735 (remote_close): Clear remote_desc.
12736
12737 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12738
12739 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12740 New fields.
12741 (mourn_inferior): Define.
12742 (target_process_qsupported): Avoid the dangling else problem.
12743 (thread_stopped): Define.
12744 (pause_all): Define.
12745 (target_waitstatus_to_string): Declare.
12746 * target.c (target_waitstatus_to_string): New.
12747
12748 * tracepoint.c (tracing): Make extern.
12749 (disconnected_tracing): New.
12750 (stop_tracing): Make extern. Handle tracing stops due to GDB
12751 disconnecting.
12752 (cmd_qtdisconnected): New.
12753 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12754 (handle_tracepoint_general_set): Handle QTDisconnected.
12755
12756 * event-loop.c (event_handler_func): Change return type to int.
12757 (process_event): Bail out if the event handler wants the event
12758 loop to stop.
12759 (handle_file_event): Ditto.
12760 (start_event_loop): Bail out if the event handler wants the event
12761 loop to stop.
12762
12763 * nto-low.c (nto_target_ops): Adjust.
12764 * spu-low.c (spu_wait): Don't remove the process here.
12765 (spu_target_ops): Adjust.
12766 * win32-low.c (win32_wait): Don't remove the process here.
12767 (win32_target_ops): Adjust.
12768
5d267c4c
PA
127692010-04-11 Pedro Alves <pedro@codesourcery.com>
12770
12771 * regcache.c (realloc_register_cache): Invalidate inferior's
12772 regcache before recreating it.
12773
623ccd72
PA
127742010-04-09 Pedro Alves <pedro@codesourcery.com>
12775
12776 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12777
219f2f23
PA
127782010-04-09 Stan Shebs <stan@codesourcery.com>
12779 Pedro Alves <pedro@codesourcery.com>
12780
12781 * server.h (LONGEST): New.
12782 (struct thread_info) <while_stepping>: New field.
12783 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12784 Declare.
12785 (initialize_tracepoint, handle_tracepoint_general_set)
12786 (handle_tracepoint_query, tracepoint_finished_step)
12787 (tracepoint_was_hit, release_while_stepping_state_list):
12788 (current_traceframe): Declare.
12789 * server.c (handle_general_set): Handle tracepoint packets.
12790 (read_memory): New.
12791 (write_memory): New.
12792 (handle_search_memory_1): Use read_memory.
12793 (handle_query): Report support for conditional tracepoints, trace
12794 state variables, and tracepoint sources. Handle tracepoint
12795 queries.
12796 (main): Initialize the tracepoints module.
12797 (process_serial_event): Handle traceframe reads/writes.
12798
12799 * linux-low.c (handle_tracepoints): New.
12800 (linux_wait_1): Call it.
12801 (linux_resume_one_lwp): Handle while-stepping.
12802 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12803 (linux_target_ops): Install them.
12804 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12805 New field.
12806 * linux-x86-low.c (x86_supports_tracepoints): New.
12807 (the_low_target). Install it.
12808
12809 * mem-break.h (delete_breakpoint): Declare.
12810 * mem-break.c (delete_breakpoint): Make external.
12811
12812 * target.h (struct target_ops): Add `supports_tracepoints',
12813 `read_pc', and `write_pc' fields.
12814 (target_supports_tracepoints): Define.
12815 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12816 (phex_nz): New.
12817
12818 * regcache.h (struct regcache) <registers_owned>: New field.
12819 (init_register_cache, regcache_cpy): Declare.
12820 (regcache_read_pc, regcache_write_pc): Declare.
12821 (register_cache_size): Declare.
12822 (supply_regblock): Declare.
12823 * regcache.c (init_register_cache): New.
12824 (new_register_cache): Use it.
12825 (regcache_cpy): New.
12826 (register_cache_size): New.
12827 (supply_regblock): New.
12828 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12829
219f2f23
PA
12830 * tracepoint.c: New.
12831
12832 * Makefile.in (OBS): Add tracepoint.o.
12833 (tracepoint.o): New rule.
12834
3a13a53b
L
128352010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12836
12837 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12838 (i386-mmx.o): New.
12839 (i386-mmx.c): Likewise.
12840 (i386-mmx-linux.o): Likewise.
12841 (i386-mmx-linux.c): Likewise.
12842
12843 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12844 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12845 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12846 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12847
12848 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12849 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12850 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12851
1570b33e
L
128522010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12853
12854 * Makefile.in (clean): Updated.
12855 (i386-avx.o): New.
12856 (i386-avx.c): Likewise.
12857 (i386-avx-linux.o): Likewise.
12858 (i386-avx-linux.c): Likewise.
12859 (amd64-avx.o): Likewise.
12860 (amd64-avx.c): Likewise.
12861 (amd64-avx-linux.o): Likewise.
12862 (amd64-avx-linux.c): Likewise.
12863
12864 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12865 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12866 (srv_amd64_regobj): Add amd64-avx.o.
12867 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12868 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12869 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12870 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12871 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12872 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12873 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12874
12875 * i387-fp.c: Include "i386-xstate.h".
12876 (i387_xsave): New.
12877 (i387_cache_to_xsave): Likewise.
12878 (i387_xsave_to_cache): Likewise.
12879 (x86_xcr0): Likewise.
12880
12881 * i387-fp.h (i387_cache_to_xsave): Likewise.
12882 (i387_xsave_to_cache): Likewise.
12883 (x86_xcr0): Likewise.
12884
12885 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12886 * linux-crisv32-low.c (target_regsets): Likewise.
12887 * linux-m68k-low.c (target_regsets): Likewise.
12888 * linux-mips-low.c (target_regsets): Likewise.
12889 * linux-ppc-low.c (target_regsets): Likewise.
12890 * linux-s390-low.c (target_regsets): Likewise.
12891 * linux-sh-low.c (target_regsets): Likewise.
12892 * linux-sparc-low.c (target_regsets): Likewise.
12893 * linux-xtensa-low.c (target_regsets): Likewise.
12894
12895 * linux-low.c: Include <sys/uio.h>.
12896 (regsets_fetch_inferior_registers): Support nt_type.
12897 (regsets_store_inferior_registers): Likewise.
12898 (linux_process_qsupported): New.
12899 (linux_target_ops): Add linux_process_qsupported.
12900
12901 * linux-low.h (regset_info): Add nt_type.
12902 (linux_target_ops): Add process_qsupported.
12903
12904 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12905 and <sys/uio.h>.
12906 (init_registers_i386_avx_linux): New.
12907 (init_registers_amd64_avx_linux): Likewise.
12908 (xmltarget_i386_linux_no_xml): Likewise.
12909 (xmltarget_amd64_linux_no_xml): Likewise.
12910 (PTRACE_GETREGSET): Likewise.
12911 (PTRACE_SETREGSET): Likewise.
12912 (x86_fill_xstateregset): Likewise.
12913 (x86_store_xstateregset): Likewise.
12914 (use_xml): Likewise.
12915 (x86_linux_update_xmltarget): Likewise.
12916 (x86_linux_process_qsupported): Likewise.
12917 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12918 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12919 init_registers_i386_linux here. Call
12920 x86_linux_update_xmltarget.
12921 (the_low_target): Add x86_linux_process_qsupported.
12922
12923 * server.c (handle_query): Call target_process_qsupported.
12924
12925 * target.h (target_ops): Add process_qsupported.
12926 (target_process_qsupported): New.
12927
fc7238bb
PA
129282010-04-03 Pedro Alves <pedro@codesourcery.com>
12929
12930 * inferiors.c (add_thread): Set last_status kind to
12931 TARGET_WAITKIND_IGNORE.
12932 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12933 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12934 (linux_wait_1): Move `thread' local definition to block that uses
12935 it. Don't NULL initialize `event_child'.
12936 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12937 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12938 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12939
bdabb078
PA
129402010-04-01 Pedro Alves <pedro@codesourcery.com>
12941
12942 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12943 an extended waitstatus, or by a watchpoint.
12944 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12945 thread was stepping or has been stopped by a watchpoint.
12946
d3bbe7a0
PA
129472010-04-01 Pedro Alves <pedro@codesourcery.com>
12948
12949 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12950 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12951 of another, then delete the previous, and validate all
12952 breakpoints.
12953 (validate_inserted_breakpoint): New.
12954 (delete_disabled_breakpoints): New.
12955 (validate_breakpoints): New.
12956 (check_mem_read): Validate breakpoints before trusting their
12957 shadow. Delete disabled breakpoints.
12958 (check_mem_write): Validate breakpoints before trusting they
12959 should be inserted. Delete disabled breakpoints.
12960 * mem-break.h (validate_breakpoints):
12961 * server.c (handle_query): Validate breakpoints when we see a
12962 qSymbol query.
12963
8b07ae33
PA
129642010-04-01 Pedro Alves <pedro@codesourcery.com>
12965
12966 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12967 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12968 if we could tell there's a GDB breakpoint at stop_pc.
12969 (need_step_over_p): Don't do a step over if we find a GDB
12970 breakpoint at the resume PC.
12971
12972 * mem-break.c (struct raw_breakpoint): New.
12973 (enum bkpt_type): New type `gdb_breakpoint'.
12974 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12975 fields. New field `raw'.
12976 (find_raw_breakpoint_at): New.
12977 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12978 breakpoint instead.
12979 (set_breakpoint_at): Adjust.
12980 (delete_raw_breakpoint): New.
12981 (release_breakpoint): New.
12982 (delete_breakpoint): Rename to...
12983 (delete_breakpoint_1): ... this. Add proc parameter. Use
12984 release_breakpoint. Return ENOENT.
12985 (delete_breakpoint): Reimplement.
12986 (find_breakpoint_at): Delete.
12987 (find_gdb_breakpoint_at): New.
12988 (delete_breakpoint_at): Delete.
12989 (set_gdb_breakpoint_at): New.
12990 (delete_gdb_breakpoint_at): New.
12991 (gdb_breakpoint_here): New.
12992 (set_reinsert_breakpoint): Use release_breakpoint.
12993 (uninsert_breakpoint): Rename to ...
12994 (uninsert_raw_breakpoint): ... this.
12995 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12996 (reinsert_raw_breakpoint): Change parameter type to
12997 raw_breakpoint.
12998 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12999 instead.
13000 (check_breakpoints): Adjust. Use release_breakpoint.
13001 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13002 (breakpoint_inserted_here): Ditto.
13003 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13004 Don't trust the breakpoint's shadow if it is not inserted.
13005 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13006 (delete_all_breakpoints): Adjust.
13007 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13008 use delete_breakpoint_1.
13009
13010 * mem-break.h (breakpoints_supported): Delete declaration.
13011 (set_gdb_breakpoint_at): Declare.
13012 (gdb_breakpoint_here): Declare.
13013 (delete_breakpoint_at): Delete.
13014 (delete_gdb_breakpoint_at): Declare.
13015
13016 * server.h (struct raw_breakpoint): Forward declare.
13017 (struct process_info): New field `raw_breakpoints'.
13018
13019 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13020 breakpoints.
13021
6bf5e0ba
PA
130222010-03-24 Pedro Alves <pedro@codesourcery.com>
13023
13024 * linux-low.c (status_pending_p_callback): Fix comment.
13025 (linux_wait_for_event_1): Move most of the internal breakpoint
13026 handling from here...
13027 (linux_wait_1): ... to here.
13028 (count_events_callback): New.
13029 (select_singlestep_lwp_callback): New.
13030 (select_event_lwp_callback): New.
13031 (cancel_breakpoints_callback): New.
13032 (select_event_lwp): New.
13033 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13034 priority to all LWPs that have had events that should be reported
13035 to the client. Cancel breakpoints when about to reporting the
13036 event to the client, not while stopping lwps. No longer cancel
13037 finished single-steps here.
13038 (cancel_finished_single_step): Delete.
13039 (cancel_finished_single_steps): Delete.
13040
414a389f
PA
130412010-03-24 Pedro Alves <pedro@codesourcery.com>
13042
13043 * mem-break.c (enum bkpt_type): New.
13044 (struct breakpoint): New field `type'.
13045 (set_breakpoint_at): Change return type to struct breakpoint
13046 pointer. Set type to `other_breakpoint' by default.
13047 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13048 in the breakpoint list.
13049 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13050 (reinsert_breakpoint): Rename to ...
13051 (reinsert_raw_breakpoint): ... this.
13052 (reinsert_breakpoints_at): Adjust.
13053 * mem-break.h (struct breakpoint): Declare.
13054 (set_breakpoint_at): Change return type to struct breakpoint
13055 pointer.
13056
2280c721
PA
130572010-03-24 Pedro Alves <pedro@codesourcery.com>
13058
13059 * server.c (handle_query): Assign, not compare.
13060
d50171e4
PA
130612010-03-24 Pedro Alves <pedro@codesourcery.com>
13062
13063 Teach linux gdbserver to step-over-breakpoints.
13064
13065 * linux-low.c (can_hardware_single_step): New.
13066 (supports_breakpoints): New.
13067 (handle_extended_wait): If stopping threads, read the stop pc of
13068 the new cloned LWP.
13069 (get_pc): New.
13070 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13071 low target doesn't support retrieving the PC.
13072 (add_lwp): Set last_resume_kind to resume_continue.
13073 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13074 (linux_attach): Don't clear stop_expected. Set the lwp's
13075 last_resume_kind to resume_stop.
13076 (linux_detach_one_lwp): Don't check for removed breakpoints.
13077 (check_removed_breakpoint): Delete.
13078 (status_pending_p): Rename to ...
13079 (status_pending_p_callback): ... this. Don't check for removed
13080 breakpoints. Don't consider threads that are stopped from GDB's
13081 perspective.
13082 (linux_wait_for_lwp): Always read the stop_pc here.
13083 (cancel_breakpoint): New.
13084 (step_over_bkpt): New global.
13085 (linux_wait_for_event_1): Implement stepping over breakpoints.
13086 (gdb_wants_lwp_stopped): New.
13087 (gdb_wants_all_stopped): New.
13088 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13089 single-step traps here. Store the thread's last reported target
13090 wait status.
13091 (send_sigstop): Don't clear stop_expected. Always set it,
13092 instead.
13093 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13094 (cancel_finished_single_step): New.
13095 (cancel_finished_single_steps): New.
13096 (wait_for_sigstop): Don't cancel finished single-step traps here.
13097 (linux_resume_one_lwp): Don't check for removed breakpoints.
13098 Don't set `step' on non-hardware step archs.
13099 (linux_set_resume_request): Ignore resume_stop requests if already
13100 stopping or stopped. Set the lwp's last_resume_kind.
13101 (resume_status_pending_p): Don't check for removed breakpoints.
13102 (need_step_over_p): New.
13103 (start_step_over): New.
13104 (finish_step_over): New.
13105 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13106 requests. Clear the thread's last reported target waitstatus.
13107 Don't use the `suspended' flag. Don't consider pending breakpoints.
13108 (linux_resume): Start a step-over if necessary.
13109 (proceed_one_lwp): New.
13110 (proceed_all_lwps): New.
13111 (unstop_all_lwps): New.
13112 * linux-low.h (struct lwp_info): Rewrite comment for the
13113 `suspended' flag. Add the `stop_pc' field. Delete the
13114 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13115 Add `'last_resume_kind' and `need_step_over' fields.
13116 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13117 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13118 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13119 (set_raw_breakpoint_at): New.
13120 (set_breakpoint_at): Rewrite to use it.
13121 (reinsert_breakpoint_handler): Delete.
13122 (set_reinsert_breakpoint): New.
13123 (reinsert_breakpoint_by_bp): Delete.
13124 (delete_reinsert_breakpoints): New.
13125 (uninsert_breakpoint): Rewrite.
13126 (uninsert_breakpoints_at): New.
13127 (reinsert_breakpoint): Rewrite.
13128 (reinsert_breakpoints_at): New.
13129 (check_breakpoints): Rewrite.
13130 (breakpoint_here): New.
13131 (breakpoint_inserted_here): New.
13132 (check_mem_read): Adjust.
13133 * mem-break.h (breakpoints_supported, breakpoint_here)
13134 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13135 (reinsert_breakpoint_by_bp): Delete declaration.
13136 (delete_reinsert_breakpoints): Declare.
13137 (reinsert_breakpoint): Delete declaration.
13138 (reinsert_breakpoints_at): Declare.
13139 (uninsert_breakpoint): Delete declaration.
13140 (uninsert_breakpoints_at): Declare.
13141 (check_breakpoints): Adjust prototype.
13142 * server.h: Adjust include order.
13143 (struct thread_info): Declare here. Add a `last_status' field.
13144
30ba68cb
MS
131452010-03-23 Michael Snyder <msnyder@vmware.com>
13146
13147 * server.c (crc32): New function.
13148 (handle_query): Add handling for 'qCRC:' request.
13149
b9a881c2
PA
131502010-03-23 Pedro Alves <pedro@codesourcery.com>
13151
13152 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13153 lwp had been stopped by a watchpoint.
13154
e92d13d5
PA
131552010-03-16 Pedro Alves <pedro@codesourcery.com>
13156
13157 * server.h (internal_error): Declare.
13158 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13159 * utils.c (internal_error): New function.
13160
64daa791
AS
131612010-03-15 Andreas Schwab <schwab@redhat.com>
13162
13163 * configure.srv: Fix typo setting srv_regobj.
13164
f52cd8cd
PA
131652010-03-15 Pedro Alves <pedro@codesourcery.com>
13166
13167 * linux-low.c (fetch_register): Avoid passing a non string literal
13168 format to `error'.
13169 (usr_store_inferior_registers): Ditto.
13170
93ae6fdc
PA
131712010-03-14 Pedro Alves <pedro@codesourcery.com>
13172
13173 * linux-low.c (linux_write_memory): Bail out early if peeking
13174 memory failed.
13175
c3adc08c
PA
131762010-03-14 Pedro Alves <pedro@codesourcery.com>
13177
13178 * linux-low.h (struct lwp_info): New fields
13179 `stopped_by_watchpoint' and `stopped_data_address'.
13180 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13181 here, and cache them in the lwp object.
13182 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13183 directly.
13184 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13185 field.
13186 (linux_stopped_by_watchpoint): Rewrite.
13187 (linux_stopped_data_address): Rewrite.
13188
bce522a2
PA
131892010-03-06 Simo Melenius <simo.melenius@iki.fi>
13190
13191 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13192 switching the current inferior, not before.
13193
90884b2b
L
131942010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13195
13196 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13197 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13198 i386-linux.c and amd64-linux.c.
13199 (reg-i386.o): Removed.
13200 (reg-i386.c): Likewise.
13201 (reg-i386-linux.o): Likewise.
13202 (reg-i386-linux.c): Likewise.
13203 (reg-x86-64.o): Likewise.
13204 (reg-x86-64.c): Likewise.
13205 (reg-x86-64-linux.o): Likewise.
13206 (reg-x86-64-linux.c): Likewise.
13207 (i386.o): New.
13208 (i386.c): Likewise.
13209 (i386-linux.o): Likewise.
13210 (i386-linux.c): Likewise.
13211 (amd64.o): Likewise.
13212 (amd64.c): Likewise.
13213 (amd64-linux.o): Likewise.
13214 (amd64-linux.c): Likewise.
13215
13216 * configure.srv (srv_i386_regobj): New.
13217 (srv_i386_linux_regobj): Likewise.
13218 (srv_amd64_regobj): Likewise.
13219 (srv_amd64_linux_regobj): Likewise.
13220 (srv_i386_32bit_xmlfiles): Likewise.
13221 (srv_i386_64bit_xmlfiles): Likewise.
13222 (srv_i386_xmlfiles): Likewise.
13223 (srv_amd64_xmlfiles): Likewise.
13224 (srv_i386_linux_xmlfiles): Likewise.
13225 (srv_amd64_linux_xmlfiles): Likewise.
13226 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13227 srv_xmlfiles to $srv_i386_xmlfiles.
13228 (i[34567]86-*-mingw32ce*): Likewise.
13229 (i[34567]86-*-mingw*): Likewise.
13230 (i[34567]86-*-nto*): Likewise.
13231 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13232 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13233 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13234 (x86_64-*-linux*): Likewise.
13235
13236 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13237 (init_registers_amd64_linux): New.
13238 (x86_arch_setup): Replace init_registers_x86_64_linux with
13239 init_registers_amd64_linux.
13240
193f13e6
MK
132412010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13242
13243 * configure.ac: Check for libdl. If it is not available link against
13244 static libthread_db.
13245 * configure: Regenerate.
13246
85d721b8
PA
132472010-02-22 Pedro Alves <pedro@codesourcery.com>
13248
13249 PR9605
13250
13251 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13252 handing a read watchpoint.
13253 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13254
6076632b
DE
132552010-02-12 Doug Evans <dje@google.com>
13256
13257 * linux-low.c (linux_supports_tracefork_flag): Document.
13258 (linux_look_up_symbols): Add comment.
13259
3327ccf7
L
132602010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13261
13262 * regcache.c (supply_register): Clear regcache if buf is NULL.
13263
0718675c 132642010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13265 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13266
13267 * inferiors.c (find_inferior): Add function documentation.
13268 (unloaded_dll): Handle the case where the unloaded dll has not
13269 been previously registered in the dll list.
13270
177321bd
DJ
132712010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13272
13273 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13274 (thumb2_breakpoint): New.
13275 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13276
2b009048
DJ
132772010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13278
13279 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13280 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13281 breakpoints.
13282
3be029c7
PA
132832010-01-21 Pedro Alves <pedro@codesourcery.com>
13284
13285 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13286
18f5de3b
JK
132872010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13288
13289 * linux-s390-low.c (s390_collect_ptrace_register)
13290 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13291
3743bb4f
DE
132922010-01-21 Doug Evans <dje@google.com>
13293
14ce3065
DE
13294 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13295 (PTRACE_ARG4_TYPE): New macro.
13296 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13297 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13298 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13299 (usr_store_inferior_registers): Ditto.
13300 (linux_read_memory, linux_write_memory): Ditto.
13301 (linux_test_for_tracefork): Ditto.
13302
3743bb4f
DE
13303 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13304 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13305
8b315be5
PA
133062010-01-21 Pedro Alves <pedro@codesourcery.com>
13307
13308 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13309 target.
13310
85492558
PA
133112010-01-21 Pedro Alves <pedro@codesourcery.com>
13312
13313 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13314 prototype to take a regcache. Adjust.
13315
442ea881
PA
133162010-01-20 Pedro Alves <pedro@codesourcery.com>
13317
13318 * regcache.h (struct thread_info): Forward declare.
13319 (struct regcache): New.
13320 (new_register_cache): Adjust prototype.
13321 (get_thread_regcache): Declare.
13322 (free_register_cache): Adjust prototype.
13323 (registers_to_string, registers_from_string): Ditto.
13324 (supply_register, supply_register_by_name, collect_register)
13325 (collect_register_as_string, collect_register_by_name): Ditto.
13326 * regcache.c (struct inferior_regcache_data): Delete.
13327 (get_regcache): Rename to ...
13328 (get_thread_regcache): ... this. Adjust. Switch inferior before
13329 fetching registers.
13330 (regcache_invalidate_one): Adjust.
13331 (regcache_invalidate): Fix prototype.
13332 (new_register_cache): Return the new register cache.
13333 (free_register_cache): Change prototype.
13334 (realloc_register_cache): Adjust.
13335 (registers_to_string): Change prototype to take a regcache. Adjust.
13336 (registers_from_string): Ditto.
13337 (register_data): Ditto.
13338 (supply_register): Ditto.
13339 (supply_register_by_name): Ditto.
13340 (collect_register): Ditto.
13341 (collect_register_as_string): Ditto.
13342 (collect_register_by_name): Ditto.
13343 * server.c (process_serial_event): Adjust.
13344 * linux-low.h (regset_fill_func, regset_store_func): Change
13345 prototype.
13346 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13347 Change prototype.
13348 * linux-low.c (get_stop_pc): Adjust.
13349 (check_removed_breakpoint): Adjust.
13350 (linux_wait_for_event): Adjust.
13351 (linux_resume_one_lwp): Adjust.
13352 (fetch_register): Add regcache parameter. Adjust.
13353 (usr_store_inferior_registers): Ditto.
13354 (regsets_fetch_inferior_registers): Ditto.
13355 (regsets_store_inferior_registers): Ditto.
13356 (linux_fetch_registers, linux_store_registers): Ditto.
13357 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13358 regcache. Adjust.
43aaf8b6
PA
13359 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13360 Ditto.
442ea881
PA
13361 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13362 prototype to take a regcache.
13363 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13364 * remote-utils.c (convert_ascii_to_int, outreg)
13365 (prepare_resume_reply): Change prototype to take a regcache.
13366 Adjust.
13367 * target.h (struct target_ops) <fetch_registers, store_registers>:
13368 Change prototype to take a regcache.
13369 (fetch_inferior_registers, store_inferior_registers): Change
13370 prototype to take a regcache. Adjust.
13371 * proc-service.c (ps_lgetregs): Adjust.
13372 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13373 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13374 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13375 take a regcache. Adjust.
13376 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13377 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13378 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13379 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13380 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13381 (cris_cannot_fetch_register):
13382 (cris_breakpoint_at): Change prototype to take a regcache.
13383 Adjust.
13384 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13385 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13386 to take a regcache. Adjust.
13387 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13388 Adjust.
13389 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13390 take a regcache. Adjust.
13391 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13392 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13393 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13394 * linux-mips-low.c (mips_get_pc):
13395 (mips_set_pc): Change prototype to take a regcache. Adjust.
13396 (mips_reinsert_addr): Adjust.
13397 (mips_collect_register): Change prototype to take a regcache.
13398 Adjust.
13399 (mips_supply_register):
13400 (mips_collect_register_32bit, mips_supply_register_32bit)
13401 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13402 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13403 * linux-ppc-low.c (ppc_supply_ptrace_register)
13404 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13405 (parse_spufs_run): Adjust.
13406 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13407 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13408 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13409 take a regcache. Adjust.
13410 * linux-s390-low.c (s390_collect_ptrace_register)
13411 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13412 (s390_set_pc): Change prototype to take a regcache. Adjust.
13413 (s390_arch_setup): Adjust.
13414 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13415 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13416 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13417 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13418 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13419 regcache. Adjust.
13420 (sparc_breakpoint_at): Adjust.
13421 * linux-xtensa-low.c (xtensa_fill_gregset):
13422 (xtensa_store_gregset):
13423 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13424 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13425 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13426 prototype to take a regcache. Adjust.
13427 * win32-arm-low.c (arm_fetch_inferior_register)
13428 (arm_store_inferior_register): Change prototype to take a
13429 regcache. Adjust.
13430 * win32-i386-low.c (i386_fetch_inferior_register)
13431 (i386_store_inferior_register): Change prototype to take a
13432 regcache. Adjust.
13433 * win32-low.c (child_fetch_inferior_registers)
13434 (child_store_inferior_registers): Change prototype to take a
13435 regcache. Adjust.
13436 (win32_wait): Adjust.
13437 (win32_fetch_inferior_registers): Change prototype to take a
13438 regcache. Adjust.
13439 (win32_store_inferior_registers): Adjust.
13440 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13441 store_inferior_register>: Change prototype to take a regcache.
13442
60c3d7b0
DE
134432010-01-20 Doug Evans <dje@google.com>
13444
13445 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13446 #ifdef.
13447 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13448 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13449
dc146f7c
VP
134502010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13451
13452 * linux-low.c (linux_core_of_thread): New.
13453 (compare_ints, show_process, list_threads): New.
13454 (linux_qxfer_osdata): Report threads and cores.
13455 (linux_target_op): Register linux_core_of_thread.
13456 * remote-utils.c (prepare_resume_reply): Report the core.
13457 (buffer_xml_printf): Support %d specifier.
13458 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13459 New.
13460 (handle_query): Handle qXfer:threads. Announce availability
13461 thereof.
13462 * target.h (struct target_ops): New field core_of_thread.
13463
7803799a
UW
134642010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13465
13466 * Makefile.in (clean): Remove new generated files.
13467 (reg-s390.o, reg-s390.c): Remove rules.
13468 (reg-s390x.o, reg-s390x.c): Likewise.
13469 (s390-linux32.o, s390-linux32.c): Add rules.
13470 (s390-linux64.o, s390-linux64.c): Likewise.
13471 (s390x-linux64.o, s390x-linux64.c): Likewise.
13472 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13473 * linux-s390-low.c: Include <elf.h>.
13474 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13475 (init_registers_s390): Remove prototype.
13476 (init_registers_s390x): Likewise.
13477 (init_registers_s390_linux32): Add prototype.
13478 (init_registers_s390_linux64): Likewise.
13479 (init_registers_s390x_linux64): Likewise.
13480 (s390_num_regs_3264): New define.
13481 (s390_regmap_3264): New global variable.
13482 (s390_cannot_fetch_register): Remove obsolete check.
13483 (s390_cannot_store_register): Likewise.
13484 (s390_collect_ptrace_register): Handle upper/lower register halves.
13485 (s390_supply_ptrace_register): Likewise.
13486 (s390_fill_gregset): Update to register number changes.
13487 (s390_get_hwcap): New routine.
13488 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13489 Install appropriate regmap and register set.
13490
6e7ffa39
JB
134912010-01-01 Joel Brobecker <brobecker@adacore.com>
13492
13493 * server.c (gdbserver_version): Update copyright year to 2010.
13494 * gdbreplay.c (gdbreplay_version): Likewise.
13495
957f3f49
DE
134962009-12-28 Doug Evans <dje@google.com>
13497
13498 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13499 elf/external.h. Include <elf.h> instead but only if necessary.
13500
ca5c370d
PA
135012009-12-28 Pedro Alves <pedro@codesourcery.com>
13502
13503 * linux-low.c (linux_remove_process): Remove `detaching'
13504 parameter. Don't release/detach from thread_db here.
13505 (linux_kill): Release/detach from thread_db here, ...
13506 (linux_detach): ... and here, before actually detaching.
13507 (linux_wait_1): ... and here, when a process exits.
13508 * thread-db.c (any_thread_of): New.
13509 (thread_db_free): Switch the current inferior to a thread of the
13510 passed in process.
13511
4ee62156
DE
135122009-12-21 Doug Evans <dje@google.com>
13513
d90e6a88
DE
13514 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13515
c5f62d5f
DE
13516 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13517 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13518 warning ifndef __NR_tkill. Move setting of errno there too.
13519 Delete unnecessary resetting of errno after syscall.
13520 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13521
10e86dd7
DE
13522 * configure.ac: Check for dladdr.
13523 * config.in: Regenerate.
13524 * configure: Regenerate.
13525 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13526 (try_thread_db_load): Update.
13527
4ee62156
DE
13528 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13529
00f515da
DE
135302009-12-18 Doug Evans <dje@google.com>
13531
e9464885
DE
13532 * event-loop.c: Include unistd.h if it exists.
13533
07d4f67e
DE
13534 * linux-low.c (my_waitpid): Move definition away from being in
13535 between linux_tracefork_child/linux_test_for_tracefork.
13536
00f515da
DE
13537 * gdb_proc_service.h (psaddr_t): Fix type.
13538 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13539 signature to match glibc.
13540
1de1badb
DE
135412009-12-16 Doug Evans <dje@google.com>
13542
13543 * linux-low.c (linux_read_memory): Fix argument to read.
13544
aeeb81d1
PA
135452009-11-26 Pedro Alves <pedro@codesourcery.com>
13546
13547 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13548 events, don't leave current_inferior pointing at null.
13549
10357975
PA
135502009-11-26 Pedro Alves <pedro@codesourcery.com>
13551
13552 * win32-low.c (LOG): Delete.
13553 (OUTMSG): Output to stderr.
13554 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13555 on compile time LOG macro.
13556 (win32_wait): Fix debug output.
13557
cf6e3471
PA
135582009-11-26 Pedro Alves <pedro@codesourcery.com>
13559
13560 * win32-low.c (win32_add_one_solib): If the dll name is
13561 "ntdll.dll", prepend the system directory to the dll path.
13562
0c85e18e
MK
135632009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13564
13565 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13566
9ac544ce 135672009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13568 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13569
13570 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13571 * configure.ac: Check for __mcoldfire__ and set
13572 gdb_cv_m68k_is_coldfire.
13573 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13574 reg-cf.o and reg-m68k.o.
13575 * configure: Regenerated.
13576
fd7dd3e6
PA
135772009-11-16 Pedro Alves <pedro@codesourcery.com>
13578
13579 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13580 Pass it to thread_db_free.
13581 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13582 proper `detaching' argument to linux_remove_process.
13583 * linux-low.h (thread_db_free): Add `detaching' parameter.
13584 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13585 to thread_db_free.
13586 (thread_db_free): Add `detaching' parameter. Only
13587 call td_ta_clear_event if detaching from process.
13588
75aa492e
MK
135892009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13590
13591 * thread-db.c (thread_db_free): Fix typo.
13592
21e1bee4
PP
135932009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13594
13595 PR gdb/10838
13596 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13597
8838b45e
NS
135982009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13599
13600 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13601 with an i686 compiler.
13602 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13603 needed.
13604 * configure: Rebuilt.
13605
8a35fb51
SL
136062009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13607
13608 PR gdb/10783
13609
13610 * server.c (handle_search_memory_1): Correct read_addr initialization
13611 in loop for searching subsequent chunks.
13612
96f15937
PP
136132009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13614
13615 * configure.ac: New --with-libthread-db option.
13616 * thread-db.c: Allow direct dependence on libthread_db.
13617 (thread_db_free): Adjust.
13618 * config.in: Regenerate.
13619 * configure: Likewise.
889bf7c5 13620
5f7d1694
PP
136212009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13622
13623 PR gdb/10757
13624 * thread-db.c (attach_thread): New function.
13625 (maybe_attach_thread): Return success/failure.
13626 (find_new_threads_callback): Adjust.
889bf7c5
PA
13627 (thread_db_find_new_threads): Loop until no new threads.
13628
88e3b899
PA
136292009-10-13 Pedro Alves <pedro@codesourcery.com>
13630
13631 * proc-service.c (ps_lgetregs): Formatting.
13632
cdbfd419
PP
136332009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13634
13635 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13636 * configure.ac: Adjust.
13637 * linux-low.h (struct process_info_private): Move members to struct
13638 thread_db.
13639 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13640 * linux-low.c (linux_remove_process): Adjust.
13641 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13642 * server.c (handle_query): Move code ...
13643 (handle_monitor_command): ... here. New function.
13644 * target.h (struct target_ops): New member.
13645 * thread-db.c (struct thread_db): New.
13646 (libthread_db_search_path): New variable.
13647 (thread_db_create_event, thread_db_enable_reporting)
13648 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13649 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13650 (try_thread_db_load_1, dladdr_to_soname): New functions.
13651 (try_thread_db_load, thread_db_load_search): New functions.
13652 (thread_db_init): Search for libthread_db.
13653 (thread_db_free): New function.
13654 (thread_db_handle_monitor_command): Likewise.
13655 * config.in: Regenerate.
13656 * configure: Regenerate.
889bf7c5 13657
4168d2d6
UW
136582009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13659
13660 * spu-low.c (spu_kill): Wait for inferior to terminate.
13661 Call clear_inferiors.
13662 (spu_detach): Call clear_inferiors.
13663
81ecdfbb
RW
136642009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13665
13666 * aclocal.m4: Regenerate.
13667 * config.in: Likewise.
13668 * configure: Likewise.
13669
0b9ff2c0
UW
136702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13671
13672 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13673 (parse_spufs_run): New function.
13674 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13675 (ppc_breakpoint_at): Handle SPU breakpoints.
13676
efcbbd14
UW
136772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13678
13679 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13680 (SPUFS_MAGIC): Define.
13681 (spu_enumerate_spu_ids): New function.
13682 (linux_qxfer_spu): New function.
13683 (linux_target_ops): Install linux_qxfer_spu.
13684
f4d9bade
UW
136852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13686
13687 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13688 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13689 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13690 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13691 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13692 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13693 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13694 (init_registers_powerpc_cell32l): Add prototype.
13695 (init_registers_powerpc_cell64l): Likewise.
13696 (ppc_arch_setup): Detect Cell/B.E. architecture.
13697
96e946ca
RW
136982009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13699
13700 * Makefile.in (datarootdir): New variable.
13701
58d6951d
DJ
137022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13703
13704 * linux-low.c (linux_write_memory): Update debugging output.
13705 * Makefile.in (clean): Add new descriptions.
13706 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13707 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13708 * configure.srv: Add new files for arm*-*-linux*.
13709 * linux-arm-low.c: Add new declarations.
13710 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13711 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13712 (HWCAP_VFPv3D16): New.
13713 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13714 instead of __IWMMXT__.
13715 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13716 (arm_arch_setup): New.
13717 (target_regsets): Remove #ifdef. Add VFP regset.
13718 (the_low_target): Use arm_arch_setup.
13719
12b42a12
DJ
137202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13721
13722 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13723 the main thread again.
13724
ac8c974e
AR
137252009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13726
13727 Adding Neutrino gdbserver.
13728 * configure: Regenerated.
13729 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13730 * configure.srv (i[34567]86-*-nto*): New target.
13731 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13732 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13733 (nto_comctrl) [__QNX__]: New function.
13734 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13735
4424e0c3 137362009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13737
13738 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13739 srv_tgtobj.
13740
912cf4ba
PA
137412009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13742 Pedro Alves <pedro@codesourcery.com>
13743
13744 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13745 don't support CONTEXT_EXTENDED_REGISTERS.
13746 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13747 (the_low_target): Install them.
13748 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13749 failing with ERROR_PIPE_NOT_CONNECTED.
13750
aa5ca48f
DE
137512009-06-30 Doug Evans <dje@google.com>
13752 Pierre Muller <muller@ics.u-strasbg.fr>
13753
13754 Add h/w watchpoint support to x86-linux, win32-i386.
13755 * Makefile.in (SFILES): Add i386-low.c
13756 (i386_low_h): Define.
13757 (i386-low.o): Add dependencies.
13758 (linux-x86-low.o): Add i386-low.h dependency.
13759 (win32-i386-low.o): Ditto.
13760 * i386-low.c: New file.
13761 * i386-low.h: New file.
13762 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13763 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13764 * linux-low.c (linux_add_process): Initialize arch_private.
13765 (linux_remove_process): Free arch_private.
13766 (add_lwp): Initialize arch_private.
13767 (delete_lwp): Free arch_private.
13768 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13769 provided.
13770 * linux-low.h (process_info_private): New member arch_private.
13771 (lwp_info): New member arch_private.
13772 (linux_target_ops): New members new_process, new_thread,
13773 prepare_to_resume.
13774 (ptid_of): New macro.
13775 * linux-x86-low.c: Include stddef.h, i386-low.h.
13776 (arch_process_info): New struct.
13777 (arch_lwp_info): New struct.
13778 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13779 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13780 (i386_dr_low_get_status): New function.
13781 (x86_insert_point, x86_remove_point): New functions.
13782 (x86_stopped_by_watchpoint): New function.
13783 (x86_stopped_data_address): New function.
13784 (x86_linux_new_process, x86_linux_new_thread): New functions.
13785 (x86_linux_prepare_to_resume): New function.
13786 (the_low_target): Add entries for insert_point, remove_point,
13787 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13788 prepare_to_resume.
13789 * server.c (debug_hw_points): New global.
13790 (monitor_show_help): Document set debug-hw-points.
13791 (handle_query): Process "set debug-hw-points".
13792 * server.h (debug_hw_points): Declare.
13793 (paddress): Declare.
13794 * utils.c (NUMCELLS, CELLSIZE): New macros.
13795 (get_sell, xsnprintf, paddress): New functions.
13796 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13797 remove_point, stopped_by_watchpoint, stopped_data_address.
13798 * win32-i386-low.c: Include i386-low.h.
13799 (debug_reg_state): Replaces dr.
13800 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13801 (i386_dr_low_get_status): New function.
13802 (i386_insert_point, i386_remove_point): New functions.
13803 (i386_stopped_by_watchpoint): New function.
13804 (i386_stopped_data_address): New function.
13805 (i386_initial_stuff): Update.
13806 (get_thread_context,set_thread_context,i386_thread_added): Update.
13807 (the_low_target): Add entries for insert_point,
13808 remove_point, stopped_by_watchpoint, stopped_data_address.
13809 * win32-low.c (win32_insert_watchpoint): New function.
13810 (win32_remove_watchpoint): New function.
13811 (win32_stopped_by_watchpoint): New function.
13812 (win32_stopped_data_address): New function.
13813 (win32_target_ops): Add entries for insert_watchpoint,
13814 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13815 * win32-low.h (win32_target_ops): New members insert_point,
13816 remove_point, stopped_by_watchpoint, stopped_data_address.
13817
d993e290
PA
138182009-06-25 Pedro Alves <pedro@codesourcery.com>
13819
13820 * server.c (process_serial_event): Re-return unsupported, not
13821 error, if the type isn't recognized. Re-allow supporting only
13822 insert or remove packets. Also call require_running for
13823 breakpoints. Add missing break statement to default case. Tidy.
13824 * target.h (struct target_ops): Rename insert_watchpoint to
13825 insert_point, and remove_watchpoint to remove_point.
13826
13827 * linux-low.h (struct linux_target_ops): Likewise.
13828 * linux-low.c (linux_insert_watchpoint): Rename to ...
13829 (linux_insert_point): ... this. Adjust.
13830 (linux_remove_watchpoint): Rename to ...
13831 (linux_remove_point): ... this. Adjust.
13832 (linux_target_ops): Adjust.
13833 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13834 (cris_insert_point): ... this.
13835 (cris_remove_watchpoint): Rename to ...
13836 (cris_remove_point): ... this.
13837 (the_low_target): Adjust.
13838
0f54c268
PM
138392009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13840
13841 * server.c (handle_v_kill): Pass signal_pid to
13842 kill_inferior if multi_process is zero.
13843
c6314022
AR
138442009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13845
13846 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13847 * target.h (target_ops): Comment for *_watchpoint to make it clear
13848 the functions can get types '0' and '1'.
13849
4463ce24
AR
138502009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13851
13852 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13853 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13854 * regcache.c (get_regcache): Likewise.
13855 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13856 * win32-low.c (child_fetch_inferior_registers): Remove check for
13857 regno 0.
13858
cf8fd78b
PA
138592009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13860 Pedro Alves <pedro@codesourcery.com>
13861
13862 * target.h (struct target_ops) <supports_multi_process>: New
13863 callback.
13864 (target_supports_multi_process): New.
13865 * server.c (handle_query): Even if GDB reports support, only
13866 enable multi-process if the target also supports it. Report
13867 multi-process support only if the target backend supports it.
13868 * linux-low.c (linux_supports_multi_process): New function.
13869 (linux_target_ops): Install it as target_supports_multi_process
13870 callback.
13871
47c0c975
DE
138722009-05-24 Doug Evans <dje@google.com>
13873
e09875d4
DE
13874 Global renaming of find_thread_pid to find_thread_ptid.
13875 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13876 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13877 All callers updated.
13878
e27d73f6
DE
13879 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13880 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13881 directly.
13882
47c0c975
DE
13883 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13884 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13885 (linux_resume_one_lwp): Ditto.
13886
2acc282a
DE
138872009-05-23 Doug Evans <dje@google.com>
13888
13889 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13890 from struct inferior_list_entry * to struct lwp_info *.
13891 All callers updated.
13892
9f1036c1
DE
138932009-05-13 Doug Evans <dje@google.com>
13894
13895 * linux-x86-low.c: Don't include assert.h.
13896 (x86_siginfo_fixup): Use fatal, not assert.
13897 (x86_arch_setup): Fix comment.
13898
d0722149
DE
138992009-05-12 Doug Evans <dje@google.com>
13900
13901 Biarch support for i386/amd64 gdbserver.
13902 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13903 Add linux-x86-low.c.
13904 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13905 (linux-x86-low.o): Add.
13906 * linux-x86-64-low.c: Delete.
13907 * linux-i386-low.c: Delete.
13908 * linux-x86-low.c: New file.
13909 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13910 linux-x86-low.o.
13911 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13912 linux-x86-low.o.
13913 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13914 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13915 (linux_child_pid_to_exec_file): New function.
13916 (elf_64_header_p, elf_64_file_p): New functions.
13917 (siginfo_fixup): New function.
13918 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13919 give target a chance to convert layout.
13920 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13921 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13922
fdeb2a12
DE
139232009-05-07 Doug Evans <dje@google.com>
13924
13925 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13926 (regsets_store_inferior_registers): Ditto.
13927
a6dbe5df
PA
139282009-05-06 Pedro Alves <pedro@codesourcery.com>
13929
13930 PR server/10048
13931
13932 * linux-low.c (must_set_ptrace_flags): Delete.
13933 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13934 of the global.
13935 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13936 `lwp->must_set_ptrace_flags' instead.
ba42693b 13937 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13938 (linux_wait_1): ... not here.
13939
5091eb23
DE
139402009-04-30 Doug Evans <dje@google.com>
13941
9f767825
DE
13942 * inferiors.c (started_inferior_callback): New function.
13943 (attached_inferior_callback): New function.
13944 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13945 * server.c (print_started_pid, print_attached_pid): New functions.
13946 (detach_or_kill_for_exit): New function.
13947 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13948 * server.h (have_started_inferiors_p): Declare.
13949 (have_attached_inferiors_p): Declare.
13950
5091eb23
DE
13951 * inferiors.c (remove_process): Fix memory leak, free process.
13952 * linux-low.c (linux_remove_process): New function.
13953 (linux_kill): Call it instead of remove_process.
13954 (linux_detach, linux_wait_1): Ditto.
13955
155c8968
PA
139562009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13957
13958 * configure.srv: Add x86 Windows CE target.
13959
7fe519cb
UW
139602009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13961
13962 * inferiors.c (get_thread_process): Make global.
13963 * server.h (get_thread_process): Add prototype.
13964 * thread-db.c (find_one_thread): Use get_thread_process
13965 instead of current_process.
13966 (thread_db_get_tls_address): Do not crash if called when
13967 thread layer is not yet initialized.
13968
5472f405
UW
139692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13970
13971 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13972 * spu-low.c (current_tid): Rename to ...
13973 (current_ptid): ... this.
13974 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13975 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13976 ptid_get_lwp (current_ptid) instead of current_tid.
13977 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13978 instead of current_tid. Use find_process_pid to verify pid
13979 argument is valid. Pass proper argument to remove_process.
13980 (spu_thread_alive): Compare current_ptid instead of current_tid.
13981 (spu_resume): Likewise.
13982
55ac2b99
PA
139832009-04-02 Pedro Alves <pedro@codesourcery.com>
13984
13985 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13986 variable.
13987
95954743
PA
139882009-04-01 Pedro Alves <pedro@codesourcery.com>
13989
13990 Implement the multiprocess extensions, and add linux multiprocess
13991 support.
13992
13993 * server.h (ULONGEST): Declare.
13994 (struct ptid, ptid_t): New.
13995 (minus_one_ptid, null_ptid): Declare.
13996 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13997 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13998 (struct inferior_list_entry): Change `id' type from unsigned from
13999 to ptid_t.
14000 (struct sym_cache, struct breakpoint, struct
14001 process_info_private): Forward declare.
14002 (struct process_info): Declare.
14003 (current_process): Declare.
14004 (all_processes): Declare.
14005 (initialize_inferiors): Declare.
14006 (add_thread): Adjust to use ptid_t.
14007 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14008 (add_process, remove_process, find_thread_pid): Declare.
14009 (find_inferior_id): Adjust to use ptid_t.
14010 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14011 (multi_process): Declare.
14012 (push_event): Adjust to use ptid_t.
14013 (read_ptid, write_ptid): Declare.
14014 (prepare_resume_reply): Adjust to use ptid_t.
14015 (clear_symbol_cache): Declare.
14016 * inferiors.c (all_processes): New.
14017 (null_ptid, minus_one_ptid): New.
14018 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14019 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14020 (add_thread): Change unsigned long to ptid. Remove gdb_id
14021 parameter. Adjust.
14022 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14023 (gdb_id_to_thread): Rename to ...
14024 (find_thread_pid): ... this. Change unsigned long to ptid.
14025 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14026 (loaded_dll, pull_pid_from_list): Adjust.
14027 (add_process, remove_process, find_process_pid)
14028 (get_thread_process, current_process, initialize_inferiors): New.
14029 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14030 (struct target_waitstatus) <related_pid>: Ditto.
14031 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14032 return type to int.
14033 (struct target_ops) <join>: Add `pid' argument.
14034 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14035 (struct target_ops) <wait>: Add `ptid' field. Change return type
14036 to ptid.
14037 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14038 (mywait): Add `ptid' argument. Change return type to ptid_t.
14039 (target_pid_to_str): Declare.
14040 * target.c (set_desired_inferior): Adjust to use ptids.
14041 (mywait): Add new `ptid' argument. Adjust.
14042 (target_pid_to_str): New.
14043 * mem-break.h (free_all_breakpoints): Declare.
14044 * mem-break.c (breakpoints): Delelete.
14045 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14046 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14047 to use per-process breakpoint list.
14048 (free_all_breakpoints): New.
14049 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14050 (symbol_cache, all_symbols_looked_up): Delete.
14051 (hexchars): New.
14052 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14053 read_ptid): New.
14054 (prepare_resume_reply): Change ptid argument's type from unsigned
14055 long to ptid_t. Adjust. Implement W;process and X;process.
14056 (free_sym_cache, clear_symbol_cache): New.
14057 (look_up_one_symbol): Adjust to per-process symbol cache. *
14058 * server.c (cont_thread, general_thread, step_thread): Change type
14059 to ptid_t.
14060 (attached): Delete.
14061 (multi_process): New.
14062 (last_ptid): Change type to ptid_t.
14063 (struct vstop_notif) <ptid>: Change type to ptid_t.
14064 (queue_stop_reply, push_event): Change `ptid' argument's type to
14065 ptid_t.
14066 (discard_queued_stop_replies): Add `pid' argument.
14067 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14068 changes. Don't reference the `attached' global.
14069 (attach_inferior): Adjust to mywait interface changes.
14070 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14071 features. Handle and report "multiprocess+". Handle
14072 "qAttached:PID".
14073 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14074 changes.
14075 (handle_v_kill): New.
14076 (handle_v_stopped): Adjust to use target_pid_to_str.
14077 (handle_v_requests): Allow multiple attaches and runs when
14078 multiprocess extensions are in effect. Handle "vKill".
14079 (myresume): Adjust to use ptids.
14080 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14081 (handle_status): Adjust to discard_queued_stop_replies interface
14082 change.
14083 (first_thread_of, kill_inferior_callback)
14084 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14085 (main): Call initialize_inferiors. Adjust to use ptids, killing
14086 and detaching from all inferiors. Handle multiprocess packet
14087 variants.
14088 * linux-low.h: Include gdb_proc_service.h.
14089 (struct process_info_private): New.
14090 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14091 <lwpid_of>: Use ptid_get_lwp.
14092 (get_lwp_thread): Adjust.
14093 (struct lwp_info): Add `dead' member.
14094 (find_lwp_pid): Declare.
14095 * linux-low.c (thread_db_active): Delete.
14096 (new_inferior): Adjust comment.
14097 (inferior_pid): Delete.
14098 (linux_add_process): New.
14099 (handle_extended_wait): Adjust.
14100 (add_lwp): Change unsigned long to ptid.
14101 (linux_create_inferior): Add process to processes table. Adjust
14102 to use ptids. Don't set new_inferior here.
14103 (linux_attach_lwp): Rename to ...
14104 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14105 it. Adjust to use ptids.
14106 (linux_attach_lwp): New.
14107 (linux_attach): Add process to processes table. Don't set
14108 new_inferior here.
14109 (struct counter): New.
14110 (second_thread_of_pid_p, last_thread_of_process_p): New.
14111 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14112 multiple processes.
14113 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14114 processes. Remove process from process table.
14115 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14116 to multiple processes.
14117 (any_thread_of): New.
14118 (linux_detach): Add `pid' argument, and handle it. Remove process
14119 from processes table.
14120 (linux_join): Add `pid' argument. Handle it.
14121 (linux_thread_alive): Change unsighed long argument to ptid_t.
14122 Consider dead lwps as not being alive.
14123 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14124 threads we're not interested in.
14125 (same_lwp, find_lwp_pid): New.
14126 (linux_wait_for_lwp): Change `pid' argument's type from int to
14127 ptid_t. Adjust.
14128 (linux_wait_for_event): Rename to ...
14129 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14130 from int to ptid_t. Adjust.
14131 (linux_wait_for_event): New.
14132 (linux_wait_1): Add `ptid' argument. Change return type to
14133 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14134 that exit from the process table.
14135 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14136 Adjust.
14137 (mark_lwp_dead): New.
14138 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14139 stopping all threads, mark its main lwp as dead.
14140 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14141 ptids.
14142 (fetch_register, usr_store_inferior_registers)
14143 (regsets_fetch_inferior_registers)
14144 (regsets_store_inferior_registers, linux_read_memory)
14145 (linux_write_memory): Inline `inferior_pid'.
14146 (linux_look_up_symbols): Adjust to use per-process
14147 `thread_db_active'.
14148 (linux_request_interrupt): Adjust to use ptids.
14149 (linux_read_auxv): Inline `inferior_pid'.
14150 (initialize_low): Don't reference thread_db_active.
14151 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14152 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14153 (ps_getpid): Return the pid of the current inferior.
14154 * thread-db.c (proc_handle, thread_agent): Delete.
14155 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14156 per-process data.
14157 (find_one_thread): Change argument type to ptid_t. Adjust to
14158 per-process data.
14159 (maybe_attach_thread): Adjust to per-process data and ptids.
14160 (thread_db_find_new_threads): Ditto.
14161 (thread_db_init): Ditto.
14162 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14163 processes table. Adjust to use ptids.
14164 (spu_kill, spu_detach): Adjust interface. Remove process from
14165 processes table.
14166 (spu_join, spu_thread_alive): Adjust interface.
14167 (spu_wait): Adjust interface. Remove process from processes
14168 table. Adjust to use ptids.
14169 * win32-low.c (current_inferior_tid): Delete.
14170 (current_inferior_ptid): New.
14171 (debug_event_ptid): New.
14172 (thread_rec): Take a ptid. Adjust.
14173 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14174 (child_delete_thread): Ditto.
14175 (do_initial_child_stuff): Add `attached' argument. Add process to
14176 processes table.
14177 (child_fetch_inferior_registers, child_store_inferior_registers):
14178 Adjust.
14179 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14180 (win32_attach): Pass 1 to do_initial_child_stuff.
14181 (win32_kill): Adjust interface. Remove process from processes
14182 table.
14183 (win32_detach): Ditto.
14184 (win32_join): Adjust interface.
14185 (win32_thread_alive): Take a ptid.
14186 (win32_resume): Adjust to use ptids.
14187 (get_child_debug_event): Ditto.
14188 (win32_wait): Adjust interface. Remove exiting process from
14189 processes table.
14190
bd99dc85
PA
141912009-04-01 Pedro Alves <pedro@codesourcery.com>
14192
14193 Non-stop mode support.
14194
14195 * server.h (non_stop): Declare.
14196 (gdb_client_data, handler_func): Declare.
14197 (delete_file_handler, add_file_handler, start_event_loop):
14198 Declare.
14199 (handle_serial_event, handle_target_event, push_event)
14200 (putpkt_notif): Declare.
14201 * target.h (enum resume_kind): New.
14202 (struct thread_resume): Replace `step' field by `kind' field.
14203 (TARGET_WNOHANG): Define.
14204 (struct target_ops) <wait>: Add `options' argument.
14205 <supports_non_stop, async, start_non_stop>: New fields.
14206 (target_supports_non_stop, target_async): New.
14207 (start_non_stop): Declare.
14208 (mywait): Add `options' argument.
14209 * target.c (mywait): Add `options' argument. Print child exit
14210 notifications here.
14211 (start_non_stop): New.
14212 * server.c (non_stop, own_buf, mem_buf): New globals.
14213 (struct vstop_notif): New.
14214 (notif_queue): New global.
14215 (queue_stop_reply, push_event, discard_queued_stop_replies)
14216 (send_next_stop_reply): New.
14217 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14218 interface changes.
14219 (attach_inferior): In non-stop mode, don't wait for the target
14220 here.
14221 (handle_general_set): Handle QNonStop.
14222 (handle_query): When handling qC, return the current general
14223 thread, instead of the first thread of the list.
14224 (handle_query): If the backend supports non-stop mode, include
14225 QNonStop+ in the qSupported query response.
14226 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14227 and non-stop mode.
14228 (handle_v_attach, handle_v_run): Handle non-stop mode.
14229 (handle_v_stopped): New.
14230 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14231 (myresume): Adjust to use resume_kind. Handle non-stop.
14232 (queue_stop_reply_callback): New.
14233 (handle_status): Handle non-stop mode.
14234 (main): Clear non_stop flag on reconnection. Use the event-loop.
14235 Refactor serial protocol handling from here ...
14236 (process_serial_event): ... to this new function. When GDB
14237 selects any thread, select one here. In non-stop mode, wait until
14238 GDB acks all pending events before exiting.
14239 (handle_serial_event, handle_target_event): New.
14240 * remote-utils.c (remote_open): Install remote_desc in the event
14241 loop.
14242 (remote_close): Remove remote_desc from the event loop.
14243 (putpkt_binary): Rename to...
14244 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14245 (putpkt_binary): New as wrapper around putpkt_binary_1.
14246 (putpkt_notif): New.
14247 (prepare_resume_reply): In non-stop mode, don't change the
14248 general_thread.
14249 * event-loop.c: New.
14250 * Makefile.in (OBJ): Add event-loop.o.
14251 (event-loop.o): New rule.
14252
14253 * linux-low.h (pid_of): Moved here.
14254 (lwpid_of): New.
14255 (get_lwp_thread): Use lwpid_of.
14256 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14257 * linux-low.c (pid_of): Delete.
14258 (inferior_pid): Use lwpid_of.
14259 (linux_event_pipe): New.
14260 (target_is_async_p): New.
14261 (delete_lwp): New.
14262 (handle_extended_wait): Use lwpid_of.
14263 (add_lwp): Don't set lwpid field.
14264 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14265 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14266 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14267 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14268 first. Adjust to linux_wait_for_event interface changes. Use
14269 lwpid_of.
14270 (linux_detach): Don't delete the main lwp here.
14271 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14272 (status_pending_p): Don't consider explicitly suspended lwps.
14273 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14274 pointer. Add OPTIONS argument. Change return type to int. Use
14275 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14276 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14277 pointer. Add status pointer argument. Return a pid instead of a
14278 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14279 changes. In non-stop mode, don't switch to a random thread.
14280 (linux_wait): Rename to...
14281 (linux_wait_1): ... this. Add target_options argument, and handle
14282 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14283 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14284 clean exit and signal exit code. Don't stop all threads in
14285 non-stop mode. In all-stop mode, only stop all threads when
14286 reporting a stop to GDB. Handle explicit thread stop requests.
14287 (async_file_flush, async_file_mark): New.
14288 (linux_wait): New.
14289 (send_sigstop): Use lwpid_of.
14290 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14291 interface changes. In non-stop mode, don't switch to a random
14292 thread.
14293 (linux_resume_one_lwp): Use lwpid_of.
14294 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14295 (linux_resume_one_thread): ... this. Handle resume_stop. In
14296 non-stop mode, don't look for pending flag in all threads.
14297 (resume_status_pending_p): Don't consider explicitly suspended
14298 threads.
14299 (my_waitpid): Reimplement. Emulate __WALL.
14300 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14301 Use lwpid_of.
14302 (sigchld_handler, linux_supports_non_stop, linux_async)
14303 (linux_start_non_stop): New.
14304 (linux_target_ops): Register linux_supports_non_stop, linux_async
14305 and linux_start_non_stop.
14306 (initialize_low): Install SIGCHLD handler.
14307 * thread-db.c (thread_db_create_event, find_one_thread)
14308 (thread_db_get_tls_address): Use lwpid_of.
14309 * win32-low.c (win32_detach): Adjust to use resume_kind.
14310 (win32_wait): Add `options' argument.
14311 * spu-low.c (spu_resume): Adjust to use resume_kind.
14312 (spu_wait): Add `options' argument.
14313
5b1c542e
PA
143142009-04-01 Pedro Alves <pedro@codesourcery.com>
14315
14316 Decouple target code from remote protocol.
14317
14318 * target.h (enum target_waitkind): New.
14319 (struct target_waitstatus): New.
14320 (struct target_ops) <wait>: Return an unsigned long. Take a
14321 target_waitstatus pointer instead of a char pointer.
14322 (mywait): Likewise.
14323 * target.c (mywait): Change prototype to return an unsigned long.
14324 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14325 * server.h (thread_from_wait, old_thread_from_wait): Delete
14326 declarations.
14327 (prepare_resume_reply): Change prototype to take a
14328 target_waitstatus.
14329 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14330 (last_status, last_ptid): New.
14331 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14332 pid instead of a signal.
14333 (attach_inferior): Remove "status" and "signal" parameters.
14334 Adjust.
14335 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14336 not as an address.
14337 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14338 (handle_v_requests, myresume): Remove "status" and "signal"
14339 parameters. Adjust.
14340 (handle_status): New.
14341 (main): Delete local `status'. Adjust.
14342 * remote-utils.c: Include target.h.
14343 (prepare_resume_reply): Change prototype to take a
14344 target_waitstatus. Adjust.
14345
14346 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14347 interface.
14348 * spu-low.c (spu_wait): Adjust.
14349 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14350 Delete.
14351 (win32_wait): Adjust.
14352
2bd7c093
PA
143532009-04-01 Pedro Alves <pedro@codesourcery.com>
14354
14355 * target.h (struct thread_resume): Delete leave_stopped member.
14356 (struct target_ops): Add a `n' argument to the `resume' callback.
14357 * server.c (start_inferior): Adjust.
14358 (handle_v_cont, myresume): Adjust.
14359 * linux-low.c (check_removed_breakpoint): Adjust to resume
14360 interface change, and to removed leave_stopped field.
14361 (resume_ptr): Delete.
14362 (struct thread_resume_array): New.
14363 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14364 resume interface change.
14365 (linux_continue_one_thread, linux_queue_one_thread)
14366 (resume_status_pending_p): Check if the resume field is NULL
14367 instead of checking the leave_stopped member.
14368 (linux_resume): Adjust to the target resume interface change.
14369 * spu-low.c (spu_resume): Adjust to the target resume interface
14370 change.
14371 * win32-low.c (win32_detach, win32_resume): Ditto.
14372
c35fafde
PA
143732009-04-01 Pedro Alves <pedro@codesourcery.com>
14374
14375 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14376 flag.
14377 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14378 pending.
14379 (linux_continue_one_thread): Only preserve the stepping flag if
14380 there's a pending breakpoint.
14381
0a59d50b
PA
143822009-03-31 Pedro Alves <pedro@codesourcery.com>
14383
14384 * server.c (main): After the inferior having exited, call
14385 remote_close before exiting gdbserver.
14386
f04c6d38
TJB
143872009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14388
14389 Fix size of FPSCR in Power 7 processors.
14390 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14391 (PPC_FEATURE_HAS_DFP): New #define.
14392 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14393 size of the FPSCR.
14394
78e5cee6
PA
143952009-03-23 Pedro Alves <pedro@codesourcery.com>
14396
14397 * server.c (handle_query) Whitespace and formatting.
14398
1b3f6016
PA
143992009-03-22 Pedro Alves <pedro@codesourcery.com>
14400
14401 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14402 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14403 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14404 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14405 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14406 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14407 Makefile.in, configure.ac: Fix whitespace throughout.
14408 * configure: Regenerate.
14409
a07b2135
PA
144102009-03-22 Pedro Alves <pedro@codesourcery.com>
14411
14412 * inferiors.c (find_inferior): Make it safe for the callback
14413 function to delete the currently iterated inferior.
14414
67cc2626
PA
144152009-03-22 Pedro Alves <pedro@codesourcery.com>
14416
14417 * Makefile.in (linuw_low_h): Move higher.
14418 (thread-db.o): Depend on $(linux_low_h).
14419
54a0b537
PA
144202009-03-17 Pedro Alves <pedro@codesourcery.com>
14421
14422 Rename "process" to "lwp" throughout.
14423
14424 * linux-low.c (all_processes): Rename to...
14425 (all_lwps): ... this.
14426 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14427 (add_process): Rename to ...
14428 (add_lwp): ... this. Adjust.
14429 (linux_create_inferior): Adjust.
14430 (linux_attach_lwp): Adjust.
14431 (linux_attach): Adjust.
14432 (linux_kill_one_process): Rename to ...
14433 (linux_kill_one_lwp): ... this. Adjust.
14434 (linux_kill): Adjust.
14435 (linux_detach_one_process): Rename to ...
14436 (linux_detach_one_lwp): ... this. Adjust.
14437 (linux_detach): Adjust.
14438 (check_removed_breakpoint): Adjust.
14439 (status_pending_p): Adjust.
14440 (linux_wait_for_process): Rename to ...
14441 (linux_wait_for_lwp): ... this. Adjust.
14442 (linux_wait_for_event): Adjust.
14443 (send_sigstop): Adjust.
14444 (wait_for_sigstop): Adjust.
14445 (stop_all_processes): Rename to ...
14446 (stop_all_lwps): ... this.
14447 (linux_resume_one_process): Rename to ...
14448 (linux_resume_one_lwp): ... this. Adjust.
14449 (linux_set_resume_request, linux_continue_one_thread)
14450 (linux_queue_one_thread, resume_status_pending_p)
14451 (usr_store_inferior_registers, regsets_store_inferior_registers)
14452 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14453 Adjust.
14454 * linux-low.h (get_process): Rename to ...
14455 (get_lwp): ... this. Adjust.
14456 (get_thread_process): Rename to ...
14457 (get_thread_lwp): ... this. Adjust.
14458 (get_process_thread): Rename to ...
14459 (get_lwp_thread): ... this. Adjust.
14460 (struct process_info): Rename to ...
14461 (struct lwp_info): ... this.
14462 (all_processes): Rename to ...
14463 (all_lwps): ... this.
14464 * proc-service.c (ps_lgetregs): Adjust.
14465 * thread-db.c (thread_db_create_event, find_one_thread)
14466 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14467
0b16c5cf
PA
144682009-03-14 Pedro Alves <pedro@codesourcery.com>
14469
14470 * server.c (handle_query): Handle "qAttached".
14471
32de4b9d
NS
144722009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14473
14474 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14475 GPLv3, update license URL.
14476
2aecd87f
DE
144772009-03-01 Doug Evans <dje@google.com>
14478
93efd302 14479 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14480 (server_h): Add gdb_signals.h.
14481 (signals.o): Update.
14482 * server.h (target_signal_from_host,target_signal_to_host_p)
14483 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14484
86b1f9c5
PM
144852009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14486
14487 * remote-utils.c (getpkt): Also generate remote-debug
14488 information if noack_mode is set.
14489
4aa995e1
PA
144902009-02-06 Pedro Alves <pedro@codesourcery.com>
14491
14492 * server.c (handle_query): Report qXfer:siginfo:read and
14493 qXfer:siginfo:write as supported and handle them.
14494 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14495 * linux-low.c (linux_xfer_siginfo): New.
14496 (linux_target_ops): Set it.
14497
62709adf
PA
144982009-01-26 Pedro Alves <pedro@codesourcery.com>
14499
14500 * server.c (gdbserver_usage): Mention --remote-debug.
14501 (main): Accept '--remote-debug' switch.
14502
aef93bd7
DE
145032009-01-18 Doug Evans <dje@google.com>
14504
14505 * regcache.c (new_register_cache): No need to check result of xcalloc.
14506 * server.c (handle_search_memory): Back out calls to xmalloc,
14507 result is checked and error is returned to user upon failure.
14508 (handle_query): Ditto. Add more checks for result of malloc.
14509 (handle_v_cont): Check result of malloc, report error back to
14510 user upon failure.
14511 (handle_v_run): Ditto. Call freeargv.
14512 * server.h (freeargv): Declare.
14513 * utils.c (freeargv): New fn.
14514
54363045
DE
145152009-01-15 Doug Evans <dje@google.com>
14516
f626972c
DE
14517 * gdbreplay.c (perror_with_name): Make arg const char *.
14518 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14519 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14520 * utils.c (perror_with_name): Make arg const char *.
54363045 14521
18aae699
PA
145222009-01-14 Pedro Alves <pedro@codesourcery.com>
14523
14524 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14525 when handling a EXIT_PROCESS_DEBUG_EVENT.
14526
ff703abe
JB
145272009-01-06 Joel Brobecker <brobecker@adacore.com>
14528
14529 * gdbreplay.c (gdbreplay_version): Update copyright year.
14530 * server.c (gdbserver_version): Likewise.
14531
f21cc1a2 145322009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14533
14534 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14535 (handle_extended_wait): Improve comment.
0e21c1ec 14536
bca929d3
DE
145372008-12-13 Doug Evans <dje@google.com>
14538
14539 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14540 * server.h (ATTR_MALLOC): New macro.
14541 (xmalloc,xcalloc,xstrdup): Declare.
14542 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14543 * inferiors.c: Ditto.
14544 * linux-low.c: Ditto.
14545 * mem-break.c: Ditto.
14546 * regcache.c: Ditto.
14547 * remote-utils.c: Ditto.
14548 * server.c: Ditto.
14549 * target.c: Ditto.
14550 * win32-low.c: Ditto.
14551
97438e3f
DE
145522008-12-12 Doug Evans <dje@google.com>
14553
896c7fbb
DE
14554 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14555 in debugging printf.
14556
97438e3f
DE
14557 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14558
e3b886f8
DE
145592008-12-09 Doug Evans <dje@google.com>
14560
14561 * linux-low.h (struct process_info): Delete member tid, unused.
14562 * thread-db.c (find_one_thread): Update.
14563 (maybe_attach_thread): Update.
14564
07e059b5
VP
145652008-12-02 Pedro Alves <pedro@codesourcery.com>
14566
889bf7c5
PA
14567 * target.h (struct target_ops): Add qxfer_osdata member.
14568 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14569 and dirent.h.
14570 (linux_qxfer_osdata): New functions.
14571 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14572 callback.
14573 * server.c (handle_query): Handle "qXfer:osdata:read:".
14574 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14575 (buffer_xml_printf): New functions.
14576 * server.h (struct buffer): New.
14577 (buffer_grow_str, buffer_grow_str0): New macros.
14578 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14579 (buffer_xml_printf): Declare.
07e059b5 14580
4cab47ab
DE
145812008-11-24 Doug Evans <dje@google.com>
14582
14583 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14584
f142445f
DJ
145852008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * server.c (handle_v_run): Always use the supplied argument list.
14588
d0107bb6 145892008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14590
d0107bb6
BW
14591 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14592 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14593
2c4ad781
TJB
145942008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14595
14596 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14597 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14598 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14599 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14600 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14601 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14602 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14603 XML target descriptions.
14604 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14605 when inferior is running on an ISA 2.05 or later processor. Add
14606 special case to return offset for full 64-bit slot of FPSCR when
14607 in 32-bits.
14608
dfb64f85
DJ
146092008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14610
14611 * Makefile.in (SFILES, clean): Added sparc64 files.
14612 (reg-sparc64.o, reg-sparc64.c): New.
14613 * configure.srv (sparc*-*-linux*): New configuration.
14614 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14615 syscall arguments for SPARC.
14616 (regsets_store_inferior_registers): Likewise.
14617 * linux-sparc-low.c: New file.
14618
66b6e1dd
DE
146192008-10-21 Doug Evans <dje@google.com>
14620
14621 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14622 (READLINE_DIR,READLINE_DEP): Delete.
14623 (INTERNAL_CFLAGS): Update.
14624 (LINTFLAGS): Update.
14625
9b710a42
PA
146262008-10-10 Pedro Alves <pedro@codesourcery.com>
14627
14628 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14629 whole argv from the last run, not just argv[0].
14630
5822d809
PA
146312008-09-08 Pedro Alves <pedro@codesourcery.com>
14632
14633 * regcache.c (new_register_cache): Return NULL if the register
14634 cache size isn't known yet.
14635 (free_register_cache): Avoid dereferencing a NULL regcache.
14636
74aac56f
DJ
146372008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * configure.srv: Merge MIPS and MIPS64.
14640
400b20f5
MR
146412008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14642
14643 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14644
677c5bb1
LM
146452008-08-18 Luis Machado <luisgpm@br.ibm.com>
14646
14647 * Makefile.in: Add required vsx dependencies.
14648
14649 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14650 Declare init_registers_powerpc_vsx32l.
14651 Declare init_registers_powerpc_vsx64l.
14652 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14653 (ppc_arch_setup): Check for VSX in hwcap.
14654 (ppc_fill_vsxregset): New function.
14655 (ppc_store_vsxregset): New function.
14656 Add new VSX entry in regset_info target_regsets.
14657
14658 * configure.srv: Add new VSX dependencies.
14659
a6f3e723
SL
146602008-08-12 Pedro Alves <pedro@codesourcery.com>
14661
14662 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14663 (remote_open): Set or clear transport_is_reliable.
14664 (putpkt_binary): Don't expect acks in noack mode.
14665 (getpkt): Don't send ack/nac in noack mode.
14666 * server.c (handle_general_set): Handle QStartNoAckMode.
14667 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14668 qSupported.
14669 (main): Reset noack_mode on every connection.
14670 * server.h (noack_mode): Declare.
14671
a417dc56
RW
146722008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14673
14674 * Makefile.in (GDBREPLAY_OBS): New variable.
14675 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14676
3221518c
UW
146772008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14678 Daniel Jacobowitz <dan@codesourcery.com>
14679
14680 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14681 (usr_store_inferior_registers): Likewise.
14682 (regsets_store_inferior_registers): Likewise.
14683
ec56be1b
PA
146842008-07-31 Rolf Jansen <rj@surtec.com>
14685 Pedro Alves <pedro@codesourcery.com>
14686
14687 * configure.ac: Check for memmem declaration.
14688 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14689 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14690 (disable_packet_qfThreadInfo): Unconditionally compile.
14691 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14692 * configure, config.in: Regenerate.
14693
2fe5e3ff
DE
146942008-07-28 Doug Kwan <dougkwan@google.com>
14695
14696 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14697 (linux_write_memory): Remove declaration of errno.
14698
836acd6d
UW
146992008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14700
14701 * linux-low.c (handle_extended_wait): Do not use "status"
14702 variable uninitialized.
14703
aeba519e
PA
147042008-07-07 Pedro Alves <pedro@codesourcery.com>
14705
14706 * server.c (handle_v_attach): Inhibit reporting dll changes.
14707
db42f210
PA
147082008-06-27 Pedro Alves <pedro@codesourcery.com>
14709
14710 * remote-utils.c (prepare_resume_reply): If requested, don't
14711 output "thread:TID" in the T stop reply.
14712
14713 * server.c (disable_packet_vCont, disable_packet_Tthread)
14714 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14715 (handle_query): If requested, disable support for qC, qfThreadInfo
14716 and qsThreadInfo.
14717 (handle_v_requests): If requested, disable support for vCont.
14718 (gdbserver_show_disableable): New.
14719 (main): Handle --disable-packet and --disable-packet=LIST.
14720
14721 * server.h (disable_packet_vCont, disable_packet_Tthread)
14722 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14723
8e4c5421
CD
147242008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14725
14726 * server.c (gdbserver_usage): Mention --version.
14727
6e23a804
DJ
147282008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * Makefile.in (gdbreplay.o): New rule.
14731
90aa6a40
JM
147322008-06-06 Joseph Myers <joseph@codesourcery.com>
14733
14734 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14735 message, not gdbserver.
14736
c16158bc 147372008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14738 Nathan Sidwell <nathan@codesourcery.com>
14739 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14740
14741 * acinclude.m4: Include ../../config/acx.m4.
14742 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14743 * configure, config.in: Regenerate.
14744 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14745 * server.c (gdbserver_version): Print PKGVERSION.
14746 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14747 (main): Adjust gdbserver_usage calls.
14748 * gdbreplay.c (version, host_name): Add declarations.
14749 (gdbreplay_version, gdbreplay_usage): New.
14750 (main): Accept --version and --help options.
14751
aeb75bf5
DJ
147522008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14755 (arm_breakpoint_at): Handle Thumb.
14756 (the_low_target): Add comment.
14757
76b233dd
UW
147582008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14759
14760 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14761
08388c79
DE
147622008-05-09 Doug Evans <dje@google.com>
14763
a3c83fae
DE
14764 * server.h (decode_search_memory_packet): Declare.
14765 * remote-utils.c (decode_search_memory_packet): New fn.
14766 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14767 (handle_search_memory): New fn.
14768 (handle_query): Process qSearch:memory packets.
14769
bb9c3d36
UW
147702008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14771
14772 * regcache.c (registers_length): Remove.
14773 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14774 full register packet.
14775 * regcache.h (registers_length): Remove prototype.
14776 * server.h (PBUFSIZ): Define to 16384.
14777
7284e1be
UW
147782008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14779
14780 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14781 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14782 powerpc-64l.o, and powerpc-altivec64l.o.
14783 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14784 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14785 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14786 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14787 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14788 to srv_xmlfiles.
14789
14790 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14791 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14792 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14793 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14794 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14795 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14796 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14797 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14798 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14799 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14800 (clean): Update.
14801
14802 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14803 (init_registers_powerpc_32l): ... this new prototype.
14804 (init_registers_powerpc_32): Remove, replace by ...
14805 (init_registers_powerpc_altivec32l): ... this new prototype.
14806 (init_registers_powerpc_e500): Remove, replace by ...
14807 (init_registers_powerpc_e500l): ... this new prototype.
14808 (init_registers_ppc64): Remove, replace by ...
14809 (init_registers_powerpc_64l): ... this new prototype.
14810 (init_registers_powerpc_64): Remove, replace by ...
14811 (init_registers_powerpc_altivec64l): ... this new prototype.
14812 (ppc_num_regs): Set to 73.
14813 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14814 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14815 (ppc_cannot_store_register): Handle orig_r3 and trap.
14816 (ppc_arch_setup): Update init_registers_... calls.
14817 (ppc_fill_gregset): Handle orig_r3 and trap.
14818
14819 * inferiors.c (clear_inferiors): Reset current_inferior.
14820
fdc59709
PB
148212008-04-23 Paolo Bonzini <bonzini@gnu.org>
14822
889bf7c5
PA
14823 * acinclude.m4: Add override.m4.
14824 * configure: Regenerate.
fdc59709 14825
c9b2f845
UW
148262008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14827
14828 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14829 initial call to init_register_ppc64.
14830
550512b8
UW
148312008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14832
43aaf8b6
PA
14833 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14834 single powerpc*-*-linux* case.
550512b8
UW
14835 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14836
b6430ec3
UW
148372008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14838
14839 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14840 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14841 from reg_xmlfiles.
14842 * linux-ppc-low.c: Include <elf.h>.
14843 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14844 (ppc_hwcap): New global variable.
14845 (ppc_regmap): Remove __SPE__ #ifdef sections.
14846 (ppc_regmap_e500): New global variable.
14847 (ppc_cannot_store_register): Update __SPE__ special case.
14848 (ppc_get_hwcap): New function.
14849 (ppc_arch_setup): Use it to determine whether inferior supports
14850 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14851 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14852 Do not access registers if target does not support AltiVec.
14853 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14854 Do not access registers if target does not support SPE.
14855 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14856
52fa2412
UW
148572008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * linux-low.c (disabled_regsets, num_regsets): New.
14860 (use_regsets_p): Delete.
14861 (linux_wait_for_process): Clear disabled_regsets.
14862 (regsets_fetch_inferior_registers): Check and set it.
14863 (regsets_store_inferior_registers): Likewise.
14864 (linux_fetch_registers, linux_store_registers): Do not use
14865 use_regsets_p.
14866 (initialize_low): Allocate disabled_regsets.
14867
e28b3332
DJ
148682008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * Makefile.in (LIBOBJS): New.
14871 (OBS): Use LIBOBJS.
14872 (memmem.o): New rule.
14873 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14874 * configure: Regenerated.
14875
4536995d
UW
148762008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14877
14878 * server.c (handle_query): Never return "unsupported" for
14879 qXfer:features:read queries.
14880
221c031f
UW
148812008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14882
14883 * server.c (get_features_xml): Fix inverted condition.
14884 (handle_query): Always support qXfer:feature:read.
14885
ccd213ac
DJ
148862008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14887
14888 * server.c (wrapper_argv): New.
14889 (start_inferior): Handle wrapper_argv. If set, expect an extra
14890 trap.
14891 (gdbserver_usage): Document --wrapper.
14892 (main): Parse --wrapper.
14893
6fe305f7
UW
148942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14895
14896 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14897 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14898 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14899 (ppc_set_pc): Likewise.
14900 (ppc_arch_setup): New function.
14901 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14902 of collect_register.
889bf7c5 14903 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14904
5b0a002e
UW
149052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14906
14907 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14908 instead of linux-ppc64-low.o.
14909 * linux-ppc64-low.c: Remove file.
14910 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14911 (linux-ppc64-low.o): Remove rule.
14912
14913 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14914 (init_registers_powerpc_64): Likewise.
14915 (ppc_regmap): Conditionally define depending on __powerpc64__.
14916 (ppc_cannot_store_register): Do not special-case "fpscr" when
14917 compiled on __powerpc64__.
14918 (ppc_collect_ptrace_register): New function.
14919 (ppc_supply_ptrace_register): New function.
14920 (ppc_breakpoint): Change type to "unsigned int".
14921 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14922 (the_low_target): Conditionally provide initializers for the
889bf7c5 14923 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14924 collect_ptrace_register and supply_ptrace_register members.
14925
9b4b61c8
UW
149262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14927
14928 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14929 * server.c (gdbserver_xmltarget): Define.
14930 (get_features_xml): Use it to replace "target.xml" and arch_string.
14931
14932 * configure.srv: Remove srv_xmltarget. Add XML files that were
14933 mentioned there to srv_xmlfiles instead. Remove conditional tests
14934 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14935 srv_xmlfiles and srv_regobj to include all possible choices.
14936 * configure.ac (srv_xmltarget): Remove.
14937 (srv_xmlfiles): Do not add "target.xml".
14938 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14939 checks for supplementary target information.
14940 * configure: Regenerate.
14941 * Makefile.in (XML_TARGET): Remove.
14942 (target.xml): Remove rule.
14943 (clean): Do not clean up target.xml.
14944 (.PRECIOUS): Do not mention target.xml.
14945
14946 * target.h (struct target_ops): Remove arch_string member.
14947 * linux-low.c (linux_arch_string): Remove.
14948 (linux_target_ops): Remove arch_string initializer.
14949 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14950 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14951 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14952 * spu-low.c (spu_arch_string): Remove.
14953 (spu_target_ops): Remove arch_string initializer.
14954 * win32-low.c (win32_arch_string): Remove.
14955 (win32_target_ops): Remove arch_string initializer.
14956 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14957 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14958 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14959
ee1a7ae4
UW
149602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14961
14962 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14963 by collect_ptrace_register and supply_ptrace_register hooks.
14964 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14965 instead of checking for the_low_target.left_pad_xfer.
14966 (usr_store_inferior_registers): Use collect_ptrace_register callback
14967 instead of checking for the_low_target.left_pad_xfer.
14968
14969 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14970 (s390_supply_ptrace_register): Likewise.
14971 (s390_fill_gregset): Call s390_collect_ptrace_register.
14972 (the_low_target): Update.
14973
14974 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14975 (ppc_supply_ptrace_register): Likewise.
14976 (the_low_target): Update.
14977
14978 * linux-i386-low.c (the_low_target): Update.
14979 * linux-x86-64-low.c (the_low_target): Update.
14980
d61ddec4
UW
149812008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14982
14983 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14984 reg-s390.o and reg-s390x.o.
14985
14986 * linux-low.c (new_inferior): New global variable.
14987 (linux_create_inferior, linux_attach): Set it.
14988 (linux_wait_for_process): Call the_low_target.arch_setup after the
14989 target has stopped for the first time.
14990 (initialize_low): Do not call the_low_target.arch_setup.
14991
14992 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14993 (s390_set_pc): Likewise.
14994 (s390_arch_setup): New function.
14995 (the_low_target): Use s390_arch_setup as arch_setup routine.
14996
14997 * regcache.c (realloc_register_cache): New function.
14998 (set_register_cache): Call it for each existing regcache.
14999
d05b4ac3
UW
150002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15001
15002 * server.h (init_registers): Remove prototype.
15003
15004 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15005 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15006 instead of init_registers ().
15007 * linux-arm-low.c (init_registers_arm): Add prototype.
15008 (init_registers_arm_with_iwmmxt): Likewise.
15009 (the_low_target): Add initializer for arch_setup field.
15010 * linux-cris-low.c (init_registers_cris): Add prototype.
15011 (the_low_target): Add initializer for arch_setup field.
15012 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15013 (the_low_target): Add initializer for arch_setup field.
15014 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15015 (the_low_target): Add initializer for arch_setup field.
15016 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15017 (the_low_target): Add initializer for arch_setup field.
15018 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15019 (the_low_target): Add initializer for arch_setup field.
15020 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15021 (the_low_target): Add initializer for arch_setup field.
15022 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15023 (init_registers_mips64_linux): Likewise.
15024 (the_low_target): Add initializer for arch_setup field.
15025 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15026 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15027 (the_low_target): Add initializer for arch_setup field.
15028 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15029 (init_registers_powerpc_64): Likewise.
15030 (the_low_target): Add initializer for arch_setup field.
15031 * linux-s390-low.c (init_registers_s390): Add prototype.
15032 (init_registers_s390x): Likewise.
15033 (the_low_target): Add initializer for arch_setup field.
15034 * linux-sh-low.c (init_registers_sh): Add prototype.
15035 (the_low_target): Add initializer for arch_setup field.
15036 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15037 (the_low_target): Add initializer for arch_setup field.
15038 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15039 (the_low_target): Add initializer for arch_setup field.
15040
15041 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15042 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15043 instead of init_registers ().
15044 * win32-arm-low.c (init_registers_arm): Add prototype.
15045 (the_low_target): Add initializer for arch_setup field.
15046 * win32-i386-low.c (init_registers_i386): Add prototype.
15047 (the_low_target): Add initializer for arch_setup field.
15048
15049 * spu-low.c (init_registers_spu): Add prototype.
15050 (initialize_low): Call initialie_registers_spu () instead of
15051 initialize_registers ().
15052
fd96d250
PA
150532008-02-19 Pedro Alves <pedro@codesourcery.com>
15054
15055 * server.c (handle_v_requests): When handling the vRun and vAttach
15056 packets, if already debugging a process, don't kill it. Return an
15057 error instead.
15058
d41b6bb4
DJ
150592008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15060
15061 * server.c (handle_query): Correct length check.
15062
5ac588cf
PA
150632008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15064
15065 * win32-low.c (do_initial_child_stuff): Add process handle
15066 parameter. Set current_process_handle and current_process_id from the
15067 parameters. Clear globals.
15068 (win32_create_inferior): Don't set current_process_handle and
15069 current_process_id here. Instead pass them on the call to
15070 do_initial_child_stuff.
15071 (win32_attach): Likewise.
15072 (win32_clear_inferiors): New.
15073 (win32_kill): Don't close the current process handle or the
15074 current thread handle here. Instead call win32_clear_inferiors.
15075 (win32_detach): Don't open a new handle to the process. Call
15076 win32_clear_inferiors.
15077 (win32_join): Don't rely on current_process_handle; open a new
15078 handle using the process id.
15079 (win32_wait): Call win32_clear_inferiors when the inferior process
15080 has exited.
15081
ecd7ecbc
DJ
150822008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15083
15084 * server.c (monitor_show_help): Add "exit".
15085
1525d545
MG
150862008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15087
ecd7ecbc 15088 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15089 (clean): Add reg-xtensa.c.
15090 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15091 * configure.srv (xtensa*-*-linux*) New target.
15092 * linux-xtensa-low.c: New.
15093 * xtensa-xtregs.c: New.
1525d545 15094
59a016f0
PA
150952008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15096
15097 * hostio.c: Don't include errno.h.
15098 (errno_to_fileio_errno): Move to hostio-errno.
15099 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15100 error number outputting to the target->hostio_last_error callback.
15101 (hostio_packet_error): Use FILEIO_EINVAL directly.
15102 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15103 calls to hostio_error.
15104 * hostio-errno.c: New.
15105 * server.h (hostio_last_error_from_errno): Declare.
15106 * target.h (target_ops): Add hostio_last_error member.
15107 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15108 as hostio_last_error handler.
889bf7c5 15109 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15110 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15111 (wince_hostio_last_error): New functions.
15112 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15113 as hostio_last_error handler.
15114 (win32_target_ops) [!_WIN32_WCE]: Register
15115 hostio_last_error_from_errno as hostio_last_error handler.
15116 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15117 (hostio-errno.o): New rule.
15118 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15119 * configure.srv (srv_hostio_err_objs): New variable. Default to
15120 hostio-errno.o.
15121 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15122 * configure: Regenerate.
15123
2d717e4f
DJ
151242008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15127 (linux_kill, linux_detach): Clean up the process list.
15128 * remote-utils.c (remote_open): Improve port number parsing.
15129 (putpkt_binary, input_interrupt): Only send interrupts if the target
15130 is running.
15131 * server.c (extended_protocol): Make static.
15132 (attached): Define earlier.
15133 (exit_requested, response_needed, program_argv): New variables.
15134 (target_running): New.
15135 (start_inferior): Clear attached here.
15136 (attach_inferior): Set attached here.
15137 (require_running): Define.
15138 (handle_query): Use require_running and target_running. Implement
15139 "monitor exit".
15140 (handle_v_attach, handle_v_run): New.
15141 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15142 (gdbserver_usage): Update.
15143 (main): Redo argument parsing. Handle --debug and --multi. Handle
15144 --attach along with other options or after the port. Save
15145 program_argv. Support no initial program. Resynchronize
15146 communication with GDB after an error. Handle "monitor exit".
15147 Use require_running and target_running. Always allow the extended
15148 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15149 restart in extended mode.
15150 * README: Refer to the GDB manual. Update --attach usage.
15151
7407e2de
AS
151522007-12-20 Andreas Schwab <schwab@suse.de>
15153
15154 * linux-low.c (STACK_SIZE): Define.
15155 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15156 (linux_test_for_tracefork): Likewise.
15157
b65d95c5
DJ
151582007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15159
15160 * linux-low.c (linux_wait_for_event): Update messages. Do not
15161 reinsert auto-delete breakpoints.
15162 * mem-break.c (struct breakpoint): Change return type of handler to
15163 int.
15164 (set_breakpoint_at): Update handler type.
15165 (reinsert_breakpoint_handler): Return 1 instead of calling
15166 delete_breakpoint.
15167 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15168 setting a new one.
15169 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15170 * mem-break.h (set_breakpoint_at): Update handler type.
15171 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15172 * win32-low.c (auto_delete_breakpoint): New.
15173 (get_child_debug_event): Use it.
15174
4e799345
DJ
151752007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15176
15177 * configure.ac: Check for pread and pwrite.
15178 * hostio.c (handle_pread): Fall back to lseek and read.
15179 (handle_pwrite): Fall back to lseek and write.
15180 * config.in, configure: Regenerated.
15181
27524b67
DJ
151822007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * server.c (myresume): Add own_buf argument.
15185 (main): Update calls.
15186
a20d5e98
DJ
151872007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15188
15189 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15190 * remote-utils.c (remote_open): Do not call disable_async_io.
15191 (block_async_io): Delete.
15192 (unblock_async_io): Make static.
15193 (initialize_async_io): New.
15194 * server.c (handle_v_cont): Handle async I/O here.
15195 (myresume): Likewise. Move other common resume tasks here...
15196 (main): ... from here. Call initialize_async_io. Disable async
15197 I/O before the main loop.
15198 * server.h (initialize_async_io): Declare.
15199 (block_async_io, unblock_async_io): Delete prototypes.
15200 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15201
b79d787e
DJ
152022007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15203
15204 * remote-utils.c (readchar): Allow binary data in received messages.
15205
d97903b2
PA
152062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15207
15208 * win32-low.c (attaching): New global.
15209 (win32_create_inferior): Clear the `attaching' global.
15210 (win32_attach): Set the `attaching' global.
15211 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15212 attaching. Only set a breakpoint at the entry point if not
15213 attaching.
15214
311de423
PA
152152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15216
15217 * server.c (main): Don't report dll events on the initial
15218 connection on attaches.
15219
6c2d16d2
PA
152202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15221
15222 * server.c (main): Relax numerical bases supported for the pid of
15223 the --attach command line argument.
15224
5ca906e6
PA
152252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15226
15227 * win32-low.c (win32_attach): Call OpenProcess before
15228 DebugActiveProcess, not after. Add last error output to error
15229 call.
15230
9c6c8194
PA
152312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15232
15233 * win32-low.c (win32_get_thread_context)
15234 (win32_set_thread_context): New functions.
15235 (thread_rec): Use win32_get_thread_context.
15236 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15237 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15238 field.
15239
4d5d1aaa
PA
152402007-12-03 Leo Zayas
15241 Pedro Alves <pedro_alves@portugalmail.pt>
15242
15243 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15244 global variables.
15245 (child_add_thread): Minor cleanup.
15246 (child_continue): Resume artificially suspended threads before
15247 calling ContinueDebugEvent.
15248 (suspend_one_thread): New.
15249 (fake_breakpoint_event): New.
15250 (get_child_debug_event): Change return type to int. Check here if
15251 gdb sent an interrupt request. If a soft interrupt was requested,
15252 fake a breakpoint event. Return 0 if there is no event to handle,
15253 and 1 otherwise.
15254 (win32_wait): Don't check here if gdb sent an interrupt request.
15255 Ensure there is a valid event to handle.
15256 (win32_request_interrupt): Add soft interruption method as last
15257 resort.
15258
c436e841
PA
152592007-12-03 Leo Zayas
15260 Pedro Alves <pedro_alves@portugalmail.pt>
15261
15262 * win32-low.h (win32_thread_info): Add descriptions to the
15263 structure members. Replace `suspend_count' counter by a
15264 `suspended' flag.
15265 * win32-low.c (thread_rec): Update condition of when to get the
15266 context from the inferior. Rely on ContextFlags being set if it
15267 has already been retrieved. Only suspend the inferior thread if
15268 we haven't already. Warn if that fails.
15269 (continue_one_thread): s/suspend_count/suspended/. Only call
15270 ResumeThread once. Warn if that fails.
15271
e7b5fa67
PA
152722007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15273
15274 * win32-low.c (win32_wait): Don't read from the inferior when it
15275 has already exited.
15276
a385171d
PA
152772007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15278
15279 * Makefile.in (win32_low_h): New variable.
15280 (win32-low.o): Add dependency on $(win32_low_h).
15281 (win32-arm-low.o, win32-i386-low.o): New rules.
15282
f80c84b3
DJ
152832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * hostio.c: Correct copyright year.
15286
a6b151f1
DJ
152872007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * Makefile.in (OBS): Add hostio.o.
15290 (hostio.o): New rule.
15291 * server.h (handle_vFile): Declare.
15292 * hostio.c: New file.
15293 * server.c (handle_v_requests): Take packet_len and new_packet_len
15294 for binary packets. Call handle_vFile.
15295 (main): Update call to handle_v_requests.
15296
f9387fc3
DJ
152972007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15298
15299 * linux-low.c: Include <sched.h>.
15300
51c2684e
DJ
153012007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15302
15303 * linux-low.c (linux_tracefork_grandchild): New.
15304 (linux_tracefork_child): Use clone.
15305 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15306
75f83163
JB
153072007-10-31 Joel Brobecker <brobecker@adacore.com>
15308
15309 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15310
da5898ce
DJ
153112007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15314
24a09b5f
DJ
153152007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15316
15317 * inferiors.c (change_inferior_id): Delete.
15318 (add_pid_to_list, pull_pid_from_list): New.
15319 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15320 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15321 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15322 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15323 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15324 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15325 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15326 (using_threads): Always set to 1.
15327 (handle_extended_wait): New.
15328 (add_process): Do not set TID.
15329 (linux_create_inferior): Set must_set_ptrace_flags.
15330 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15331 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15332 (linux_thread_alive): Rename TID argument to LWPID.
15333 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15334 (linux_wait_for_event): Do not use TID or check using_threads. Update
15335 call to dead_thread_notify. Call handle_extended_wait.
15336 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15337 (send_sigstop): Delete sigstop_sent.
15338 (wait_for_sigstop): Avoid TID.
15339 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15340 (linux_test_for_tracefork): New.
15341 (linux_lookup_signals): Use thread_db_active and
15342 linux_supports_tracefork_flag.
15343 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15344 * linux-low.h (get_process_thread): Avoid TID.
15345 (struct process_ifo): Move thread_known and tid to the end. Remove
15346 sigstop_sent.
15347 (linux_attach_lwp, thread_db_init): Update prototypes.
15348 * server.h (change_inferior_id): Delete prototype.
15349 (add_pid_to_list, pull_pid_from_list): New prototypes.
15350 * thread-db.c (thread_db_use_events): New.
15351 (find_first_thread): Rename to...
15352 (find_one_thread): ...this. Update callers and messages. Do not
15353 call fatal. Check thread_db_use_events. Do not call
15354 change_inferior_id or new_thread_notify.
15355 (maybe_attach_thread): Update. Do not call new_thread_notify.
15356 (thread_db_init): Set thread_db_use_events. Check use_events.
15357 * utils.c (fatal, warning): Correct message prefix.
15358
30ed0a8f
DJ
153592007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * Makefile.in (clean): Remove new files.
15362 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15363 (powerpc-64.o, powerpc-64.c): New rules.
15364 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15365 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15366 with SPE.
15367 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15368 SPE targets.
15369 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15370 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15371 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15372 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15373 (target_regsets): Add AltiVec and SPE register sets.
15374 * configure.ac: Check for AltiVec and SPE.
15375 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15376 (ppc_fill_vrregset, ppc_store_vrregset): New.
15377 (target_regsets): Add AltiVec register set.
15378 * configure: Regenerated.
15379
fd462a61
DJ
153802007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15381
15382 * linux-low.c (O_LARGEFILE): Define.
15383 (linux_read_memory): Use /proc/PID/mem.
15384 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15385 * configure, config.in: Regenerated.
15386
69f223ed
DJ
153872007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * linux-low.c (linux_wait_for_event): Do not pass signals while
15390 single-stepping.
15391
aec18585
PA
153922007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15393
15394 * win32-low.c (create_process): New.
15395 (win32_create_inferior): Use create_process instead of
15396 CreateProcess. If create_process failed retry appending an ".exe"
15397 suffix. Store the GetLastError result immediatelly after
15398 create_process calls and use it on the call to error.
15399
34d86ddd
PA
154002007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15401
15402 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15403
5a0e3bd0
JB
154042007-08-23 Joel Brobecker <brobecker@adacore.com>
15405
15406 * configure.ac: Switch license to GPLv3.
15407
f88c79e6
MS
154082007-08-01 Michael Snyder <msnyder@access-company.com>
15409
15410 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15411
6b3d9b83
PA
154122007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15413
15414 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15415 typedef.
15416 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15417 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15418 CloseToolhelp32Snapshot.
15419 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15420 CloseToolhelp32Snapshot.
15421
c588c53c
MS
154222007-07-27 Michael Snyder <michael.snyder@access-company.com>
15423
15424 * server.c (main): Check for inferior exit before main loop.
15425
aa0403d9
PA
154262007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15427
15428 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15429 instead of on tmp_desc.
15430
255e7678
DJ
154312007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15432 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15435 (add_thread): Minor cleanups.
15436 (clear_inferiors): Move lower in the file. Clear the DLL
15437 list.
15438 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15439 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15440 (xml_escape_text): New.
15441 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15442 for qSupported.
15443 (handle_v_cont): Report errors.
15444 (gdbserver_version): Update.
15445 (main): Correct size of own_buf. Do not report initial DLL events.
15446 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15447 (unloaded_dll, xml_escape_text): New.
15448 * win32-low.c (enum target_waitkind): Update comments.
15449 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15450 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15451 (win32_EnumProcessModules, win32_GetModuleInformation)
15452 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15453 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15454 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15455 (win32_Module32First, win32_Module32Next, load_toolhelp)
15456 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15457 (get_child_debug_event): Handle DLL events.
15458 (win32_wait): Likewise.
15459
0d37add9
DJ
154602007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15461
15462 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15463 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15464
45e2715e
PA
154652007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15466
15467 * win32-low.c (handle_output_debug_string): Ignore event if not
15468 waiting.
15469
c5674cf1
PA
154702007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15471
15472 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15473
2bbe3cc1
DJ
154742007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15475
15476 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15477
ae13219e
DJ
154782007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15479
15480 * inferiors.c (change_inferior_id): Add comment.
15481 * linux-low.c (check_removed_breakpoint): Add an early
15482 prototype. Improve debug output.
15483 (linux_attach): Doc update.
15484 (linux_detach_one_process, linux_detach): Clean up before releasing
15485 each process.
15486 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15487 * linux-low.h (struct process_info): Doc improvement.
15488 * mem-break.c (delete_all_breakpoints): New.
15489 * mem-break.h (delete_all_breakpoints): New prototype.
15490 * thread-db.c (find_first_thread): New.
15491 (thread_db_create_event): Call it instead of
15492 thread_db_find_new_threads. Clean up unused variables.
15493 (maybe_attach_thread): Remove first thread handling.
15494 (thread_db_find_new_threads): Use find_first_thread.
15495 (thread_db_get_tls_address): Likewise.
15496
4105de34
DJ
154972007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * thread-db.c (thread_db_find_new_threads): Add prototype.
15500 (thread_db_create_event): Check for the main thread before adding
15501 a new thread.
15502 (maybe_attach_thread): Only enable event reporting if TID == 0.
15503 (thread_db_get_tls_address): Check for new threads.
15504
2b876972
DJ
155052007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15506
15507 * linux-low.c (linux_create_inferior): Try execv before execvp.
15508 * spu-low.c (spu_create_inferior): Likewise.
15509
7a245884
DJ
155102007-06-13 Mike Frysinger <vapier@gentoo.org>
15511
15512 * linux-low.c (linux_create_inferior): Change execv to execvp.
15513 * spu-low.c (spu_create_inferior): Likewies.
15514
117ce543
DJ
155152007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15516
15517 * Makefile.in (clean): Clean new files instead of deleted ones.
15518 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15519 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15520 rules.
15521 * configure.srv: Specify XML files and new regformats for MIPS and
15522 MIPS64 GNU/Linux.
15523 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15524 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15525 an entry for the restart register.
15526 (mips_cannot_fetch_register, mips_cannot_store_register)
15527 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15528 register names to match the XML descriptions.
15529 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15530 restart register instead of $0.
15531
0e7f50da
UW
155322007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15533 Markus Deuling <deuling@de.ibm.com>
15534
15535 * remote-utils.c (decode_xfer_write): New function.
15536 * server.h (decode_xfer_write): Add prototype.
15537 * server.c (handle_query): Add PACKET_LEN argument. Support
15538 qXfer:spu:read and qXfer:spu:write packets.
15539 (main): Pass packet_len to handle_query.
15540 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15541 * target.h (target_ops): Add qxfer_spu.
15542
374c1d38
UW
155432007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15544
15545 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15546 accessing non-seekable spufs files.
15547
bb63802a
UW
155482007-05-16 Markus Deuling <deuling@de.ibm.com>
15549
889bf7c5 15550 * server.c (handle_query): Add reply for qC packet.
bb63802a 15551
7390519e
PA
155522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15553 Leo Zayas <lerele@champenstudios@com>
15554
15555 * server.h (check_remote_input_interrupt_request): New function.
15556 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15557 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15558 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15559 (check_remote_input_interrupt_request): New function.
15560 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15561 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15562 winapi_GenerateConsoleCtrlEvent): New typedefs.
15563 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15564 to 250 ms.
15565 (win32_wait): Check for remote interrupt request
15566 with check_remote_input_interrupt_request.
15567 (win32_request_interrupt): New function.
15568 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15569
34b34921
PA
155702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15571
15572 * win32-low.c (debug_registers_changed,
15573 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15574 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15575 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15576 (thread_rec): Get context using the low target.
15577 (child_add_thread): Call thread_added on the low target,
15578 which does the same thing.
15579 (regptr): Delete.
15580 (do_initial_child_stuff): Remove debug registers references.
15581 Set context using the low target. Resume threads after
15582 setting the contexts.
15583 (child_continue): Remove dead variable. Remove debug
15584 registers references.
15585 (child_fetch_inferior_registers): Go through the low target.
15586 (do_child_store_inferior_registers): Remove.
15587 (child_store_inferior_registers): Go through the low target.
15588 (win32_resume): Remove debug registers references.
15589 Set context using the low target.
15590 (handle_exception): Change return type to void. Don't record
15591 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15592 first chance exception.
889bf7c5 15593 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15594 goto loop. Always return after waiting for debug event.
15595 (win32_wait): Convert to switch statement. Handle spurious
15596 events.
15597
15598 * win32-i386-low.c (debug_registers_changed,
15599 debug_registers_used): New.
15600 (initial_stuff): Rename to ...
15601 (i386_initial_stuff): ... this. Clear debug registers
15602 state variables.
15603 (store_debug_registers): Delete.
15604 (i386_get_thread_context): New.
15605 (load_debug_registers): Delete.
15606 (i386_set_thread_context): New.
15607 (i386_thread_added): New.
15608 (single_step): Rename to ...
15609 (i386_single_step): ... this.
15610 (do_fetch_inferior_registers): Rename to ...
15611 (i386_fetch_inferior_register): ... this.
15612 (i386_store_inferior_register): New.
15613 (the_low_target): Adapt to new interface.
15614
15615 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15616 (arm_get_thread_context): New.
15617 (arm_set_thread_context): New.
15618 (regptr): New.
15619 (do_fetch_inferior_registers): Rename to ...
15620 (arm_fetch_inferior_register): ... this.
15621 (arm_store_inferior_register): New.
15622 (arm_wince_breakpoint): Reimplement as unsigned long.
15623 (arm_wince_breakpoint_len): Define.
15624 (the_low_target): Adapt to new interface.
15625
15626 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15627 load_debug_registers. Add get_thread_context, set_thread_context,
15628 thread_added and store_inferior_register. Rename
15629 fetch_inferior_registers to fetch_inferior_register.
15630 (regptr): Remove declaration.
15631
dd6953e1
PA
156322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15633
15634 * linux-low.c (linux_detach): Change return type to int. Return 0.
15635 * spu-low.c (spu_detach): Likewise.
15636
444d6139
PA
156372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15638
15639 * target.h (target_ops): Change return type of detach to int.
15640 Add join.
15641 (join_inferior): New.
15642 * server.c (main): Don't skip detach support on mingw32.
15643 If the inferior doesn't support detaching return error.
15644 Call join_inferior instead of using waitpid.
15645 * linux-low.c (linux_join): New.
15646 (linux_target_op): Add linux_join.
15647 * spu-low.c (spu_join): New.
15648 (spu_target_ops): Add spu_join.
15649 * win32-low.c (win32_detach): Adapt to new interface.
15650 Reopen current_process_handle before detaching. Issue a child
15651 resume before detaching.
15652 (win32_join): New.
15653 (win32_target_op): Add win32_join.
15654
1d5315fe
PA
156552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15656
15657 * win32-low.c (win32-attach): Fix return value.
15658 * target.h (target_ops): Describe ATTACH return values.
15659
bf914831
PA
156602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15661
15662 * win32-low.c (GETPROCADDRESS): Define.
15663 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15664 (winapi_DebugSetProcessKillOnExit): Likewise.
15665 (win32_create_inferior): Force usage of ansi CreateProcessA.
15666 (win32_attach): Use GETPROCADDRESS.
15667 (win32_detach): Likewise.
15668
f72f3e60
PA
156692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15670
15671 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15672
ed50f18f
PA
156732007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15674
15675 * win32-low.c: Commit leftover changes from 2007-03-29.
15676
0c2ead7e
DJ
156772007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15678
15679 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15680 fields short instead of int. Add explicit padding.
15681 (i387_cache_to_fsave): Remove unnecessary casts.
15682 (i387_fsave_to_cache): Doc fix.
15683 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15684
73725ff3
DJ
156852007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15688 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15689
d99f33d8
PA
156902007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15691
15692 * configure.srv (arm*-*-mingw32ce*): Move near the other
15693 arm targets.
15694
68070c10
PA
156952007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15696
2482afc6 15697 * configure.ac: Add errno checking.
68070c10
PA
15698 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15699 sys/file.h and malloc.h.
15700 (AC_CHECK_DECLS): Add perror.
15701 (srv_mingwce): Handle.
2482afc6 15702 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15703 win32-i386-low.o to srv_tgtobj.
15704 (i[34567]86-*-mingw*): Likewise.
15705 (arm*-*-mingw32ce*): Add case.
15706 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15707 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15708 [__MINGW32CE__] (strerror): New function.
15709 [__MINGW32CE__] (errno): Define to GetLastError.
15710 [__MINGW32CE__] (COUNTOF): New macro.
15711 (remote_open): Remove extra close call.
15712 * mem-break.c (delete_breakpoint_at): New function.
15713 * mem-break.h (delete_breakpoint_at): Declare.
15714 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15715 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15716 [USE_WIN32API] (read, write): Add char* casts.
15717 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15718 * server.h: Include wincecompat.h on Windows CE.
15719 [HAVE_ERRNO_H]: Check.
15720 (perror): Declare if not declared.
15721 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15722 (perror_with_name): Remove errno declaration.
15723 * wincecompat.h: New.
15724 * wincecompat.c: New.
15725 * win32-low.h: New.
15726 * win32-arm-low.c: New.
15727 * win32-i386-low.c: New.
15728 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15729 (OUTMSG2): Make it safe.
15730 (_T): New macro.
15731 (COUNTOF): New macro.
15732 (NUM_REGS): Get it from the low target.
15733 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15734 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15735 (thread_rec): Let low target handle debug registers.
15736 (child_add_thread): Likewise.
15737 (child_init_thread_list): Likewise.
15738 (continue_one_thread): Likewise.
15739 (regptr): New.
15740 (do_child_fetch_inferior_registers): Move to ...
15741 * win32-i386-low.c: ... here, and rename to ...
15742 (do_fetch_inferior_registers): ... this.
889bf7c5 15743 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15744 Go through the low target.
15745 (do_child_store_inferior_registers): Use regptr.
15746 (strwinerror): New function.
15747 (win32_create_inferior): Handle Windows CE.
15748 Use strwinerror instead of strerror on Windows error
15749 codes. Add program to the error output.
15750 Don't close the main thread handle on Windows CE.
15751 (win32_attach): Use coredll.dll on Windows CE.
15752 (win32_kill): Close current process and current
15753 thread handles.
15754 (win32_detach): Use coredll.dll on Windows CE.
15755 (win32_resume): Let low target handle debug registers, and
15756 step request.
15757 (handle_exception): Add/Remove initial breakpoint. Avoid
15758 non-existant WSTOPSIG on Windows CE.
15759 (win32_read_inferior_memory): Cast to remove warning.
15760 (win32_arch_string): Go through the low target.
15761 (initialize_low): Call set_breakpoint_data with the low
15762 target's breakpoint.
15763 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15764 FOP_REGNUM, mappings): Move to ...
15765 * win32-i386-low.c: ... here.
15766 * win32-low.c (win32_thread_info): Move to ...
15767 * win32-low.h: ... here.
15768 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15769 win32-arm-low.c and wincecompat.c.
15770 (all:): Add $EXEEXT.
15771 (install-only:): Likewise.
15772 (gdbserver:): Likewise.
15773 (gdbreplay:): Likewise.
15774 * config.in: Regenerate.
15775 * configure: Regenerate.
15776
41093d81
PA
157772007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15778
15779 * win32-low.c: Rename typedef thread_info to
15780 win32_thread_info throughout.
15781
544afa54
PA
157822007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15783
15784 * win32-i386-low.c: Rename to ...
15785 * win32-low.c: ... this.
15786 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15787 * Makefile.in: Likewise.
15788
bce7165d
PA
157892007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15790
15791 * remote-utils.c (monitor_output): Constify msg parameter.
15792 * server.h (monitor_output): Likewise.
15793 * win32-i386-low.c (handle_output_debug_string): New.
15794 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15795 handle_output_debug_string.
15796 (get_child_debug_event): Likewise.
15797
506c7aa0
DJ
157982007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15799
15800 * server.c (main): Correct strtoul check.
15801
42c81e2a
DJ
158022007-03-27 Jon Ringle <jon@ringle.org>
15803
15804 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15805
9453113a
DJ
158062007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15807
15808 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15809
64a69107
DJ
158102007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15811
15812 * terminal.h: Check HAVE_SGTTY_H.
15813
158142007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15815
15816 * remote-utils.c (remote_open): Print out the assigned port number.
15817
c74d0ad8
DJ
158182007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * remote-utils.c (monitor_output): New function.
15821 * server.c (debug_threads): Define here.
15822 (monitor_show_help): New function.
15823 (handle_query): Handle qRcmd.
15824 (main): Do not handle 'd' packet.
15825 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15826 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15827 of debug_threads.
15828
de7c3b4a
PA
158292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15830
15831 * Makefile.in (EXEEXT): New.
15832 (clean): Use $(EXEEXT).
15833
ef57601b
PA
158342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15835
15836 * target.h (target_ops): Rename send_signal to request_interrupt,
15837 and remove enum target_signal parameter.
15838 * linux-low.c (linux_request_interrupt): Rename from
15839 linux_send_signal, and always send SIGINT.
15840 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15841 and always send SIGINT.
15842 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15843 of send_signal.
15844 (input_interrupt): Likewise.
15845
820f2bda
PA
158462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15847
15848 * server.c (get_features_xml): Check if target implemented
15849 arch_string.
15850 * win32-i386-low.c (win32_arch_string): New.
15851 (win32_target_ops): Add win32_arch_string as arch_string member.
15852
ab39bf24
UW
158532007-02-22 Markus Deuling <deuling@de.ibm.com>
15854
15855 * spu-low.c (spu_arch_string): New.
15856 (spu_target_ops): Add spu_arch_string.
15857
61ff6e04
DJ
158582007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15859
15860 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15861 * configure.ac: Do not check for terminal.h.
15862 * configure, config.in: Regenerated.
15863
fb1e4ffc
DJ
158642007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * Makefile.in (OBS): Add $(XML_BUILTIN).
15867 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15868 (clean): Update.
15869 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15870 (arm-with-iwmmxt.c): New.
15871 * config.in, configure: Regenerate.
15872 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15873 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15874 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15875 (arm*-*-linux*): Add iWMMXt and regset support.
15876 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15877 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15878 (arm_store_wmmxregset, target_regsets): New.
15879 * server.c (get_features_xml): Take annex argument. Check builtin
15880 XML documents.
15881 (handle_query): Handle multiple annexes.
15882
0f48aa01
DJ
158832007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15884
15885 * remote-utils.c [USE_WIN32API] (read, write): Define.
15886 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15887 write.
15888
23181151
DJ
158892007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15890
15891 * linux-i386-low.c (the_low_target): Set arch_string.
15892 * linux-x86-64-low.c (the_low_target): Likewise.
15893 * linux-low.c (linux_arch_string): New.
15894 (linux_target_ops): Add it.
15895 * linux-low.h (struct linux_target_ops): Add arch_string.
15896 * server.c (write_qxfer_response): Use const void * for DATA.
15897 (get_features_xml): New.
15898 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15899 * target.h (struct target_ops): Add arch_string method.
15900
9d606399
DJ
159012007-01-03 Denis Pilat <denis.pilat@st.com>
15902 Daniel Jacobowitz <dan@codesourcery.com>
15903
15904 * linux-low.c (linux_kill): Handle being called with no threads.
15905 * win32-i386-low.c (win32_kill): Likewise.
15906 (get_child_debug_event): Clear current_process_handle.
15907
159082006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15909 Daniel Jacobowitz <dan@codesourcery.com>
15910
15911 * remote-utils.c (remote_open): Check the type of specified
15912 serial port devices before opening them.
15913 * server.c (main): Kill the inferior if an error occurs during
15914 the first remote_open.
15915
a5e13d24
DJ
159162006-12-05 Markus Deuling <deuling@de.ibm.com>
15917
15918 * README: Update supported targets.
15919
186947f7
DJ
159202006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15921
15922 * Makefile.in (clean): Remove reg-mips64.c.
15923 (reg-mips64.c, reg-mips64.o): New rules.
15924 * configure.srv: Handle mips64. Include regset support for mips.
15925 * linux-mips-low.c (union mips_register): New.
15926 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15927 (mips_breakpoint, mips_breakpoint_at): Use int.
15928 (mips_collect_register, mips_supply_register)
15929 (mips_collect_register_32bit, mips_supply_register_32bit)
15930 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15931 (mips_store_fpregset, target_regsets): New.
15932 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15933
a13e2c95
UW
159342006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15935
15936 * configure.srv: Add target "spu*-*-*".
15937 * Makefile.in (clean): Remove reg-spu.c.
15938 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15939 * spu-low.c: New file.
15940
cb7283db
DJ
159412006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15942
15943 * configure.ac: Correct td_thr_tls_get_addr test.
15944 * configure: Regenerated.
15945
89be2091
DJ
159462006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * linux-low.c (linux_wait_for_event): Reformat. Use the
15949 pass_signals array.
15950 * remote-utils.c (decode_address_to_semicolon): New.
15951 * server.c (pass_signals, handle_general_set): New.
15952 (handle_query): Mention QPassSignals for qSupported.
15953 (main): Call handle_general_set.
15954 * server.h (pass_signals, decode_address_to_semicolon): New.
15955
000ef4f0
DJ
159562006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15957
15958 * server.c (handle_query): Correct error handling for read_auxv.
15959
b7149293
UW
159602005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15961
15962 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15963 and srv_linux_thread_db to yes.
15964 * linux-s390-low.c (s390_fill_gregset): New function.
15965 (target_regsets): Define data structure.
15966
dae5f5cf
DJ
159672006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15968
15969 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15970 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15971 * config.in, configure: Regenerated.
15972 * inferiors.c (gdb_id_to_thread): New function.
15973 (gdb_id_to_thread_id): Use it.
15974 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15975 * linux-low.h (struct process_info): Add th member.
15976 (thread_db_get_tls_address): New prototype.
15977 * remote-utils.c (decode_address): Make non-static.
15978 * server.c (handle_query): Handle qGetTLSAddr.
15979 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15980 * target.h (struct target_ops): Add get_tls_address.
15981 * thread-db.c (maybe_attach_thread): Save the thread handle.
15982 (thread_db_get_tls_address): New.
15983
32ca6d61
DJ
159842006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15987 (linux_resume_one_process): Take a siginfo_t *. Update all
15988 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15989 (struct pending_signals): Add a siginfo_t.
15990 (linux_wait_for_process): Always set last_status.
15991 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15992 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15993 * linux-low.h (struct process_info): Add last_status.
15994
5ffff7c1
DJ
159952006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15996
15997 * remote-utils.c (try_rle): New function.
15998 (putpkt_binary): Use it.
15999
8695c747
DJ
160002006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16001
16002 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16003 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16004 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16005 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16006 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16007 point registers.
16008
290fadea
RS
160092006-08-08 Richard Sandiford <richard@codesourcery.com>
16010
16011 * server.c (terminal_fd): New variable.
16012 (old_foreground_pgrp): Likewise.
16013 (restore_old_foreground_pgrp): New function.
16014 (start_inferior): Record the terminal file descriptor in terminal_fd
16015 and its original foreground group in old_foreground_pgrp. Register
16016 restore_old_foreground_pgrp with atexit().
16017
9f2e1e63
DJ
160182006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16019
16020 * server.c (handle_query): Correct qPart to qXfer.
16021
b80864fb
DJ
160222006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16023
16024 * configure.ac: Check for more headers which are missing on
16025 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16026 * configure.srv: Add Cygwin and mingw32.
16027 * remote-utils.c: Don't include headers unconditionally which
16028 are missing on mingw32. Include <winsock.h> for mingw32.
16029 (remote_open): Adjust for mingw32 support. Flush
16030 standard error after writing to it.
16031 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16032 (unblock_async_io, enable_async_io, disable_async_io)
16033 (readchar, getpkt): Update for Winsock support.
16034 (prepare_resume_reply): Expect a protocol signal number.
16035 * server.c: Disable <sys/wait.h> on mingw32.
16036 (start_inferior): Adjust for mingw32 support. Flush
16037 standard error after writing to it.
16038 (attach_inferior): Likewise. Use protocol signal
16039 numbers.
16040 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16041 and names.
16042 * win32-i386-low.c: New file.
16043 * Makefile.in (XM_CLIBS): Set.
16044 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16045 (win32-i386-low.o): New dependency rule.
16046 * linux-low.c (linux_wait): Use target signal numbers.
16047 * target.h (struct target_ops): Doc fix.
16048 * server.h (target_signal_to_name): New prototype.
16049 * gdbreplay.c: Don't include headers unconditionally which
16050 are missing on mingw32. Include <winsock.h> for mingw32.
16051 (remote_close, remote_open): Adjust for Winsock support.
16052 * configure, config.in: Regenerated.
16053
0876f84a
DJ
160542006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16055
16056 * server.c (decode_xfer_read, write_qxfer_response): New.
16057 (handle_query): Take a packet length argument. Handle
16058 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16059 the qSupported response.
16060 (main): Update call to handle_query.
16061
01f9e8fa
DJ
160622006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16063
16064 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16065 (putpkt_binary): Renamed from putpkt and adjusted for binary
16066 data.
16067 (putpkt): New wrapper for putpkt_binary.
16068 (readchar): Don't mask off the high bit.
16069 (decode_X_packet): New function.
16070 * server.c (main): Call putpkt_binary if a handler sets the packet
16071 length. Save the length of the incoming packet. Handle 'X'.
16072 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16073
be2a5f71
DJ
160742006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16075
16076 * server.c (handle_query): Handle qSupported.
16077
ea025f5f
DJ
160782006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16079
16080 * remote-utils.c (all_symbols_looked_up): New variable.
16081 (look_up_one_symbol): Check it.
16082 * server.h (look_up_one_symbol): New declaration.
16083 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16084
9308fc88
DJ
160852006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16086
16087 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16088 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16089 (PTRACE_GET_THREAD_AREA): Define.
16090 (ps_get_thread_area): New function.
16091
52fb6437
NS
160922006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16093
16094 * configure.srv (m68k*-*-uclinux*): New target.
16095 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16096 (linux_resume_one_process): Remove extraneous cast.
16097 (linux_read_offsets): New.
16098 (linux_target_op): Add linux_read_offsets on mmuless systems.
16099 * server.c (handle_query): Add qOffsets logic.
16100 * target.h (struct target_ops): Add read_offsets.
16101
21b0f40c
DJ
161022006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16103
16104 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16105 (PTRACE_GET_THREAD_AREA): Define.
16106 (ps_get_thread_area): New function.
16107 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16108 (linux-x86-64-low.o): Update.
16109
0050a760
DJ
161102006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16111
16112 * configure.ac: Remove checks for prfpregset_t.
16113 * gdb_proc_service.h: New file.
16114 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16115 new "gdb_proc_service.h".
16116 * proc-service.c: Likewise.
16117 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16118 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16119 * Makefile.in (gdb_proc_service_h): Updated.
16120 * configure, config.in: Regenerated.
16121
b92a518e
DJ
161222006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16123
16124 * remote-utils.c (prepare_resume_reply): Move declaration
16125 of gdb_id_from_wait to the top of the block.
16126
545587ee
DJ
161272006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16128
16129 * linux-low.c (regsets_store_inferior_registers): Read the regset
16130 from the target before filling it.
16131
9db87ebd
DJ
161322006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16133
16134 * server.c (attach_inferior): Return SIGTRAP for a successful
16135 attach.
16136
dd24457d
DJ
161372006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16138
16139 * Makefile.in (OBS): Add version.o.
16140 (STAGESTUFF): Delete.
16141 (version.o): Add dependencies.
16142 (version.c): Replace rule.
16143 (clean): Remove version.c.
16144 * server.c (gdbserver_version): New.
16145 (gdbserver_usage): Use printf.
16146 (main): Handle --version and --help.
16147 * server.h (version, host_name): Add declarations.
16148
6f0f660e
EZ
161492005-12-23 Eli Zaretskii <eliz@gnu.org>
16150
889bf7c5
PA
16151 * linux-arm-low.c:
16152 * linux-arm-low.c:
16153 * inferiors.c:
16154 * i387-fp.h:
16155 * i387-fp.c:
16156 * gdbreplay.c:
16157 * regcache.c:
16158 * proc-service.c:
16159 * mem-break.h:
16160 * mem-break.c:
16161 * linux-x86-64-low.c:
16162 * linux-sh-low.c:
16163 * linux-s390-low.c:
16164 * linux-ppc64-low.c:
16165 * linux-ppc-low.c:
16166 * linux-mips-low.c:
16167 * linux-m68k-low.c:
16168 * linux-m32r-low.c:
16169 * linux-low.h:
16170 * linux-low.c:
16171 * linux-ia64-low.c:
16172 * linux-i386-low.c:
16173 * linux-crisv32-low.c:
16174 * thread-db.c:
16175 * terminal.h:
16176 * target.h:
16177 * target.c:
16178 * server.h:
16179 * server.c:
16180 * remote-utils.c:
16181 * regcache.h:
16182 * utils.c:
16183 * Makefile.in:
16184 * configure.ac:
6f0f660e
EZ
16185 * gdbserver.1: Add (C) after Copyright. Update the FSF
16186 address.
16187
9d1fb177
DJ
161882005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16189
16190 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16191 (arm_breakpoint_at): Recognize both breakpoints.
16192 (the_low_target): Use the correct breakpoint instruction.
16193
011a70c2
DJ
161942005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16197 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16198 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16199 (the_low_target): Update.
16200
7fb85e41
AS
162012005-10-25 Andreas Schwab <schwab@suse.de>
16202
16203 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16204
16205 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16206 (ia64_num_regs): Reduce to 462.
16207
3db0444b
DJ
162082005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16209
16210 * acinclude.m4: Correct quoting.
16211 * aclocal.m4: Regenerated.
16212
16213 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16214 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16215 (thread_db_init): Call thread_db_err_str.
16216 * configure.ac: Check for TD_VERSION.
16217 * config.in, configure: Regenerated.
16218
bee0189a
DJ
162192005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16220
16221 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16222
e9d25b98
DJ
162232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16226 is not available. Define HAVE_PTRACE_GETREGS if it is.
16227 * config.in, configure: Regenerated.
16228 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16229 * linux-i386-low.c, linux-m68k-low.c: Update to use
16230 HAVE_PTRACE_GETREGS.
16231 * linux-low.c (regsets_fetch_inferior_registers)
16232 (regsets_store_inferior_registers): Only return 0 if we processed
16233 GENERAL_REGS.
16234 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16235 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16236
a06660f7
DJ
162372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16238
16239 * inferiors.c (struct thread_info): Add gdb_id.
16240 (add_thread): Add gdb_id argument.
16241 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16242 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16243 calls to add_thread.
16244 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16245 * server.c (handle_query): Use thread_to_gdb_id.
16246 (handle_v_cont, main): Use gdb_id_to_thread_id.
16247 * server.h (add_thread): Update prototype.
16248 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16249 prototypes.
16250
5a1f5858
DJ
162512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16254 left-padded registers.
16255 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16256 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16257
e122f1f5
SE
162582005-07-01 Steve Ellcey <sje@cup.hp.com>
16259
16260 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16261 * configure: Regenerate.
16262 * config.in: Regenerate.
16263 * server.h (NEED_DECLARATION_STRERROR):
16264 Replace with !HAVE_DECL_STRERROR.
16265
d592fa2f
DJ
162662005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16267
16268 * linux-low.c (linux_wait, linux_send_signal): Don't test
16269 an unsigned long variable for > 0 if it could be MAX_ULONG.
16270 * server.c (myresume): Likewise.
16271 * target.c (set_desired_inferior): Likewise.
16272
ccbd4912
MK
162732005-06-13 Mark Kettenis <kettenis@gnu.org>
16274
16275 * configure.ac: Simplify and improve check for socklen_t.
16276 * configure, config.in: Regenerate.
16277
f450004a
DJ
162782005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16279
16280 * acconfig.h: Remove.
16281 * configure.ac: Add a test for socklen_t. Use three-argument
16282 AC_DEFINE throughout.
16283 * config.in: Regenerated using autoheader 2.59.
16284 * configure: Regenerated.
16285
16286 * gdbreplay.c (socklen_t): Provide a default.
16287 (remote_open): Use socklen_t.
16288 * remote-utils.c (socklen_t): Provide a default.
16289 (remote_open): Use socklen_t.
16290 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16291 unsigned char.
16292
16293 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16294 char for buffers.
16295 * linux-low.c (linux_read_memory, linux_write_memory)
16296 (linux_read_auxv): Likewise.
16297 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16298 (check_mem_write): Likewise.
16299 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16300 Likewise.
16301 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16302 (registers_from_string, register_data): Likewise.
16303 * server.c (handle_query, main): Likewise.
16304 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16305 (decode_M_packet): Likewise.
16306 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16307 * target.h (struct target_ops): Update read_memory, write_memory,
16308 and read_auxv.
16309 (read_inferior_memory, write_inferior_memory): Update.
16310 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16311 to unsigned char *.
16312 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16313 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16314 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16315 linux-s390-low.c, linux-sh-low.c: Update for changes in
16316 read_inferior_memory and the_low_target->breakpoint.
16317
eee84df1
DJ
163182005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16319
16320 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16321 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16322 * configure.srv: Add powerpc64-*-linux*.
16323 * linux-ppc64-low.c: New file.
16324
45b134e5
OF
163252005-05-23 Orjan Friberg <orjanf@axis.com>
16326
16327 * linux-cris-low.c: New file with support for CRIS.
16328 * linux-crisv32-low.c: Ditto for CRISv32.
16329 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16330 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16331 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16332 reg-crisv32.o, and reg-crisv32.c to make rules.
16333 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16334 recognized targets.
16335
48d93c75
UW
163362005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16337
16338 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16339 of sizeof (PTRACE_XFER_TYPE).
16340 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16341
e013ee27
OF
163422005-05-12 Orjan Friberg <orjanf@axis.com>
16343
889bf7c5 16344 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16345 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16346 pointers for hardware watchpoint support.
16347 * linux-low.h (struct linux_target_ops): Ditto.
16348 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16349 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16350 to linux_target_ops.
16351 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16352 reply packet.
16353 * server.c (main): Recognize 'Z' and 'z' packets.
16354
b0ded00b
UW
163552005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16356
16357 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16358 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16359 (the_low_target): Add new members.
16360
8643e2ad
DJ
163612005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16362
16363 * proc-service.c (ps_lgetregs): Search all_processes instead of
16364 all_threads.
16365
fc620387
DJ
163662005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16367
16368 * server.c (start_inferior): Change return type to int.
16369 (attach_inferior): Change sigptr to int *.
16370 (handle_v_cont, handle_v_requests): Change signal to int *.
16371 (main): Change signal to int.
16372
163732005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16374
16375 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16376 * configure.srv: Add m32r*-*-linux*.
16377 * linux-m32r-low.c: New file.
16378
e0e76420
DJ
163792005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16380
16381 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16382
a1928bad
DJ
163832005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16384
16385 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16386 Take unsigned long arguments for PIDs.
16387 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16388 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16389 (wait_for_sigstop, linux_resume_one_process)
16390 (regsets_fetch_inferior_registers, linux_send_signal)
16391 (linux_read_auxv): Likewise. Update the types of variables holding
16392 PIDs. Update format string specifiers.
16393 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16394 * remote-utils.c (prepare_resume_reply): Likewise.
16395 * server.c (cont_thread, general_thread, step_thread)
16396 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16397 unsigned long.
16398 (handle_query): Update format specifiers.
16399 (handle_v_cont, main): Use strtoul for thread IDs.
16400 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16401 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16402 (general_thread, step_thread, thread_from_wait)
16403 (old_thread_from_wait): Update.
16404 * target.h (struct thread_resume): Use unsigned long for THREAD.
16405 (struct target_ops): Use unsigned long for arguments to attach and
16406 thread_alive.
16407
dcdb98d2
DJ
164082005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16409
16410 * acinclude.m4: Include bfd/bfd.m4 directly.
16411 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16412 <agriffis@toolchain.org>.
16413 * aclocal.m4, configure: Regenerated.
16414
bec39cab
AC
164152005-01-07 Andrew Cagney <cagney@gnu.org>
16416
16417 * configure.ac: Rename configure.in, require autoconf 2.59.
16418 * configure: Re-generate.
16419
434c4c77
DJ
164202004-12-08 Daniel Jacobowitz <dan@debian.org>
16421
16422 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16423 LIBS when finished.
16424 * aclocal.m4: Regenerated.
16425 * configure: Regenerated.
16426
db1d3e1b
AS
164272004-11-21 Andreas Schwab <schwab@suse.de>
16428
16429 * linux-m68k-low.c (m68k_num_gregs): Define.
16430 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16431 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16432 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16433 (m68k_breakpoint_at): New. Add to the_low_target.
16434
16435 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16436 srv_linux_thread_db to yes.
16437
43360365
JB
164382004-10-20 Joel Brobecker <brobecker@gnat.com>
16439
16440 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16441 (ARCH_SET_FS): Likewise.
16442 (ARCH_GET_FS): Likewise.
16443 (ARCH_GET_GS): Likewise.
16444
fd500816
DJ
164452004-10-16 Daniel Jacobowitz <dan@debian.org>
16446
16447 * linux-i386-low.c (ps_get_thread_area): New.
16448 * linux-x86-64-low.c (ps_get_thread_area): New.
16449 * linux-low.c: Include <sys/syscall.h>.
16450 (linux_kill_one_process): Don't kill the first thread here.
16451 (linux_kill): Kill the first thread here.
16452 (kill_lwp): New function.
16453 (send_sigstop, linux_send_signal): Use it.
16454 * proc-service.c: Clean up #ifdefs.
16455 (fpregset_info): Delete.
16456 (ps_lgetregs): Update and enable implementation.
16457 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16458 implementations.
16459 * remote-utils.c (struct sym_cache, symbol_cache): New.
16460 (input_interrupt): Print a clearer message.
16461 (async_io_enabled): New variable.
16462 (enable_async_io, disable_async_io): Use it. Update comments.
16463 (look_up_one_symbol): Use the symbol cache.
16464 * thread-db.c (thread_db_look_up_symbols): New function.
16465 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16466
f6de3c42
DJ
164672004-10-16 Daniel Jacobowitz <dan@debian.org>
16468
16469 * configure.in: Test for -rdynamic.
16470 * configure: Regenerated.
16471 * Makefile (INTERNAL_LDFLAGS): New.
16472 (gdbserver, gdbreplay): Use it.
16473
2c0fc042
AC
164742004-09-02 Andrew Cagney <cagney@gnu.org>
16475
16476 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16477
075b3282
DJ
164782004-03-23 Daniel Jacobowitz <drow@mvista.com>
16479
16480 * linux-low.c (linux_wait): Clear all_processes list also.
16481
fa6a77dc
DJ
164822004-03-12 Daniel Jacobowitz <drow@mvista.com>
16483
16484 * linux-low.c: Include <errno.h>. Remove extern declaration of
16485 errno.
16486
6d782a97
DJ
164872004-03-12 Daniel Jacobowitz <drow@mvista.com>
16488
16489 * gdbreplay.c, server.h, utils.c: Update copyright years.
16490
3a7fb99b
DJ
164912004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16492
16493 * server.c (main): Print child status or termination signal from
16494 variable 'signal', not 'sig'.
16495
c3e735a6
DJ
164962004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16497
16498 * linux-low.c (linux_read_memory): Change return type to
16499 int. Check for and return error from ptrace().
16500 * target.c (read_inferior_memory): Change return type to int. Pass
16501 back return status from the_target->read_memory().
16502 * target.h (struct target_ops): Adapt *read_memory() prototype.
16503 Update comment.
16504 (read_inferior_memory): Adapt prototype.
16505 * server.c (main): Return an error packet if
16506 read_inferior_memory() returns an error.
16507
a59d1c82
DJ
165082004-03-04 Daniel Jacobowitz <drow@mvista.com>
16509
16510 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16511 Unify with other clean targets.
16512
dc3f8883
DJ
165132004-02-29 Daniel Jacobowitz <drow@mvista.com>
16514
16515 * server.c (handle_v_cont): Call set_desired_inferior.
16516
89a208da
DJ
165172004-02-29 Daniel Jacobowitz <drow@mvista.com>
16518
16519 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16520
62ea82f5
DJ
165212004-02-29 Daniel Jacobowitz <drow@mvista.com>
16522
16523 * linux-low.c (linux_wait): Unblock async I/O.
16524 (linux_resume): Block and enable async I/O.
16525 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16526 * server.h (block_async_io, unblock_async_io): Add prototypes.
16527
6910d122
DJ
165282004-02-29 Daniel Jacobowitz <drow@mvista.com>
16529
16530 * remote-utils.c (remote_open): Print a status notice after
16531 opening a TCP port.
16532 * server.c (attach_inferior): Print a status notice after
16533 attaching.
16534
165352004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16536
16537 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16538
c89dc5d4
DJ
165392004-02-26 Daniel Jacobowitz <drow@mvista.com>
16540
16541 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16542 error packet.
16543 * server.c, target.h: Update copyright years.
16544
4b8dad4a
RM
165452004-02-25 Roland McGrath <roland@redhat.com>
16546
16547 * target.h (struct target_ops): New member `read_auxv'.
16548 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16549 * linux-low.c (linux_read_auxv): New function.
16550 (linux_target_ops): Initialize `read_auxv' member to that.
16551
d7446758
JB
165522004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16553
16554 Committed by Jim Blandy <jimb@redhat.com>.
16555
16556 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16557 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16558 instead of GPR_SIZE to distiguish s390 and s390x targets.
16559
5544ad89
DJ
165602004-01-31 Daniel Jacobowitz <drow@mvista.com>
16561
16562 * linux-low.c: Update copyright year.
16563 (check_removed_breakpoint): Clear pending_is_breakpoint.
16564 (linux_set_resume_request, linux_queue_one_thread)
16565 (resume_status_pending_p): New functions.
16566 (linux_continue_one_thread): Use process->resume.
16567 (linux_resume): Only resume threads if there are no pending events.
16568 * linux-low.h (struct process_info): Add resume request
16569 pointer.
16570
2a68b70e
DJ
165712004-01-30 Daniel Jacobowitz <drow@mvista.com>
16572
16573 * regcache.c (new_register_cache): Clear the allocated register
16574 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16575
64386c31
DJ
165762003-10-13 Daniel Jacobowitz <drow@mvista.com>
16577
16578 * linux-low.c (linux_resume): Take a struct thread_resume *
16579 argument.
16580 (linux_wait): Update call.
16581 (resume_ptr): New static variable.
16582 (linux_continue_one_thread): Renamed from
16583 linux_continue_one_process. Use resume_ptr.
16584 (linux_resume): Use linux_continue_one_thread.
16585 * server.c (handle_v_cont, handle_v_requests): New functions.
16586 (myresume): New function.
16587 (main): Handle 'v' case.
16588 * target.h (struct thread_resume): New type.
16589 (struct target_ops): Change argument of "resume" to struct
16590 thread_resume *.
16591 (myresume): Delete macro.
16592
c938e9b0
L
165932003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16594
16595 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16596 (uninstall): Support DESTDIR.
16597
7f313d07
BC
16598Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16599
16600 * configure.srv: Add xscale*linux copy of arm*linux entry.
16601
3b2fc2ea
DJ
166022003-07-24 Daniel Jacobowitz <drow@mvista.com>
16603
16604 * linux-arm-low.c (arm_reinsert_addr): New function.
16605 (the_low_target): Add arm_reinsert_addr.
16606
1c0a559e
MK
166072003-07-08 Mark Kettenis <kettenis@gnu.org>
16608
16609 * mem-break.c: Remove whitespace at end of file.
16610
43d5792c
DJ
166112003-06-28 Daniel Jacobowitz <drow@mvista.com>
16612
16613 * configure.in: Check whether we need to prototype strerror.
16614 * server.h: Optionally prototype strerror.
16615 * gdbreplay.c (perror_with_name): Use strerror.
16616 * linux-low.c (linux_attach_lwp): Use strerror.
16617 * utils.c (perror_with_name): Use strerror.
16618 * config.in, configure: Regenerated.
16619
c8a86edf
DJ
166202003-06-28 Daniel Jacobowitz <drow@mvista.com>
16621
16622 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16623 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16624
73d37363
DJ
166252003-06-20 Daniel Jacobowitz <drow@mvista.com>
16626
16627 * Makefile.in (SFILES): Update.
16628 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16629 low-sun3.c: Remove files.
16630
6ad8ae5c
DJ
166312003-06-17 Daniel Jacobowitz <drow@mvista.com>
16632
16633 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16634 (linux_detach_one_process, linux_detach): New functions.
16635 (linux_target_ops): Add linux_detach.
16636 * server.c (main): Handle 'D' packet.
16637 * target.h (struct target_ops): Add "detach" member.
16638 (detach_inferior): Define.
16639
1581182a
MK
166402003-06-13 Mark Kettenis <kettenis@gnu.org>
16641
16642 From Kelley Cook <kelleycook@wideopenwest.com>:
16643 * configure.srv: Accept i[34567]86 variants.
16644
e5379b03
DJ
166452003-06-05 Daniel Jacobowitz <drow@mvista.com>
16646
16647 * linux-low.c (linux_wait_for_event): Correct comment typos.
16648 (linux_resume_one_process): Call check_removed_breakpoint.
16649 (linux_send_signal): New function.
16650 (linux_target_ops): Add linux_send_signal.
16651 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16652 of kill.
16653 * target.h (struct target_ops): Add send_signal.
16654
2ff29de4
JB
166552003-05-29 Jim Blandy <jimb@redhat.com>
16656
16657 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16658 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16659 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16660 away part of the register's value.
16661
254787d4
DJ
166622003-03-26 Daniel Jacobowitz <drow@mvista.com>
16663
16664 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16665 (linux_wait_for_event, linux_init_signals): Likewise.
16666
94e10508
DJ
166672003-03-17 Daniel Jacobowitz <drow@mvista.com>
16668
16669 * configure.in: Check for stdlib.h.
16670 * configure: Regenerated.
16671 * config.in: Regenerated.
16672
4c0711e0
DJ
166732003-01-04 Andreas Schwab <schwab@suse.de>
16674
16675 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16676
ef66e766
AC
166772003-01-02 Andrew Cagney <ac131313@redhat.com>
16678
16679 * Makefile.in: Remove obsolete code.
16680
a1358604
DJ
166812002-11-20 Daniel Jacobowitz <drow@mvista.com>
16682
16683 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16684 defined(PT_FPR0_HI).
16685
23ce3b1c
DJ
166862002-11-17 Stuart Hughes <seh@zee2.com>
16687
16688 * linux-arm-low.c (arm_num_regs): Increase.
16689 (arm_regmap): Include status register.
16690
166912002-11-17 Daniel Jacobowitz <drow@mvista.com>
16692
16693 * linux-low.c (register_addr): Remove incorrect -1 check.
16694
a9fa9f7d
DJ
166952002-08-29 Daniel Jacobowitz <drow@mvista.com>
16696
16697 * linux-low.c (linux_create_inferior): Call setpgid. Return
16698 the new PID.
16699 (unstopped_p, linux_signal_pid): Remove.
16700 (linux_target_ops): Remove linux_signal_pid.
16701 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16702 global instead of target method.
16703 * target.h (struct target_ops): Remove signal_pid. Update comment
16704 for create_inferior.
16705 * server.c (signal_pid): New variable.
16706 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16707 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16708 (attach_inferior): Set signal_pid.
16709
17574093
DJ
167102002-08-23 Daniel Jacobowitz <drow@mvista.com>
16711
16712 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16713
167142002-08-20 Jim Blandy <jimb@redhat.com>
16715
16716 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16717 default for this.
16718
167192002-08-01 Andrew Cagney <cagney@redhat.com>
16720
16721 * Makefile.in: Make chill references obsolete.
16722
167232002-07-24 Kevin Buettner <kevinb@redhat.com>
16724
16725 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16726 * configure: Regenerate.
16727 * config.in: Regenerate.
16728
167292002-07-09 David O'Brien <obrien@FreeBSD.org>
16730
16731 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16732 (perror_with_name, remote_close, remote_open, expect, play): Static.
16733
167342002-07-04 Michal Ludvig <mludvig@suse.cz>
16735
4b8dad4a 16736 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16737 byte offsets instead of an array of indexes.
16738 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16739
167402002-06-13 Daniel Jacobowitz <drow@mvista.com>
16741
16742 * regcache.c: Add comment.
16743
167442002-06-11 Daniel Jacobowitz <drow@mvista.com>
16745
16746 * thread-db.c: New file.
16747 * proc-service.c: New file.
16748 * acinclude.m4: New file.
16749 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16750 proc-service.o, and thread-db.o.
16751 (linux-low.o): Add USE_THREAD_DB.
16752 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16753 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16754 * aclocal.m4: Regenerated.
16755 * config.in: Regenerated.
16756 * configure: Regenerated.
16757 * configure.in: Check for proc_service.h, sys/procfs.h,
16758 thread_db.h, and linux/elf.h headrs.
16759 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16760 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16761 Check for -lthread_db and thread support.
16762 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16763 PowerPC, and SuperH.
16764 * i387-fp.c: Constify arguments.
16765 * i387-fp.h: Likewise.
16766 * inferiors.c: (struct thread_info): Renamed from
16767 `struct inferior_info'. Remove PID member. Use generic inferior
16768 list header. All uses updated.
16769 (inferiors, signal_pid): Removed.
16770 (all_threads): New variable.
16771 (get_thread): Define.
16772 (add_inferior_to_list): New function.
16773 (for_each_inferior): New function.
16774 (change_inferior_id): New function.
16775 (add_inferior): Removed.
16776 (remove_inferior): New function.
16777 (add_thread): New function.
16778 (free_one_thread): New function.
16779 (remove_thread): New function.
16780 (clear_inferiors): Use for_each_inferior and free_one_thread.
16781 (find_inferior): New function.
16782 (find_inferior_id): New function.
16783 (inferior_target_data): Update argument type.
16784 (set_inferior_target_data): Likewise.
16785 (inferior_regcache_data): Likewise.
16786 (set_inferior_regcache_data): Likewise.
16787 * linux-low.c (linux_bp_reinsert): Remove.
16788 (all_processes, stopping_threads, using_thrads)
16789 (struct pending_signals, debug_threads, pid_of): New.
16790 (inferior_pid): Replace with macro.
16791 (struct inferior_linux_data): Remove.
16792 (get_stop_pc, add_process): New functions.
16793 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16794 Use add_process and add_thread.
16795 (linux_attach_lwp): New function, based on old linux_attach. Use
16796 add_process and add_thread. Set stop_expected for new threads.
16797 (linux_attach): New function.
16798 (linux_kill_one_process): New function.
16799 (linux_kill): Kill all LWPs.
16800 (linux_thread_alive): Use find_inferior_id.
16801 (check_removed_breakpoints, status_pending_p): New functions.
16802 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16803 Update. Use WNOHANG. Wait for cloned processes also. Update process
16804 struct for the found process.
16805 (linux_wait_for_event): New function.
16806 (linux_wait): Use it. Support LWPs.
16807 (send_sigstop, wait_for_sigstop, stop_all_processes)
16808 (linux_resume_one_process, linux_continue_one_process): New functions.
16809 (linux_resume): Support LWPs.
16810 (REGISTER_RAW_SIZE): Remove.
16811 (fetch_register): Use register_size instead. Call supply_register.
16812 (usr_store_inferior_registers): Likewise. Call collect_register.
16813 Fix recursive case.
16814 (regsets_fetch_inferior_registers): Improve error message.
16815 (regsets_store_inferior_registers): Add debugging.
16816 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16817 (unstopped_p, linux_signal_pid): New functions.
16818 (linux_target_ops): Add linux_signal_pid.
16819 (linux_init_signals): New function.
16820 (initialize_low): Call it. Initialize using_threads.
16821 * regcache.c (inferior_regcache_data): Add valid
16822 flag.
16823 (get_regcache): Fetch registers lazily. Add fetch argument
16824 and update all callers.
16825 (regcache_invalidate_one, regcache_invalidate): New
16826 functions.
16827 (new_register_cache): Renamed from create_register_cache.
16828 Return the new regcache.
16829 (free_register_cache): Change argument to a void *.
16830 (registers_to_string, registers_from_string): Call get_regcache
16831 with fetch flag set.
16832 (register_data): Make static. Pass fetch flag to get_regcache.
16833 (supply_register): Call get_regcache with fetch flag clear.
16834 (collect_register): Call get_regcache with fetch flag set.
16835 (collect_register_as_string): New function.
16836 * regcache.h: Update.
16837 * remote-utils.c (putpkt): Flush after debug output and use
16838 stderr.
16839 Handle input interrupts while waiting for an ACK.
16840 (input_interrupt): Use signal_pid method.
16841 (getpkt): Flush after debug output and use stderr.
16842 (outreg): Use collect_register_as_string.
16843 (new_thread_notify, dead_thread_notify): New functions.
16844 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16845 and general_thread.
16846 (look_up_one_symbol): Flush after debug output.
16847 * server.c (step_thread, server_waiting): New variables.
16848 (start_inferior): Don't use signal_pid. Update call to mywait.
16849 (attach_inferior): Update call to mywait.
16850 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16851 (main): Don't fetch/store registers explicitly. Use
16852 set_desired_inferior. Support proposed ``Hs'' packet. Update
16853 calls to mywait.
16854 * server.h: Update.
16855 (struct inferior_list, struct_inferior_list_entry): New.
16856 * target.c (set_desired_inferior): New.
16857 (write_inferior_memory): Constify.
16858 (mywait): New function.
16859 * target.h: Update.
16860 (struct target_ops): New signal_pid method.
16861 (mywait): Removed macro, added prototype.
16862
16863 * linux-low.h (regset_func): Removed.
16864 (regset_fill_func, regset_store_func): New.
16865 (enum regset_type): New.
16866 (struct regset_info): Add type field. Use new operation types.
16867 (struct linux_target_ops): stop_pc renamed to get_pc.
16868 Add decr_pc_after_break and breakpoint_at.
16869 (get_process, get_thread_proess, get_process_thread)
16870 (strut process_info, all_processes, linux_attach_lwp)
16871 (thread_db_init): New.
16872
16873 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16874 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16875 (the_low_target): Add new members.
16876 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16877 (i386_store_fpxregset): Constify.
16878 (target_regsets): Add new kind identifier.
16879 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16880 (i386_set_pc): Add debugging.
16881 (i386_breakpoint_at): New function.
16882 (the_low_target): Add new members.
16883 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16884 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16885 (mips_breakpoint_at): New.
16886 (the_low_target): Add new members.
16887 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16888 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16889 (the_low_target): Add new members.
16890 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16891 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16892 (the_low_target): Add new members.
16893 * linux-x86-64-low.c (target_regsets): Add new kind
16894 identifier.
16895
168962002-05-15 Daniel Jacobowitz <drow@mvista.com>
16897
16898 From Martin Pool <mbp@samba.org>:
16899 * server.c (gdbserver_usage): New function.
16900 (main): Call it.
16901
169022002-05-14 Daniel Jacobowitz <drow@mvista.com>
16903
16904 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16905 stop_at -> stop_pc.
16906
169072002-05-04 Andrew Cagney <ac131313@redhat.com>
16908
16909 * Makefile.in: Remove obsolete code.
16910
169112002-04-24 Michal Ludvig <mludvig@suse.cz>
16912
16913 * linux-low.c (regsets_fetch_inferior_registers),
16914 (regsets_store_inferior_registers): Removed cast to int from
16915 ptrace() calls.
16916 * regcache.h: Added declaration of struct inferior_info.
16917
169182002-04-20 Daniel Jacobowitz <drow@mvista.com>
16919
16920 * inferiors.c (struct inferior_info): Add regcache_data.
16921 (add_inferior): Call create_register_cache.
16922 (clear_inferiors): Call free_register_cache.
16923 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16924 * regcache.c (struct inferior_regcache_data): New.
16925 (registers): Remove.
16926 (get_regcache): New function.
16927 (create_register_cache, free_register_cache): New functions.
16928 (set_register_cache): Don't initialize the register cache here.
16929 (registers_to_string, registers_from_string, register_data): Call
16930 get_regcache.
16931 * regcache.h: Add prototypes.
16932 * server.h: Likewise.
16933
169342002-04-20 Daniel Jacobowitz <drow@mvista.com>
16935
16936 * mem-break.c: New file.
16937 * mem-break.h: New file.
16938 * Makefile.in: Add mem-break.o rule; update server.h
16939 dependencies.
16940 * inferiors.c (struct inferior_info): Add target_data
16941 member.
16942 (clear_inferiors): Free target_data member if set.
16943 (inferior_target_data, set_inferior_target_data): New functions.
16944 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16945 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16946 * linux-low.c (linux_bp_reinsert): New variable.
16947 (struct inferior_linux_data): New.
16948 (linux_create_inferior): Use set_inferior_target_data.
16949 (linux_attach): Likewise. Call add_inferior.
16950 (linux_wait_for_one_inferior): New function.
16951 (linux_wait): Call it.
16952 (linux_write_memory): Add const.
16953 (initialize_low): Call set_breakpoint_data.
16954 * linux-low.h (struct linux_target_ops): Add breakpoint
16955 handling members.
16956 * server.c (attach_inferior): Remove extra add_inferior
16957 call.
16958 * server.h: Include mem-break.h. Update inferior.c
16959 prototypes.
16960 * target.c (read_inferior_memory)
16961 (write_inferior_memory): New functions.
16962 * target.h (read_inferior_memory)
16963 (write_inferior_memory): Change macros to prototypes.
16964 (struct target_ops): Update comments. Add const to write_memory
16965 definition.
16966
169672002-04-11 Daniel Jacobowitz <drow@mvista.com>
16968
16969 * linux-low.c (usr_store_inferior_registers): Support
16970 registers which are allowed to fail to store.
16971 * linux-low.h (linux_target_ops): Likewise.
16972 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16973 (ppc_cannot_store_register): FPSCR may not be storable.
16974
169752002-04-09 Daniel Jacobowitz <drow@mvista.com>
16976
16977 * server.h: Include <string.h> if HAVE_STRING_H.
16978 * ChangeLog: Correct paths in last ChangeLog entry.
16979
169802002-04-09 Daniel Jacobowitz <drow@mvista.com>
16981
16982 * linux-low.h: Remove obsolete prototypes.
16983 (struct linux_target_ops): New.
16984 (extern the_low_target): New.
16985 * linux-low.c (num_regs, regmap): Remove declarations.
16986 (register_addr): Use the_low_target explicitly.
16987 (fetch_register): Likewise.
16988 (usr_fetch_inferior_registers): Likewise.
16989 (usr_store_inferior_registers): Likewise.
16990 * linux-arm-low.c (num_regs): Remove.
16991 (arm_num_regs): Define.
16992 (arm_regmap): Renamed from regmap, made static.
16993 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16994 made static.
16995 (arm_cannot_store_register): Renamed from cannot_store_register,
16996 made static.
16997 (the_low_target): New.
16998 * linux-i386-low.c (num_regs): Remove.
16999 (i386_num_regs): Define.
17000 (i386_regmap): Renamed from regmap, made static.
17001 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17002 made static.
17003 (i386_cannot_store_register): Renamed from cannot_store_register,
17004 made static.
17005 (the_low_target): New.
17006 * linux-ia64-low.c (num_regs): Remove.
17007 (ia64_num_regs): Define.
17008 (ia64_regmap): Renamed from regmap, made static.
17009 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17010 made static.
17011 (ia64_cannot_store_register): Renamed from cannot_store_register,
17012 made static.
17013 (the_low_target): New.
17014 * linux-m68k-low.c (num_regs): Remove.
17015 (m68k_num_regs): Define.
17016 (m68k_regmap): Renamed from regmap, made static.
17017 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17018 made static.
17019 (m68k_cannot_store_register): Renamed from cannot_store_register,
17020 made static.
17021 (the_low_target): New.
17022 * linux-mips-low.c (num_regs): Remove.
17023 (mips_num_regs): Define.
17024 (mips_regmap): Renamed from regmap, made static.
17025 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17026 made static.
17027 (mips_cannot_store_register): Renamed from cannot_store_register,
17028 made static.
17029 (the_low_target): New.
17030 * linux-ppc-low.c (num_regs): Remove.
17031 (ppc_num_regs): Define.
17032 (ppc_regmap): Renamed from regmap, made static.
17033 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17034 made static.
17035 (ppc_cannot_store_register): Renamed from cannot_store_register,
17036 made static.
17037 (the_low_target): New.
17038 * linux-s390-low.c (num_regs): Remove.
17039 (s390_num_regs): Define.
17040 (s390_regmap): Renamed from regmap, made static.
17041 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17042 made static.
17043 (s390_cannot_store_register): Renamed from cannot_store_register,
17044 made static.
17045 (the_low_target): New.
17046 * linux-sh-low.c (num_regs): Remove.
17047 (sh_num_regs): Define.
17048 (sh_regmap): Renamed from regmap, made static.
17049 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17050 made static.
17051 (sh_cannot_store_register): Renamed from cannot_store_register,
17052 made static.
17053 (the_low_target): New.
17054 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17055 (the_low_target): New.
17056
170572002-04-09 Daniel Jacobowitz <drow@mvista.com>
17058
17059 * Makefile.in: Add stamp-h target.
17060 * configure.in: Create stamp-h.
17061 * configure: Regenerated.
17062
170632002-04-09 Daniel Jacobowitz <drow@mvista.com>
17064
17065 * inferiors.c: New file.
17066 * target.c: New file.
17067 * target.h: New file.
17068 * Makefile.in: Add target.o and inferiors.o. Update
17069 dependencies.
17070 * linux-low.c (inferior_pid): New static variable,
17071 moved from server.c.
17072 (linux_create_inferior): Renamed from create_inferior.
17073 Call add_inferior. Return 0 on success instead of a PID.
17074 (linux_attach): Renamed from myattach.
17075 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17076 (linux_thread_alive): Renamed from mythread_alive.
17077 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17078 child dies.
17079 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17080 (regsets_store_inferior_registers): Correct error message.
17081 Add missing ``return 0''.
17082 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17083 (linux_store_registers): Renamed from store_inferior_registers.
17084 (linux_read_memory): Renamed from read_inferior_memory.
17085 (linux_write_memory): Renamed from write_inferior_memory.
17086 (linux_target_ops): New structure.
17087 (initialize_low): Call set_target_ops ().
17088 * remote-utils.c (unhexify): New function.
17089 (hexify): New function.
17090 (input_interrupt): Send signals to ``signal_pid''.
17091 * server.c (inferior_pid): Remove.
17092 (start_inferior): Update create_inferior call.
17093 (attach_inferior): Call add_inferior.
17094 (handle_query): New function.
17095 (main): Call handle_query for `q' packets.
17096 * server.h: Include "target.h". Remove obsolete prototypes.
17097 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17098
170992002-04-09 Daniel Jacobowitz <drow@mvista.com>
17100
17101 * Makefile.in: Add WARN_CFLAGS. Update configury
17102 dependencies.
17103 * configure.in: Check for <string.h>
17104 * configure: Regenerate.
17105 * config.in: Regenerate.
17106 * gdbreplay.c: Include needed system headers.
17107 (remote_open): Remove strchr prototype.
17108 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17109 * regcache.c (supply_register): Change buf argument to const void *.
17110 (supply_register_by_name): Likewise.
17111 (collect_register): Change buf argument to void *.
17112 (collect_register_by_name): Likewise.
17113 * regcache.h: Add missing prototypes.
17114 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17115 * server.c (handle_query): New function.
17116 (attached): New static variable, moved out of main.
17117 (main): Quiet longjmp clobber warnings.
17118 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17119 * utils.c (error): Remove NORETURN.
17120 (fatal): Likewise.