gdb: Handle ICC's unexpected void return type
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8d619c01
EBM
12018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2
3 * configure.srv (ipa_ppc_linux_regobj): Add
4 powerpc-isa207-htm-vsx32l-ipa.o and
5 powerpc-isa207-htm-vsx64l-ipa.o.
6 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
7 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
8 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
9 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
10 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
11 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
12 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
13 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
14 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
15 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
16 (init_registers_powerpc_isa207_htm_vsx32l)
17 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
18 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
19 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
20 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
21 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
22 (ppc_store_tm_ctarregset): New functions.
23 (ppc_regsets): Add entries for HTM regsets.
24 (ppc_arch_setup): Set htm in features struct when needed. Set
25 sizes for the HTM regsets.
26 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
27 (initialize_low_arch): Call
28 init_registers_powerpc_isa207_htm_vsx32l and
29 init_registers_powerpc_isa207_htm_vsx64l.
30 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
31 PPC_TDESC_ISA207_HTM_VSX.
32 (initialize_low_tracepoint): Call
33 init_registers_powerpc_isa207_htm_vsx32l and
34 init_registers_powerpc_isa207_htm_vsx64l.
35
232bfb86
EBM
362018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
37
38 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
39 rs6000/power-linux-pmu.xml to srv_xmlfiles.
40 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
41 (ppc_store_pmuregset): New functions.
42 (ppc_regsets): Add entries for ebb and pmu regsets.
43 (ppc_arch_setup): Set isa207 in features struct if the ebb and
44 pmu regsets are available. Set sizes for these regsets.
45
f2cf6173
EBM
462018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
47
48 * configure.srv (ipa_ppc_linux_regobj): Add
49 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
50 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
51 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
52 rs6000/powerpc-isa207-vsx32l.xml, and
53 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
54 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
55 <PPC_TDESC_ISA207_VSX>: New enum value.
56 (init_registers_powerpc_isa207_vsx32l): Declare.
57 (init_registers_powerpc_isa207_vsx64l): Declare.
58 * linux-ppc-low.c (ppc_fill_tarregset): New function.
59 (ppc_store_tarregset): New function.
60 (ppc_regsets): Add entry for the TAR regset.
61 (ppc_arch_setup): Set isa207 in features struct when needed. Set
62 size for the TAR regsets.
63 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
64 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
65 and init_registers_powerpc_isa207_vsx64l.
66 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
67 (initialize_low_tracepoint): Call
68 init_registers_powerpc_isa207_vsx32l and
69 init_registers_powerpc_isa207_vsx64l.
70
7ca18ed6
EBM
712018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
72 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
73
74 * configure.srv (ipa_ppc_linux_regobj): Add
75 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
76 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
77 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
78 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
79 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
80 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
81 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
82 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
83 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
84 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
85 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
86 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
87 (ppc_hwcap): Add comment.
88 (ppc_hwcap2): New global.
89 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
90 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
91 (ppc_regsets): Add entries for the DSCR and PPR regsets.
92 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
93 when needed. Set sizes for the the DSCR and PPR regsets.
94 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
95 (initialize_low_arch): Call
96 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
97 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
98 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
99 PPC_TDESC_ISA205_PPR_DSCR_VSX.
100 (initialize_low_tracepoint): Call
101 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
102 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
103
5c849b22
PFC
1042018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
105
106 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
107
8ecfd7bd
SDJ
1082018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
109 Simon Marchi <simark@simark.ca>
110
111 * acinclude.m4: Include "../selftest.m4".
112 * configure: Regenerate.
113 * configure.ac: Use "GDB_AC_SELFTEST".
114 * configure.srv: Use "$enable_unittests" instead of
115 "$development" when checking whether unit tests have been
116 enabled.
117 * server.c (captured_main): Update message informing that
118 selftests have been disabled.
119
96643e35
TT
1202018-10-04 Tom Tromey <tom@tromey.com>
121
122 * configure: Rebuild.
123
da4ae14a
TT
1242018-10-04 Tom Tromey <tom@tromey.com>
125
126 * server.c (handle_status): Rename inner "thread".
127 (process_serial_event): Declare "res" in 'm' case.
128 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
129 (iterate_over_lwps): Rename inner "thread".
130 (linux_qxfer_libraries_svr4): Rename inner "len".
131 * gdbthread.h (find_thread_in_random): Rename inner "thread".
132
7c619dbd
GB
1332018-10-01 Gary Benson <gbenson@redhat.com>
134
135 * gdb_proc_service.h: Moved common code to
136 common/gdb_proc_service.h.
137
3795e814
GB
1382018-10-01 Gary Benson <gbenson@redhat.com>
139
140 * gdb_proc_service.h: Synchronize comments and whitespace with
141 GDB's version of this file.
142
49b036f1
TT
1432018-09-25 Tom Tromey <tom@tromey.com>
144
145 * configure: Rebuild.
146 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
147
8ff03f0b
SM
1482018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
151 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
152 ($(IPA_LIB)): Sort IPA_OBJS.
153
a1cd91dc
SM
1542018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
155
156 * Makefile.in: Remove references to $(ADD_DEPS).
157
752312ba
TT
1582018-09-16 Tom Tromey <tom@tromey.com>
159
160 * remote-utils.c (remote_open): Use GNU style for metasyntactic
161 variables.
162 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
163 variables.
164
f1628857
TT
1652018-09-05 Tom Tromey <tom@tromey.com>
166
167 * configure: Rebuild.
168
ad202fcc
SM
1692018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
170
171 PR build/23399
172 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
173
d3d8724a
TT
1742018-08-27 Tom Tromey <tom@tromey.com>
175
176 PR build/23087:
177 * configure: Rebuild.
178
b4f183d2
TT
1792018-08-27 Tom Tromey <tom@tromey.com>
180
181 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
182 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
183 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
184 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
185 (s390x_emit_stack_adjust): Add casts to unsigned char.
186
4e2aa472
SM
1872018-08-22 Simon Marchi <simon.marchi@ericsson.com>
188
189 PR gdb/23374
190 PR gdb/23375
191 * server.h (struct client_state) <disable_randomization>:
192 Initialize to 1.
193
cf4088a9
SM
1942018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
195
196 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
197 variable.
198 (mips_supply_ptrace_register): Likewise.
199
a0de763e
TT
2002018-07-22 Tom Tromey <tom@tromey.com>
201
202 * configure: Rebuild.
203
b0a7723d
TT
2042018-07-22 Tom Tromey <tom@tromey.com>
205
206 * win32-low.c (win32_create_inferior): Remove unused variables.
207 * gdbreplay.c (remote_open): Remove unused variable.
208 * remote-utils.c (remote_prepare): Remove unused variable.
209 * x86-tdesc.h (X86_TDESC_H): Define.
210 (amd64_expedite_regs): Define conditionally.
211 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
212 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
213 * remote-utils.c (readchar): Remove unused variable.
214
a780ef4f
PA
2152018-07-13 Pedro Alves <palves@redhat.com>
216
217 * linux-low.c (linux_kill): Change parameter to process_info
218 pointer instead of pid. Adjust.
219 * lynx-low.c (lynx_kill): Likewise.
220 * nto-low.c (nto_kill): Likewise.
221 * spu-low.c (spu_kill): Likewise.
222 * win32-low.c (win32_kill): Likewise.
223 * server.c (handle_v_kill, kill_inferior_callback)
224 (detach_or_kill_for_exit): Adjust.
225 * target.c (kill_inferior): Change parameter to process_info
226 pointer instead of pid. Adjust.
227 * target.h (struct target_ops) <kill>: Change parameter to
228 process_info pointer instead of pid. Adjust all implementations
229 and callers.
230 (kill_inferior): Likewise.
231
ef2ddb33
PA
2322018-07-13 Pedro Alves <palves@redhat.com>
233
234 * linux-low.c (linux_detach, linux_join): Change parameter to
235 process_info pointer instead of pid. Adjust.
236 * lynx-low.c (lynx_detach, lynx_join): Likewise.
237 * nto-low.c (nto_detach): Likewise.
238 * spu-low.c (spu_detach, spu_join): Likewise.
239 * win32-low.c (win32_detach, win32_join): Likewise.
240 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
241 * target.h (struct target_ops) <detach, join>: Change parameter to
242 process_info pointer instead of pid. Adjust all implementations
243 and callers.
244 (detach_inferior, join_inferior): Rename 'pid' parameter to
245 'proc'.
246
c7ab0aef
SDJ
2472018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
248 Jan Kratochvil <jan.kratochvil@redhat.com>
249 Paul Fertser <fercerpav@gmail.com>
250 Tsutomu Seki <sekiriki@gmail.com>
251
252 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
253 (OBS): Add 'common/netstuff.o'.
254 (GDBREPLAY_OBS): Likewise.
255 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
256 (remote_open): Implement support for IPv6
257 connections.
258 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
259 and 'wspiapi.h'.
260 (handle_accept_event): Accept connections from IPv6 sources.
261 (remote_prepare): Handle IPv6-style hostnames; implement
262 support for IPv6 connections.
263 (remote_open): Implement support for printing connections from
264 IPv6 sources.
265
31445d10
PA
2662018-07-11 Pedro Alves <palves@redhat.com>
267
268 PR gdb/23377
269 * mem-break.c (any_persistent_commands): Add process_info
270 parameter and use it instead of relying on the current process.
271 Change return type to bool.
272 * mem-break.h (any_persistent_commands): Add process_info
273 parameter and change return type to bool.
274 * server.c (handle_detach): Remove require_running_or_return call.
275 Look up the process_info for the process we're about to detach.
276 If not found, return back error to GDB. Adjust
277 any_persistent_commands call to pass down a process pointer.
278
cb197132
PA
2792018-07-11 Pedro Alves <palves@redhat.com>
280
281 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
282 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
283 instead of collect_register_by_name.
284 * regcache.c (regcache_raw_get_unsigned_by_name): New.
285 * regcache.h (regcache_raw_get_unsigned_by_name): New.
286
1b919490
VB
2872018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
288 Pedro Alves <palves@redhat.com>
289
290 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
291
d7e15655
TT
2922018-07-03 Tom Tromey <tom@tromey.com>
293
294 * linux-low.c: Update.
295 * lynx-low.c: Update.
296 * mem-break.c: Update.
297 * nto-low.c: Update.
298 * remote-utils.c: Update.
299 * server.c: Update.
300 * spu-low.c: Update.
301 * target.c: Update.
302 * win32-low.c: Update.
303
26a57c92
TT
3042018-07-03 Tom Tromey <tom@tromey.com>
305
306 * server.c: Update.
307
0e998d96
TT
3082018-07-03 Tom Tromey <tom@tromey.com>
309
310 * linux-low.c: Update.
311
cc6bcb54
TT
3122018-07-03 Tom Tromey <tom@tromey.com>
313
314 * target.c: Update.
315
e38504b3
TT
3162018-07-03 Tom Tromey <tom@tromey.com>
317
318 * linux-low.c: Update.
319 * linux-mips-low.c: Update.
320 * lynx-low.c: Update.
321 * nto-low.c: Update.
322 * remote-utils.c: Update.
323 * server.c: Update.
324 * spu-low.c: Update.
325 * target.c: Update.
326 * thread-db.c: Update.
327
e99b03dc
TT
3282018-07-03 Tom Tromey <tom@tromey.com>
329
330 * linux-low.c: Update.
331 * linux-mips-low.c: Update.
332 * lynx-low.c: Update.
333 * mem-break.c: Update.
334 * nto-low.c: Update.
335 * remote-utils.c: Update.
336 * server.c: Update.
337 * spu-low.c: Update.
338 * target.c: Update.
339 * tracepoint.c: Update.
340
f2907e49
TT
3412018-07-03 Tom Tromey <tom@tromey.com>
342
343 * linux-low.c: Update.
344 * linux-ppc-low.c: Update.
345 * linux-x86-low.c: Update.
346 * proc-service.c: Update.
347 * server.c: Update.
348 * spu-low.c: Update.
349 * thread-db.c: Update.
350 * win32-low.c: Update.
351
fd79271b
TT
3522018-07-03 Tom Tromey <tom@tromey.com>
353
354 * linux-low.c: Update.
355 * lynx-low.c: Update.
356 * nto-low.c: Update.
357 * remote-utils.c: Update.
358 * spu-low.c: Update.
359 * thread-db.c: Update.
360 * win32-low.c: Update.
361
c0867626
SDJ
3622018-06-29 Joel Brobecker <brobecker@adacore.com>
363
364 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
365 parameter in call to 'amd64_create_target_description'.
366
2512d7ef
JK
3672018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
368
369 * x86-tdesc.h: Remove executable permission flag.
370
d0ac1c44
SM
3712018-06-19 Simon Marchi <simon.marchi@ericsson.com>
372
373 * configure.ac: Remove AC_PREREQ, add missing quoting.
374 * configure: Re-generate.
375 * config.in: Re-generate.
376 * aclocal.m4: Re-generate.
377
c4eb05ff
SM
3782018-06-18 Simon Marchi <simon.marchi@ericsson.com>
379
380 * tracepoint.h (current_traceframe): Remove declaration.
381
02895270
AH
3822018-06-18 Alan Hayward <alan.hayward@arm.com>
383
384 * linux-aarch64-low.c (is_sve_tdesc): New function.
385 (aarch64_sve_regs_copy_to_regcache): Likewise.
386 (aarch64_sve_regs_copy_from_regcache): Likewise.
387 (aarch64_regs_info): Add SVE checks.
388 (initialize_low_arch): Initialize SVE.
389
e9902bfc
AH
3902018-06-18 Alan Hayward <alan.hayward@arm.com>
391
392 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
393
fefa175e
AH
3942018-06-11 Alan Hayward <alan.hayward@arm.com>
395
396 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
397 (initialize_low_tracepoint): Likewise
398 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
399 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
400 param.
401 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
402 checks.
403 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
404
b91ad3ff
AH
4052018-06-11 Alan Hayward <alan.hayward@arm.com>
406
407 * server.h (PBUFSIZ): Increase size
408
f868386e
AH
4092018-06-11 Alan Hayward <alan.hayward@arm.com>
410
411 * regcache.c (regcache::raw_compare): New function.
412 * regcache.h (regcache::raw_compare): New declaration.
413
9c861883
AH
4142018-06-11 Alan Hayward <alan.hayward@arm.com>
415
416 * regcache.c (new_register_cache): Use new.
417 (free_register_cache): Use delete.
418 (register_data): Use const.
419 (supply_register): Move body inside regcache.
420 (regcache::raw_supply): New override function.
421 (collect_register): Move body inside regcache.
422 (regcache::raw_collect): New override function.
423 (regcache::get_register_status): New override function.
424 * regcache.h (struct regcache): Inherit from reg_buffer_common.
425
40591844
TT
4262018-06-09 Tom Tromey <tom@tromey.com>
427
428 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
429 declare queue.
430 (event_queue): Use std::queue.
431 (gdb_event_xfree): Remove.
432 (initialize_event_loop, process_event, wait_for_event): Update.
433
6341380d
SC
4342018-06-08 Stan Cox <scox@redhat.com>
435
436 * win32-low.c (win32_create_inferior): last_ptid and last_status
437 moved to client_state.
438
03349c93
PA
4392018-06-08 Pedro Alves <palves@redhat.com>
440
441 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
442 common/common-exceptions.o, common/common-utils.o,
443 common/errors.o, common/print-utils.o and utils.o.
444 * gdbreplay.c: Include "common-defs.h" instead of the two
445 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
446 string.h or alloca.h.
447 (perror_with_name): Delete.
448 (remote_open): Use xstrdup instead of strdup.
449 (main): Rename to ...
450 (captured_main): ... this.
451 (main): New.
452
8dcc53b3
TT
4532018-06-08 Tom Tromey <tom@tromey.com>
454
455 * linux-low.c (linux_low_read_btrace): Update.
456
c12a5089
SC
4572018-06-04 Stan Cox <scox@redhat.com>
458
459 * server.h (struct client_state): New.
460 * server.c (cont_thread, general_thread, multi_process)
461 (report_fork_events, report_vfork_events, report_exec_events)
462 (report_thread_events, swbreak_feature, hwbreak_feature)
463 (vCont_supported, disable_randomization, pass_signals)
464 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
465 Moved to client_state.
466 * remote-utils.c (remote_debug, noack_mode)
467 (transport_is_reliable): Moved to client_state.
468 * tracepoint.c (current_traceframe): Moved to client_state.
469
470 Update all callers.
471 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
472 linux-low.c, remote-utils.h, target.c: Use client_state.
473
122394f1
AH
4742018-05-31 Alan Hayward <alan.hayward@arm.com>
475
476 * configure.srv: Add new c/h file.
477
95228a0d
AH
4782018-05-31 Alan Hayward <alan.hayward@arm.com>
479
480 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
481 null VQ.
482
d8dab6c3
MR
4832018-05-25 Maciej W. Rozycki <macro@mips.com>
484
485 * gdb.arch/mips-fpregset-core.exp: New test.
486 * gdb.arch/mips-fpregset-core.c: New test source.
487
81e25b7c
EK
4882018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
489
490 PR server/23198
491 * hostio.c (require_int): Do not report overflow for integers
492 between 0xfffffff and 0x7fffffff.
493
7e947ad3
MR
4942018-05-22 Maciej W. Rozycki <macro@mips.com>
495
496 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
497 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
498 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
499 functions.
500 (the_low_target): Wire them.
501
1d75a658
PFC
5022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
503
504 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
505 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
506 mode. Call collect_register_by_name with vscr using
507 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
508 (ppc_store_vrregset): Add and set vscr_offset variable as in
509 ppc_fill_vrregset. Call supply_register_by_name with vscr using
510 vscr_offset.
511
d078308a
PFC
5122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
513
514 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
515 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
516 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
517
7273b5fc
PFC
5182018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
519
520 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
521 (ppc_store_vsxregset): Likewise.
522 (ppc_fill_vrregset): Likewise.
523 (ppc_store_vrregset): Likewise.
524 (ppc_fill_evrregset): Likewise.
525 (ppc_store_evrregset): Likewise.
526 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
527 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
528 needed.
529
2e077f5e
PFC
5302018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
531
532 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
533 wordsize of the inferior. Call ppc_linux_target_wordsize.
534
bd64614e
PFC
5352018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
536
537 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
538 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
539 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
540 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
541 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
542 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
543 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
544 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
545 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
546 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
547 (tdesc_powerpc_e500l): Remove.
548 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
549 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
550 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
551 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
552 linux-ppc-tdesc.h.
553 (ppc_arch_setup): Remove target description matching code. Fill a
554 ppc_linux_features struct and call ppc_linux_match_description
555 with it.
556
75d74cca
MR
5572018-05-22 Maciej W. Rozycki <macro@mips.com>
558
559 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
560 width of the requested register exceeds the width of the
561 `ptrace' data type.
562 (mips_cannot_store_register): Likewise.
563
e4439e43
MR
5642018-05-21 Maciej W. Rozycki <macro@mips.com>
565
566 * linux-mips-low.c (mips_fetch_register): New function. Update
567 preceding comment.
568 (mips_store_gregset): Supply 0 rather than $restart for $zero.
569 (the_low_target): Wire `mips_fetch_register'.
570
55271bf9
JB
5712018-05-10 Joel Brobecker <brobecker@adacore.com>
572
573 * lynx-i386-low.c (LYNXOS_178): New macro.
574 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
575 the layout on LynxOS-178.
576 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
577 handle floating point registers that are not supported by
578 LynxOS-178.
579
1a34f210
TT
5802018-05-10 Tom Tromey <tom@tromey.com>
581
582 * configure: Rebuild.
583
190852c8
JB
5842018-05-10 Joel Brobecker <brobecker@adacore.com>
585
586 PR server/23158:
587 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
588 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
589 Use it to set the expedite_regs field in the given tdesc.
590 * x86-tdesc.h: New file.
591 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
592 Adjust following the addition of the new expedite_regs parameter
593 to init_target_desc.
594 * linux-tic6x-low.c (tic6x_read_description): Likewise.
595 * linux-x86-tdesc.c: #include "x86-tdesc.h".
596 (i386_linux_read_description, amd64_linux_read_description):
597 Adjust following the addition of the new expedite_regs parameter
598 to init_target_desc.
599 * lynx-i386-low.c: #include "x86-tdesc.h".
600 (lynx_i386_arch_setup): Adjust following the addition of the new
601 expedite_regs parameter to init_target_desc.
602 * nto-x86-low.c: #include "x86-tdesc.h".
603 (nto_x86_arch_setup): Adjust following the addition of the new
604 expedite_regs parameter to init_target_desc.
605 * win32-i386-low.c: #include "x86-tdesc.h".
606 (i386_arch_setup): Adjust following the addition of the new
607 expedite_regs parameter to init_target_desc.
608
7dbac825
JB
6092018-05-10 Joel Brobecker <brobecker@adacore.com>
610
611 PR server/23158:
612 * win32-low.c (win32_create_inferior): Add call to my_wait
613 setting last_status global.
614
906994d9
JB
6152018-05-10 Joel Brobecker <brobecker@adacore.com>
616
617 PR server/23158:
618 * win32-low.c (create_process): Only call gdb_tilde_expand if
619 inferior_cwd is not NULL.
620
8ee22052
AB
6212018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
622
623 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
624 registers to the cache if their values have changed.
625 (i387_xsave_to_cache): Provide default values for x87 control
626 registers when these features are available, but disabled.
627 * regcache.c (supply_register_by_name_zeroed): New function.
628 * regcache.h (supply_register_by_name_zeroed): Declare new
629 function.
630
aff689d3
TT
6312018-05-07 Tom Tromey <tom@tromey.com>
632
633 * configure: Rebuild.
634
85e26832
TT
6352018-05-04 Tom Tromey <tom@tromey.com>
636
637 * configure: Rebuild.
638
a3b60e45
JK
6392018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
640 Pedro Alves <palves@redhat.com>
641
642 * linux-aarch64-low.c (aarch64_stopped_data_address):
643 Likewise.
644
632e107b
TT
6452018-04-27 Tom Tromey <tom@tromey.com>
646
647 * configure: Rebuild.
648
458412c3
TT
6492018-04-23 Tom Tromey <tom@tromey.com>
650
651 * configure: Rebuild.
652
f31c089e
SM
6532018-04-19 Simon Marchi <simon.marchi@ericsson.com>
654
655 * Makefile.in (depcomp): Add "..".
656 (all_deps_files): New and use it.
657
b319b098
AH
6582018-04-18 Alan Hayward <alan.hayward@arm.com>
659
660 * configure.srv (aarch64*-*-linux*): Don't include xml.
661 (i[34567]86-*-cygwin*): Likewise.
662 (i[34567]86-*-linux*): Likewise.
663 (i[34567]86-*-lynxos*): Likewise.
664 (i[34567]86-*-mingw32ce*): Likewise.
665 (i[34567]86-*-mingw*): Likewise.
666 (i[34567]86-*-nto*): Likewise.
667 (tic6x-*-uclinux): Likewise.
668 (x86_64-*-linux*): Likewise.
669 (x86_64-*-mingw*): Likewise.
670 (x86_64-*-cygwin*): Likewise.
671
3b74854b
AH
6722018-04-18 Alan Hayward <alan.hayward@arm.com>
673
674 * tdesc.c: Remove xml parameter.
675
e98577a9
AH
6762018-04-18 Alan Hayward <alan.hayward@arm.com>
677
678 * server.c (get_features_xml): Remove cast.
679 * tdesc.c (void target_desc::accept): Fill in function.
680 (tdesc_get_features_xml): Remove old xml creation.
681 (print_xml_feature::visit_pre): Add xml vistor.
682 * tdesc.h (struct target_desc): Make xmltarget mutable.
683 (tdesc_get_features_xml): Remove declaration.
684
d278f585
AH
6852018-04-18 Alan Hayward <alan.hayward@arm.com>
686
687 * tdesc.c (tdesc_architecture_name): Add new function.
688 (tdesc_osabi_name): Likewise.
689 (tdesc_get_features_xml): Use new functions.
690
eee8a18d
AH
6912018-04-18 Alan Hayward <alan.hayward@arm.com>
692
693 * tdesc.c (tdesc_create_flags): Remove.
694 (tdesc_add_flag): Likewise.
695 (tdesc_named_type): Likewise.
696 (tdesc_create_union): Likewise.
697 (tdesc_create_struct): Likewise.
698 (tdesc_create_vector): Likewise.
699 (tdesc_add_bitfield): Likewise.
700 (tdesc_add_field): Likewise.
701 (tdesc_set_struct_size): Likewise.
702
82ec9bc7
AH
7032018-04-18 Alan Hayward <alan.hayward@arm.com>
704
705 * tdesc.c (~target_desc): Remove implictly deleted items.
706 (init_target_desc): Iterate all features.
707 (tdesc_get_features_xml): Use vector.
708 (tdesc_create_feature): Create feature.
709 * tdesc.h (tdesc_feature) Remove
710 (target_desc): Add features.
711
ea3e7d71
AH
7122018-04-18 Alan Hayward <alan.hayward@arm.com>
713
714 * Makefile.in: Add common/tdesc.c
715 * tdesc.c (init_target_desc): init all reg_defs from register
716 vector.
717 (tdesc_create_reg): Create tdesc_reg.
718 * tdesc.h (tdesc_feature): Add register vector.
719
17d08cd4
SM
7202018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
721
722 * tdesc.h (struct target_desc) <features>: Change type to
723 std::vector<std::string>.
724 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
725 changes.
726 (tdesc_get_features_xml): Likewise.
727 (tdesc_create_feature): Likewise.
728
5cd3e386
AH
7292018-03-26 Alan Hayward <alan.hayward@arm.com>
730
731 * regcache.c (find_register_by_number): Return a ref.
732 (find_regno): Use references.
733 (register_size): Likewise.
734 (register_data): Likewise.
735 * tdesc.c (target_desc::~target_desc): Remove free calls.
736 (target_desc::operator==): Use std::vector compare.
737 (init_target_desc): Use reference.
738 (tdesc_create_reg): Use reg constructors.
739 * tdesc.h (struct target_desc): Replace pointer with object.
740
dff7492c
AH
7412018-03-23 Alan Hayward <alan.hayward@arm.com>
742
743 * regcache.c (find_register_by_number): Make static.
744 (find_regno): Use find_register_by_number
745 * regcache.h (struct reg): Remove declaration.
746
d80e5242
AH
7472018-03-23 Alan Hayward <alan.hayward@arm.com>
748
749 * tdesc.c (target_desc::~target_desc): Move to here.
750 (target_desc::operator==): Likewise.
751 * tdesc.h (target_desc::~target_desc): Move from here.
752 (target_desc::operator==): Likewise.
753
f69c5afb
AA
7542018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
755
756 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
757
ce29f843
AA
7582018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
759
760 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
761 S390_TDESC_GS.
762 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
763 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
764 and init_registers_s390_gs_linux64.
765
c49bd90b
AA
7662018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
767
768 * linux-s390-low.c (s390_fill_gs): Remove function.
769 (s390_fill_gsbc): Remove function.
770 (s390_regsets): Set fill functions for the guarded storage regsets
771 to NULL.
772
7edb9bd3
AA
7732018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
774
775 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
776 the word size. Add comment.
777 (s390_get_wordsize): New function.
778 (s390_arch_setup): No longer select a temporary tdesc to fetch the
779 pswm with it. Instead, use s390_get_wordsize to determine the
780 word size first and derive the correct tdesc from that directly.
781
39be3c7e
SM
7822018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
783
784 * Makefile.in: Include silent-rules.mk.
785 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
786 (COMPILE): Add ECHO_CXX.
787 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
788 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
789 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
790 (version-generated.c): Add ECHO_GEN.
791 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
792 (IPAGENT_COMPILE): Add ECHO_CXX.
793 (%-generated.c): Add ECHO_REGDAT.
794
3ae9ce5d
TT
7952018-03-14 Tom Tromey <tom@tromey.com>
796
797 PR cli/14977:
798 * ax.c (ax_printf): Special case for NULL.
799
e6a58aa8
SM
8002018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * linux-low.c (linux_qxfer_libraries_svr4): Use
803 xml_escape_text_append.
804
f6e8a41e
SM
8052018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
806
807 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
808
b9671caf
SM
8092018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
810
811 * server.c (handle_general_set): Remove unnecessary xstrdup.
812
e80aaf61
SM
8132018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
814
815 * server.c (parse_debug_format_options): Adjust to
816 delim_string_to_char_ptr_vec changes.
817 * thread-db.c (thread_db_load_search): Adjust to
818 dirnames_to_char_ptr_vec changes.
819
b1223e78
MM
8202018-03-01 Markus Metzger <markus.t.metzger@intel.com>
821
822 * target.h (target_enable_btrace, target_disable_btrace)
823 (target_read_btrace, target_read_btrace_conf): Turn macro into
824 inline function. Throw error if target method is not defined.
825 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
826 check for btrace target method. Be prepared to handle exceptions
827 from btrace target methods.
828
81561546
SDJ
8292018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
830
831 * server.c (captured_main): Change order of error message printed
832 when the current working directory cannot be found.
833
25e3c82c
SDJ
8342018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
835
836 * server.c: Include "filenames.h" and "pathstuff.h".
837 (program_name): Delete variable.
838 (program_path): New anonymous class.
839 (get_exec_wrapper): Use "program_path" instead of
840 "program_name".
841 (handle_v_run): Likewise.
842 (captured_main): Likewise.
843 (process_serial_event): Likewise.
844
b4987c95
SDJ
8452018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
846
847 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
848 (OBJS): Add "pathstuff.o".
849 * server.c (current_directory): New global variable.
850 (captured_main): Initialize "current_directory".
851
f46cd62a
AH
8522018-02-26 Alan Hayward <alan.hayward@arm.com>
853
854 * tdesc.c: Use common/tdesc.h.
855 * tdesc.h: Likewise.
856
a543c5ca
AH
8572018-02-20 Alan Hayward <alan.hayward@arm.com>
858 Simon Marchi <simon.marchi@ericsson.com>
859
860 * Makefile.in: Switch order of make rules.
861
b5884fa7
AH
8622018-02-19 Alan Hayward <alan.hayward@arm.com>
863
864 * Makefile.in: Add common directory in build.
865 * configure.ac: Add common reference.
866 * configure: Regenerate.
867
de6242d3
MM
8682018-02-09 Markus Metzger <markus.t.metzger@intel.com>
869
870 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
871 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
872 * spu-low.c (spu_target_ops): Likewise.
873 * win32-low.c (win32_target_ops): Likewise.
874 * server.c (supported_btrace_packets): Report packets unconditionally.
875 * target.h (target_ops) <supports_btrace>: Remove.
876 (target_supports_btrace): Remove.
877
9ee23a85
MM
8782018-02-09 Markus Metzger <markus.t.metzger@intel.com>
879
880 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
881 (handle_btrace_disable): Change return type to void. Use exceptions
882 to report errors.
883 (handle_btrace_general_set): Catch exception and copy message to
884 return message.
885
8ce47547
TT
8862018-02-08 Tom Tromey <tom@tromey.com>
887
888 * linux-low.c (install_software_single_step_breakpoints): Use
889 make_scoped_restore.
890 * inferiors.c (make_cleanup_restore_current_thread): Remove.
891 (do_restore_current_thread_cleanup): Remove.
892 * gdbthread.h (make_cleanup_restore_current_thread): Don't
893 declare.
894
45dd3607
TT
8952018-02-08 Tom Tromey <tom@tromey.com>
896
897 * mem-break.c (set_raw_breakpoint_at): Use
898 gdb::unique_xmalloc_ptr.
899
e671cd59
PA
9002018-01-30 Pedro Alves <palves@redhat.com>
901
902 PR gdb/13211
903 * target.c (target_terminal::terminal_state): Rename to ...
904 (target_terminal::m_terminal_state): ... this.
905
a0aad537
JC
9062018-01-19 James Clarke <jrtc27@jrtc27.com>
907
908 * linux-low.c (handle_extended_wait): Surround call to
909 thread_db_notice_clone with #ifdef USE_THREAD_DB.
910
4d9b86e1
SM
9112018-01-17 Simon Marchi <simon.marchi@ericsson.com>
912
913 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
914 linux_ptrace_attach_fail_reason_string now returning an
915 std::string.
916 (linux_attach): Likewise.
917 * thread-db.c (attach_thread): Likewise.
918
f517c180
EA
9192018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
920
921 PR gdb/21559
922 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
923 checking for fs_base/gs_base fields in struct user_regs_struct.
924 * configure: Regenerate.
925
9a70f35c
YQ
9262018-01-16 Yao Qi <yao.qi@linaro.org>
927
928 PR gdb/18749
929 * linux-low.c (fetch_register): Call supply_register instead of
930 error.
931
605fd3c6
YQ
9322018-01-08 Yao Qi <yao.qi@linaro.org>
933 Simon Marchi <simon.marchi@ericsson.com>
934
935 * Makefile.in (OBS): Remove selftest.o.
936 * configure.ac: Set srv_selftest_objs if $development is true.
937 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
938 * configure: Re-generated.
939 * server.c (captured_main): Wrap variable selftest_filter with
940 GDB_SELF_TEST.
941
2cc05030
SM
9422018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * server.c (parse_debug_format_options): Return std::string.
945 (handle_monitor_command, captured_main): Adjust.
946
e379cee6
PA
9472018-01-05 Pedro Alves <palves@redhat.com>
948
949 PR gdb/18653
950 * server.c (captured_main): Pass quiet=false to
951 save_original_signals_state.
952
82e1e79a
JB
9532018-01-01 Joel Brobecker <brobecker@adacore.com>
954
955 * gdbreplay.c (gdbreplay_version): Update copyright year in
956 version message.
957 * server.c (gdbserver_version): Likewise.
958
8e481c3b
TT
9592017-12-08 Tom Tromey <tom@tromey.com>
960
961 * ax.c (ax_printf): Update.
962
a8806230
YQ
9632017-12-07 Yao Qi <yao.qi@linaro.org>
964
965 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
966 aarch64_linux_read_description.
967 * linux-amd64-ipa.c (idx2mask): New array.
968 (get_ipa_tdesc): Move idx2mask out.
969 (initialize_low_tracepoint): Initialize target descriptions.
970 * linux-i386-ipa.c (idx2mask): New array.
971 (get_ipa_tdesc): Move idx2mask out.
972 (initialize_low_tracepoint): Initialize target descriptions.
973
d4a0e8b5
SM
9742017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * tdesc.c (struct tdesc_type): Change return type.
977 (tdesc_add_flag): Change parameter type.
978 (tdesc_add_bitfield): Likewise.
979 (tdesc_add_field): Likewise.
980 (tdesc_set_struct_size): Likewise.
981
798a7429
SM
9822017-12-05 Simon Marchi <simon.marchi@ericsson.com>
983
984 * regcache.c (registers_to_string): Remove unused variable.
985
c0e15c9b
SM
9862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
987
988 * inferiors.c (for_each_inferior_with_data): Remove.
989 * inferiors.h (for_each_inferior_with_data): Remove.
990 * server.c (handle_qxfer_threads_worker): Change parameter type.
991 (handle_qxfer_threads_proper): Use for_each_thread.
992
f0045347
SM
9932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
994
995 * inferiors.c (for_each_inferior): Remove.
996 (clear_inferiors): Use for_each_thread.
997 * inferiors.h (for_each_inferior): Remove.
998 * linux-low.c (linux_wait_for_event_filtered): Use
999 for_each_thread.
1000 (linux_stabilize_threads): Likewise.
1001 * regcache.c (regcache_release): Likewise.
1002 * server.c (gdb_wants_all_threads_stopped): Likewise.
1003 (clear_pending_status_callback): Remove.
1004 (handle_status): Use for_each_thread.
1005 (captured_main): Likewise.
1006 * win32-low.c (child_init_thread_list): Likewise.
1007 (win32_clear_inferiors): Likewise.
1008 (fake_breakpoint_event): Likewise.
1009
9521758b
SM
10102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1011
1012 * inferiors.h (find_inferior): Remove.
1013 * inferiors.c (find_inferior): Remove.
1014
8f86d7aa
SM
10152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1016
1017 * linux-low.c (resume_status_pending_p): Update comment.
1018 (need_step_over_p): Update comment.
1019
e2b44075
SM
10202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1021
1022 * linux-low.c (proceed_one_lwp): Return void, change parameter
1023 type.
1024 (unsuspend_and_proceed_one_lwp): Likewise.
1025 (proceed_all_lwps): Use for_each_thread.
1026 (unstop_all_lwps): Likewise.
1027
c80825ff
SM
10282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1029
1030 * linux-low.c (linux_resume_one_thread): Return void, take
1031 parameter directly.
1032 (linux_resume): Use for_each_thread.
1033
df3e4dbe
SM
10342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1035
1036 * linux-low.c (send_sigstop_callback): Return void, change
1037 parameter type. Rename to...
1038 (send_sigstop): ... this.
1039 (suspend_and_send_sigstop_callback): Return void, change parameter
1040 type. Rename to...
1041 (suspend_and_send_sigstop): ... this.
1042 (stop_all_lwps): Use for_each_thread.
1043
5a6b0a41
SM
10442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * linux-low.c (lwp_running): Return bool, remove unused
1047 argument.
1048 (linux_stabilize_threads): Use find_thread.
1049
39a64da5
SM
10502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1051
1052 * linux-low.c (select_singlestep_lwp_callback): Remove.
1053 (count_events_callback): Remove.
1054 (select_event_lwp_callback): Remove.
1055 (select_event_lwp): Use find_thread/for_each_thread.
1056
a1385b7b
SM
10572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1058
1059 * linux-low.c (not_stopped_callback): Return bool, take filter
1060 argument directly.
1061 (linux_wait_for_event_filtered): Use find_thread.
1062 (linux_wait_1): Likewise.
1063
454296a2
SM
10642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1065
1066 * linux-low.c (same_lwp): Remove.
1067 (find_lwp_pid): Use find_thread.
1068
6b2a85da
SM
10692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1070
1071 * linux-low.c (delete_lwp_callback): Remove.
1072 (linux_mourn): Use for_each_thread.
1073
798a38e8
SM
10742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1075
1076 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1077 args parameter, don't check for pid.
1078 (linux_detach): Use for_each_thread.
1079
e4eb0dec
SM
10802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1081
1082 * linux-low.c (struct counter): Remove.
1083 (second_thread_of_pid_p): Remove.
1084 (last_thread_of_process_p): Use find_thread.
1085
83e1b6c1
SM
10862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1087
1088 * inferiors.c (find_inferior_in_random): Remove.
1089 * inferiors.h (find_inferior_in_random): Remove.
1090 * linux-low.c (status_pending_p_callback): Return bool, accept
1091 parameter ptid directly.
1092 (linux_wait_for_event_filtered): Use find_thread_in_random.
1093 (linux_wait_1): Likewise.
1094
8dc7b443
SM
10952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * inferiors.c (find_inferior_id): Remove.
1098 (find_thread_ptid): Move implemention from find_inferior_id to
1099 here.
1100 * inferiors.h (find_inferior_id): Remove.
1101 * server.c (handle_status): Use find_thread_ptid.
1102 (process_serial_event): Likewise.
1103 * thread-db.c (find_one_thread): Likewise.
1104 (thread_db_thread_handle): Likewise.
1105 * win32-low.c (thread_rec): Likewise.
1106 (child_delete_thread): Likewise.
1107 (win32_thread_alive): Likewise.
1108 (get_child_debug_event): Likewise.
1109
da25033c
SM
11102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1111
1112 * linux-mips-low.c (update_watch_registers_callback): Return
1113 void, remove pid_p parameter, don't check for pid.
1114 (mips_insert_point, mips_remove_point): Use for_each_thread.
1115
c91bb56b
SM
11162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1117
1118 * lynx.low (lynx_delete_thread_callback): Remove.
1119 (lynx_mourn): Use for_each_thread.
1120
634a3254
SM
11212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1122
1123 * regcache.c (regcache_invalidate_one): Remove.
1124 (regcache_invalidate_pid): use for_each_thread.
1125
41272101
TT
11262017-11-26 Tom Tromey <tom@tromey.com>
1127
1128 * linux-low.c (linux_create_inferior): Update.
1129
f5291a6f
UW
11302017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1131
1132 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1133
6654d750
AH
11342017-11-24 Alan Hayward <alan.hayward@arm.com>
1135
1136 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1137 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1138 * linux-aarch64-tdesc-selftest.c: New file.
1139 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1140
11412017-11-24 Alan Hayward <alan.hayward@arm.com>
1142
1143 * configure.srv: Add new file.
1144 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1145 * linux-aarch64-tdesc-selftest.c: New file.
1146 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1147
49bdb7ee
AH
11482017-11-24 Alan Hayward <alan.hayward@arm.com>
1149
1150 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1151 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1152 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1153
d6d7ce56
AH
11542017-11-24 Alan Hayward <alan.hayward@arm.com>
1155
1156 * configure.srv: Add new files.
1157 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1158 aarch64_linux_read_description.
1159 * linux-aarch64-low.c (aarch64_linux_read_description):
1160 Merge with aarch64_arch_setup.
1161 (aarch64_arch_setup): Call aarch64_linux_read_description.
1162 * linux-aarch64-tdesc.c: New file.
1163 * linux-aarch64-tdesc.h: New file.
1164
506fe5f4
YQ
11652017-11-24 Yao Qi <yao.qi@linaro.org>
1166
1167 * configure.srv: Set $srv_regobj for tic6x-linux.
1168 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1169 (tic6x_read_description): Move some code to tic6x_arch_setup.
1170 (tic6x_tdesc_test): New function.
1171 (initialize_low_arch): Call selftests::register_test.
1172
29f9a567
YQ
11732017-11-22 Yao Qi <yao.qi@linaro.org>
1174
1175 * remote-utils.c (prepare_resume_reply): Use memcpy.
1176
578290ec
SM
11772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1178
1179 * linux-low.c (kill_one_lwp_callback): Return void, take
1180 argument directly, don't filter on pid.
1181 (linux_kill): Use for_each_thread.
1182
eca55aec
SM
11832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * linux-low.c (need_step_over_p): Return bool, remove dummy
1186 argument.
1187 (linux_resume, proceed_all_lwps): Use find_thread.
1188
25c28b4d
SM
11892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1190
1191 * linux-low.c (resume_status_pending_p): Return bool, remove
1192 flag_p argument.
1193 (linux_resume): Use find_thread.
1194
5fdda392
SM
11952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1196
1197 * linux-low.c (struct thread_resume_array): Remove.
1198 (linux_set_resume_request): Return void, take arguments
1199 directly.
1200 (linux_resume): Use for_each_thread.
1201
fcb056a5
SM
12022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1203
1204 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1205 return bool, remove data argument.
1206 (linux_stabilize_threads): Use find_thread.
1207
139720c5
SM
12082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1209
1210 * linux-low.c (unsuspend_one_lwp): Remove.
1211 (unsuspend_all_lwps): Use for_each_thread, inline code from
1212 unsuspend_one_lwp.
1213
6d1e5673
SM
12142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1215
1216 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1217 * linux-low.c (struct iterate_over_lwps_args): Remove.
1218 (iterate_over_lwps_filter): Remove.
1219 (iterate_over_lwps): Use find_thread.
1220
bbf550d5
SM
12212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1224 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1225 code from reset_lwp_ptrace_options_callback.
1226
00192f77
SM
12272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1228
1229 * linux-arm-low.c (struct update_registers_data): Remove.
1230 (update_registers_callback): Return void, take arguments
1231 directly, don't check thread's pid.
1232 (arm_insert_point, arm_remove_point): Use for_each_thread.
1233
2bee2b6c
SM
12342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1235
1236 * win32-low.c (continue_one_thread): Return void, take argument
1237 directly.
1238 (child_continue): Use for_each_thread.
1239
0b360f19
SM
12402017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1241
1242 * win32-i386-low.c (update_debug_registers_callback): Rename
1243 to ...
1244 (update_debug_registers): ... this, return void, remove pid_p arg.
1245 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1246
f27866ba
SM
12472017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1248
1249 * inferiors.h (struct process_info): Add constructor, initialize
1250 fields..
1251 <syscalls_to_catch>: Change type to std::vector<int>.
1252 * inferiors.c (add_process): Allocate process_info with new.
1253 (remove_process): Free process_info with delete.
1254 * linux-low.c (handle_extended_wait): Adjust.
1255 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1256 * server.c (handle_general_set): Adjust.
1257
e849ea89
PA
12582017-11-16 Pedro Alves <palves@redhat.com>
1259
1260 * remote-utils.c (remote_close): Block SIGIO signals instead of
1261 uninstalling the SIGIO handler.
1262
1d0aa65c
AH
12632017-11-16 Alan Hayward <alan.hayward@arm.com>
1264
1265 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1266
3491a34c
YQ
12672017-11-16 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1270 (tic6x_store_gregset): Likewise.
1271 (tic6x_usrregs_info): Move it up.
1272
a602f924
AH
12732017-11-15 Alan Hayward <alan.hayward@arm.com>
1274
1275 * Makefile.in: Update arch rules.
1276 * configure.srv: Explicitly mark arch/ files.
1277
5616b6c3
AS
12782017-11-13 Andreas Schwab <schwab@suse.de>
1279
1280 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1281 function.
1282 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1283
d1928160
PA
12842017-11-06 Pedro Alves <palves@redhat.com>
1285
1286 * config.in, configure: Regenerate.
1287
bac608e7
SM
12882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1289
1290 * target.c (struct thread_search): Remove.
1291 (thread_search_callback): Remove.
1292 (prepare_to_access_memory): Use for_each_thread instead of
1293 find_inferior. Inline code from thread_search_callback.
1294
eaddb425
SM
12952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * server.c (struct visit_actioned_threads_data): Remove.
1298 (visit_actioned_threads): Change prototype to take arguments
1299 directly.
1300 (resume): Use find_thread instead of find_inferior.
1301
99078d34
SM
13022017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1303
1304 * server.c (queue_stop_reply_callback): Change prototype, return
1305 void.
1306 (find_status_pending_thread_callback): Remove.
1307 (handle_status): Replace find_inferior with find_thread and
1308 for_each_thread.
1309
cc628f3d
AH
13102017-10-25 Alan Hayward <alan.hayward@arm.com>
1311
1312 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1313 with REGNO.
1314 (aarch64_store_gregset): Likewise.
1315 (aarch64_fill_fpregset): Likewise.
1316 (aarch64_store_fpregset): Likewise.
1317
4d3bb80e
SM
13182017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1319
1320 * gdbthread.h (find_thread, for_each_thread): New functions.
1321 * inferiors.c (thread_of_pid): Remove.
1322 (find_any_thread_of_pid): Use find_thread.
1323 * linux-low.c (num_lwps): Use for_each_thread.
1324
7a7cdfa0
YQ
13252017-10-17 Yao Qi <yao.qi@linaro.org>
1326
1327 * Makefile.in: Remove one rule.
1328 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1329
e675d170
YQ
13302017-10-17 Yao Qi <yao.qi@linaro.org>
1331
1332 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1333 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1334
7eb4e0f9
YQ
13352017-10-17 Yao Qi <yao.qi@linaro.org>
1336
1337 * configure.srv: Rename arm.o with arch/arm.o.
1338
60d6cfc9
YQ
13392017-10-17 Yao Qi <yao.qi@linaro.org>
1340
1341 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1342 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1343 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1344 (arch-i386.o, arch-amd64.o): Remove rules.
1345 (arch/%.o): New rule.
1346 Update POSTCOMPILE and COMPILE.pre.
1347 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1348 * configure: Re-generated.
1349 * configure.srv: Replace arch-i386.o with arch/i386.o.
1350 Replace arch-amd64.o with arch/amd64.o.
1351
5bfda255
YQ
13522017-10-16 Yao Qi <yao.qi@linaro.org>
1353
1354 * configure: Regenerated.
1355
9c80ecd6
SM
13562017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1357
1358 * inferiors.h: (struct inferior_list): Remove.
1359 (struct inferior_list_entry); Remove.
1360 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1361 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1362 get_first_inferior): Remove.
1363 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1364 find_inferior_id, find_inferior_in_random): Change signature.
1365 * inferiors.c (all_threads): Change type to
1366 std::list<thread_info *>.
1367 (get_thread): Remove macro.
1368 (find_inferior, find_inferior_id): Change signature, implement
1369 using find_thread.
1370 (find_inferior_in_random): Change signature, implement using
1371 find_thread_in_random.
1372 (for_each_inferior, for_each_inferior_with_data): Change
1373 signature, implement using for_each_thread.
1374 (add_inferior_to_list, remove_inferior): Remove.
1375 (add_thread, get_first_thread, thread_of_pid,
1376 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1377 (get_first_inferior, one_inferior_p, clear_inferior_list):
1378 Remove.
1379 (clear_inferiors, get_thread_process): Update.
1380 * gdbthread.h: Include <list>.
1381 (struct thread_info) <entry>: Remove field.
1382 <id>: New field.
1383 (all_threads): Change type to std::list<thread_info *>.
1384 (get_first_inferior): Add doc.
1385 (find_thread, for_each_thread, find_thread_in_random): New
1386 functions.
1387 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1388 * linux-arm-low.c (update_registers_callback): Update.
1389 * linux-low.c (second_thread_of_pid_p): Update.
1390 (kill_one_lwp_callback, linux_detach_lwp_callback,
1391 delete_lwp_callback, status_pending_p_callback, same_lwp,
1392 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1393 iterate_over_lwps, not_stopped_callback,
1394 resume_stopped_resumed_lwps, count_events_callback,
1395 select_singlestep_lwp_callback, select_event_lwp_callback,
1396 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1397 suspend_and_send_sigstop_callback, wait_for_sigstop,
1398 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1399 lwp_running, linux_set_resume_request, resume_status_pending_p,
1400 need_step_over_p, start_step_over, linux_resume_one_thread,
1401 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1402 reset_lwp_ptrace_options_callback): Update.
1403 * linux-mips-low.c (update_watch_registers_callback): Update.
1404 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1405 Update.
1406 (free_register_cache_thread_one): Remove.
1407 (regcache_release): Update.
1408 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1409 handle_qxfer_threads_worker): Update.
1410 (handle_query): Update, use list iterator.
1411 (visit_actioned_threads, handle_pending_status,
1412 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1413 clear_pending_status_callback, set_pending_status_callback,
1414 find_status_pending_thread_callback, handle_status,
1415 process_serial_event): Update.
1416 * target.c (thread_search_callback): Update.
1417 * thread-db.c (thread_db_get_tls_address): Update.
1418 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1419 Update.
1420 * win32-i386-low.c (update_debug_registers_callback): Update.
1421 * win32-low.c (delete_thread_info, child_delete_thread,
1422 continue_one_thread, suspend_one_thread,
1423 get_child_debug_event): Adjust.
1424
9179355e
SM
14252017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1426
1427 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1428 * inferiors.h: Include <list>.
1429 (struct process_info) <entry>: Remove field.
1430 <pid>: New field.
1431 (pid_of): Change macro to function.
1432 (ptid_of, lwpid_of): Remove macro.
1433 (all_processes): Change type to std::list<process_info *>.
1434 (ALL_PROCESSES): Remove macro.
1435 (for_each_process, find_process): New function.
1436 * inferiors.c (all_processes): Change type to
1437 std::list<process_info *>.
1438 (find_thread_process): Adjust.
1439 (add_process): Likewise.
1440 (remove_process): Likewise.
1441 (find_process_pid): Likewise.
1442 (get_first_process): Likewise.
1443 (started_inferior_callback): Remove.
1444 (have_started_inferiors_p): Adjust.
1445 (attached_inferior_callback): Remove.
1446 (have_attached_inferiors_p): Adjust.
1447 * linux-low.c (check_zombie_leaders): Likewise.
1448 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1449 (x86_linux_update_xmltarget): Adjust.
1450 * server.c (handle_query): Likewise.
1451 (gdb_reattached_process): Remove.
1452 (handle_status): Adjust.
1453 (kill_inferior_callback): Likewise.
1454 (detach_or_kill_inferior): Remove.
1455 (print_started_pid): Likewise.
1456 (print_attached_pid): Likewise.
1457 (detach_or_kill_for_exit): Update.
1458 (process_serial_event): Likewise.
1459 * linux-arm-low.c (arm_new_fork): Likewise.
1460
c9cb8905
SM
14612017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1462
1463 * dll.h: Include <list>.
1464 (struct dll_info): Add constructor.
1465 <entry>: Remove field.
1466 (all_dlls): Change type to std::list<dll_info>.
1467 * dll.c: Include <algorithm>.
1468 (get_dll): Remove macro.
1469 (all_dlls): Change type to std::list<dll_info *>.
1470 (free_one_dll): Remove.
1471 (match_dll): Likewise.
1472 (loaded_dll): Adjust.
1473 (unloaded_dll): Adjust to all_dlls type change, use
1474 std::find_if. Inline code from match_dll.
1475 (clear_dlls): Adjust to all_dlls type change.
1476 * server.c (emit_dll_description): Remove.
1477 (handle_qxfer_libraries): Adjust to all_dlls type change,
1478 integrate emit_dll_description's functionality.
1479
04ec7890
SM
14802017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1481
1482 * linux-low.h (struct linux_target_ops) <delete_process>: New
1483 field.
1484 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1485 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1486 (struct linux_target_ops): Add delete_process callback.
1487 * linux-arm-low.c (arm_delete_process): New.
1488 (struct linux_target_ops): Add delete_process callback.
1489 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1490 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1491 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1492 * linux-mips-low.c (mips_linux_delete_process): New.
1493 (struct linux_target_ops): Add delete_process callback.
1494 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1495 * linux-s390-low.c (struct linux_target_ops): Likewise.
1496 * linux-sh-low.c (struct linux_target_ops): Likewise.
1497 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1498 * linux-tile-low.c (struct linux_target_ops): Likewise.
1499 * linux-x86-low.c (x86_linux_delete_process): New.
1500 (struct linux_target_ops): Add delete_process callback.
1501 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1502
466eecee
SM
15032017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1504
1505 * linux-aarch64-low.c (the_low_target): Add thread delete
1506 callback.
1507 * linux-arm-low.c (arm_delete_thread): New function.
1508 (the_low_target): Add thread delete callback.
1509 * linux-bfin-low.c (the_low_target): Likewise.
1510 * linux-crisv32-low.c (the_low_target): Likewise.
1511 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1512 set.
1513 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1514 field.
1515 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1516 * linux-mips-low.c (mips_linux_delete_thread): New function.
1517 (the_low_target): Add thread delete callback.
1518 * linux-ppc-low.c (the_low_target): Likewise.
1519 * linux-s390-low.c (the_low_target): Likewise.
1520 * linux-sh-low.c (the_low_target): Likewise.
1521 * linux-tic6x-low.c (the_low_target): Likewise.
1522 * linux-tile-low.c (the_low_target): Likewise.
1523 * linux-x86-low.c (the_low_target): Likewise.
1524 * linux-xtensa-low.c (the_low_target): Likewise.
1525
b79f7801
YZ
15262017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1527
1528 * win32-low.c: Include "common-inferior.h".
1529
bc3b087d
SDJ
15302017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1531
1532 * inferiors.c (set_inferior_cwd): New function.
1533 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1534 (handle_query): Inform that QSetWorkingDir is supported.
1535 * win32-low.c (create_process): Pass the inferior's cwd to
1536 CreateProcess.
1537
d092c5a2
SDJ
15382017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1539
1540 * inferiors.c (current_inferior_cwd): New global variable.
1541 (get_inferior_cwd): New function.
1542 * inferiors.h (struct process_info) <cwd>: New field.
1543
7da0a886
SDJ
15442017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1545
1546 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1547 (OBS): Add gdb_tilde_expand.o.
1548
289a6840
SM
15492017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1550
1551 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1552 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1553
256642e8
PA
15542017-09-29 Pedro Alves <palves@redhat.com>
1555
1556 * ax.c (gdb_parse_agent_expr): Constify.
1557 * ax.h (gdb_parse_agent_expr): Constify.
1558 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1559 Constify.
1560 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1561 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1562 * remote-utils.h (read_ptid): Constify.
1563 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1564 (process_point_options, process_serial_event): Constify.
1565 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1566 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1567 (cmd_qtbuffer): Constify.
1568
5b9ca4d4
PA
15692017-09-29 Pedro Alves <palves@redhat.com>
1570
1571 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1572 fails.
1573
94c207e0
PA
15742017-09-29 Pedro Alves <palves@redhat.com>
1575
1576 * linux-low.c (handle_extended_wait): Pass parent thread instead
1577 of process to thread_db_notice_clone.
1578 * linux-low.h (thread_db_notice_clone): Replace parent process
1579 parameter with parent thread parameter.
1580 * thread-db.c (find_one_thread): Add comment.
1581 (thread_db_notice_clone): Replace parent process parameter with
1582 parent thread parameter. Temporarily switch to the parent thread.
1583
75352e28
SDJ
15842017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1585
1586 * gdbthread.h: Include "common-gdbthread.h".
1587 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1588 "if" when validating the ptid.
1589 * remote-utils.c: Include "gdbthread.h".
1590 (prepare_resume_reply): Use "switch_to_thread".
1591 * target.c (done_accessing_memory): Likewise.
1592
ad339634
AA
15932017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1594
1595 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1596 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1597 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1598 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1599 s390x-gs-linux64-ipa.o to ipa_obj.
1600 * linux-s390-low.c (HWCAP_S390_GS): New define.
1601 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1602 New functions.
1603 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1604 (s390_arch_setup): Check for guarded-storage support and choose
1605 appropriate tdesc.
1606 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1607 init_registers_s390x_gs_linux64.
1608 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1609 enum value.
1610 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1611 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1612
cc4d742f
SM
16132017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1614
1615 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1616
f6327dcb
KB
16172017-09-21 Kevin Buettner <kevinb@redhat.com>
1618
1619 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1620 (thread_db_thread_handle): Declare.
1621 * linux-low.c (linux_target_ops): Initialize thread_handle.
1622 * server.c (handle_qxfer_threads_worker): Add support for
1623 "handle" attribute.
1624 * target.h (struct target_ops): Add new function pointer,
1625 thread_handle.
1626 (target_thread_handle): Define.
1627 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1628 field in lwp.
1629 (thread_db_thread_handle): New function.
1630
86299109
KB
16312017-09-21 Kevin Buettner <kevinb@redhat.com>
1632
1633 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1634 * linux-low.h (thread_db_notice_clone): Declare.
1635 * thread-db.c (thread_db_notice_clone): New function.
1636
f557a88a
PA
16372017-09-21 Pedro Alves <palves@redhat.com>
1638
1639 * server.c (gdb_read_memory, handle_status, process_serial_event)
1640 (handle_serial_event, handle_target_event): Adjust to
1641 set_desired_thread prototype change.
1642 * target.c (set_desired_thread): Remove 'use_general' parameter
1643 and adjust.
1644 * target.h (set_desired_thread): Remove 'use_general' parameter.
1645
223ffa71
TT
16462017-09-20 Tom Tromey <tom@tromey.com>
1647
1648 * target.c (target_terminal::terminal_state): Define.
1649 (target_terminal::init): Rename from target_terminal_init.
1650 (target_terminal::inferior): Rename from
1651 target_terminal_inferior.
1652 (target_terminal::ours): Rename from target_terminal_ours.
1653 (target_terminal::ours_for_output, target_terminal::info): New.
1654
04fd3ba9
SM
16552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1656
1657 * server.c (accumulate_file_name_length): Remove.
1658 (emit_dll_description): Adjust to std::string change.
1659 (handle_qxfer_libraries): Use std::string to hold document.
1660
5e187554
SM
16612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1662
1663 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1664 return type of xml_escape_text.
1665 * server.c (emit_dll_description): Likewise.
1666
1526853e
SM
16672017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1668
1669 * server.c (captured_main): Accept argument for --selftest.
1670 Update run_tests call.
1671 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1672 when registering selftests.
1673
c4dfafab
SDJ
16742017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1675
1676 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1677 instead of "VEC" for "target_desc.reg_defs".
1678 (regcache_cpy): Likewise.
1679 (registers_to_string): Likewise.
1680 (registers_from_string): Likewise.
1681 (find_regno): Likewise.
1682 (supply_regblock): Likewise.
1683 (regcache_raw_read_unsigned): Likewise.
1684 * tdesc.c (init_target_desc): Likewise.
1685 (tdesc_create_reg): Likewise.
1686 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1687 (struct target_desc) <reg_defs>: Convert to "std::vector".
1688 (target_desc): Do not initialize "reg_defs".
1689 (~target_desc): Update code to use "std::vector" instead of "VEC"
1690 for "target_desc.reg_defs".
1691 (operator==): Likewise.
1692
124aceb4
SM
16932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1694
1695 * inferiors.h (thread_to_gdb_id): Remove.
1696 * inferiors.c (thread_to_gdb_id): Remove.
1697 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1698 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1699 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1700 Likewise.
1701 * nto-low.c (nto_fetch_registers, nto_store_registers,
1702 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1703
96cde54f
SM
17042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * inferiors.h (gdb_id_to_thread_id): Remove.
1707 * inferiors.c (gdb_id_to_thread_id): Remove.
1708 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1709 removal. Move pid declaration closer to where it's used.
1710
e8ca139e
SM
17112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * server.c (handle_detach): New function.
1714 (process_serial_event): Move code out, call handle_detach.
1715
f8a4e119
SM
17162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * server.c (require_running): Rename to ...
1719 (require_running_or_return): ... this ...
1720 (require_running_or_break): ... and this.
1721 (handle_query, process_serial_event): Adjust.
1722
0eb0a407
SM
17232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1724
1725 * linux-low.c (linux_set_resume_request): Remove unused
1726 variables.
1727
785922a5
SM
17282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1729
1730 * server.c (first_thread_of): Remove.
1731 (process_serial_event): Replace usage of first_thread_of with
1732 find_any_thread_of_pid.
1733 * tracepoint.c (same_process_p): Remove.
1734 (gdb_agent_about_to_close): Replace usage of same_process_p with
1735 find_any_thread_of_pid.
1736 * linux-x86-low.c (same_process_callback): Remove.
1737 (x86_arch_setup_process_callback): Replace usage of
1738 same_process_callback with find_any_thread_of_pid.
1739 * thread-db.c (any_thread_of): Remove.
1740 (switch_to_process): Replace usage of any_thread_of with
1741 find_any_thread_of_pid.
1742 * inferiors.c (thread_pid_matches_callback): Remove.
1743 (find_thread_process): Adjust to use find_any_thread_of_pid.
1744
a059f00c
SDJ
17452017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1746
1747 * regcache.c (get_thread_regcache): Guard calls to "memset"
1748 with "!VEC_empty".
1749
cc397f3a
SDJ
17502017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1751
1752 * linux-low.c (handle_extended_wait): Use
1753 "allocate_target_description" instead of "XNEW".
1754 * linux-x86-low.c (initialize_low_arch): Likewise.
1755
22916b07
YQ
17562017-09-05 Yao Qi <yao.qi@linaro.org>
1757
1758 * configure.srv (srv_i386_regobj): Remove.
1759 (srv_amd64_regobj): Remove.
1760 (srv_regobj): Set it to "" for x86 non-linux targets.
1761 * linux-x86-tdesc.c (i386_linux_read_description):
1762 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1763 (init_registers_i386): Remove the declaration.
1764 (tdesc_i386): Remove the declaration.
1765 (lynx_i386_arch_setup): Call i386_create_target_description.
1766 * nto-x86-low.c: Likewise.
1767 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1768 [!__x86_64__]: include arch/i386.h.
1769 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1770
38602d55
YQ
17712017-09-05 Yao Qi <yao.qi@linaro.org>
1772
1773 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1774 i386/amd64-XXX-linux from it.
1775
44b886ff
YQ
17762017-09-05 Yao Qi <yao.qi@linaro.org>
1777
1778 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1779 false.
1780 (ipa_amd64_linux_regobj): Remove.
1781 (ipa_x32_linux_regobj): Remove.
1782
b4570e4b
YQ
17832017-09-05 Yao Qi <yao.qi@linaro.org>
1784
1785 * Makefile.in (arch-amd64.o): New rule.
1786 * configure.srv: Append arch-amd64.o.
1787 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1788 (get_ipa_tdesc): Call amd64_linux_read_description.
1789 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1790 and init_registers_amd64_XXX.
1791 * linux-x86-low.c (x86_linux_read_description): Call
1792 amd64_linux_read_description.
1793 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1794 (initialize_low_arch): Don't call init_registers_x32_XXX and
1795 init_registers_amd64_XXX.
1796 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1797 and tdesc_amd64_XXX.
1798 [__x86_64__] (amd64_tdesc_test): New function.
1799 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1800 and init_registers_amd64_XXX.
1801 * linux-x86-tdesc.c: Include arch/amd64.h.
1802 (xcr0_to_tdesc_idx): New function.
1803 (i386_linux_read_description): New function.
1804 (amd64_get_ipa_tdesc_idx): New function.
1805 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1806 (amd64_get_ipa_tdesc): Declare.
1807
d1f28ea2
YQ
18082017-09-05 Yao Qi <yao.qi@linaro.org>
1809
1810 * configure.srv (srv_i386_linux_xmlfiles): Remove
1811 i386/i386-XXX-linux.xml from it.
1812
25a93583
YQ
18132017-09-05 Yao Qi <yao.qi@linaro.org>
1814
1815 * configure.srv: Set srv_i386_linux_regobj empty if $development
1816 is false.
1817 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1818 initialize_low_tdesc.
1819 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1820 with #if initialize_low_tdesc.
1821 * linux-x86-tdesc-selftest.c: New file.
1822 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1823
5f035c07
YQ
18242017-09-05 Yao Qi <yao.qi@linaro.org>
1825
1826 * Makefile.in (arch-i386.o): New rule.
1827 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1828 (x86_64-*-linux*): Likewise.
1829 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1830 include arch/i386.h.
1831 (i386_linux_read_description): Remove code and call
1832 i386_create_target_description.
1833 * tdesc.c (allocate_target_description): New function.
1834 * tdesc.h (set_tdesc_architecture): Remove declaration.
1835 (set_tdesc_osabi): Likewise.
1836
0abe8a89
YQ
18372017-09-05 Yao Qi <yao.qi@linaro.org>
1838
1839 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1840 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1841 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1842 .xmltarget.
1843 * server.c (get_features_xml): Call tdesc_get_features_xml.
1844 * tdesc.c (set_tdesc_architecture): New function.
1845 (set_tdesc_osabi): New function.
1846 (tdesc_get_features_xml): New function.
1847 (tdesc_create_feature): Add an argument.
1848 * tdesc.h (struct target_desc) <features>: New field.
1849 <arch, osabi>: New field.
1850 (~target_desc): xfree features, arch, and osabi.
1851 (target_desc::oerator==): Don't compare .xmltarget.
1852 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1853 (set_tdesc_osabi): Likewise.
1854 (tdesc_get_features_xml): Likewise.
1855
0a188386
YQ
18562017-09-05 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-x86-tdesc.c: Include selftest.h.
1859 (i386_tdesc_test): New function.
1860 (initialize_low_tdesc): Call selftests::register_test.
1861 * tdesc.h: Include regdef.h.
1862 (target_desc): Override operator == and !=.
1863
f49ff000
YQ
18642017-09-05 Yao Qi <yao.qi@linaro.org>
1865
1866 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1867 (ipa_obj): Likewise.
1868 * linux-i386-ipa.c: Include common/x86-xstate.h
1869 (get_ipa_tdesc): Call i386_linux_read_description.
1870 (initialize_low_tracepoint): Don't call init_registers_XXX
1871 functions, call initialize_low_tdesc instead.
1872 * linux-x86-low.c (x86_linux_read_description): Call
1873 i386_linux_read_description.
1874 (initialize_low_arch): Don't call init_registers_i386_XXX
1875 functions, call initialize_low_tdesc.
1876 * linux-x86-tdesc.c: New file.
1877 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1878 (i386_get_ipa_tdesc_idx): Declare.
1879 (i386_get_ipa_tdesc): Declare.
1880 (initialize_low_tdesc): Declare.
1881
2b68ef2f
YQ
18822017-09-05 Yao Qi <yao.qi@linaro.org>
1883
1884 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1885 instead of 0.
1886
f7000548
YQ
18872017-09-05 Yao Qi <yao.qi@linaro.org>
1888
1889 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1890 * regcache.c (get_thread_regcache): Use VEC_length.
1891 (init_register_cache): Likewise.
1892 (regcache_cpy): Likewise.
1893 (registers_to_string): Iterate reg_defs via VEC_iterate.
1894 (find_regno): Likewise.
1895 (find_register_by_number): Use VEC_index.
1896 (register_size): Call find_register_by_number.
1897 (register_data): Call find_register_by_number.
1898 (supply_regblock): Use VEC_length.
1899 (regcache_raw_read_unsigned): Likewise.
1900 * tdesc.c (init_target_desc): Iterate reg_defs via
1901 VEC_iterate.
1902 (default_description): Update initializer.
1903 (copy_target_description): Don't update field num_registers.
1904 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1905 <num_registers>: Remove.
1906
50a421ac
SM
19072017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1908
1909 * Makefile.in (.SECONDARY): Define target.
1910
23fdd69e
SM
19112017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * linux-low.c (linux_wait_1): Adjust.
1914 * server.c (queue_stop_reply_callback): Adjust.
1915
0a2dde4a
SDJ
19162017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1919 QEnvironmentUnset and QEnvironmentReset packets.
1920 (handle_query): Inform remote that QEnvironmentHexEncoded,
1921 QEnvironmentUnset and QEnvironmentReset are supported.
1922
6afd337d
SM
19232017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * inferiors.h (inferior_target_data): Rename to ...
1926 (thread_target_data): ... this.
1927 (inferior_regcache_data): Rename to ...
1928 (thread_regcache_data): ... this.
1929 (set_inferior_regcache_data): Rename to ...
1930 (set_thread_regcache_data): ... this.
1931 * inferiors.c (inferior_target_data): Rename to ...
1932 (thread_target_data): ... this.
1933 (inferior_regcache_data): Rename to ...
1934 (thread_regcache_data): ... this.
1935 (set_inferior_regcache_data): Rename to ...
1936 (set_thread_regcache_data): ... this.
1937 (free_one_thread): Update.
1938 * linux-low.h (get_thread_lwp): Update.
1939 * regcache.c (get_thread_regcache): Update.
1940 (regcache_invalidate_thread): Update.
1941 (free_register_cache_thread): Update.
1942 * win32-i386-low.c (update_debug_registers_callback): Update.
1943 (win32_get_current_dr): Update.
1944 * win32-low.c (thread_rec): Update.
1945 (delete_thread_info): Update.
1946 (continue_one_thread): Update.
1947 (suspend_one_thread): Update.
1948
a160cc46
SM
19492017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * inferiors.c (set_inferior_target_data): Remove.
1952 * inferiors.h (set_inferior_target_data): Remove.
1953
6d580b63
YQ
19542017-08-18 Yao Qi <yao.qi@linaro.org>
1955
1956 * Makefile.in (OBS): Add selftest.o.
1957 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1958 * configure, config.in: Re-generated.
1959 * server.c: Include common/sefltest.h.
1960 (captured_main): Handle option --selftest.
1961
f5a29eb0
YQ
19622017-08-09 Yao Qi <yao.qi@linaro.org>
1963
1964 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1965 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1966 i386-avx-mpx.o and i386-mmx.o.
1967 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1968 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1969 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1970 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1971 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1972 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1973 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1974 i386/amd64-avx-mpx.xml.
1975
57757c2f
YQ
19762017-08-09 Yao Qi <yao.qi@linaro.org>
1977
1978 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1979 and x32-avx-avx512.o.
1980 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1981 i386/x32-avx-avx512.xml.
1982
229d26fc
SM
19832017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1984
1985 * tracepoint.h (enum class fast_tpoint_collect_result): New
1986 enumeration.
1987 (fast_tracepoint_collecting): Change return type to
1988 fast_tpoint_collect_result.
1989 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1990 * linux-low.h: Include tracepoint.h.
1991 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1992 fast_tpoint_collect_result.
1993 * linux-low.c (handle_tracepoints): Adjust.
1994 (linux_fast_tracepoint_collecting): Change return type to
1995 fast_tpoint_collect_result.
1996 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1997 linux_wait_1, stuck_in_jump_pad_callback,
1998 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1999 proceed_one_lwp): Adjust to type change.
2000
2e1e43e1
YQ
20012017-07-10 Yao Qi <yao.qi@linaro.org>
2002
2003 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2004
adc764e7
YQ
20052017-06-29 Yao Qi <yao.qi@linaro.org>
2006
2007 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2008 Remove.
2009 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2010
a206891a
SM
20112017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2014
9a6c7d9c
SDJ
20152017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2016
2017 * linux-low.c (linux_create_inferior): Adjust code to access the
2018 environment information via 'gdb_environ' class.
2019 * lynx-low.c (lynx_create_inferior): Likewise.
2020 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2021 (get_environ): Return a pointer to 'our_environ'.
2022 (captured_main): Initialize 'our_environ'.
2023 * server.h (get_environ): Adjust prototype.
2024 * spu-low.c (spu_create_inferior): Adjust code to access the
2025 environment information via 'gdb_environ' class.
2026
ae3e2ccf
SM
20272017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2028
2029 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2030 usage of "register" keyword.
2031
3e019bdc
SM
20322017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * configure: Re-generate.
2035
8465943a
SM
20362017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * configure: Re-generate.
2039
cf0dd6f0
SM
20402017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2041
2042 * Makefile.in (COMPILE.pre): Add "-x c++".
2043
9845682b
SDJ
20442017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2045
2046 * fork-child.c: Conditionally include <signal.h>.
2047
aefd8b33
SDJ
20482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2049
2050 * server.c (handle_general_set): Handle new packet
2051 "QStartupWithShell".
2052 (handle_query): Add "QStartupWithShell" to the list of supported
2053 packets.
2054 (gdbserver_usage): Add help text explaining the
2055 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2056 options.
2057 (captured_main): Recognize and act upon the presence of the new
2058 CLI options.
2059
2090129c
SDJ
20602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2061 Pedro Alves <palves@redhat.com>
2062
2063 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2064 * configure: Regenerate.
2065 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2066 "fork-inferior.o".
2067 (i[34567]86-*-lynxos*): Likewise.
2068 (spu*-*-*): Likewise.
2069 * fork-child.c: New file.
2070 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2071 and "environ.h".
2072 (linux_ptrace_fun): New function.
2073 (linux_create_inferior): Adjust function prototype to reflect
2074 change on "target.h". Adjust function code to use
2075 "fork_inferior".
2076 (linux_request_interrupt): Delete "signal_pid".
2077 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2078 (lynx_ptrace_fun): New function.
2079 (lynx_create_inferior): Adjust function prototype to reflect
2080 change on "target.h". Adjust function code to use
2081 "fork_inferior".
2082 * nto-low.c (nto_create_inferior): Adjust function prototype and
2083 code to reflect change on "target.h". Update comments.
2084 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2085 "common-terminal.h" and "environ.h".
2086 (terminal_fd): Moved to fork-child.c.
2087 (old_foreground_pgrp): Likewise.
2088 (restore_old_foreground_pgrp): Likewise.
2089 (last_status): Make it global.
2090 (last_ptid): Likewise.
2091 (our_environ): New variable.
2092 (startup_with_shell): Likewise.
2093 (program_name): Likewise.
2094 (program_argv): Rename to...
2095 (program_args): ...this.
2096 (wrapper_argv): New variable.
2097 (start_inferior): Delete function.
2098 (get_exec_wrapper): New function.
2099 (get_exec_file): Likewise.
2100 (get_environ): Likewise.
2101 (prefork_hook): Likewise.
2102 (post_fork_inferior): Likewise.
2103 (postfork_hook): Likewise.
2104 (postfork_child_hook): Likewise.
2105 (handle_v_run): Update code to deal with arguments coming from the
2106 remote host. Update calls from "start_inferior" to
2107 "create_inferior".
2108 (captured_main): Likewise. Initialize environment variable. Call
2109 "have_job_control".
2110 * server.h (post_fork_inferior): New prototype.
2111 (get_environ): Likewise.
2112 (last_status): Declare.
2113 (last_ptid): Likewise.
2114 (signal_pid): Likewise.
2115 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2116 (spu_ptrace_fun): New function.
2117 (spu_create_inferior): Adjust function prototype to reflect change
2118 on "target.h". Adjust function code to use "fork_inferior".
2119 * target.c (target_terminal_init): New function.
2120 (target_terminal_inferior): Likewise.
2121 (target_terminal_ours): Likewise.
2122 * target.h: Include <vector>.
2123 (struct target_ops) <create_inferior>: Update prototype.
2124 (create_inferior): Update macro.
2125 * utils.c (gdb_flush_out_err): New function.
2126 * win32-low.c (win32_create_inferior): Adjust function prototype
2127 and code to reflect change on "target.h".
2128
043a4934
SDJ
21292017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2130
2131 * inferiors.c (switch_to_thread): New function.
2132
15652511
SDJ
21332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2134
2135 * Makefile.in (SFILE): Add "common/job-control.c".
2136 (OBS): Add "job-control.o".
2137
21ea5acd
SDJ
21382017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2139
2140 * Makefile: Remove "@host_makefile_frag@".
2141
e13cb306
PA
21422017-05-05 Pedro Alves <palves@redhat.com>
2143
2144 * configure: Regenerate.
2145
c94fee56
SDJ
21462017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2147
2148 * configure: Regenerate.
2149
a0ff9e1a
SM
21502017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2151
2152 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2153 software_single_step change of return type to
2154 std::vector<CORE_ADDR>.
2155 * linux-low.c (install_software_single_step_breakpoints):
2156 Likewise.
2157 * linux-low.h (install_software_single_step_breakpoints):
2158 Likewise.
2159
be628ab8
SDJ
21602017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2161
2162 * remote-utils.c: Include "gdb_termios.h" instead of
2163 "terminal.h".
2164 * terminal.h: Delete file.
2165
7c5ded6a
SDJ
21662017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2167
2168 * server.c: Include <vector>.
2169 <program_argv, wrapper_argv>: Convert to std::vector.
2170 (start_inferior): Rewrite function to use C++.
2171 (handle_v_run): Likewise. Update code that calculates the argv
2172 based on the vRun packet; use C++.
2173 (captured_main): Likewise.
2174
436252de
SM
21752017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2176
2177 * server.c (handle_v_cont): Initialize thread_resume::thread
2178 with null_ptid.
2179
9bf2a700
PA
21802017-04-05 Pedro Alves <palves@redhat.com>
2181
2182 * configure: Regenerate.
2183
a121b7c1
PA
21842017-04-05 Pedro Alves <palves@redhat.com>
2185
2186 * gdbreplay.c (sync_error): Constify.
2187 * linux-x86-low.c (push_opcode): Constify.
2188
21c8a587
PA
21892017-04-05 Pedro Alves <palves@redhat.com>
2190
2191 * win32-low.c (get_child_debug_event)
2192 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2193 Report TARGET_WAITKIND_SPURIOUS instead.
2194
fb32b4f7
PA
21952017-04-05 Pedro Alves <palves@redhat.com>
2196
2197 * remote-utils.c (remote_prepare, remote_open): Constify.
2198 * remote-utils.h (remote_prepare, remote_open): Constify.
2199 * server.c (captured_main): Constify 'port' handling.
2200
65dd1e59
SM
22012017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * Makefile.in (clean): Clear .deps.
2204
8fa5b777
SM
22052017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2206
2207 * .gitignore: Remove generated files, replace with wildcard.
2208 * (clean): Replace removal of generated files with wildcard.
2209 (version.c): Replace with...
2210 (version-generated.c): ...this.
2211 (xml-builtin.c): Replace with...
2212 (xml-builtin-generated.c): ...this.
2213 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2214 (%.c: *regformats*): Replace with...
2215 (%-generated.c: *regformats*): ...this.
2216
a12e714b
MF
22172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2218
2219 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2220 (xtensa_fill_gregset): Call collect_register_by_name for
2221 threadptr register.
2222 (xtensa_store_gregset): Call supply_register_by_name for
2223 threadptr register.
2224
1a09b50a
MF
22252017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2226
2227 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2228 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2229 (xtensa_store_gregset): Call supply_register for all registers in
2230 a0_regnum..a0_regnum + C0_NREGS range.
2231
1a01e7c6
SM
22322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2233
2234 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2235 (ax-ipa.o: ax.c): Remove.
2236 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2237 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2238 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2239 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2240 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2241
36bc18a8
SM
22422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2243
2244 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2245 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2246 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2247 (errors-ipa.o: ../common/errors.c): Remove.
2248 (format-ipa.o: ../common/format.c): Remove.
2249 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2250
a8ebe3d5
SM
22512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2252
2253 * Makefile.in (%-ipa.o: %.c): New rule.
2254 (tracepoint-ipa.o: tracepoint.c): Remove.
2255 (utils-ipa.o: utils.c): Remove.
2256 (remote-utils-ipa.o: remote-utils.c): Remove.
2257 (regcache-ipa.o: regcache.c): Remove.
2258 (i386-linux-ipa.o: i386-linux.c): Remove.
2259 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2260 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2261 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2262 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2263 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2264 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2265 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2266 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2267 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2268 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2269 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2270 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2271 (aarch64-ipa.o: aarch64.c): Remove.
2272 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2273 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2274 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2275 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2276 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2277 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2278 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2279 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2280 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2281 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2282 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2283 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2284 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2285 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2286 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2287 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2288 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2289 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2290 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2291 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2292 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2293 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2294 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2295 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2296 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2297 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2298 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2299 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2300 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2301 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2302 (tdesc-ipa.o: tdesc.c): Remove.
2303 (x32-linux-ipa.o: x32-linux.c): Remove.
2304 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2305 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2306
50cfacb7
SM
23072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2308
2309 * Makefile.in (%.o: ../arch/%.c): New rule.
2310 (arm.o: ../arch/arm.c): Remove.
2311 (arm-linux.o: ../arch/arm-linux.c): Remove.
2312 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2313 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2314
c5a22423
SM
23152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2316
2317 * Makefile.in (%.o: ../nat/%.c): New rule.
2318 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2319 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2320 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2321 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2322 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2323 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2324 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2325 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2326 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2327 (linux-personality.o: ../nat/linux-personality.c): Remove.
2328 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2329 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2330 (x86-linux.o: ../nat/x86-linux.c): Remove.
2331 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2332 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2333
6bda016b
SM
23342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2335
2336 * Makefile.in (%.o: ../common/%.c): New rule.
2337 (signals.o: ../common/signals.c): Remove.
2338 (print-utils.o: ../common/print-utils.c): Remove.
2339 (rsp-low.o: ../common/rsp-low.c): Remove.
2340 (common-utils.o: ../common/common-utils.c): Remove.
2341 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2342 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2343 (vec.o: ../common/vec.c): Remove.
2344 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2345 (xml-utils.o: ../common/xml-utils.c): Remove.
2346 (ptid.o: ../common/ptid.c): Remove.
2347 (buffer.o: ../common/buffer.c): Remove.
2348 (format.o: ../common/format.c): Remove.
2349 (filestuff.o: ../common/filestuff.c): Remove.
2350 (agent.o: ../common/agent.c): Remove.
2351 (errors.o: ../common/errors.c): Remove.
2352 (environ.o: ../common/environ.c): Remove.
2353 (common-debug.o: ../common/common-debug.c): Remove.
2354 (cleanups.o: ../common/cleanups.c): Remove.
2355 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2356 (fileio.o: ../common/fileio.c): Remove.
2357 (common-regcache.o: ../common/common-regcache.c): Remove.
2358 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2359 (new-op.o: ../common/new-op.c): Remove.
2360 (btrace-common.o: ../common/btrace-common.c): Remove.
2361
21122961
SM
23622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2363
2364 * Makefile.in (%.o: ../target/%.c): New rule.
2365 (waitstatus.o: ../target/waitstatus.c): Remove.
2366
c362e621
SM
23672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2368
2369 * Makefile.in
2370 (%.c: ../regformats/%.dat,
2371 (%.c: ../regformats/arm/%.dat,
2372 (%.c: ../regformats/i386/%.dat,
2373 (%.c: ../regformats/rs6000/%.dat): New rules.
2374 (aarch64.c): Remove.
2375 (reg-arm.c): Remove.
2376 (arm-with-iwmmxt.c): Remove.
2377 (arm-with-vfpv2.c): Remove.
2378 (arm-with-vfpv3.c): Remove.
2379 (arm-with-neon.c): Remove.
2380 (reg-bfin.c): Remove.
2381 (reg-cris.c): Remove.
2382 (reg-crisv32.c): Remove.
2383 (i386.c): Remove.
2384 (i386-linux.c): Remove.
2385 (i386-avx.c): Remove.
2386 (i386-avx-linux.c): Remove.
2387 (i386-avx-avx512.c): Remove.
2388 (i386-avx-avx512-linux.c): Remove.
2389 (i386-mpx.c): Remove.
2390 (i386-mpx-linux.c): Remove.
2391 (i386-avx-mpx-avx512-pku.c): Remove.
2392 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2393 (i386-avx-mpx.c): Remove.
2394 (i386-avx-mpx-linux.c): Remove.
2395 (i386-mmx.c): Remove.
2396 (i386-mmx-linux.c): Remove.
2397 (reg-ia64.c): Remove.
2398 (reg-m32r.c): Remove.
2399 (reg-m68k.c): Remove.
2400 (reg-cf.c): Remove.
2401 (mips-linux.c): Remove.
2402 (mips-dsp-linux.c): Remove.
2403 (mips64-linux.c): Remove.
2404 (mips64-dsp-linux.c): Remove.
2405 (nios2-linux.c): Remove.
2406 (powerpc-32.c): Remove.
2407 (powerpc-32l.c): Remove.
2408 (powerpc-altivec32l.c): Remove.
2409 (powerpc-cell32l.c): Remove.
2410 (powerpc-vsx32l.c): Remove.
2411 (powerpc-isa205-32l.c): Remove.
2412 (powerpc-isa205-altivec32l.c): Remove.
2413 (powerpc-isa205-vsx32l.c): Remove.
2414 (powerpc-e500l.c): Remove.
2415 (powerpc-64l.c): Remove.
2416 (powerpc-altivec64l.c): Remove.
2417 (powerpc-cell64l.c): Remove.
2418 (powerpc-vsx64l.c): Remove.
2419 (powerpc-isa205-64l.c): Remove.
2420 (powerpc-isa205-altivec64l.c): Remove.
2421 (powerpc-isa205-vsx64l.c): Remove.
2422 (s390-linux32.c): Remove.
2423 (s390-linux32v1.c): Remove.
2424 (s390-linux32v2.c): Remove.
2425 (s390-linux64.c): Remove.
2426 (s390-linux64v1.c): Remove.
2427 (s390-linux64v2.c): Remove.
2428 (s390-te-linux64.c): Remove.
2429 (s390-vx-linux64.c): Remove.
2430 (s390-tevx-linux64.c): Remove.
2431 (s390x-linux64.c): Remove.
2432 (s390x-linux64v1.c): Remove.
2433 (s390x-linux64v2.c): Remove.
2434 (s390x-te-linux64.c): Remove.
2435 (s390x-vx-linux64.c): Remove.
2436 (s390x-tevx-linux64.c): Remove.
2437 (tic6x-c64xp-linux.c): Remove.
2438 (tic6x-c64x-linux.c): Remove.
2439 (tic6x-c62x-linux.c): Remove.
2440 (reg-sh.c): Remove.
2441 (reg-sparc64.c): Remove.
2442 (reg-spu.c): Remove.
2443 (amd64.c): Remove.
2444 (amd64-linux.c): Remove.
2445 (amd64-avx.c): Remove.
2446 (amd64-avx-linux.c): Remove.
2447 (amd64-avx-avx512.c): Remove.
2448 (amd64-avx-avx512-linux.c): Remove.
2449 (amd64-mpx.c): Remove.
2450 (amd64-mpx-linux.c): Remove.
2451 (amd64-avx-mpx-avx512-pku.c): Remove.
2452 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2453 (amd64-avx-mpx.c): Remove.
2454 (amd64-avx-mpx-linux.c): Remove.
2455 (x32.c): Remove.
2456 (x32-linux.c): Remove.
2457 (x32-avx.c): Remove.
2458 (x32-avx-linux.c): Remove.
2459 (x32-avx-avx512.c): Remove.
2460 (x32-avx-avx512-linux.c): Remove.
2461 (reg-xtensa.c): Remove.
2462 (reg-tilegx.c): Remove.
2463 (reg-tilegx32.c): Remove.
2464
1672e0d9
SDJ
24652017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2466
2467 * Makefile.in (SFILES): Add "common/environ.c".
2468 (OBJS): Add "common/environ.h".
2469
239b6d10
WT
24702017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2471
2472 * configure.ac: Check if the fs_base and gs_base members of
2473 `struct user_regs_struct' exist.
2474 * config.in: Regenerated.
2475 * configure: Likewise.
2476
694b382c
AT
24772017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2478
2479 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2480 target_read_memory.
2481 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2482 (get_next_pcs_syscall_next_pc): Likewise.
2483
7dc53023
LM
24842016-12-23 Luis Machado <lgustavo@codesourcery.com>
2485
2486 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2487 * nto-x86-low.c: Likewise.
2488
ad02e4fe
SM
24892016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2490
2491 * Makefile.in: Include disable-implicit-rules.mk.
2492
dcb07cfa
PA
24932016-11-23 Pedro Alves <palves@redhat.com>
2494
2495 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2496 (debug_vprintf): Use std::chrono::steady_clock instead of
2497 gettimeofday. Use '.' instead of ':'.
2498 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2499 (get_timestamp): Use std::chrono::steady_clock instead of
2500 gettimeofday.
2501
8629c02c
SM
25022016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2503
2504 * Makefile.in: Fix whitespace formatting.
2505
b593ecca
SM
25062016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2507
2508 * Makefile.in (SFILES, OBS): Flatten list and order
2509 alphabetically.
2510
9986ba08
PA
25112016-11-23 Pedro Alves <palves@redhat.com>
2512
2513 * event-loop.c (handle_file_event): Use warning.
2514 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2515 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2516 Use warning.
2517
4eefa7bc
PA
25182016-11-23 Pedro Alves <palves@redhat.com>
2519
2520 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2521 output.
2522 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2523 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2524 debug_printf and debug_flush for debug output.
2525 * server.c (handle_general_set): Likewise.
2526 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2527 output.
2528
5443506e
SM
25292016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2530
2531 * Makefile.in (.c.o): Replace rule with ...
2532 (%.o: %.c): ... this one.
2533
3b165252
SM
25342016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2535
2536 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2537 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2538 make.
2539 * configure.ac: Remove checks for the make program.
2540 * configure: Re-generate.
2541
0bcda685
PA
25422016-10-28 Pedro Alves <palves@redhat.com>
2543
2544 * Makefile.in (CXX_DIALECT): Get from configure.
2545 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2546 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2547 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2548 * config.in: Regenerate.
2549 * configure: Regenerate.
2550
c3805894
YQ
25512016-10-27 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-low.c (linux_supports_range_stepping): Return true if
2554 can_software_single_step return true.
2555
89342618
YQ
25562016-10-27 Yao Qi <yao.qi@linaro.org>
2557
2558 * inferiors.c (find_inferior_in_random): New function.
2559 * inferiors.h (find_inferior_in_random): Declare.
2560 * linux-low.c (linux_wait_for_event_filtered): Call
2561 find_inferior_in_random instead of find_inferior.
2562
e3652c84
YQ
25632016-10-27 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-low.c (linux_wait_1): If single-step breakpoints are
2566 inserted, remove them.
2567
5a04c4cf
PA
25682016-10-26 Pedro Alves <palves@redhat.com>
2569
2570 * linux-low.c (handle_extended_wait): Link parent/child fork
2571 threads.
2572 (linux_wait_1): Unlink them.
2573 (linux_set_resume_request): Ignore resume requests for
2574 already-resumed and unhandled fork child threads.
2575 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2576 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2577 New functions.
2578 (handle_v_requests) <vCont>: Don't call require_running.
2579 * server.h (in_queued_stop_replies): New declaration.
2580
cb93dc7f
YQ
25812016-10-24 Yao Qi <yao.qi@linaro.org>
2582
2583 PR server/20733
2584 * linux-aarch64-low.c (append_insns): Cast the return value to
2585 'uint32_t *'.
2586
a1078bea
YQ
25872016-10-10 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2590
1fb77080
SDJ
25912016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2592
2593 * target.c (target_supports_multi_process): New function, moved
2594 from...
2595 * target.h (target_supports_multi_process): ... here. Remove
2596 macro.
2597
39b5a3b9
TT
25982016-10-05 Tom Tromey <tom@tromey.com>
2599
2600 PR remote/20655:
2601 * tracepoint.c (handle_tracepoint_bkpts): Check
2602 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2603
c1d0b70a
YQ
26042016-10-05 Yao Qi <yao.qi@linaro.org>
2605
2606 * configure.srv: Update the path of arm-*.xml files.
2607
0a69eedb
YQ
26082016-10-05 Terry Guo <terry.guo@arm.com>
2609 Yao Qi <yao.qi@linaro.org>
2610
2611 * Makefile.in: Adjust the path of rules.
2612 * configure.srv: Update the path of xml files.
2613 * regformats/arm-with-iwmmxt.dat: Regenerated.
2614 * regformats/arm-with-neon.dat: Likewise.
2615 * regformats/arm-with-vfpv2.dat: Likewise.
2616 * regformats/arm-with-vfpv3.dat Likewise.
2617
17e16485
YQ
26182016-09-30 Yao Qi <yao.qi@linaro.org>
2619
2620 PR gdbserver/20627
2621 * target.c (target_stop_and_wait): Don't call
2622 target_continue_no_signal, use resume_stop instead.
2623
edeeb602
YQ
26242016-09-26 Yao Qi <yao.qi@linaro.org>
2625
2626 * linux-low.c (linux_wait_1): Call debug_exit.
2627
503b1c39
PA
26282016-09-23 Pedro Alves <palves@redhat.com>
2629
2630 * Makefile.in (SFILES): Add common/new-op.c.
2631 (OBS): Add common/new-op.o.
2632 (new-op.o): New rule.
2633
74172ecf
SM
26342016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2635
2636 * .gitinore: Ignore more files.
2637
fc6cda2e
YQ
26382016-09-21 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2641 23.
2642
bc1e6c81
SDJ
26432016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2644
2645 * server.c (start_inferior): Call target_mourn_inferior instead of
2646 mourn_inferior; pass ptid_t argument to it.
2647 (resume): Likewise.
2648 (handle_target_event): Likewise.
2649 * target.c (target_mourn_inferior): New function.
2650 * target.h (mourn_inferior): Delete macro.
2651
0e00e962
AA
26522016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2653
2654 * linux-low.c (lwp_is_stepping): New function.
2655
1d8cb77d
CL
26562016-09-06 Carl Love <cel@us.ibm.com>
2657
2658 * server.c (start_inferior): Fixed comment, requested comment change
2659 didn't get updated correctly. Removed reference to ptrace () call as
2660 it is only true on Linux systems.
2661
7313bced
CL
26622016-09-06 Carl Love <cel@us.ibm.com>
2663
2664 * server.c (start_inferior): Do not call
2665 function target_post_create_inferior () if the
2666 inferior process has already exited.
2667
cf6de44d
PA
26682016-09-05 Pedro Alves <palves@redhat.com>
2669
2670 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2671 (COMPILE.pre, CC_LD): Use CXX directly.
2672 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2673 * acinclude.m4: Don't include build-with-cxx.m4.
2674 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2675 * configure: Regenerate.
2676
c1da6748
AT
26772016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2678
2679 PR gdb/19495
2680 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2681 call writing data to own_buf.
2682
f2b9e3df
SDJ
26832016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2684
2685 * target.c (mywait): Call target_wait instead of
2686 the_target->wait.
2687 (target_wait): New function.
2688
049a8570
SDJ
26892016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2690
2691 * server.c (start_inferior): New variable 'ptid'. Replace calls
2692 to the_target->resume by target_continue{,_no_signal}, depending
2693 on the case.
2694 * target.c (target_stop_and_wait): Call target_continue_no_signal
2695 instead of the_target->resume.
2696 (target_continue): New function.
2697
3aa5cfa0
AT
26982016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2699
2700 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2701
754653a7
AZ
27022016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2703
2704 PR server/20491
2705 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2706 ps_prochandle.
2707 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2708 * linux-arm-low.c (ps_get_thread_area): Likewise.
2709 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2710 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2711 * linux-mips-low.c (ps_get_thread_area): Likewise.
2712 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2713 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2714 * linux-x86-low.c (ps_get_thread_area): Likewise.
2715 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2716
ed036b40
PA
27172016-08-19 Pedro Alves <palves@redhat.com>
2718
2719 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2720
c8ef42ee
PA
27212016-08-19 Pedro Alves <palves@redhat.com>
2722
2723 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2724 comment. Use memcpy instead of casting through unsigned long.
2725
9c235a72
PA
27262016-08-19 Pedro Alves <palves@redhat.com>
2727
2728 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2729 allocating around 0x80000000.
2730
201506da
PA
27312016-08-19 Pedro Alves <palves@redhat.com>
2732
2733 PR gdb/20415
2734 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2735 (x32-avx512-linux-ipa.o): New rules.
2736 * configure.ac (x86_64-*-linux*): New x32 check.
2737 * configure.srv (ipa_x32_linux_regobj): New.
2738 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2739 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2740 descriptions.
2741 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2742 descriptions.
2743 * configure: Regenerate.
2744
f348d89a
PA
27452016-08-09 Pedro Alves <palves@redhat.com>
2746
2747 PR gdb/18653
2748 * Makefile.in (OBS): Add signals-state-save-restore.o.
2749 (signals-state-save-restore.o): New rule.
2750 * config.in: Regenerate.
2751 * configure: Regenerate.
2752 * linux-low.c: Include "signals-state-save-restore.h".
2753 (linux_create_inferior): Call
2754 restore_original_signals_state.
2755 * server.c: Include "dispositions-save-restore.h".
2756 (captured_main): Call save_original_signals_state.
2757
1baf5149
PA
27582016-08-05 Pedro Alves <palves@redhat.com>
2759
2760 * configure: Regenerate.
2761
fcd4a73d
YQ
27622016-08-04 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-low.c (regsets_fetch_inferior_registers): Check
2765 errno is ESRCH or not.
2766
979659d0
YQ
27672016-08-02 Yao Qi <yao.qi@linaro.org>
2768
2769 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2770 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2771 (thread_db_load_search): Update.
2772 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2773 td_ta_set_event and td_ta_event_getmsg.
2774
6598661d
PA
27752016-07-26 Pedro Alves <palves@redhat.com>
2776
2777 PR server/20414
2778 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2779 of unsigned long for 64-bit registers and use uint32_t instead of
2780 unsigned int for 32-bit registers.
2781
9cf12d57
PA
27822016-07-26 Pedro Alves <palves@redhat.com>
2783
2784 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2785 to 'ptrace'.
2786
305450ed
TT
27872016-07-21 Tom Tromey <tom@tromey.com>
2788
2789 * configure: Rebuild.
2790
2583da7c
YQ
27912016-07-21 Yao Qi <yao.qi@linaro.org>
2792
2793 * mem-break.c (find_gdb_breakpoint): Cast bp to
2794 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2795
21536b36
YQ
27962016-07-21 Yao Qi <yao.qi@linaro.org>
2797
2798 * server.c (handle_v_requests): Support s and S actions
2799 if target_supports_software_single_step return true.
2800
8901d193
YQ
28012016-07-21 Yao Qi <yao.qi@linaro.org>
2802
2803 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2804 is resume_step, call maybe_hw_step.
2805 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2806 and unstop them.
2807 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2808 breakpoints or not.
2809 (proceed_one_lwp): If resume request is resume_step, install
2810 reinsert breakpoints and call maybe_hw_step.
2811
0e9a339e
YQ
28122016-07-21 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-low.c (proceed_one_lwp): Declare.
2815 (linux_resume_one_thread): Remove local variable 'step'.
2816 Lift code enqueue signal. Call proceed_one_lwp instead of
2817 linux_resume_one_lwp.
2818
4281b351
YQ
28192016-07-21 Yao Qi <yao.qi@linaro.org>
2820
2821 * linux-low.c (linux_resume_one_thread): Call
2822 enqueue_pending_signal.
2823
984a2c04
YQ
28242016-07-21 Yao Qi <yao.qi@linaro.org>
2825
2826 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2827 * inferiors.c (do_restore_current_thread_cleanup): New function.
2828 (make_cleanup_restore_current_thread): Likewise.
2829 * linux-low.c (install_software_single_step_breakpoints): Call
2830 make_cleanup_restore_current_thread. Switch current_thread to
2831 thread.
2832
bec903c9
YQ
28332016-07-21 Yao Qi <yao.qi@linaro.org>
2834
2835 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2836 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2837 (clone_one_breakpoint): Likewise.
2838 (delete_reinsert_breakpoints): Change parameter to thread.
2839 Callers updated.
2840 (has_reinsert_breakpoints): Likewise.
2841 (uninsert_reinsert_breakpoints): Likewise.
2842 (reinsert_reinsert_breakpoints): Likewise.
2843 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2844 (delete_reinsert_breakpoints): Likewise.
2845 (reinsert_reinsert_breakpoints): Likewise.
2846 (uninsert_reinsert_breakpoints): Likewise.
2847 (has_reinsert_breakpoints): Likewise.
2848
63c40ec7
YQ
28492016-07-21 Yao Qi <yao.qi@linaro.org>
2850
2851 * inferiors.c (get_thread_process): Make parameter const.
2852 * inferiors.h (get_thread_process): Update declaration.
2853 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2854 Add new parameters child_thread and parent_thread. Callers
2855 updated.
2856 * mem-break.h (clone_all_breakpoints): Update declaration.
2857
9aa76cd0
YQ
28582016-07-21 Yao Qi <yao.qi@linaro.org>
2859
2860 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2861 <command_list, handler>: Remove.
2862 (struct gdb_breakpoint): New.
2863 (struct other_breakpoint): New.
2864 (struct reinsert_breakpoint): New.
2865 (is_gdb_breakpoint): New function.
2866 (any_persistent_commands): Update command_list if
2867 is_gdb_breakpoint returns true.
2868 (set_breakpoint): Create breakpoints according to their types.
2869 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2870 (set_gdb_breakpoint_1): Likewise.
2871 (set_gdb_breakpoint): Likewise.
2872 (clear_breakpoint_conditions): Change parameter type to
2873 'struct gdb_breakpoint *'.
2874 (clear_breakpoint_commands): Likewise.
2875 (clear_breakpoint_conditions_and_commands): Likewise.
2876 (add_condition_to_breakpoint): Likewise.
2877 (add_breakpoint_condition): Likewise.
2878 (add_commands_to_breakpoint): Likewise.
2879 (check_breakpoints): Check other_breakpoint.
2880 (clone_one_breakpoint): Clone breakpopint according to its type.
2881 * mem-break.h (struct gdb_breakpoint): Declare.
2882 (set_gdb_breakpoint): Update declaration.
2883 (clear_breakpoint_conditions_and_commands): Likewise.
2884 (add_breakpoint_condition): Likewise.
2885 (add_breakpoint_commands): Likewise.
2886 * server.c (process_point_options): Change parameter type to
2887 'struct gdb_breakpoint *'.
2888
811f8301
YQ
28892016-07-21 Yao Qi <yao.qi@linaro.org>
2890
2891 * mem-break.c (set_breakpoint_at): Rename it to ...
2892 (set_breakpoint_type_at): ... it.
2893 (set_breakpoint_at): Call set_breakpoint_type_at.
2894 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2895 * mem-break.h (set_breakpoint_at): Update comments.
2896
b1c51e36
CLT
28972016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2898
2899 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2900 to buf parameter.
2901 (nios2_store_gregset): Likewise.
2902
ced2dffb
PA
29032016-07-01 Pedro Alves <palves@redhat.com>
2904 Antoine Tremblay <antoine.tremblay@ericsson.com>
2905
2906 * linux-low.c: Change interface to take the target lwp_info
2907 pointer directly and return void. Handle detaching from a zombie
2908 thread.
2909 (linux_detach_lwp_callback): New function.
2910 (linux_detach): Detach from the leader thread after detaching from
2911 the clone threads.
2912
2ac09a5b
YQ
29132016-06-28 Yao Qi <yao.qi@linaro.org>
2914
2915 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2916 for variable new_offset.
2917 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2918 (aarch64_ftrace_insn_reloc_cb): Likewise.
2919 (aarch64_ftrace_insn_reloc_tb): Likewise.
2920 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2921 PRIx64 instead of PRIx32.
2922
79e7fd4f
YQ
29232016-06-28 Yao Qi <yao.qi@linaro.org>
2924
2925 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2926 (the_low_target): Install arm_get_syscall_trapinfo.
2927
061fc021
YQ
29282016-06-28 Yao Qi <yao.qi@linaro.org>
2929
2930 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2931 function.
2932 (the_low_target): Install aarch64_get_syscall_trapinfo.
2933
4cc32bec
YQ
29342016-06-28 Yao Qi <yao.qi@linaro.org>
2935
2936 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2937 Callers updated.
2938 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2939 Remove parameter sysno.
2940 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2941 sysret.
2942
782c1122
AA
29432016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2944
2945 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2946 (s390_emit_ne_goto): Likewise.
2947 (s390_emit_lt_goto): Likewise.
2948 (s390_emit_le_goto): Likewise.
2949 (s390_emit_gt_goto): Likewise.
2950 (s390_emit_ge_goto): Likewise.
2951 (s390x_emit_eq_goto): Likewise.
2952 (s390x_emit_ne_goto): Likewise.
2953 (s390x_emit_lt_goto): Likewise.
2954 (s390x_emit_le_goto): Likewise.
2955 (s390x_emit_gt_goto): Likewise.
2956 (s390x_emit_ge_goto): Likewise.
2957 (s390_emit_ops_impl): Mark variable static.
2958 (s390x_emit_ops): Likewise.
2959
2e7b624b
YQ
29602016-06-17 Yao Qi <yao.qi@linaro.org>
2961
2962 * linux-low.c (handle_extended_wait): Call
2963 uninsert_reinsert_breakpoints for the parent process. Remove
2964 reinsert breakpoints from the child process. Reinsert them to
2965 the parent process when vfork is done.
2966 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2967 (reinsert_reinsert_breakpoints): New function.
2968 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2969 (reinsert_reinsert_breakpoints): Declare.
2970
8a81c5d7
YQ
29712016-06-17 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-low.c (handle_extended_wait): If the parent is doing
2974 step-over, remove the reinsert breakpoints from the forked child.
2975
f50bf8e5
YQ
29762016-06-17 Yao Qi <yao.qi@linaro.org>
2977
2978 * linux-low.c (unsuspend_all_lwps): Declare.
2979 (linux_low_filter_event): If thread exited, call finish_step_over.
2980 If step-over is finished, unsuspend other threads.
2981
8376a3cb
YQ
29822016-06-17 Yao Qi <yao.qi@linaro.org>
2983
2984 * linux-low.c (linux_resume_one_lwp_throw): Assert
2985 has_reinsert_breakpoints returns false.
2986 * mem-break.c (delete_disabled_breakpoints): Assert
2987 bp type isn't reinsert_breakpoint.
2988
f79b145d
YQ
29892016-06-17 Yao Qi <yao.qi@linaro.org>
2990
2991 * linux-low.c (maybe_hw_step): New function.
2992 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2993 (finish_step_over): Switch current_thread to lwp temporarily,
2994 and assert has_reinsert_breakpoints returns true.
2995 (proceed_one_lwp): Call maybe_hw_step.
2996 * mem-break.c (has_reinsert_breakpoints): New function.
2997 * mem-break.h (has_reinsert_breakpoints): Declare.
2998
0ae534d2
JT
29992016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3000
3001 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3002
fcdad592
YQ
30032016-05-17 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3006 instead of find_inferior.
3007
9e784964
YQ
30082016-05-05 Yao Qi <yao.qi@linaro.org>
3009
3010 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3011 Initialize res to zero.
3012
cf2ebb6e
YQ
30132016-05-05 Yao Qi <yao.qi@linaro.org>
3014
3015 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3016 to uint32_t.
3017
c1aebf87
UW
30182016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3019
3020 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3021 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3022 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3023
35fd2deb 30242016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3025 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3026
3027 * tracepoint.c (write_inferior_int8): New function.
3028 (cmd_qtenable_disable): Write enable flag using
3029 write_inferior_int8.
3030
484b3c32
YQ
30312016-04-25 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3034 (need_step_over_p): Return zero if the LWP has pending signals
3035 can be delivered on software single step target.
3036
85ba7d86
YQ
30372016-04-25 Yao Qi <yao.qi@linaro.org>
3038
3039 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3040 return instead of error.
3041
3539aa13
YQ
30422016-04-22 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3045 to 23.
3046
5b061e98
YQ
30472016-04-22 Yao Qi <yao.qi@linaro.org>
3048
3049 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3050 signal when stepping over breakpoint with software single
3051 step.
3052
3451269c
PA
30532016-04-21 Pedro Alves <palves@redhat.com>
3054
3055 * linux-s390-low.c (s390_collect_ptrace_register)
3056 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3057 add casts.
3058 (s390_check_regset): Use void * instead of gdb_byte *.
3059
a2358508
PA
30602016-04-20 Pedro Alves <palves@redhat.com>
3061
3062 * configure: Renegerate.
3063
6885166d
YQ
30642016-04-20 Yao Qi <yao.qi@linaro.org>
3065
3066 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3067 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3068 number 16.
3069 (arm_store_gregset): Likewise.
3070
2b863f51
WT
30712016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3072
3073 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3074 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3075 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3076 (amd64-avx-mpx-linux.c): New rules.
3077 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3078 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3079 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3080 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3081 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3082 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3083 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3084 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3085 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3086 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3087 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3088 * linux-x86-low.c (x86_linux_read_description): Add case for
3089 X86_XSTATE_AVX_MPX_MASK.
3090 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3091 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3092 init_registers_i386_avx_mpx_linux.
3093 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3094 (initialize_low_tracepoint): Call
3095 init_registers_i386_avx_mpx_linux.
3096 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3097 (initialize_low_tracepoint): Call
3098 init_registers_amd64_avx_mpx_linux.
3099 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3100 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3101 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3102 declarations.
3103
9b30624b
PA
31042016-04-18 Pedro Alves <palves@redhat.com>
3105
3106 * configure: Regenerate.
3107
45e3745e
AT
31082016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3109
3110 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3111 (aarch64_emit_sub): Likewise.
3112
2afc13ff
PA
31132016-04-12 Pedro Alves <palves@redhat.com>
3114
3115 * utils.c (prepare_to_throw_exception): Delete.
3116
6e774b13
SM
31172016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3118
3119 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3120
4dca19f8
MK
31212016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3122
3123 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3124
d0a9981f
MK
31252016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3126
3127 * linux-aarch64-ipa.c: Add <elf.h> include.
3128 * linux-ppc-ipa.c: Add <elf.h> include.
3129 * linux-s390-ipa.c: Add <elf.h> include.
3130
252db07e
MK
31312016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3132
3133 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3134 (get_raw_reg_ptr): Likewise.
3135 (get_trace_state_variable_value_ptr): Likewise.
3136 (set_trace_state_variable_value_ptr): Likewise.
3137 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3138 char *.
3139
14e2b6d9
MK
31402016-03-31 Wei-cheng Wang <cole945@gmail.com>
3141 Marcin Kościelnicki <koriakin@0x04.net>
3142
3143 PR/17221
3144 * linux-ppc-low.c (emit_insns): New function.
3145 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3146 (ppc_emit_prologue): New function.
3147 (ppc_emit_epilogue): New function.
3148 (ppc_emit_add): New function.
3149 (ppc_emit_sub): New function.
3150 (ppc_emit_mul): New function.
3151 (ppc_emit_lsh): New function.
3152 (ppc_emit_rsh_signed): New function.
3153 (ppc_emit_rsh_unsigned): New function.
3154 (ppc_emit_ext): New function.
3155 (ppc_emit_zero_ext): New function.
3156 (ppc_emit_log_not): New function.
3157 (ppc_emit_bit_and): New function.
3158 (ppc_emit_bit_or): New function.
3159 (ppc_emit_bit_xor): New function.
3160 (ppc_emit_bit_not): New function.
3161 (ppc_emit_equal): New function.
3162 (ppc_emit_less_signed): New function.
3163 (ppc_emit_less_unsigned): New function.
3164 (ppc_emit_ref): New function.
3165 (ppc_emit_const): New function.
3166 (ppc_emit_reg): New function.
3167 (ppc_emit_pop): New function.
3168 (ppc_emit_stack_flush): New function.
3169 (ppc_emit_swap): New function.
3170 (ppc_emit_stack_adjust): New function.
3171 (ppc_emit_call): New function.
3172 (ppc_emit_int_call_1): New function.
3173 (ppc_emit_void_call_2): New function.
3174 (ppc_emit_if_goto): New function.
3175 (ppc_emit_goto): New function.
3176 (ppc_emit_eq_goto): New function.
3177 (ppc_emit_ne_goto): New function.
3178 (ppc_emit_lt_goto): New function.
3179 (ppc_emit_le_goto): New function.
3180 (ppc_emit_gt_goto): New function.
3181 (ppc_emit_ge_goto): New function.
3182 (ppc_write_goto_address): New function.
3183 (ppc_emit_ops_impl): New static variable.
3184 (ppc64v1_emit_prologue): New function.
3185 (ppc64v2_emit_prologue): New function.
3186 (ppc64_emit_epilogue): New function.
3187 (ppc64_emit_add): New function.
3188 (ppc64_emit_sub): New function.
3189 (ppc64_emit_mul): New function.
3190 (ppc64_emit_lsh): New function.
3191 (ppc64_emit_rsh_signed): New function.
3192 (ppc64_emit_rsh_unsigned): New function.
3193 (ppc64_emit_ext): New function.
3194 (ppc64_emit_zero_ext): New function.
3195 (ppc64_emit_log_not): New function.
3196 (ppc64_emit_bit_and): New function.
3197 (ppc64_emit_bit_or): New function.
3198 (ppc64_emit_bit_xor): New function.
3199 (ppc64_emit_bit_not): New function.
3200 (ppc64_emit_equal): New function.
3201 (ppc64_emit_less_signed): New function.
3202 (ppc64_emit_less_unsigned): New function.
3203 (ppc64_emit_ref): New function.
3204 (ppc64_emit_const): New function.
3205 (ppc64v1_emit_reg): New function.
3206 (ppc64v2_emit_reg): New function.
3207 (ppc64_emit_pop): New function.
3208 (ppc64_emit_stack_flush): New function.
3209 (ppc64_emit_swap): New function.
3210 (ppc64v1_emit_call): New function.
3211 (ppc64v2_emit_call): New function.
3212 (ppc64v1_emit_int_call_1): New function.
3213 (ppc64v2_emit_int_call_1): New function.
3214 (ppc64v1_emit_void_call_2): New function.
3215 (ppc64v2_emit_void_call_2): New function.
3216 (ppc64_emit_if_goto): New function.
3217 (ppc64_emit_eq_goto): New function.
3218 (ppc64_emit_ne_goto): New function.
3219 (ppc64_emit_lt_goto): New function.
3220 (ppc64_emit_le_goto): New function.
3221 (ppc64_emit_gt_goto): New function.
3222 (ppc64_emit_ge_goto): New function.
3223 (ppc64v1_emit_ops_impl): New static variable.
3224 (ppc64v2_emit_ops_impl): New static variable.
3225 (ppc_emit_ops): New function.
3226 (linux_low_target): Wire in ppc_emit_ops.
3227
a2174ba4
MK
32282016-03-31 Wei-cheng Wang <cole945@gmail.com>
3229 Marcin Kościelnicki <koriakin@0x04.net>
3230
3231 PR/17221
3232 * Makefile.in: Add powerpc-*-ipa.o
3233 * configure.srv: Add ipa_obj for powerpc*-linux.
3234 * linux-ppc-ipa.c: New file.
3235 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3236 includes.
3237 (PPC_FIELD): New macro.
3238 (PPC_SEXT): New macro.
3239 (PPC_OP6): New macro.
3240 (PPC_BO): New macro.
3241 (PPC_LI): New macro.
3242 (PPC_BD): New macro.
3243 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3244 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3245 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3246 (ppc_get_thread_area): New function.
3247 (is_elfv2_inferior): New function.
3248 (gen_ds_form): New function.
3249 (GEN_STD): New macro.
3250 (GEN_STDU): New macro.
3251 (GEN_LD): New macro.
3252 (GEN_LDU): New macro.
3253 (gen_d_form): New function.
3254 (GEN_ADDI): New macro.
3255 (GEN_ADDIS): New macro.
3256 (GEN_LI): New macro.
3257 (GEN_LIS): New macro.
3258 (GEN_ORI): New macro.
3259 (GEN_ORIS): New macro.
3260 (GEN_LWZ): New macro.
3261 (GEN_STW): New macro.
3262 (GEN_STWU): New macro.
3263 (gen_xfx_form): New function.
3264 (GEN_MFSPR): New macro.
3265 (GEN_MTSPR): New macro.
3266 (GEN_MFCR): New macro.
3267 (GEN_MTCR): New macro.
3268 (GEN_SYNC): New macro.
3269 (GEN_LWSYNC): New macro.
3270 (gen_x_form): New function.
3271 (GEN_OR): New macro.
3272 (GEN_MR): New macro.
3273 (GEN_LWARX): New macro.
3274 (GEN_STWCX): New macro.
3275 (GEN_CMPW): New macro.
3276 (gen_md_form): New function.
3277 (GEN_RLDICL): New macro.
3278 (GEN_RLDICR): New macro.
3279 (gen_i_form): New function.
3280 (GEN_B): New macro.
3281 (GEN_BL): New macro.
3282 (gen_b_form): New function.
3283 (GEN_BNE): New macro.
3284 (GEN_LOAD): New macro.
3285 (GEN_STORE): New macro.
3286 (gen_limm): New function.
3287 (gen_atomic_xchg): New function.
3288 (gen_call): New function.
3289 (ppc_relocate_instruction): New function.
3290 (ppc_install_fast_tracepoint_jump_pad): New function.
3291 (ppc_get_min_fast_tracepoint_insn_len): New function.
3292 (ppc_get_ipa_tdesc_idx): New function.
3293 (the_low_target): Wire in the new functions.
3294 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3295 tdescs.
3296 * linux-ppc-tdesc.h: New file.
3297
a13c4696
MK
32982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3299
3300 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3301 (alloc_jump_pad_buffer): New function.
3302 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3303 (alloc_jump_pad_buffer): New function.
3304 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3305 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3306 (alloc_jump_pad_buffer): New function.
3307 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3308 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3309 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3310 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3311
1cda1512
MK
33122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3313
3314 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3315 * linux-amd64-ipa.c: Likewise.
3316 * linux-i386-ipa.c: Likewise.
3317 * linux-s390-ipa.c: Likewise.
3318 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3319 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3320 set_trace_state_variable_value_ptr.
3321 (struct ipa_sym_addresses): Likewise.
3322 (symbol_list): Likewise.
3323 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3324 accessing gdb_collect directly.
3325 (gdb_collect_ptr_type): New typedef.
3326 (get_raw_reg_ptr_type): New typedef.
3327 (get_trace_state_variable_value_ptr_type): New typedef.
3328 (set_trace_state_variable_value_ptr_type): New typedef.
3329 (gdb_collect_ptr): New global.
3330 (get_raw_reg_ptr): New global.
3331 (get_trace_state_variable_value_ptr): New global.
3332 (set_trace_state_variable_value_ptr): New global.
3333 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3334 accessing get_raw_reg directly.
3335 (get_get_tsv_func_addr): Likewise for
3336 get_trace_state_variable_value_ptr.
3337 (get_set_tsv_func_addr): Likewise for
3338 set_trace_state_variable_value_ptr.
3339 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3340
72fb5488
SM
33412016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3342
3343 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3344
28170b88
MK
33452016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3346
3347 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3348 packets.
3349 (relocate_instruction): Remove own_buf.
3350 * server.c (own_buf): Make global.
3351 (handle_v_requests): Make global.
3352 * server.h (own_buf): New declaration.
3353 (handle_v_requests): New prototype.
3354
f39e8743
MK
33552016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3356
3357 PR 18377
3358 * linux-s390-low.c (add_insns): New function.
3359 (s390_emit_prologue): New function.
3360 (s390_emit_epilogue): New function.
3361 (s390_emit_add): New function.
3362 (s390_emit_sub): New function.
3363 (s390_emit_mul): New function.
3364 (s390_emit_lsh): New function.
3365 (s390_emit_rsh_signed): New function.
3366 (s390_emit_rsh_unsigned): New function.
3367 (s390_emit_ext): New function.
3368 (s390_emit_log_not): New function.
3369 (s390_emit_bit_and): New function.
3370 (s390_emit_bit_or): New function.
3371 (s390_emit_bit_xor): New function.
3372 (s390_emit_bit_not): New function.
3373 (s390_emit_equal): New function.
3374 (s390_emit_less_signed): New function.
3375 (s390_emit_less_unsigned): New function.
3376 (s390_emit_ref): New function.
3377 (s390_emit_if_goto): New function.
3378 (s390_emit_goto): New function.
3379 (s390_write_goto_address): New function.
3380 (s390_emit_litpool): New function.
3381 (s390_emit_const): New function.
3382 (s390_emit_call): New function.
3383 (s390_emit_reg): New function.
3384 (s390_emit_pop): New function.
3385 (s390_emit_stack_flush): New function.
3386 (s390_emit_zero_ext): New function.
3387 (s390_emit_swap): New function.
3388 (s390_emit_stack_adjust): New function.
3389 (s390_emit_set_r2): New function.
3390 (s390_emit_int_call_1): New function.
3391 (s390_emit_void_call_2): New function.
3392 (s390_emit_eq_goto): New function.
3393 (s390_emit_ne_goto): New function.
3394 (s390_emit_lt_goto): New function.
3395 (s390_emit_le_goto): New function.
3396 (s390_emit_gt_goto): New function.
3397 (s390_emit_ge_goto): New function.
3398 (s390x_emit_prologue): New function.
3399 (s390x_emit_epilogue): New function.
3400 (s390x_emit_add): New function.
3401 (s390x_emit_sub): New function.
3402 (s390x_emit_mul): New function.
3403 (s390x_emit_lsh): New function.
3404 (s390x_emit_rsh_signed): New function.
3405 (s390x_emit_rsh_unsigned): New function.
3406 (s390x_emit_ext): New function.
3407 (s390x_emit_log_not): New function.
3408 (s390x_emit_bit_and): New function.
3409 (s390x_emit_bit_or): New function.
3410 (s390x_emit_bit_xor): New function.
3411 (s390x_emit_bit_not): New function.
3412 (s390x_emit_equal): New function.
3413 (s390x_emit_less_signed): New function.
3414 (s390x_emit_less_unsigned): New function.
3415 (s390x_emit_ref): New function.
3416 (s390x_emit_if_goto): New function.
3417 (s390x_emit_const): New function.
3418 (s390x_emit_call): New function.
3419 (s390x_emit_reg): New function.
3420 (s390x_emit_pop): New function.
3421 (s390x_emit_stack_flush): New function.
3422 (s390x_emit_zero_ext): New function.
3423 (s390x_emit_swap): New function.
3424 (s390x_emit_stack_adjust): New function.
3425 (s390x_emit_int_call_1): New function.
3426 (s390x_emit_void_call_2): New function.
3427 (s390x_emit_eq_goto): New function.
3428 (s390x_emit_ne_goto): New function.
3429 (s390x_emit_lt_goto): New function.
3430 (s390x_emit_le_goto): New function.
3431 (s390x_emit_gt_goto): New function.
3432 (s390x_emit_ge_goto): New function.
3433 (s390_emit_ops): New function.
3434 (struct linux_target_ops): Fill in emit_ops hook.
3435
abd9baf9
MK
34362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3437
3438 PR 18377
3439 * Makefile.in: Add s390 IPA files.
3440 * configure.srv: Build IPA for s390.
3441 * linux-s390-ipa.c: New file.
3442 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3443 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3444 (tdesc_s390_linux32): Likewise.
3445 (init_registers_s390_linux32v1): Likewise.
3446 (tdesc_s390_linux32v1): Likewise.
3447 (init_registers_s390_linux32v2): Likewise.
3448 (tdesc_s390_linux32v2): Likewise.
3449 (init_registers_s390_linux64): Likewise.
3450 (tdesc_s390_linux64): Likewise.
3451 (init_registers_s390_linux64v1): Likewise.
3452 (tdesc_s390_linux64v1): Likewise.
3453 (init_registers_s390_linux64v2): Likewise.
3454 (tdesc_s390_linux64v2): Likewise.
3455 (init_registers_s390_te_linux64): Likewise.
3456 (tdesc_s390_te_linux64): Likewise.
3457 (init_registers_s390_vx_linux64): Likewise.
3458 (tdesc_s390_vx_linux64): Likewise.
3459 (init_registers_s390_tevx_linux64): Likewise.
3460 (tdesc_s390_tevx_linux64): Likewise.
3461 (init_registers_s390x_linux64): Likewise.
3462 (tdesc_s390x_linux64): Likewise.
3463 (init_registers_s390x_linux64v1): Likewise.
3464 (tdesc_s390x_linux64v1): Likewise.
3465 (init_registers_s390x_linux64v2): Likewise.
3466 (tdesc_s390x_linux64v2): Likewise.
3467 (init_registers_s390x_te_linux64): Likewise.
3468 (tdesc_s390x_te_linux64): Likewise.
3469 (init_registers_s390x_vx_linux64): Likewise.
3470 (tdesc_s390x_vx_linux64): Likewise.
3471 (init_registers_s390x_tevx_linux64): Likewise.
3472 (tdesc_s390x_tevx_linux64): Likewise.
3473 (have_hwcap_s390_vx): New static variable.
3474 (s390_arch_setup): Fill have_hwcap_s390_vx.
3475 (s390_get_thread_area): New function.
3476 (s390_ft_entry_gpr_esa): New const.
3477 (s390_ft_entry_gpr_zarch): New const.
3478 (s390_ft_entry_misc): New const.
3479 (s390_ft_entry_fr): New const.
3480 (s390_ft_entry_vr): New const.
3481 (s390_ft_main_31): New const.
3482 (s390_ft_main_64): New const.
3483 (s390_ft_exit_fr): New const.
3484 (s390_ft_exit_vr): New const.
3485 (s390_ft_exit_misc): New const.
3486 (s390_ft_exit_gpr_esa): New const.
3487 (s390_ft_exit_gpr_zarch): New const.
3488 (append_insns): New function.
3489 (s390_relocate_instruction): New function.
3490 (s390_install_fast_tracepoint_jump_pad): New function.
3491 (s390_get_min_fast_tracepoint_insn_len): New function.
3492 (s390_get_ipa_tdesc_idx): New function.
3493 (struct linux_target_ops): Wire in the above functions.
3494 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3495 * linux-s390-tdesc.h: New file.
3496
a4105d04
MK
34972016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3498
3499 * linux-s390-low.c (s390_supports_tracepoints): New function.
3500 (struct linux_target_ops): Fill supports_tracepoints hook.
3501
35ac8b3e
YQ
35022016-03-18 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-low.c (lwp_signal_can_be_delivered): New function.
3505 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3506
94610ec4
YQ
35072016-03-18 Yao Qi <yao.qi@linaro.org>
3508
3509 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3510 0 if signal is enqueued. Remove 'signal' from one debugging
3511 message. Move one debugging message to some lines below.
3512 Remove code setting 'signal' to 0.
3513
80aea927
YQ
35142016-03-18 Yao Qi <yao.qi@linaro.org>
3515
3516 * linux-low.c (linux_low_filter_event): Remove redundant
3517 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3518
b04fd3be
MK
35192016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3520
3521 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3522 (struct linux_target_ops): Wire in the above.
3523
c40c8d4b
YQ
35242016-03-03 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-low.c: Update comments to start_step_over.
3527
0f8288ae
YQ
35282016-03-03 Yao Qi <yao.qi@linaro.org>
3529
3530 PR server/19736
3531 * linux-low.c (handle_extended_wait): Set child suspended
3532 if event_lwp->bp_reinsert isn't zero.
3533
fdbd04a8
YQ
35342016-03-02 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3537 enqueue_pending_signal.
3538
6896a8fa
MK
35392016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3540
3541 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3542 is actually loaded.
3543
ab503087
MK
35442016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3545
3546 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3547 (s390_regmap_3264) [!__s390x__]: New global.
3548 (s390_collect_ptrace_register): Skip map entries containing -1.
3549 (s390_supply_ptrace_register): Ditto.
3550 (s390_fill_gprs_high): New function.
3551 (s390_store_gprs_high): New function.
3552 (s390_regsets): Add NT_S390_HIGH_GPRS.
3553 (s390_get_hwcap): Enable on 31-bit.
3554 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3555 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3556 Detect NT_S390_HIGH_GPRS.
3557 (s390_usrregs_info_3264): Enable on 31-bit.
3558 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3559 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3560
ae91f625
MK
35612016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3562
3563 PR gdb/13808
3564 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3565 * configure.srv: Ditto.
3566 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3567 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3568 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3569 (init_registers_amd64_linux): Remove prototype.
3570 (tdesc_amd64_linux): Remove declaration.
3571 (get_ipa_tdesc): New function.
3572 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3573 initialize remaining tdescs.
3574 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3575 (init_registers_i386_linux): Remove prototype.
3576 (tdesc_i386_linux): Remove declaration.
3577 (get_ipa_tdesc): New function.
3578 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3579 initialize remaining tdescs.
3580 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3581 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3582 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3583 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3584 (x86_get_ipa_tdesc_idx): New function.
3585 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3586 * linux-x86-tdesc.h: New file.
3587 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3588 (target_get_ipa_tdesc_idx): New macro.
3589 * tracepoint.c (ipa_tdesc_idx): New macro.
3590 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3591 (symbol_list): Add ipa_tdesc_idx.
3592 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3593 (ipa_tdesc): Remove.
3594 (ipa_tdesc_idx): New variable.
3595 (get_context_regcache): Use get_ipa_tdesc.
3596 (gdb_collect): Ditto.
3597 (gdb_probe): Ditto.
3598 * tracepoint.h (get_ipa_tdesc): New prototype.
3599 (ipa_tdesc): Remove.
3600
e7ad2f14
PA
36012016-02-24 Pedro Alves <palves@redhat.com>
3602
3603 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3604 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3605 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3606 Factor out common code between the USE_SIGTRAP_SIGINFO and
3607 !USE_SIGTRAP_SIGINFO blocks.
3608 (linux_low_filter_event): Call save_stop_reason instead of
3609 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3610 Update comments.
3611 (linux_wait_1): Update comments.
3612
657f9cde
WW
36132016-02-24 Wei-cheng Wang <cole945@gmail.com>
3614
3615 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3616 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3617 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3618 ppc_insert_point, ppc_remove_point.
3619
b00b61e1
MK
36202016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3621
3622 * linux-s390-low.c (s390_supports_z_point_type): New function.
3623 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3624
553cb527
YQ
36252016-02-16 Yao Qi <yao.qi@linaro.org>
3626
3627 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3628 PC. Get pc from regcache_read_pc.
3629
a5652c21
YQ
36302016-02-12 Yao Qi <yao.qi@linaro.org>
3631
3632 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3633 or linux_get_pc_32bit.
3634 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3635
ed443b61
YQ
36362016-02-12 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3639 arm_linux_get_next_pcs_fixup.
3640
020ecd38
MK
36412016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3642
3643 * tracepoint.c (x_tracepoint_action_download): Change
3644 write_inferior_data_ptr to write_inferior_data_pointer.
3645 (cmd_qtstart): Likewise.
3646 (write_inferior_data_ptr): Remove.
3647 (download_agent_expr): Change write_inferior_data_ptr to
3648 write_inferior_data_pointer.
3649 (download_tracepoint_1): Likewise.
3650 (download_tracepoint): Likewise.
3651 (download_trace_state_variables): Likewise.
3652
7cae9051
WW
36532016-02-11 Wei-cheng Wang <cole945@gmail.com>
3654 Marcin Kościelnicki <koriakin@0x04.net>
3655
3656 * tracepoint.c (struct tracepoint_action_ops): Remove.
3657 (struct tracepoint_action): Remove ops.
3658 (m_tracepoint_action_download, r_tracepoint_action_download)
3659 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3660 size and offset accordingly.
3661 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3662 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3663 (tracepoint_action_send, tracepoint_action_download): New functions.
3664 Helpers for trace action handlers.
3665 (add_tracepoint_action): Remove setup actions ops.
3666 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3667
9f6a71b4
YQ
36682016-02-10 Yao Qi <yao.qi@linaro.org>
3669
3670 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3671
1e94266c
SM
36722016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3673
3674 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3675 to AC_OUTPUT.
3676 * configure: Regenerate.
3677
8adce034
SM
36782016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3679
3680 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3681 void * to gdb_byte *.
3682 * linux-low.c (siginfo_fixup): Likewise.
3683 (linux_xfer_siginfo): Likewise.
3684 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3685 Likewise.
3686 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3687
93813b37
WT
36882016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3689
3690 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3691 to srv_tgtobj.
3692 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3693 to srv_tgtobj.
3694 * linux-x86-low.c [__x86_64__]: Include
3695 "nat/amd64-linux-siginfo.h".
3696 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3697 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3698 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3699 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3700 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3701 (cpt_si_fd, si_timerid, si_overrun): Move from
3702 nat/amd64-linux-siginfo.c.
3703 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3704
8424cc97
SM
37052016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3706
3707 * server.c (skip_to_semicolon): Remove.
3708 (process_point_options): Use strchrnul instead of
3709 skip_to_semicolon.
3710
4d18591b
YQ
37112016-01-26 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3714 * linux-low.c (install_software_single_step_breakpoints): Don't
3715 call regcache_read_pc.
3716 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3717 argument pc.
3718
d8020970
YQ
37192016-01-26 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-low.c (install_software_single_step_breakpoints): Call
3722 regcache_read_pc instead of get_pc.
3723
8b207339
YQ
37242016-01-26 Yao Qi <yao.qi@linaro.org>
3725
3726 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3727 (unblock_async_io): Rename to ...
3728 (block_unblock_async_io): ... it. New function.
3729 (enable_async_io): Don't install SIGIO handler. Unblock it
3730 instead.
3731 (disable_async_io): Don't ignore SIGIO. Block it instead.
3732 (initialize_async_io): Install SIGIO handler. Don't call
3733 unblock_async_io.
3734
18879fef
YQ
37352016-01-26 Yao Qi <yao.qi@linaro.org>
3736
3737 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3738 first character is '\003', call *the_target->request_interrupt.
3739
a0f8e08a
YQ
37402016-01-25 Yao Qi <yao.qi@linaro.org>
3741
3742 * remote-utils.c (new_thread_notify): Remove.
3743 (dead_thread_notify): Likewise.
3744 * remote-utils.h (new_thread_notify): Remove declaration.
3745 (dead_thread_notify): Likewise.
3746
cc5fd9ab
MK
37472016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3748
3749 * gdb.trace/pending.exp: Fix expected message on continue.
3750
99e8eb11
MK
37512016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3752
3753 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3754 it works properly on big-endian machines where sizeof (CORE_ADDR)
3755 != sizeof (void *).
3756
a994041d
PA
37572016-01-21 Pedro Alves <palves@redhat.com>
3758
3759 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3760 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3761 * configure: Regenerate.
3762
f7a6a40d
YQ
37632016-01-21 Yao Qi <yao.qi@linaro.org>
3764
3765 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3766 is_thumb and set it according to CPSR saved on the stack.
3767 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3768 arm_sigreturn_next_pc.
3769
6f69e520
YQ
37702016-01-18 Yao Qi <yao.qi@linaro.org>
3771
3772 * linux-low.c (linux_set_pc_64bit): New function.
3773 (linux_get_pc_64bit): New function.
3774 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3775 Declare.
3776 * linux-sparc-low.c (debug_threads): Remove declaration.
3777 (sparc_get_pc): Remove.
3778 (the_low_target): Use linux_get_pc_64bit instead of
3779 sparc_get_pc.
3780 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3781 (the_low_target): Use linux_get_pc_64bit and
3782 linux_set_pc_64bit.
3783
276d4552
YQ
37842016-01-18 Yao Qi <yao.qi@linaro.org>
3785
3786 * linux-arm-low.c (debug_threads): Remove declaration.
3787 (arm_get_pc, arm_set_pc): Remove.
3788 (the_low_target): Use linux_get_pc_32bit and
3789 linux_set_pc_32bit.
3790 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3791 (the_low_target): Use linux_get_pc_32bit and
3792 linux_set_pc_32bit.
3793 * linux-cris-low.c (debug_threads): Remove declaration.
3794 (cris_get_pc, cris_set_pc,): Remove.
3795 (the_low_target): Use linux_get_pc_32bit and
3796 linux_set_pc_32bit.
3797 * linux-crisv32-low.c (debug_threads): Remove declaration.
3798 (cris_get_pc, cris_set_pc): Remove.
3799 (the_low_target): Use linux_get_pc_32bit and
3800 linux_set_pc_32bit.
3801 * linux-low.c: Include inttypes.h.
3802 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3803 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3804 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3805 (the_low_target): Use linux_get_pc_32bit and
3806 linux_set_pc_32bit.
3807 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3808 (the_low_target): Use linux_get_pc_32bit and
3809 linux_set_pc_32bit.
3810 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3811 (the_low_target): Use linux_get_pc_32bit and
3812 linux_set_pc_32bit.
3813 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3814 (the_low_target): Use linux_get_pc_32bit and
3815 linux_set_pc_32bit.
3816 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3817 (the_low_target): Use linux_get_pc_32bit and
3818 linux_set_pc_32bit.
3819
eb0edac8
GB
38202016-01-18 Gary Benson <gbenson@redhat.com>
3821
3822 * configure.ac (AC_FUNC_FORK): New check.
3823 * config.in: Regenerate.
3824 * configure: Likewise.
3825
1b451dda
YQ
38262016-01-14 Yao Qi <yao.qi@linaro.org>
3827
3828 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3829 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3830 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3831 arm_get_next_pcs_ctor.
3832
82075af2
JS
38332016-01-12 Josh Stone <jistone@redhat.com>
3834 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3835
3836 * inferiors.h: Include "gdb_vecs.h".
3837 (struct process_info): Add syscalls_to_catch.
3838 * inferiors.c (remove_process): Free syscalls_to_catch.
3839 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3840 syscall_return stops.
3841 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3842 * server.c (handle_general_set): Handle QCatchSyscalls.
3843 (handle_query): Report support for QCatchSyscalls.
3844 * target.h (struct target_ops): Add supports_catch_syscall.
3845 (target_supports_catch_syscall): New macro.
3846 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3847 (struct lwp_info): Add syscall_state.
3848 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3849 Maintain syscall_state and syscalls_to_catch across exec.
3850 (get_syscall_trapinfo): New function, proxy to the_low_target.
3851 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3852 (linux_low_filter_event): Toggle syscall_state entry/return for
3853 syscall traps, and set it ignored for all others.
3854 (gdb_catching_syscalls_p): New function.
3855 (gdb_catch_this_syscall_p): New function.
3856 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3857 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3858 (linux_supports_catch_syscall): New function.
3859 (linux_target_ops): Install it.
3860 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3861 (the_low_target): Install it.
3862
8f13a3ce
MF
38632016-01-12 Mike Frysinger <vapier@gentoo.org>
3864
3865 * acinclude.m4: Include new ../warning.m4 file.
3866 * configure: Regenerated.
3867 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3868
5b3da067
MF
38692016-01-12 Mike Frysinger <vapier@gentoo.org>
3870
3871 * ax.c (is_goto_target): Mark static.
3872 * linux-low.c (register_addr): Likewise.
3873 (linux_fetch_registers, linux_store_registers): Likewise.
3874 * mem-break.c (any_persistent_commands): Fix old prototype.
3875 (add_commands_to_breakpoint): Mark static.
3876 * regcache.c (find_register_by_name): Delete unused func.
3877 * remote-utils.c (hex_or_minus_one): Mark static.
3878 * server.c (monitor_show_help): Mark static.
3879 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3880 handle_v_requests): Likewise.
3881
bc504a31
PA
38822016-01-12 Pedro Alves <palves@redhat.com>
3883
3884 Remove use of the registered trademark symbol throughout.
3885
5a0dd67a
YQ
38862016-01-08 Yao Qi <yao.qi@linaro.org>
3887
3888 * remote-utils.c (getpkt): If c is '\003', call target hook
3889 request_interrupt.
3890
b2ca446f
YQ
38912016-01-06 Yao Qi <yao.qi@linaro.org>
3892
3893 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3894 linux-aarch32-low.c.
3895 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3896 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3897 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3898 (thumb2_breakpoint): Declare.
3899 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3900 linux-aarch32-low.h.
3901 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3902 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3903 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3904
edd88788
JB
39052016-01-01 Joel Brobecker <brobecker@adacore.com>
3906
3907 * gdbreplay.c (gdbreplay_version): Change copyright year in
3908 version message.
3909 * server.c (gdbserver_version): Likewise.
3910
65da7f14
PP
39112015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3912
3913 * server.c (crc32_table): Delete.
3914 (crc32): Use libiberty's xcrc32 function.
3915
4abd5ed2
JB
39162015-12-22 Joel Brobecker <brobecker@adacore.com>
3917
3918 * lynx-low.c (lynx_delete_thread_callback): New function.
3919 (lynx_mourn): Properly delete our process and all of its
3920 threads. Remove call to clear_inferiors.
3921
0e50fe5c
JB
39222015-12-22 Joel Brobecker <brobecker@adacore.com>
3923
3924 * target.c (thread_search_callback): Add check that
3925 the thread_stopped target callback is not NULL before
3926 calling it.
3927
35adc03f
YQ
39282015-12-21 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3931 arm breakpoint.
3932
bd2b2909
AT
39332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3934
3935 * server.c (handle_query): Call target_supports_software_single_step.
3936
7fe5e27e
AT
39372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3938
3939 * linux-low.c (single_step): New function.
3940 (linux_resume_one_lwp_throw): Call single_step.
3941 (start_step_over): Likewise.
3942
d9311bfa
AT
39432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3944
3945 * Makefile.in (SFILES): Append arch/arm-linux.c,
3946 arch/arm-get-next-pcs.c.
3947 (arm-linux.o): New rule.
3948 (arm-get-next-pcs.o): New rule.
3949 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3950 arm-linux.o.
3951 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3952 to linux-aarch32-low.c.
3953 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3954 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3955 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3956 (thumb2_breakpoint_len): Likewise.
3957 (arm_is_thumb_mode): Make non-static.
3958 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3959 from linux-aarch32-low.c.
3960 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3961 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3962 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3963 (thumb2_breakpoint_len): Likewise.
3964 (arm_is_thumb_mode): New declaration.
3965 * linux-arm-low.c: Include arch/arm-linux.h
3966 aarch/arm-get-next-pcs.h, sys/syscall.h.
3967 (get_next_pcs_ops): New struct.
3968 (get_next_pcs_addr_bits_remove): New function.
3969 (get_next_pcs_is_thumb): New function.
3970 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3971 (arm_sigreturn_next_pc): Likewise.
3972 (get_next_pcs_syscall_next_pc): Likewise.
3973 (arm_gdbserver_get_next_pcs): Likewise.
3974 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3975 Initialize.
3976 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3977 * server.h: Include gdb_vecs.h.
3978
68ce2059
AT
39792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3980
3981 * Makefile.in (SFILES): Append common/common-regcache.c.
3982 (OBS): Append common-regcache.o.
3983 (common-regcache.o): New rule.
3984 * regcache.c (init_register_cache): Initialize cache to
3985 REG_UNAVAILABLE.
3986 (regcache_raw_read_unsigned): New function.
3987 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3988 register_status enum.
3989
fa5308bd
AT
39902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3991
3992 * linux-aarch64-low.c (the_low_targets): Rename
3993 breakpoint_reinsert_addr to get_next_pcs.
3994 * linux-arm-low.c (the_low_targets): Likewise.
3995 * linux-bfin-low.c (the_low_targets): Likewise.
3996 * linux-cris-low.c (the_low_targets): Likewise.
3997 * linux-crisv32-low.c (the_low_targets): Likewise.
3998 * linux-low.c (can_software_single_step): Likewise.
3999 (install_software_single_step_breakpoints): New function.
4000 (start_step_over): Use install_software_single_step_breakpoints.
4001 * linux-low.h: New CORE_ADDR vector.
4002 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4003 get_next_pcs.
4004 * linux-mips-low.c (the_low_targets): Likewise.
4005 * linux-nios2-low.c (the_low_targets): Likewise.
4006 * linux-sparc-low.c (the_low_targets): Likewise.
4007
4a6ed09b
PA
40082015-12-17 Pedro Alves <palves@redhat.com>
4009
4010 * linux-low.c (linux_kill_one_lwp): Remove references to
4011 LinuxThreads.
4012 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4013 to 'kill'.
4014 (linux_init_signals): Delete.
4015 (initialize_low): Adjust.
4016 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4017
7544db95
PA
40182015-12-16 Pedro Alves <palves@redhat.com>
4019
4020 * configure.ac (compiler warning flags): When testing a
4021 -Wno-foo option, check whether -Wfoo works instead.
4022 * configure: Regenerate.
4023
8020350c
DB
40242015-12-11 Don Breazeal <donb@codesourcery.com>
4025
4026 * server.c (process_serial_event): Don't exit from gdbserver
4027 in remote mode if there are still active inferiors.
4028
db91f502
YQ
40292015-12-11 Yao Qi <yao.qi@linaro.org>
4030
4031 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4032 arm_breakpoint_at if the process is 32-bit.
4033
b37a6290
YQ
40342015-12-11 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4037 arm breakpoint.
4038
17b1509a
YQ
40392015-12-07 Yao Qi <yao.qi@linaro.org>
4040
4041 * configure.srv: Append arm.o to srv_tgtobj for
4042 aarch64*-*-linux* target.
4043 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4044 from linux-arm-low.c.
4045 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4046 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4047 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4048 (thumb2_breakpoint_len): Likewise.
4049 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4050 (arm_breakpoint_kinds): Likewise.
4051 (arm_breakpoint_kind_from_pc): Likewise.
4052 (arm_sw_breakpoint_from_kind): Likewise.
4053 (arm_breakpoint_kind_from_current_state): Likewise.
4054 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4055 (arm_sw_breakpoint_from_kind): Declare.
4056 (arm_breakpoint_kind_from_current_state): Declare.
4057 (arm_breakpoint_at): Declare.
4058 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4059 arm_sw_breakpoint_from_kind if process is 32-bit.
4060 (aarch64_breakpoint_kind_from_pc): New function.
4061 (aarch64_breakpoint_kind_from_current_state): New function.
4062 (the_low_target): Initialize fields breakpoint_kind_from_pc
4063 and breakpoint_kind_from_current_state.
4064 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4065 linux-aarch32-low.c.
4066 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4067 (arm_breakpoint, arm_breakpoint_len): Likewise.
4068 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4069 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4070 (arm_is_thumb_mode): Likewise.
4071 (arm_breakpoint_at): Likewise.
4072 (arm_breakpoint_kind_from_pc): Likewise.
4073 (arm_sw_breakpoint_from_kind): Likewise.
4074 (arm_breakpoint_kind_from_current_state): Likewise.
4075
4076 Revert:
4077 2015-08-04 Yao Qi <yao.qi@linaro.org>
4078
4079 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4080 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4081 * server.c (extended_protocol): Remove "static".
4082 * server.h (extended_protocol): Declare it.
4083
ece66d65
JS
40842015-12-04 Josh Stone <jistone@redhat.com>
4085
4086 * target.h (struct target_ops) <arch_setup>: Rename to ...
4087 (struct target_ops) <post_create_inferior>: ... this.
4088 (target_arch_setup): Rename to ...
4089 (target_post_create_inferior): ... this, calling post_create_inferior.
4090 * server.c (start_inferior): Update target_arch_setup calls to
4091 target_post_create_inferior.
4092 * linux-low.c (linux_low_ptrace_options): Forward declare.
4093 (linux_arch_setup): Update its comment for general use.
4094 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4095 (struct linux_target_ops): Use linux_post_create_inferior.
4096 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4097 to post_create_inferior.
4098 * nto-low.c (struct nto_target_ops): Likewise.
4099 * spu-low.c (struct spu_target_ops): Likewise.
4100 * win32-low.c (struct win32_target_ops): Likewise.
4101
e58c48b4
AT
41022015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4103
4104 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4105
fbec8956
AT
41062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4107
4108 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4109 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4110 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4111 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4112 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4113 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4114 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4116 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4118 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4119 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4120
9b4c5f87
AT
41212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4122
4123 * linux-low.c (linux_look_up_symbols): Don't call
4124 linux_supports_traceclone.
4125 * linux-low.h (thread_db_init): Remove use_events argument.
4126 * thread-db.c (thread_db_use_event): Remove global variable.
4127 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4128 (struct thread_db) <td_create_bp>: Remove field.
4129 (thread_db_create_event): Remove function.
4130 (thread_db_enable_reporting): Likewise.
4131 (find_one_thread): Don't check for thread_db_use_events.
4132 (attach_thread): Likewise.
4133 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4134 (try_thread_db_load_1): Don't check for thread_db_use_events.
4135 (thread_db_init): Remove use_events argument and thread events
4136 handling.
4137 (remove_thread_event_breakpoints): Remove function.
4138 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4139
7d00775e
AT
41402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4141
4142 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4143 New function.
4144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4145 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4146 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4147 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4148 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4149 Initialize.
4150 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4151 New function.
4152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4153 * linux-low.c (can_hardware_single_step): Use
4154 supports_hardware_single_step.
4155 (can_software_single_step): New function.
4156 (start_step_over): Call can_software_single_step.
4157 (linux_supports_hardware_single_step): New function.
4158 (struct target_ops) <supports_software_single_step>: Initialize.
4159 * linux-low.h (struct linux_target_ops)
4160 <supports_hardware_single_step>: Initialize.
4161 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4163 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4164 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4165 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4167 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4168 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4169 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4170 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4171 Initialize.
4172 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4173 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4174 Initialize.
4175 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4177 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4178 New function.
4179 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4180 * target.h (struct target_ops): <supports_software_single_step>:
4181 New field.
4182 (target_supports_software_single_step): New macro.
4183
2d97cd35
AT
41842015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4185
4186 * linux-low.c (linux_wait_1): Fix pc advance condition.
4187 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4188 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4189
769ef81f
AT
41902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4191
4192 * linux-arm-low.c (arm_is_thumb_mode): New function.
4193 (arm_breakpoint_at): Use arm_is_thumb_mode.
4194 (arm_breakpoint_kind_from_current_state): New function.
4195 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4196 Initialize.
4197 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4198 (linux_breakpoint_kind_from_current_state): New function.
4199 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4200 * linux-low.h (struct linux_target_ops)
4201 <breakpoint_kind_from_current_state>: New field.
4202 * target.h (struct target_ops): Likewise.
4203 (target_breakpoint_kind_from_current_state): New macro.
4204
1bebeeca
PA
42052015-11-30 Pedro Alves <palves@redhat.com>
4206
4207 * linux-low.c (linux_resume): Wake up the event loop before
4208 returning.
4209
a67a9fae
PA
42102015-11-30 Pedro Alves <palves@redhat.com>
4211
4212 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4213 check.
4214 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4215 to -1.
4216 * target.c (struct thread_search): New structure.
4217 (thread_search_callback): New function.
4218 (prev_general_thread): New global.
4219 (prepare_to_access_memory, done_accessing_memory): New functions.
4220 * target.h (prepare_to_access_memory, done_accessing_memory):
4221 Replace macros with function declarations.
4222
f2faf941
PA
42232015-11-30 Pedro Alves <palves@redhat.com>
4224
4225 PR 14618
4226 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4227 report TARGET_WAITKIND_NO_RESUMED.
4228 * remote-utils.c (prepare_resume_reply): Handle
4229 TARGET_WAITKIND_NO_RESUMED.
4230 * server.c (report_no_resumed): New global.
4231 (handle_query) <qSupported>: Handle "no-resumed+". Report
4232 "no-resumed+" support.
4233 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4234 return error if the client doesn't support no-resumed events.
4235 (push_stop_notification): New function.
4236 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4237 events if the client supports them.
4238
a681f9c9
PA
42392015-11-30 Pedro Alves <palves@redhat.com>
4240
4241 * linux-low.c (thread_still_has_status_pending_p): Don't check
4242 vCont;t here.
4243 (lwp_resumed): New function.
4244 (status_pending_p_callback): Return early if the LWP is not
4245 supposed to be resumed.
4246
65706a29
PA
42472015-11-30 Pedro Alves <palves@redhat.com>
4248
4249 * linux-low.c (handle_extended_wait): Assert that the LWP's
4250 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4251 thread create events, leave the new child's status pending.
4252 (linux_low_filter_event): If GDB wants to hear about thread exit
4253 events, leave the LWP marked dead and don't delete it.
4254 (linux_wait_for_event_filtered): Don't check for thread exit.
4255 (filter_exit_event): New function.
4256 (linux_wait_1): Use it, when returning an exit event.
4257 (linux_resume_one_lwp_throw): Assert that the LWP's
4258 waitstatus is TARGET_WAITKIND_IGNORE.
4259 * remote-utils.c (prepare_resume_reply): Handle
4260 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4261 * server.c (report_thread_events): New global.
4262 (handle_general_set): Handle QThreadEvents.
4263 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4264 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4265 TARGET_WAITKIND_THREAD_EXITED.
4266 * server.h (report_thread_events): Declare.
4267
56cf4bed
PA
42682015-11-30 Pedro Alves <palves@redhat.com>
4269
4270 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4271 the thread's last_resume_kind was resume_stop.
4272
500c1d85
PA
42732015-11-30 Pedro Alves <palves@redhat.com>
4274
4275 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4276 before returning.
4277
de979965
PA
42782015-11-30 Pedro Alves <palves@redhat.com>
4279
4280 * server.c (handle_v_requests): Handle vCtrlC.
4281
34c65914
PA
42822015-11-30 Pedro Alves <palves@redhat.com>
4283
4284 * gdbthread.h (find_any_thread_of_pid): Declare.
4285 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4286 functions.
4287 * server.c (handle_query): If current_thread is NULL, look for
4288 another thread of the selected process.
4289
79efa585 42902015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4291 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4292
4293 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4294 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4295 name in reply.
4296 * target.h (struct target_ops) <thread_name>: New field.
4297 (target_thread_name): New macro.
4298
80d82c19
JB
42992015-11-23 Joel Brobecker <brobecker@adacore.com>
4300
4301 * regcache.h (regcache_invalidate_pid): Add declaration.
4302 * regcache.c (regcache_invalidate_pid): New function, extracted
4303 from regcache_invalidate.
4304 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4305 Add trivial documentation comment.
4306 * lynx-low.c: Use regcache_invalidate_pid instead of
4307 regcache_invalidate.
4308
64da5dd5
JB
43092015-11-23 Joel Brobecker <brobecker@adacore.com>
4310
4311 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4312 and Elf64_auxv_t if the target is Android.
4313
37ce4055
DE
43142015-11-22 Doug Evans <xdje42@gmail.com>
4315
4316 * target.h: #include <sys/types.h>.
4317
06e03fff
PA
43182015-11-19 Pedro Alves <palves@redhat.com>
4319
4320 * linux-low.c (linux_process_qsupported): Change prototype.
4321 Adjust.
4322 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4323 Change prototype.
4324 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4325 and adjust to loop over all features.
4326 * server.c (handle_query) <qSupported>: Adjust to call
4327 target_process_qsupported once, passing it a vector of unprocessed
4328 features.
4329 * target.h (struct target_ops) <process_qsupported>: Change
4330 prototype.
4331 (target_process_qsupported): Adjust.
4332
9a084706
PA
43332015-11-19 Pedro Alves <palves@redhat.com>
4334
4335 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4336 mode.
4337 * configure: Regenerate.
4338
dad44a1f
PA
43392015-11-19 Pedro Alves <palves@redhat.com>
4340
4341 * configure: Regenerate.
4342
231c0592
YQ
43432015-11-19 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4346 type to uint32_t.
4347
6c1c9a8b
YQ
43482015-11-19 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4351 (struct aarch64_operand): Move enum out.
4352
9caa3311
YQ
43532015-11-19 Yao Qi <yao.qi@linaro.org>
4354
4355 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4356 struct user_fpsimd_state *.
4357 (aarch64_store_fpregset): Likewise.
4358
6a69a054
YQ
43592015-11-19 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4362 struct user_pt_regs *.
4363 (aarch64_store_gregset): Likewise.
4364
1798301e
PA
43652015-11-18 Pedro Alves <palves@redhat.com>
4366
4367 * Makefile.in (all_object_files): Add $IPA_OBJS.
4368
ce7715e2
PA
43692015-11-17 Pedro Alves <palves@redhat.com>
4370
4371 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4372 GDB_SIGNAL_0 and gdb_signal_to_string.
4373
c0879059
PA
43742015-11-17 Pedro Alves <palves@redhat.com>
4375
4376 * win32-low.c (handle_output_debug_string): Remove parameter.
4377 (win32_kill): Remove our_status local and adjust call to
4378 handle_output_debug_string.
4379 (get_child_debug_event): Adjust call to
4380 handle_output_debug_string.
4381
1996e237
SM
43822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4383
4384 * linux-mips-low.c (mips_fill_gregset): Add cast.
4385 (mips_store_gregset): Likewise.
4386 (mips_fill_fpregset): Likewise.
4387 (mips_store_fpregset): Likewise.
4388
cbec665b
SM
43892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4390
4391 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4392 priv.
4393
eb3e3c67
SM
43942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4395
4396 * linux-mips-low.c (mips_linux_new_thread): Change type of
4397 watch_type to enum target_hw_bp_type.
4398
171de4b8
SM
43992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4400
4401 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4402 Change return type to arm_hwbp_type.
4403
04248ead
SM
44042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4405
4406 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4407 (arm_store_gregset): Likewise.
4408 * linux-arm-low.c (arm_get_hwcap): Likewise.
4409 (arm_read_description): Likewise.
4410
04b3479c
SM
44112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4412
4413 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4414
2bc84e8a
SM
44152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4416
4417 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4418 (ppc_fill_vsxregset): Likewise.
4419 (ppc_store_vsxregset): Likewise.
4420 (ppc_fill_vrregset): Likewise.
4421 (ppc_store_vrregset): Likewise.
4422 (ppc_fill_evrregset): Likewise.
4423 (ppc_store_evrregset): Likewise.
4424
e6c5bb05
SM
44252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4426
4427 * linux-ppc-low.c (ppc_usrregs_info): Remove
4428 forward-declaration.
4429 (ppc_arch_setup): Move lower in file.
4430
7ea45d72
SM
44312015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4432
4433 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4434 (ps_pdwrite): Likewise.
4435
69291610
HW
44362015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4437
4438 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4439 to after assert checks.
4440
b42945fd
SM
44412015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4442
4443 * proc-service.c (ps_pdread): Add/adjust casts.
4444 (ps_pdwrite): Add/adjust casts.
4445
d6f85c84
SM
44462015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4447
4448 * server.c (handle_search_memory_1): Cast return value of
4449 memmem.
4450
f98cd059
SM
44512015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4452
4453 * server.c (write_qxfer_response): Change type of data to
4454 gdb_byte *.
4455
d2412fa5
PA
44562015-10-29 Pedro Alves <palves@redhat.com>
4457
4458 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4459
c17414a2
PA
44602015-10-29 Pedro Alves <palves@redhat.com>
4461
4462 * tracepoint.c (clear_installed_tracepoints): Add casts.
4463
e053fbc4
PA
44642015-10-29 Pedro Alves <palves@redhat.com>
4465
4466 * server.c (handle_v_cont, process_serial_event): Add enum
4467 gdb_signal casts to signal parsing code.
4468
add67df8
PA
44692015-10-29 Pedro Alves <palves@redhat.com>
4470
4471 * linux-low.h (NULL_REGSET): Define.
4472 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4473 * linux-arm-low.c (arm_regsets): Likewise.
4474 * linux-crisv32-low.c (cris_regsets): Likewise.
4475 * linux-m68k-low.c (m68k_regsets): Likewise.
4476 * linux-mips-low.c (mips_regsets): Likewise.
4477 * linux-nios2-low.c (nios2_regsets): Likewise.
4478 * linux-ppc-low.c (ppc_regsets): Likewise.
4479 * linux-s390-low.c (s390_regsets): Likewise.
4480 * linux-sh-low.c (sh_regsets): Likewise.
4481 * linux-sparc-low.c (sparc_regsets): Likewise.
4482 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4483 * linux-tile-low.c (tile_regsets): Likewise.
4484 * linux-x86-low.c (x86_regsets): Likewise.
4485 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4486
50bc912a
PA
44872015-10-29 Pedro Alves <palves@redhat.com>
4488
4489 * linux-low.h (NULL_REGSET): Define.
4490 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4491 * linux-arm-low.c (arm_regsets): Likewise.
4492 * linux-crisv32-low.c (cris_regsets): Likewise.
4493 * linux-m68k-low.c (m68k_regsets): Likewise.
4494 * linux-mips-low.c (mips_regsets): Likewise.
4495 * linux-nios2-low.c (nios2_regsets): Likewise.
4496 * linux-ppc-low.c (ppc_regsets): Likewise.
4497 * linux-s390-low.c (s390_regsets): Likewise.
4498 * linux-sh-low.c (sh_regsets): Likewise.
4499 * linux-sparc-low.c (sparc_regsets): Likewise.
4500 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4501 * linux-tile-low.c (tile_regsets): Likewise.
4502 * linux-x86-low.c (x86_regsets): Likewise.
4503 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4504
682b2546
DE
45052015-10-26 Doug Evans <dje@google.com>
4506
4507 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4508
963843d4
DE
45092015-10-26 Doug Evans <dje@google.com>
4510
4511 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4512
d41401ac
DE
45132015-10-26 Doug Evans <dje@google.com>
4514
4515 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4516 for debug_printf.
4517 (attach_thread, find_new_threads_callback): Ditto.
4518
3db28855
AT
45192015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4520
4521 * mem-break.h (set_breakpoint_data): Remove.
4522
fb78e89c
AT
45232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4524
4525 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4526 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4527 (initialize_low): Remove set_breakpoint_data call.
4528 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4529 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4530 (initialize_low): Remove set_breakpoint_data call.
4531 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4532 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4533 (initialize_low): Remove set_breakpoint_data call.
4534
2e6ee069
AT
45352015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4536
4537 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4538 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4539 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4540 * target.h (target_breakpoint_kind_from_pc): New macro.
4541
1652a986
AT
45422015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4543
4544 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4545 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4546 the default breakpoint kind.
4547
abeead09
AT
45482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4549
4550 * linux-arm-low.c (arm_supports_z_point_type): Add software
4551 breakpoint support.
4552
b0b4b501
AT
45532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4554
4555 * linux-arm-low.c: Refactor breakpoint definitions.
4556 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4557 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4558
8689682c
AT
45592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4560
4561 * Makefile.in: Add arm.c/o.
4562 * configure.srv: Likewise.
4563 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4564 (arm_breakpoint_kind_from_pc): New function.
4565 (arm_sw_breakpoint_from_kind): Return proper kind.
4566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4567
27165294
AT
45682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4569
4570 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4571 removal.
4572 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4573 (struct raw_breakpoint) <size>: Remove.
4574 (struct raw_breakpoint) <kind>: Add.
4575 (bp_size): New function.
4576 (bp_opcode): Likewise.
4577 (find_raw_breakpoint_at): Adjust for kind.
4578 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4579 (remove_memory_breakpoint): Adjust for kind call bp_size.
4580 (set_raw_breakpoint_at): Adjust for kind.
4581 (set_breakpoint): Likewise.
4582 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4583 (delete_raw_breakpoint): Adjust for kind.
4584 (delete_breakpoint): Likewise.
4585 (find_gdb_breakpoint): Likewise.
4586 (set_gdb_breakpoint_1): Likewise.
4587 (set_gdb_breakpoint): Likewise.
4588 (delete_gdb_breakpoint_1): Likewise.
4589 (delete_gdb_breakpoint): Likewise.
4590 (uninsert_raw_breakpoint): Likewise.
4591 (reinsert_raw_breakpoint): Likewise.
4592 (set_breakpoint_data): Remove.
4593 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4594 (check_mem_read): Adjust for kind call bp_size.
4595 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4596 (clone_one_breakpoint): Adjust for kind.
4597 * mem-break.h (set_gdb_breakpoint): Likewise.
4598 (delete_gdb_breakpoint): Likewise.
4599 * server.c (process_serial_event): Likewise.
4600
dd373349
AT
46012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4602
4603 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4604 (struct linux_target_ops) <breakpoint>: Remove.
4605 (struct linux_target_ops) <breakpoint_len>: Remove.
4606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4608 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4609 (arm_sw_breakpoint_from_kind): New function.
4610 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4611 (struct linux_target_ops) <breakpoint>: Remove.
4612 (struct linux_target_ops) <breakpoint_len>: Remove.
4613 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4614 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4615 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4616 (struct linux_target_ops) <breakpoint>: Remove.
4617 (struct linux_target_ops) <breakpoint_len>: Remove.
4618 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4619 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4620 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4621 (struct linux_target_ops) <breakpoint>: Remove.
4622 (struct linux_target_ops) <breakpoint_len>: Remove.
4623 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4624 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4625 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4626 and sw_breakpoint_from_kind to increment the pc.
4627 (linux_breakpoint_kind_from_pc): New function.
4628 (linux_sw_breakpoint_from_kind): New function.
4629 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4630 (initialize_low): Call breakpoint_kind_from_pc and
4631 sw_breakpoint_from_kind to replace breakpoint_data/len.
4632 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4633 New field.
4634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4635 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4636 (struct linux_target_ops) <breakpoint>: Remove.
4637 (struct linux_target_ops) <breakpoint_len>: Remove.
4638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4640 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4641 (struct linux_target_ops) <breakpoint>: Remove.
4642 (struct linux_target_ops) <breakpoint_len>: Remove.
4643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4645 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4646 (struct linux_target_ops) <breakpoint>: Remove.
4647 (struct linux_target_ops) <breakpoint_len>: Remove.
4648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4650 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4651 (struct linux_target_ops) <breakpoint>: Remove.
4652 (struct linux_target_ops) <breakpoint_len>: Remove.
4653 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4654 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4655 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4656 (struct linux_target_ops) <breakpoint>: Remove.
4657 (struct linux_target_ops) <breakpoint_len>: Remove.
4658 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4660 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4661 (struct linux_target_ops) <breakpoint>: Remove.
4662 (struct linux_target_ops) <breakpoint_len>: Remove.
4663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4665 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4666 (struct linux_target_ops) <breakpoint>: Remove.
4667 (struct linux_target_ops) <breakpoint_len>: Remove.
4668 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4669 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4670 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4671 (struct linux_target_ops) <breakpoint>: Remove.
4672 (struct linux_target_ops) <breakpoint_len>: Remove.
4673 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4674 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4675 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4676 (struct linux_target_ops) <breakpoint>: Remove.
4677 (struct linux_target_ops) <breakpoint_len>: Remove.
4678 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4679 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4680 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4681 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
4cd98a19
AT
46922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4693
4694 * linux-cris-low.c (cris_get_pc): Remove void arg.
4695
774ee6d2
AR
46962015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4697
4698 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4699 variable name.
4700
833dcd29
AR
47012015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4702
4703 * inferiors.c (thread_pid_matches_callback): New function.
4704 (find_thread_process): New function.
4705 (remove_thread): Reset current_thread.
4706 (remove_process): Assert threads have been removed first.
4707
8d689ee5
YQ
47082015-10-15 Yao Qi <yao.qi@linaro.org>
4709
4710 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4711 if it is 3.
4712 (aarch64_remove_point): Likewise.
4713 * regcache.c (regcache_register_size): New function.
4714
1c2e1515
YQ
47152015-10-12 Yao Qi <yao.qi@linaro.org>
4716
4717 * linux-aarch64-low.c: Update all callers as emit_load_store
4718 is renamed to aarch64_emit_load_store.
4719
e1c587c3
YQ
47202015-10-12 Yao Qi <yao.qi@linaro.org>
4721
4722 * linux-aarch64-low.c: Update all callers of function renaming
4723 from emit_insn to aarch64_emit_insn.
4724
b6542f81
YQ
47252015-10-12 Yao Qi <yao.qi@linaro.org>
4726
4727 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4728 arch/aarch64-insn.h.
4729 (struct aarch64_memory_operand): Likewise.
4730 (ENCODE): Likewise.
4731 (emit_insn): Move to arch/aarch64-insn.c.
4732 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4733 (emit_load_store): Move to arch/aarch64-insn.c.
4734 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4735 (can_encode_int32): Remove.
4736
246994ce
YQ
47372015-10-12 Yao Qi <yao.qi@linaro.org>
4738
4739 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4740 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4741 (aarch64_relocate_instruction): Likewise.
4742 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4743 (struct aarch64_insn_visitor): Likewise.
4744
0badd99f
YQ
47452015-10-12 Yao Qi <yao.qi@linaro.org>
4746
4747 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4748 (struct aarch64_insn_visitor): New.
4749 (struct aarch64_insn_relocation_data): New.
4750 (aarch64_ftrace_insn_reloc_b): New function.
4751 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4752 (aarch64_ftrace_insn_reloc_cb): Likewise.
4753 (aarch64_ftrace_insn_reloc_tb): Likewise.
4754 (aarch64_ftrace_insn_reloc_adr): Likewise.
4755 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4756 (aarch64_ftrace_insn_reloc_others): Likewise.
4757 (visitor): New.
4758 (aarch64_relocate_instruction): Use visitor.
4759
dfaffe9d
YQ
47602015-10-12 Yao Qi <yao.qi@linaro.org>
4761
4762 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4763 int. Add argument buf.
4764 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4765 aarch64_relocate_instruction.
4766
70b439f0
YQ
47672015-10-12 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4770 argument insn. Remove local variable insn. Don't call
4771 target_read_uint32.
4772 (aarch64_install_fast_tracepoint_jump_pad): Call
4773 target_read_uint32.
4774
7781c06f
YQ
47752015-09-30 Yao Qi <yao.qi@linaro.org>
4776
4777 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4778 (emit_load_store_pair): Likewise.
4779
9a3c8263
SM
47802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4781
4782 * dll.c (match_dll): Add cast(s).
4783 (unloaded_dll): Likewise.
4784 * linux-low.c (second_thread_of_pid_p): Likewise.
4785 (delete_lwp_callback): Likewise.
4786 (count_events_callback): Likewise.
4787 (select_event_lwp_callback): Likewise.
4788 (linux_set_resume_request): Likewise.
4789 * server.c (accumulate_file_name_length): Likewise.
4790 (emit_dll_description): Likewise.
4791 (handle_qxfer_threads_worker): Likewise.
4792 (visit_actioned_threads): Likewise.
4793 * thread-db.c (any_thread_of): Likewise.
4794 * tracepoint.c (same_process_p): Likewise.
4795 (match_blocktype): Likewise.
4796 (build_traceframe_info_xml): Likewise.
4797
224c3ddb
SM
47982015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4799
4800 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4801 assignment.
4802 (gdb_unparse_agent_expr): Likewise.
4803 * hostio.c (require_data): Likewise.
4804 (handle_pread): Likewise.
4805 * linux-low.c (disable_regset): Likewise.
4806 (fetch_register): Likewise.
4807 (store_register): Likewise.
4808 (get_dynamic): Likewise.
4809 (linux_qxfer_libraries_svr4): Likewise.
4810 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4811 (set_fast_tracepoint_jump): Likewise.
4812 (uninsert_fast_tracepoint_jumps_at): Likewise.
4813 (reinsert_fast_tracepoint_jumps_at): Likewise.
4814 (validate_inserted_breakpoint): Likewise.
4815 (clone_agent_expr): Likewise.
4816 * regcache.c (init_register_cache): Likewise.
4817 * remote-utils.c (putpkt_binary_1): Likewise.
4818 (decode_M_packet): Likewise.
4819 (decode_X_packet): Likewise.
4820 (look_up_one_symbol): Likewise.
4821 (relocate_instruction): Likewise.
4822 (monitor_output): Likewise.
4823 * server.c (handle_search_memory): Likewise.
4824 (handle_qxfer_exec_file): Likewise.
4825 (handle_qxfer_libraries): Likewise.
4826 (handle_qxfer): Likewise.
4827 (handle_query): Likewise.
4828 (handle_v_cont): Likewise.
4829 (handle_v_run): Likewise.
4830 (captured_main): Likewise.
4831 * target.c (write_inferior_memory): Likewise.
4832 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4833 * tracepoint.c (init_trace_buffer): Likewise.
4834 (add_tracepoint_action): Likewise.
4835 (add_traceframe): Likewise.
4836 (add_traceframe_block): Likewise.
4837 (cmd_qtdpsrc): Likewise.
4838 (cmd_qtdv): Likewise.
4839 (cmd_qtstatus): Likewise.
4840 (response_source): Likewise.
4841 (response_tsv): Likewise.
4842 (cmd_qtnotes): Likewise.
4843 (gdb_collect): Likewise.
4844 (initialize_tracepoint): Likewise.
4845
afbe19f8
PL
48462015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4847
4848 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4849 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4850 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4851 <NOP>: New.
4852 (enum aarch64_condition_codes): New enum.
4853 (w0): New static global.
4854 (fp): Likewise.
4855 (lr): Likewise.
4856 (struct aarch64_memory_operand) <type>: New
4857 MEMORY_OPERAND_POSTINDEX type.
4858 (postindex_memory_operand): New helper function.
4859 (emit_ret): New function.
4860 (emit_load_store_pair): New function, factored out of emit_stp
4861 with support for MEMORY_OPERAND_POSTINDEX.
4862 (emit_stp): Rewrite using emit_load_store_pair.
4863 (emit_ldp): New function.
4864 (emit_load_store): Likewise.
4865 (emit_ldr): Mention post-index instruction in comment.
4866 (emit_ldrh): New function.
4867 (emit_ldrb): New function.
4868 (emit_ldrsw): Mention post-index instruction in comment.
4869 (emit_str): Likewise.
4870 (emit_subs): New function.
4871 (emit_cmp): Likewise.
4872 (emit_and): Likewise.
4873 (emit_orr): Likewise.
4874 (emit_orn): Likewise.
4875 (emit_eor): Likewise.
4876 (emit_mvn): Likewise.
4877 (emit_lslv): Likewise.
4878 (emit_lsrv): Likewise.
4879 (emit_asrv): Likewise.
4880 (emit_mul): Likewise.
4881 (emit_sbfm): Likewise.
4882 (emit_sbfx): Likewise.
4883 (emit_ubfm): Likewise.
4884 (emit_ubfx): Likewise.
4885 (emit_csinc): Likewise.
4886 (emit_cset): Likewise.
4887 (emit_nop): Likewise.
4888 (emit_ops_insns): New helper function.
4889 (emit_pop): Likewise.
4890 (emit_push): Likewise.
4891 (aarch64_emit_prologue): New function.
4892 (aarch64_emit_epilogue): Likewise.
4893 (aarch64_emit_add): Likewise.
4894 (aarch64_emit_sub): Likewise.
4895 (aarch64_emit_mul): Likewise.
4896 (aarch64_emit_lsh): Likewise.
4897 (aarch64_emit_rsh_signed): Likewise.
4898 (aarch64_emit_rsh_unsigned): Likewise.
4899 (aarch64_emit_ext): Likewise.
4900 (aarch64_emit_log_not): Likewise.
4901 (aarch64_emit_bit_and): Likewise.
4902 (aarch64_emit_bit_or): Likewise.
4903 (aarch64_emit_bit_xor): Likewise.
4904 (aarch64_emit_bit_not): Likewise.
4905 (aarch64_emit_equal): Likewise.
4906 (aarch64_emit_less_signed): Likewise.
4907 (aarch64_emit_less_unsigned): Likewise.
4908 (aarch64_emit_ref): Likewise.
4909 (aarch64_emit_if_goto): Likewise.
4910 (aarch64_emit_goto): Likewise.
4911 (aarch64_write_goto_address): Likewise.
4912 (aarch64_emit_const): Likewise.
4913 (aarch64_emit_call): Likewise.
4914 (aarch64_emit_reg): Likewise.
4915 (aarch64_emit_pop): Likewise.
4916 (aarch64_emit_stack_flush): Likewise.
4917 (aarch64_emit_zero_ext): Likewise.
4918 (aarch64_emit_swap): Likewise.
4919 (aarch64_emit_stack_adjust): Likewise.
4920 (aarch64_emit_int_call_1): Likewise.
4921 (aarch64_emit_void_call_2): Likewise.
4922 (aarch64_emit_eq_goto): Likewise.
4923 (aarch64_emit_ne_goto): Likewise.
4924 (aarch64_emit_lt_goto): Likewise.
4925 (aarch64_emit_le_goto): Likewise.
4926 (aarch64_emit_gt_goto): Likewise.
4927 (aarch64_emit_ge_got): Likewise.
4928 (aarch64_emit_ops_impl): New static global variable.
4929 (aarch64_emit_ops): New target function, return
4930 &aarch64_emit_ops_impl.
4931 (struct linux_target_ops): Install it.
4932
bb903df0
PL
49332015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4934
4935 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4936 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4937 aarch64-ipa.o.
4938 * linux-aarch64-ipa.c: New file.
4939 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4940 and endian.h.
4941 (aarch64_get_thread_area): New target method.
4942 (extract_signed_bitfield): New helper function.
4943 (aarch64_decode_ldr_literal): New function.
4944 (enum aarch64_opcodes): New enum.
4945 (struct aarch64_register): New struct.
4946 (struct aarch64_operand): New struct.
4947 (x0): New static global.
4948 (x1): Likewise.
4949 (x2): Likewise.
4950 (x3): Likewise.
4951 (x4): Likewise.
4952 (w2): Likewise.
4953 (ip0): Likewise.
4954 (sp): Likewise.
4955 (xzr): Likewise.
4956 (aarch64_register): New helper function.
4957 (register_operand): Likewise.
4958 (immediate_operand): Likewise.
4959 (struct aarch64_memory_operand): New struct.
4960 (offset_memory_operand): New helper function.
4961 (preindex_memory_operand): Likewise.
4962 (enum aarch64_system_control_registers): New enum.
4963 (ENCODE): New macro.
4964 (emit_insn): New helper function.
4965 (emit_b): New function.
4966 (emit_bcond): Likewise.
4967 (emit_cb): Likewise.
4968 (emit_tb): Likewise.
4969 (emit_blr): Likewise.
4970 (emit_stp): Likewise.
4971 (emit_ldp_q_offset): Likewise.
4972 (emit_stp_q_offset): Likewise.
4973 (emit_load_store): Likewise.
4974 (emit_ldr): Likewise.
4975 (emit_ldrsw): Likewise.
4976 (emit_str): Likewise.
4977 (emit_ldaxr): Likewise.
4978 (emit_stxr): Likewise.
4979 (emit_stlr): Likewise.
4980 (emit_data_processing_reg): Likewise.
4981 (emit_data_processing): Likewise.
4982 (emit_add): Likewise.
4983 (emit_sub): Likewise.
4984 (emit_mov): Likewise.
4985 (emit_movk): Likewise.
4986 (emit_mov_addr): Likewise.
4987 (emit_mrs): Likewise.
4988 (emit_msr): Likewise.
4989 (emit_sevl): Likewise.
4990 (emit_wfe): Likewise.
4991 (append_insns): Likewise.
4992 (can_encode_int32_in): New helper function.
4993 (aarch64_relocate_instruction): New function.
4994 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4995 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4996 (struct linux_target_ops): Install aarch64_get_thread_area,
4997 aarch64_install_fast_tracepoint_jump_pad and
4998 aarch64_get_min_fast_tracepoint_insn_len.
4999
787749ea
PL
50002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5001
5002 * Makefile.in (aarch64-insn.o): New rule.
5003 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5004
9812b2e6
YQ
50052015-09-21 Yao Qi <yao.qi@linaro.org>
5006
5007 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5008
18fe412b
YQ
50092015-09-21 Yao Qi <yao.qi@linaro.org>
5010
5011 * tracepoint.c (max_jump_pad_size): Remove.
5012
a0cc84cd
YQ
50132015-09-18 Yao Qi <yao.qi@linaro.org>
5014
5015 * linux-aarch64-low.c: Don't include sys/uio.h.
5016 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5017
d78908cf
WW
50182015-09-16 Wei-cheng Wang <cole945@gmail.com>
5019
5020 * tracepoint.c (eval_result_type): Change prototype.
5021 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5022
d57e0d50
PA
50232015-09-15 Pedro Alves <palves@redhat.com>
5024
5025 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5026 Check whether to report exec events instead of checking whether
5027 multiprocess is enabled.
5028
5a676acc
PA
50292015-09-15 Pedro Alves <palves@redhat.com>
5030
5031 PR remote/18965
5032 * remote-utils.c (prepare_resume_reply): Merge
5033 TARGET_WAITKIND_VFORK_DONE switch case with the
5034 TARGET_WAITKIND_FORKED case.
5035
7c5d0fad
YQ
50362015-09-15 Yao Qi <yao.qi@linaro.org>
5037
5038 * server.c (handle_query): Check string comparison using
5039 "else if" instead of "if".
5040
750ce8d1
YQ
50412015-09-15 Yao Qi <yao.qi@linaro.org>
5042
5043 * server.c (vCont_supported): New global variable.
5044 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5045 matches. Append ";vContSupported+" to own_buf.
5046 (handle_v_requests): Append ";s;S" to own_buf if target supports
5047 hardware single step or vCont_supported is false.
5048 (capture_main): Set vCont_supported to zero.
5049
70b90b91
YQ
50502015-09-15 Yao Qi <yao.qi@linaro.org>
5051
5052 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5053 it to ...
5054 (linux_supports_hardware_single_step): ... New function.
5055 (linux_target_ops): Update.
5056 * lynx-low.c (lynx_target_ops): Set field
5057 supports_hardware_single_step to target_can_do_hardware_single_step.
5058 * nto-low.c (nto_target_ops): Likewise.
5059 * spu-low.c (spu_target_ops): Likewise.
5060 * win32-low.c (win32_target_ops): Likewise.
5061 * target.c (target_can_do_hardware_single_step): New function.
5062 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5063 Remove. <supports_hardware_single_step>: New field.
5064 (target_supports_conditional_breakpoints): Remove.
5065 (target_supports_hardware_single_step): New macro.
5066 (target_can_do_hardware_single_step): Declare.
5067 * server.c (handle_query): Use target_supports_hardware_single_step
5068 instead of target_supports_conditional_breakpoints.
5069
ade90bde
YQ
50702015-09-15 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5073 function.
5074 (struct linux_target_ops the_low_target): Install
5075 aarch64_linux_siginfo_fixup.
5076
94585166
DB
50772015-09-11 Don Breazeal <donb@codesourcery.com>
5078 Luis Machado <lgustavo@codesourcery.com>
5079
5080 * linux-low.c (linux_mourn): Static declaration.
5081 (linux_arch_setup): Move in front of
5082 handle_extended_wait.
5083 (linux_arch_setup_thread): New function.
5084 (handle_extended_wait): Handle exec events. Call
5085 linux_arch_setup_thread. Make event_lwp argument a
5086 pointer-to-a-pointer.
5087 (check_zombie_leaders): Do not check stopped threads.
5088 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5089 (linux_low_filter_event): Add lwp and thread for exec'ing
5090 non-leader thread if leader thread has been deleted.
5091 Refactor code into linux_arch_setup_thread and call it.
5092 Pass child lwp pointer by reference to handle_extended_wait.
5093 (linux_wait_for_event_filtered): Update comment.
5094 (linux_wait_1): Prevent clobbering exec event status.
5095 (linux_supports_exec_events): New function.
5096 (linux_target_ops) <supports_exec_events>: Initialize new member.
5097 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5098 new member.
5099 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5100 * server.c (report_exec_events): New global variable.
5101 (handle_query): Handle qSupported query for exec-events feature.
5102 (captured_main): Initialize report_exec_events.
5103 * server.h (report_exec_events): Declare new global variable.
5104 * target.h (struct target_ops) <supports_exec_events>: New
5105 member.
5106 (target_supports_exec_events): New macro.
5107 * win32-low.c (win32_target_ops) <supports_exec_events>:
5108 Initialize new member.
5109
0568462b
MM
51102015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5111
5112 * linux-low.c (linux_low_enable_btrace): Remove.
5113 (linux_target_ops): Replace linux_low_enable_btrace with
5114 linux_enable_btrace.
5115
39edd165
YQ
51162015-09-03 Yao Qi <yao.qi@linaro.org>
5117
5118 * linux-aarch64-low.c (aarch64_insert_point): Call
5119 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5120 returns true.
5121
1db33b5a
UW
51222015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5123
5124 * linux-low.c (check_stopped_by_breakpoint): Use
5125 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5126
ab290430
PA
51272015-08-27 Pedro Alves <palves@redhat.com>
5128
5129 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5130
8d749320
SM
51312015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5132
6711b7f8
SM
5133 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5134 the XNEW-family equivalent.
8d749320
SM
5135 (compile_bytecodes): Likewise.
5136 * dll.c (loaded_dll): Likewise.
5137 * event-loop.c (append_callback_event): Likewise.
5138 (create_file_handler): Likewise.
5139 (create_file_event): Likewise.
5140 * hostio.c (handle_open): Likewise.
5141 * inferiors.c (add_thread): Likewise.
5142 (add_process): Likewise.
5143 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5144 * linux-arm-low.c (arm_new_process): Likewise.
5145 (arm_new_thread): Likewise.
5146 * linux-low.c (add_to_pid_list): Likewise.
5147 (linux_add_process): Likewise.
5148 (handle_extended_wait): Likewise.
5149 (add_lwp): Likewise.
5150 (enqueue_one_deferred_signal): Likewise.
5151 (enqueue_pending_signal): Likewise.
5152 (linux_resume_one_lwp_throw): Likewise.
5153 (linux_resume_one_thread): Likewise.
5154 (linux_read_memory): Likewise.
5155 (linux_write_memory): Likewise.
5156 * linux-mips-low.c (mips_linux_new_process): Likewise.
5157 (mips_linux_new_thread): Likewise.
5158 (mips_add_watchpoint): Likewise.
5159 * linux-x86-low.c (initialize_low_arch): Likewise.
5160 * lynx-low.c (lynx_add_process): Likewise.
5161 * mem-break.c (set_raw_breakpoint_at): Likewise.
5162 (set_breakpoint): Likewise.
5163 (add_condition_to_breakpoint): Likewise.
5164 (add_commands_to_breakpoint): Likewise.
5165 (clone_agent_expr): Likewise.
5166 (clone_one_breakpoint): Likewise.
5167 * regcache.c (new_register_cache): Likewise.
5168 * remote-utils.c (look_up_one_symbol): Likewise.
5169 * server.c (queue_stop_reply): Likewise.
5170 (start_inferior): Likewise.
5171 (queue_stop_reply_callback): Likewise.
5172 (handle_target_event): Likewise.
5173 * spu-low.c (fetch_ppc_memory): Likewise.
5174 (store_ppc_memory): Likewise.
5175 * target.c (set_target_ops): Likewise.
5176 * thread-db.c (thread_db_load_search): Likewise.
5177 (try_thread_db_load_1): Likewise.
5178 * tracepoint.c (add_tracepoint): Likewise.
5179 (add_tracepoint_action): Likewise.
5180 (create_trace_state_variable): Likewise.
5181 (cmd_qtdpsrc): Likewise.
5182 (cmd_qtro): Likewise.
5183 (add_while_stepping_state): Likewise.
5184 * win32-low.c (child_add_thread): Likewise.
5185 (get_image_name): Likewise.
5186
ed8b7b42
YQ
51872015-08-25 Yao Qi <yao.qi@linaro.org>
5188
5189 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5190
db3cb7cb
YQ
51912015-08-25 Yao Qi <yao.qi@linaro.org>
5192
5193 * Makefile.in (aarch64-linux.o): New rule.
5194 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5195 srv_tgtobj.
5196 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5197 (aarch64_init_debug_reg_state): Make it extern.
5198 (aarch64_linux_prepare_to_resume): Remove.
5199
f6011a1c
YQ
52002015-08-25 Yao Qi <yao.qi@linaro.org>
5201
5202 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5203 lwp_arch_private_info and ptid_of_lwp.
5204
88e2cf7e
YQ
52052015-08-25 Yao Qi <yao.qi@linaro.org>
5206
5207 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5208 Find proc_info by find_process_pid. All callers updated.
5209
5e35436e
YQ
52102015-08-25 Yao Qi <yao.qi@linaro.org>
5211
5212 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5213 Remove.
5214 (debug_reg_change_callback): Remove.
5215 (aarch64_notify_debug_reg_change): Remove.
5216
4a8a7965
YQ
52172015-08-25 Yao Qi <yao.qi@linaro.org>
5218
5219 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5220 Call current_lwp_ptid.
5221
32a271ee
YQ
52222015-08-25 Yao Qi <yao.qi@linaro.org>
5223
5224 * linux-aarch64-low.c (debug_reg_change_callback): Use
5225 debug_printf.
5226
0d51c8d7
YQ
52272015-08-25 Yao Qi <yao.qi@linaro.org>
5228
5229 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5230
31a43dd5
YQ
52312015-08-25 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5234
8ee52567
YQ
52352015-08-25 Yao Qi <yao.qi@linaro.org>
5236
5237 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5238 the code.
5239
ff3f0f45
YQ
52402015-08-25 Yao Qi <yao.qi@linaro.org>
5241
5242 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5243 Remove.
5244 (debug_reg_change_callback): Remove argument entry and add argument
5245 lwp. Remove local variable thread. Don't print thread id in the
5246 debugging output. Don't check whether pid of thread equals to pid.
5247 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5248 iterate_over_lwps instead find_inferior.
5249
3d40fbb5
PA
52502015-08-24 Pedro Alves <palves@redhat.com>
5251
5252 * inferiors.c (get_first_process): New function.
5253 * inferiors.h (get_first_process): New declaration.
5254 * remote-utils.c (read_ptid): Default to the first process in the
5255 list, instead of to the current thread's process.
5256
438e1e42
PA
52572015-08-24 Pedro Alves <palves@redhat.com>
5258
5259 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5260 * event-loop.c: Likewise.
5261 * remote-utils.c: Likewise.
5262 * tracepoint.c: Likewise.
5263
a8c6d4fc
PA
52642015-08-24 Pedro Alves <palves@redhat.com>
5265
5266 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5267 ptid_get_lwp.
5268
99b0bb12
PA
52692015-08-21 Pedro Alves <palves@redhat.com>
5270
5271 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5272 instead of literal 1.
5273
f8904751
PA
52742015-08-21 Pedro Alves <palves@redhat.com>
5275
5276 * tdesc.c (default_description): Explicitly zero-initialize.
5277
465a859e
PA
52782015-08-21 Pedro Alves <palves@redhat.com>
5279
5280 PR gdb/18749
5281 * inferiors.c (remove_thread): Discard any pending stop reply for
5282 this thread.
5283 * server.c (remove_all_on_match_pid): Rename to ...
5284 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5285 instead of a pid.
5286 (discard_queued_stop_replies): Change parameter to a ptid. Now
5287 extern.
5288 (handle_v_kill, kill_inferior_callback, captured_main)
5289 (process_serial_event): Adjust.
5290 * server.h (discard_queued_stop_replies): Declare.
5291
f0db101d
PA
52922015-08-21 Pedro Alves <palves@redhat.com>
5293
5294 * linux-low.c (wait_for_sigstop): Always switch to no thread
5295 selected if the previously current thread dies.
5296 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5297 process instead of the current thread's.
5298 * remote-utils.c (input_interrupt): Don't check if there's no
5299 current thread.
5300 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5301 current thread to the general thread fails, error out.
5302 (handle_qxfer_auxv, handle_qxfer_libraries)
5303 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5304 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5305 (handle_query): Check if there's a thread selected instead of
5306 checking whether there's any thread in the thread list.
5307 (handle_qxfer_threads, handle_qxfer_btrace)
5308 (handle_qxfer_btrace_conf): Don't error out early if there's no
5309 thread in the thread list.
5310 (handle_v_cont, myresume): Don't set the current thread to the
5311 continue thread.
5312 (process_serial_event) <Hg handling>: Also set thread_id if the
5313 previous general thread is still alive.
5314 (process_serial_event) <g/G handling>: If setting the current
5315 thread to the general thread fails, error out.
5316 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5317 thread's lwp instead of the current thread's.
5318 * target.c (set_desired_thread): If the desired thread was not
5319 found, leave the current thread pointing to NULL. Return an int
5320 (boolean) indicating success.
5321 * target.h (set_desired_thread): Change return type to int.
5322
40045d91
MF
53232015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5324
5325 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5326 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5327 #includes.
5328 (ps_get_thread_area): New function.
5329
45face3b
GB
53302015-08-19 Gary Benson <gbenson@redhat.com>
5331
5332 * hostio.c (handle_pread): Do not attempt to read more data
5333 than hostio_reply_with_data can fit in a packet.
5334
16d5f642
JB
53352015-08-18 Joel Brobecker <brobecker@adacore.com>
5336
5337 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5338
a738da3a
MF
53392015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5340
5341 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5342
33ebda9d
PA
53432015-08-06 Pedro Alves <palves@redhat.com>
5344
5345 * tracepoint.c (expr_eval_result): Now an int.
5346
a44892be
PA
53472015-08-06 Pedro Alves <palves@redhat.com>
5348
5349 * gdbthread.h (struct regcache): Forward declare.
5350 (struct thread_info) <regcache_data>: Now a struct regcache
5351 pointer.
5352 * inferiors.c (inferior_regcache_data)
5353 (set_inferior_regcache_data): Now work with struct regcache
5354 pointers.
5355 * inferiors.h (struct regcache): Forward declare.
5356 (inferior_regcache_data, set_inferior_regcache_data): Now work
5357 with struct regcache pointers.
5358 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5359 (free_register_cache_thread): Remove struct regcache pointer
5360 casts.
5361
608a1e46
PA
53622015-08-06 Pedro Alves <palves@redhat.com>
5363
5364 * server.c (captured_main): On error, print the exception message
5365 to stderr, and if run_once is set, throw a quit.
5366
f0ce0d3a
PA
53672015-08-06 Pedro Alves <palves@redhat.com>
5368
5369 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5370 the current thread.
5371
bf47e248
PA
53722015-08-06 Pedro Alves <palves@redhat.com>
5373
5374 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5375 reading beyond the passed in buffer length.
5376
b6b9ffcc
PL
53772015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5378
5379 * tracepoint.c (symbol_list) <required>: Remove.
5380
863d01bd
PA
53812015-08-06 Pedro Alves <palves@redhat.com>
5382
5383 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5384 count if stopping and suspending threads.
5385 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5386 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5387 (linux_detach): Complete an ongoing step-over.
5388 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5389 throughout.
5390 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5391 (linux_wait_1): If passing a signal to the inferior after
5392 finishing a step-over, unsuspend and re-resume all lwps. If we
5393 see a single-step event but the thread should be continuing, don't
5394 pass the trap to gdb.
5395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5396 internal_error instead of gdb_assert.
5397 (enqueue_pending_signal): New function.
5398 (check_ptrace_stopped_lwp_gone): Add debug output.
5399 (start_step_over): Use internal_error instead of gdb_assert.
5400 (complete_ongoing_step_over): New function.
5401 (linux_resume_one_thread): Don't resume a suspended thread.
5402 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5403 it stepping.
5404
00db26fa
PA
54052015-08-06 Pedro Alves <palves@redhat.com>
5406
5407 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5408 (linux_thread_alive): Use lwp_is_marked_dead.
5409 (extended_event_reported): Delete.
5410 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5411 instead of extended_event_reported.
5412 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5413 as well.
5414 (lwp_is_marked_dead): New function.
5415 (lwp_running): Use lwp_is_marked_dead.
5416 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5417 comment.
5418
ad071a30
PA
54192015-08-06 Pedro Alves <palves@redhat.com>
5420
5421 * linux-low.c (linux_wait_1): Move fork event output out of the
5422 !report_to_gdb check. Pass event_child->waitstatus to
5423 target_waitstatus_to_string instead of ourstatus.
5424
524b57e6
YQ
54252015-08-04 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5428 if current_thread is 32 bit.
5429
6085d6f6
YQ
54302015-08-04 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5433 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5434 * server.c (extended_protocol): Remove "static".
5435 * server.h (extended_protocol): Declare it.
5436
8a7e4587
YQ
54372015-08-04 Yao Qi <yao.qi@linaro.org>
5438
5439 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5440 both aarch64 and aarch32.
5441 (aarch64_set_pc): Likewise.
5442
3b53ae99
YQ
54432015-08-04 Yao Qi <yao.qi@linaro.org>
5444
5445 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5446 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5447 arm-with-neon.xml to srv_xmlfiles.
5448 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5449 (is_64bit_tdesc): New function.
5450 (aarch64_linux_read_description): New function.
5451 (aarch64_arch_setup): Call aarch64_linux_read_description.
5452 (regs_info): Rename to regs_info_aarch64.
5453 (aarch64_regs_info): Return right regs_info.
5454 (initialize_low_arch): Call initialize_low_arch_aarch32.
5455
bd9e6534
YQ
54562015-08-04 Yao Qi <yao.qi@linaro.org>
5457
5458 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5459 * linux-aarch32-low.c: New file.
5460 * linux-aarch32-low.h: New file.
5461 * linux-arm-low.c (arm_fill_gregset): Move it to
5462 linux-aarch32-low.c.
5463 (arm_store_gregset): Likewise.
5464 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5465 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5466 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5467 (regs_info): Rename to regs_info_arm.
5468 (arm_regs_info): Return regs_info_aarch32 if
5469 have_ptrace_getregset is 1 and target description is
5470 arm_with_neon or arm_with_vfpv3.
5471 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5472 Call initialize_low_arch_aarch32 instead.
5473
ded48a5e
YQ
54742015-08-04 Yao Qi <yao.qi@linaro.org>
5475
5476 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5477 * linux-low.c: ... here.
5478 * linux-low.h (have_ptrace_getregset): Declare it.
5479
96e9210f
PA
54802015-08-04 Pedro Alves <palves@redhat.com>
5481
5482 * thread-db.c (struct thread_db): Use new typedefs.
5483 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5484 CHK calls.
5485 (disable_thread_event_reporting): Cast result of dlsym to
5486 destination function pointer type.
5487 (thread_db_mourn): Use td_ta_delete_ftype.
5488
af60a1ef
SL
54892015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5490
5491 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5492 arch variant.
5493 (CDX_BREAKPOINT): Define for R2.
5494 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5495 (the_low_target): Add comments.
5496
e8b41681
YQ
54972015-07-30 Yao Qi <yao.qi@linaro.org>
5498
5499 * linux-arm-low.c (arm_hwcap): Remove it.
5500 (arm_read_description): New local variable arm_hwcap. Don't
5501 set arm_hwcap to zero.
5502
89abb039
YQ
55032015-07-30 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5506 Use regcache->tdesc instead.
5507 (arm_store_wmmxregset): Likewise.
5508 (arm_fill_vfpregset): Likewise.
5509 (arm_store_vfpregset): Likewise.
5510
deca266c
YQ
55112015-07-30 Yao Qi <yao.qi@linaro.org>
5512
5513 * linux-arm-low.c: Include arch/arm.h.
5514 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5515 (arm_store_gregset): Likewise.
5516
aa58a496
SM
55172015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5518
5519 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5520 ptrace's 4th parameter.
5521
50904b25
YQ
55222015-07-27 Yao Qi <yao.qi@linaro.org>
5523
5524 * configure.srv (case aarch64*-*-linux*): Don't set
5525 srv_linux_usrregs.
5526
5826e159
PA
55272015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5528
5529 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5530 sys/ptrace.h.
5531 * linux-arm-low.c: Likewise.
5532 * linux-cris-low.c: Likewise.
5533 * linux-crisv32-low.c: Likewise.
5534 * linux-low.c: Likewise.
5535 * linux-m68k-low.c: Likewise.
5536 * linux-mips-low.c: Likewise.
5537 * linux-nios2-low.c: Likewise.
5538 * linux-s390-low.c: Likewise.
5539 * linux-sparc-low.c: Likewise.
5540 * linux-tic6x-low.c: Likewise.
5541 * linux-tile-low.c: Likewise.
5542 * linux-x86-low.c: Likewise.
5543
54019719
PA
55442015-07-24 Pedro Alves <palves@redhat.com>
5545
5546 * config.in: Regenerate.
5547 * configure: Regenerate.
5548
eb7aa561
PA
55492015-07-24 Pedro Alves <palves@redhat.com>
5550
5551 * acinclude.m4: Include ../ptrace.m4.
5552 * configure.ac: Call GDB_AC_PTRACE.
5553 * config.in, configure: Regenerate.
5554
55d7b841
YQ
55552015-07-24 Yao Qi <yao.qi@linaro.org>
5556
5557 * linux-low.c (linux_create_inferior): Remove setting to
5558 proc->priv->new_inferior.
5559 (linux_attach): Likewise.
5560 (linux_low_filter_event): Likewise.
5561 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5562
c06cbd92
YQ
55632015-07-24 Yao Qi <yao.qi@linaro.org>
5564
5565 * linux-low.c (linux_arch_setup): New function.
5566 (linux_low_filter_event): If proc->tdesc is NULL and
5567 proc->attached is true, call the_low_target.arch_setup.
5568 Otherwise, keep status pending, and return.
5569 (linux_resume_one_lwp_throw): Don't call get_pc if
5570 thread->while_stepping isn't NULL. Don't call
5571 get_thread_regcache if proc->tdesc is NULL.
5572 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5573 (linux_target_ops): Install arch_setup.
5574 * server.c (start_inferior): Call the_target->arch_setup.
5575 * target.h (struct target_ops) <arch_setup>: New field.
5576 (target_arch_setup): New marco.
5577 * lynx-low.c (lynx_target_ops): Update.
5578 * nto-low.c (nto_target_ops): Update.
5579 * spu-low.c (spu_target_ops): Update.
5580 * win32-low.c (win32_target_ops): Update.
5581
5ae3ebba
YQ
55822015-07-24 Yao Qi <yao.qi@linaro.org>
5583
5584 * linux-low.c (linux_add_process): Don't set
5585 proc->priv->new_inferior.
5586 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5587 (linux_attach): Likewise.
5588
eb97750b
YQ
55892015-07-24 Yao Qi <yao.qi@linaro.org>
5590
5591 * server.c (start_inferior): Code refactor.
5592
51aee833
YQ
55932015-07-24 Yao Qi <yao.qi@linaro.org>
5594
5595 * server.c (process_serial_event): Set general_thread.
5596
af1b22f3
YQ
55972015-07-21 Yao Qi <yao.qi@linaro.org>
5598
5599 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5600 aarch64_linux_get_debug_reg_capacity.
5601
554717a3
YQ
56022015-07-17 Yao Qi <yao.qi@linaro.org>
5603
5604 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5605 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5606 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5607 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5608 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5609 (AARCH64_HWP_ALIGNMENT): Likewise.
5610 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5611 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5612 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5613 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5614 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5615 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5616 (struct aarch64_debug_reg_state): Likewise.
5617 (struct arch_lwp_info): Likewise.
5618 (aarch64_align_watchpoint): Likewise.
5619 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5620 (aarch64_watchpoint_length): Likewise.
5621 (aarch64_point_encode_ctrl_reg): Likewise
5622 (aarch64_point_is_aligned): Likewise.
5623 (aarch64_align_watchpoint): Likewise.
5624 (aarch64_linux_set_debug_regs):
5625 (aarch64_dr_state_insert_one_point): Likewise.
5626 (aarch64_dr_state_remove_one_point): Likewise.
5627 (aarch64_handle_breakpoint): Likewise.
5628 (aarch64_handle_aligned_watchpoint): Likewise.
5629 (aarch64_handle_unaligned_watchpoint): Likewise.
5630 (aarch64_handle_watchpoint): Likewise.
5631
c67ca4de
YQ
56322015-07-17 Yao Qi <yao.qi@linaro.org>
5633
5634 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5635 and don't aarch64_get_debug_reg_state. All callers update.
5636 (aarch64_handle_aligned_watchpoint): Likewise.
5637 (aarch64_handle_unaligned_watchpoint): Likewise.
5638 (aarch64_handle_watchpoint): Likewise.
5639 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5640 (aarch64_remove_point): Likewise.
5641
25abf979
YQ
56422015-07-17 Yao Qi <yao.qi@linaro.org>
5643
5644 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5645 debug_printf.
5646 (aarch64_handle_unaligned_watchpoint): Likewise.
5647
db1ff28b
JK
56482015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5649
5650 Revert the previous 3 commits:
5651 Move gdb_regex* to common/
5652 Move linux_find_memory_regions_full & co.
5653 gdbserver build-id attribute generator
5654
700ca40f
JK
56552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5656 Jan Kratochvil <jan.kratochvil@redhat.com>
5657
5658 gdbserver build-id attribute generator.
5659 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5660 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5661 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5662 (find_phdr): New.
5663 (get_dynamic): Use find_pdhr to traverse program headers.
5664 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5665 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5666 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5667 (get_hex_build_id): New.
5668 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5669 to reply XML document.
5670
9904185c
JK
56712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5672 Jan Kratochvil <jan.kratochvil@redhat.com>
5673
5674 * target.c: Include target/target-utils.h and fcntl.h.
5675 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5676 (target_fileio_read_stralloc): New functions.
5677
6e5b4429
JK
56782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5679
5680 * Makefile.in (OBS): Add gdb_regex.o.
5681 (gdb_regex.o): New.
5682 * config.in: Rebuilt.
5683 * configure: Rebuilt.
5684
ddc98fbf
JK
56852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5686 Jan Kratochvil <jan.kratochvil@redhat.com>
5687
5688 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5689 * Makefile.in (OBS): Add target-utils.o.
5690 (linux-maps.o, target-utils.o): New.
5691 * configure.srv (srv_linux_obj): Add linux-maps.o.
5692
e57bb7a0
PL
56932015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5694
5695 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5696 function, return 1.
5697 (the_low_target): Install it.
5698
586b02a9
PA
56992015-07-14 Pedro Alves <palves@redhat.com>
5700
5701 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5702 Instead, ignore ECHILD, and throw an error for other errnos.
5703
58c1b36c
PA
57042015-07-10 Pedro Alves <palves@redhat.com>
5705
5706 * event-loop.c (struct callback_event) <data>: Change type to
5707 gdb_client_data instance instead of gdb_client_data pointer.
5708 (append_callback_event): Adjust.
5709
421530db
PL
57102015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5711
5712 * linux-aarch64-low.c: Add comments for each linux_target_ops
5713 method. Remove comments already covered in target_ops and
5714 linux_target_ops definitions.
5715 (the_low_target): Add comments for each unimplemented method.
5716
c2d65f38
YQ
57172015-07-09 Yao Qi <yao.qi@linaro.org>
5718
5719 * linux-aarch64-low.c (aarch64_regmap): Remove.
5720 (aarch64_usrregs_info): Remove.
5721 (regs_info): Set field usrregs to NULL.
5722
b20a6524
MM
57232015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5724
5725 * linux-low.c: Include "rsp-low.h"
5726 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5727 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5728 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5729 (handle_btrace_enable_pt): New.
5730 (handle_btrace_general_set): Support "pt".
5731 (handle_btrace_conf_general_set): Support "pt:size".
5732
96c97461
PL
57332015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5734
5735 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5736 Z_PACKET_SW_BP.
5737
37d66942
PL
57382015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5739
5740 * linux-aarch64-low.c: Remove comment about endianness.
5741 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5742 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5743 memcmp.
5744
dc06243f
GB
57452015-06-24 Gary Benson <gbenson@redhat.com>
5746
5747 * linux-i386-ipa.c (stdint.h): Do not include.
5748 * lynx-i386-low.c (stdint.h): Likewise.
5749 * lynx-ppc-low.c (stdint.h): Likewise.
5750 * mem-break.c (stdint.h): Likewise.
5751 * thread-db.c (stdint.h): Likewise.
5752 * tracepoint.c (stdint.h): Likewise.
5753 * win32-low.c (stdint.h): Likewise.
5754
124e13d9
SM
57552015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5756
5757 * server.c (write_qxfer_response): Update call to
5758 remote_escape_output.
5759
909c2cda
JK
57602015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5761 Jan Kratochvil <jan.kratochvil@redhat.com>
5762
5763 Merge multiple hex conversions.
5764 * gdbreplay.c (tohex): Rename to 'fromhex'.
5765 (logchar): Use fromhex.
5766
24c05f46
JK
57672015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5768
5769 * server.c (handle_qxfer_libraries): Set `version' attribute for
5770 <library-list>.
5771
14d2069a
GB
57722015-06-10 Gary Benson <gbenson@redhat.com>
5773
5774 * target.h (struct target_ops) <multifs_open>: New field.
5775 <multifs_unlink>: Likewise.
5776 <multifs_readlink>: Likewise.
5777 * linux-low.c (nat/linux-namespaces.h): New include.
5778 (linux_target_ops): Initialize the_target->multifs_open,
5779 the_target->multifs_unlink and the_target->multifs_readlink.
5780 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5781 * hostio.c (hostio_fs_pid): New static variable.
5782 (hostio_handle_new_gdb_connection): New function.
5783 (handle_setfs): Likewise.
5784 (handle_open): Use the_target->multifs_open as appropriate.
5785 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5786 (handle_readlink): Use the_target->multifs_readlink as
5787 appropriate.
5788 (handle_vFile): Handle vFile:setfs packets.
5789 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5790 after target_handle_new_gdb_connection.
5791
4b8b5e72
GB
57922015-06-10 Gary Benson <gbenson@redhat.com>
5793
5794 * configure.ac (AC_CHECK_FUNCS): Add setns.
5795 * config.in: Regenerate.
5796 * configure: Likewise.
5797 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5798 (linux-namespaces.o): New rule.
5799 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5800
3ac2e371
GB
58012015-06-09 Gary Benson <gbenson@redhat.com>
5802
5803 * hostio.c (handle_open): Process mode argument with
5804 fileio_to_host_mode.
5805
ca9b78ce
YQ
58062015-06-01 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5809 * linux-x86-low.c: Likewise.
5810
bfacd19d
DB
58112015-05-28 Don Breazeal <donb@codesourcery.com>
5812
5813 * linux-low.c (handle_extended_wait): Initialize
5814 thread_info.last_resume_kind for new fork children.
5815
452003ef
PA
58162015-05-15 Pedro Alves <palves@redhat.com>
5817
5818 * target.h (target_handle_new_gdb_connection): Rewrite using if
5819 wrapped in do/while.
5820
1041a03c
JB
58212015-05-14 Joel Brobecker <brobecker@adacore.com>
5822
5823 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5824 * configure, config.in: Regenerate.
5825 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5826 Declare typedef.
5827
c269dbdb
DB
58282015-05-12 Don Breazeal <donb@codesourcery.com>
5829
5830 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5831 PTRACE_EVENT_VFORK_DONE.
5832 (linux_low_ptrace_options, extended_event_reported): Add vfork
5833 events.
5834 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5835 and "vforkdone" for RSP 'T' Stop Reply Packet.
5836 * server.h (report_vfork_events): Declare
5837 global variable.
5838
3a8a0396
DB
58392015-05-12 Don Breazeal <donb@codesourcery.com>
5840
5841 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5842 (the_low_target) <new_fork>: Initialize new member.
5843 * linux-arm-low.c (arm_new_fork): New function.
5844 (the_low_target) <new_fork>: Initialize new member.
5845 * linux-low.c (handle_extended_wait): Call new target function
5846 new_fork.
5847 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5848 * linux-mips-low.c (mips_add_watchpoint): New function
5849 extracted from mips_insert_point.
5850 (the_low_target) <new_fork>: Initialize new member.
5851 (mips_linux_new_fork): New function.
5852 (mips_insert_point): Call mips_add_watchpoint.
5853 * linux-x86-low.c (x86_linux_new_fork): New function.
5854 (the_low_target) <new_fork>: Initialize new member.
5855
de0d863e
DB
58562015-05-12 Don Breazeal <donb@codesourcery.com>
5857
5858 * linux-low.c (handle_extended_wait): Implement return value,
5859 rename argument 'event_child' to 'event_lwp', handle
5860 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5861 (linux_low_ptrace_options): New function.
5862 (linux_low_filter_event): Call linux_low_ptrace_options,
5863 use different argument fo linux_enable_event_reporting,
5864 use return value from handle_extended_wait.
5865 (extended_event_reported): New function.
5866 (linux_wait_1): Call extended_event_reported and set
5867 status to report fork events.
5868 (linux_write_memory): Add pid to debug message.
5869 (reset_lwp_ptrace_options_callback): New function.
5870 (linux_handle_new_gdb_connection): New function.
5871 (linux_target_ops): Initialize new structure member.
5872 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5873 * lynx-low.c: Initialize new structure member.
5874 * remote-utils.c (prepare_resume_reply): Implement stop reason
5875 "fork" for "T" stop message.
5876 * server.c (handle_query): Call handle_new_gdb_connection.
5877 * server.h (report_fork_events): Declare global flag.
5878 * target.h (struct target_ops) <handle_new_gdb_connection>:
5879 New member.
5880 (target_handle_new_gdb_connection): New macro.
5881 * win32-low.c: Initialize new structure member.
5882
ddcbc397
DB
58832015-05-12 Don Breazeal <donb@codesourcery.com>
5884
5885 * mem-break.c (APPEND_TO_LIST): Define macro.
5886 (clone_agent_expr): New function.
5887 (clone_one_breakpoint): New function.
5888 (clone_all_breakpoints): New function.
5889 * mem-break.h: Declare new functions.
5890
89245bc0
DB
58912015-05-12 Don Breazeal <donb@codesourcery.com>
5892
5893 * linux-low.c (linux_supports_fork_events): New function.
5894 (linux_supports_vfork_events): New function.
5895 (linux_target_ops): Initialize new structure members.
5896 (initialize_low): Call linux_check_ptrace_features.
5897 * lynx-low.c (lynx_target_ops): Initialize new structure
5898 members.
5899 * server.c (report_fork_events, report_vfork_events):
5900 New global flags.
5901 (handle_query): Add new features to qSupported packet and
5902 response.
5903 (captured_main): Initialize new global variables.
5904 * target.h (struct target_ops) <supports_fork_events>:
5905 New member.
5906 <supports_vfork_events>: New member.
5907 (target_supports_fork_events): New macro.
5908 (target_supports_vfork_events): New macro.
5909 * win32-low.c (win32_target_ops): Initialize new structure
5910 members.
5911
835205d0
GB
59122015-05-12 Gary Benson <gbenson@redhat.com>
5913
5914 * server.c (handle_qxfer_exec_file): Use current process
5915 if annex is empty.
5916
21e94bd9
SL
59172015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5918
5919 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5920 Remove HAVE_PTRACE_GETREGS conditionals.
5921 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5922 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5923
45614f15
YQ
59242015-05-08 Yao Qi <yao.qi@linaro.org>
5925
5926 * linux-low.c (linux_supports_conditional_breakpoints): New
5927 function.
5928 (linux_target_ops): Install new target method.
5929 * lynx-low.c (lynx_target_ops): Install NULL hook for
5930 supports_conditional_breakpoints.
5931 * nto-low.c (nto_target_ops): Likewise.
5932 * spu-low.c (spu_target_ops): Likewise.
5933 * win32-low.c (win32_target_ops): Likewise.
5934 * server.c (handle_query): Check
5935 target_supports_conditional_breakpoints.
5936 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5937 New field.
5938 (target_supports_conditional_breakpoints): New macro.
5939
80ad801e
PA
59402015-05-06 Pedro Alves <palves@redhat.com>
5941
5942 PR server/18081
5943 * server.c (start_inferior): If the process exits, mourn it.
5944
819843c7
GB
59452015-04-21 Gary Benson <gbenson@redhat.com>
5946
5947 * hostio.c (fileio_open_flags_to_host): Factored out to
5948 fileio_to_host_openflags in common/fileio.c. Single use
5949 updated.
5950
a2d5a9d7
MF
59512015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5952
5953 * linux-xtensa-low.c (xtensa_fill_gregset)
5954 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5955 XCHAL_HAVE_LOOP.
5956
deb44829
MF
59572015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5958
5959 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5960 (regs_info): Replace usrregs pointer with NULL.
5961
e57f1de3
GB
59622015-04-17 Gary Benson <gbenson@redhat.com>
5963
5964 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5965 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5966 * server.c (handle_qxfer_exec_file): New function.
5967 (qxfer_packets): Add exec-file entry.
5968 (handle_query): Report qXfer:exec-file:read as supported packet.
5969
62828379
RN
59702015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5971
5972 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5973
b88bb450
GB
59742015-04-09 Gary Benson <gbenson@redhat.com>
5975
5976 * hostio-errno.c (errno_to_fileio_error): Remove function.
5977 Update caller to use remote_fileio_to_fio_error.
5978
c8f4bfdd
YQ
59792015-04-09 Yao Qi <yao.qi@linaro.org>
5980
5981 * linux-low.c (linux_insert_point): Call
5982 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5983 (linux_remove_point): Call remove_memory_breakpoint if type is
5984 raw_bkpt_type_sw.
5985 * linux-x86-low.c (x86_insert_point): Don't call
5986 insert_memory_breakpoint.
5987 (x86_remove_point): Don't call remove_memory_breakpoint.
5988
41f98f02
PA
59892015-04-01 Pedro Alves <palves@redhat.com>
5990 Cleber Rosa <crosa@redhat.com>
5991
5992 * server.c (gdbserver_usage): Reorganize and extend the usage
5993 message.
5994
2bf6fb9d
PA
59952015-03-24 Pedro Alves <palves@redhat.com>
5996
5997 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5998 output. Also dump TRAP_TRACE.
5999 (linux_low_filter_event): In debug output, distinguish a
6000 resume_stop SIGSTOP from a delayed SIGSTOP.
6001
369f6daa
GB
60022015-03-24 Gary Benson <gbenson@redhat.com>
6003
6004 * linux-x86-low.c (x86_linux_new_thread): Moved to
6005 nat/x86-linux.c.
6006 (x86_linux_prepare_to_resume): Likewise.
6007
8e5d4070
GB
60082015-03-24 Gary Benson <gbenson@redhat.com>
6009
6010 * Makefile.in (x86-linux-dregs.o): New rule.
6011 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6012 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6013 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6014 (x86_linux_dr_get): Likewise.
6015 (x86_linux_dr_set): Likewise.
6016 (update_debug_registers_callback): Likewise.
6017 (x86_linux_dr_set_addr): Likewise.
6018 (x86_linux_dr_get_addr): Likewise.
6019 (x86_linux_dr_set_control): Likewise.
6020 (x86_linux_dr_get_control): Likewise.
6021 (x86_linux_dr_get_status): Likewise.
6022 (x86_linux_update_debug_registers): Likewise.
6023
2b95d440
GB
60242015-03-24 Gary Benson <gbenson@redhat.com>
6025
6026 * linux-x86-low.c (x86_linux_update_debug_registers):
6027 New function, factored out from...
6028 (x86_linux_prepare_to_resume): ...this.
6029
14b0bc68
GB
60302015-03-24 Gary Benson <gbenson@redhat.com>
6031
6032 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6033 (x86_linux_dr_set): Likewise.
6034 (update_debug_registers_callback): Likewise.
6035 (x86_linux_dr_set_addr): Likewise.
6036 (x86_linux_dr_get_addr): Likewise.
6037 (x86_linux_dr_set_control): Likewise.
6038 (x86_linux_dr_get_control): Likewise.
6039 (x86_linux_dr_get_status): Likewise.
6040 (x86_linux_prepare_to_resume): Likewise.
6041
5dfe6ca8
GB
60422015-03-24 Gary Benson <gbenson@redhat.com>
6043
6044 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6045 Use perror_with_name. Pass string through gettext.
6046 (x86_linux_dr_set): Likewise.
6047
d33472ad
GB
60482015-03-24 Gary Benson <gbenson@redhat.com>
6049
6050 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6051 (x86_linux_dr_set_addr): ...this.
6052 (x86_dr_low_get_addr): Rename to...
6053 (x86_linux_dr_get_addr): ...this.
6054 (x86_dr_low_set_control): Rename to...
6055 (x86_linux_dr_set_control): ...this.
6056 (x86_dr_low_get_control): Rename to...
6057 (x86_linux_dr_get_control): ...this.
6058 (x86_dr_low_get_status): Rename to...
6059 (x86_linux_dr_get_status): ...this.
6060 (x86_dr_low): Update with new function names.
6061
4b134ca1
GB
60622015-03-24 Gary Benson <gbenson@redhat.com>
6063
6064 * Makefile.in (x86-linux.o): New rule.
6065 * configure.srv: Add x86-linux.o to relevant targets.
6066 * linux-low.c (lwp_set_arch_private_info): New function.
6067 (lwp_arch_private_info): Likewise.
6068 * linux-x86-low.c: Include nat/x86-linux.h.
6069 (arch_lwp_info): Removed structure.
6070 (update_debug_registers_callback):
6071 Use lwp_set_debug_registers_changed.
6072 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6073 and lwp_set_debug_registers_changed.
6074 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6075
34c703da
GB
60762015-03-24 Gary Benson <gbenson@redhat.com>
6077
6078 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6079 * linux-arm-low.c (arm_new_thread): Likewise.
6080 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6081 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6082 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6083 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6084
cff068da
GB
60852015-03-24 Gary Benson <gbenson@redhat.com>
6086
6087 * linux-low.c (ptid_of_lwp): New function.
6088 (lwp_is_stopped): Likewise.
6089 (lwp_stop_reason): Likewise.
6090 * linux-x86-low.c (update_debug_registers_callback):
6091 Use lwp_is_stopped.
6092 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6093 lwp_stop_reason.
6094
b2f7c7e8
GB
60952015-03-24 Gary Benson <gbenson@redhat.com>
6096
6097 * linux-low.h (linux_stop_lwp): Remove declaration.
6098
6d4ee8c6
GB
60992015-03-24 Gary Benson <gbenson@redhat.com>
6100
6101 * linux-low.h: Include nat/linux-nat.h.
6102 * linux-low.c (iterate_over_lwps_args): New structure.
6103 (iterate_over_lwps_filter): New function.
6104 (iterate_over_lwps): Likewise.
6105 * linux-x86-low.c (update_debug_registers_callback):
6106 Update signature to what iterate_over_lwps expects.
6107 Remove PID check that iterate_over_lwps now performs.
6108 (x86_dr_low_set_addr): Use iterate_over_lwps.
6109 (x86_dr_low_set_control): Likewise.
6110
70a0bb6b
GB
61112015-03-24 Gary Benson <gbenson@redhat.com>
6112
6113 * linux-x86-low.c (x86_debug_reg_state): New function.
6114 (x86_linux_prepare_to_resume): Use the above.
6115
7b669087
GB
61162015-03-24 Gary Benson <gbenson@redhat.com>
6117
6118 * linux-low.c (current_lwp_ptid): New function.
6119 * linux-x86-low.c: Include nat/linux-nat.h.
6120 (x86_dr_low_get_addr): Use current_lwp_ptid.
6121 (x86_dr_low_get_control): Likewise.
6122 (x86_dr_low_get_status): Likewise.
6123
eef49a3d
PA
61242015-03-20 Pedro Alves <palves@redhat.com>
6125
6126 * tracepoint.c (cmd_qtstatus): Make "str" const.
6127
b2333d22
PA
61282015-03-20 Pedro Alves <palves@redhat.com>
6129
6130 * server.c (handle_general_set): Make "req_str" const.
6131
23f238d3
PA
61322015-03-19 Pedro Alves <palves@redhat.com>
6133
6134 * linux-low.c (linux_resume_one_lwp): Rename to ...
6135 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6136 instead call perror_with_name.
6137 (check_ptrace_stopped_lwp_gone): New function.
6138 (linux_resume_one_lwp): Reimplement as wrapper around
6139 linux_resume_one_lwp_throw that swallows errors if the LWP is
6140 gone.
6141
91baf43f
PA
61422015-03-19 Pedro Alves <palves@redhat.com>
6143
6144 * linux-low.c (count_events_callback, select_event_lwp_callback):
6145 No longer check whether the thread has resume_stop as last resume
6146 kind.
6147
8bf3b159
PA
61482015-03-19 Pedro Alves <palves@redhat.com>
6149
6150 * linux-low.c (count_events_callback, select_event_lwp_callback):
6151 Use the lwp's status_pending_p field, not the thread's.
6152
b90fc188
PA
61532015-03-19 Pedro Alves <palves@redhat.com>
6154
6155 * linux-low.c (select_event_lwp_callback): Update comments to
6156 no longer mention SIGTRAP.
6157
464b0089
GB
61582015-03-18 Gary Benson <gbenson@redhat.com>
6159
6160 * server.c (handle_query): Do not report vFile:fstat as supported.
6161
aa9e327f
GB
61622015-03-11 Gary Benson <gbenson@redhat.com>
6163
6164 * hostio.c (sys/types.h): New include.
6165 (sys/stat.h): Likewise.
6166 (common-remote-fileio.h): Likewise.
6167 (handle_fstat): New function.
6168 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6169
791c0056
GB
61702015-03-11 Gary Benson <gbenson@redhat.com>
6171
6172 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6173 struct stat.st_blocks and struct stat.st_blksize.
6174 * configure: Regenerate.
6175 * config.in: Likewise.
6176 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6177 (OBS): Add common-remote-fileio.o.
6178 (common-remote-fileio.o): New rule.
6179
9a9df970
PA
61802015-03-09 Pedro Alves <palves@redhat.com>
6181
6182 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6183 'struct sockaddr' pointer in 'accept' call.
6184
9eb1356e
PA
61852015-03-09 Pedro Alves <palves@redhat.com>
6186
6187 Revert:
6188 2015-03-07 Pedro Alves <palves@redhat.com>
6189 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6190 or <winsock2.h> here. Instead include "gdb_socket.h".
6191 (remote_open): Use union gdb_sockaddr_u.
6192 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6193 or <winsock2.h> here. Instead include "gdb_socket.h".
6194 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6195 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6196 or <sys/un.h>.
6197 (init_named_socket, gdb_agent_helper_thread): Use union
6198 gdb_sockaddr_u.
6199
aac331e4
PA
62002015-03-07 Pedro Alves <palves@redhat.com>
6201
6202 * configure.ac (build_warnings): Move
6203 -Wdeclaration-after-statement to the C-specific set.
6204 * configure: Regenerate.
6205
366c75fc
PA
62062015-03-07 Pedro Alves <palves@redhat.com>
6207
6208 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6209 or <winsock2.h> here. Instead include "gdb_socket.h".
6210 (remote_open): Use union gdb_sockaddr_u.
6211 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6212 or <winsock2.h> here. Instead include "gdb_socket.h".
6213 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6214 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6215 or <sys/un.h>.
6216 (init_named_socket, gdb_agent_helper_thread): Use union
6217 gdb_sockaddr_u.
6218
492d29ea
PA
62192015-03-07 Pedro Alves <palves@redhat.com>
6220
6221 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6222 instead.
6223
60a191ed
YQ
62242015-03-06 Yao Qi <yao.qi@linaro.org>
6225
6226 * linux-aarch64-low.c (aarch64_insert_point): Use
6227 show_debug_regs as a boolean.
6228 (aarch64_remove_point): Likewise.
6229
f5771b1d
PA
62302015-03-05 Pedro Alves <palves@redhat.com>
6231
6232 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6233 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6234 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6235 * nto-low.c (nto_target_ops): Likewise.
6236 * spu-low.c (spu_target_ops): Likewise.
6237 * win32-low.c (win32_target_ops): Likewise.
6238
3e572f71
PA
62392015-03-04 Pedro Alves <palves@redhat.com>
6240
72f4393d 6241 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6242 Decide whether a breakpoint triggered based on the SIGTRAP's
6243 siginfo.si_code.
72f4393d
L
6244 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6245 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6246 (linux_low_filter_event): Check for breakpoints before checking
6247 watchpoints.
6248 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6249 siginfo.si_code.
72f4393d
L
6250 (linux_stopped_by_sw_breakpoint)
6251 (linux_supports_stopped_by_sw_breakpoint)
6252 (linux_stopped_by_hw_breakpoint)
6253 (linux_supports_stopped_by_hw_breakpoint): New functions.
6254 (linux_target_ops): Install new target methods.
3e572f71 6255
1ec68e26
PA
62562015-03-04 Pedro Alves <palves@redhat.com>
6257
6258 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6259 * server.c (swbreak_feature, hwbreak_feature): New globals.
6260 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6261 (captured_main): Clear swbreak_feature and hwbreak_feature.
6262 * server.h (swbreak_feature, hwbreak_feature): Declare.
6263 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6264 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6265 supports_stopped_by_hw_breakpoint>: New fields.
6266 (target_supports_stopped_by_sw_breakpoint)
6267 (target_stopped_by_sw_breakpoint)
6268 (target_supports_stopped_by_hw_breakpoint)
6269 (target_stopped_by_hw_breakpoint): Declare.
6270
15c66dd6
PA
62712015-03-04 Pedro Alves <palves@redhat.com>
6272
6273 enum lwp_stop_reason -> enum target_stop_reason
6274 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6275 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6276 (linux_wait_1, stuck_in_jump_pad_callback)
6277 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6278 (linux_stopped_by_watchpoint):
6279 * linux-low.h (enum lwp_stop_reason): Delete.
6280 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6281 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6282
98fc70d6
YQ
62832015-03-04 Yao Qi <yao.qi@linaro.org>
6284
6285 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6286
dd2ac174
GB
62872015-03-03 Gary Benson <gbenson@redhat.com>
6288
6289 * hostio.c (handle_vFile): Fix prefix lengths.
6290
d68e53f4
MM
62912015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6292
6293 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6294 ptr_bits.
6295
bf2d68ab
AA
62962015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6297
6298 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6299 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6300 (clean): Add "rm -f" for above C files.
6301 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6302 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6303 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6304 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6305 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6306 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6307 (init_registers_s390x_vx_linux64)
6308 (init_registers_s390x_tevx_linux64)
6309 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6310 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6311 declarations.
6312 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6313 (s390_store_vxrs_high): New functions.
6314 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6315 NT_S390_VXRS_HIGH.
6316 (s390_arch_setup): Add logic for selecting one of the new target
6317 descriptions. Activate the new vector regsets if applicable.
6318 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6319 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6320 and init_registers_s390x_tevx_linux64.
6321
c966a859
PA
63222015-03-01 Pedro Alves <palves@redhat.com>
6323
6324 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6325 parameter.
6326
4180215b
PA
63272015-02-27 Pedro Alves <palves@redhat.com>
6328
6329 * linux-x86-low.c (u_debugreg_offset): New function.
6330 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6331
749bab01
PA
63322015-02-27 Pedro Alves <palves@redhat.com>
6333
6334 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6335 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6336 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6337 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6338 (ps_lsetfpregs, ps_getpid)
6339 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6340 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6341 (ps_lsetxregs, ps_plog): Declare.
6342
3c14e5a3
PA
63432015-02-27 Pedro Alves <palves@redhat.com>
6344
6345 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6346 IP_AGENT_EXPORT_FUNC.
6347 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6348 IP_AGENT_EXPORT_FUNC.
6349 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6350 (IP_AGENT_EXPORT): Delete.
6351 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6352 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6353 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6354 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6355 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6356 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6357 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6358 (traceframe_read_count, traceframe_write_count)
6359 (traceframes_created, trace_state_variables, get_raw_reg)
6360 (get_trace_state_variable_value, set_trace_state_variable_value)
6361 (ust_loaded, helper_thread_id, cmd_buf): Use
6362 IPA_SYM_EXPORTED_NAME.
6363 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6364 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6365 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6366 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6367 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6368 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6369 EXTERN_C_PUSH/EXTERN_C_POP.
6370 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6371 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6372 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6373 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6374 (traceframe_write_count, traceframe_read_count)
6375 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6376 (about_to_request_buffer_space, get_trace_state_variable_value)
6377 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6378 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6379 EXTERN_C_PUSH/EXTERN_C_POP.
6380 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6381 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6382 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6383 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6384 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6385 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6386 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6387 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6388 Define.
6389 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6390 (IP_AGENT_EXPORT_VAR_DECL): Define.
6391 (tracing): Declare.
6392 (gdb_agent_get_raw_reg): Declare.
6393
fe978cb0
PA
63942015-02-27 Tom Tromey <tromey@redhat.com>
6395 Pedro Alves <palves@redhat.com>
6396
6397 Rename symbols whose names are reserved C++ keywords throughout.
6398
3bc3d82a
PA
63992015-02-27 Pedro Alves <palves@redhat.com>
6400
6401 * Makefile.in (COMPILER): New, get it from autoconf.
6402 (CXX): Get from autoconf instead.
6403 (COMPILE.pre): Use COMPILER.
6404 (CC-LD): Rename to ...
6405 (CC_LD): ... this. Use COMPILER.
6406 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6407 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6408 * acinclude.m4: Include build-with-cxx.m4.
6409 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6410 Disable -Werror by default if building in C++ mode.
6411 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6412 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6413 the C++ compiler. Save/restore CXXFLAGS too.
6414 * configure: Regenerate.
6415
07697489
PA
64162015-02-27 Pedro Alves <palves@redhat.com>
6417
6418 * acinclude.m4: Include libiberty.m4.
6419 * configure.ac: Call libiberty_INIT.
6420 * config.in, configure: Regenerate.
6421
9beb7c4e
PA
64222015-02-26 Pedro Alves <palves@redhat.com>
6423
6424 * linux-low.c (linux_wait_1): When incrementing the PC past a
6425 program breakpoint always use the_low_target.breakpoint_len as
6426 increment, rather than the maximum between that and
6427 the_low_target.decr_pc_after_break.
6428
8090aef2
PA
64292015-02-23 Pedro Alves <palves@redhat.com>
6430
6431 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6432 thread was doing a step-over; always adjust the PC if
6433 we stepped over a permanent breakpoint.
6434 (linux_wait_1): If we stepped over breakpoint that was on top of a
6435 permanent breakpoint, manually advance the PC past it.
6436
bc9540e8
PA
64372015-02-23 Pedro Alves <palves@redhat.com>
6438
6439 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6440 modes.
6441 (x86_fill_gregset, x86_store_gregset): Use it when handling
6442 $orig_eax.
6443
2db9a427
PA
64442015-02-20 Pedro Alves <palves@redhat.com>
6445
6446 * thread-db.c: Include "nat/linux-procfs.h".
6447 (thread_db_init): Skip listing new threads if the kernel supports
6448 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6449
afa8d396
PA
64502015-02-20 Pedro Alves <palves@redhat.com>
6451
6452 * linux-low.c (status_pending_p_callback): Use ptid_match.
6453
c9587f88
AT
64542015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6455
6456 PR breakpoints/16812
6457 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6458 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6459 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6460
b05ec7a5
AT
64612015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6462
6463 PR breakpoints/15956
6464 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6465
d33501a5
MM
64662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6467
6468 * linux-low.c (linux_low_btrace_conf): Print size.
6469 * server.c (handle_btrace_conf_general_set): New.
6470 (hanle_general_set): Call handle_btrace_conf_general_set.
6471 (handle_query): Report Qbtrace-conf:bts:size as supported.
6472
f4abbc16
MM
64732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6474
6475 * linux-low.c (linux_low_enable_btrace): Update parameters.
6476 (linux_low_btrace_conf): New.
6477 (linux_target_ops)<to_btrace_conf>: Initialize.
6478 * server.c (current_btrace_conf): New.
6479 (handle_btrace_enable): Rename to ...
6480 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6481 to target_enable_btrace. Update comment. Update users.
6482 (handle_qxfer_btrace_conf): New.
6483 (qxfer_packets): Add btrace-conf entry.
6484 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6485 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6486 (target_ops)<read_btrace_conf>: New.
6487 (target_enable_btrace): Update parameters.
6488 (target_read_btrace_conf): New.
6489
043c3577
MM
64902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6491
6492 * server.c (handle_btrace_general_set): Remove call to
6493 target_supports_btrace.
6494 (supported_btrace_packets): New.
6495 (handle_query): Call supported_btrace_packets.
6496 * target.h: include btrace-common.h.
6497 (btrace_target_info): Removed.
6498 (supports_btrace, target_supports_btrace): Update parameters.
6499
734b0e4b
MM
65002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6501
6502 * Makefile.in (SFILES): Add common/btrace-common.c.
6503 (OBS): Add common/btrace-common.o.
6504 (btrace-common.o): Add build rules.
6505 * linux-low: Include btrace-common.h.
6506 (linux_low_read_btrace): Use struct btrace_data. Call
6507 btrace_data_init and btrace_data_fini.
6508
d6c146e9
PA
65092015-02-06 Pedro Alves <palves@redhat.com>
6510
6511 * thread-db.c (find_new_threads_callback): Add debug output.
6512
20ba1ce6
PA
65132015-02-04 Pedro Alves <palves@redhat.com>
6514
6515 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6516 (resume_stopped_resumed_lwps): New function.
6517 (linux_wait_for_event_filtered): Use it.
6518
8cc73a39
SDJ
65192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6520
6521 * Makefile.in (SFILES): Add linux-personality.c.
6522 (linux-personality.o): New rule.
6523 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6524 list of objects to be built.
6525 * linux-low.c: Include nat/linux-personality.h.
6526 (linux_create_inferior): Remove code to disable address space
6527 randomization (moved to ../nat/linux-personality.c). Create
6528 cleanup to disable address space randomization.
6529
fb23d554
SDJ
65302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6531
6532 * Makefile.in (posix-strerror.o): New rule.
6533 (mingw-strerror.o): Likewise.
6534 * configure: Regenerated.
6535 * configure.ac: Source file ../common/common.host. Initialize new
6536 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6537
cdf43629
YQ
65382015-01-14 Yao Qi <yao@codesourcery.com>
6539
6540 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6541 (ppc-linux.o): New rule.
6542 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6543 * configure.ac: AC_CHECK_FUNCS(getauxval).
6544 * config.in: Re-generated.
6545 * configure: Re-generated.
6546 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6547 ppc64_64bit_inferior_p
6548
514c5338
YQ
65492015-01-14 Yao Qi <yao@codesourcery.com>
6550
6551 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6552 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6553 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6554 (PT_ORIG_R3, PT_TRAP): Likewise.
6555 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6556 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6557 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6558
3368c1e5
JB
65592015-01-10 Joel Brobecker <brobecker@adacore.com>
6560
6561 * i387-fp.c (i387_cache_to_xsave): In look over
6562 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6563 zmmh_low_space field by use of zmmh_high_space.
6564
582511be
PA
65652015-01-09 Pedro Alves <palves@redhat.com>
6566
6567 * linux-low.c (step_over_bkpt): Move higher up in the file.
6568 (handle_extended_wait): Don't store the stop_pc here.
6569 (get_stop_pc): Adjust comments and rename to ...
6570 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6571 stopped for a software breakpoint or hardware breakpoint.
6572 (thread_still_has_status_pending_p): New function.
6573 (status_pending_p_callback): Use
6574 thread_still_has_status_pending_p. If the event is no longer
6575 interesting, resume the LWP.
6576 (handle_tracepoints): Add assert.
6577 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6578 (wstatus_maybe_breakpoint): New function.
6579 (cancel_breakpoint): Delete function.
6580 (check_stopped_by_watchpoint): New function, factored out from
6581 linux_low_filter_event.
6582 (lp_status_maybe_breakpoint): Delete function.
6583 (linux_low_filter_event): Remove filter_ptid argument.
6584 Leave thread group exits pending here. Store the LWP's stop PC.
6585 Always leave events pending.
6586 (linux_wait_for_event_filtered): Pull all events out of the
6587 kernel, and leave them all pending.
6588 (count_events_callback, select_event_lwp_callback): Consider all
6589 events.
6590 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6591 (select_event_lwp): Only give preference to the stepping LWP in
6592 all-stop mode. Adjust comments.
6593 (ignore_event): New function.
6594 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6595 references to cancel_breakpoints. Adjust to renames. Also give
6596 equal priority to all LWPs that have had events in non-stop mode.
6597 If reporting a software breakpoint event, unadjust the LWP's PC.
6598 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6599 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6600 Adjust.
6601 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6602 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6603 (linux_stopped_by_watchpoint): Adjust.
6604 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6605 * linux-low.h (enum lwp_stop_reason): New.
6606 (struct lwp_info) <stop_pc>: Adjust comment.
6607 <stopped_by_watchpoint>: Delete field.
6608 <stop_reason>: New field.
6609 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6610 * mem-break.c (software_breakpoint_inserted_here)
6611 (hardware_breakpoint_inserted_here): New function.
6612 * mem-break.h (software_breakpoint_inserted_here)
6613 (hardware_breakpoint_inserted_here): Declare.
6614 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6615 (cancel_breakpoints): Delete.
6616 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6617 (upload_fast_traceframes): Remove references to
6618 cancel_breakpoints.
6619
a33e3959
PA
66202015-01-09 Pedro Alves <palves@redhat.com>
6621
6622 * thread-db.c (find_new_threads_callback): Ignore thread if the
6623 kernel thread ID is -1.
6624
8784d563
PA
66252015-01-09 Pedro Alves <palves@redhat.com>
6626
6627 * linux-low.c (linux_attach_fail_reason_string): Move to
6628 nat/linux-ptrace.c, and rename.
6629 (linux_attach_lwp): Update comment.
6630 (attach_proc_task_lwp_callback): New function.
6631 (linux_attach): Adjust to rename and use
6632 linux_proc_attach_tgid_threads.
6633 (linux_attach_fail_reason_string): Delete declaration.
6634
76f2b779
JB
66352015-01-01 Joel Brobecker <brobecker@adacore.com>
6636
6637 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6638 * server.c (gdbserver_version): Likewise.
6639
fafcc06a
SDJ
66402014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6641
6642 * remote-utils.c: Include ctype.h.
6643 (input_interrupt): Explicitly handle the case when the char
6644 received is the NUL byte. Improve the printing of non-ASCII
6645 characters.
6646
beed38b8
JB
66472014-12-16 Joel Brobecker <brobecker@adacore.com>
6648
6649 * linux-low.c (linux_low_filter_event): Update call to
6650 linux_enable_event_reporting following the addition of
6651 a new parameter to that function.
6652
bf330350
CU
66532014-12-16 Catalin Udma <catalin.udma@freescale.com>
6654
6655 PR server/17457
6656 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6657 (AARCH64_FPCR_REGNO): Likewise.
6658 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6659 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6660 (aarch64_store_fpregset): Likewise.
6661
5227d625
JB
66622014-12-15 Joel Brobecker <brobecker@adacore.com>
6663
6664 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6665 Remove FIXME comment about assumption about N.
6666
f93b65a0
JB
66672014-12-13 Joel Brobecker <brobecker@adacore.com>
6668
6669 * configure.ac: If large-file support is disabled in GDBserver,
6670 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6671 * configure: Regenerate.
6672
e5a9158d
AA
66732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6674
6675 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6676 warning upon ENODATA from ptrace.
6677 * linux-s390-low.c (s390_store_tdb): New.
6678 (s390_regsets): Add regset for NT_S390_TDB.
6679
feea5f36
AA
66802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6681
6682 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6683 without a fill_function.
6684 * linux-s390-low.c (s390_fill_last_break): Remove.
6685 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6686 (s390_arch_setup): Use regset's size instead of fill_function for
6687 loop end condition.
6688
098dbe61
AA
66892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6690
6691 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6692 the regset's store function when ptrace returned an error.
6693 * regcache.c (get_thread_regcache): Invalidate register cache
6694 before fetching inferior's registers.
6695
28eef672
AA
66962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6697
6698 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6699 while-loop as for-loop.
6700 (regsets_store_inferior_registers): Likewise.
6701
bdca27a2
YQ
67022014-11-28 Yao Qi <yao@codesourcery.com>
6703
6704 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6705 * config.in, configure: Re-generate.
6706 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6707 is defined.
6708
9c232dda
YQ
67092014-11-21 Yao Qi <yao@codesourcery.com>
6710
6711 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6712 (AC_CHECK_HEADERS): Remove malloc.h.
6713 * configure: Re-generated.
6714 * config.in: Re-generated.
6715 * server.h: Don't include alloca.h and malloc.h.
6716 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6717 Don't include malloc.h.
6718
43968415
JB
67192014-11-17 Joel Brobecker <brobecker@adacore.com>
6720
6721 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6722 corresponding ERRNO check in same block.
6723
40e91bc7
PA
67242014-11-12 Pedro Alves <palves@redhat.com>
6725
6726 * server.c (cont_thread): Update comment.
6727 (start_inferior, attach_inferior): No longer clear cont_thread.
6728 (handle_v_cont): No longer set cont_thread.
6729 (captured_main): Clear cont_thread each time a GDB connects.
6730
c2c118cf
PA
67312014-11-12 Pedro Alves <palves@redhat.com>
6732
6733 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6734 thread, and don't resume all threads if the Hc thread has exited.
6735
78708b7c
PA
67362014-11-12 Pedro Alves <palves@redhat.com>
6737
6738 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6739 the process group instead of to a specific LWP.
6740
a2abc7de
PA
67412014-10-15 Pedro Alves <palves@redhat.com>
6742
6743 PR server/17487
6744 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6745 parameter.
6746 (arm_set_thread_context): Delete.
6747 (the_low_target): Adjust.
6748 * win32-i386-low.c (debug_registers_changed)
6749 (debug_registers_used): Delete.
6750 (update_debug_registers_callback): New function.
6751 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6752 needing to update their debug registers.
6753 (win32_get_current_dr): New function.
6754 (x86_dr_low_get_addr, x86_dr_low_get_control)
6755 (x86_dr_low_get_status): Fetch the debug register from the thread
6756 record's context.
6757 (i386_initial_stuff): Adjust.
6758 (i386_get_thread_context): Remove current_event parameter. Don't
6759 clear debug_registers_changed nor copy DR values to
6760 debug_reg_state.
6761 (i386_set_thread_context): Delete.
6762 (i386_prepare_to_resume): New function.
6763 (i386_thread_added): Mark the thread as needing to update irs
6764 debug registers.
6765 (the_low_target): Remove i386_set_thread_context and install
6766 i386_prepare_to_resume.
6767 * win32-low.c (win32_get_thread_context): Adjust.
6768 (win32_set_thread_context): Use SetThreadContext
6769 directly.
6770 (win32_prepare_to_resume): New function.
6771 (win32_require_context): New function, factored out from ...
6772 (thread_rec): ... this.
6773 (continue_one_thread): Call win32_prepare_to_resume on each thread
6774 we're about to continue.
6775 (win32_resume): Call win32_prepare_to_resume on the event thread.
6776 * win32-low.h (struct win32_thread_info)
6777 <debug_registers_changed>: New field.
6778 (struct win32_target_ops): Change prototype of set_thread_context,
6779 delete set_thread_context and add prepare_to_resume.
6780 (win32_require_context): New declaration.
6781
a442d071
GB
67822014-10-08 Gary Benson <gbenson@redhat.com>
6783
6784 * server.h: Do not include common-exceptions.h.
6785
6f1947e8
GB
67862014-10-08 Gary Benson <gbenson@redhat.com>
6787
6788 * server.h: Do not include cleanups.h.
6789
63b434a4
JH
67902014-09-30 James Hogan <james.hogan@imgtec.com>
6791
6792 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6793 mips64-dsp-linux.c.
6794
c4d9ceb6
YQ
67952014-09-23 Yao Qi <yao@codesourcery.com>
6796
6797 * linux-low.c (lp_status_maybe_breakpoint): New function.
6798 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6799 (count_events_callback): Likewise.
6800 (select_event_lwp_callback): Likewise.
6801 (cancel_breakpoints_callback): Likewise.
6802
89a5711c
DB
68032014-09-19 Don Breazeal <donb@codesourcery.com>
6804
6805 * linux-low.c (handle_extended_wait): Call
6806 linux_ptrace_get_extended_event.
6807 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6808 linux_is_extended_waitstatus.
6809
bffc0964
JB
68102014-09-16 Joel Brobecker <brobecker@adacore.com>
6811
6812 * Makefile.in (CPPFLAGS): Define.
6813 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6814 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6815
0bfdf32f
GB
68162014-09-16 Gary Benson <gbenson@redhat.com>
6817
6818 * inferiors.h (current_inferior): Renamed as...
6819 (current_thread): New variable. All uses updated.
6820 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6821 (maybe_move_out_of_jump_pad): Likewise.
6822 (cancel_breakpoint): Likewise.
6823 (linux_low_filter_event): Likewise.
6824 (wait_for_sigstop): Likewise.
6825 (linux_resume_one_lwp): Likewise.
6826 (need_step_over_p): Likewise.
6827 (start_step_over): Likewise.
6828 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6829 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6830 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6831 and save_inferior as saved_thread.
6832 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6833 saved_thread.
6834 (regcache_invalidate_thread): Likewise.
6835 * remote-utils.c (prepare_resume_reply): Likewise.
6836 * thread-db.c (thread_db_get_tls_address): Likewise.
6837 (disable_thread_event_reporting): Likewise.
6838 (remove_thread_event_breakpoints): Likewise.
6839 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6840 as saved_thread.
6841 * target.h (set_desired_inferior): Renamed as...
6842 (set_desired_thread): New declaration. All uses updated.
6843 * server.c (myresume): Updated comment to reference thread instead
6844 of inferior.
6845 (handle_serial_event): Likewise.
6846 (handle_target_event): Likewise.
6847
361c8ade
GB
68482014-09-12 Tom Tromey <tromey@redhat.com>
6849 Gary Benson <gbenson@redhat.com>
6850
6851 * regcache.h: Include common-regcache.h.
6852 (regcache_read_pc): Don't declare.
6853 * regcache.c (get_thread_regcache_for_ptid): New function.
6854
bd9269f7
GB
68552014-09-11 Tom Tromey <tromey@redhat.com>
6856 Gary Benson <gbenson@redhat.com>
6857
6858 * symbol.c: New file.
6859 * Makefile.in (SFILES): Add symbol.c.
6860 (OBS): Add symbol.o.
6861
f8c1d06b
GB
68622014-09-11 Gary Benson <gbenson@redhat.com>
6863
6864 * target.c (target_stop_ptid, target_continue_ptid): New
6865 functions.
6866
721ec300
GB
68672014-09-11 Tom Tromey <tromey@redhat.com>
6868 Gary Benson <gbenson@redhat.com>
6869
6870 * target.h: Include target/target.h.
6871 * target.c (target_read_memory, target_read_uint32)
6872 (target_write_memory): New functions.
6873
c5e92cca
GB
68742014-09-11 Gary Benson <gbenson@redhat.com>
6875
6876 * server.h (debug_hw_points): Don't declare.
6877 * server.c (debug_hw_points): Don't define. Replace all uses
6878 with show_debug_regs.
6879 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6880 all uses with show_debug_regs.
6881
2e4bb98a
EBM
68822014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6883
6884 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6885 endianness into account.
6886 (ppc_supply_ptrace_register): Likewise.
6887
ac740bc7
JH
68882014-09-03 James Hogan <james.hogan@imgtec.com>
6889
6890 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6891 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6892
97ea6506
GB
68932014-09-03 Gary Benson <gbenson@redhat.com>
6894
6895 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6896 ALL_DEBUG_ADDRESS_REGISTERS.
6897
df7e5265
GB
68982014-09-02 Gary Benson <gbenson@redhat.com>
6899
6900 * i386-low.h: Renamed as...
6901 * x86-low.h: New file. All type, function and variable name
6902 prefixes changed from "i386_" to "x86_". All references updated.
6903 * i386-low.c: Renamed as...
6904 * x86-low.c: New file. All type, function and variable name
6905 prefixes changed from "i386_" to "x86_". All references updated.
6906
ed859da7
GB
69072014-09-02 Gary Benson <gbenson@redhat.com>
6908
6909 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6910 (x86_linux_new_thread): Likewise.
6911
860789c7
GB
69122014-08-29 Gary Benson <gbenson@redhat.com>
6913
6914 * server.h (setjmp.h): Do not include.
6915 (toplevel): Do not declare.
6916 (common-exceptions.h): Include.
6917 (cleanups.h): Likewise.
6918 * server.c (toplevel): Do not define.
6919 (exit_code): New static global.
6920 (detach_or_kill_for_exit_cleanup): New function.
6921 (main): New function. Original main renamed to...
6922 (captured_main): New function.
6923 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6924
ff55e1b5
GB
69252014-08-29 Gary Benson <gbenson@redhat.com>
6926
6927 * Makefile.in (SFILES): Add common/common-exceptions.c.
6928 (OBS): Add common-exceptions.o.
6929 (common-exceptions.o): New rule.
6930 * utils.c (prepare_to_throw_exception): New function.
6931
e9bcb658
GB
69322014-08-29 Gary Benson <gbenson@redhat.com>
6933
6934 * config.in: Regenerate.
6935 * configure: Likewise.
6936
e3180625
GB
69372014-08-29 Gary Benson <gbenson@redhat.com>
6938
6939 * Makefile.in (SFILES): Add common/cleanups.c.
6940 (OBS): cleanups.o.
6941 (cleanups.o): New rule.
6942
e3d6ba5d
GB
69432014-08-29 Gary Benson <gbenson@redhat.com>
6944
6945 * utils.c (internal_vwarning): New function.
6946
7096e886
GB
69472014-08-28 Gary Benson <gbenson@redhat.com>
6948
6949 * utils.h (fatal): Remove declaration.
6950 * utils.c (fatal): Remove function.
6951
14ce3192
GB
69522014-08-28 Gary Benson <gbenson@redhat.com>
6953
6954 * tracepoint.c (gdb_agent_init): Replace fatal with
6955 perror_with_name.
6956 (initialize_tracepoint): Likewise.
6957
50278d59
GB
69582014-08-28 Gary Benson <gbenson@redhat.com>
6959
6960 * remote-utils.c (remote_prepare): Replace fatal with error.
6961
aa96c426
GB
69622014-08-28 Gary Benson <gbenson@redhat.com>
6963
6964 * linux-low.c (linux_async): Replace fatal with warning.
6965 Tidy up and return.
6966 (linux_start_non_stop): Return -1 if linux_async failed.
6967
f7160e97
GB
69682014-08-28 Gary Benson <gbenson@redhat.com>
6969
6970 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6971 gdb_assert.
6972 (i386_dr_low_get_addr): Remove vague comment.
6973 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6974 gdb_assert.
6975
38e08fca
GB
69762014-08-28 Gary Benson <gbenson@redhat.com>
6977
6978 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6979 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6980 internal_error.
6981 (linux_resume_one_lwp): Likewise.
6982 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6983 gdb_assert.
6984 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6985 with internal_error.
6986 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6987 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6988 (find_register_by_name): Replace fatal with internal_error.
6989 (find_regno): Likewise.
6990 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6991 * thread-db.c (thread_db_create_event): Likewise.
6992 (thread_db_load_search): Likewise.
6993 (try_thread_db_load_1): Likewise.
6994 * tracepoint.c (get_jump_space_head): Replace fatal with
6995 internal_error.
6996 (claim_trampoline_space): Likewise.
6997 (have_fast_tracepoint_trampoline_buffer): Likewise.
6998 (cmd_qtstart): Likewise.
6999 (stop_tracing): Likewise.
7000 (fast_tracepoint_collecting): Likewise.
7001 (target_malloc): Likewise.
7002 (download_tracepoint): Likewise.
7003 (download_trace_state_variables): Replace check with gdb_assert.
7004 (upload_fast_traceframes): Replace fatal with internal_error.
7005
34abf635
GB
70062014-08-19 Tom Tromey <tromey@redhat.com>
7007 Gary Benson <gbenson@redhat.com>
7008
7009 * Makefile.in (SFILES): Add common/common-debug.c.
7010 (OBS): Add common-debug.o.
7011 (common-debug.o): New rule.
7012 * debug.h (debug_printf): Don't declare.
7013 * debug.c (debug_printf): Renamed and rewritten as...
7014 (debug_vprintf): New function.
7015
f6e94d78
GB
70162014-08-19 Gary Benson <gbenson@redhat.com>
7017
7018 * utils.h: Do not include print-utils.h.
7019
9239eeab
GB
70202014-08-19 Tom Tromey <tromey@redhat.com>
7021 Gary Benson <gbenson@redhat.com>
7022
7023 * server.h: Add static assertion.
7024 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7025
ef87c8bb
GB
70262014-08-19 Tom Tromey <tromey@redhat.com>
7027 Gary Benson <gbenson@redhat.com>
7028
7029 * Makefile.in (SFILES): Add common/errors.c.
7030 (OBS): Add errors.o.
7031 (IPA_OBS): Add errors-ipa.o.
7032 (errors.o): New rule.
7033 (errors-ipa.o): Likewise.
7034 * utils.h (perror_with_name, error, warning): Don't declare.
7035 * utils.c (warning): Renamed and rewritten as...
7036 (vwarning): New function.
7037 (error): Renamed and rewritten as...
7038 (verror): New function.
7039 (internal_error): Renamed and rewritten as...
7040 (internal_verror): New function.
7041
bb974a24
GB
70422014-08-07 Gary Benson <gbenson@redhat.com>
7043
7044 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7045 * configure: Regenerate.
7046 * config.in: Likewise.
7047 * server.h: Do not include errno.h.
7048 * event-loop.c: Likewise.
7049 * hostio-errno.c: Likewise.
7050 * linux-low.c: Likewise.
7051 * remote-utils.c: Likewise.
7052 * spu-low.c: Likewise.
7053 * utils.c: Likewise.
7054 * gdbreplay.c: Unconditionally include errno.h.
7055
6d3d12eb
GB
70562014-08-07 Gary Benson <gbenson@redhat.com>
7057
7058 * server.h: Do not include string.h.
7059 * event-loop.c: Likewise.
7060 * linux-low.c: Likewise.
7061 * regcache.c: Likewise.
7062 * remote-utils.c: Likewise.
7063 * spu-low.c: Likewise.
7064 * utils.c: Likewise.
7065
dccbb609
GB
70662014-08-07 Gary Benson <gbenson@redhat.com>
7067
7068 * server.h: Do not include gdb_assert.h.
7069
e76df0d0
GB
70702014-08-07 Gary Benson <gbenson@redhat.com>
7071
7072 * server.h: Do not include common-utils.h.
7073
4cb9c816
GB
70742014-08-07 Gary Benson <gbenson@redhat.com>
7075
7076 * server.h: Do not include ptid.h.
7077 * notif.h: Likewise.
7078
3995eeee
GB
70792014-08-07 Gary Benson <gbenson@redhat.com>
7080
7081 * server.h: Do not include gdb_locale.h.
7082
cb9f1a9b
GB
70832014-08-07 Gary Benson <gbenson@redhat.com>
7084
7085 * server.h: Do not include gdb/signals.h.
7086 * win32-low.c: Likewise.
7087
a5fceff8
GB
70882014-08-07 Gary Benson <gbenson@redhat.com>
7089
7090 * server.h: Do not include pathmax.h.
7091
b9391142
GB
70922014-08-07 Gary Benson <gbenson@redhat.com>
7093
7094 * server.h: Do not include libiberty.h.
7095 * linux-bfin-low.c: Likewise.
7096
0e443c87
GB
70972014-08-07 Gary Benson <gbenson@redhat.com>
7098
7099 * server.h: Do not include ansidecl.h.
7100
8ebb3f56
GB
71012014-08-07 Gary Benson <gbenson@redhat.com>
7102
7103 * linux-x86-low.c: Do not include stddef.h.
7104 * lynx-ppc-low.c: Likewise.
7105 * tracepoint.c: Likewise.
7106
8980bdf6
GB
71072014-08-07 Gary Benson <gbenson@redhat.com>
7108
7109 * server.h: Do not include stdarg.h.
7110 * nto-low.c: Likewise.
7111
d7096f71
GB
71122014-08-07 Gary Benson <gbenson@redhat.com>
7113
7114 * server.h: Do not include stdlib.h.
7115 * inferiors.c: Likewise.
7116 * linux-low.c: Likewise.
7117 * regcache.c: Likewise.
7118 * spu-low.c: Likewise.
7119 * tracepoint.c: Likewise.
7120 * utils.c: Likewise.
7121
d02f550d
GB
71222014-08-07 Gary Benson <gbenson@redhat.com>
7123
7124 * server.h: Do not include stdio.h.
7125 * linux-low.c: Likewise.
7126 * remote-utils.c: Likewise.
7127 * spu-low.c: Likewise.
7128 * utils.c: Likewise.
7129 * wincecompat.c: Likewise.
7130
87f6c4e3
GB
71312014-08-06 Gary Benson <gbenson@redhat.com>
7132
7133 * regcache.c (init_register_cache): Move conditionals inside if.
7134
7089dca4
GB
71352014-08-06 Gary Benson <gbenson@redhat.com>
7136
7137 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7138
462f517e
GB
71392014-07-31 Gary Benson <gbenson@redhat.com>
7140
7141 * ax.h: Do not include server.h.
7142 * gdbthread.h: Likewise.
7143 * lynx-low.h: Likewise.
7144 * notif.h: Likewise.
7145
976411d6
GB
71462014-07-30 Gary Benson <gbenson@redhat.com>
7147
7148 * server.h: Include common-defs.h.
7149 Do not include config.h or build-gnulib-gdbserver/config.h.
7150
d41f6d8e
GB
71512014-07-30 Gary Benson <gbenson@redhat.com>
7152
7153 * hostio-errno.c: Move server.h to top of includes list.
7154 * inferiors.c: Likewise.
7155 * linux-x86-low.c: Likewise.
7156 * notif.c: Include server.h.
7157
314c6a35
TT
71582014-07-24 Tom Tromey <tromey@redhat.com>
7159 Gary Benson <gbenson@redhat.com>
7160
7161 * server.h (CORE_ADDR): Now unsigned.
7162
69ff6be5
PA
71632014-07-16 Pedro Alves <palves@redhat.com>
7164
7165 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7166
ce9e3fe7
PA
71672014-07-15 Pedro Alves <palves@redhat.com>
7168
7169 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7170 copy.
7171
e76126e8
PA
71722014-07-11 Pedro Alves <palves@redhat.com>
7173
7174 * linux-low.c (kill_wait_lwp): New function, based on
7175 kill_one_lwp_callback, but use my_waitpid directly.
7176 (kill_one_lwp_callback, linux_kill): Use it.
7177
8e9db26e
PA
71782014-06-23 Pedro Alves <palves@redhat.com>
7179
7180 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7181 before setting DR0..DR3.
7182
698b3e08
GB
71832014-06-20 Gary Benson <gbenson@redhat.com>
7184
7185 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7186 * configure: Regenerated.
7187 * config.in: Likewise.
7188
125f8a3d
GB
71892014-06-20 Gary Benson <gbenson@redhat.com>
7190
7191 * Makefile.in (SFILES): Update locations for files moved
7192 from common to nat.
7193 (object file files): Reordered.
7194
42995dbd
GB
71952014-06-20 Gary Benson <gbenson@redhat.com>
7196
7197 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7198 (i386_dr_low_set_addr): Likewise.
7199 (i386_dr_low_get_addr): Likewise.
7200 (i386_dr_low_can_set_control): Likewise.
7201 (i386_dr_low_set_control): Likewise.
7202 (i386_dr_low_get_control): Likewise.
7203 (i386_dr_low_get_status): Likewise.
7204 (i386_get_debug_register_length): Likewise.
7205 * linux-x86-low.c (i386_dr_low_set_addr):
7206 Changed signature. Made static.
7207 (i386_dr_low_get_addr): Likewise.
7208 (i386_dr_low_set_control): Likewise.
7209 (i386_dr_low_get_control): Likewise.
7210 (i386_dr_low_get_status): Likewise.
7211 (i386_dr_low): New global variable.
7212 * win32-i386-low.c (i386_dr_low_set_addr):
7213 Changed signature. Made static.
7214 (i386_dr_low_get_addr): Likewise.
7215 (i386_dr_low_set_control): Likewise.
7216 (i386_dr_low_get_control): Likewise.
7217 (i386_dr_low_get_status): Likewise.
7218 (i386_dr_low): New global variable.
7219
e1d2394b
MS
72202014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7221
7222 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7223 * Makefile.in (AR, AR_FLAGS): Define.
7224 * configure: Regenerate.
7225
3a8ee006
GB
72262014-06-19 Gary Benson <gbenson@redhat.com>
7227
7228 * Makefile.in (i386-dregs.o): New rule.
7229 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7230 * i386-low.c (target.h): Remove include.
7231 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7232 (DR_CONTROL_SHIFT): Likewise.
7233 (DR_CONTROL_SIZE): Likewise.
7234 (DR_RW_EXECUTE): Likewise.
7235 (DR_RW_WRITE): Likewise.
7236 (DR_RW_READ): Likewise.
7237 (DR_RW_IORW): Likewise.
7238 (DR_LEN_1): Likewise.
7239 (DR_LEN_2): Likewise.
7240 (DR_LEN_4): Likewise.
7241 (DR_LEN_8): Likewise.
7242 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7243 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7244 (DR_ENABLE_SIZE): Likewise.
7245 (DR_LOCAL_SLOWDOWN): Likewise.
7246 (DR_GLOBAL_SLOWDOWN): Likewise.
7247 (DR_CONTROL_RESERVED): Likewise.
7248 (I386_DR_CONTROL_MASK): Likewise.
7249 (I386_DR_VACANT): Likewise.
7250 (I386_DR_LOCAL_ENABLE): Likewise.
7251 (I386_DR_GLOBAL_ENABLE): Likewise.
7252 (I386_DR_DISABLE): Likewise.
7253 (I386_DR_SET_RW_LEN): Likewise.
7254 (I386_DR_GET_RW_LEN): Likewise.
7255 (I386_DR_WATCH_HIT): Likewise.
7256 (i386_wp_op_t): Likewise.
7257 (i386_show_dr): Likewise.
7258 (i386_length_and_rw_bits): Likewise.
7259 (i386_insert_aligned_watchpoint): Likewise.
7260 (i386_remove_aligned_watchpoint): Likewise.
7261 (i386_handle_nonaligned_watchpoint): Likewise.
7262 i386_update_inferior_debug_regs(): Likewise.
7263 (i386_dr_insert_watchpoint): Likewise.
7264 (i386_dr_remove_watchpoint): Likewise.
7265 (i386_dr_region_ok_for_watchpoint): Likewise.
7266 (i386_dr_stopped_data_address): Likewise.
7267 (i386_dr_stopped_by_watchpoint): Likewise.
7268
8f26655c
GB
72692014-06-19 Gary Benson <gbenson@redhat.com>
7270
7271 * i386-low.c (i386_dr_show): Renamed to
7272 i386_show_dr and made static. All uses updated.
7273 (i386_dr_length_and_rw_bits): Renamed to
7274 i386_length_and_rw_bits and made static.
7275 All uses updated.
7276 (i386_dr_insert_aligned_watchpoint): Renamed to
7277 i386_insert_aligned_watchpoint and made static.
7278 All uses updated.
7279 (i386_dr_remove_aligned_watchpoint): Renamed to
7280 i386_remove_aligned_watchpoint and made static.
7281 All uses updated.
7282 (i386_dr_update_inferior_debug_regs): Renamed to
7283 i386_update_inferior_debug_regs and made static.
7284 All uses updated.
7285
b9228891
GB
72862014-06-18 Gary Benson <gbenson@redhat.com>
7287
5171def3
GB
7288 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7289 (i386_dr_low_can_set_control): Likewise.
7290 (i386_get_debug_register_length): Likewise.
7291 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7292 (i386_dr_low_can_set_control): Likewise.
7293 (i386_get_debug_register_length): Likewise.
7294
72952014-06-17 Gary Benson <gbenson@redhat.com>
7296
b9228891
GB
7297 * i386-low.h (i386-dregs.h): New include.
7298 (DR_FIRSTADDR): Now in i386-dregs.h.
7299 (DR_LASTADDR): Likewise.
7300 (DR_NADDR): Likewise.
7301 (DR_STATUS): Likewise.
7302 (DR_CONTROL): Likewise.
7303 (i386_debug_reg_state): Likewise.
7304 (i386_dr_insert_watchpoint): Likewise.
7305 (i386_dr_remove_watchpoint): Likewise.
7306 (i386_dr_region_ok_for_watchpoint): Likewise.
7307 (i386_dr_stopped_data_address): Likewise.
7308 (i386_dr_stopped_by_watchpoint): Likewise.
7309 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7310
4be83cc2
GB
73112014-06-18 Gary Benson <gbenson@redhat.com>
7312
7313 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7314 i386_dr_insert_watchpoint.
7315 (i386_low_remove_watchpoint): Renamed to
7316 i386_dr_remove_watchpoint.
7317 (i386_low_region_ok_for_watchpoint): Renamed to
7318 i386_dr_region_ok_for_watchpoint.
7319 (i386_low_stopped_data_address): Renamed to
7320 i386_dr_stopped_data_address.
7321 (i386_low_stopped_by_watchpoint): Renamed to
7322 i386_dr_stopped_by_watchpoint.
7323 * i386-low.c (i386_show_dr): Renamed to
7324 i386_dr_show and made nonstatic. All uses updated.
7325 (i386_length_and_rw_bits): Renamed to
7326 i386_dr_length_and_rw_bits and made nonstatic.
7327 All uses updated.
7328 (i386_insert_aligned_watchpoint): Renamed to
7329 i386_dr_insert_aligned_watchpoint and made nonstatic.
7330 All uses updated.
7331 (i386_remove_aligned_watchpoint): Renamed to
7332 i386_dr_remove_aligned_watchpoint and made nonstatic.
7333 All uses updated.
7334 (i386_update_inferior_debug_regs): Renamed to
7335 i386_dr_update_inferior_debug_regs and made nonstatic.
7336 All uses updated.
7337 (i386_low_insert_watchpoint): Renamed to
7338 i386_dr_insert_watchpoint. All uses updated.
7339 (i386_low_remove_watchpoint): Renamed to
7340 i386_dr_remove_watchpoint. All uses updated.
7341 (i386_low_region_ok_for_watchpoint): Renamed to
7342 i386_dr_region_ok_for_watchpoint. All uses updated.
7343 (i386_low_stopped_data_address): Renamed to
7344 i386_dr_stopped_data_address. All uses updated.
7345 (i386_low_stopped_by_watchpoint): Renamed to
7346 i386_dr_stopped_by_watchpoint. All uses updated.
7347
131aa0d4
GB
73482014-06-18 Gary Benson <gbenson@redhat.com>
7349
7350 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7351 (i386_dr_low_can_set_control): Likewise.
7352 (i386_insert_aligned_watchpoint): New check.
7353
d9305f7f
GB
73542014-06-18 Gary Benson <gbenson@redhat.com>
7355
7356 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7357 Renamed to state.
7358
e927c9fc
GB
73592014-06-18 Gary Benson <gbenson@redhat.com>
7360
7361 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7362 instead of fatal and error.
7363 (i386_handle_nonaligned_watchpoint): Likewise.
7364
1b6d4134
GB
73652014-06-18 Gary Benson <gbenson@redhat.com>
7366
7367 * i386-low.c (i386_get_debug_register_length): New macro.
7368 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7369 (i386_show_dr): Use debug_printf instead of fprintf. Use
7370 phex to format values.
7371
6e62758f
GB
73722014-06-18 Gary Benson <gbenson@redhat.com>
7373
7374 * i386-low.h: Comment changes.
7375 * i386-low.c: Likewise.
7376
fc6e2f03
GB
73772014-06-18 Gary Benson <gbenson@redhat.com>
7378
7379 * i386-low.c: Whitespace changes.
7380
f9d1eeed
TT
73812014-06-12 Tom Tromey <tromey@redhat.com>
7382
7383 * utils.c (freeargv): Remove.
7384
0b04e523
TT
73852014-06-12 Tom Tromey <tromey@redhat.com>
7386
7387 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7388 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7389 (parse_debug_format_options): Likewise.
7390 (gdbserver_usage): Likewise.
7391 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7392 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7393 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7394 against libiberty.
7395 ($(LIBGNU)): Depend on libiberty.
7396 (all-lib): Recurse into all subdirs.
7397 (install-only): Invoke "install" target in subdirs.
7398 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7399 targets.
7400 * configure: Rebuild.
7401 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7402 for vasprintf, vsnprintf, or gettimeofday.
7403 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7404 srv_tgtobj.
7405
270c9937
JB
74062014-06-05 Joel Brobecker <brobecker@adacore.com>
7407
7408 * development.sh: Delete.
7409 * Makefile.in (config.status): Adjust dependency on development.sh.
7410 * configure.ac: Adjust development.sh source call.
7411 * configure: Regenerate.
7412
0a261ed8
PA
74132014-06-02 Pedro Alves <palves@redhat.com>
7414
7415 * ax.c (gdb_free_agent_expr): New function.
7416 * ax.h (gdb_free_agent_expr): New declaration.
7417 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7418 list.
7419 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7420 static.
7421 (clear_breakpoint_conditions_and_commands): New function.
7422 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7423 (clear_breakpoint_conditions_and_commands): New declaration.
7424
e9dae05e
RR
74252014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7426
7427 * linux-aarch64-low.c (asm/ptrace.h): Include.
7428
5876f503
JK
74292014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7430
7431 Fix TLS access for -static -pthread.
7432 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7433 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7434 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7435
802e8e6d
PA
74362014-05-20 Pedro Alves <palves@redhat.com>
7437
7438 * linux-aarch64-low.c (aarch64_insert_point)
7439 (aarch64_remove_point): No longer check whether the type is
7440 supported here. Adjust to new interface.
7441 (the_low_target): Install aarch64_supports_z_point_type as
7442 supports_z_point_type method.
7443 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7444 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7445 instead of a Z packet char. Adjust.
7446 (arm_supports_z_point_type): New function.
7447 (arm_insert_point, arm_remove_point): Adjust to new interface.
7448 (the_low_target): Install arm_supports_z_point_type.
7449 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7450 (cris_insert_point, cris_remove_point): Adjust to new interface.
7451 Don't check whether the type is supported here.
7452 (the_low_target): Install cris_supports_z_point_type.
7453 * linux-low.c (linux_supports_z_point_type): New function.
7454 (linux_insert_point, linux_remove_point): Adjust to new interface.
7455 * linux-low.h (struct linux_target_ops) <insert_point,
7456 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7457 raw_breakpoint pointer parameter.
7458 <supports_z_point_type>: New method.
7459 * linux-mips-low.c (mips_supports_z_point_type): New function.
7460 (mips_insert_point, mips_remove_point): Adjust to new interface.
7461 Use mips_supports_z_point_type.
7462 (the_low_target): Install mips_supports_z_point_type.
7463 * linux-ppc-low.c (the_low_target): Install NULL as
7464 supports_z_point_type method.
7465 * linux-s390-low.c (the_low_target): Install NULL as
7466 supports_z_point_type method.
7467 * linux-sparc-low.c (the_low_target): Install NULL as
7468 supports_z_point_type method.
7469 * linux-x86-low.c (x86_supports_z_point_type): New function.
7470 (x86_insert_point): Adjust to new insert_point interface. Use
7471 insert_memory_breakpoint. Adjust to new
7472 i386_low_insert_watchpoint interface.
7473 (x86_remove_point): Adjust to remove_point interface. Use
7474 remove_memory_breakpoint. Adjust to new
7475 i386_low_remove_watchpoint interface.
7476 (the_low_target): Install x86_supports_z_point_type.
7477 * lynx-low.c (lynx_target_ops): Install NULL as
7478 supports_z_point_type callback.
7479 * nto-low.c (nto_supports_z_point_type): New.
7480 (nto_insert_point, nto_remove_point): Adjust to new interface.
7481 (nto_target_ops): Install nto_supports_z_point_type.
7482 * mem-break.c: Adjust intro comment.
7483 (struct raw_breakpoint) <raw_type, size>: New fields.
7484 <inserted>: Update comment.
7485 <shlib_disabled>: Delete field.
7486 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7487 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7488 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7489 (raw_bkpt_type_to_target_hw_bp_type): New function.
7490 (find_enabled_raw_code_breakpoint_at): New function.
7491 (find_raw_breakpoint_at): New type and size parameters. Use them.
7492 (insert_memory_breakpoint): New function, based off
7493 set_raw_breakpoint_at.
7494 (remove_memory_breakpoint): New function.
7495 (set_raw_breakpoint_at): Reimplement.
7496 (set_breakpoint): New, based on set_breakpoint_at.
7497 (set_breakpoint_at): Reimplement.
7498 (delete_raw_breakpoint): Go through the_target->remove_point
7499 instead of assuming memory breakpoints.
7500 (find_gdb_breakpoint_at): Delete.
7501 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7502 (find_gdb_breakpoint): New function.
7503 (set_gdb_breakpoint_at): Delete.
7504 (z_type_supported): New function.
7505 (set_gdb_breakpoint_1): New function, loosely based off
7506 set_gdb_breakpoint_at.
7507 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7508 (delete_gdb_breakpoint_at): Delete.
7509 (delete_gdb_breakpoint_1): New function, loosely based off
7510 delete_gdb_breakpoint_at.
7511 (delete_gdb_breakpoint): New function.
7512 (clear_gdb_breakpoint_conditions): Rename to ...
7513 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7514 breakpoint.
7515 (add_condition_to_breakpoint): Make static.
7516 (add_breakpoint_condition): Take a struct breakpoint pointer
7517 instead of an address. Adjust.
7518 (gdb_condition_true_at_breakpoint): Rename to ...
7519 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7520 z_type parameter.
7521 (gdb_condition_true_at_breakpoint): Reimplement.
7522 (add_breakpoint_commands): Take a struct breakpoint pointer
7523 instead of an address. Adjust.
7524 (gdb_no_commands_at_breakpoint): Rename to ...
7525 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7526 parameter. Return true if no breakpoint was found. Change debug
7527 output.
7528 (gdb_no_commands_at_breakpoint): Reimplement.
7529 (run_breakpoint_commands): Rename to ...
7530 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7531 and change return type to boolean.
7532 (run_breakpoint_commands): New function.
7533 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7534 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7535 breakpoint. Go through the_target->remove_point instead of
7536 assuming memory breakpoint.
7537 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7538 software and hardware breakpoints.
7539 (reinsert_raw_breakpoint): Go through the_target->insert_point
7540 instead of assuming memory breakpoint.
7541 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7542 software and hardware breakpoints.
7543 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7544 Check both software and hardware breakpoints.
7545 (validate_inserted_breakpoint): Assert the breakpoint is a
7546 software breakpoint. Set the inserted flag to -1 instead of
7547 setting shlib_disabled.
7548 (delete_disabled_breakpoints): Adjust.
7549 (validate_breakpoints): Only validate software breakpoints.
7550 Adjust to inserted flag change.
7551 (check_mem_read, check_mem_write): Skip breakpoint types other
7552 than software breakpoints. Adjust to inserted flag change.
7553 * mem-break.h (enum raw_bkpt_type): New enum.
7554 (raw_breakpoint, struct process_info): Forward declare.
7555 (Z_packet_to_target_hw_bp_type): Delete declaration.
7556 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7557 (set_gdb_breakpoint, delete_gdb_breakpoint)
7558 (clear_breakpoint_conditions): New declarations.
7559 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7560 (breakpoint_inserted_here): Update comment.
7561 (add_breakpoint_condition, add_breakpoint_commands): Replace
7562 address parameter with a breakpoint pointer parameter.
7563 (gdb_breakpoint_here): Update comment.
7564 (delete_gdb_breakpoint_at): Delete.
7565 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7566 * server.c (process_point_options): Take a struct breakpoint
7567 pointer instead of an address. Adjust.
7568 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7569 delete_gdb_breakpoint.
7570 * spu-low.c (spu_target_ops): Install NULL as
7571 supports_z_point_type method.
7572 * target.h: Include mem-break.h.
7573 (struct target_ops) <prepare_to_access_memory>: Update comment.
7574 <supports_z_point_type>: New field.
7575 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7576 instead of a char. Also take a raw breakpoint pointer.
7577 * win32-arm-low.c (the_low_target): Install NULL as
7578 supports_z_point_type.
7579 * win32-i386-low.c (i386_supports_z_point_type): New function.
7580 (i386_insert_point, i386_remove_point): Adjust to new interface.
7581 (the_low_target): Install i386_supports_z_point_type.
7582 * win32-low.c (win32_supports_z_point_type): New function.
7583 (win32_insert_point, win32_remove_point): Adjust to new interface.
7584 (win32_target_ops): Install win32_supports_z_point_type.
7585 * win32-low.h (struct win32_target_ops):
7586 <supports_z_point_type>: New method.
7587 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7588 instead of a char. Also take a raw breakpoint pointer.
7589
932539e3
PA
75902014-05-20 Pedro Alves <palves@redhat.com>
7591
7592 * mem-break.h: Include break-common.h.
7593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7595 (Z_packet_to_target_hw_bp_type): New declaration.
7596 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7597 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7598 (Z_PACKET_ACCESS_WP): Delete macros.
7599 (Z_packet_to_hw_type): Delete function.
7600 * i386-low.h: Don't include break-common.h here.
7601 (Z_packet_to_hw_type): Delete declaration.
7602 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7603 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7604 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7605 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7606 * linux-aarch64-low.c: Don't include break-common.h here.
7607 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7608 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7609 (Z_packet_to_target_hw_bp_type): Delete function.
7610 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7611 function.
7612 (mips_insert_point, mips_remove_point): Use
7613 Z_packet_to_target_hw_bp_type.
7614
4ff0d3d8
PA
76152014-05-20 Pedro Alves <palves@redhat.com>
7616
7617 * linux-aarch64-low.c: Include break-common.h.
7618 (enum target_point_type): Delete.
7619 (Z_packet_to_point_type): Rename to ...
7620 (Z_packet_to_target_hw_bp_type): ... this, and return a
7621 target_hw_bp_type instead.
7622 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7623 instead of an enum target_point_type.
7624 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7625 breakpoint type.
7626 (aarch64_dr_state_insert_one_point)
7627 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7628 (aarch64_handle_aligned_watchpoint)
7629 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7630 Take an enum target_hw_bp_type instead of an enum
7631 target_point_type.
7632 (aarch64_supports_z_point_type): New function.
7633 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7634 use Z_packet_to_target_hw_bp_type.
7635
786dc519
JB
76362014-05-20 Joel Brobecker <brobecker@adacore.com>
7637
7638 * configure.ac: Only use -Werror by default when DEVELOPMENT
7639 is true.
7640 * configure: Regenerate.
7641
9e0aa64f
JK
76422014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7643
7644 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7645 * linux-x86-low.c (X86_64_USER_REGS): New.
7646 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7647
2b577b92
YQ
76482014-04-28 Yao Qi <yao@codesourcery.com>
7649
7650 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7651 name.
7652
94611da2
PA
76532014-04-25 Pedro Alves <palves@redhat.com>
7654
7655 PR server/16255
7656 * linux-low.c (linux_attach_fail_reason_string): New function.
7657 (linux_attach_lwp): Delete.
7658 (linux_attach_lwp_1): Rename to ...
7659 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7660 argument. Remove "initial" parameter. Return int instead of
7661 void. Don't error or warn here.
7662 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7663 failure to attach to the tgid. Call warning when failing to
7664 attach to an lwp.
7665 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7666 argument. Remove "initial" parameter. Return int instead of
7667 void. Don't error or warn here.
7668 (linux_attach_fail_reason_string): New declaration.
7669 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7670 interface change. Use linux_attach_fail_reason_string.
7671
01f9f808
MS
76722014-04-24 Michael Sturm <michael.sturm@mintel.com>
7673 Walfred Tedeschi <walfred.tedeschi@intel.com>
7674
7675 * Makefile.in: Added rules to handle new files
7676 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7677 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7678 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7679 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7680 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7681 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7682 x32-avx512-linux.o.
7683 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7684 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7685 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7686 i386/x32-avx512.xml.
7687 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7688 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7689 i386/x32-avx512-linux.xml.
7690 * i387-fp.c (num_avx512_k_registers): New constant for number
7691 of K registers.
7692 (num_avx512_zmmh_low_registers): New constant for number of
7693 lower ZMM registers (0-15).
7694 (num_avx512_zmmh_high_registers): New constant for number of
7695 higher ZMM registers (16-31).
7696 (num_avx512_ymmh_registers): New contant for number of higher
7697 YMM registers (ymm16-31 added by avx521 on x86_64).
7698 (num_avx512_xmm_registers): New constant for number of higher
7699 XMM registers (xmm16-31 added by AVX512 on x86_64).
7700 (struct i387_xsave): Add space for AVX512 registers.
7701 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7702 Add code to handle AVX512 registers.
7703 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7704 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7705 prototypei from generated file.
7706 (tdesc_amd64_avx512_linux): Likewise.
7707 (init_registers_x32_avx512_linux): Likewise.
7708 (tdesc_x32_avx512_linux): Likewise.
7709 (init_registers_i386_avx512_linux): Likewise.
7710 (tdesc_i386_avx512_linux): Likewise.
7711 (x86_64_regmap): Add AVX512 registers.
7712 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7713 mask.
7714 (initialize_low_arch): Add code to initialize AVX512 registers.
7715
51aa91f9
PA
77162014-04-23 Pedro Alves <palves@redhat.com>
7717
7718 * mem-break.c (find_gdb_breakpoint_at): Make static.
7719 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7720
a4165e94
PA
77212014-04-23 Pedro Alves <palves@redhat.com>
7722
7723 * i386-low.c: Don't include break-common.h here.
7724 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7725 prototype to take target_hw_bp_type as argument instead of a Z
7726 packet char.
7727 * i386-low.h: Include break-common.h here.
7728 (Z_packet_to_hw_type): Declare.
7729 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7730 prototypes.
7731 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7732 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7733 (x86_remove_point): Convert the packet number to a
7734 target_hw_bp_type before calling i386_low_remove_watchpoint.
7735 * win32-i386-low.c (i386_insert_point): Convert the packet number
7736 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7737 (i386_remove_point): Convert the packet number to a
7738 target_hw_bp_type before calling i386_low_remove_watchpoint.
7739
b8acf843
PA
77402014-04-23 Pedro Alves <palves@redhat.com>
7741
7742 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7743
d708bcd1
PA
77442014-04-10 Pedro Alves <palves@redhat.com>
7745
7746 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7747 Check if the condition or command is NULL before checking if the
7748 breakpoint is known. On success, return true.
7749 * mem-break.h (add_breakpoint_condition): Document return.
7750 (add_breakpoint_commands): Add describing comment.
7751 * server.c (skip_to_semicolon): New function.
7752 (process_point_options): Use it.
7753
2eec7d5b
PA
77542014-04-09 Pedro Alves <palves@redhat.com>
7755
7756 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7757 to lwpid_of.
7758
fa96cb38
PA
77592014-02-27 Pedro Alves <palves@redhat.com>
7760
7761 PR 12702
7762 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7763 macros.
7764 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7765 output.
7766 (last_thread_of_process_p): Take a PID argument instead of a
7767 thread pointer.
7768 (linux_wait_for_lwp): Delete.
7769 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7770 functions.
7771 (linux_low_filter_event): New function, party factored out from
7772 linux_wait_for_event.
7773 (linux_wait_for_event): Rename to ...
7774 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7775 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7776 sigsuspend. Check for zombie leaders.
7777 (linux_wait_for_event): Reimplement as wrapper around
7778 linux_wait_for_event_filtered.
7779 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7780 a normal or signal exit is seen, it's the whole process exiting.
7781 (wait_for_sigstop): No longer a for_each_inferior callback.
7782 Rewrite on top of linux_wait_for_event_filtered.
7783 (stop_all_lwps): Call wait_for_sigstop directly.
7784 * server.c (resume, handle_target_event): Handle
7785 TARGET_WAITKIND_NO_RESUMED.
7786
d763de10
JB
77872014-02-26 Joel Brobecker <brobecker@adacore.com>
7788
7789 * win32-low.c (psapi_get_dll_name,
7790 * win32_CreateToolhelp32Snapshot): Delete.
7791 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7792 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7793 Delete.
7794 (handle_load_dll): Add function description.
7795 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7796
850a0f76
JB
77972014-02-26 Joel Brobecker <brobecker@adacore.com>
7798
7799 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7800 Add comment.
7801 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7802 base address when calling win32_add_one_solib.
7803 (handle_load_dll): Delete local variable load_addr.
7804 Remove 0x1000 offset applied to DLL base address when calling
7805 win32_add_one_solib.
7806 (handle_unload_dll): Add comment.
7807
f25b3fc3
JB
78082014-02-26 Joel Brobecker <brobecker@adacore.com>
7809
7810 * win32-low.c (win32_add_all_dlls): Renames
7811 win32_ensure_ntdll_loaded. Rewrite function documentation.
7812 Adjust implementation to always load all DLLs.
7813 Add 0x1000 offset to DLL base address when calling
7814 win32_add_one_solib.
7815 (child_initialization_done): New static global.
7816 (do_initial_child_stuff): Set child_initialization_done to
7817 zero during child initialization, and 1 after. Replace call
7818 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7819 Add comment.
7820 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7821 (handle_unload_dll): Add function documentation.
7822 (get_child_debug_event): Ignore load and unload DLL events
7823 during child initialization.
7824
d86d4aaf
DE
78252014-02-20 Doug Evans <dje@google.com>
7826
3bc32da3 7827 Remove global all_lwps.
d86d4aaf
DE
7828 * inferiors.h (ptid_of): Move here from linux-low.h.
7829 (pid_of, lwpid_of): Ditto.
7830 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7831 parameter is a struct thread_info * now.
7832 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7833 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7834 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7835 directly.
7836 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7837 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7838 * linux-arm-low.c (update_registers_callback): Update, "entry"
7839 parameter is a struct thread_info * now.
7840 Fetch lwpid from current_inferior directly.
7841 (arm_insert_point): Pass &all_threads to find_inferior instead of
7842 &all_lwps.
7843 (arm_remove_point): Ditto.
7844 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7845 (arm_prepare_to_resume): Fetch pid from thread.
7846 (arm_read_description): Fetch lwpid from current_inferior directly.
7847 * linux-low.c (all_lwps): Delete.
7848 (delete_lwp): Delete call to remove_inferior.
7849 (handle_extended_wait): Fetch lwpid from thread.
7850 (add_lwp): Don't set lwp->entry.id. Remove call to
7851 add_inferior_to_list.
7852 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7853 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7854 (kill_one_lwp_callback): Ditto.
7855 (linux_kill): Don't dereference NULL pointer.
7856 Fetch ptid,lwpid from thread.
7857 (get_detach_signal): Fetch ptid from thread.
7858 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7859 Simplify call to regcache_invalidate_thread.
7860 (delete_lwp_callback): Update, "entry" parameter is a
7861 struct thread_info * now. Fetch pid from thread.
7862 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7863 (status_pending_p_callback): Update, "entry" parameter is a
7864 struct thread_info * now. Fetch ptid from thread.
7865 (find_lwp_pid): Update, "entry" parameter is a
7866 struct thread_info * now.
7867 (linux_wait_for_lwp): Fetch pid from thread.
7868 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7869 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7870 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7871 (dequeue_one_deferred_signal): Ditto.
7872 (cancel_breakpoint): Fetch ptid from current_inferior.
7873 (linux_wait_for_event): Pass &all_threads to find_inferior,
7874 not &all_lwps. Fetch ptid, lwpid from thread.
7875 (count_events_callback): Update, "entry" parameter is a
7876 struct thread_info * now.
7877 (select_singlestep_lwp_callback): Ditto.
7878 (select_event_lwp_callback): Ditto.
7879 (cancel_breakpoints_callback): Ditto.
7880 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7881 not &all_lwps.
7882 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7883 (unsuspend_one_lwp): Update, "entry" parameter is a
7884 struct thread_info * now.
7885 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7886 not &all_lwps.
7887 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7888 Fetch lwpid from thread, not lwp.
7889 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7890 Pass &all_threads to find_inferior, not &all_lwps.
7891 (send_sigstop): Fetch lwpid from thread, not lwp.
7892 (send_sigstop_callback): Update, "entry" parameter is a
7893 struct thread_info * now.
7894 (suspend_and_send_sigstop_callback): Ditto.
7895 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7896 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7897 struct thread_info * now.
7898 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7899 from thread, lwp.
7900 (lwp_running): Update, "entry" parameter is a
7901 struct thread_info * now.
7902 (stop_all_lwps): Fetch ptid from thread.
7903 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7904 (linux_resume_one_lwp): Fetch lwpid from thread.
7905 (linux_set_resume_request): Update, "entry" parameter is a
7906 struct thread_info * now. Fetch pid, lwpid from thread.
7907 (resume_status_pending_p): Update, "entry" parameter is a
7908 struct thread_info * now.
7909 (need_step_over_p): Ditto. Fetch lwpid from thread.
7910 (start_step_over): Fetch lwpid from thread.
7911 (linux_resume_one_thread): Update, "entry" parameter is a
7912 struct thread_info * now. Fetch lwpid from thread.
7913 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7914 (proceed_one_lwp): Update, "entry" parameter is a
7915 struct thread_info * now. Fetch lwpid from thread.
7916 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7917 struct thread_info * now.
7918 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7919 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7920 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7921 directly.
7922 (regsets_store_inferior_registers): Ditto.
7923 (fetch_register, store_register): Ditto.
7924 (linux_read_memory, linux_write_memory): Ditto.
7925 (linux_request_interrupt): Ditto.
7926 (linux_read_auxv): Ditto.
7927 (linux_xfer_siginfo): Ditto.
7928 (linux_qxfer_spu): Ditto.
7929 (linux_qxfer_libraries_svr4): Ditto.
7930 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7931 moved to inferiors.h.
7932 (get_lwp): Delete.
7933 (get_thread_lwp): Update.
7934 (struct lwp_info): Delete member "entry". Simplify comment for
7935 member "thread".
7936 (all_lwps): Delete.
7937 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7938 current_inferior directly.
7939 (update_watch_registers_callback): Update, "entry" parameter is a
7940 struct thread_info * now. Fetch pid from thread.
7941 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7942 (mips_insert_point): Fetch lwpid from current_inferior.
7943 Pass &all_threads to find_inferior, not &all_lwps.
7944 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7945 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7946 directly.
7947 (mips_stopped_data_address): Ditto.
7948 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7949 directly.
7950 * linux-tile-low.c (tile_arch_setup): Ditto.
7951 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7952 (update_debug_registers_callback): Update, "entry" parameter is a
7953 struct thread_info * now. Fetch pid from thread.
7954 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7955 Pass &all_threads to find_inferior, not &all_lwps.
7956 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7957 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7958 Pass &all_threads to find_inferior, not &all_lwps.
7959 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7960 (i386_dr_low_get_status): Ditto.
7961 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7962 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7963 (x86_linux_read_description): Ditto.
7964 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7965
3b8361aa
DE
79662014-02-20 Doug Evans <dje@google.com>
7967
7968 * inferiors.c (get_first_inferior): Fix buglet.
7969
f7667f0d
DE
79702014-02-19 Doug Evans <dje@google.com>
7971
7972 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7973 * inferiors.c (add_thread): Change result type to struct thread_info *.
7974 All callers updated.
7975 (add_lwp): Call add_thread here instead of in callers.
7976 All callers updated.
7977 * linux-low.h (get_lwp_thread): Rewrite.
7978 (struct lwp_info): New member "thread".
7979
b3312d80
DE
79802014-02-19 Doug Evans <dje@google.com>
7981
7982 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7983 All callers updated.
7984
ecc6f45c
DE
79852014-02-19 Doug Evans <dje@google.com>
7986
7987 * inferiors.c (add_thread): Fix whitespace.
7988
649ebbca
DE
79892014-02-19 Doug Evans <dje@google.com>
7990
7991 * dll.c (clear_dlls): Replace accessing list implemention details
7992 with API function.
7993 * gdbthread.h (get_first_thread): Declare.
7994 * inferiors.c (for_each_inferior_with_data): New function.
7995 (get_first_thread): New function.
7996 (find_thread_ptid): Simplify.
7997 (get_first_inferior): New function.
7998 (clear_list): Delete.
7999 (one_inferior_p): New function.
8000 (clear_inferior_list): New function.
8001 (clear_inferiors): Update.
8002 * inferiors.h (for_each_inferior_with_data): Declare.
8003 (clear_inferior_list): Declare.
8004 (one_inferior_p): Declare.
8005 (get_first_inferior): Declare.
8006 * linux-low.c (linux_wait_for_event): Replace accessing list
8007 implemention details with API function.
8008 * server.c (target_running): Ditto.
8009 (accumulate_file_name_length): New function.
8010 (emit_dll_description): New function.
8011 (handle_qxfer_libraries): Replace accessing list implemention
8012 details with API function.
8013 (handle_qxfer_threads_worker): New function.
8014 (handle_qxfer_threads_proper): Replace accessing list implemention
8015 details with API function.
8016 (handle_query): Ditto.
8017 (visit_actioned_threads_callback_ftype): New typedef.
8018 (visit_actioned_threads_data): New struct.
8019 (visit_actioned_threads): Rewrite to be find_inferior callback.
8020 (resume): Call find_inferior.
8021 (handle_status): Replace accessing list implemention
8022 details with API function.
8023 (process_serial_event): Replace accessing list implemention details
8024 with API function.
8025 * target.c (set_desired_inferior): Replace accessing list implemention
8026 details with API function.
8027 * tracepoint.c (same_process_p): New function.
8028 (gdb_agent_about_to_close): Replace accessing list implemention
8029 details with API function.
8030 * win32-low.c (child_delete_thread): Replace accessing list
8031 implemention details with API function.
8032 (match_dll_by_basename): New function.
8033 (dll_is_loaded_by_basename): New function.
8034 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8035 details call to dll_is_loaded_by_basename.
8036
80894984
DE
80372014-02-19 Doug Evans <dje@google.com>
8038
8039 * dll.h (struct dll_info): Add comment.
8040 * gdbthread.h (struct thread_info): Add comment.
8041 (current_ptid): Simplify.
8042 * inferiors.c (add_process): Update.
8043 (remove_process): Update.
8044 * inferiors.h (struct process_info): Rename member "head" to "entry".
8045 * linux-low.c (delete_lwp): Update.
8046 (add_lwp): Update.
8047 (last_thread_of_process_p): Update.
8048 (kill_one_lwp_callback, linux_kill): Update.
8049 (status_pending_p_callback): Update.
8050 (wait_for_sigstop): Update. Simplify read of ptid.
8051 (start_step_over): Update.
8052 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8053 (get_lwp_thread): Update.
8054 (struct lwp_info): Rename member "head" to "entry".
8055 * regcache.h (inferior_list_entry): Delete.
8056 * server.c (kill_inferior_callback): Update.
8057 (detach_or_kill_inferior_callback): Update.
8058 (print_started_pid): Update.
8059 (print_attached_pid): Update.
8060 (process_serial_event): Simplify read of ptid.
8061 * thread-db.c (thread_db_create_event): Update.
8062 (thread_db_get_tls_address): Update.
8063 * win32-low.c (current_inferior_ptid): Simplify.
8064
46917d26
TT
80652014-02-19 Tom Tromey <tromey@redhat.com>
8066
8067 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8068 argument.
8069 (target_supports_btrace): Update.
8070
0759a81e
YQ
80712014-02-14 Yao Qi <yao@codesourcery.com>
8072
8073 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8074 (rsp-low-ipa.o): New target.
8075
a7191e8b
TT
80762014-02-12 Tom Tromey <tromey@redhat.com>
8077
8078 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8079 convert_ascii_to_int.
8080 * regcache.c (registers_to_string): Likewise.
8081 * remote-utils.c (decode_M_packet): Likewise.
8082 * server.c (process_serial_event): Likewise.
8083
ff0e980e
TT
80842014-02-12 Tom Tromey <tromey@redhat.com>
8085
8086 * server.c (handle_query, handle_v_run): Use hex2bin, not
8087 unhexify.
8088 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8089
e9371aff
TT
80902014-02-12 Tom Tromey <tromey@redhat.com>
8091
8092 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8093 convert_int_to_ascii.
8094 * regcache.c (registers_to_string, collect_register_as_string):
8095 Likewise.
8096 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8097 Likewise.
8098 * server.c (process_serial_event): Likewise.
8099 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8100 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8101
971dc0b8
TT
81022014-02-12 Tom Tromey <tromey@redhat.com>
8103
8104 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8105 bin2hex, not hexify.
8106 * tracepoint.c (cmd_qtstatus): Likewise.
8107
0a822afb
TT
81082014-02-12 Tom Tromey <tromey@redhat.com>
8109
8110 * remote-utils.c (monitor_output): Pass explicit length to
8111 hexify.
8112
9c3d6531
TT
81132014-02-12 Tom Tromey <tromey@redhat.com>
8114
8115 * tracepoint.c: Include rsp-low.h.
8116 * server.c: Include rsp-low.h.
8117 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8118 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8119 declare.
8120 * remote-utils.c: Include rsp-low.h.
8121 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8122 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8123 (convert_int_to_ascii, convert_ascii_to_int): Move to
8124 common/rsp-low.c.
8125 * regcache.c: Include rsp-low.h.
8126 * ax.c: Include rsp-low.h.
8127 * Makefile.in (SFILES): Add common/rsp-low.c.
8128 (OBS): Add rsp-low.o.
8129 (rsp-low.o): New target.
8130
01fd3ea5
TT
81312014-02-12 Tom Tromey <tromey@redhat.com>
8132
8133 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8134 Include print-utils.h.
8135 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8136 (plongest, thirty_two, phex_nz): Remove.
8137 * Makefile.in (SFILES): Add common/print-utils.c.
8138 (OBS): Add print-utils.o.
8139 (print-utils-ipa.o): New target.
8140 (print-utils.o): New target.
8141 (IPA_OBJS): Add print-utils-ipa.o.
8142
e99dc820
TT
81432014-02-06 Tom Tromey <tromey@redhat.com>
8144
8145 * Makefile.in (SFILES): Fix indentation.
8146
ee1e2d4f
DE
81472014-02-05 Doug Evans <dje@google.com>
8148
8149 * linux-low.c (linux_wait_for_event): Improve comment.
8150 (linux_wait_1): Keep current_inferior in sync with event_child.
8151
f5a02773
DE
81522014-01-22 Doug Evans <dje@google.com>
8153
8154 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8155
87ce2a04
DE
81562014-01-22 Doug Evans <dje@google.com>
8157
8158 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8159 * configure: Regenerate.
8160 * config.in: Regenerate.
8161 * Makefile.in (SFILES): Add debug.c.
8162 (OBS): Add debug.o.
8163 * debug.c: New file.
8164 * debug.h: New file.
8165 * linux-aarch64-low.c (*): Update all debugging printfs to use
8166 debug_printf instead of fprintf.
8167 * linux-arm-low.c (*): Ditto.
8168 * linux-cris-low.c (*): Ditto.
8169 * linux-crisv32-low.c (*): Ditto.
8170 * linux-m32r-low.c (*): Ditto.
8171 * linux-sparc-low.c (*): Ditto.
8172 * linux-x86.c (*): Ditto.
8173 * linux-low.c (*): Ditto.
8174 (linux_wait_1): Add calls to debug_enter, debug_exit.
8175 (linux_wait): Remove redundant debugging printf.
8176 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8177 (linux_resume, unstop_all_lwps): Ditto.
8178 * mem-break.c (*): Update all debugging printfs to use
8179 debug_printf instead of fprintf.
8180 * remote-utils.c (*): Ditto.
8181 * thread-db.c (*): Ditto.
8182 * server.c #include <ctype.h>, "gdb_vecs.h".
8183 (debug_threads): Moved to debug.c.
8184 (*): Update all debugging printfs to use debug_printf instead of
8185 fprintf.
8186 (start_inferior): Replace call to fflush with call to debug_flush.
8187 (monitor_show_help): Mention set debug-format.
8188 (parse_debug_format_options): New function.
8189 (handle_monitor_command): Handle "monitor set debug-format".
8190 (gdbserver_usage): Mention --debug-format.
8191 (main): Parse --debug-format.
8192 * server.h (debug_threads): Declaration moved to debug.h.
8193 #include "debug.h".
8194 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8195 trace_debug_1 that uses debug_printf.
8196 (tracepoint_look_up_symbols): Update all debugging printfs to use
8197 debug_printf instead of fprintf.
8198
e671835b
BS
81992014-01-20 Baruch Siach <baruch@tkos.co.il>
8200
8201 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8202 sys/ptrace.h.
8203
b5737fa9
PA
82042014-01-17 Pedro Alves <palves@redhat.com>
8205
ea38d2a9 8206 PR build/16445
c7faa97a
PA
8207 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8208 defined after including gdb_proc_service.h.
b5737fa9 8209
40ed484e
DE
82102014-01-16 Doug Evans <dje@google.com>
8211
8212 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8213 (match_dll): Use it.
8214
969c39fb
MM
82152014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8216
8217 * target.h (target_ops) <read_btrace>: Change parameters and
8218 return type to allow error reporting.
8219 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8220 trace reading errors on.
8221 * linux-low.c (linux_low_read_btrace): Pass trace reading
8222 errors on.
8223 (linux_low_disable_btrace): New.
8224
ab7f45ba
DE
82252014-01-15 Doug Evans <dje@google.com>
8226
8227 * inferiors.c (thread_id_to_gdb_id): Delete.
8228 * inferiors.h (thread_id_to_gdb_id): Delete.
8229
66af0f44
EZ
82302014-01-13 Eli Zaretskii <eliz@gnu.org>
8231
8232 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8233 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8234 versions.
8235
9939e131
PA
82362014-01-08 Pedro Alves <palves@redhat.com>
8237
8238 * server.c (handle_status): Don't discard previous queued stop
8239 replies or thread's pending status here.
8240 (main) <disconnection>: Do it here instead.
8241
b7ea362b
PA
82422014-01-08 Pedro Alves <palves@redhat.com>
8243
8244 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8245 * server.c (visit_actioned_threads, handle_pending_status): New
8246 function.
8247 (handle_v_cont): Factor out parts to ...
8248 (resume): ... this new function. If in all-stop, and a thread
8249 being resumed has a pending status, report it without actually
8250 resuming.
8251 (myresume): Adjust to use the new 'resume' function.
8252 (clear_pending_status_callback, set_pending_status_callback)
8253 (find_status_pending_thread_callback): New functions.
8254 (handle_status): Handle the case of multiple threads having
8255 interesting statuses to report. Report threads' real last signal
8256 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8257 with an interesting thread to report the status for, instead of
8258 always reporting the status of the first thread.
8259
28498c42
JB
82602014-01-01 Joel Brobecker <brobecker@adacore.com>
8261
8262 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8263 * gdbreplay.c (gdbreplay_version): Likewise.
8264
f45c82da
YZ
82652013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8266
8267 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8268 iov.iov_len with the real length in use.
8269
379a5e2d
JB
82702013-12-13 Joel Brobecker <brobecker@adacore.com>
8271
8272 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8273 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8274 for all targets that use win32-low.c.
8275 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8276 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8277
4210d83e
PA
82782013-12-13 Pedro Alves <palves@redhat.com>
8279
8280 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8281 if equal to TARGET_WAITKIND_LOADED.
8282 * win32-low.c (cached_status): New static global.
8283 (win32_wait): Add declaration.
8284 (do_initial_child_stuff): Flush all initial pending debug events
8285 up to the initial breakpoint.
8286 (win32_wait): If CACHED_STATUS was set, return that instead
8287 of doing a real wait. Remove the code resuming the execution
8288 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8289 during the initial phase. Also remove the code changing
8290 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8291 TARGET_WAITKIND_STOPPED.
8292
e7f0d979
YQ
82932013-12-11 Yao Qi <yao@codesourcery.com>
8294
8295 * notif.c (handle_notif_ack): Return 0 if no notification
8296 matches.
8297
ebcf782c
DE
82982013-11-20 Doug Evans <dje@google.com>
8299
8300 * linux-low.c (linux_set_resume_request): Fix comment.
8301
20ad9378
DE
83022013-11-20 Doug Evans <dje@google.com>
8303
8304 * linux-low.c (resume_status_pending_p): Tweak comment.
8305
a196ebeb
WT
83062013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8307
8308 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8309 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8310 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8311 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8312 (srv_amd64_regobj): Add amd64-mpx.o.
8313 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8314 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8315 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8316 * i387-fp.c (num_pl_bnd_register) Added constant.
8317 (num_pl_bnd_cfg_registers) Added constant.
8318 (struct i387_xsave) Added reserved area and MPX fields.
8319 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8320 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8321 function.
8322 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8323 (init_registers_amd64_mpx_linux): Declare new function.
8324 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8325 (x86_64_regmap): Add MPX registers.
8326 (x86_linux_read_description): Add MPX case.
8327 (initialize_low_arch): Initialize MPX targets.
8328
0080a2f6
TT
83292013-11-18 Tom Tromey <tromey@redhat.com>
8330
8331 * configure: Rebuild.
8332 * configure.ac: Don't check for stdlib.h.
8333 * gdbreplay.c: Unconditionally include stdlib.h.
8334
2978b111
TT
83352013-11-18 Tom Tromey <tromey@redhat.com>
8336
8337 * config.in: Rebuild.
8338 * configure: Rebuild.
8339 * configure.ac: Don't use AC_HEADER_DIRENT.
8340
a3d08894
TT
83412013-11-18 Tom Tromey <tromey@redhat.com>
8342
8343 * server.h: Don't check HAVE_STRING_H.
8344 * gdbreplay.c: Don't check HAVE_STRING_H.
8345 * configure: Rebuild.
8346
0a5dd17d
TT
83472013-11-18 Tom Tromey <tromey@redhat.com>
8348
8349 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8350 LIBGNU.
8351
1bd2f0ba
TT
83522013-11-08 Tom Tromey <tromey@redhat.com>
8353
8354 * configure, config.in: Rebuild.
8355 * configure.ac: Remove unused configury.
8356
3266f10b
TT
83572013-11-08 Tom Tromey <tromey@redhat.com>
8358
8359 * acinclude.m4: Include common.m4, codeset.m4.
8360 * configure, config.in: Rebuild.
8361 * configure.ac: Use GDB_AC_COMMON.
8362
6682d959
AA
83632013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8364
8365 * linux-s390-low.c (HWCAP_S390_TE): New define.
8366 (s390_arch_setup): Consider the TE field in the HWCAP for
8367 determining 'have_regset_tdb'.
8368
fd0a4d76
SDJ
83692013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8370
8371 PR gdb/16014
8372 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8373 call to sizeof.
8374
1a3d890b
PA
83752013-10-02 Pedro Alves <palves@redhat.com>
8376
8377 * server.c (process_serial_event): Don't output "GDBserver
8378 exiting" if GDB is connected through stdio.
8379 * target.c (mywait): Likewise, be silent if GDB is connected
8380 through stdio.
8381
97ad4581
JB
83822013-10-01 Joel Brobecker <brobecker@adacore.com>
8383
8384 * lynx-low.c (lynx_add_threads_after_attach): New function.
8385 (lynx_attach): Remove call to add_thread. Add call to
8386 lynx_add_threads_after_attach instead.
8387
5b4e221c
MF
83882013-09-28 Mike Frysinger <vapier@gentoo.org>
8389
8390 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8391 * config.in, configure: Regenerated.
8392
ee47b2f8
YQ
83932013-09-18 Yao Qi <yao@codesourcery.com>
8394
8395 PR server/15959
8396 * server.c (start_inferior): Clear 'resume_info'.
8397
d6707650 83982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8399
d6707650
JW
8400 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8401 for each register.
8402
9243dd0e 84032013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8404
9243dd0e
JW
8405 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8406 linux-tile-low.o to srv_tgtobj.
8407
c623a6ef
WN
84082013-09-16 Will Newton <will.newton@linaro.org>
8409
8410 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8411 out regs.
8412
fb71d39e
PA
84132013-09-06 Pedro Alves <palves@redhat.com>
8414
8415 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8416 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8417 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8418 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8419 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8420 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8421
8e7e9910
PA
84222013-09-06 Pedro Alves <palves@redhat.com>
8423
8424 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8425 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8426
7c3a12ca
PA
84272013-09-06 Pedro Alves <palves@redhat.com>
8428
8429 * linux-amd64-ipa.c: Include tracepoint.h.
8430 * linux-i386-ipa.c: Include tracepoint.h.
8431
8eb3d7b6
RW
84322013-09-06 Ricard Wanderlof <ricardw@axis.com>
8433
8434 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8435 (ps_get_thread_area): New function.
8436
eddddb9d
RW
84372013-09-06 Ricard Wanderlof <ricardw@axis.com>
8438
8439 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8440 (initialize_low_arch): Call init_registers_crisv32 rather than
8441 init_register_crisv32.
8442
533b0600
PA
84432013-09-05 Pedro Alves <palves@redhat.com>
8444
8445 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8446 to ...
8447 * hostio.h: ... this new file.
8448 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8449 win32-low.c: Include hostio.h.
8450
0ce3d3b5
PA
84512013-09-05 Pedro Alves <palves@redhat.com>
8452
8453 * server.h (gdb_client_data, handler_func, callback_handler_func)
8454 (delete_file_handler, add_file_handler, append_callback_event)
8455 (delete_callback_event, start_event_loop, initialize_event_loop):
8456 Move to event-loop.h and include it.
8457 * event-loop.h: New file.
8458
799cdc37
PA
84592013-09-05 Pedro Alves <palves@redhat.com>
8460
8461 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8462 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8463 (loaded_dll, unloaded_dll): Move to ...
8464 * dll.h: ... this new file.
8465 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8466
6a6bbd9d
PA
84672013-09-05 Pedro Alves <palves@redhat.com>
8468
8469 * server.h (current_process, get_thread_process, all_processes)
8470 (add_inferior_to_list, for_each_inferior, current_inferior)
8471 (remove_inferior, add_process, remove_process, find_process_pid)
8472 (have_started_inferiors_p, have_attached_inferiors_p)
8473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8474 (clear_inferiors, find_inferior, find_inferior_id)
8475 (inferior_target_data, set_inferior_target_data)
8476 (inferior_regcache_data, set_inferior_regcache_data): Move to
8477 inferiors.h, and include it.
8478 * inferiors.h: New file.
8479
f699aaba
PA
84802013-09-05 Pedro Alves <palves@redhat.com>
8481
8482 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8483 Move ...
72f4393d 8484 * ax.h: ... here.
f699aaba 8485
c144c7a0
PA
84862013-09-05 Pedro Alves <palves@redhat.com>
8487
8488 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8489 tracepoint.h.
8490 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8491 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8492 (handle_tracepoint_general_set, handle_tracepoint_query)
8493 (tracepoint_finished_step, tracepoint_was_hit)
8494 (release_while_stepping_state_list, current_traceframe)
8495 (in_readonly_region, traceframe_read_mem)
8496 (fetch_traceframe_registers, traceframe_read_sdata)
8497 (traceframe_read_info, struct fast_tpoint_collect_status)
8498 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8499 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8500 (supply_fast_tracepoint_registers)
8501 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8502 (ipa_tdesc, claim_trampoline_space)
8503 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8504 (agent_mem_read, agent_get_trace_state_variable_value)
8505 (agent_set_trace_state_variable_value, agent_tsv_read)
8506 (agent_mem_read_string, get_raw_reg_func_addr)
8507 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8508 * tracepoint.h: ... this new file.
8509
ff42e6ab
PA
85102013-09-05 Pedro Alves <palves@redhat.com>
8511
8512 * server.h (perror_with_name, error, fatal, warning, paddress)
8513 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8514 include it.
8515 * utils.h: New file.
8516
541af0f4
PA
85172013-09-05 Pedro Alves <palves@redhat.com>
8518
8519 * server.h (remote_debug, noack_mode, transport_is_reliable)
8520 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8521 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8522 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8523 (write_enn, initialize_async_io, enable_async_io)
8524 (disable_async_io, check_remote_input_interrupt_request)
8525 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8526 (dead_thread_notify, prepare_resume_reply)
8527 (decode_address_to_semicolon, decode_address, decode_m_packet)
8528 (decode_M_packet, decode_X_packet, decode_xfer_write)
8529 (decode_search_memory_packet, unhexify, hexify)
8530 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8531 (look_up_one_symbol, relocate_instruction)
8532 (monitor_output): Move to remote-utils.h, and include it.
8533 * remote-utils.h: New file.
8534
eebdf26b
PA
85352013-09-05 Pedro Alves <palves@redhat.com>
8536
8537 * server.h (_): Delete.
8538
3aafd2ff
PA
85392013-09-02 Pedro Alves <palves@redhat.com>
8540
8541 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8542 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8543 allocated.
8544 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8545
cee83bcb
PM
85462013-09-02 Pierre Muller <muller@sourceware.org>
8547
8548 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8549 or WriteProcessMemory complete successfully and handle
8550 ERROR_PARTIAL_COPY error.
8551
9a13b2fa
PA
85522013-09-02 Pedro Alves <palves@redhat.com>
8553
8554 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8555 error instead of EIO.
8556
602e3198
JK
85572013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8558
8559 PR server/15604
8560 * linux-low.c: Include filestuff.h.
8561 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8562 * lynx-low.c: Include filestuff.h.
8563 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8564 * server.c: Include filestuff.h.
8565 (main): Call notice_open_fds.
8566 * spu-low.c: Include filestuff.h.
8567 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8568
96d7229d
LM
85692013-08-22 Luis Machado <lgustavo@codesourcery.com>
8570
8571 * Makefile.in: Explain why ../target and ../nat are not
8572 listed as include file search paths.
8573 (linux-waitpid.o): New object file rule.
8574 * configure.srv (srv_native_linux_obj): New variable.
8575 Replace all occurrences of linux native object files with
8576 $srv_native_linux_obj.
8577 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8578 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8579 (linux_enable_event_reporting): Remove declaration.
8580 (my_waitpid): Moved to common/linux-waitpid.c.
8581 (linux_wait_for_event): Pass ptid when calling
8582 linux_enable_event_reporting.
8583 (linux_supports_tracefork_flag): Remove.
8584 (linux_enable_event_reporting): Likewise.
8585 (linux_tracefork_grandchild): Remove.
8586 (STACK_SIZE): Moved to common/linux-ptrace.c.
8587 (linux_tracefork_child): Remove.
8588 (linux_test_for_tracefork): Remove.
8589 (linux_look_up_symbols): Call linux_supports_traceclone.
8590 (initialize_low): Remove call to linux_test_for_tracefork.
8591 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8592 common/linux-ptrace.h.
8593 (PTRACE_TYPE_ARG4): Likewise.
8594 Include linux-ptrace.h.
8595
32940073
PA
85962013-08-21 Pedro Alves <palves@redhat.com>
8597
8598 * config.in: Renegerate.
8599
33b60d58 86002013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8601
33b60d58
LM
8602 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8603 (SFILES): Remove $(srcdir)/common/target-common.c and
8604 add $(srcdir)/target/waitstatus.c.
8605 (OBS): Remove target-common.o and add waitstatus.o.
8606 (server_h): Remove $(srcdir)/../common/target-common.h and
8607 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8608 and $(srcdir)/../target/waitstatus.h.
8609 (target-common.o): Remove.
8610 (waitstatus.o): New target object file.
8611 * target.h: Do not include target-common.h and
8612 include target/resume.h, target/wait.h and
8613 target/waitstatus.h.
8614
b8e1b30e
LM
86152013-08-13 Luis Machado <lgustavo@codesourcery.com>
8616
8617 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8618 to PTRACE_TYPE_ARG3.
8619 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8620 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8621 PTRACE_TYPE_ARG4.
8622 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8623 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8624
7a60ad40
YQ
86252013-07-27 Jie Zhang <jie@codesourcery.com>
8626 Daniel Jacobowitz <dan@codesourcery.com>
8627 Yao Qi <yao@codesourcery.com>
8628
8629 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8630 (mips-linux-watch.o): New rule.
8631 (mips_linux_watch_h): New variable.
8632 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8633 srv_tgtobj.
8634 * linux-mips-low.c: Include mips-linux-watch.h.
8635 (struct arch_process_info, struct arch_lwp_info): New.
8636 (update_watch_registers_callback): New function.
8637 (mips_linux_new_process, mips_linux_new_thread) New functions.
8638 (mips_linux_prepare_to_resume, mips_insert_point): New
8639 functions.
8640 (mips_remove_point, mips_stopped_by_watchpoint): New
8641 functions.
8642 (rsp_bp_type_to_target_hw_bp_type): New function.
8643 (mips_stopped_data_address): New function.
8644 (the_low_target): Add watchpoint support functions.
8645
de6f69ad
YQ
86462013-07-27 Yao Qi <yao@codesourcery.com>
8647
8648 * i386-low.c: Include break-common.h.
8649 (enum target_hw_bp_type): Remove.
8650
3360c0bf
LM
86512013-07-24 Luis Machado <lgustavo@codesourcery.com>
8652
8653 * Makefile.in (SFILES): /common/target-common.c.
8654 (OBS): Add target-common.o.
8655 (server_h): Add $(srcdir)/../common/target-common.h.
8656 (target-common.o): New target.
8657 * server.c (queue_stop_reply_callback): Free
8658 status string after use.
8659 * target.c (target_waitstatus_to_string): Remove.
8660 * target.h: Include target-common.h.
8661 (resume_kind): Likewise.
8662 (target_waitkind): Likewise.
8663 (target_waitstatus): Likewise.
8664 (TARGET_WNOHANG): Likewise.
8665
bd885420
YQ
86662013-07-04 Yao Qi <yao@codesourcery.com>
8667
8668 * Makefile.in (host_alias): Use @host_noncanonical@.
8669 (target_alias): Use @target_noncanonical@.
8670 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8671 ACX_NONCANONICAL_HOST.
8672 * configure: Regenerated.
8673
8674 Revert:
8675 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8676
8677 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8678 * configure: Rebuild.
8679 * Makefile.in (version_host, version_target): Get from configure.
8680 (version.c): Use $(version_host) and $(version_target).
8681
17ef446e
PA
86822013-07-03 Pedro Alves <palves@redhat.com>
8683
8684 * Makefile.in (config.status): Depend on development.sh.
8685 * acinclude.m4: Include libmcheck.m4.
8686 * configure: Regenerate.
8687
7a9a7487
MG
86882013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8689
8690 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8691 attribute inside the parentheses.
8692 (winapi_DebugSetProcessKillOnExit): Ditto.
8693 (winapi_DebugBreakProcess): Ditto.
8694 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8695
49b64de6
MG
86962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8697
8698 * notif.h (notif_event): Add a dummy member to avoid compiler
8699 errors.
8700
d5749ee7
PA
87012013-07-01 Pedro Alves <palves@redhat.com>
8702
8703 * hostio.c (HOSTIO_PATH_MAX): Define.
8704 (require_filename, handle_open, handle_unlink, handle_readlink):
8705 Use it.
8706
d8d2a3ee
PA
87072013-07-01 Pedro Alves <palves@redhat.com>
8708
8709 * server.h: Include "pathmax.h".
8710 * linux-low.c: Don't include sys/param.h.
8711 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8712 MAXPATHLEN.
8713 * win32-low.c: Don't include sys/param.h.
8714 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8715
bc7dea8d
PA
87162013-07-01 Pedro Alves <palves@redhat.com>
8717
8718 * event-loop.c: Don't check HAVE_UNISTD_H before including
8719 <unistd.h>.
8720 * gdbreplay.c: Likewise.
8721 * remote-utils.c: Likewise.
8722 * server.c: Likewise.
8723 * configure.ac: Don't check for unistd.h.
8724 * configure: Regenerate.
8725
d6c2da54
TT
87262013-06-28 Tom Tromey <tromey@redhat.com>
8727
8728 * Makefile.in (version.c): Use version.in, not
8729 common/version.in.
8730
257b6bec
MG
87312013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8732
8733 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8734 * configure: Rebuild.
8735 * Makefile.in (version_host, version_target): Get from configure.
8736 (version.c): Use $(version_host) and $(version_target).
8737
86ebe149
DK
87382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8739
8740 Fix trace-status to output user name without trailing colon.
8741 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8742
f30aa5af
DK
87432013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8744
8745 Fix trace-status to output proper start-time and stop-time.
8746 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8747 output start time and stop time in hex as gdb expects.
8748
28a93511
YQ
87492013-06-26 Pedro Alves <pedro@codesourcery.com>
8750
8751 * tracepoint.c (build_traceframe_info_xml): Output trace state
8752 variables present in the trace buffer.
8753
01208463
TT
87542013-06-24 Tom Tromey <tromey@redhat.com>
8755
8756 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8757 create-version.sh.
8758 (version.o): Remove.
8759 * gdbreplay.c: Include version.h.
8760 (version, host_name): Don't declare.
8761 * server.h: Include version.h.
8762 (version, host_name): Don't declare.
8763
760256f9
PA
87642013-06-12 Pedro Alves <palves@redhat.com>
8765
8766 * linux-x86-low.c (linux_is_elf64): Delete global.
8767 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8768 with local linux_pid_exe_is_elf_64_file use.
8769
030031ee
PA
87702013-06-11 Pedro Alves <palves@redhat.com>
8771
8772 * linux-low.c (regset_disabled, disable_regset): New functions.
8773 (regsets_fetch_inferior_registers)
8774 (regsets_store_inferior_registers): Use them.
8775 (initialize_regsets_info); Don't allocate the disabled_regsets
8776 array here.
8777 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8778 comment.
8779
5da6eb0a
PA
87802013-06-11 Pedro Alves <palves@redhat.com>
8781
8782 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8783 xmalloc.
8784
7e5aaa09
PA
87852013-06-11 Pedro Alves <palves@redhat.com>
8786
8787 * linux-x86-low.c (initialize_low_arch): Call
8788 init_registers_x32_avx_linux.
8789
d878444c
JK
87902013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8791
8792 Fix compatibility with Android Bionic.
8793 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8794 it is not empty.
8795
3aee8918
PA
87962013-06-07 Pedro Alves <palves@redhat.com>
8797
5f2b57b5 8798 PR server/14823
3aee8918
PA
8799 * Makefile.in (OBS): Add tdesc.o.
8800 (IPA_OBJS): Add tdesc-ipa.o.
8801 (tdesc-ipa.o): New rule.
8802 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8803 interface.
8804 * linux-low.c (new_inferior): Delete.
8805 (disabled_regsets, num_regsets): Delete.
8806 (linux_add_process): Adjust to set the new per-process
8807 new_inferior flag.
8808 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8809 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8810 was a stop. When calling arch_setup, switch the current inferior
8811 to the thread that got an event.
8812 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8813 (regsets_fetch_inferior_registers)
8814 (regsets_store_inferior_registers): New regsets_info parameter.
8815 Adjust to use it.
8816 (linux_register_in_regsets): New regs_info parameter. Adjust to
8817 use it.
8818 (register_addr, fetch_register, store_register): New usrregs_info
8819 parameter. Adjust to use it.
8820 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8821 parameter regs_info. Adjust to use it.
8822 (linux_fetch_registers): Get the current inferior's regs_info, and
8823 adjust to use it.
8824 (linux_store_registers): Ditto.
8825 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8826 (initialize_low): Don't initialize the target_regsets here. Call
8827 initialize_low_arch.
8828 * linux-low.h (target_regsets): Delete declaration.
8829 (struct regsets_info): New.
8830 (struct usrregs_info): New.
8831 (struct regs_info): New.
8832 (struct process_info_private) <new_inferior>: New field.
8833 (struct linux_target_ops): Delete the num_regs, regmap, and
8834 regset_bitmap fields. New field regs_info.
8835 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8836 * i387-fp.c (num_xmm_registers): Delete.
8837 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8838 calls to new interface.
8839 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8840 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8841 Infer the number of xmm registers from the regcache's target
8842 description.
8843 * i387-fp.h (num_xmm_registers): Delete.
8844 * inferiors.c (add_thread): Don't install the thread's regcache
8845 here.
8846 * proc-service.c (gregset_info): Fetch the current inferior's
8847 regs_info. Adjust to use it.
8848 * regcache.c: Include tdesc.h.
8849 (register_bytes, reg_defs, num_registers)
8850 (gdbserver_expedite_regs): Delete.
8851 (get_thread_regcache): If the thread doesn't have a regcache yet,
8852 create one, instead of aborting gdbserver.
8853 (regcache_invalidate_one): Rename to ...
8854 (regcache_invalidate_thread): ... this.
8855 (regcache_invalidate_one): New.
8856 (regcache_invalidate): Only invalidate registers of the current
8857 process.
8858 (init_register_cache): Add target_desc parameter, and use it.
8859 (new_register_cache): Ditto. Assert the target description has a
8860 non zero registers_size.
8861 (regcache_cpy): Add assertions. Adjust.
8862 (realloc_register_cache, set_register_cache): Delete.
8863 (registers_to_string, registers_from_string): Adjust.
8864 (find_register_by_name, find_regno, find_register_by_number)
8865 (register_cache_size): Add target_desc parameter, and use it.
8866 (free_register_cache_thread, free_register_cache_thread_one)
8867 (regcache_release, register_cache_size): New.
8868 (register_size): Add target_desc parameter, and use it.
8869 (register_data, supply_register, supply_register_zeroed)
8870 (supply_regblock, supply_register_by_name, collect_register)
8871 (collect_register_as_string, collect_register_by_name): Adjust.
8872 * regcache.h (struct target_desc): Forward declare.
8873 (struct regcache) <tdesc>: New field.
8874 (init_register_cache, new_register_cache): Add target_desc
8875 parameter.
8876 (regcache_invalidate_thread): Declare.
8877 (regcache_invalidate_one): Delete declaration.
8878 (regcache_release): Declare.
8879 (find_register_by_number, register_cache_size, register_size)
8880 (find_regno): Add target_desc parameter.
8881 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8882 declarations.
8883 * remote-utils.c: Include tdesc.h.
8884 (outreg, prepare_resume_reply): Adjust.
8885 * server.c: Include tdesc.h.
8886 (gdbserver_xmltarget): Delete declaration.
8887 (get_features_xml, process_serial_event): Adjust.
8888 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8889 declare.
8890 (struct process_info) <tdesc>: New field.
8891 (ipa_tdesc): Declare.
8892 * tdesc.c: New file.
8893 * tdesc.h: New file.
8894 * tracepoint.c: Include tdesc.h.
8895 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8896 (get_context_regcache): Adjust to pass ipa_tdesc down.
8897 (do_action_at_tracepoint): Adjust to get the register cache size
8898 from the context regcache's description.
8899 (traceframe_walk_blocks): Adjust to get the register cache size
8900 from the current trace frame's description.
8901 (traceframe_get_pc): Adjust to get current trace frame's
8902 description and pass it down.
8903 (gdb_collect): Adjust to get the register cache size from the
8904 IPA's description.
8905 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8906 (gdbserver_xmltarget): Delete.
8907 (initialize_low_tracepoint): Set the ipa's target description.
8908 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8909 (initialize_low_tracepoint): Set the ipa's target description.
8910 * linux-x86-low.c: Include tdesc.h.
8911 [__x86_64__] (is_64bit_tdesc): New.
8912 (ps_get_thread_area, x86_get_thread_area): Use it.
8913 (i386_cannot_store_register): Rename to ...
8914 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8915 (i386_cannot_fetch_register): Rename to ...
8916 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8917 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8918 to new interface.
8919 (target_regsets): Rename to ...
8920 (x86_regsets): ... this.
8921 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8922 interface.
8923 (x86_siginfo_fixup): Use is_64bit_tdesc.
8924 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8925 (tdesc_x32_avx_linux, tdesc_x32_linux)
8926 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8927 Declare.
8928 (x86_linux_update_xmltarget): Delete.
8929 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8930 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8931 (AMD64_LINUX_USER64_CS): New.
8932 (x86_linux_read_description): New, based on
8933 x86_linux_update_xmltarget.
8934 (same_process_callback): New.
8935 (x86_arch_setup_process_callback): New.
8936 (x86_linux_update_xmltarget): New.
8937 (x86_regsets_info): New.
8938 (amd64_linux_regs_info): New.
8939 (i386_linux_usrregs_info): New.
8940 (i386_linux_regs_info): New.
8941 (x86_linux_regs_info): New.
8942 (x86_arch_setup): Reimplement.
8943 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8944 (x86_emit_ops): Ditto.
8945 (the_low_target): Adjust. Install x86_linux_regs_info,
8946 x86_cannot_fetch_register, and x86_cannot_store_register.
8947 (initialize_low_arch): New.
8948 * linux-ia64-low.c (tdesc_ia64): Declare.
8949 (ia64_fetch_register): Adjust.
8950 (ia64_usrregs_info, regs_info): New globals.
8951 (ia64_regs_info): New function.
8952 (the_low_target): Adjust.
8953 (initialize_low_arch): New function.
8954 * linux-sparc-low.c (tdesc_sparc64): Declare.
8955 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8956 Adjust.
8957 (sparc_arch_setup): New function.
8958 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8959 (the_low_target): Adjust.
8960 (initialize_low_arch): New function.
8961 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8962 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8963 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8964 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8965 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8966 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8967 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8968 (tdesc_powerpc_isa205_vsx64l): Declare.
8969 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8970 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8971 (ppc_set_pc, ppc_get_hwcap): Adjust.
8972 (ppc_usrregs_info): Forward declare.
8973 (!__powerpc64__) ppc_regmap_adjusted: New global.
8974 (ppc_arch_setup): Adjust to the current process'es target
8975 description.
8976 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8977 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8978 (ppc_store_evrregset): Adjust.
8979 (target_regsets): Rename to ...
8980 (ppc_regsets): ... this, and make static.
8981 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8982 (ppc_regs_info): New function.
8983 (the_low_target): Adjust.
8984 (initialize_low_arch): New function.
8985 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8986 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8987 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8988 (tdesc_s390x_linux64v2): Declare.
8989 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8990 (s390_fill_gregset, s390_store_last_break): Adjust.
8991 (target_regsets): Rename to ...
8992 (s390_regsets): ... this, and make static.
8993 (s390_get_pc, s390_set_pc): Adjust.
8994 (s390_get_hwcap): New target_desc parameter, and use it.
8995 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8996 (s390_arch_setup): Adjust to set the current process'es target
8997 description. Don't adjust the regmap.
8998 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8999 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9000 (regs_info_3264): New globals.
9001 (s390_regs_info): New function.
9002 (the_low_target): Adjust.
9003 (initialize_low_arch): New function.
9004 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9005 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9006 [__mips64] (init_registers_mips_linux)
9007 (init_registers_mips_dsp_linux): Delete defines.
9008 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9009 (have_dsp): New global.
9010 (mips_read_description): New, based on mips_arch_setup.
9011 (mips_arch_setup): Reimplement.
9012 (get_usrregs_info): New function.
9013 (mips_cannot_fetch_register, mips_cannot_store_register)
9014 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9015 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9016 (target_regsets): Rename to ...
9017 (mips_regsets): ... this, and make static.
9018 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9019 (dsp_regs_info, regs_info): New globals.
9020 (mips_regs_info): New function.
9021 (the_low_target): Adjust.
9022 (initialize_low_arch): New function.
9023 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9024 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9025 Declare.
9026 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9027 (arm_read_description): New, with bits factored from
9028 arm_arch_setup.
9029 (arm_arch_setup): Reimplement.
9030 (target_regsets): Rename to ...
9031 (arm_regsets): ... this, and make static.
9032 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9033 (arm_regs_info): New function.
9034 (the_low_target): Adjust.
9035 (initialize_low_arch): New function.
9036 * linux-m68k-low.c (tdesc_m68k): Declare.
9037 (target_regsets): Rename to ...
9038 (m68k_regsets): ... this, and make static.
9039 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9040 (m68k_regs_info): New function.
9041 (m68k_arch_setup): New function.
9042 (the_low_target): Adjust.
9043 (initialize_low_arch): New function.
9044 * linux-sh-low.c (tdesc_sharch): Declare.
9045 (target_regsets): Rename to ...
9046 (sh_regsets): ... this, and make static.
9047 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9048 (sh_regs_info, sh_arch_setup): New functions.
9049 (the_low_target): Adjust.
9050 (initialize_low_arch): New function.
9051 * linux-bfin-low.c (tdesc_bfin): Declare.
9052 (bfin_arch_setup): New function.
9053 (bfin_usrregs_info, regs_info): New globals.
9054 (bfin_regs_info): New function.
9055 (the_low_target): Adjust.
9056 (initialize_low_arch): New function.
9057 * linux-cris-low.c (tdesc_cris): Declare.
9058 (cris_arch_setup): New function.
9059 (cris_usrregs_info, regs_info): New globals.
9060 (cris_regs_info): New function.
9061 (the_low_target): Adjust.
9062 (initialize_low_arch): New function.
9063 * linux-cris-low.c (tdesc_crisv32): Declare.
9064 (cris_arch_setup): New function.
9065 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9066 (cris_regs_info): New function.
9067 (the_low_target): Adjust.
9068 (initialize_low_arch): New function.
9069 * linux-m32r-low.c (tdesc_m32r): Declare.
9070 (m32r_arch_setup): New function.
9071 (m32r_usrregs_info, regs_info): New globals.
9072 (m32r_regs_info): Adjust.
9073 (initialize_low_arch): New function.
9074 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9075 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9076 (tic6x_usrregs_info): Forward declare.
9077 (tic6x_read_description): New function, based on ...
9078 (tic6x_arch_setup): ... this. Reimplement.
9079 (target_regsets): Rename to ...
9080 (tic6x_regsets): ... this, and make static.
9081 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9082 (tic6x_regs_info): New function.
9083 (the_low_target): Adjust.
9084 (initialize_low_arch): New function.
9085 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9086 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9087 (target_regsets): Rename to ...
9088 (xtensa_regsets): ... this, and make static.
9089 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9090 globals.
9091 (xtensa_arch_setup, xtensa_regs_info): New functions.
9092 (the_low_target): Adjust.
9093 (initialize_low_arch): New function.
9094 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9095 (nios2_arch_setup): Set the current process'es tdesc.
9096 (target_regsets): Rename to ...
9097 (nios2_regsets): ... this.
9098 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9099 (nios2_regs_info): New function.
9100 (the_low_target): Adjust.
9101 (initialize_low_arch): New function.
a261b8f5
PA
9102 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9103 (aarch64_arch_setup): Set the current process'es tdesc.
9104 (target_regsets): Rename to ...
9105 (aarch64_regsets): ... this.
9106 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9107 (aarch64_regs_info): New function.
9108 (the_low_target): Adjust.
9109 (initialize_low_arch): New function.
3aee8918
PA
9110 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9111 globals.
9112 (target_regsets): Rename to ...
9113 (tile_regsets): ... this.
9114 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9115 (tile_regs_info): New function.
9116 (tile_arch_setup): Set the current process'es tdesc.
9117 (the_low_target): Adjust.
9118 (initialize_low_arch): New function.
9119 * spu-low.c (tdesc_spu): Declare.
9120 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9121 * win32-arm-low.c (tdesc_arm): Declare.
9122 (arm_arch_setup): New function.
9123 (the_low_target): Install arm_arch_setup instead of
9124 init_registers_arm.
9125 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9126 (init_windows_x86): Rename to ...
9127 (i386_arch_setup): ... this. Set `win32_tdesc'.
9128 (the_low_target): Adjust.
9129 * win32-low.c (win32_tdesc): New global.
9130 (child_add_thread): Don't create the thread cache here.
9131 (do_initial_child_stuff): Set the new process'es tdesc.
9132 * win32-low.h (struct target_desc): Forward declare.
9133 (win32_tdesc): Declare.
9134 * lynx-i386-low.c (tdesc_i386): Declare global.
9135 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9136 * lynx-low.c (lynx_tdesc): New global.
9137 (lynx_add_process): Set the new process'es tdesc.
9138 * lynx-low.h (struct target_desc): Forward declare.
9139 (lynx_tdesc): Declare global.
9140 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9141 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9142 * nto-low.c (nto_tdesc): New global.
9143 (do_attach): Set the new process'es tdesc.
9144 * nto-low.h (struct target_desc): Forward declare.
9145 (nto_tdesc): Declare.
9146 * nto-x86-low.c (tdesc_i386): Declare.
9147 (nto_x86_arch_setup): Set `nto_tdesc'.
9148
b1fbec62
GB
91492013-06-04 Gary Benson <gbenson@redhat.com>
9150
9151 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9152 to qSupported response when appropriate.
9153 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9154 with nonzero-length annex.
9155 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9156 arguments supplied in annex.
9157
d1ec4ce7
DE
91582013-05-31 Doug Evans <dje@google.com>
9159
ac44adcb 9160 PR server/15594
d1ec4ce7
DE
9161 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9162 64 bits in 64-cross-32 environment.
9163
9b25f2d3
PA
91642013-05-28 Pedro Alves <palves@redhat.com>
9165
9166 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9167 (aarch64-without-fpu.c): Delete rule.
9168 * configure.srv (aarch64*-*-linux*): Remove references to
9169 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9170 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9171 declaration.
9172
6740dc9c
PA
91732013-05-24 Pedro Alves <palves@redhat.com>
9174
9175 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9176 instead of strchr/decode_address. Error if the range isn't split
9177 with a ','. Don't assume there's be a ':' in the action.
9178
c2d6af84
PA
91792013-05-23 Yao Qi <yao@codesourcery.com>
9180 Pedro Alves <palves@redhat.com>
9181
9182 * linux-low.c (lwp_in_step_range): New function.
9183 (linux_wait_1): If the thread was range stepping and stopped
9184 outside the stepping range, report the stop to GDB. Otherwise,
9185 continue stepping. Add range stepping debug output.
9186 (linux_set_resume_request): Copy the step range from the resume
9187 request to the lwp.
9188 (linux_supports_range_stepping): New.
9189 (linux_target_ops) <supports_range_stepping>: Set to
9190 linux_supports_range_stepping.
9191 * linux-low.h (struct linux_target_ops)
9192 <supports_range_stepping>: New field.
9193 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9194 * linux-x86-low.c (x86_supports_range_stepping): New.
9195 (the_low_target) <supports_range_stepping>: Set to
9196 x86_supports_range_stepping.
9197 * server.c (handle_v_cont): Handle 'r' action.
9198 (handle_v_requests): Append ";r" if the target supports range
9199 stepping.
9200 * target.h (struct thread_resume) <step_range_start,
9201 step_range_end>: New fields.
9202 (struct target_ops) <supports_range_stepping>:
9203 New field.
9204 (target_supports_range_stepping): New macro.
9205
58794e1a
JB
92062013-05-17 Joel Brobecker <brobecker@adacore.com>
9207
9208 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9209 confusion in comment.
9210
d631c5a7
JB
92112013-05-17 Joel Brobecker <brobecker@adacore.com>
9212
9213 * lynx-low.c (struct process_info_private): New type.
9214 (lynx_add_process): New function.
9215 (lynx_create_inferior, lynx_attach): Replace calls to
9216 add_process by calls to lynx_add_process.
9217 (lynx_resume): If PTID is null, then try using
9218 current_process()->private->last_wait_event_ptid.
9219 Add comments.
9220 (lynx_clear_inferiors): Delete. The contents of that function
9221 has been inlined in lynx_mourn;
9222 (lynx_wait_1): Save the ptid in the process's private data.
9223 (lynx_mourn): Free the process' private data. Replace call
9224 to lynx_clear_inferiors by call to clear_inferiors.
9225
96f7a20f
YQ
92262013-05-17 Yao Qi <yao@codesourcery.com>
9227
9228 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9229 the right place.
9230
db0dfaa0
LM
92312013-05-16 Luis Machado <lgustavo@codesourcery.com>
9232
9233 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9234 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9235 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9236 PT_TEXT_END_ADDR guards. Update comments.
9237 (linux_target_op) <read_offsets>: Conditionally define to
9238 linux_read_offsets if the target is UCLIBC and if it defines
9239 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9240
68f5f838
SL
92412013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9242 Andrew Jenner <andrew@codesourcery.com>
9243
9244 * Makefile.in (SFILES): Add linux-nios2-low.c.
9245 (clean): Add action to delete nios2-linux.c.
9246 (nios2-linux.c): New rule.
9247 * configure.srv: Add nios2*-*-linux*.
9248 * linux-nios2-low.c: New.
9249
1ebff1fd
HAQ
92502013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9251
9252 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9253
f6150862
HZ
92542013-04-25 Hui Zhu <hui@codesourcery.com>
9255
9256 PR gdb/15186
f6150862
HZ
9257 * ax.c (ax_printf): Add fflush.
9258
614c279d
TT
92592013-04-22 Tom Tromey <tromey@redhat.com>
9260
9261 * Makefile.in (SFILES): Add filestuff.c.
9262 (OBS): Add filestuff.o.
9263 (filestuff.o): New target.
9264 * config.in, configure: Rebuild.
9265 * configure.ac: Check for fdwalk, pipe2.
9266
7d4e5717
PA
92672013-04-17 Pedro Alves <palves@redhat.com>
9268
9269 * configure.ac (USE_THREAD_DB): Delete variable.
9270 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9271 Don't AC_SUBST USE_THREAD_DB.
9272 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9273 * config.in, configure: Regenerate.
9274
d5c93e41
PA
92752013-04-16 Pedro Alves <palves@redhat.com>
9276
9277 * linux-low.h (struct lwp_info) <thread_known>: Move under
9278 the USE_THREAD_DB #ifdef.
9279
04f5fe89
PA
92802013-04-16 Pedro Alves <palves@redhat.com>
9281
9282 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9283 (linux-low.o): Delete rule.
9284 * linux-low.h: Always include "gdb_thread_db.h" instead of
9285 conditionally including thread_db.h.
9286 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9287 HAVE_THREAD_DB_H.
9288
480b27bf
JK
92892013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9290
9291 * Makefile.in (install-only): Fix make install regression.
9292
43662968
JK
92932013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9294
9295 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9296 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9297 installation.
9298 * gdbserver.1: Remove.
9299
3e74e146
PA
93002013-03-22 Pedro Alves <palves@redhat.com>
9301
9302 * linux-low.c (handle_extended_wait): Don't call
9303 linux_enable_event_reporting.
9304
a8347a2a
TT
93052013-03-15 Tony Theodore <tonyt@logyst.com>
9306
9307 PR build/9098:
9308 * Makefile.in (SHELL): Use @SHELL@.
9309
eeb56fa7
SDJ
93102013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9311
9312 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9313 compiler warning.
9314
4fa7e2ff
JB
93152013-03-13 Joel Brobecker <brobecker@adacore.com>
9316
9317 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9318 Remove extraneous NULL element.
9319
8ddb1965
YQ
93202013-03-13 Yao Qi <yao@codesourcery.com>
9321
9322 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9323 'V' block in trace frame.
9324
9accd112
MM
93252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9326
9327 * target.h (struct target_ops): Add btrace ops.
9328 (target_supports_btrace): New macro.
9329 (target_enable_btrace): New macro.
9330 (target_disable_btrace): New macro.
9331 (target_read_btrace): New macro.
9332 * gdbthread.h (struct thread_info): Add btrace field.
9333 * server.c: Include btrace-common.h.
9334 (handle_btrace_general_set): New function.
9335 (handle_btrace_enable): New function.
9336 (handle_btrace_disable): New function.
9337 (handle_general_set): Call handle_btrace_general_set.
9338 (handle_qxfer_btrace): New function.
9339 (struct qxfer qxfer_packets[]): Add btrace entry.
9340 * inferiors.c (remove_thread): Disable btrace.
9341 * linux-low: Include linux-btrace.h.
9342 (linux_low_enable_btrace): New function.
9343 (linux_low_read_btrace): New function.
9344 (linux_target_ops): Add btrace ops.
9345 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9346 Add srv_linux_btrace=yes.
9347 (x86_64-*-linux*): Add linux-btrace.o.
9348 Add srv_linux_btrace=yes.
9349 * configure.ac: Define HAVE_LINUX_BTRACE.
9350 * config.in: Regenerated.
9351 * configure: Regenerated.
9352
5cc22e4c
MM
93532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9354
9355 * server.c (handle_qxfer): Preserve error message if -3 is
9356 returned.
9357 (qxfer): Document the -3 return value.
9358
7c97f91e
MM
93592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9360
9361 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9362 (linux_btrace_h): New variable.
9363 (linux-btrace.o): New rule.
9364
be9a119c 93652013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9366 Hafiz Abid Qadeer <abidh@codesourcery.com>
9367
9368 * tracepoint.c (trace_buffer_size): New global.
9369 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9370 (init_trace_buffer): Change to one-argument function. Allocate
9371 trace buffer memory.
9372 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9373 handle QTBuffer:size packet.
9374 (cmd_bigqtbuffer_size): New function.
9375 (initialize_tracepoint): Call init_trace_buffer with
9376 DEFAULT_TRACE_BUFFER_SIZE.
9377 * server.c (handle_query): Add QTBuffer:size in the
9378 supported packets.
9379
e64f7499
YQ
93802013-03-07 Yao Qi <yao@codesourcery.com>
9381
9382 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9383 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9384 of -1.
9385 (cmd_qtsp): Adjust condition. Do post increment.
9386 Set cur_action and cur_step_action back to 0.
9387
f0ae6fc3
PA
93882013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9389
9390 PR server/15236
9391 * linux-low.c (linux_write_memory): Return early success if LEN is
9392 zero.
9393
b5b0b0af
CV
93942013-03-05 Corinna Vinschen <vinschen@redhat.de>
9395
334ad4a8 9396 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9397
589bc927
TT
93982013-02-28 Tom Tromey <tromey@redhat.com>
9399
9400 * configure.ac: Invoke AC_SYS_LARGEFILE.
9401 * configure, config.in: Rebuild.
9402
dfe07582
CV
94032013-02-28 Corinna Vinschen <vinschen@redhat.com>
9404
9405 * win32-low.c: Throughout, fix format strings and casts of
9406 printf-like functions to avoid type related warnings on all
9407 platforms.
9408 (get_child_debug_event): Print dwDebugEventCode as hex since
9409 that's how it's usually documented.
9410
736cd585
YQ
94112013-02-28 Yao Qi <yao@codesourcery.com>
9412
9413 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9414 pulongest.
9415
e1f58301
JW
94162013-02-27 Jiong Wang <jiwang@tilera.com>
9417
9418 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9419 (reg-tilegx32.c): New rule.
9420 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9421 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9422 different register info initializer according to elf class.
9423 (init_registers_tilgx32): New function. The tilegx32 register info
9424 initializer.
9425 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9426 (tile_store_gregset): Likewise.
9427
d171ca78
YQ
94282013-02-27 Yao Qi <yao@codesourcery.com>
9429
9430 * server.c (process_point_options): Print debug message when
9431 debug_threads is true.
9432
282bbdf3
YQ
94332013-02-26 Yao Qi <yao@codesourcery.com>
9434
9435 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9436
aca22551
PA
94372013-02-19 Pedro Alves <palves@redhat.com>
9438 Kai Tietz <ktietz@redhat.com>
9439
9440 PR gdb/15161
9441
9442 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9443 instead of strtoul to extract address from packet.
9444 (process_serial_event) <'z'>: Likewise.
9445
4f3cee1c
YQ
94462013-02-18 Yao Qi <yao@codesourcery.com>
9447
9448 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9449
8e1d55a3
PA
94502013-02-14 Pedro Alves <palves@redhat.com>
9451
9452 Plug memory leak.
9453
9454 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9455 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9456
458820da
PA
94572013-02-14 Pedro Alves <palves@redhat.com>
9458
9459 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9460
baea0dae
PA
94612013-02-14 Pedro Alves <palves@redhat.com>
9462
9463 * tracepoint.c (save_string): Delete.
9464 (add_tracepoint_action): Use savestring instead of save_string.
9465
0b1afbb3
PA
94662013-02-12 Pedro Alves <palves@redhat.com>
9467
9468 * linux-xtensa-low.c: Ditto.
9469 * xtensa-xtregs.c: Ditto.
9470
8a4ac37e
PA
94712013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9472
9473 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9474 thread_db.
9475
148de6bb
MS
94762013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9477
9478 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9479 aarch64_num_wp_regs and aarch64_num_bp_regs to
9480 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9481
55fac6e0
MS
94822013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9483
9484 * linux-aarch64-low.c (ps_get_thread_area): Replace
9485 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9486
176eb98c
MS
94872013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9488 Marcus Shawcroft <marcus.shawcroft@arm.com>
9489 Nigel Stephens <nigel.stephens@arm.com>
9490 Yufeng Zhang <yufeng.zhang@arm.com>
9491
9492 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9493 (aarch64.c, aarch64-without-fpu.c): New targets.
9494 * configure.srv (aarch64*-*-linux*): New.
9495 * linux-aarch64-low.c: New file.
9496
56f7af9c
MS
94972013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9498
43aaf8b6 9499 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9500 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9501 (dequeue_one_deferred_signal, linux_resume_one_thread)
9502 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9503 (linux_tracefork_grandchild, linux_test_for_tracefork)
9504 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9505 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9506 where the argument is 0.
9507
60f662b0
YQ
95082013-01-25 Yao Qi <yao@codesourcery.com>
9509
9510 * event-loop.c: Include "queue.h".
9511 (gdb_event_p): New typedef.
9512 (struct gdb_event) <next_event>: Remove.
9513 (event_queue): Change to QUEUE(gdb_event_p).
9514 (async_queue_event): Remove.
9515 (gdb_event_xfree): New.
9516 (initialize_event_loop): New.
9517 (process_event): Use API from QUEUE.
9518 (wait_for_event): Likewise.
9519 * server.c (main): Call initialize_event_loop.
9520 * server.h (initialize_event_loop): Declare.
9521
5ae4861a
YQ
95222013-01-18 Yao Qi <yao@codesourcery.com>
9523
9524 * ax.h (struct eval_agent_expr_context): New.
9525 (gdb_eval_agent_expr): Update declaration.
9526 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9527 TFRAME. Add new argument CTX.
9528 * server.h (struct eval_agent_expr_context): Declare.
9529 (agent_mem_read, agent_tsv_read): Update declaration.
9530 (agent_mem_read_string): Likewise.
9531 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9532 (add_traceframe_block): Add new argument TPOINT.
9533 Increase TPOINT->traceframe_usage.
9534 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9535 eval_tracepoint_agent_expr.
9536 (condition_true_at_tracepoint): Likewise.
9537 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9538 (agent_mem_read_string, agent_tsv_read): Likewise.
9539
85e00e85
YQ
95402013-01-16 Yao Qi <yao@codesourcery.com>
9541
9542 * linux-low.c (linux_resume_one_lwp): Don't check
9543 'lwp->bp_reinsert != 0'.
9544
4039cf45
JB
95452013-01-07 Joel Brobecker <brobecker@adacore.com>
9546 Pedro Alves <palves@redhat.com>
9547
9548 * lynx-low.c (ptrace_request_to_str): Define a temporary
9549 macro and use it to simplify this function's implementation.
9550
9044dee2
JB
95512013-01-07 Joel Brobecker <brobecker@adacore.com>
9552
9553 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9554 sets errno.
9555
e6352c8f
JB
95562013-01-07 Joel Brobecker <brobecker@adacore.com>
9557
9558 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9559
50681a27
JB
95602013-01-07 Joel Brobecker <brobecker@adacore.com>
9561
9562 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9563
3f6e77ef
JB
95642013-01-07 Joel Brobecker <brobecker@adacore.com>
9565
9566 * lynx-low.c (lynx_resume): Use the resume_info parameter
9567 to determine the ptid for the lynx_ptrace call, unless
9568 it is equal to minus_one_ptid, in which case we use the
9569 ptid of the current_inferior.
9570 (lynx_wait_1): After having received a thread create/exit
9571 event, resume the inferior's execution using the signaling
9572 thread's ptid, rather than the old ptid.
9573
7fda33ae
JB
95742013-01-07 Joel Brobecker <brobecker@adacore.com>
9575
9576 * lynx-low.c (lynx_resume): Delete variable ret.
9577
b9786c74
JB
95782013-01-01 Joel Brobecker <brobecker@adacore.com>
9579
9580 * gdbreplay.c (gdbreplay_version): Update copyright year.
9581 * server.c (gdbserver_version): Likewise.
9582
8b93d60f
JB
95832012-12-17 Joel Brobecker <brobecker@adacore.com>
9584
9585 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9586 new thread.
9587
037335a7
JB
95882012-12-17 Joel Brobecker <brobecker@adacore.com>
9589
9590 * lynx-low.c (ptrace_request_to_str): Add handling for
9591 PTRACE_GETTRACESIG.
9592
52d4cbd8
JB
95932012-12-17 Joel Brobecker <brobecker@adacore.com>
9594
9595 * lynx-low.c (lynx_attach): Delete variable new_process.
9596
ab8f6ca9
JB
95972012-12-17 Joel Brobecker <brobecker@adacore.com>
9598
9599 * lynx-low.c (lynx_create_inferior): Delete variable
9600 new_process.
9601
78cbc024
JB
96022012-12-17 Joel Brobecker <brobecker@adacore.com>
9603
9604 * lynx-low.c (ptrace_request_to_str): Do not handle
9605 PTRACE_GETTHREADLIST if this macro does not exist.
9606
14a00470
YQ
96072012-12-15 Yao Qi <yao@codesourcery.com>
9608
9609 * Makefile.in (OBS): Add notif.o.
9610 * notif.c, notif.h: New.
9611 * server.c: Include "notif.h".
9612 (struct vstop_notif) <next>: Remove.
9613 <base>: New field.
9614 (queue_stop_reply): Update.
9615 (push_event, send_next_stop_reply): Remove.
9616 (discard_queued_stop_replies): Update.
9617 (notif_stop): New variable.
9618 (handle_v_stopped): Remove.
9619 (handle_v_requests): Don't call handle_v_stopped. Call
9620 handle_ack_notif instead.
9621 (queue_stop_reply_callback): Call notif_event_enque instead
9622 of queue_stop_reply.
9623 (handle_status): Don't call send_next_stop_reply, call
9624 notif_write_event instead.
9625 (kill_inferior_callback): Likewise.
9626 (detach_or_kill_inferior_callback): Likewise.
9627 (main): Call initialize_notif.
9628 (process_serial_event): Call QUEUE_is_empty.
9629 (handle_target_event): Call notif_push instead of push event.
9630 * server.h (push_event): Remove declaration.
9631
61c125b9
TT
96322012-12-10 Tom Tromey <tromey@redhat.com>
9633
9634 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9635 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9636 macros.
9637 (.c.o): Rewrite.
9638 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9639 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9640 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9641 (amd64-linux-ipa.o, ax.o): Rewrite.
9642 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9643 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9644 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9645 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9646 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9647 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9648 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9649 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9650 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9651 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9652 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9653 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9654 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9655 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9656 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9657 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9658 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9659 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9660 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9661 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9662 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9663 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9664 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9665 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9666 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9667 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9668 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9669 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9670 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9671 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9672 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9673 (reg-tilegx.o): Remove.
9674 (all_object_files): New macro.
9675 Include .deps files.
9676 * aclocal.m4, configure: Rebuild.
9677 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9678 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9679 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9680
e90e9ad9
TT
96812012-12-05 Tom Tromey <tromey@redhat.com>
9682
9683 PR gdb/14917:
9684 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9685
02d403bf 96862012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9687
9688 * configure.ac: Check for linux/perf_event.h.
9689 * config.in: Regenerated.
9690 * configure: Regenerated.
9691
0270a750
PA
96922012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9693
9694 * hostio.c (handle_readlink): Decrease buffer size
9695 parameter passed to readlink by one byte.
9696
8c29b58e
YQ
96972012-11-26 Yao Qi <yao@codesourcery.com>
9698
9699 * configure.ac (build_warnings): Append '-Wempty-body'.
9700 * configure: Regenerated.
9701 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9702 body.
9703
8bdce1ff
PM
97042012-11-15 Pierre Muller <muller@sourceware.org>
9705
9706 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9707 * config.in: Regenerate.
9708 * configure: Regenerate.
9709 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9710 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9711 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9712 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9713 header.
9714 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9715 instead of <sys/wait.h> header.
9716 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9717
02d403bf 97182012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9719
9720 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9721 (various make rules): Remove -DGDBSERVER
9722
fbd5db48
YQ
97232012-11-09 Yao Qi <yao@codesourcery.com>
9724
9725 * spu-low.c (current_ptid): Move it to ..
9726 * gdbthread.h: ... here. New.
9727 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9728 * server.c (myresume, process_serial_event): Likewise.
9729 * thread-db.c (thread_db_find_new_threads): Likewise.
9730 * tracepoint.c (run_inferior_command): Likewise.
9731
b3dc46ff
AB
97322012-10-01 Andrew Burgess <aburgess@broadcom.com>
9733
9734 * server.c (handle_search_memory_1): Include access length in
9735 warning message.
9736
07c04788
HPN
97372012-09-05 Michael Brandt <michael.brandt@axis.com>
9738
9739 * linux-crisv32-low.c: Fix compile errors.
9740
918d227b
YQ
97412012-09-04 Yao Qi <yao@codesourcery.com>
9742
9743 * tracepoint.c (cmd_qtsv): Adjust debug message.
9744 Don't check CUR_TPOINT.
9745
18c1b81a
YQ
97462012-08-28 Yao Qi <yao@codesourcery.com>
9747
9748 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9749 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9750 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9751 Remove declarations of xmalloc, xreallloc, xstrdup and
9752 freeargv.
9753 * Makefile.in (libiberty_h): New.
9754 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9755 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9756
dc82f37b
YQ
97572012-08-23 Yao Qi <yao@codesourcery.com>
9758
9759 * server.h: Remove declaration of 'xsnprintf'.
9760
406b1477
KS
97612012-08-22 Keith Seitz <keiths@redhat.com>
9762
9763 * server.h: Include build-gnulib-gbserver/config.h.
9764 * gdbreplay.c: Likewise.
9765
e6712ff1
DE
97662012-08-08 Doug Evans <dje@google.com>
9767
9768 * Makefile.in (SFILES): Add gdb_vecs.c.
9769 (OBS): Add gdb_vecs.o.
9770 (gdb_vecs_h, host_defs_h): New variables.
9771 (thread-db.o): Add $(gdb_vecs_h) dependency.
9772 (gdb_vecs.o): New rule.
9773 * thread-db.c: #include "gdb_vecs.h".
9774 (thread_db_load_search): Use a vector to iterate over path elements.
9775 Handle text appearing after "$pdir".
9776
9777 * configure.ac: Add check for strstr.
9778 * config.in: Regenerate.
9779 * configure: Regenerate.
9780
7c3270ae
UW
97812012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9782
9783 * hostio.c (handle_pread): If pread fails, fall back to attempting
9784 lseek/read.
9785 (handle_pwrite): Likewise for pwrite.
9786
b62e2b27
UW
97872012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9788
9789 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9790 between unsupported TYPE and unimplementable ADDR/LEN combination.
9791 (arm_insert_point): Act on new return value.
9792
78a99e91
PA
97932012-07-31 Pedro Alves <palves@redhat.com>
9794
9795 * server.c (process_point_options): Only skip tokens if we find
9796 one that is unrecognized. Don't treat 'X' specially while
9797 skipping unrecognized tokens.
9798
fcf303ab
UW
97992012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9800
9801 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9802 to 4-byte-align HW breakpoint addresses for Thumb.
9803
7255706c
YQ
98042012-07-27 Yao Qi <yao@codesourcery.com>
9805
9806 PR remote/14161.
9807
9808 * server.h: Declare gdb_agent_about_to_close.
9809 * target.c (kill_inferior): Include "agent.h".
9810 New. Send command 'kill'.
9811 * target.h (kill_inferior): Removed macro.
9812 * tracepoint.c (gdb_agent_about_to_close): New.
9813 (gdb_agent_helper_thread): Handle command 'close'.
9814 Wait endlessly until the inferior stops.
9815 Install gdb_agent_remove_socket to atexit hook.
9816 (agent_socket_name): New static variable.
9817 (gdb_agent_socket_init): Replace local variable 'name' with
9818 'agent_socket_name'.
9819 (gdb_agent_remove_socket): New.
9820
5a3f286f
YQ
98212012-07-27 Yao Qi <yao@codesourcery.com>
9822
9823 * server.c (process_point_options): Stop at 'X' when parsing.
9824
961bd387
ME
98252012-07-19 Michael Eager <eager@eagercon.com>
9826
a261b8f5 9827 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9828 to hw_execute.
9829 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9830 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9831 hardware breakpoint.
9832
aa7c7447
JK
98332012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9834
9835 * gdbserver/linux-low.c (initialize_low): Call
9836 linux_ptrace_init_warnings.
9837
7f216e7c
DE
98382012-07-02 Doug Evans <dje@google.com>
9839
9840 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9841 pointer to int.
9842
d3ce09f5
SS
98432012-07-02 Stan Shebs <stan@codesourcery.com>
9844
9845 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9846 (ax.o): Add it to build rule.
9847 (ax-ipa.o): Ditto.
9848 (OBS): Add format.o.
9849 (IPA_OBS): Add format.o.
9850 * server.c (handle_query): Claim support for breakpoint commands.
9851 (process_point_options): Add command case.
9852 (process_serial_event): Leave running if there are printfs in
9853 effect.
9854 * mem-break.h (any_persistent_commands): Declare.
9855 (add_breakpoint_commands): Declare.
9856 (gdb_no_commands_at_breakpoint): Declare.
9857 (run_breakpoint_commands): Declare.
9858 * mem-break.c (struct point_command_list): New struct.
9859 (struct breakpoint): New field command_list.
9860 (any_persistent_commands): New function.
9861 (add_commands_to_breakpoint): New function.
9862 (add_breakpoint_commands): New function.
9863 (gdb_no_commands_at_breakpoint): New function.
9864 (run_breakpoint_commands): New function.
9865 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9866 locally.
9867 * ax.c: Include format.h.
9868 (ax_printf): New function.
9869 (gdb_eval_agent_expr): Add printf opcode.
9870
2f8f6aed
YQ
98712012-06-13 Yao Qi <yao@codesourcery.com>
9872
9873 * server.c (start_inferior): Remove duplicated writes to fields
9874 'last_resume_kind' and 'last_status' of 'current_inferior'.
9875
0c9070b3
YQ
98762012-06-12 Yao Qi <yao@codesourcery.com>
9877 Pedro Alves <palves@redhat.com>
9878
9879 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9880 comment.
9881 * server.c (handle_v_cont): Extend comment.
9882
c52daf70
YQ
98832012-06-11 Yao Qi <yao@codesourcery.com>
9884
9885 * linux-low.c (linux_attach): Add 'static'.
9886
d38bbb0a
YQ
98872012-06-06 Yao Qi <yao@codesourcery.com>
9888
9889 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9890
89dc0afd
JK
98912012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9892
9893 Fix gcc -flto compilation warning.
9894 * server.c (main): Make variable multi_mode and attach volatile.
9895
75f62ce7
TJB
98962012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9897
9898 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9899 if the platform doesn't know about it.
9900
65f479b6
PA
99012012-05-30 Jeff Kenton <jkenton@tilera.com>
9902
9903 * Makefile.in (SFILES): Add linux-tile-low.c.
9904 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9905 * configure.srv: Handle tilegx-*-linux*.
9906 * linux-tile-low.c: New file.
9907
0c5bf5a9
JK
99082012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9909
9910 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9911
a493e3e2
PA
99122012-05-24 Pedro Alves <palves@redhat.com>
9913
9914 PR gdb/7205
9915
43aaf8b6 9916 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9917
2ea28649
PA
99182012-05-24 Pedro Alves <palves@redhat.com>
9919
9920 PR gdb/7205
9921
9922 Replace target_signal with gdb_signal throughout.
9923
8d409d16
MR
99242012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9925
9926 * linux-low.c (linux_store_registers): Avoid the copying sequence
9927 when no data has been retrieved by ptrace.
9928
23512c01
MGD
99292012-05-22 Will Deacon <will.deacon@arm.com>
9930
9931 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9932 Include asm/ptrace.h.
9933 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9934 already defined.
9935
4934b29e
MR
99362012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9937
9938 * linux-low.c (linux_store_registers): Don't re-retrieve data
9939 with ptrace that has already been obtained from /proc. Always
9940 copy any data retrieved with ptrace to the buffer supplied.
9941
bde24c0a
PA
99422012-05-11 Yao Qi <yao@codesourcery.com>
9943 Pedro Alves <palves@redhat.com>
9944
9945 * linux-low.c (enum stopping_threads_kind): New.
9946 (stopping_threads): Change type to `enum stopping_threads_kind'.
9947 (handle_extended_wait): If stopping and suspending threads, leave
9948 the new_lwp suspended too.
9949 (linux_wait_for_event): Adjust.
9950 (stop_all_lwps): Set `stopping_threads' to
9951 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9952 whether we're suspending threads or just stopping them. Assert no
9953 recursion happens.
9954
623b6bdf
YQ
99552012-04-29 Yao Qi <yao@codesourcery.com>
9956
9957 * server.h: Move some code to ...
9958 * gdbthread.h: ... here. New.
9959 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9960 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9961 (nto-low.o, win32-low.o): Likewise.
9962 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9963 * regcache.c, remote-utils.c, server.c: Likewise.
9964 * target.c, tracepoint.c, win32-low.c: Likewise.
9965
f15f9948
TJB
99662012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9967
9968 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9969 (PTRACE_ARG4_TYPE): Likewise.
9970 (PTRACE_XFER_TYPE): Likewise.
9971 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9972 ptrace to PTRACE_ARG3_TYPE.
9973 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9974 (PTRACE_ARG4_TYPE): Likewise.
9975 (PTRACE_XFER_TYPE): Likewise.
9976 (linux_detach_one_lwp): Cast fourth argument of
9977 ptrace to long then PTRACE_ARG4_TYPE.
9978 (regsets_fetch_inferior_registers): Cast third argument of
9979 ptrace to long then PTRACE_ARG3_TYPE.
9980 (regsets_store_inferior_registers): Likewise.
9981
38ea300a
PA
99822012-04-20 Pedro Alves <palves@redhat.com>
9983
9984 * configure: Regenerate.
9985
c971b7fa
PA
99862012-04-19 Pedro Alves <palves@redhat.com>
9987
43aaf8b6 9988 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9989 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9990 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9991 (all, install-only, uninstall, clean-info, all-lib, clean): No
9992 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9993 (maintainer-clean realclean distclean): Use subdir_do.
9994 (subdir_do): New.
9995 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9996 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9997 * acinclude.m4: Include acx_configure_dir.m4.
9998 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9999 calls. Call AC_PROG_RANLIB. Configure gnulib using
10000 ACX_CONFIGURE_DIR.
10001 (GNULIB): New.
10002 (GNULIB_STDINT_H): Adjust.
10003 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10004 * gdbreplay.c: Include build-gnulib/config.h.
10005 * server.h: Likewise.
10006 * aclocal.m4: Regenerate.
10007 * config.in: Regenerate.
10008 * configure: Regenerate.
c971b7fa 10009
809277f8
PA
100102012-04-19 Pedro Alves <palves@redhat.com>
10011
10012 * Makefile.in (LIBGNU, INCGNU): Adjust.
10013 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10014 (all, install-only, uninstall, clean-info, all-lib, clean)
10015 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10016 * configure.ac: Adjust AC_OUTPUT output.
10017 * aclocal.m4: Regenerate.
10018 * configure: Regenerate.
10019
fd9bb8b8
PA
100202012-04-19 Pedro Alves <palves@redhat.com>
10021
10022 * Makefile.in (generated_files): New.
10023 (server_h): Remove the explicit dependency on config.h, and depend
10024 on $generated_files.
10025
1c298c66
PA
100262012-04-19 Pedro Alves <palves@redhat.com>
10027
10028 * Makefile.in (INCGNU): Add -Ignulib.
10029
57c4b50b
PA
100302012-04-19 Pedro Alves <palves@redhat.com>
10031
10032 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10033 (INCGNU): ... this, and spell out -I here.
10034 (GNULIB_LIB): Rename to ...
10035 (LIBGNU): ... this.
10036 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10037
1030e047
PA
100382012-04-19 Pedro Alves <palves@redhat.com>
10039
10040 * config.in: Regenerate.
10041
447d4319
PA
100422012-04-19 Pedro Alves <palves@redhat.com>
10043
10044 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10045 * server.h (memmem): Remove declaration.
10046 * config.in: Regenerate.
10047 * configure: Regenerate.
10048
aad9eab9
YQ
100492012-04-19 Yao Qi <yao@codesourcery.com>
10050
10051 * Makefile.in (SFILES): Add common/vec.c.
10052 (OBS): Add vec.o.
10053 (vec.o): New rule.
10054
3e10640f
YQ
100552012-04-19 Yao Qi <yao@codesourcery.com>
10056
10057 * remote-utils.c (prepare_resume_reply): Replace with macro
10058 target_core_of_thread.
10059 * server.c (handle_qxfer_threads_proper): Likewise.
10060 * target.h (traget_core_of_thread): New macro.
10061
71622373
PA
100622012-04-18 Pedro Alves <palves@redhat.com>
10063
10064 * aclocal.m4: Regenerate.
10065 * configure: Regenerate.
10066
80d26939
YQ
100672012-04-16 Yao Qi <yao@codesourcery.com>
10068
10069 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10070 duplicated on address.
10071
42476b70
YQ
100722012-04-16 Yao Qi <yao@codesourcery.com>
10073
10074 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10075 (struct tracepoint_action_ops) <send>: New field.
10076 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10077 (agent_expr_send, x_tracepoint_action_send): New.
10078 (l_tracepoint_action_send): New.
10079 (cmd_qtdp): Download and install tracepoint
10080 according to `use_agent'.
10081 (run_inferior_command): Add one more parameter `len'.
10082 Update callers.
10083 (tracepoint_send_agent): New.
10084 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10085
7bc83639
YQ
100862012-04-16 Yao Qi <yao@codesourcery.com>
10087
10088 * tracepoint.c (download_tracepoints): Moved to ...
10089 (cmd_qtstart): ... here.
10090
5f18041e
YQ
100912012-04-14 Yao Qi <yao@codesourcery.com>
10092
10093 * tracepoint.c: Include inttypes.h.
10094 (struct collect_memory_action): Use sized types.
10095 (struct tracepoint): Likewise.
10096 (cmd_qtdp, stop_tracing): Update print specifiers.
10097 (cmd_qtp, response_tracepoint): Likewise.
10098 (collect_data_at_tracepoint): Likewise.
10099 (collect_data_at_step): Likewise.
10100
55a8c076
YQ
101012012-04-14 Yao Qi <yao@codesourcery.com>
10102
10103 Import gnulib module inttypes.
10104 * aclocal.m4, config.in, configure: Regenerated.
10105
dc750257
YQ
101062012-04-14 Yao Qi <yao@codesourcery.com>
10107
10108 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10109 Makefile and config.status at last.
10110
0ab5faf9
YQ
101112012-04-13 Yao Qi <yao@codesourcery.com>
10112
10113 * tracepoint.c: Include stdint.h unconditionally.
10114
18f5fd81
TJB
101152012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10116
10117 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10118 on BFD_HAVE_SYS_PROCFS_TYPE.
10119 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10120 * configure: Regenerate.
10121 * config.in: Likewise.
10122
4d47af5c
L
101232012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10124
10125 * Makefile.in (clean): Also remove x32.c x32-linux.c
10126 x32-avx.c x32-avx-linux.c.
10127 (x32.o): New target.
10128 (x32.c): Likewise.
10129 (x32-linux.o): Likewise.
10130 (x32-linux.c): Likewise.
10131 (x32-avx.o): Likewise.
10132 (x32-avx.c): Likewise.
10133 (x32-avx-linux.o): Likewise.
10134 (x32-avx-linux.c): Likewise.
10135
10136 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10137 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10138 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10139 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10140 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10141 i386/x32-avx-linux.xml.
10142
10143 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10144 (init_registers_x32_avx_linux): Likwise.
10145 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10146 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10147
ecedbe58
PA
101482012-04-13 Pedro Alves <palves@redhat.com>
10149
10150 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10151 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10152 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10153 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10154 the sub-make.
10155
c92b5177
L
101562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10157
10158 * linux-x86-low.c (compat_x32_clock_t): New.
10159 (compat_x32_siginfo_t): Likewise.
10160 (compat_x32_siginfo_from_siginfo): Likewise.
10161 (siginfo_from_compat_x32_siginfo): Likewise.
10162 (linux_is_elf64): Likewise.
10163 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10164 and siginfo_from_compat_x32_siginfo for x32.
10165 (x86_arch_setup): Set linux_is_elf64.
10166
214d508e
L
101672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10168
10169 PR gdb/13969
10170 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10171 e_machine field.
10172 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10173 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10174 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10175 compatible with process.
10176
c9a1864a
YQ
101772012-04-12 Yao Qi <yao@codesourcery.com>
10178
10179 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10180 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10181 (install-only, install-info, clean): Handle sub dir gnulib.
10182 (all-lib, am--refresh): New targets.
10183 (memmem.o): Remove target.
10184 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10185 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10186 (AC_REPLACE_FUNCS): Remove memmem.
10187 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10188 (AC_OUTPUT): Generate Makefile in gnulib/.
10189 * aclocal.m4, config.in, configure: Regenerated.
10190
367ba2c2
MR
101912012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10192
10193 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10194
9d236627
PA
101952012-04-05 Pedro Alves <palves@redhat.com>
10196
10197 -Werror=strict-aliasing
10198
10199 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10200 pointer.
10201
111217b3
PA
102022012-04-04 Pedro Alves <palves@redhat.com>
10203
10204 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10205 (sparc_store_gregset_from_stack, sparc_store_gregset)
10206 (sparc_breakpoint_at): Fix formatting.
10207
8365dcf5
TJB
102082012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10209
10210 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10211 are available.
10212 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10213 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10214 * config.in: Regenerate.
10215 * configure: Likewise.
10216
689cc2ae
PA
102172012-03-29 Pedro Alves <palves@redhat.com>
10218
10219 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10220 Correct ptrace arguments.
10221
c14dfd32
PA
102222012-03-28 Pedro Alves <palves@redhat.com>
10223
10224 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10225 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10226 (IA64_FR1_REGNUM): New defines.
10227 (ia64_fetch_register): New.
10228 (the_low_target): Install it.
10229 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10230 field.
10231 * linux-low.c (linux_fetch_registers): Try the
10232 the_low_target.fetch_register hook first.
10233
10234 * linux-arm-low.c (the_low_target): Adjust.
10235 * linux-bfin-low.c (the_low_target): Adjust.
10236 * linux-cris-low.c (the_low_target): Adjust.
10237 * linux-crisv32-low.c (the_low_target): Adjust.
10238 * linux-m32r-low.c (the_low_target): Adjust.
10239 * linux-m68k-low.c (the_low_target): Adjust.
10240 * linux-mips-low.c (the_low_target): Adjust.
10241 * linux-ppc-low.c (the_low_target): Adjust.
10242 * linux-s390-low.c (the_low_target): Adjust.
10243 * linux-sh-low.c (the_low_target): Adjust.
10244 * linux-sparc-low.c (the_low_target): Adjust.
10245 * linux-tic6x-low.c (the_low_target): Adjust.
10246 * linux-x86-low.c (the_low_target): Adjust.
10247 * linux-xtensa-low.c (the_low_target): Adjust.
10248
63c88e13
PA
102492012-03-26 Pedro Alves <palves@redhat.com>
10250
10251 * server.c (handle_qxfer_libraries): Don't bail early if
10252 the_target->qxfer_libraries_svr4 is not NULL.
10253
fb723180
PA
102542012-03-26 Pedro Alves <palves@redhat.com>
10255
10256 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10257
0afae3cf
PA
102582012-03-23 Pedro Alves <palves@redhat.com>
10259
10260 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10261 "library-list-svr4" element's start tag when the the DSO list is
10262 empty.
10263
485f1ee4
PA
102642012-03-23 Pedro Alves <palves@redhat.com>
10265
10266 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10267 a variable whose type size is the same as the inferior's pointer
10268 size.
10269
a5362b9a
TS
102702012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10271
10272 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10273 struct siginfo.
10274 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10275 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10276 * linux-low.h: Include <signal.h>.
10277 (struct siginfo): Remove forward declaration.
10278 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10279 struct siginfo.
10280
d226c142
MF
102812012-03-21 Mike Frysinger <vapier@gentoo.org>
10282
10283 * .gitignore: Ignore more files.
10284
122f36ef
PA
102852012-03-19 Pedro Alves <palves@redhat.com>
10286 Jan Kratochvil <jan.kratochvil@redhat.com>
10287
10288 * server.c (cont_thread, general_thread): Add describing comments.
10289 (start_inferior): Clear `cont_thread'.
10290 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10291 of a process.
10292
fc3e5175
YQ
102932012-03-15 Yao Qi <yao@codesourcery.com>
10294
10295 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10296 handling to ...
10297 (cmd_qtdp): ... here.
10298
8d0d92cd
YQ
102992012-03-15 Yao Qi <yao@codesourcery.com>
10300
10301 * tracepoint.c (struct tracepoint_action_ops): New.
10302 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10303 (m_tracepoint_action_download): New.
10304 (r_tracepoint_action_download): New.
10305 (x_tracepoint_action_download): New.
10306 (l_tracepoint_action_download): New.
10307 (add_tracepoint_action): Install `action->ops' according type.
10308 (download_tracepoint_1): Move code `download' function pointer
10309 of various tracepoint_action_ops.
10310
87b0bb13
JK
103112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10312
10313 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10314 linux_ptrace_attach_warnings.
10315
5f572dec
JK
103162012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10317
10318 * Makefile.in (linux-ptrace.o): New.
10319 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10320 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10321 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10322 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10323 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10324 of these targets.
10325 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10326
f4647387
YQ
103272012-03-08 Yao Qi <yao@codesourcery.com>
10328 Pedro Alves <palves@redhat.com>
10329
10330 Fix PR server/13392.
10331 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10332 offset of JMP insn.
10333 * tracepoint.c (remove_tracepoint): New.
10334 (cmd_qtdp): Call remove_tracepoint when failed to install.
10335
9b224c5e
PA
103362012-03-07 Pedro Alves <palves@redhat.com>
10337
10338 * linux-low.c (get_detach_signal): New.
10339 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10340 Pass on pending signals to PTRACE_DETACH. Check the result of the
10341 ptrace call.
10342 * server.c (program_signals, program_signals_p): New.
10343 (handle_general_set): Handle QProgramSignals.
10344 * server.h (program_signals, program_signals_p): Declare.
10345
e237a7e2
JK
103462012-03-05 Pedro Alves <palves@redhat.com>
10347 Jan Kratochvil <jan.kratochvil@redhat.com>
10348
10349 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10350 New comment why.
10351
5808517f
YQ
103522012-03-03 Yao Qi <yao@codesourcery.com>
10353
10354 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10355 agent_look_up_symbols.
10356
58b4daa5
YQ
103572012-03-03 Yao Qi <yao@codesourcery.com>
10358
10359 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10360 (linux-x86-low.o): Likewise.
10361 * server.h: Remove in_process_agent_loaded.
10362 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10363 common/agent.c.
10364 Update callers.
10365
8ffcbaaf
YQ
103662012-03-03 Yao Qi <yao@codesourcery.com>
10367
10368 * tracepoint.c (gdb_agent_capability): New global.
10369 (in_process_agent_loaded_ust): Renamed to
10370 `in_process_agent_supports_ust'.
10371 Update callers.
10372 (in_process_agent_supports_ust): Call agent_capability_check.
10373 (clear_installed_tracepoints): Assert that agent supports
10374 agent.
10375
d1feda86
YQ
103762012-03-03 Yao Qi <yao@codesourcery.com>
10377
10378 * linux-low.c (linux_supports_agent): New.
10379 (linux_target_ops): Initialize field `supports_agent' with
10380 linux_supports_agent.
10381 * target.h (struct target_ops) <supports_agent>: New.
10382 (target_supports_agent): New macro.
10383 * server.c (handle_general_set): Handle packet 'QAgent'.
10384 (handle_query): Send `QAgent+'.
10385 * Makefile.in (server.o): Depends on agent.h.
10386
2fa291ac
YQ
103872012-03-03 Yao Qi <yao@codesourcery.com>
10388
10389 * Makefile.in (OBS): Add agent.o.
10390 Add new rule for agent.o.
10391 Track dependence of tracepoint.c on agent.h.
10392 * tracepoint.c (run_inferior_command_1):
10393 (run_inferior_command): Call agent_run_command.
10394 (gdb_ust_connect_sync_socket): Deleted. Move it to
10395 common/agent.c.
10396 (resume_thread, stop_thread): Likewise.
10397 (gdb_ust_socket_init): Renamed to ...
10398 (gdb_agent_socket_init): ... New.
10399 (gdb_ust_thread): Renamed to ...
10400 (gdb_agent_helper_thread): ... New.
10401 (gdb_ust_init): Move some code to ...
10402 (gdb_agent_init): ... here. New.
10403 [HAVE_UST]: Call gdb_ust_init.
10404 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10405 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10406 * config.in, configure: Regenerated.
10407
05044653
PA
104082012-03-02 Pedro Alves <palves@redhat.com>
10409
10410 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10411 * linux-low.c (struct simple_pid_list): New.
10412 (stopped_pids): New a struct simple_pid_list pointer.
10413 (add_to_pid_list, pull_pid_from_list): New.
10414 (handle_extended_wait): Don't assume the first signal new children
10415 report is SIGSTOP. Adjust call to pull_pid_from_list.
10416 (linux_wait_for_lwp): Adjust.
10417
8d00225b
YQ
104182012-03-02 Yao Qi <yao@codesourcery.com>
10419
10420 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10421 debug log.
10422
19560ba5
YQ
104232012-03-02 Yao Qi <yao@codesourcery.com>
10424
10425 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10426 `stop_pc' and `tpoint'. Update caller.
10427
1faeff08
MR
104282012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10429
10430 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10431 * linux-low.c (use_linux_regsets): New macro.
10432 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10433 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10434 (linux_register_in_regsets): New function.
10435 (usr_fetch_inferior_registers): Skip registers covered by
10436 regsets.
10437 (usr_store_inferior_registers): Likewise.
10438 (usr_fetch_inferior_registers): New macro.
10439 (usr_store_inferior_registers): Likewise.
10440 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10441 (linux_store_registers): Likewise.
10442 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10443 prototype.
10444 (init_registers_mips64_dsp_linux): Likewise.
10445 (init_registers_mips_linux): New macro.
10446 (init_registers_mips_dsp_linux): Likewise.
10447 (mips_dsp_num_regs): Likewise.
10448 (DSP_BASE, DSP_CONTROL): New fallback macros.
10449 (mips_base_regs): New macro.
10450 (mips_regmap): Use it. Fix the size.
10451 (mips_dsp_regmap): New variable.
10452 (mips_dsp_regset_bitmap): Likewise.
10453 (mips_arch_setup): New function.
10454 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10455 than mips_regmap.
10456 (mips_cannot_store_register): Likewise.
10457 (the_low_target): Update .arch_setup, .num_regs and .regmap
10458 initializers. Add .regset_bitmap initializer.
10459 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10460 initializer.
10461 * linux-bfin-low.c (the_low_target): Likewise.
10462 * linux-cris-low.c (the_low_target): Likewise.
10463 * linux-crisv32-low.c (the_low_target): Likewise.
10464 * linux-ia64-low.c (the_low_target): Likewise.
10465 * linux-m32r-low.c (the_low_target): Likewise.
10466 * linux-m68k-low.c (the_low_target): Likewise.
10467 * linux-ppc-low.c (the_low_target): Likewise.
10468 * linux-s390-low.c (the_low_target): Likewise.
10469 * linux-sh-low.c (the_low_target): Likewise.
10470 * linux-sparc-low.c (the_low_target): Likewise.
10471 * linux-tic6x-low.c (the_low_target): Likewise.
10472 * linux-x86-low.c (the_low_target): Likewise.
10473 * linux-xtensa-low.c (the_low_target): Likewise.
10474 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10475 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10476 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10477 srv_xmlfiles.
10478 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10479 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10480
c03e6ccc
YQ
104812012-02-29 Yao Qi <yao@codesourcery.com>
10482 Pedro Alves <palves@redhat.com>
10483
10484 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10485 `step_over_finished' is true.
10486
644cebc9
PA
104872012-02-27 Pedro Alves <palves@redhat.com>
10488
10489 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10490 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10491
c14d7ab2
PA
104922012-02-27 Pedro Alves <palves@redhat.com>
10493
10494 PR server/9684
10495 * linux-low.c (pid_is_stopped): New.
10496 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10497
412c89dd
LM
104982012-02-25 Luis Machado <lgustavo@codesourcery.com>
10499
10500 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10501 of conditions.
10502
b745defe
MR
105032012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10504
10505 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10506
9f3a5c85
LM
105072012-02-24 Luis Machado <lgustavo@codesourcery>
10508
10509 * server.c (handle_query): Advertise support for target-side
10510 breakpoint condition evaluation.
10511 (process_point_options): New function.
10512 (process_serial_event): When inserting a breakpoint, check for
10513 a target-side condition that should be evaluated.
10514
10515 * mem-break.c: Include regcache.h and ax.h.
10516 (point_cond_list_t): New data structure.
10517 (breakpoint) <cond_list>: New field.
10518 (find_gdb_breakpoint_at): Make non-static.
10519 (delete_gdb_breakpoint_at): Clear any target-side
10520 conditions.
10521 (clear_gdb_breakpoint_conditions): New function.
10522 (add_condition_to_breakpoint): Likewise.
10523 (add_breakpoint_condition): Likewise.
10524 (gdb_condition_true_at_breakpoint): Likewise.
10525 (gdb_breakpoint_here): Return result directly instead
10526 of going through a local variable.
10527
10528 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10529 (clear_gdb_breakpoint_conditions): Likewise.
10530 (add_breakpoint_condition): Likewise.
10531 (gdb_condition_true_at_breakpoint): Likewise.
10532
10533 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10534 (need_step_over_p): Take target-side breakpoint condition into
10535 consideration.
10536
5e1dc496
LM
105372012-02-24 Luis Machado <lgustavo@codesourcery>
10538
10539 * server.h: Include tracepoint.h.
10540 (agent_mem_read, agent_get_trace_state_variable_value,
10541 agent_set_trace_state_variable_value,
10542 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10543 get_set_tsv_func_addr): New prototypes.
10544
10545 * ax.h: New include file.
10546 * ax.c: New source file.
10547
10548 * tracepoint.c: Include ax.h.
10549 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10550 agent_expr, eval_result_type): Move to ax.h.
10551 (parse_agent_expr): Rename to ...
10552 (gdb_parse_agent_expr): ... this, make it non-static and move
10553 to ax.h.
10554 (unparse_agent_expr) Rename to ...
10555 (gdb_unparse_agent_expr): ... this, make it non-static and move
10556 to ax.h.
10557 (eval_agent_expr): Rename to ...
10558 (eval_tracepoint_agent_expr): ... this.
10559 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10560 forward declarations.
10561 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10562 (agent_get_trace_state_variable_value): New function.
10563 (agent_set_trace_state_variable_value): New function.
10564 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10565 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10566 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10567 (condition_true_at_tracepoint): Likewise.
10568 (parse_agent_expr): Rename to ...
10569 (gdb_parse_agent_expr): ... this and move to ax.c.
10570 (unparse_agent_expr): Rename to ...
10571 (gdb_unparse_agent_expr): ... this and move to ax.c.
10572 (gdb_agent_op_name): Move to ax.c.
10573 (eval_agent_expr): Rename to ...
10574 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10575 and move to ax.c.
10576 (eval_tracepoint_agent_expr): New function.
10577 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10578 non-static.
5e1dc496
LM
10579 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10580 ax.c.
10581 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10582 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10583 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10584 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10585 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10586 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10587 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10588 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10589 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10590 (compile_bytecodes): Remove forward declaration.
10591 (is_goto_target): Move to ax.c.
10592 (compile_bytecodes): Move to ax.c and call
10593 agent_get_trace_state_variable_value (...) and
10594 agent_set_trace_state_variable_value (...).
10595
10596 * Makefile.in: Update ax.c and IPA dependencies.
10597
277e4e52
PA
105982012-02-24 Pedro Alves <palves@redhat.com>
10599
10600 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10601 (cmd_bigqtbuffer_circular): ... this. Only handle
10602 'QTBuffer:circular:'.
10603 (handle_tracepoint_general_set): Adjust.
10604
bf4c19f7
YQ
106052012-02-16 Yao Qi <yao@codesourcery.com>
10606
10607 * inferiors.c: Move code to ...
10608 * dll.c: .... here. New.
10609 * server.h: Declare clear_dlls.
10610 * Makefile.in (SFILES): Add dll.c.
10611 (OBS): Add dll.o
10612 (dll.o): New rule.
10613
d73f2619
YQ
106142012-02-11 Yao Qi <yao@codesourcery.com>
10615
10616 * server.c: (handle_monitor_command): Add a new parameter
10617 `own_buf'.
10618 (handle_query): Update caller.
10619
f8255c2a
JB
106202012-02-09 Joel Brobecker <brobecker@adacore.com>
10621
10622 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10623 * configure, config.in: Regenerate.
10624 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10625 is not defined.
10626
da84f473
PA
106272012-02-02 Pedro Alves <palves@redhat.com>
10628
10629 Try SIGKILL first, then PTRACE_KILL.
10630 * linux-low.c (linux_kill_one_lwp): New.
10631 (linux_kill_one_lwp): Rename to ...
10632 (kill_one_lwp_callback): ... this. Use the new
10633 linux_kill_one_lwp.
10634
e886a173
PA
106352012-02-02 Pedro Alves <palves@redhat.com>
10636
10637 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10638 inferior.
10639
be07f1a2
PA
106402012-01-27 Pedro Alves <palves@redhat.com>
10641
10642 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10643 (elf_64_file_p): Make static.
10644 (linux_pid_exe_is_elf_64_file): New.
10645 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10646 Delete declarations.
10647 (linux_pid_exe_is_elf_64_file): Declare.
10648 * linux-x86-low.c (x86_arch_setup): Use
10649 linux_pid_exe_is_elf_64_file.
10650
d8301ad1
JK
106512012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10652
10653 * linux-low.c (linux_wait_for_event_1): Rename to ...
10654 (linux_wait_for_event): ... here and merge it with former
10655 linux_wait_for_event - new variable wait_ptid, use it.
10656 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10657
01b17894
PA
106582012-01-23 Pedro Alves <palves@redhat.com>
10659
10660 * server.c (main): Avoid yet another case of infinite loop while
10661 detaching/killing after a longjmp.
10662
e825046f
JK
106632012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10664
10665 Code cleanup.
10666 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10667
b9e7b9c3
UW
106682012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10669
10670 * hostio.c (handle_readlink): New function.
10671 (handle_vFile): Call it to handle "vFile:readlink" packets.
10672
901f9912
UW
106732012-01-20 Pedro Alves <palves@redhat.com>
10674 Ulrich Weigand <ulrich.weigand@linaro.org>
10675
10676 * server.c (handle_v_requests): Only support vAttach and vRun to
10677 start multiple processes when in extended protocol mode.
10678
fc1ab1a0
PA
106792012-01-17 Pedro Alves <palves@redhat.com>
10680
10681 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10682 memalign plus mprotect to allocate the scratch buffer.
10683
7d5d4e98
PA
106842012-01-13 Pedro Alves <palves@redhat.com>
10685
10686 * server.c (attach_inferior): Clear `cont_thread'.
10687
f128d5e9
PA
106882012-01-13 Pedro Alves <palves@redhat.com>
10689
10690 * server.c (main): Avoid infinite loop while detaching/killing
10691 after a longjmp.
10692
06db92f0
DE
106932012-01-09 Doug Evans <dje@google.com>
10694
10695 * server.c (start_inferior): Set last_ptid in --wrapper case.
10696
32d92999
YQ
106972012-01-06 Yao Qi <yao@codesourcery.com>
10698
10699 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10700 defined.
10701 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10702
5e0a92a9
YQ
107032012-01-04 Yao Qi <yao@codesourcery.com>
10704
10705 * tracepoint.c (cmd_qtdp): Print debug message
10706 for static tracepoint.
10707
ae639e8c
YQ
107082012-01-04 Yao Qi <yao@codesourcery.com>
10709
10710 * tracepoint.c (trace_vdebug): Differentiate debug message
10711 between gdbserver and IPA.
10712
f72429c5
YQ
107132012-01-03 Yao Qi <yao@codesourcery.com>
10714
10715 * tracepoint.c (tracepoint_was_hit): Don't collect for
10716 static tracepoint.
10717
12c3e59c
JB
107182012-01-02 Joel Brobecker <brobecker@adacore.com>
10719
10720 * terminal.h: Reformat copyright header.
10721
67827812
JB
107222012-01-02 Joel Brobecker <brobecker@adacore.com>
10723
10724 * server.c (gdbserver_version): Update copyright year.
10725 * gdbreplay.c (gdbreplay_version): Likewise.
10726
3e52c33d
JK
107272011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10728
10729 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10730
10731 Revert:
10732 2011-12-18 Hui Zhu <teawater@gmail.com>
10733 * linux-low.c (linux_create_inferior): Save return value to ret.
10734
66f1260e
HZ
107352011-12-18 Hui Zhu <teawater@gmail.com>
10736
10737 * linux-low.c (linux_create_inferior): Save return value to ret.
10738
e77616d7
DE
107392011-12-16 Doug Evans <dje@google.com>
10740
e7b06c57
DE
10741 * linux-low.c (linux_create_inferior): If stdio connection,
10742 redirect stdin from /dev/null, stdout to stderr.
10743 * remote-utils.c (remote_is_stdio): New static global.
10744 (remote_connection_is_stdio): New function.
10745 (remote_prepare): Handle stdio connection.
10746 (remote_open): Ditto.
10747 (remote_close): Don't close stdin for stdio connections.
10748 (read_prim,write_prim): New functions. Replace all calls to
10749 read/write to these.
10750 * server.c (main): Watch for "-" argument. Move call to
10751 remote_prepare before start_inferior.
10752 * server.h (STDIO_CONNECTION_NAME): New macro.
10753 (remote_connection_is_stdio): Declare.
10754
e77616d7
DE
10755 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10756 in debugging output.
10757
82067193
YQ
107582011-12-15 Yao Qi <yao@codesourcery.com>
10759
10760 * tracepoint.c: Include sys/syscall.h.
10761 (gdb_ust_thread): Remove preprocessor conditional.
10762
82bfbe7e
PA
107632011-12-14 Pedro Alves <pedro@codesourcery.com>
10764
10765 * linux-low.c (linux_detach_one_lwp): Call
10766 the_low_target.prepare_to_resume before detaching.
10767
712c6575
YQ
107682011-12-14 Yao Qi <yao@codesourcery.com>
10769
10770 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10771 of write.
10772
d54d1edf
YQ
107732011-12-14 Yao Qi <yao@codesourcery.com>
10774
10775 * i386-low.c (i386_low_stopped_data_address): Initialize local
10776 variable `control'.
10777
6210a125
PA
107782011-12-13 Pedro Alves <pedro@codesourcery.com>
10779
10780 PR remote/13492
10781
10782 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10783 DR_CONTROL unless necessary. Extend comments.
10784 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10785 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10786
2ece8244
YQ
107872011-12-13 Yao Qi <yao@codesourcery.com>
10788
10789 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10790 macros.
10791 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10792
784867a5
JK
107932011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10794
10795 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10796 Print new debug message for such case.
10797
6bf36717
JK
107982011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10799
10800 Fix overlapping memcpy.
10801 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10802 the read_inferior_memory transfer.
10803 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10804 write_inferior_memory transfer.
10805 (set_fast_tracepoint_jump): New variable buf. Use it for the
10806 read_inferior_memory and write_inferior_memory transfers.
10807 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10808 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10809 Use it for the write_inferior_memory transfer.
10810 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10811 buffers.
10812
50275556
MR
108132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10814
10815 * linux-low.c (fetch_register, store_register): Make code
10816 consistent, fix formatting.
10817
7325beb4
MR
108182011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10819
10820 * linux-low.c (usr_store_inferior_registers): Factor out code
10821 to handle individual registers into...
10822 (store_register): ... this new function.
10823
c642a434
UW
108242011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10825
10826 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10827 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10828 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10829 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10830 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10831 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10832 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10833 (srv_xmlfiles): Add new XML files.
10834
10835 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10836 and <sys/uio.h>.
10837 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10838 (init_registers_s390_linux32v1): Add prototype.
10839 (init_registers_s390_linux32v2): Likewise.
10840 (init_registers_s390_linux64v1): Likewise.
10841 (init_registers_s390_linux64v2): Likewise.
10842 (init_registers_s390x_linux64v1): Likewise.
10843 (init_registers_s390x_linux64v2): Likewise.
10844 (s390_num_regs): Increment to 52.
10845 (s390_regmap): Add orig_r2 register.
10846 (s390_num_regs_3264): Increment to 68.
10847 (s390_regmap_3264): Add orig_r2 register.
10848 (s390_collect_ptrace_register): Handle orig_r2 register.
10849 (s390_supply_ptrace_register): Likewise.
10850 (s390_fill_last_break): New function.
10851 (s390_store_last_break): Likewise.
10852 (s390_fill_system_call): New function.
10853 (s390_store_system_call): Likewise.
10854 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10855 register sets.
10856 (s390_check_regset): New function.
10857 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10858 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10859 Update target_regsets for available register sets.
10860
2268b414
JK
108612011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10862 Jan Kratochvil <jan.kratochvil@redhat.com>
10863
10864 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10865 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10866 New.
10867 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10868 * linux-low.h (struct process_info_private): New member r_debug.
10869 * server.c (handle_qxfer_libraries): Call
10870 the_target->qxfer_libraries_svr4.
10871 (handle_qxfer_libraries_svr4): New function.
10872 (qxfer_packets): New entry "libraries-svr4".
10873 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10874 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10875 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10876 PACKET_qXfer_libraries_svr4.
10877
d6db1fab
UW
108782011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10879
10880 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10881 PSW address/mask between 8-byte and 16-byte formats.
10882 (s390_supply_ptrace_register): Likewise.
10883 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10884 basic addressing mode bit.
10885
242f5f1c
SS
108862011-11-24 Stan Shebs <stan@codesourcery.com>
10887
10888 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10889
f196051f
SS
108902011-11-17 Stan Shebs <stan@codesourcery.com>
10891
10892 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10893 (tracing_start_time): New global.
10894 (tracing_stop_time): New global.
10895 (tracing_user_name): New global.
10896 (tracing_notes): New global.
10897 (tracing_stop_note): New global.
10898 (cmd_qtstart): Set traceframe_usage, start_time.
10899 (stop_tracing): Set stop_time.
10900 (cmd_qtstatus): Report additional status.
10901 (cmd_qtp): New function.
10902 (handle_tracepoint_query): Call it.
10903 (cmd_qtnotes): New function.
10904 (handle_tracepoint_general_set): Call it.
10905 (get_timestamp): Rename from tsv_get_timestamp.
10906
405f8e94
SS
109072011-11-14 Stan Shebs <stan@codesourcery.com>
10908 Kwok Cheung Yeung <kcy@codesourcery.com>
10909
10910 * linux-x86-low.c (small_jump_insn): New.
10911 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10912 trampoline and error message, build a trampoline and issue a small
10913 jump instruction to it.
10914 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10915 trampoline and error message.
10916 (x86_get_min_fast_tracepoint_insn_len): New.
10917 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10918 * linux-low.h (struct linux_target_ops): Add arguments to
10919 install_fast_tracepoint_jump_pad operation, add new operation.
10920 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10921 arguments.
10922 (linux_get_min_fast_tracepoint_insn_len): New function.
10923 (linux_target_op): Add new operation.
10924 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10925 (gdb_trampoline_buffer_end): Ditto.
10926 (gdb_trampoline_buffer_error): Ditto.
10927 (struct ipa_sym_addresses): Add fields for new IPA variables.
10928 (symbol_list): Add entries for new IPA variables.
10929 (struct tracepoint): Add fields to hold the address range of the
10930 trampoline used by the tracepoint.
10931 (trampoline_buffer_head): New static variable.
10932 (trampoline_buffer_tail): Ditto.
10933 (claim_trampoline_space): New function.
10934 (have_fast_tracepoint_trampoline_buffer): New function.
10935 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10936 structure.
10937 (install_fast_tracepoint): Ditto, also add error buffer argument.
10938 (cmd_qtminftpilen): New function.
10939 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10940 (fast_tracepoint_from_trampoline_address): New function.
10941 (fast_tracepoint_collecting): Handle trampoline as part of jump
10942 pad space.
10943 (set_trampoline_buffer_space): New function.
10944 (initialize_tracepoint): Initialize new IPA variables.
10945 * target.h (struct target_ops): Add arguments to
10946 install_fast_tracepoint_jump_pad operation, add new
10947 get_min_fast_tracepoint_insn_len operation.
10948 (target_get_min_fast_tracepoint_insn_len): New.
10949 (install_fast_tracepoint_jump_pad): Add arguments.
10950 * server.h (IPA_BUFSIZ): Define.
10951 * linux-i386-ipa.c: Include extra header files.
10952 (initialize_fast_tracepoint_trampoline_buffer): New function.
10953 (initialize_low_tracepoint): Call it.
10954 * server.h (set_trampoline_buffer_space): Declare.
10955 (claim_trampoline_space): Ditto.
10956 (have_fast_tracepoint_trampoline_buffer): Ditto.
10957
1e4d1764
YQ
109582011-11-14 Yao Qi <yao@codesourcery.com>
10959
10960 * server.c (handle_query): Handle InstallInTrace for qSupported.
10961 * tracepoint.c (add_tracepoint): Sort list.
10962 (install_tracepoint, download_tracepoint): New.
10963 (cmd_qtdp): Call them to install and download tracepoints.
10964 (sort_tracepoints): Removed.
10965 (cmd_qtstart): Update.
10966
5c73ff4e
YQ
109672011-11-14 Yao Qi <yao@codesourcery.com>
10968
10969 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10970 * mem-break.h: Declare.
10971 * tracepoint.c (cmd_qtstart): Move some code to ...
10972 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10973 New.
10974 (download_tracepoints): Move some code to ...
10975 (download_tracepoint_1): ... here. New.
10976
86a30030
YQ
109772011-11-08 Yao Qi <yao@codesourcery.com>
10978
10979 * remote-utils.c (relocate_instruction): A comment fix.
10980
8d26e50c
JB
109812011-11-07 Joel Brobecker <brobecker@adacore.com>
10982
10983 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10984 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10985 dr_status_mirror and dr_control_mirror from debug_reg_state.
10986 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10987 (i386_initial_stuff): Remove use of deleted globals.
10988 (i386_get_thread_context, i386_set_thread_context,
10989 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10990 from debug_reg_state.
10991
a59306a3
YQ
109922011-11-05 Yao Qi <yao@codesourcery.com>
10993
10994 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10995 address as TPOINT's.
10996
3065dfb6
SS
109972011-11-02 Stan Shebs <stan@codesourcery.com>
10998
10999 * tracepoint.c (agent_mem_read_string): New function.
11000 (eval_agent_expr): Call it for tracenz.
11001 * server.c (handle_query): Report support for tracenz.
11002
fd0d8c7c
YQ
110032011-11-02 Yao Qi <yao@codesourcery.com>
11004
11005 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11006
609086b1
YQ
110072011-11-02 Yao Qi <yao@codesourcery.com>
11008
11009 * target.h: Fix a typo in comment.
11010
b9fd1791
PA
110112011-10-31 Pedro Alves <pedro@codesourcery.com>
11012
11013 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11014 clobber the breakpoints' shadows with fast tracepoint jumps.
11015 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11016 * target.c (write_inferior_memory): Also pass MYADDR down to
11017 check_mem_write.
11018
03583c20
UW
110192011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11020
11021 * configure.ac: Check support for personality routine.
11022 * configure: Regenerate.
11023 * config.in: Likewise.
11024 * linux-low.c: Include <sys/personality.h>.
11025 Define ADDR_NO_RANDOMIZE if necessary.
11026 (linux_create_inferior): Disable address space randomization when
11027 forking inferior, if requested.
11028 (linux_supports_disable_randomization): New function.
11029 (linux_target_ops): Install it.
11030 * server.h (disable_randomization): Declare.
11031 * server.c (disable_randomization): New global variable.
11032 (handle_general_set): Handle QDisableRandomization.
11033 (handle_query): Likewise for qSupported.
11034 (main): Support --disable-randomization and --no-disable-randomization
11035 command line arguments.
11036 * target.h (struct target_ops): Add supports_disable_randomization.
11037 (target_supports_disable_randomization): New macro.
11038
723b724b
MF
110392011-09-29 Mike Frysinger <vapier@gentoo.org>
11040
11041 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11042 ifdef check.
11043 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11044 [!PT_GETDSBT] (target_loadmap): New definition.
11045 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11046 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11047 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11048 and PT_GETDSBT to LINUX_LOADMAP.
11049 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11050 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11051
55329a5c 110522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11053
11054 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11055 (arm_linux_hwbp_cap): New static variable.
11056 (arm_linux_get_hwbp_cap): Replace by ...
11057 (arm_linux_init_hwbp_cap): ... this new function.
11058 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11059 (arm_linux_get_hw_watchpoint_count): Likewise.
11060 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11061 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11062 (arm_prepare_to_resume): Use perror_with_name instead of error.
11063
55329a5c 110642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11065
11066 * linux-arm-low.c: Include <signal.h>.
11067 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11068 (struct arm_linux_hwbp_cap): New data type.
11069 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11070 (struct arm_linux_hw_breakpoint): New data type.
11071 (MAX_BPTS, MAX_WPTS): Define.
11072 (struct arch_process_info, struct arch_lwp_info): New data types.
11073 (arm_linux_get_hwbp_cap): New function.
11074 (arm_linux_get_hw_breakpoint_count): Likewise.
11075 (arm_linux_get_hw_watchpoint_count): Likewise.
11076 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11077 (arm_hwbp_control_initialize): Likewise.
11078 (arm_hwbp_control_is_enabled): Likewise.
11079 (arm_hwbp_control_is_initialized): Likewise.
11080 (arm_hwbp_control_disable): Likewise.
11081 (arm_linux_hw_breakpoint_equal): Likewise.
11082 (arm_linux_hw_point_initialize): Likewise.
11083 (struct update_registers_data): New data structure.
11084 (update_registers_callback: New function.
11085 (arm_insert_point): Likewise.
11086 (arm_remove_point): Likewise.
11087 (arm_stopped_by_watchpoint): Likewise.
11088 (arm_stopped_data_address): Likewise.
11089 (arm_new_process): Likewise.
11090 (arm_new_thread): Likewise.
11091 (arm_prepare_to_resume): Likewise.
11092 (the_low_target): Register arm_insert_point, arm_remove_point,
11093 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11094 arm_new_thread, and arm_prepare_to_resume.
11095
6b9801d4
SS
110962011-09-15 Stan Shebs <stan@codesourcery.com>
11097
11098 * server.h (struct emit_ops): Add compare-goto fields.
11099 * tracepoint.c (gdb_agent_op_sizes): New table.
11100 (emit_eq_goto): New function.
11101 (emit_ne_goto): New function.
11102 (emit_lt_goto): New function.
11103 (emit_le_goto): New function.
11104 (emit_gt_goto): New function.
11105 (emit_ge_goto): New function.
11106 (is_goto_target): New function.
11107 (compile_bytecodes): Recognize special cases of compare-goto
11108 combinations and call specialized emitters for them.
11109 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11110 (amd64_emit_ne_goto): New function.
11111 (amd64_emit_lt_goto): New function.
11112 (amd64_emit_le_goto): New function.
11113 (amd64_emit_gt_goto): New function.
11114 (amd64_emit_ge_goto): New function.
11115 (amd64_emit_ops): Add the new functions.
11116 (i386_emit_eq_goto): New function.
11117 (i386_emit_ne_goto): New function.
11118 (i386_emit_lt_goto): New function.
11119 (i386_emit_le_goto): New function.
11120 (i386_emit_gt_goto): New function.
11121 (i386_emit_ge_goto): New function.
11122 (i386_emit_ops): Add the new functions.
11123
bf15cbda
SS
111242011-09-08 Stan Shebs <stan@codesourcery.com>
11125
11126 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11127 (i386_emit_epilogue): Restore %ebx.
11128
943ca1dd
JZ
111292011-08-31 Jie Zhang <jzhang918@gmail.com>
11130
11131 * server.c (step_thread): Remove definition.
11132 (process_serial_event): Don't handle Hs.
11133 * server.h (step_thread): Remove declaration.
11134 * target.c (set_desired_inferior): Remove use of step_thread.
11135
e3deef73
LM
111362011-08-24 Luis Machado <lgustavo@codesourcery.com>
11137
11138 * linux-low.c: Include linux-procfs.h.
11139 (linux_attach_lwp_1): Update comments.
11140 (linux_attach): Scan for existing threads when attaching to a
11141 process that is the tgid.
11142 * Makefile.in: Update dependencies.
11143
13da1c97
LM
111442011-08-24 Luis Machado <lgustavo@codesourcery.com>
11145
11146 * configure.srv: Add linux-procfs.o dependencies.
11147
881127c9
YQ
111482011-08-14 Yao Qi <yao@codesourcery.com>
11149
11150 * target.h (struct target_ops): Fix indent.
11151 * win32-low.c (win32_target_ops): Fix comment.
11152
58dbd541
YQ
111532011-08-14 Andrew Jenner <andrew@codesourcery.com>
11154 Yao Qi <yao@codesourcery.com>
11155
11156 * Makefile.in (clean): Remove tic6x-*.c files.
11157 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11158 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11159 (tic6x-c64xp-linux.c): Likewise.
11160 * configure.srv: Add support for tic6x-*-uclinux.
11161 * linux-tic6x-low.c: New.
11162 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11163
78d85199
YQ
111642011-08-14 Andrew Stubbs <ams@codesourcery.com>
11165 Yao Qi <yao@codesourcery.com>
11166
11167 * target.h (struct target_ops): Add read_loadmap.
11168 * linux-low.c (struct target_loadseg): New type.
11169 (struct target_loadmap): New type.
11170 (linux_read_loadmap): New function.
11171 (linux_target_ops): Add linux_read_loadmap.
11172 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11173 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11174 to NULL.
78d85199 11175
a959a88d
EZ
111762011-08-05 Eli Zaretskii <eliz@gnu.org>
11177
11178 * win32-low.c: Include <stdint.h>.
11179
1ced966e
PA
111802011-07-22 Pedro Alves <pedro@codesourcery.com>
11181
11182 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11183 to the inferior here.
11184 (i386_remove_aligned_watchpoint): Ditto.
11185 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11186 fit part of the watchpoint in the debug registers.
11187 (i386_update_inferior_debug_regs): New.
11188 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11189 registers, and only update the inferior on success.
11190 (i386_low_remove_watchpoint): Ditto.
11191
d26e3629
KY
111922011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11193
11194 * linux-low.c (compare_ints, unique, list_threads, show_process,
11195 linux_core_of_thread): Delete.
11196 (linux_target_ops): Change linux_core_of_thread to
11197 linux_common_core_of_thread.
11198 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11199 * utils.c (malloc_failure): Change type of argument.
11200 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11201 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11202 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11203 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11204 (IPA_OBJS): Add common-utils-ipa.o.
11205 (ptid_h, linux_osdata_h): New macros.
11206 (server_h): Add common/common-utils.h, common/xml-utils.h,
11207 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11208 common/ptid.h.
11209 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11210 ptid.o, buffer.o): New rules.
11211 (linux-low.o): Add common/linux-osdata.h as a dependency.
11212 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11213 * configure.ac: Add AC_HEADER_DIRENT check.
11214 * config.in: Regenerate.
11215 * configure: Regenerate.
11216 * remote-utils.c (xml_escape_text): Delete.
11217 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11218 buffer_xml_printf): Move to common/buffer.c.
11219 * server.c (main): Remove call to initialize_inferiors.
11220 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11221 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11222 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11223 internal_error, gdb_assert, gdb_assert_fail): Delete.
11224 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11225 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11226 common/buffer.h.
11227 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11228 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11229 initialize_inferiors): Delete.
11230
2275a1a7
PA
112312011-07-20 Pedro Alves <pedro@codesourcery.com>
11232
11233 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11234 symbol error.
11235
0a5b1e09
PA
112362011-05-31 Pedro Alves <pedro@codesourcery.com>
11237
11238 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11239 assertion.
11240 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11241
6938fd34
YQ
112422011-05-26 Yao Qi <yao@codesourcery.com>
11243
11244 * Makefile.in (thread-db.o): Track dependence to
11245 common/gdb_thread_db.h.
11246 * thread-db.c: include gdb_thread_db.h from right place.
11247
b481f9e0
TT
112482011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11249
11250 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11251 __FILE__ and __LINE__ to internal_error.
11252
98a5dd13
DE
112532011-05-13 Doug Evans <dje@google.com>
11254
11255 * thread-db.c (try_thread_db_load_from_sdir): New function.
11256 (try_thread_db_load_from_dir): New function.
11257 (thread_db_load_search): Handle $sdir, ignore $pdir.
11258 Remove trying of system directories if search of
11259 libthread-db-search-path fails, that is now done via $sdir.
11260
d248b706
KY
112612011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11262
11263 * server.c (handle_query): Add EnableDisableTracepoints to the list
11264 of supported features.
43aaf8b6 11265 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11266 tracepoints.
43aaf8b6
PA
11267 (cmd_qtenable_disable): New.
11268 (cmd_qtstart): Install tracepoints even if disabled.
11269 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11270 receiving a QTEnable or QTDisable packet.
11271 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11272 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11273 tracepoints.
11274 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11275
84e578fb
DE
112762011-05-10 Doug Evans <dje@google.com>
11277
11278 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11279
71f55dd8
DE
112802011-05-04 Doug Evans <dje@google.com>
11281
11282 * linux-low.c (linux_join): Skip process lookup.
11283 * spu-low.c (spu_join): Ditto.
11284 * server.c (join_inferiors_callback): Delete.
11285 (process_serial_event): For 'D' packet (detach) call join_inferior
11286 directly.
11287
4d393d60
JM
112882011-05-04 Joseph Myers <joseph@codesourcery.com>
11289
11290 * README: Don't mention xscale*-*-linux*.
11291 * configure.srv (xscale*-*-linux*): Don't handle target.
11292
b00ad6ff
NF
112932011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11294
11295 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11296 casting pointers.
11297 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11298 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11299 (i386_emit_void_call_2): Likewise.
11300
af96c192
YQ
113012011-04-26 Yao Qi <yao@codesourcery.com>
11302
43aaf8b6
PA
11303 * linux-low.c: Move common macros to linux-ptrace.h.
11304 Include linux-ptrace.h.
af96c192
YQ
11305 * Makefile.in (linux_ptrace_h): New.
11306 (linux-low.o): Depends on linux-ptrace.h.
11307
03f2bd59
JK
113082011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11309
11310 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11311 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11312 (remote_prepare): New function with most of the TCP code from ...
11313 (remote_open): ... here. Detect PORT here unconditionally. Move also
11314 setting transport_is_reliable.
11315 * server.c (run_once): New variable.
11316 (gdbserver_usage): Document it.
11317 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11318 the first run if RUN_ONCE.
11319 * server.h (run_once, remote_prepare): New declarations.
11320
7a9dd1b2
TT
113212011-04-19 Tom Tromey <tromey@redhat.com>
11322
11323 * win32-low.c (handle_load_dll): Remove duplicate "the".
11324
81239425
PM
113252011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11326
11327 Remove support for old Cygwin 1.5 versions.
11328 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11329 function to avoid warning.
11330 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11331 warning.
11332
9e0627f1
PM
113332011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11334
11335 * gdbserver/server.h (Macro _): Define it if not available.
11336
588eebee
MS
113372011-03-14 Michael Snyder <msnyder@vmware.com>
11338
348af9f7 11339 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11340
43f70d4c
JB
113412011-03-10 Joel Brobecker <brobecker@adacore.com>
11342
11343 * Makefile.in (maintainer-clean realclean distclean): Remove
11344 "make ... subdir_do" command.
11345
348af9f7
MS
113462011-03-10 Michael Snyder <msnyder@vmware.com>
11347
11348 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11349
11350 * server.c (handle_v_run): Free alloced buffer on early return.
11351
e637a4f5
YQ
113522011-03-09 Yao Qi <yao@codesourcery.com>
11353
11354 Revert:
11355 2011-03-04 Yao Qi <yao@codesourcery.com>
11356
11357 * Makefile.in: Remove GNU make feature --directory.
11358
11359 2011-03-05 Yao Qi <yao@codesourcery.com>
11360
11361 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11362 (subdir_do): New make target. Copied from gdb/Makefile.
11363 (maintainer-clean, realclean, distclean, clean): Call corresponding
11364 make targets in common/Makefile.
11365
11366 2011-02-11 Yao Qi <yao@codesourcery.com>
11367
11368 * configure.ac: Call AC_PROG_RANLIB.
11369 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11370 * configure: Regenerate.
11371
e6edda56
JK
113722011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11373
11374 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11375
e5141119
JB
113762011-03-06 Yao Qi <yao@codesourcery.com>
11377
11378 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11379
64794aa4
JB
113802011-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
7a762829
YQ
113872011-03-04 Yao Qi <yao@codesourcery.com>
11388
11389 * Makefile.in: Remove GNU make feature --directory.
11390
348af9f7
MS
113912011-03-04 Michael Snyder <msnyder@vmware.com>
11392
11393 * server.c (queue_stop_reply): Call xmalloc not malloc.
11394
113952011-03-02 Michael Snyder <msnyder@vmware.com>
11396
11397 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11398
9f72fee2
MS
113992011-02-28 Michael Snyder <msnyder@vmware.com>
11400
588eebee
MS
11401 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11402 (cmd_qtframe): Ditto.
11403 (cmd_qtbuffer): Ditto.
11404 (cmd_bigqtbuffer): Ditto.
11405
9f72fee2
MS
11406 * utils.c (decimal2str): Initialize 'width' to nine, then
11407 don't mess with it.
11408
8040bd49
UW
114092011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11410
11411 * hostio.c (require_data): Free *data, not data.
11412
7e52cbd0
JK
114132011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11414
11415 * hostio.c (require_data): Use free, not xfree.
11416
9130f83e
MS
114172011-02-27 Michael Snyder <msnyder@vmware.com>
11418
4b812f4e
MS
11419 * server.c (handle_query): Discard unused value.
11420
9130f83e
MS
11421 * hostio.c (require_data): Free malloc memory before returning
11422 error.
11423
69d37113
MS
114242011-02-26 Michael Snyder <msnyder@vmware.com>
11425
11426 * linux-low.c (list_threads): Call closedir for dirent.
11427
35f5825a
MS
114282011-02-27 Michael Snyder <msnyder@vmware.com>
11429
2a589cef
MS
11430 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11431 a case statement falls through.
11432
0adea5f7
MS
11433 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11434
35f5825a
MS
11435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11436 in comparison.
11437
238f1c74
MS
114382011-02-26 Michael Snyder <msnyder@vmware.com>
11439
11440 * utils.c (decimal2str): Eliminate dead code and dead param.
11441 (pulongest): Drop dead param from call to decimal2str.
11442 (plongest): Ditto.
11443
633ff500
JB
114442011-02-24 Joel Brobecker <brobecker@adacore.com>
11445
11446 Revert the following patch (not approved yet):
11447 2011-02-21 Hui Zhu <teawater@gmail.com>
11448 * tracepoint.c (tp_printf): New function.
11449 (eval_agent_expr): Handle gdb_agent_op_printf.
11450
f9c6ff72
HZ
114512011-02-21 Hui Zhu <teawater@gmail.com>
11452
11453 * tracepoint.c (tp_printf): New function.
11454 (eval_agent_expr): Handle gdb_agent_op_printf.
11455
94d5e490
TT
114562011-02-18 Tom Tromey <tromey@redhat.com>
11457
11458 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11459 (tracepoint.o): Likewise.
11460 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11461 (gdb_agent_op_names): Likewise.
11462
c7f96d2b
TT
114632011-02-18 Tom Tromey <tromey@redhat.com>
11464
11465 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11466 gdb_agent_op_rot>: New constants.
11467 (gdb_agent_op_names): Add pick and roll.
11468 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11469 cases.
11470
0feedb2c
JK
114712011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11472
11473 * aclocal.m4: Regenerated with aclocal-1.11.1.
11474
b3b9301e
PA
114752011-02-14 Pedro Alves <pedro@codesourcery.com>
11476
11477 * server.c (handle_qxfer_traceframe_info): New.
11478 (qxfer_packets): Register "traceframe-info".
11479 (handle_query): Report support for qXfer:traceframe-info:read+.
11480 * tracepoint.c (match_blocktype): New.
11481 (traceframe_find_block_type): Rename to ...
11482 (traceframe_walk_blocks): ... this. Add callback filter argument,
11483 and use it.
11484 (traceframe_find_block_type): New, reimplemented on top of
11485 traceframe_walk_blocks.
11486 (build_traceframe_info_xml): New.
11487 (traceframe_read_info): New.
11488 * server.h (traceframe_read_info): Declare.
11489
4f3e6fb7
YQ
114902011-02-11 Yao Qi <yao@codesourcery.com>
11491
11492 * configure.ac: Call AC_PROG_RANLIB.
11493 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11494 * configure: Regenerate.
11495
764880b7
PA
114962011-02-07 Pedro Alves <pedro@codesourcery.com>
11497
11498 * server.c (gdb_read_memory): Change return semantics to allow
11499 partial transfers.
11500 (handle_search_memory_1): Adjust.
11501 (process_serial_event) <'m' packet>: Handle partial transfers.
11502 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11503
1c79eb8a
PA
115042011-01-28 Pedro Alves <pedro@codesourcery.com>
11505
11506 * regcache.c (init_register_cache): Initialize
11507 regcache->register_status.
11508 (free_register_cache): Release regcache->register_status.
11509 (regcache_cpy): Copy register_status.
11510 (registers_to_string): Print 'x's for unavailable registers.
11511 (supply_register): Mark the register's status valid or
11512 unavailable, depending on whether a buffer was passed in or not.
11513 (supply_register_zeroed): New.
11514 (supply_regblock): Mark the registers' status valid or
11515 unavailable, depending on whether a buffer was passed in or not.
11516 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11517 (struct regcache): New `register_status' field.
11518 (supply_register_zeroed): Declare.
11519 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11520 supply_register_zeroed, rather than passing a NULL buffer to
11521 supply_register.
11522 * tracepoint.c (fetch_traceframe_registers): Update comment.
11523
85724a0e
PA
115242011-01-28 Pedro Alves <pedro@codesourcery.com>
11525
11526 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11527 buffer explicit.
11528
d08aafef
PA
115292011-01-25 Pedro Alves <pedro@codesourcery.com>
11530
11531 * server.h (decode_xfer_write): Change prototype.
11532 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11533 and don't extract the annex here.
11534 * server.c (decode_xfer_read): Remove `annex' parameter,
11535 and don't extract the annex here.
11536 (decode_xfer): New.
11537 (struct qxfer): New.
11538 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11539 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11540 (handle_qxfer_statictrace): New functions, abstracted out from
11541 handle_query, and made to use the struct qxfer interface.
11542 (handle_threads_qxfer_proper): Rename to ...
11543 (handle_qxfer_threads_proper): ... this.
11544 (handle_threads_qxfer): Rename to ...
11545 (handle_qxfer_threads): ... this. Adjust.
11546 (qxfer_packets): New array.
11547 (handle_qxfer): New function.
11548 (handle_query): Use handle_qxfer.
11549
493e2a69
MS
115502011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11551
11552 * gdbreplay.c: Shorten lines of >= 80 columns.
11553 * linux-low.c: Ditto.
11554 * linux-ppc-low.c: Ditto.
11555 * linux-s390-low.c: Ditto.
11556 * linux-sparc-low.c: Ditto.
11557 * linux-x86-low.c: Ditto.
11558 * linux-xtensa-low.c: Ditto.
11559 * mem-break.c: Ditto.
11560 * nto-low.c: Ditto.
11561 * regcache.h: Ditto.
11562 * remote-utils.c: Ditto.
11563 * server.c: Ditto.
11564 * server.h: Ditto.
11565 * thread-db.c: Ditto.
11566 * tracepoint.c: Ditto.
11567 * utils.c: Ditto.
11568 * win32-low.h: Ditto.
11569
44944448
JB
115702011-01-05 Joel Brobecker <brobecker@adacore.com>
11571
11572 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11573 update.
11574
71ce852c
JB
115752011-01-01 Joel Brobecker <brobecker@adacore.com>
11576
11577 * server.c (gdbserver_version): Update copyright year in version
11578 output.
11579 * gdbreplay.c (gdbreplay_version): Ditto.
11580
eb826dc6
MF
115812010-12-29 Jie Zhang <jie.zhang@analog.com>
11582
11583 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11584 * linux-bfin-low.c: New file.
11585 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11586 PT_DATA_ADDR for BFIN targets.
11587 * Makefile.in (SFILES): Add linux-bfin-low.c.
11588 (clean): Remove reg-bfin.c.
11589 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11590 * README: Mention supported Blackfin targets.
11591
39ab222a
MF
115922010-12-23 Mike Frysinger <vapier@gentoo.org>
11593
11594 * .gitignore: New file.
11595
a1f2ce7d
MF
115962010-11-16 Mike Frysinger <vapier@gentoo.org>
11597
11598 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11599
f474844c
JZ
116002010-10-22 Jie Zhang <jie@codesourcery.com>
11601
11602 * Makefile.in: Add FLAGS_TO_PASS variable.
11603 (install): Remove dependency of install-only and recursively
11604 invoke make for install-only.
11605
f1048712
DE
116062010-10-04 Doug Evans <dje@google.com>
11607
11608 * Makefile.in (uninstall): Use $(DESTDIR).
11609
b53a1623
PA
116102010-09-24 Pedro Alves <pedro@codesourcery.com>
11611
e6ee044d
PA
11612 PR gdb/11842
11613
b53a1623
PA
11614 * linux-x86-low.c (compat_siginfo_from_siginfo)
11615 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11616 si_code is < 0. Check for si_code == SI_TIMER before checking for
11617 si_code < 0.
11618
fa1bd1e4
JB
116192010-09-13 Joel Brobecker <brobecker@adacore.com>
11620
11621 * lynx-i386-low.c: New file.
11622 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11623
47fac8f8
JB
116242010-09-13 Joel Brobecker <brobecker@adacore.com>
11625
11626 * lynx-low.c (ptrace_request_to_str): Remove handling for
11627 request values that have been removed in LynxOS 5.x.
11628
1adfc54d
JB
116292010-09-13 Joel Brobecker <brobecker@adacore.com>
11630
11631 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11632 <ptrace.h>
11633
c2a66c29
NS
116342010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11635
11636 * configure.ac: Add --enable-inprocess-agent option.
11637 * configure: Rebuilt.
11638
32fcada3
YQ
116392010-09-06 Yao Qi <yao@codesourcery.com>
11640
11641 * linux-low.c (linux_kill): Remove unused variable.
11642 (linux_stabilize_threads): Likewise.
11643 * server.c (start_inferior): Likewise.
11644 (queue_stop_reply_callback): Likewise.
11645 * tracepoint.c (do_action_at_tracepoint): Likewise.
11646
0cccb683
YQ
116472010-09-06 Yao Qi <yao@codesourcery.com>
11648
11649 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11650 on return.
11651
423ec54c
JK
116522010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11653
11654 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11655
12ac6819
PA
116562010-09-06 Pedro Alves <pedro@codesourcery.com>
11657
11658 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11659 "$(IPA_DEPFILES)".
11660
8ed54b31
JB
116612010-09-01 Joel Brobecker <brobecker@adacore.com>
11662
11663 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11664 gdbserver/lynx-ppc-low.c: New files.
11665 * Makefile.in (lynx_low_h): New variable.
11666 (lynx-low.o, lynx-ppc-low.o): New rules.
11667 * configure.ac: On LynxOS, link with -lnetinet.
11668 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11669 * configure: regenerate.
11670
bb0116a4
JB
116712010-09-01 Joel Brobecker <brobecker@adacore.com>
11672
11673 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11674 * configure.ac: Add check for vasprintf and vsnprintf.
11675 * configure, config.in: Regenerate.
11676 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11677
a778ab81 116782010-09-01 Joel Brobecker <brobecker@adacore.com>
11679
11680 * gdbreplay.c: Move include of alloca.h up, next to include of
11681 malloc.h.
11682 * server.h: Add include of malloc.h.
11683 * mem-break.c: Remove include of malloc.h.
11684 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11685
8b034a19 116862010-09-01 Joel Brobecker <brobecker@adacore.com>
11687
11688 * Makefile.in (memmem.o): Build with -Wno-error.
11689
116902010-09-01 Joel Brobecker <brobecker@adacore.com>
11691
11692 * utils.c (xsnprintf): Make non-static.
11693 * server.h: Add xsnprintf declaration.
11694 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11695 replace calls to snprintf by calls to xsnprintf throughout.
11696
116972010-09-01 Joel Brobecker <brobecker@adacore.com>
11698
11699 * configure.ac: Add configure check for alloca.
11700 * configure, config.in: Regenerate.
11701 * server.h: Include alloca.h if it exists.
11702 * gdbreplay.c: Include alloca.h if it exists.
11703
1a981360
PA
117042010-08-28 Pedro Alves <pedro@codesourcery.com>
11705
11706 * linux-low.c (__SIGRTMIN): Define if not already defined.
11707 (linux_create_inferior): Check for __ANDROID__ rather than
11708 __SIGRTMIN.
11709 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11710 are already deferred.
11711 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11712 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11713 stopped and already has a pending signal to report.
11714 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11715 a pending signal to report or is moving out of a jump pad.
11716 (linux_init_signals): Check for __ANDROID__ rather than
11717 __SIGRTMIN.
11718
b4d51a55
PA
117192010-08-28 Pedro Alves <pedro@codesourcery.com>
11720
11721 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11722 debug_threads check. Avoid a linear search when not doing debug
11723 output.
11724
ec48365d
PA
117252010-08-27 Pedro Alves <pedro@codesourcery.com>
11726
11727 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11728 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11729 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11730 (process_event): Change local fd's type to gdb_fildes_t.
11731 (create_file_handler): Adjust prototype.
11732 (delete_file_handler): Adjust prototype.
11733 (handle_file_event): Adjust prototype. Use pfildes.
11734 (create_file_event): Adjsut prototype.
11735 * remote-utils.c (remote_desc, listen_desc): Change type to
11736 gdb_fildes_t.
11737 * server.h: New gdb_fildes_t typedef.
11738 [USE_WIN32API]: Include winsock2.h.
11739 (delete_file_handler, add_file_handler): Adjust prototypes.
11740 (pfildes): Declare.
11741 * utils.c (pfildes): New.
11742
854d88f0
PA
117432010-08-27 Pedro Alves <pedro@codesourcery.com>
11744
11745 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11746 * configure: Regenerate.
11747
0146f85b
PA
117482010-08-27 Pedro Alves <pedro@codesourcery.com>
11749
11750 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11751 (linux_done_accessing_memory): ... this.
11752 (linux_target_ops): Adjust.
11753 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11754 * nto-low.c (nto_target_ops): Adjust comment.
11755 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11756 * spu-low.c (spu_target_ops): Adjust comment.
11757 * target.h (target_ops): Rename unprepare_to_access_memory field
11758 to done_accessing_memory.
11759 (unprepare_to_access_memory): Rename to ...
11760 (done_accessing_memory): ... this.
11761
90d74c30
PA
117622010-08-26 Pedro Alves <pedro@codesourcery.com>
11763
11764 * linux-low.c (linux_prepare_to_access_memory): New.
11765 (linux_unprepare_to_access_memory): New.
11766 (linux_target_ops): Install them.
11767 * server.c (read_memory): Rename to ...
11768 (gdb_read_memory): ... this. Use
11769 prepare_to_access_memory/prepare_to_access_memory.
11770 (write_memory): Rename to ...
11771 (gdb_write_memory): ... this. Use
11772 prepare_to_access_memory/prepare_to_access_memory.
11773 (handle_search_memory_1): Adjust.
11774 (process_serial_event): Adjust.
11775 * target.h (struct target_ops): New fields
11776 prepare_to_access_memory and unprepare_to_access_memory.
11777 (prepare_to_access_memory, unprepare_to_access_memory): New.
11778 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11779 prepare_to_access_memory/prepare_to_access_memory.
11780 * nto-low.c (nto_target_ops): Adjust.
11781 * spu-low.c (spu_target_ops): Adjust.
11782 * win32-low.c (win32_target_ops): Adjust.
11783
fd467969
PA
117842010-08-26 Pedro Alves <pedro@codesourcery.com>
11785
11786 * Makefile.in (WARN_CFLAGS): Get it from configure.
11787 (WERROR_CFLAGS): New.
11788 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11789 * configure.ac: Introduce --enable-werror, which adds -Werror to
11790 the compiler command line. Enabled by default. Disable with
11791 --disable-werror. Add -Wdeclaration-after-statement
11792 Wpointer-arith and -Wformat-nonliteral to warning flags.
11793 * configure: Regenerate.
11794
331e2f5f
PA
117952010-08-26 Pedro Alves <pedro@codesourcery.com>
11796
11797 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11798
e581f2b4
PA
117992010-08-26 Pedro Alves <pedro@codesourcery.com>
11800
11801 * gdbreplay.c (remote_error): New.
11802 (gdbchar): New.
11803 (expect): Use gdbchar. Check for error reading from GDB.
11804 Clarify sync error output.
11805 (play): Check for errors writing to GDB.
11806 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11807 * remote-utils.c (getpkt): Check for errors writing to the remote
11808 descriptor.
11809
3c11dd79
PA
118102010-08-25 Pedro Alves <pedro@codesourcery.com>
11811
11812 * linux-low.c (linux_wait_1): Move non-debugging code out of
11813 `debug_threads' control.
11814
d20a8ad9
PA
118152010-08-25 Pedro Alves <pedro@codesourcery.com>
11816
11817 * linux-low.c (linux_wait_1): Don't set last_status here.
11818 * server.c (push_event, queue_stop_reply_callback): Assert we're
11819 not pushing a TARGET_WAITKIND_IGNORE event.
11820 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11821 (myresume, handle_target_event): Set the thread's last_resume_kind
11822 and last_status from the target returned status.
11823
964e4306
PA
118242010-08-25 Pedro Alves <pedro@codesourcery.com>
11825
11826 PR threads/10729
11827
11828 * linux-x86-low.c (update_debug_registers_callback): New.
11829 (i386_dr_low_set_addr): Use it.
11830 (i386_dr_low_get_addr): New.
11831 (i386_dr_low_set_control): Use update_debug_registers_callback.
11832 (i386_dr_low_get_control): New.
11833 (i386_dr_low_get_status): Adjust.
11834 * linux-low.c (linux_stop_lwp): New.
11835 * linux-low.h (linux_stop_lwp): Declare.
11836
11837 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11838 argument instead of a i386_debug_reg_state.
11839 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11840 a i386_debug_reg_state.
11841 (i386_insert_aligned_watchpoint): Adjust.
11842 (i386_remove_aligned_watchpoint): Adjust.
11843 (i386_low_stopped_data_address): Read the debug registers from the
11844 inferior instead of from the mirrors.
11845 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11846 (i386_dr_low_get_addr): Declare.
11847 (i386_dr_low_get_control): Declare.
11848 (i386_dr_low_get_status): Change prototype.
11849
11850 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11851 (i386_dr_low_get_addr): New.
11852 (i386_dr_low_get_control): New.
11853 (i386_dr_low_get_status): Adjust prototype. Return
11854 dr_status_mirror.
11855 (i386_initial_stuff): Clear dr_status_mirror and
11856 dr_control_mirror.
11857 (i386_get_thread_context): Adjust.
11858 (i386_set_thread_context): Adjust.
11859 (i386_thread_added): Adjust.
11860
5f21a75b
PA
118612010-08-24 Pedro Alves <pedro@codesourcery.com>
11862
11863 * linux-low.h (linux_thread_area): Delete declaration.
11864
3e4c1235
TS
118652010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11866
11867 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11868 after its termination.
11869
1971b033
PA
118702010-08-09 Pedro Alves <pedro@codesourcery.com>
11871
11872 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11873 (gdb_wants_all_stopped): Delete.
11874 (linux_wait_1): Don't call them.
11875 * server.c (handle_v_cont): Tag all threads as want-stopped.
11876 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11877 stopped as "client-wants-stopped".
11878
310444ac
PA
118792010-07-31 Pedro Alves <pedro@codesourcery.com>
11880
11881 * Makefile.in (signals_h): New.
11882 (server_h): Depend on it.
11883 (server.o): Don't depend on $(signals_def).
11884 (signals.o): Depend on $(signals_def).
11885
a19cae16
JK
118862010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11887
11888 * Makefile.in (signals_def): New.
11889 (server_h): Append include/gdb/signals.h and signals_def.
11890 (server.o): Append signals_def.
11891
30d50328
JK
118922010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11893
11894 * server.c (handle_target_event): Use target_signal_to_host for
11895 resume_info.sig initialization.
11896 * target.h (struct thread_resume) <sig>: New comment.
11897
5c3216e2
OS
118982010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11899
c6f46ca0
OS
11900 * server.c (handle_query): strcpy() the returned string from paddress()
11901 instead of sprintf().
5c3216e2
OS
11902 * utils.c (paddress): Return phex_nz().
11903
6bd31874
JB
119042010-07-07 Joel Brobecker <brobecker@adacore.com>
11905
11906 * server.c (handle_v_cont): Call mourn_inferior if process
11907 just exited.
11908 (myresume): Likewise.
11909
0fb4aa4b
PA
119102010-07-01 Pedro Alves <pedro@codesourcery.com>
11911
11912 Static tracepoints, and integration with UST.
11913
11914 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11915 * mem-break.c (uninsert_all_breakpoints)
11916 (reinsert_all_breakpoints): New.
11917 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11918 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11919 (gdb_agent_ust_loaded, helper_thread_id)
11920 (gdb_agent_helper_thread_id): New macros.
11921 (struct ipa_sym_addresses): Add addr_ust_loaded,
11922 addr_helper_thread_id, addr_cmd_buf.
11923 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11924 (in_process_agent_loaded_ust): New.
11925 (write_e_ust_not_loaded): New.
11926 (maybe_write_ipa_ust_not_loaded): New.
11927 (struct collect_static_trace_data_action): New.
11928 (enum tracepoint_type) <static_tracepoint>: New.
11929 (struct tracepoint) <handle>: Mention static tracepoints.
11930 (struct static_tracepoint_ctx): New.
11931 (CMD_BUF_SIZE): New.
11932 (add_tracepoint_action): Handle static tracepoint actions.
11933 (unprobe_marker_at): New.
11934 (clear_installed_tracepoints): Handle static tracepoints.
11935 (cmd_qtdp): Handle static tracepoints.
11936 (probe_marker_at): New.
11937 (cmd_qtstart): Handle static tracepoints.
11938 (response_tracepoint): Handle static tracepoints.
11939 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11940 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11941 (get_context_regcache): Handle static tracepoints.
11942 (do_action_at_tracepoint): Handle static tracepoint actions.
11943 (traceframe_find_block_type): Handle static trace data blocks.
11944 (traceframe_read_sdata): New.
11945 (download_tracepoints): Download static tracepoint actions.
11946 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11947 (GDB_PROBE_NAME): New.
11948 (ust_ops): New.
11949 (GET_UST_SYM): New.
11950 (USTF): New.
11951 (dlsym_ust): New.
11952 (ust_marker_to_static_tracepoint): New.
11953 (gdb_probe): New.
11954 (collect_ust_data_at_tracepoint): New.
11955 (gdb_ust_probe): New.
11956 (UNIX_PATH_MAX, SOCK_DIR): New.
11957 (gdb_ust_connect_sync_socket): New.
11958 (resume_thread, stop_thread): New.
11959 (run_inferior_command): New.
11960 (init_named_socket): New.
11961 (gdb_ust_socket_init): New.
11962 (cstr_to_hexstr): New.
11963 (next_st): New.
11964 (first_marker, next_marker): New.
11965 (response_ust_marker): New.
11966 (cmd_qtfstm, cmd_qtsstm): New.
11967 (unprobe_marker_at, probe_marker_at): New.
11968 (cmd_qtstmat, gdb_ust_thread): New.
11969 (gdb_ust_init): New.
11970 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11971 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11972 (ST_REGENTRY): New.
11973 (x86_64_st_collect_regmap): New.
11974 (X86_64_NUM_ST_COLLECT_GREGS): New.
11975 (AMD64_RIP_REGNUM): New.
11976 (supply_static_tracepoint_registers): New.
11977 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11978 (ST_REGENTRY): New.
11979 (i386_st_collect_regmap): New.
11980 (i386_NUM_ST_COLLECT_GREGS): New.
11981 (supply_static_tracepoint_registers): New.
11982 * server.c (handle_query): Handle qXfer:statictrace:read.
11983 <qSupported>: Report support for StaticTracepoints, and
11984 qXfer:statictrace:read features.
11985 * server.h (traceframe_read_sdata)
11986 (supply_static_tracepoint_registers): Declare.
11987 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11988 (unpack_varlen_hex): Include in IPA build.
11989 * Makefile.in (ustlibs, ustinc): New.
11990 (IPA_OBJS): Add remote-utils-ipa.o.
11991 ($(IPA_LIB)): Link -ldl and -lpthread.
11992 (UST_CFLAGS): New.
11993 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11994 * config.in, configure: Regenerate.
11995
9e4344e5
PA
119962010-06-20 Ian Lance Taylor <iant@google.com>
11997 Pedro Alves <pedro@codesourcery.com>
11998
11999 * linux-x86-low.c (always_true): Delete.
12000 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12001 trying to fool the compiler with always_true.
12002
c6beb2cb
PA
120032010-06-20 Pedro Alves <pedro@codesourcery.com>
12004
12005 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12006 conditions in gdbserver.
12007
d2ed6730
UW
120082010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12009
12010 * spu-low.c (spu_read_memory): Wrap around local store limit.
12011 (spu_write_memory): Likewise.
12012
4e29fb54
PA
120132010-06-15 Pedro Alves <pedro@codesourcery.com>
12014
12015 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12016 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12017 LONGEST uses.
12018 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12019 uses.
12020 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12021 uses with LONGEST uses.
12022
6a271cae
PA
120232010-06-14 Stan Shebs <stan@codesourcery.com>
12024 Pedro Alves <pedro@codesourcery.com>
12025
12026 Bytecode compiler.
12027
12028 * linux-x86-low.c: Include limits.h.
12029 (add_insns): New.
12030 (always_true): New.
12031 (EMIT_ASM): New.
12032 (EMIT_ASM32): New.
12033 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12034 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12035 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12036 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12037 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12038 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12039 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12040 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12041 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12042 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12043 (amd64_emit_void_call_2): New.
12044 (amd64_emit_ops): New.
12045 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12046 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12047 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12048 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12049 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12050 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12051 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12052 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12053 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12054 (i386_emit_stack_adjust, i386_emit_int_call_1)
12055 (i386_emit_void_call_2): New.
12056 (i386_emit_ops): New.
12057 (x86_emit_ops): New.
12058 (the_low_target): Install x86_emit_ops.
12059 * server.h (struct emit_ops): New.
12060 (get_raw_reg_func_addr): Declare.
12061 (current_insn_ptr, emit_error): Declare.
12062 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12063 (set_trace_state_variable_value): New defines.
12064 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12065 addr_get_trace_state_variable_value and
12066 addr_set_trace_state_variable_value.
12067 (symbol_list): New fields for get_raw_reg,
12068 get_trace_state_variable_value and set_trace_state_variable_value.
12069 (condfn): New typedef.
12070 (struct tracepoint): New field `compiled_cond'.
12071 (do_action_at_tracepoint): Clear compiled_cond.
12072 (get_trace_state_variable_value, set_trace_state_variable_value):
12073 Export in the IPA.
12074 (condition_true_at_tracepoint): If there's a compiled condition,
12075 run that.
12076 (current_insn_ptr, emit_error): New globals.
12077 (struct bytecode_address): New.
12078 (get_raw_reg_func_addr): New.
12079 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12080 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12081 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12082 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12083 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12084 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12085 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12086 (compile_tracepoint_condition, compile_bytecodes): New.
12087 * target.h (emit_ops): Forward declare.
12088 (struct target_ops): New field emit_ops.
12089 (target_emit_ops): New.
12090 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12092 * linux-low.c (linux_emit_ops): New.
12093 (linux_target_ops): Install it.
12094 * linux-low.h (struct linux_target_ops): New field emit_ops.
12095
92b72907
UW
120962010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12097
12098 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12099 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12100
fa593d66
PA
121012010-06-01 Pedro Alves <pedro@codesourcery.com>
12102 Stan Shebs <stan@codesourcery.com>
12103
12104 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12105 (all): Depend on $(extra_libraries).
12106 (install-only): Install the IPA.
12107 (IPA_OBJS, IPA_LIB): New.
12108 (clean): Remove the IPA lib.
12109 (IPAGENT_CFLAGS): New.
12110 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12111 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12112 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12113 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12114 * configure.ac: Check for atomic builtins support in the compiler.
12115 (IPA_DEPFILES, extra_libraries): Define.
12116 * configure.srv (ipa_obj): Add description.
12117 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12118 (i[34567]86-*-linux*): Set ipa_obj.
12119 (x86_64-*-linux*): Set ipa_obj.
12120 * linux-low.c (stabilizing_threads): New.
12121 (supports_fast_tracepoints): New.
12122 (linux_detach): Stabilize threads before detaching.
12123 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12124 the lwp is either not stabilizing, or is moving out of a jump pad.
12125 (linux_fast_tracepoint_collecting): New.
12126 (maybe_move_out_of_jump_pad): New.
12127 (enqueue_one_deferred_signal): New.
12128 (dequeue_one_deferred_signal): New.
12129 (linux_wait_for_event_1): If moving out of a jump pad, defer
12130 pending signals to later.
12131 (linux_stabilize_threads): New.
12132 (linux_wait_1): Check if threads need moving out of jump pads, and
12133 do it if so.
12134 (stuck_in_jump_pad_callback): New.
12135 (move_out_of_jump_pad_callback): New.
12136 (lwp_running): New.
12137 (linux_resume_one_lwp): Handle moving out of jump pads.
12138 (linux_set_resume_request): Dequeue deferred signals.
12139 (need_step_over_p): Also step over fast tracepoint jumps.
12140 (start_step_over): Also uninsert fast tracepoint jumps.
12141 (finish_step_over): Also reinsert fast tracepoint jumps.
12142 (linux_install_fast_tracepoint_jump): New.
12143 (linux_target_ops): Install linux_stabilize_threads and
12144 linux_install_fast_tracepoint_jump_pad.
12145 * linux-low.h (linux_target_ops) <get_thread_area,
12146 install_fast_tracepoint_jump_pad>: New fields.
12147 (struct lwp_info) <collecting_fast_tracepoint,
12148 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12149 (linux_get_thread_area): Declare.
12150 * linux-x86-low.c (jump_insn): New.
12151 (x86_get_thread_area): New.
12152 (append_insns): New.
12153 (push_opcode): New.
12154 (amd64_install_fast_tracepoint_jump_pad): New.
12155 (i386_install_fast_tracepoint_jump_pad): New.
12156 (x86_install_fast_tracepoint_jump_pad): New.
12157 (the_low_target): Install x86_get_thread_area and
12158 x86_install_fast_tracepoint_jump_pad.
12159 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12160 (struct fast_tracepoint_jump): New.
12161 (fast_tracepoint_jump_insn): New.
12162 (fast_tracepoint_jump_shadow): New.
12163 (find_fast_tracepoint_jump_at): New.
12164 (fast_tracepoint_jump_here): New.
12165 (delete_fast_tracepoint_jump): New.
12166 (set_fast_tracepoint_jump): New.
12167 (uninsert_fast_tracepoint_jumps_at): New.
12168 (reinsert_fast_tracepoint_jumps_at): New.
12169 (set_breakpoint_at): Use write_inferior_memory.
12170 (uninsert_raw_breakpoint): Use write_inferior_memory.
12171 (check_mem_read): Mask out fast tracepoint jumps.
12172 (check_mem_write): Mask out fast tracepoint jumps.
12173 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12174 (set_fast_tracepoint_jump): Declare.
12175 (delete_fast_tracepoint_jump)
12176 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12177 (reinsert_fast_tracepoint_jumps_at): Declare.
12178 * regcache.c: Don't compile many functions when building the
12179 in-process agent library.
12180 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12181 the register buffer in the heap.
12182 (free_register_cache): If the register buffer isn't owned by the
12183 regcache, don't free it.
12184 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12185 pre-existing register caches.
12186 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12187 type.
12188 (convert_ascii_to_int): : Constify `from' parameter type.
12189 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12190 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12191 the needed buffer in-place.
12192 (relocate_instruction): New.
12193 * server.c (handle_query) <qSymbols>: If the target supports
12194 tracepoints, give it a chance of looking up symbols. Report
12195 support for fast tracepoints.
12196 (handle_status): Stabilize threads.
12197 (process_serial_event): Adjust.
12198 * server.h (struct fast_tracepoint_jump): Forward declare.
12199 (struct process_info) <fast_tracepoint_jumps>: New field.
12200 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12201 (decode_X_packet, decode_M_packet): Adjust.
12202 (relocate_instruction): Declare.
12203 (in_process_agent_loaded): Declare.
12204 (tracepoint_look_up_symbols): Declare.
12205 (struct fast_tpoint_collect_status): Declare.
12206 (fast_tracepoint_collecting): Declare.
12207 (force_unlock_trace_buffer): Declare.
12208 (handle_tracepoint_bkpts): Declare.
12209 (initialize_low_tracepoint)
12210 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12211 * target.h (struct target_ops) <stabilize_threads,
12212 install_fast_tracepoint_jump_pad>: New fields.
12213 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12214 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12215 [HAVE_STDINT_H]: Include stdint.h.
12216 (trace_debug_1): Rename to ...
12217 (trace_vdebug): ... this.
12218 (trace_debug): Rename to ...
12219 (trace_debug_1): ... this. Add `level' parameter.
12220 (trace_debug): New.
12221 (ATTR_USED, ATTR_NOINLINE): New.
12222 (IP_AGENT_EXPORT): New.
12223 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12224 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12225 (about_to_request_buffer_space, trace_buffer_is_full)
12226 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12227 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12228 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12229 (traceframe_write_count, traceframes_created)
12230 (trace_state_variables)
12231 New renaming defines.
12232 (struct ipa_sym_addresses): New.
12233 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12234 (symbol_list): New.
12235 (ipa_sym_addrs): New.
12236 (all_tracepoint_symbols_looked_up): New.
12237 (in_process_agent_loaded): New.
12238 (write_e_ipa_not_loaded): New.
12239 (maybe_write_ipa_not_loaded): New.
12240 (tracepoint_look_up_symbols): New.
12241 (debug_threads) [IN_PROCESS_AGENT]: New.
12242 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12243 (UNKNOWN_SIDE_EFFECTS): New.
12244 (stop_tracing): New.
12245 (flush_trace_buffer): New.
12246 (stop_tracing_bkpt): New.
12247 (flush_trace_buffer_bkpt): New.
12248 (read_inferior_integer): New.
12249 (read_inferior_uinteger): New.
12250 (read_inferior_data_pointer): New.
12251 (write_inferior_data_pointer): New.
12252 (write_inferior_integer): New.
12253 (write_inferior_uinteger): New.
12254 (struct collect_static_trace_data_action): Delete.
12255 (enum tracepoint_type): New.
12256 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12257 <actions_str, step_actions, step_actions_str>: Only include in
12258 GDBserver.
fa593d66
PA
12259 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12260 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12261 (tracepoints): Use IP_AGENT_EXPORT.
12262 (last_tracepoint): Don't include in the IPA.
12263 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12264 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12265 (alloced_trace_state_variables): New.
12266 (trace_state_variables): Use IP_AGENT_EXPORT.
12267 (traceframe_t): Delete unused variable.
12268 (circular_trace_buffer): Don't include in the IPA.
12269 (trace_buffer_start): Delete.
12270 (struct trace_buffer_control): New.
12271 (trace_buffer_free): Delete.
12272 (struct ipa_trace_buffer_control): New.
12273 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12274 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12275 New.
12276 (trace_buffer_ctrl): New.
12277 (TRACE_BUFFER_CTRL_CURR): New.
12278 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12279 Reimplement as macros.
12280 (trace_buffer_wrap): Delete.
12281 (traceframe_write_count, traceframe_read_count)
12282 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12283 (struct tracepoint_hit_ctx) <type>: New field.
12284 (struct fast_tracepoint_ctx): New.
12285 (memory_barrier): New.
12286 (cmpxchg): New.
12287 (record_tracepoint_error): Update atomically in the IPA.
12288 (clear_inferior_trace_buffer): New.
12289 (about_to_request_buffer_space): New.
12290 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12291 updating the same buffer.
12292 (add_tracepoint): Default the tracepoint's type to trap
12293 tracepoint, and orig_size to -1.
12294 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12295 internal variables.
12296 (create_trace_state_variable): New parameter `gdb'. Handle it.
12297 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12298 (cmd_qtdp): Handle fast tracepoints.
12299 (cmd_qtdv): Adjust.
12300 (max_jump_pad_size): New.
12301 (gdb_jump_pad_head): New.
12302 (get_jump_space_head): New.
12303 (claim_jump_space): New.
12304 (sort_tracepoints): New.
12305 (MAX_JUMP_SIZE): New.
12306 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12307 IPA.
12308 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12309 support. Upload fast traceframes, and delete internal IPA
12310 breakpoints.
12311 (stop_tracing_handler): New.
12312 (flush_trace_buffer_handler): New.
12313 (cmd_qtstop): Upload fast tracepoints.
12314 (response_tracepoint): Handle fast tracepoints.
12315 (tracepoint_finished_step): Upload fast traceframes. Set the
12316 tracepoint hit context's tracepoint type.
12317 (handle_tracepoint_bkpts): New.
12318 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12319 type. Add comment about fast tracepoints.
12320 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12321 non-existing action_str field.
12322 (get_context_regcache): Handle fast tracepoints.
12323 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12324 to the regcache.
12325 (fast_tracepoint_from_jump_pad_address): New.
12326 (fast_tracepoint_from_ipa_tpoint_address): New.
12327 (collecting_t): New.
12328 (force_unlock_trace_buffer): New.
12329 (fast_tracepoint_collecting): New.
12330 (collecting): New.
12331 (gdb_collect): New.
12332 (write_inferior_data_ptr): New.
12333 (target_tp_heap): New.
12334 (target_malloc): New.
12335 (download_agent_expr): New.
12336 (UALIGN): New.
12337 (download_tracepoints): New.
12338 (download_trace_state_variables): New.
12339 (upload_fast_traceframes): New.
12340 (IPA_FIRST_TRACEFRAME): New.
12341 (IPA_NEXT_TRACEFRAME_1): New.
12342 (IPA_NEXT_TRACEFRAME): New.
12343 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12344 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12345 (gdb_jump_pad_buffer_end): New.
12346 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12347 (initialize_tracepoint): Adjust.
12348 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12349 buffer. Initialize the low module.
12350 * utils.c (PREFIX, TOOLNAME): New.
12351 (malloc_failure): Use PREFIX.
12352 (error): In the IPA, an error causes an exit.
12353 (fatal, warning): Use PREFIX.
12354 (internal_error): Use TOOLNAME.
12355 (NUMCELLS): Increase to 10.
12356 * configure, config.in: Regenerate.
12357
d149dd1d
PA
123582010-06-01 Pedro Alves <pedro@codesourcery.com>
12359
12360 * server.c (handle_query) <qSupported>: Do two passes over the
12361 qSupported string to avoid nesting strtok.
12362
f6528abd
JK
123632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12364
12365 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12366 (CDEPS): New.
12367 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12368 -Wl,--dynamic-list.
12369 * configure: Regenerate.
12370 * proc-service.list: New.
12371
ca2a87a0
JK
123722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12373
12374 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12375 New comment.
12376
363a6e9f
OS
123772010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12378
12379 * gdbreplay.c (remote_open): Check error return from socket() call by
12380 its equality to -1 not by it being negative.
12381 * remote-utils.c (remote_open): Likewise.
12382
d23b6cb1
PA
123832010-05-23 Pedro Alves <pedro@codesourcery.com>
12384
12385 * config.h: Regenerate.
12386
28d3cf85
MK
123872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12388
12389 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12390 doesn't provide PTRACE_GET_THREAD_AREA.
12391
fea36a59
MK
123922010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12393
12394 * linux-m68k-low.c: Include <asm/ptrace.h>
12395 (ps_get_thread_area): Implement.
12396
24b066ba
DE
123972010-05-03 Doug Evans <dje@google.com>
12398
12399 * event-loop.c (struct callback_event): New struct.
12400 (callback_list): New global.
12401 (append_callback_event, delete_callback_event): New functions.
12402 (process_callback): New function.
12403 (start_event_loop): Call it.
12404 * remote-utils.c (NOT_SCHEDULED): Define.
12405 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12406 moved out of readchar.
12407 (readchar): Rewrite. Call reschedule before returning.
12408 (reset_readchar): New function.
12409 (remote_close): Call it.
12410 (process_remaining, reschedule): New functions.
12411 * server.h (callback_handler_func): New typedef.
12412 (append_callback_event, delete_callback_event): Declare.
12413
9836d6ea
PA
124142010-05-03 Pedro Alves <pedro@codesourcery.com>
12415
12416 * proc-service.c (ps_pglobal_lookup): Use
12417 thread_db_look_up_one_symbol.
12418 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12419 parameter. Use it instead of all_symbols_looked_up.
12420 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12421 field.
12422 (all_symbols_looked_up): Don't declare.
12423 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12424 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12425 field.
12426 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12427 Set all_symbols_looked_up here.
12428 (thread_db_look_up_one_symbol): New.
12429 (thread_db_get_tls_address): Adjust.
12430 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12431 thread_db object on the heap, and tentatively set it in the
12432 process structure.
12433 (thread_db_init): Don't set all_symbols_looked_up here.
12434 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12435
7984d532
PA
124362010-05-03 Pedro Alves <pedro@codesourcery.com>
12437
12438 * linux-low.c (linux_kill, linux_detach): Adjust.
12439 (status_pending_p_callback): Remove redundant statement. Check
12440 for !TARGET_WAITIKIND_IGNORE, instead of
12441 TARGET_WAITKIND_STOPPED.
12442 (handle_tracepoints): Make sure LWP is locked. Adjust.
12443 (linux_wait_for_event_1): Adjust.
12444 (linux_cancel_breakpoints): New.
12445 (unsuspend_one_lwp): New.
12446 (unsuspend_all_lwps): New.
12447 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12448 (send_sigstop_callback): Change return type to int, add new
12449 `except' parameter and handle it.
12450 (suspend_and_send_sigstop_callback): New.
12451 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12452 pass them down. If SUSPEND, also increment the lwp's suspend
12453 count.
12454 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12455 (need_step_over_p): Don't consider suspended LWPs.
12456 (start_step_over): Adjust.
12457 (proceed_one_lwp): Change return type to int, add new `except'
12458 parameter and handle it.
12459 (unsuspend_and_proceed_one_lwp): New.
12460 (proceed_all_lwps): Use find_inferior instead of
12461 for_each_inferior.
12462 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12463 also decrement the suspend count of LWPs. Pass `except' down,
12464 instead of hacking its suspend count.
12465 (linux_pause_all): Add `freeze' parameter. Adjust.
12466 (linux_unpause_all): New.
12467 (linux_target_ops): Install linux_unpause_all.
12468 * server.c (handle_status): Adjust.
12469 * target.h (struct target_ops): New fields `unpause_all' and
12470 `cancel_breakpoints'. Add new parameter to `pause_all'.
12471 (pause_all): Add new `freeze' parameter.
12472 (unpause_all): New.
12473 (cancel_breakpoints): New.
12474 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12475 cancel breakpoints.
12476 (cmd_qtstart): Pause threads.
12477 (stop_tracing): Pause threads, and cancel breakpoints.
12478 * win32-low.c (win32_target_ops): Adjust.
12479
e471f25b
PA
124802010-05-03 Pedro Alves <pedro@codesourcery.com>
12481
12482 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12483 the inferior right away from here...
12484 (linux_wait_1): ... to here, and adjust to check the thread's
12485 last_resume_kind instead of the lwp's step or stop_expected flags.
12486
1915ef4f
PA
124872010-05-02 Pedro Alves <pedro@codesourcery.com>
12488
12489 * README: Use consistent `GDB' and `GDBserver' spellings.
12490
f9e39928
PA
124912010-05-02 Pedro Alves <pedro@codesourcery.com>
12492
12493 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12494 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12495 (linux_detach_one_lwp): Assume the lwp is stopped.
12496 (any_thread_of): Delete.
12497 (linux_detach): Stop all lwps here. Don't blindly delete all
12498 breakpoints.
12499 (delete_lwp_callback): New.
12500 (linux_mourn): Delete all lwps of the process that is gone.
12501 (linux_wait_1): Don't delete the last lwp of the process here.
12502 * mem-break.h (mark_breakpoints_out): Declare.
12503 * mem-break.c (mark_breakpoints_out): New.
12504 (free_all_breakpoints): Use it.
12505 * server.c (handle_target_event): If the process is gone, mark
12506 breakpoints out.
12507 * thread-db.c (struct thread_db) <create_bp>: New field.
12508 (thread_db_enable_reporting): Fix prototype. Store a thread event
12509 breakpoint reference in the thread_db struct.
12510 (thread_db_load_search): Clear the thread_db object.
12511 (try_thread_db_load_1): Ditto.
12512 (switch_to_process): New.
12513 (disable_thread_event_reporting): Use it.
12514 (remove_thread_event_breakpoints): New.
12515 (thread_db_detach, thread_db_mourn): Use it.
12516
1e7fc18c
PA
125172010-05-01 Pedro Alves <pedro@codesourcery.com>
12518
12519 * linux-low.c (linux_enable_event_reporting): New.
12520 (linux_wait_for_event_1, handle_extended_wait): Use it.
12521
02fc4de7
PA
125222010-04-30 Pedro Alves <pedro@codesourcery.com>
12523
12524 * linux-low.c (linux_kill_one_lwp, linux_kill)
12525 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12526 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12527 SIGSTOP even if the LWP is stopped.
12528 (send_sigstop_callback): New.
12529 (stop_all_lwps): Use send_sigstop_callback instead.
12530 (linux_resume_one_thread): Adjust.
12531 (proceed_one_lwp): Still proceed an LWP that the client has
12532 requested to stop, if we haven't reported it as stopped yet. Make
12533 sure that LWPs the client want stopped, have a pending SIGSTOP.
12534
bc3b5632
DE
125352010-04-26 Doug Evans <dje@google.com>
12536
ae1ada35
DE
12537 * server.c (handle_general_set): Make static.
12538
bc3b5632
DE
12539 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12540 Print received char after testing for error/eof instead of before.
12541 (input_interrupt): Tweak comment.
12542
65730243
DE
125432010-04-23 Doug Evans <dje@google.com>
12544
12545 * server.c (start_inferior): Print inferior argv if --debug.
12546
a8ae7dc0
AR
125472010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12548
12549 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12550 * nto-x86-low.c: Include server.h
12551
1c07cc19
PM
125522010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12553
12554 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12555 be consistent with other sources of this directory.
12556 (init_registers_amd64): Correct name of source file of this function
12557 in the comment.
12558
e0a61e09
PM
125592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12560
12561 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12562 64-bit executables.
12563
54709339
PM
125642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12565
12566 * win32-i386-low.c: Add 64-bit support.
12567 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12568 (init_registers_amd64): Declare.
12569 (mappings): Add 64-bit version of array.
12570 (init_windows_x86): New function.
12571 (the_low_target): Change init_arch field to init_windows_x86.
12572
e8f0053d
PM
125732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12574
12575 * win32-low.c: Adapt to support also 64-bit architecture.
12576 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12577 (get_image_name): Use SIZE_T type for local variable `done'.
12578 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12579 (toolhelp_get_dll_name): Idem.
12580 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12581 Use uintptr_t typecast to avoid warning.
12582 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12583 (handle_exception): Use phex_nz to avoid warning.
12584 (win32_wait): Remove unused local variable `process'.
12585
c481e77e
PM
125862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12587
12588 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12589 `amd64-avx.o'.
12590
12ea4b69
PM
125912010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12592
12593 * configure.ac: Use `ws2_32' library for srv_mingw.
12594 * configure: Regenerate.
12595 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12596 * remote-utils.c: Likewise.
12597
f6d1620c
L
125982010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12599
12600 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12601 if __x86_64__ is defined.
12602
8e642873
PM
126032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12604
12605 * configure: Regenerate.
12606
711e434b
PM
126072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12608
12609 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12610 * target.h (target_ops): New get_tib_address field.
12611 * win32-low.h (win32_thread_info): Add thread_local_base field.
12612 * win32-low.c (child_add_thread): Add tlb argument.
12613 Set thread_local_base field to TLB.
12614 (get_child_debug_event): Adapt to child_add_thread change.
12615 (win32_get_tib_address): New function.
12616 (win32_target_ops): Set get_tib_address field to
12617 win32_get_tib_address.
12618 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12619
505106cd
PA
126202010-04-12 Pedro Alves <pedro@codesourcery.com>
12621
505106cd
PA
12622 * linux-low.c (linux_mourn): Also remove the process.
12623 * server.c (handle_target_event): Don't remove the process here.
12624 * nto-low.c (nto_mourn): New.
12625 (nto_target_ops): Install it.
12626 * spu-low.c (spu_mourn): New.
12627 (spu_target_ops): Install it.
12628 * win32-low.c (win32_mourn): New.
12629 (win32_target_ops): Install it.
12630
e8470a06
PA
126312010-04-12 Pedro Alves <pedro@codesourcery.com>
12632
12633 * server.h (buffer_xml_printf): Remove redundant `;'.
12634
45ba0d02
PA
126352010-04-12 Pedro Alves <pedro@codesourcery.com>
12636
12637 * regcache.c (set_register_cache): Invalidate regcaches before
12638 changing the register cache layout.
12639 (regcache_invalidate_one): Allow a NULL regcache.
12640 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12641 regcaches before changing the register cache layout or the target
12642 regsets.
12643
59e04013
L
126442010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12645
12646 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12647 variable warning on Linux/x86-64.
12648
8336d594
PA
126492010-04-11 Pedro Alves <pedro@codesourcery.com>
12650
12651 GDBserver disconnected tracing support.
12652
12653 * linux-low.c (linux_remove_process): Delete.
12654 (add_lwp): Don't set last_resume_kind here.
12655 (linux_kill): Use `mourn'.
12656 (linux_detach): Use `thread_db_detach', and `mourn'.
12657 (linux_mourn): New.
12658 (linux_attach_lwp_1): Adjust comment.
12659 (linux_attach): last_resume_kind moved the thread_info; adjust.
12660 (status_pending_p_callback): Adjust.
12661 (linux_wait_for_event_1): Adjust.
12662 (count_events_callback, select_singlestep_lwp_callback)
12663 (select_event_lwp_callback, cancel_breakpoints_callback)
12664 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12665 (proceed_one_lwp): Adjust.
12666 (linux_async): Add debug output.
12667 (linux_thread_stopped): New.
12668 (linux_pause_all): New.
12669 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12670 linux_pause_all.
12671 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12672 (thread_db_free): Delete declaration.
12673 (thread_db_detach, thread_db_mourn): Declare.
12674 * thread-db.c (thread_db_init): Use thread_db_mourn.
12675 (thread_db_free): Delete, split in two.
12676 (disable_thread_event_reporting): New.
12677 (thread_db_detach): New.
12678 (thread_db_mourn): New.
12679
12680 * server.h (struct thread_info) <last_resume_kind>: New field.
12681 <attached>: Add comment.
12682 <gdb_detached>: New field.
12683 (handler_func): Change return type to int.
12684 (handle_serial_event, handle_target_event): Ditto.
12685 (gdb_connected): Declare.
12686 (tracing): Delete.
12687 (disconnected_tracing): Declare.
12688 (stop_tracing): Declare.
12689
12690 * server.c (handle_query) <qSupported>: Report support for
12691 disconnected tracing.
12692 (queue_stop_reply_callback): Account for running threads.
12693 (gdb_wants_thread_stopped): New.
12694 (gdb_wants_all_threads_stopped): New.
12695 (gdb_reattached_process): New.
12696 (handle_status): Clear the `gdb_detached' flag of all processes.
12697 In all-stop, stop all threads.
12698 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12699 (process_serial_event): If the remote connection breaks, or if an
12700 exit was forced with "monitor exit", force an event loop exit.
12701 Handle disconnected tracing on detach.
12702 (handle_serial_event): Adjust.
12703 (handle_target_event): If GDB isn't connected, forward events back
12704 to the inferior, unless the last process exited, in which case,
12705 exit gdbserver. Adjust interface.
12706
12707 * remote-utils.c (remote_open): Don't block in accept. Instead
12708 register an event loop source on the listen socket file
12709 descriptor. Refactor bits into ...
12710 (listen_desc): ... this new global.
12711 (gdb_connected): ... this new function.
12712 (enable_async_notification): ... this new function.
12713 (handle_accept_event): ... this new function.
12714 (remote_close): Clear remote_desc.
12715
12716 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12717
12718 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12719 New fields.
12720 (mourn_inferior): Define.
12721 (target_process_qsupported): Avoid the dangling else problem.
12722 (thread_stopped): Define.
12723 (pause_all): Define.
12724 (target_waitstatus_to_string): Declare.
12725 * target.c (target_waitstatus_to_string): New.
12726
12727 * tracepoint.c (tracing): Make extern.
12728 (disconnected_tracing): New.
12729 (stop_tracing): Make extern. Handle tracing stops due to GDB
12730 disconnecting.
12731 (cmd_qtdisconnected): New.
12732 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12733 (handle_tracepoint_general_set): Handle QTDisconnected.
12734
12735 * event-loop.c (event_handler_func): Change return type to int.
12736 (process_event): Bail out if the event handler wants the event
12737 loop to stop.
12738 (handle_file_event): Ditto.
12739 (start_event_loop): Bail out if the event handler wants the event
12740 loop to stop.
12741
12742 * nto-low.c (nto_target_ops): Adjust.
12743 * spu-low.c (spu_wait): Don't remove the process here.
12744 (spu_target_ops): Adjust.
12745 * win32-low.c (win32_wait): Don't remove the process here.
12746 (win32_target_ops): Adjust.
12747
5d267c4c
PA
127482010-04-11 Pedro Alves <pedro@codesourcery.com>
12749
12750 * regcache.c (realloc_register_cache): Invalidate inferior's
12751 regcache before recreating it.
12752
623ccd72
PA
127532010-04-09 Pedro Alves <pedro@codesourcery.com>
12754
12755 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12756
219f2f23
PA
127572010-04-09 Stan Shebs <stan@codesourcery.com>
12758 Pedro Alves <pedro@codesourcery.com>
12759
12760 * server.h (LONGEST): New.
12761 (struct thread_info) <while_stepping>: New field.
12762 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12763 Declare.
12764 (initialize_tracepoint, handle_tracepoint_general_set)
12765 (handle_tracepoint_query, tracepoint_finished_step)
12766 (tracepoint_was_hit, release_while_stepping_state_list):
12767 (current_traceframe): Declare.
12768 * server.c (handle_general_set): Handle tracepoint packets.
12769 (read_memory): New.
12770 (write_memory): New.
12771 (handle_search_memory_1): Use read_memory.
12772 (handle_query): Report support for conditional tracepoints, trace
12773 state variables, and tracepoint sources. Handle tracepoint
12774 queries.
12775 (main): Initialize the tracepoints module.
12776 (process_serial_event): Handle traceframe reads/writes.
12777
12778 * linux-low.c (handle_tracepoints): New.
12779 (linux_wait_1): Call it.
12780 (linux_resume_one_lwp): Handle while-stepping.
12781 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12782 (linux_target_ops): Install them.
12783 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12784 New field.
12785 * linux-x86-low.c (x86_supports_tracepoints): New.
12786 (the_low_target). Install it.
12787
12788 * mem-break.h (delete_breakpoint): Declare.
12789 * mem-break.c (delete_breakpoint): Make external.
12790
12791 * target.h (struct target_ops): Add `supports_tracepoints',
12792 `read_pc', and `write_pc' fields.
12793 (target_supports_tracepoints): Define.
12794 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12795 (phex_nz): New.
12796
12797 * regcache.h (struct regcache) <registers_owned>: New field.
12798 (init_register_cache, regcache_cpy): Declare.
12799 (regcache_read_pc, regcache_write_pc): Declare.
12800 (register_cache_size): Declare.
12801 (supply_regblock): Declare.
12802 * regcache.c (init_register_cache): New.
12803 (new_register_cache): Use it.
12804 (regcache_cpy): New.
12805 (register_cache_size): New.
12806 (supply_regblock): New.
12807 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12808
219f2f23
PA
12809 * tracepoint.c: New.
12810
12811 * Makefile.in (OBS): Add tracepoint.o.
12812 (tracepoint.o): New rule.
12813
3a13a53b
L
128142010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12815
12816 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12817 (i386-mmx.o): New.
12818 (i386-mmx.c): Likewise.
12819 (i386-mmx-linux.o): Likewise.
12820 (i386-mmx-linux.c): Likewise.
12821
12822 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12823 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12824 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12825 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12826
12827 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12828 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12829 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12830
1570b33e
L
128312010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12832
12833 * Makefile.in (clean): Updated.
12834 (i386-avx.o): New.
12835 (i386-avx.c): Likewise.
12836 (i386-avx-linux.o): Likewise.
12837 (i386-avx-linux.c): Likewise.
12838 (amd64-avx.o): Likewise.
12839 (amd64-avx.c): Likewise.
12840 (amd64-avx-linux.o): Likewise.
12841 (amd64-avx-linux.c): Likewise.
12842
12843 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12844 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12845 (srv_amd64_regobj): Add amd64-avx.o.
12846 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12847 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12848 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12849 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12850 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12853
12854 * i387-fp.c: Include "i386-xstate.h".
12855 (i387_xsave): New.
12856 (i387_cache_to_xsave): Likewise.
12857 (i387_xsave_to_cache): Likewise.
12858 (x86_xcr0): Likewise.
12859
12860 * i387-fp.h (i387_cache_to_xsave): Likewise.
12861 (i387_xsave_to_cache): Likewise.
12862 (x86_xcr0): Likewise.
12863
12864 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12865 * linux-crisv32-low.c (target_regsets): Likewise.
12866 * linux-m68k-low.c (target_regsets): Likewise.
12867 * linux-mips-low.c (target_regsets): Likewise.
12868 * linux-ppc-low.c (target_regsets): Likewise.
12869 * linux-s390-low.c (target_regsets): Likewise.
12870 * linux-sh-low.c (target_regsets): Likewise.
12871 * linux-sparc-low.c (target_regsets): Likewise.
12872 * linux-xtensa-low.c (target_regsets): Likewise.
12873
12874 * linux-low.c: Include <sys/uio.h>.
12875 (regsets_fetch_inferior_registers): Support nt_type.
12876 (regsets_store_inferior_registers): Likewise.
12877 (linux_process_qsupported): New.
12878 (linux_target_ops): Add linux_process_qsupported.
12879
12880 * linux-low.h (regset_info): Add nt_type.
12881 (linux_target_ops): Add process_qsupported.
12882
12883 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12884 and <sys/uio.h>.
12885 (init_registers_i386_avx_linux): New.
12886 (init_registers_amd64_avx_linux): Likewise.
12887 (xmltarget_i386_linux_no_xml): Likewise.
12888 (xmltarget_amd64_linux_no_xml): Likewise.
12889 (PTRACE_GETREGSET): Likewise.
12890 (PTRACE_SETREGSET): Likewise.
12891 (x86_fill_xstateregset): Likewise.
12892 (x86_store_xstateregset): Likewise.
12893 (use_xml): Likewise.
12894 (x86_linux_update_xmltarget): Likewise.
12895 (x86_linux_process_qsupported): Likewise.
12896 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12897 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12898 init_registers_i386_linux here. Call
12899 x86_linux_update_xmltarget.
12900 (the_low_target): Add x86_linux_process_qsupported.
12901
12902 * server.c (handle_query): Call target_process_qsupported.
12903
12904 * target.h (target_ops): Add process_qsupported.
12905 (target_process_qsupported): New.
12906
fc7238bb
PA
129072010-04-03 Pedro Alves <pedro@codesourcery.com>
12908
12909 * inferiors.c (add_thread): Set last_status kind to
12910 TARGET_WAITKIND_IGNORE.
12911 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12912 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12913 (linux_wait_1): Move `thread' local definition to block that uses
12914 it. Don't NULL initialize `event_child'.
12915 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12916 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12917 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12918
bdabb078
PA
129192010-04-01 Pedro Alves <pedro@codesourcery.com>
12920
12921 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12922 an extended waitstatus, or by a watchpoint.
12923 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12924 thread was stepping or has been stopped by a watchpoint.
12925
d3bbe7a0
PA
129262010-04-01 Pedro Alves <pedro@codesourcery.com>
12927
12928 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12929 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12930 of another, then delete the previous, and validate all
12931 breakpoints.
12932 (validate_inserted_breakpoint): New.
12933 (delete_disabled_breakpoints): New.
12934 (validate_breakpoints): New.
12935 (check_mem_read): Validate breakpoints before trusting their
12936 shadow. Delete disabled breakpoints.
12937 (check_mem_write): Validate breakpoints before trusting they
12938 should be inserted. Delete disabled breakpoints.
12939 * mem-break.h (validate_breakpoints):
12940 * server.c (handle_query): Validate breakpoints when we see a
12941 qSymbol query.
12942
8b07ae33
PA
129432010-04-01 Pedro Alves <pedro@codesourcery.com>
12944
12945 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12946 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12947 if we could tell there's a GDB breakpoint at stop_pc.
12948 (need_step_over_p): Don't do a step over if we find a GDB
12949 breakpoint at the resume PC.
12950
12951 * mem-break.c (struct raw_breakpoint): New.
12952 (enum bkpt_type): New type `gdb_breakpoint'.
12953 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12954 fields. New field `raw'.
12955 (find_raw_breakpoint_at): New.
12956 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12957 breakpoint instead.
12958 (set_breakpoint_at): Adjust.
12959 (delete_raw_breakpoint): New.
12960 (release_breakpoint): New.
12961 (delete_breakpoint): Rename to...
12962 (delete_breakpoint_1): ... this. Add proc parameter. Use
12963 release_breakpoint. Return ENOENT.
12964 (delete_breakpoint): Reimplement.
12965 (find_breakpoint_at): Delete.
12966 (find_gdb_breakpoint_at): New.
12967 (delete_breakpoint_at): Delete.
12968 (set_gdb_breakpoint_at): New.
12969 (delete_gdb_breakpoint_at): New.
12970 (gdb_breakpoint_here): New.
12971 (set_reinsert_breakpoint): Use release_breakpoint.
12972 (uninsert_breakpoint): Rename to ...
12973 (uninsert_raw_breakpoint): ... this.
12974 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12975 (reinsert_raw_breakpoint): Change parameter type to
12976 raw_breakpoint.
12977 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12978 instead.
12979 (check_breakpoints): Adjust. Use release_breakpoint.
12980 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12981 (breakpoint_inserted_here): Ditto.
12982 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12983 Don't trust the breakpoint's shadow if it is not inserted.
12984 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12985 (delete_all_breakpoints): Adjust.
12986 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12987 use delete_breakpoint_1.
12988
12989 * mem-break.h (breakpoints_supported): Delete declaration.
12990 (set_gdb_breakpoint_at): Declare.
12991 (gdb_breakpoint_here): Declare.
12992 (delete_breakpoint_at): Delete.
12993 (delete_gdb_breakpoint_at): Declare.
12994
12995 * server.h (struct raw_breakpoint): Forward declare.
12996 (struct process_info): New field `raw_breakpoints'.
12997
12998 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12999 breakpoints.
13000
6bf5e0ba
PA
130012010-03-24 Pedro Alves <pedro@codesourcery.com>
13002
13003 * linux-low.c (status_pending_p_callback): Fix comment.
13004 (linux_wait_for_event_1): Move most of the internal breakpoint
13005 handling from here...
13006 (linux_wait_1): ... to here.
13007 (count_events_callback): New.
13008 (select_singlestep_lwp_callback): New.
13009 (select_event_lwp_callback): New.
13010 (cancel_breakpoints_callback): New.
13011 (select_event_lwp): New.
13012 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13013 priority to all LWPs that have had events that should be reported
13014 to the client. Cancel breakpoints when about to reporting the
13015 event to the client, not while stopping lwps. No longer cancel
13016 finished single-steps here.
13017 (cancel_finished_single_step): Delete.
13018 (cancel_finished_single_steps): Delete.
13019
414a389f
PA
130202010-03-24 Pedro Alves <pedro@codesourcery.com>
13021
13022 * mem-break.c (enum bkpt_type): New.
13023 (struct breakpoint): New field `type'.
13024 (set_breakpoint_at): Change return type to struct breakpoint
13025 pointer. Set type to `other_breakpoint' by default.
13026 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13027 in the breakpoint list.
13028 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13029 (reinsert_breakpoint): Rename to ...
13030 (reinsert_raw_breakpoint): ... this.
13031 (reinsert_breakpoints_at): Adjust.
13032 * mem-break.h (struct breakpoint): Declare.
13033 (set_breakpoint_at): Change return type to struct breakpoint
13034 pointer.
13035
2280c721
PA
130362010-03-24 Pedro Alves <pedro@codesourcery.com>
13037
13038 * server.c (handle_query): Assign, not compare.
13039
d50171e4
PA
130402010-03-24 Pedro Alves <pedro@codesourcery.com>
13041
13042 Teach linux gdbserver to step-over-breakpoints.
13043
13044 * linux-low.c (can_hardware_single_step): New.
13045 (supports_breakpoints): New.
13046 (handle_extended_wait): If stopping threads, read the stop pc of
13047 the new cloned LWP.
13048 (get_pc): New.
13049 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13050 low target doesn't support retrieving the PC.
13051 (add_lwp): Set last_resume_kind to resume_continue.
13052 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13053 (linux_attach): Don't clear stop_expected. Set the lwp's
13054 last_resume_kind to resume_stop.
13055 (linux_detach_one_lwp): Don't check for removed breakpoints.
13056 (check_removed_breakpoint): Delete.
13057 (status_pending_p): Rename to ...
13058 (status_pending_p_callback): ... this. Don't check for removed
13059 breakpoints. Don't consider threads that are stopped from GDB's
13060 perspective.
13061 (linux_wait_for_lwp): Always read the stop_pc here.
13062 (cancel_breakpoint): New.
13063 (step_over_bkpt): New global.
13064 (linux_wait_for_event_1): Implement stepping over breakpoints.
13065 (gdb_wants_lwp_stopped): New.
13066 (gdb_wants_all_stopped): New.
13067 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13068 single-step traps here. Store the thread's last reported target
13069 wait status.
13070 (send_sigstop): Don't clear stop_expected. Always set it,
13071 instead.
13072 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13073 (cancel_finished_single_step): New.
13074 (cancel_finished_single_steps): New.
13075 (wait_for_sigstop): Don't cancel finished single-step traps here.
13076 (linux_resume_one_lwp): Don't check for removed breakpoints.
13077 Don't set `step' on non-hardware step archs.
13078 (linux_set_resume_request): Ignore resume_stop requests if already
13079 stopping or stopped. Set the lwp's last_resume_kind.
13080 (resume_status_pending_p): Don't check for removed breakpoints.
13081 (need_step_over_p): New.
13082 (start_step_over): New.
13083 (finish_step_over): New.
13084 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13085 requests. Clear the thread's last reported target waitstatus.
13086 Don't use the `suspended' flag. Don't consider pending breakpoints.
13087 (linux_resume): Start a step-over if necessary.
13088 (proceed_one_lwp): New.
13089 (proceed_all_lwps): New.
13090 (unstop_all_lwps): New.
13091 * linux-low.h (struct lwp_info): Rewrite comment for the
13092 `suspended' flag. Add the `stop_pc' field. Delete the
13093 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13094 Add `'last_resume_kind' and `need_step_over' fields.
13095 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13096 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13097 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13098 (set_raw_breakpoint_at): New.
13099 (set_breakpoint_at): Rewrite to use it.
13100 (reinsert_breakpoint_handler): Delete.
13101 (set_reinsert_breakpoint): New.
13102 (reinsert_breakpoint_by_bp): Delete.
13103 (delete_reinsert_breakpoints): New.
13104 (uninsert_breakpoint): Rewrite.
13105 (uninsert_breakpoints_at): New.
13106 (reinsert_breakpoint): Rewrite.
13107 (reinsert_breakpoints_at): New.
13108 (check_breakpoints): Rewrite.
13109 (breakpoint_here): New.
13110 (breakpoint_inserted_here): New.
13111 (check_mem_read): Adjust.
13112 * mem-break.h (breakpoints_supported, breakpoint_here)
13113 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13114 (reinsert_breakpoint_by_bp): Delete declaration.
13115 (delete_reinsert_breakpoints): Declare.
13116 (reinsert_breakpoint): Delete declaration.
13117 (reinsert_breakpoints_at): Declare.
13118 (uninsert_breakpoint): Delete declaration.
13119 (uninsert_breakpoints_at): Declare.
13120 (check_breakpoints): Adjust prototype.
13121 * server.h: Adjust include order.
13122 (struct thread_info): Declare here. Add a `last_status' field.
13123
30ba68cb
MS
131242010-03-23 Michael Snyder <msnyder@vmware.com>
13125
13126 * server.c (crc32): New function.
13127 (handle_query): Add handling for 'qCRC:' request.
13128
b9a881c2
PA
131292010-03-23 Pedro Alves <pedro@codesourcery.com>
13130
13131 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13132 lwp had been stopped by a watchpoint.
13133
e92d13d5
PA
131342010-03-16 Pedro Alves <pedro@codesourcery.com>
13135
13136 * server.h (internal_error): Declare.
13137 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13138 * utils.c (internal_error): New function.
13139
64daa791
AS
131402010-03-15 Andreas Schwab <schwab@redhat.com>
13141
13142 * configure.srv: Fix typo setting srv_regobj.
13143
f52cd8cd
PA
131442010-03-15 Pedro Alves <pedro@codesourcery.com>
13145
13146 * linux-low.c (fetch_register): Avoid passing a non string literal
13147 format to `error'.
13148 (usr_store_inferior_registers): Ditto.
13149
93ae6fdc
PA
131502010-03-14 Pedro Alves <pedro@codesourcery.com>
13151
13152 * linux-low.c (linux_write_memory): Bail out early if peeking
13153 memory failed.
13154
c3adc08c
PA
131552010-03-14 Pedro Alves <pedro@codesourcery.com>
13156
13157 * linux-low.h (struct lwp_info): New fields
13158 `stopped_by_watchpoint' and `stopped_data_address'.
13159 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13160 here, and cache them in the lwp object.
13161 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13162 directly.
13163 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13164 field.
13165 (linux_stopped_by_watchpoint): Rewrite.
13166 (linux_stopped_data_address): Rewrite.
13167
bce522a2
PA
131682010-03-06 Simo Melenius <simo.melenius@iki.fi>
13169
13170 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13171 switching the current inferior, not before.
13172
90884b2b
L
131732010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13174
13175 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13176 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13177 i386-linux.c and amd64-linux.c.
13178 (reg-i386.o): Removed.
13179 (reg-i386.c): Likewise.
13180 (reg-i386-linux.o): Likewise.
13181 (reg-i386-linux.c): Likewise.
13182 (reg-x86-64.o): Likewise.
13183 (reg-x86-64.c): Likewise.
13184 (reg-x86-64-linux.o): Likewise.
13185 (reg-x86-64-linux.c): Likewise.
13186 (i386.o): New.
13187 (i386.c): Likewise.
13188 (i386-linux.o): Likewise.
13189 (i386-linux.c): Likewise.
13190 (amd64.o): Likewise.
13191 (amd64.c): Likewise.
13192 (amd64-linux.o): Likewise.
13193 (amd64-linux.c): Likewise.
13194
13195 * configure.srv (srv_i386_regobj): New.
13196 (srv_i386_linux_regobj): Likewise.
13197 (srv_amd64_regobj): Likewise.
13198 (srv_amd64_linux_regobj): Likewise.
13199 (srv_i386_32bit_xmlfiles): Likewise.
13200 (srv_i386_64bit_xmlfiles): Likewise.
13201 (srv_i386_xmlfiles): Likewise.
13202 (srv_amd64_xmlfiles): Likewise.
13203 (srv_i386_linux_xmlfiles): Likewise.
13204 (srv_amd64_linux_xmlfiles): Likewise.
13205 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13206 srv_xmlfiles to $srv_i386_xmlfiles.
13207 (i[34567]86-*-mingw32ce*): Likewise.
13208 (i[34567]86-*-mingw*): Likewise.
13209 (i[34567]86-*-nto*): Likewise.
13210 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13211 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13212 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13213 (x86_64-*-linux*): Likewise.
13214
13215 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13216 (init_registers_amd64_linux): New.
13217 (x86_arch_setup): Replace init_registers_x86_64_linux with
13218 init_registers_amd64_linux.
13219
193f13e6
MK
132202010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13221
13222 * configure.ac: Check for libdl. If it is not available link against
13223 static libthread_db.
13224 * configure: Regenerate.
13225
85d721b8
PA
132262010-02-22 Pedro Alves <pedro@codesourcery.com>
13227
13228 PR9605
13229
13230 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13231 handing a read watchpoint.
13232 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13233
6076632b
DE
132342010-02-12 Doug Evans <dje@google.com>
13235
13236 * linux-low.c (linux_supports_tracefork_flag): Document.
13237 (linux_look_up_symbols): Add comment.
13238
3327ccf7
L
132392010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13240
13241 * regcache.c (supply_register): Clear regcache if buf is NULL.
13242
0718675c 132432010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13244 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13245
13246 * inferiors.c (find_inferior): Add function documentation.
13247 (unloaded_dll): Handle the case where the unloaded dll has not
13248 been previously registered in the dll list.
13249
177321bd
DJ
132502010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13251
13252 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13253 (thumb2_breakpoint): New.
13254 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13255
2b009048
DJ
132562010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13259 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13260 breakpoints.
13261
3be029c7
PA
132622010-01-21 Pedro Alves <pedro@codesourcery.com>
13263
13264 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13265
18f5de3b
JK
132662010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13267
13268 * linux-s390-low.c (s390_collect_ptrace_register)
13269 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13270
3743bb4f
DE
132712010-01-21 Doug Evans <dje@google.com>
13272
14ce3065
DE
13273 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13274 (PTRACE_ARG4_TYPE): New macro.
13275 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13276 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13277 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13278 (usr_store_inferior_registers): Ditto.
13279 (linux_read_memory, linux_write_memory): Ditto.
13280 (linux_test_for_tracefork): Ditto.
13281
3743bb4f
DE
13282 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13283 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13284
8b315be5
PA
132852010-01-21 Pedro Alves <pedro@codesourcery.com>
13286
13287 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13288 target.
13289
85492558
PA
132902010-01-21 Pedro Alves <pedro@codesourcery.com>
13291
13292 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13293 prototype to take a regcache. Adjust.
13294
442ea881
PA
132952010-01-20 Pedro Alves <pedro@codesourcery.com>
13296
13297 * regcache.h (struct thread_info): Forward declare.
13298 (struct regcache): New.
13299 (new_register_cache): Adjust prototype.
13300 (get_thread_regcache): Declare.
13301 (free_register_cache): Adjust prototype.
13302 (registers_to_string, registers_from_string): Ditto.
13303 (supply_register, supply_register_by_name, collect_register)
13304 (collect_register_as_string, collect_register_by_name): Ditto.
13305 * regcache.c (struct inferior_regcache_data): Delete.
13306 (get_regcache): Rename to ...
13307 (get_thread_regcache): ... this. Adjust. Switch inferior before
13308 fetching registers.
13309 (regcache_invalidate_one): Adjust.
13310 (regcache_invalidate): Fix prototype.
13311 (new_register_cache): Return the new register cache.
13312 (free_register_cache): Change prototype.
13313 (realloc_register_cache): Adjust.
13314 (registers_to_string): Change prototype to take a regcache. Adjust.
13315 (registers_from_string): Ditto.
13316 (register_data): Ditto.
13317 (supply_register): Ditto.
13318 (supply_register_by_name): Ditto.
13319 (collect_register): Ditto.
13320 (collect_register_as_string): Ditto.
13321 (collect_register_by_name): Ditto.
13322 * server.c (process_serial_event): Adjust.
13323 * linux-low.h (regset_fill_func, regset_store_func): Change
13324 prototype.
13325 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13326 Change prototype.
13327 * linux-low.c (get_stop_pc): Adjust.
13328 (check_removed_breakpoint): Adjust.
13329 (linux_wait_for_event): Adjust.
13330 (linux_resume_one_lwp): Adjust.
13331 (fetch_register): Add regcache parameter. Adjust.
13332 (usr_store_inferior_registers): Ditto.
13333 (regsets_fetch_inferior_registers): Ditto.
13334 (regsets_store_inferior_registers): Ditto.
13335 (linux_fetch_registers, linux_store_registers): Ditto.
13336 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13337 regcache. Adjust.
43aaf8b6
PA
13338 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13339 Ditto.
442ea881
PA
13340 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13341 prototype to take a regcache.
13342 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13343 * remote-utils.c (convert_ascii_to_int, outreg)
13344 (prepare_resume_reply): Change prototype to take a regcache.
13345 Adjust.
13346 * target.h (struct target_ops) <fetch_registers, store_registers>:
13347 Change prototype to take a regcache.
13348 (fetch_inferior_registers, store_inferior_registers): Change
13349 prototype to take a regcache. Adjust.
13350 * proc-service.c (ps_lgetregs): Adjust.
13351 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13352 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13353 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13354 take a regcache. Adjust.
13355 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13356 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13357 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13358 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13359 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13360 (cris_cannot_fetch_register):
13361 (cris_breakpoint_at): Change prototype to take a regcache.
13362 Adjust.
13363 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13364 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13365 to take a regcache. Adjust.
13366 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13367 Adjust.
13368 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13369 take a regcache. Adjust.
13370 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13371 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13372 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13373 * linux-mips-low.c (mips_get_pc):
13374 (mips_set_pc): Change prototype to take a regcache. Adjust.
13375 (mips_reinsert_addr): Adjust.
13376 (mips_collect_register): Change prototype to take a regcache.
13377 Adjust.
13378 (mips_supply_register):
13379 (mips_collect_register_32bit, mips_supply_register_32bit)
13380 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13381 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13382 * linux-ppc-low.c (ppc_supply_ptrace_register)
13383 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13384 (parse_spufs_run): Adjust.
13385 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13386 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13387 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13388 take a regcache. Adjust.
13389 * linux-s390-low.c (s390_collect_ptrace_register)
13390 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13391 (s390_set_pc): Change prototype to take a regcache. Adjust.
13392 (s390_arch_setup): Adjust.
13393 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13394 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13395 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13396 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13397 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13398 regcache. Adjust.
13399 (sparc_breakpoint_at): Adjust.
13400 * linux-xtensa-low.c (xtensa_fill_gregset):
13401 (xtensa_store_gregset):
13402 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13403 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13404 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13405 prototype to take a regcache. Adjust.
13406 * win32-arm-low.c (arm_fetch_inferior_register)
13407 (arm_store_inferior_register): Change prototype to take a
13408 regcache. Adjust.
13409 * win32-i386-low.c (i386_fetch_inferior_register)
13410 (i386_store_inferior_register): Change prototype to take a
13411 regcache. Adjust.
13412 * win32-low.c (child_fetch_inferior_registers)
13413 (child_store_inferior_registers): Change prototype to take a
13414 regcache. Adjust.
13415 (win32_wait): Adjust.
13416 (win32_fetch_inferior_registers): Change prototype to take a
13417 regcache. Adjust.
13418 (win32_store_inferior_registers): Adjust.
13419 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13420 store_inferior_register>: Change prototype to take a regcache.
13421
60c3d7b0
DE
134222010-01-20 Doug Evans <dje@google.com>
13423
13424 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13425 #ifdef.
13426 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13427 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13428
dc146f7c
VP
134292010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13430
13431 * linux-low.c (linux_core_of_thread): New.
13432 (compare_ints, show_process, list_threads): New.
13433 (linux_qxfer_osdata): Report threads and cores.
13434 (linux_target_op): Register linux_core_of_thread.
13435 * remote-utils.c (prepare_resume_reply): Report the core.
13436 (buffer_xml_printf): Support %d specifier.
13437 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13438 New.
13439 (handle_query): Handle qXfer:threads. Announce availability
13440 thereof.
13441 * target.h (struct target_ops): New field core_of_thread.
13442
7803799a
UW
134432010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13444
13445 * Makefile.in (clean): Remove new generated files.
13446 (reg-s390.o, reg-s390.c): Remove rules.
13447 (reg-s390x.o, reg-s390x.c): Likewise.
13448 (s390-linux32.o, s390-linux32.c): Add rules.
13449 (s390-linux64.o, s390-linux64.c): Likewise.
13450 (s390x-linux64.o, s390x-linux64.c): Likewise.
13451 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13452 * linux-s390-low.c: Include <elf.h>.
13453 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13454 (init_registers_s390): Remove prototype.
13455 (init_registers_s390x): Likewise.
13456 (init_registers_s390_linux32): Add prototype.
13457 (init_registers_s390_linux64): Likewise.
13458 (init_registers_s390x_linux64): Likewise.
13459 (s390_num_regs_3264): New define.
13460 (s390_regmap_3264): New global variable.
13461 (s390_cannot_fetch_register): Remove obsolete check.
13462 (s390_cannot_store_register): Likewise.
13463 (s390_collect_ptrace_register): Handle upper/lower register halves.
13464 (s390_supply_ptrace_register): Likewise.
13465 (s390_fill_gregset): Update to register number changes.
13466 (s390_get_hwcap): New routine.
13467 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13468 Install appropriate regmap and register set.
13469
6e7ffa39
JB
134702010-01-01 Joel Brobecker <brobecker@adacore.com>
13471
13472 * server.c (gdbserver_version): Update copyright year to 2010.
13473 * gdbreplay.c (gdbreplay_version): Likewise.
13474
957f3f49
DE
134752009-12-28 Doug Evans <dje@google.com>
13476
13477 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13478 elf/external.h. Include <elf.h> instead but only if necessary.
13479
ca5c370d
PA
134802009-12-28 Pedro Alves <pedro@codesourcery.com>
13481
13482 * linux-low.c (linux_remove_process): Remove `detaching'
13483 parameter. Don't release/detach from thread_db here.
13484 (linux_kill): Release/detach from thread_db here, ...
13485 (linux_detach): ... and here, before actually detaching.
13486 (linux_wait_1): ... and here, when a process exits.
13487 * thread-db.c (any_thread_of): New.
13488 (thread_db_free): Switch the current inferior to a thread of the
13489 passed in process.
13490
4ee62156
DE
134912009-12-21 Doug Evans <dje@google.com>
13492
d90e6a88
DE
13493 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13494
c5f62d5f
DE
13495 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13496 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13497 warning ifndef __NR_tkill. Move setting of errno there too.
13498 Delete unnecessary resetting of errno after syscall.
13499 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13500
10e86dd7
DE
13501 * configure.ac: Check for dladdr.
13502 * config.in: Regenerate.
13503 * configure: Regenerate.
13504 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13505 (try_thread_db_load): Update.
13506
4ee62156
DE
13507 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13508
00f515da
DE
135092009-12-18 Doug Evans <dje@google.com>
13510
e9464885
DE
13511 * event-loop.c: Include unistd.h if it exists.
13512
07d4f67e
DE
13513 * linux-low.c (my_waitpid): Move definition away from being in
13514 between linux_tracefork_child/linux_test_for_tracefork.
13515
00f515da
DE
13516 * gdb_proc_service.h (psaddr_t): Fix type.
13517 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13518 signature to match glibc.
13519
1de1badb
DE
135202009-12-16 Doug Evans <dje@google.com>
13521
13522 * linux-low.c (linux_read_memory): Fix argument to read.
13523
aeeb81d1
PA
135242009-11-26 Pedro Alves <pedro@codesourcery.com>
13525
13526 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13527 events, don't leave current_inferior pointing at null.
13528
10357975
PA
135292009-11-26 Pedro Alves <pedro@codesourcery.com>
13530
13531 * win32-low.c (LOG): Delete.
13532 (OUTMSG): Output to stderr.
13533 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13534 on compile time LOG macro.
13535 (win32_wait): Fix debug output.
13536
cf6e3471
PA
135372009-11-26 Pedro Alves <pedro@codesourcery.com>
13538
13539 * win32-low.c (win32_add_one_solib): If the dll name is
13540 "ntdll.dll", prepend the system directory to the dll path.
13541
0c85e18e
MK
135422009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13543
13544 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13545
9ac544ce 135462009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13547 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13548
13549 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13550 * configure.ac: Check for __mcoldfire__ and set
13551 gdb_cv_m68k_is_coldfire.
13552 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13553 reg-cf.o and reg-m68k.o.
13554 * configure: Regenerated.
13555
fd7dd3e6
PA
135562009-11-16 Pedro Alves <pedro@codesourcery.com>
13557
13558 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13559 Pass it to thread_db_free.
13560 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13561 proper `detaching' argument to linux_remove_process.
13562 * linux-low.h (thread_db_free): Add `detaching' parameter.
13563 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13564 to thread_db_free.
13565 (thread_db_free): Add `detaching' parameter. Only
13566 call td_ta_clear_event if detaching from process.
13567
75aa492e
MK
135682009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13569
13570 * thread-db.c (thread_db_free): Fix typo.
13571
21e1bee4
PP
135722009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13573
13574 PR gdb/10838
13575 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13576
8838b45e
NS
135772009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13578
13579 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13580 with an i686 compiler.
13581 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13582 needed.
13583 * configure: Rebuilt.
13584
8a35fb51
SL
135852009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13586
13587 PR gdb/10783
13588
13589 * server.c (handle_search_memory_1): Correct read_addr initialization
13590 in loop for searching subsequent chunks.
13591
96f15937
PP
135922009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13593
13594 * configure.ac: New --with-libthread-db option.
13595 * thread-db.c: Allow direct dependence on libthread_db.
13596 (thread_db_free): Adjust.
13597 * config.in: Regenerate.
13598 * configure: Likewise.
889bf7c5 13599
5f7d1694
PP
136002009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13601
13602 PR gdb/10757
13603 * thread-db.c (attach_thread): New function.
13604 (maybe_attach_thread): Return success/failure.
13605 (find_new_threads_callback): Adjust.
889bf7c5
PA
13606 (thread_db_find_new_threads): Loop until no new threads.
13607
88e3b899
PA
136082009-10-13 Pedro Alves <pedro@codesourcery.com>
13609
13610 * proc-service.c (ps_lgetregs): Formatting.
13611
cdbfd419
PP
136122009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13613
13614 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13615 * configure.ac: Adjust.
13616 * linux-low.h (struct process_info_private): Move members to struct
13617 thread_db.
13618 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13619 * linux-low.c (linux_remove_process): Adjust.
13620 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13621 * server.c (handle_query): Move code ...
13622 (handle_monitor_command): ... here. New function.
13623 * target.h (struct target_ops): New member.
13624 * thread-db.c (struct thread_db): New.
13625 (libthread_db_search_path): New variable.
13626 (thread_db_create_event, thread_db_enable_reporting)
13627 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13628 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13629 (try_thread_db_load_1, dladdr_to_soname): New functions.
13630 (try_thread_db_load, thread_db_load_search): New functions.
13631 (thread_db_init): Search for libthread_db.
13632 (thread_db_free): New function.
13633 (thread_db_handle_monitor_command): Likewise.
13634 * config.in: Regenerate.
13635 * configure: Regenerate.
889bf7c5 13636
4168d2d6
UW
136372009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13638
13639 * spu-low.c (spu_kill): Wait for inferior to terminate.
13640 Call clear_inferiors.
13641 (spu_detach): Call clear_inferiors.
13642
81ecdfbb
RW
136432009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13644
13645 * aclocal.m4: Regenerate.
13646 * config.in: Likewise.
13647 * configure: Likewise.
13648
0b9ff2c0
UW
136492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13650
13651 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13652 (parse_spufs_run): New function.
13653 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13654 (ppc_breakpoint_at): Handle SPU breakpoints.
13655
efcbbd14
UW
136562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13657
13658 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13659 (SPUFS_MAGIC): Define.
13660 (spu_enumerate_spu_ids): New function.
13661 (linux_qxfer_spu): New function.
13662 (linux_target_ops): Install linux_qxfer_spu.
13663
f4d9bade
UW
136642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13665
13666 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13667 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13668 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13669 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13670 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13671 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13672 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13673 (init_registers_powerpc_cell32l): Add prototype.
13674 (init_registers_powerpc_cell64l): Likewise.
13675 (ppc_arch_setup): Detect Cell/B.E. architecture.
13676
96e946ca
RW
136772009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13678
13679 * Makefile.in (datarootdir): New variable.
13680
58d6951d
DJ
136812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13682
13683 * linux-low.c (linux_write_memory): Update debugging output.
13684 * Makefile.in (clean): Add new descriptions.
13685 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13686 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13687 * configure.srv: Add new files for arm*-*-linux*.
13688 * linux-arm-low.c: Add new declarations.
13689 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13690 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13691 (HWCAP_VFPv3D16): New.
13692 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13693 instead of __IWMMXT__.
13694 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13695 (arm_arch_setup): New.
13696 (target_regsets): Remove #ifdef. Add VFP regset.
13697 (the_low_target): Use arm_arch_setup.
13698
12b42a12
DJ
136992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13700
13701 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13702 the main thread again.
13703
ac8c974e
AR
137042009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13705
13706 Adding Neutrino gdbserver.
13707 * configure: Regenerated.
13708 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13709 * configure.srv (i[34567]86-*-nto*): New target.
13710 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13711 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13712 (nto_comctrl) [__QNX__]: New function.
13713 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13714
4424e0c3 137152009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13716
13717 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13718 srv_tgtobj.
13719
912cf4ba
PA
137202009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13721 Pedro Alves <pedro@codesourcery.com>
13722
13723 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13724 don't support CONTEXT_EXTENDED_REGISTERS.
13725 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13726 (the_low_target): Install them.
13727 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13728 failing with ERROR_PIPE_NOT_CONNECTED.
13729
aa5ca48f
DE
137302009-06-30 Doug Evans <dje@google.com>
13731 Pierre Muller <muller@ics.u-strasbg.fr>
13732
13733 Add h/w watchpoint support to x86-linux, win32-i386.
13734 * Makefile.in (SFILES): Add i386-low.c
13735 (i386_low_h): Define.
13736 (i386-low.o): Add dependencies.
13737 (linux-x86-low.o): Add i386-low.h dependency.
13738 (win32-i386-low.o): Ditto.
13739 * i386-low.c: New file.
13740 * i386-low.h: New file.
13741 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13742 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13743 * linux-low.c (linux_add_process): Initialize arch_private.
13744 (linux_remove_process): Free arch_private.
13745 (add_lwp): Initialize arch_private.
13746 (delete_lwp): Free arch_private.
13747 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13748 provided.
13749 * linux-low.h (process_info_private): New member arch_private.
13750 (lwp_info): New member arch_private.
13751 (linux_target_ops): New members new_process, new_thread,
13752 prepare_to_resume.
13753 (ptid_of): New macro.
13754 * linux-x86-low.c: Include stddef.h, i386-low.h.
13755 (arch_process_info): New struct.
13756 (arch_lwp_info): New struct.
13757 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13758 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13759 (i386_dr_low_get_status): New function.
13760 (x86_insert_point, x86_remove_point): New functions.
13761 (x86_stopped_by_watchpoint): New function.
13762 (x86_stopped_data_address): New function.
13763 (x86_linux_new_process, x86_linux_new_thread): New functions.
13764 (x86_linux_prepare_to_resume): New function.
13765 (the_low_target): Add entries for insert_point, remove_point,
13766 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13767 prepare_to_resume.
13768 * server.c (debug_hw_points): New global.
13769 (monitor_show_help): Document set debug-hw-points.
13770 (handle_query): Process "set debug-hw-points".
13771 * server.h (debug_hw_points): Declare.
13772 (paddress): Declare.
13773 * utils.c (NUMCELLS, CELLSIZE): New macros.
13774 (get_sell, xsnprintf, paddress): New functions.
13775 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13776 remove_point, stopped_by_watchpoint, stopped_data_address.
13777 * win32-i386-low.c: Include i386-low.h.
13778 (debug_reg_state): Replaces dr.
13779 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13780 (i386_dr_low_get_status): New function.
13781 (i386_insert_point, i386_remove_point): New functions.
13782 (i386_stopped_by_watchpoint): New function.
13783 (i386_stopped_data_address): New function.
13784 (i386_initial_stuff): Update.
13785 (get_thread_context,set_thread_context,i386_thread_added): Update.
13786 (the_low_target): Add entries for insert_point,
13787 remove_point, stopped_by_watchpoint, stopped_data_address.
13788 * win32-low.c (win32_insert_watchpoint): New function.
13789 (win32_remove_watchpoint): New function.
13790 (win32_stopped_by_watchpoint): New function.
13791 (win32_stopped_data_address): New function.
13792 (win32_target_ops): Add entries for insert_watchpoint,
13793 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13794 * win32-low.h (win32_target_ops): New members insert_point,
13795 remove_point, stopped_by_watchpoint, stopped_data_address.
13796
d993e290
PA
137972009-06-25 Pedro Alves <pedro@codesourcery.com>
13798
13799 * server.c (process_serial_event): Re-return unsupported, not
13800 error, if the type isn't recognized. Re-allow supporting only
13801 insert or remove packets. Also call require_running for
13802 breakpoints. Add missing break statement to default case. Tidy.
13803 * target.h (struct target_ops): Rename insert_watchpoint to
13804 insert_point, and remove_watchpoint to remove_point.
13805
13806 * linux-low.h (struct linux_target_ops): Likewise.
13807 * linux-low.c (linux_insert_watchpoint): Rename to ...
13808 (linux_insert_point): ... this. Adjust.
13809 (linux_remove_watchpoint): Rename to ...
13810 (linux_remove_point): ... this. Adjust.
13811 (linux_target_ops): Adjust.
13812 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13813 (cris_insert_point): ... this.
13814 (cris_remove_watchpoint): Rename to ...
13815 (cris_remove_point): ... this.
13816 (the_low_target): Adjust.
13817
0f54c268
PM
138182009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13819
13820 * server.c (handle_v_kill): Pass signal_pid to
13821 kill_inferior if multi_process is zero.
13822
c6314022
AR
138232009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13824
13825 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13826 * target.h (target_ops): Comment for *_watchpoint to make it clear
13827 the functions can get types '0' and '1'.
13828
4463ce24
AR
138292009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13830
13831 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13832 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13833 * regcache.c (get_regcache): Likewise.
13834 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13835 * win32-low.c (child_fetch_inferior_registers): Remove check for
13836 regno 0.
13837
cf8fd78b
PA
138382009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13839 Pedro Alves <pedro@codesourcery.com>
13840
13841 * target.h (struct target_ops) <supports_multi_process>: New
13842 callback.
13843 (target_supports_multi_process): New.
13844 * server.c (handle_query): Even if GDB reports support, only
13845 enable multi-process if the target also supports it. Report
13846 multi-process support only if the target backend supports it.
13847 * linux-low.c (linux_supports_multi_process): New function.
13848 (linux_target_ops): Install it as target_supports_multi_process
13849 callback.
13850
47c0c975
DE
138512009-05-24 Doug Evans <dje@google.com>
13852
e09875d4
DE
13853 Global renaming of find_thread_pid to find_thread_ptid.
13854 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13855 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13856 All callers updated.
13857
e27d73f6
DE
13858 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13859 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13860 directly.
13861
47c0c975
DE
13862 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13863 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13864 (linux_resume_one_lwp): Ditto.
13865
2acc282a
DE
138662009-05-23 Doug Evans <dje@google.com>
13867
13868 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13869 from struct inferior_list_entry * to struct lwp_info *.
13870 All callers updated.
13871
9f1036c1
DE
138722009-05-13 Doug Evans <dje@google.com>
13873
13874 * linux-x86-low.c: Don't include assert.h.
13875 (x86_siginfo_fixup): Use fatal, not assert.
13876 (x86_arch_setup): Fix comment.
13877
d0722149
DE
138782009-05-12 Doug Evans <dje@google.com>
13879
13880 Biarch support for i386/amd64 gdbserver.
13881 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13882 Add linux-x86-low.c.
13883 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13884 (linux-x86-low.o): Add.
13885 * linux-x86-64-low.c: Delete.
13886 * linux-i386-low.c: Delete.
13887 * linux-x86-low.c: New file.
13888 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13889 linux-x86-low.o.
13890 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13891 linux-x86-low.o.
13892 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13893 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13894 (linux_child_pid_to_exec_file): New function.
13895 (elf_64_header_p, elf_64_file_p): New functions.
13896 (siginfo_fixup): New function.
13897 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13898 give target a chance to convert layout.
13899 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13900 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13901
fdeb2a12
DE
139022009-05-07 Doug Evans <dje@google.com>
13903
13904 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13905 (regsets_store_inferior_registers): Ditto.
13906
a6dbe5df
PA
139072009-05-06 Pedro Alves <pedro@codesourcery.com>
13908
13909 PR server/10048
13910
13911 * linux-low.c (must_set_ptrace_flags): Delete.
13912 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13913 of the global.
13914 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13915 `lwp->must_set_ptrace_flags' instead.
ba42693b 13916 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13917 (linux_wait_1): ... not here.
13918
5091eb23
DE
139192009-04-30 Doug Evans <dje@google.com>
13920
9f767825
DE
13921 * inferiors.c (started_inferior_callback): New function.
13922 (attached_inferior_callback): New function.
13923 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13924 * server.c (print_started_pid, print_attached_pid): New functions.
13925 (detach_or_kill_for_exit): New function.
13926 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13927 * server.h (have_started_inferiors_p): Declare.
13928 (have_attached_inferiors_p): Declare.
13929
5091eb23
DE
13930 * inferiors.c (remove_process): Fix memory leak, free process.
13931 * linux-low.c (linux_remove_process): New function.
13932 (linux_kill): Call it instead of remove_process.
13933 (linux_detach, linux_wait_1): Ditto.
13934
155c8968
PA
139352009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13936
13937 * configure.srv: Add x86 Windows CE target.
13938
7fe519cb
UW
139392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13940
13941 * inferiors.c (get_thread_process): Make global.
13942 * server.h (get_thread_process): Add prototype.
13943 * thread-db.c (find_one_thread): Use get_thread_process
13944 instead of current_process.
13945 (thread_db_get_tls_address): Do not crash if called when
13946 thread layer is not yet initialized.
13947
5472f405
UW
139482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13949
13950 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13951 * spu-low.c (current_tid): Rename to ...
13952 (current_ptid): ... this.
13953 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13954 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13955 ptid_get_lwp (current_ptid) instead of current_tid.
13956 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13957 instead of current_tid. Use find_process_pid to verify pid
13958 argument is valid. Pass proper argument to remove_process.
13959 (spu_thread_alive): Compare current_ptid instead of current_tid.
13960 (spu_resume): Likewise.
13961
55ac2b99
PA
139622009-04-02 Pedro Alves <pedro@codesourcery.com>
13963
13964 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13965 variable.
13966
95954743
PA
139672009-04-01 Pedro Alves <pedro@codesourcery.com>
13968
13969 Implement the multiprocess extensions, and add linux multiprocess
13970 support.
13971
13972 * server.h (ULONGEST): Declare.
13973 (struct ptid, ptid_t): New.
13974 (minus_one_ptid, null_ptid): Declare.
13975 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13976 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13977 (struct inferior_list_entry): Change `id' type from unsigned from
13978 to ptid_t.
13979 (struct sym_cache, struct breakpoint, struct
13980 process_info_private): Forward declare.
13981 (struct process_info): Declare.
13982 (current_process): Declare.
13983 (all_processes): Declare.
13984 (initialize_inferiors): Declare.
13985 (add_thread): Adjust to use ptid_t.
13986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13987 (add_process, remove_process, find_thread_pid): Declare.
13988 (find_inferior_id): Adjust to use ptid_t.
13989 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13990 (multi_process): Declare.
13991 (push_event): Adjust to use ptid_t.
13992 (read_ptid, write_ptid): Declare.
13993 (prepare_resume_reply): Adjust to use ptid_t.
13994 (clear_symbol_cache): Declare.
13995 * inferiors.c (all_processes): New.
13996 (null_ptid, minus_one_ptid): New.
13997 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13998 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13999 (add_thread): Change unsigned long to ptid. Remove gdb_id
14000 parameter. Adjust.
14001 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14002 (gdb_id_to_thread): Rename to ...
14003 (find_thread_pid): ... this. Change unsigned long to ptid.
14004 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14005 (loaded_dll, pull_pid_from_list): Adjust.
14006 (add_process, remove_process, find_process_pid)
14007 (get_thread_process, current_process, initialize_inferiors): New.
14008 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14009 (struct target_waitstatus) <related_pid>: Ditto.
14010 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14011 return type to int.
14012 (struct target_ops) <join>: Add `pid' argument.
14013 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14014 (struct target_ops) <wait>: Add `ptid' field. Change return type
14015 to ptid.
14016 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14017 (mywait): Add `ptid' argument. Change return type to ptid_t.
14018 (target_pid_to_str): Declare.
14019 * target.c (set_desired_inferior): Adjust to use ptids.
14020 (mywait): Add new `ptid' argument. Adjust.
14021 (target_pid_to_str): New.
14022 * mem-break.h (free_all_breakpoints): Declare.
14023 * mem-break.c (breakpoints): Delelete.
14024 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14025 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14026 to use per-process breakpoint list.
14027 (free_all_breakpoints): New.
14028 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14029 (symbol_cache, all_symbols_looked_up): Delete.
14030 (hexchars): New.
14031 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14032 read_ptid): New.
14033 (prepare_resume_reply): Change ptid argument's type from unsigned
14034 long to ptid_t. Adjust. Implement W;process and X;process.
14035 (free_sym_cache, clear_symbol_cache): New.
14036 (look_up_one_symbol): Adjust to per-process symbol cache. *
14037 * server.c (cont_thread, general_thread, step_thread): Change type
14038 to ptid_t.
14039 (attached): Delete.
14040 (multi_process): New.
14041 (last_ptid): Change type to ptid_t.
14042 (struct vstop_notif) <ptid>: Change type to ptid_t.
14043 (queue_stop_reply, push_event): Change `ptid' argument's type to
14044 ptid_t.
14045 (discard_queued_stop_replies): Add `pid' argument.
14046 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14047 changes. Don't reference the `attached' global.
14048 (attach_inferior): Adjust to mywait interface changes.
14049 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14050 features. Handle and report "multiprocess+". Handle
14051 "qAttached:PID".
14052 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14053 changes.
14054 (handle_v_kill): New.
14055 (handle_v_stopped): Adjust to use target_pid_to_str.
14056 (handle_v_requests): Allow multiple attaches and runs when
14057 multiprocess extensions are in effect. Handle "vKill".
14058 (myresume): Adjust to use ptids.
14059 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14060 (handle_status): Adjust to discard_queued_stop_replies interface
14061 change.
14062 (first_thread_of, kill_inferior_callback)
14063 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14064 (main): Call initialize_inferiors. Adjust to use ptids, killing
14065 and detaching from all inferiors. Handle multiprocess packet
14066 variants.
14067 * linux-low.h: Include gdb_proc_service.h.
14068 (struct process_info_private): New.
14069 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14070 <lwpid_of>: Use ptid_get_lwp.
14071 (get_lwp_thread): Adjust.
14072 (struct lwp_info): Add `dead' member.
14073 (find_lwp_pid): Declare.
14074 * linux-low.c (thread_db_active): Delete.
14075 (new_inferior): Adjust comment.
14076 (inferior_pid): Delete.
14077 (linux_add_process): New.
14078 (handle_extended_wait): Adjust.
14079 (add_lwp): Change unsigned long to ptid.
14080 (linux_create_inferior): Add process to processes table. Adjust
14081 to use ptids. Don't set new_inferior here.
14082 (linux_attach_lwp): Rename to ...
14083 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14084 it. Adjust to use ptids.
14085 (linux_attach_lwp): New.
14086 (linux_attach): Add process to processes table. Don't set
14087 new_inferior here.
14088 (struct counter): New.
14089 (second_thread_of_pid_p, last_thread_of_process_p): New.
14090 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14091 multiple processes.
14092 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14093 processes. Remove process from process table.
14094 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14095 to multiple processes.
14096 (any_thread_of): New.
14097 (linux_detach): Add `pid' argument, and handle it. Remove process
14098 from processes table.
14099 (linux_join): Add `pid' argument. Handle it.
14100 (linux_thread_alive): Change unsighed long argument to ptid_t.
14101 Consider dead lwps as not being alive.
14102 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14103 threads we're not interested in.
14104 (same_lwp, find_lwp_pid): New.
14105 (linux_wait_for_lwp): Change `pid' argument's type from int to
14106 ptid_t. Adjust.
14107 (linux_wait_for_event): Rename to ...
14108 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14109 from int to ptid_t. Adjust.
14110 (linux_wait_for_event): New.
14111 (linux_wait_1): Add `ptid' argument. Change return type to
14112 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14113 that exit from the process table.
14114 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14115 Adjust.
14116 (mark_lwp_dead): New.
14117 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14118 stopping all threads, mark its main lwp as dead.
14119 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14120 ptids.
14121 (fetch_register, usr_store_inferior_registers)
14122 (regsets_fetch_inferior_registers)
14123 (regsets_store_inferior_registers, linux_read_memory)
14124 (linux_write_memory): Inline `inferior_pid'.
14125 (linux_look_up_symbols): Adjust to use per-process
14126 `thread_db_active'.
14127 (linux_request_interrupt): Adjust to use ptids.
14128 (linux_read_auxv): Inline `inferior_pid'.
14129 (initialize_low): Don't reference thread_db_active.
14130 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14131 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14132 (ps_getpid): Return the pid of the current inferior.
14133 * thread-db.c (proc_handle, thread_agent): Delete.
14134 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14135 per-process data.
14136 (find_one_thread): Change argument type to ptid_t. Adjust to
14137 per-process data.
14138 (maybe_attach_thread): Adjust to per-process data and ptids.
14139 (thread_db_find_new_threads): Ditto.
14140 (thread_db_init): Ditto.
14141 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14142 processes table. Adjust to use ptids.
14143 (spu_kill, spu_detach): Adjust interface. Remove process from
14144 processes table.
14145 (spu_join, spu_thread_alive): Adjust interface.
14146 (spu_wait): Adjust interface. Remove process from processes
14147 table. Adjust to use ptids.
14148 * win32-low.c (current_inferior_tid): Delete.
14149 (current_inferior_ptid): New.
14150 (debug_event_ptid): New.
14151 (thread_rec): Take a ptid. Adjust.
14152 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14153 (child_delete_thread): Ditto.
14154 (do_initial_child_stuff): Add `attached' argument. Add process to
14155 processes table.
14156 (child_fetch_inferior_registers, child_store_inferior_registers):
14157 Adjust.
14158 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14159 (win32_attach): Pass 1 to do_initial_child_stuff.
14160 (win32_kill): Adjust interface. Remove process from processes
14161 table.
14162 (win32_detach): Ditto.
14163 (win32_join): Adjust interface.
14164 (win32_thread_alive): Take a ptid.
14165 (win32_resume): Adjust to use ptids.
14166 (get_child_debug_event): Ditto.
14167 (win32_wait): Adjust interface. Remove exiting process from
14168 processes table.
14169
bd99dc85
PA
141702009-04-01 Pedro Alves <pedro@codesourcery.com>
14171
14172 Non-stop mode support.
14173
14174 * server.h (non_stop): Declare.
14175 (gdb_client_data, handler_func): Declare.
14176 (delete_file_handler, add_file_handler, start_event_loop):
14177 Declare.
14178 (handle_serial_event, handle_target_event, push_event)
14179 (putpkt_notif): Declare.
14180 * target.h (enum resume_kind): New.
14181 (struct thread_resume): Replace `step' field by `kind' field.
14182 (TARGET_WNOHANG): Define.
14183 (struct target_ops) <wait>: Add `options' argument.
14184 <supports_non_stop, async, start_non_stop>: New fields.
14185 (target_supports_non_stop, target_async): New.
14186 (start_non_stop): Declare.
14187 (mywait): Add `options' argument.
14188 * target.c (mywait): Add `options' argument. Print child exit
14189 notifications here.
14190 (start_non_stop): New.
14191 * server.c (non_stop, own_buf, mem_buf): New globals.
14192 (struct vstop_notif): New.
14193 (notif_queue): New global.
14194 (queue_stop_reply, push_event, discard_queued_stop_replies)
14195 (send_next_stop_reply): New.
14196 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14197 interface changes.
14198 (attach_inferior): In non-stop mode, don't wait for the target
14199 here.
14200 (handle_general_set): Handle QNonStop.
14201 (handle_query): When handling qC, return the current general
14202 thread, instead of the first thread of the list.
14203 (handle_query): If the backend supports non-stop mode, include
14204 QNonStop+ in the qSupported query response.
14205 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14206 and non-stop mode.
14207 (handle_v_attach, handle_v_run): Handle non-stop mode.
14208 (handle_v_stopped): New.
14209 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14210 (myresume): Adjust to use resume_kind. Handle non-stop.
14211 (queue_stop_reply_callback): New.
14212 (handle_status): Handle non-stop mode.
14213 (main): Clear non_stop flag on reconnection. Use the event-loop.
14214 Refactor serial protocol handling from here ...
14215 (process_serial_event): ... to this new function. When GDB
14216 selects any thread, select one here. In non-stop mode, wait until
14217 GDB acks all pending events before exiting.
14218 (handle_serial_event, handle_target_event): New.
14219 * remote-utils.c (remote_open): Install remote_desc in the event
14220 loop.
14221 (remote_close): Remove remote_desc from the event loop.
14222 (putpkt_binary): Rename to...
14223 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14224 (putpkt_binary): New as wrapper around putpkt_binary_1.
14225 (putpkt_notif): New.
14226 (prepare_resume_reply): In non-stop mode, don't change the
14227 general_thread.
14228 * event-loop.c: New.
14229 * Makefile.in (OBJ): Add event-loop.o.
14230 (event-loop.o): New rule.
14231
14232 * linux-low.h (pid_of): Moved here.
14233 (lwpid_of): New.
14234 (get_lwp_thread): Use lwpid_of.
14235 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14236 * linux-low.c (pid_of): Delete.
14237 (inferior_pid): Use lwpid_of.
14238 (linux_event_pipe): New.
14239 (target_is_async_p): New.
14240 (delete_lwp): New.
14241 (handle_extended_wait): Use lwpid_of.
14242 (add_lwp): Don't set lwpid field.
14243 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14244 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14245 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14246 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14247 first. Adjust to linux_wait_for_event interface changes. Use
14248 lwpid_of.
14249 (linux_detach): Don't delete the main lwp here.
14250 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14251 (status_pending_p): Don't consider explicitly suspended lwps.
14252 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14253 pointer. Add OPTIONS argument. Change return type to int. Use
14254 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14255 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14256 pointer. Add status pointer argument. Return a pid instead of a
14257 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14258 changes. In non-stop mode, don't switch to a random thread.
14259 (linux_wait): Rename to...
14260 (linux_wait_1): ... this. Add target_options argument, and handle
14261 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14262 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14263 clean exit and signal exit code. Don't stop all threads in
14264 non-stop mode. In all-stop mode, only stop all threads when
14265 reporting a stop to GDB. Handle explicit thread stop requests.
14266 (async_file_flush, async_file_mark): New.
14267 (linux_wait): New.
14268 (send_sigstop): Use lwpid_of.
14269 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14270 interface changes. In non-stop mode, don't switch to a random
14271 thread.
14272 (linux_resume_one_lwp): Use lwpid_of.
14273 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14274 (linux_resume_one_thread): ... this. Handle resume_stop. In
14275 non-stop mode, don't look for pending flag in all threads.
14276 (resume_status_pending_p): Don't consider explicitly suspended
14277 threads.
14278 (my_waitpid): Reimplement. Emulate __WALL.
14279 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14280 Use lwpid_of.
14281 (sigchld_handler, linux_supports_non_stop, linux_async)
14282 (linux_start_non_stop): New.
14283 (linux_target_ops): Register linux_supports_non_stop, linux_async
14284 and linux_start_non_stop.
14285 (initialize_low): Install SIGCHLD handler.
14286 * thread-db.c (thread_db_create_event, find_one_thread)
14287 (thread_db_get_tls_address): Use lwpid_of.
14288 * win32-low.c (win32_detach): Adjust to use resume_kind.
14289 (win32_wait): Add `options' argument.
14290 * spu-low.c (spu_resume): Adjust to use resume_kind.
14291 (spu_wait): Add `options' argument.
14292
5b1c542e
PA
142932009-04-01 Pedro Alves <pedro@codesourcery.com>
14294
14295 Decouple target code from remote protocol.
14296
14297 * target.h (enum target_waitkind): New.
14298 (struct target_waitstatus): New.
14299 (struct target_ops) <wait>: Return an unsigned long. Take a
14300 target_waitstatus pointer instead of a char pointer.
14301 (mywait): Likewise.
14302 * target.c (mywait): Change prototype to return an unsigned long.
14303 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14304 * server.h (thread_from_wait, old_thread_from_wait): Delete
14305 declarations.
14306 (prepare_resume_reply): Change prototype to take a
14307 target_waitstatus.
14308 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14309 (last_status, last_ptid): New.
14310 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14311 pid instead of a signal.
14312 (attach_inferior): Remove "status" and "signal" parameters.
14313 Adjust.
14314 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14315 not as an address.
14316 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14317 (handle_v_requests, myresume): Remove "status" and "signal"
14318 parameters. Adjust.
14319 (handle_status): New.
14320 (main): Delete local `status'. Adjust.
14321 * remote-utils.c: Include target.h.
14322 (prepare_resume_reply): Change prototype to take a
14323 target_waitstatus. Adjust.
14324
14325 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14326 interface.
14327 * spu-low.c (spu_wait): Adjust.
14328 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14329 Delete.
14330 (win32_wait): Adjust.
14331
2bd7c093
PA
143322009-04-01 Pedro Alves <pedro@codesourcery.com>
14333
14334 * target.h (struct thread_resume): Delete leave_stopped member.
14335 (struct target_ops): Add a `n' argument to the `resume' callback.
14336 * server.c (start_inferior): Adjust.
14337 (handle_v_cont, myresume): Adjust.
14338 * linux-low.c (check_removed_breakpoint): Adjust to resume
14339 interface change, and to removed leave_stopped field.
14340 (resume_ptr): Delete.
14341 (struct thread_resume_array): New.
14342 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14343 resume interface change.
14344 (linux_continue_one_thread, linux_queue_one_thread)
14345 (resume_status_pending_p): Check if the resume field is NULL
14346 instead of checking the leave_stopped member.
14347 (linux_resume): Adjust to the target resume interface change.
14348 * spu-low.c (spu_resume): Adjust to the target resume interface
14349 change.
14350 * win32-low.c (win32_detach, win32_resume): Ditto.
14351
c35fafde
PA
143522009-04-01 Pedro Alves <pedro@codesourcery.com>
14353
14354 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14355 flag.
14356 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14357 pending.
14358 (linux_continue_one_thread): Only preserve the stepping flag if
14359 there's a pending breakpoint.
14360
0a59d50b
PA
143612009-03-31 Pedro Alves <pedro@codesourcery.com>
14362
14363 * server.c (main): After the inferior having exited, call
14364 remote_close before exiting gdbserver.
14365
f04c6d38
TJB
143662009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14367
14368 Fix size of FPSCR in Power 7 processors.
14369 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14370 (PPC_FEATURE_HAS_DFP): New #define.
14371 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14372 size of the FPSCR.
14373
78e5cee6
PA
143742009-03-23 Pedro Alves <pedro@codesourcery.com>
14375
14376 * server.c (handle_query) Whitespace and formatting.
14377
1b3f6016
PA
143782009-03-22 Pedro Alves <pedro@codesourcery.com>
14379
14380 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14381 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14382 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14383 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14384 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14385 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14386 Makefile.in, configure.ac: Fix whitespace throughout.
14387 * configure: Regenerate.
14388
a07b2135
PA
143892009-03-22 Pedro Alves <pedro@codesourcery.com>
14390
14391 * inferiors.c (find_inferior): Make it safe for the callback
14392 function to delete the currently iterated inferior.
14393
67cc2626
PA
143942009-03-22 Pedro Alves <pedro@codesourcery.com>
14395
14396 * Makefile.in (linuw_low_h): Move higher.
14397 (thread-db.o): Depend on $(linux_low_h).
14398
54a0b537
PA
143992009-03-17 Pedro Alves <pedro@codesourcery.com>
14400
14401 Rename "process" to "lwp" throughout.
14402
14403 * linux-low.c (all_processes): Rename to...
14404 (all_lwps): ... this.
14405 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14406 (add_process): Rename to ...
14407 (add_lwp): ... this. Adjust.
14408 (linux_create_inferior): Adjust.
14409 (linux_attach_lwp): Adjust.
14410 (linux_attach): Adjust.
14411 (linux_kill_one_process): Rename to ...
14412 (linux_kill_one_lwp): ... this. Adjust.
14413 (linux_kill): Adjust.
14414 (linux_detach_one_process): Rename to ...
14415 (linux_detach_one_lwp): ... this. Adjust.
14416 (linux_detach): Adjust.
14417 (check_removed_breakpoint): Adjust.
14418 (status_pending_p): Adjust.
14419 (linux_wait_for_process): Rename to ...
14420 (linux_wait_for_lwp): ... this. Adjust.
14421 (linux_wait_for_event): Adjust.
14422 (send_sigstop): Adjust.
14423 (wait_for_sigstop): Adjust.
14424 (stop_all_processes): Rename to ...
14425 (stop_all_lwps): ... this.
14426 (linux_resume_one_process): Rename to ...
14427 (linux_resume_one_lwp): ... this. Adjust.
14428 (linux_set_resume_request, linux_continue_one_thread)
14429 (linux_queue_one_thread, resume_status_pending_p)
14430 (usr_store_inferior_registers, regsets_store_inferior_registers)
14431 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14432 Adjust.
14433 * linux-low.h (get_process): Rename to ...
14434 (get_lwp): ... this. Adjust.
14435 (get_thread_process): Rename to ...
14436 (get_thread_lwp): ... this. Adjust.
14437 (get_process_thread): Rename to ...
14438 (get_lwp_thread): ... this. Adjust.
14439 (struct process_info): Rename to ...
14440 (struct lwp_info): ... this.
14441 (all_processes): Rename to ...
14442 (all_lwps): ... this.
14443 * proc-service.c (ps_lgetregs): Adjust.
14444 * thread-db.c (thread_db_create_event, find_one_thread)
14445 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14446
0b16c5cf
PA
144472009-03-14 Pedro Alves <pedro@codesourcery.com>
14448
14449 * server.c (handle_query): Handle "qAttached".
14450
32de4b9d
NS
144512009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14452
14453 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14454 GPLv3, update license URL.
14455
2aecd87f
DE
144562009-03-01 Doug Evans <dje@google.com>
14457
93efd302 14458 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14459 (server_h): Add gdb_signals.h.
14460 (signals.o): Update.
14461 * server.h (target_signal_from_host,target_signal_to_host_p)
14462 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14463
86b1f9c5
PM
144642009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14465
14466 * remote-utils.c (getpkt): Also generate remote-debug
14467 information if noack_mode is set.
14468
4aa995e1
PA
144692009-02-06 Pedro Alves <pedro@codesourcery.com>
14470
14471 * server.c (handle_query): Report qXfer:siginfo:read and
14472 qXfer:siginfo:write as supported and handle them.
14473 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14474 * linux-low.c (linux_xfer_siginfo): New.
14475 (linux_target_ops): Set it.
14476
62709adf
PA
144772009-01-26 Pedro Alves <pedro@codesourcery.com>
14478
14479 * server.c (gdbserver_usage): Mention --remote-debug.
14480 (main): Accept '--remote-debug' switch.
14481
aef93bd7
DE
144822009-01-18 Doug Evans <dje@google.com>
14483
14484 * regcache.c (new_register_cache): No need to check result of xcalloc.
14485 * server.c (handle_search_memory): Back out calls to xmalloc,
14486 result is checked and error is returned to user upon failure.
14487 (handle_query): Ditto. Add more checks for result of malloc.
14488 (handle_v_cont): Check result of malloc, report error back to
14489 user upon failure.
14490 (handle_v_run): Ditto. Call freeargv.
14491 * server.h (freeargv): Declare.
14492 * utils.c (freeargv): New fn.
14493
54363045
DE
144942009-01-15 Doug Evans <dje@google.com>
14495
f626972c
DE
14496 * gdbreplay.c (perror_with_name): Make arg const char *.
14497 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14498 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14499 * utils.c (perror_with_name): Make arg const char *.
54363045 14500
18aae699
PA
145012009-01-14 Pedro Alves <pedro@codesourcery.com>
14502
14503 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14504 when handling a EXIT_PROCESS_DEBUG_EVENT.
14505
ff703abe
JB
145062009-01-06 Joel Brobecker <brobecker@adacore.com>
14507
14508 * gdbreplay.c (gdbreplay_version): Update copyright year.
14509 * server.c (gdbserver_version): Likewise.
14510
f21cc1a2 145112009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14512
14513 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14514 (handle_extended_wait): Improve comment.
0e21c1ec 14515
bca929d3
DE
145162008-12-13 Doug Evans <dje@google.com>
14517
14518 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14519 * server.h (ATTR_MALLOC): New macro.
14520 (xmalloc,xcalloc,xstrdup): Declare.
14521 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14522 * inferiors.c: Ditto.
14523 * linux-low.c: Ditto.
14524 * mem-break.c: Ditto.
14525 * regcache.c: Ditto.
14526 * remote-utils.c: Ditto.
14527 * server.c: Ditto.
14528 * target.c: Ditto.
14529 * win32-low.c: Ditto.
14530
97438e3f
DE
145312008-12-12 Doug Evans <dje@google.com>
14532
896c7fbb
DE
14533 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14534 in debugging printf.
14535
97438e3f
DE
14536 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14537
e3b886f8
DE
145382008-12-09 Doug Evans <dje@google.com>
14539
14540 * linux-low.h (struct process_info): Delete member tid, unused.
14541 * thread-db.c (find_one_thread): Update.
14542 (maybe_attach_thread): Update.
14543
07e059b5
VP
145442008-12-02 Pedro Alves <pedro@codesourcery.com>
14545
889bf7c5
PA
14546 * target.h (struct target_ops): Add qxfer_osdata member.
14547 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14548 and dirent.h.
14549 (linux_qxfer_osdata): New functions.
14550 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14551 callback.
14552 * server.c (handle_query): Handle "qXfer:osdata:read:".
14553 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14554 (buffer_xml_printf): New functions.
14555 * server.h (struct buffer): New.
14556 (buffer_grow_str, buffer_grow_str0): New macros.
14557 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14558 (buffer_xml_printf): Declare.
07e059b5 14559
4cab47ab
DE
145602008-11-24 Doug Evans <dje@google.com>
14561
14562 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14563
f142445f
DJ
145642008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * server.c (handle_v_run): Always use the supplied argument list.
14567
d0107bb6 145682008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14569
d0107bb6
BW
14570 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14571 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14572
2c4ad781
TJB
145732008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14574
14575 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14576 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14577 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14578 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14579 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14580 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14581 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14582 XML target descriptions.
14583 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14584 when inferior is running on an ISA 2.05 or later processor. Add
14585 special case to return offset for full 64-bit slot of FPSCR when
14586 in 32-bits.
14587
dfb64f85
DJ
145882008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14589
14590 * Makefile.in (SFILES, clean): Added sparc64 files.
14591 (reg-sparc64.o, reg-sparc64.c): New.
14592 * configure.srv (sparc*-*-linux*): New configuration.
14593 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14594 syscall arguments for SPARC.
14595 (regsets_store_inferior_registers): Likewise.
14596 * linux-sparc-low.c: New file.
14597
66b6e1dd
DE
145982008-10-21 Doug Evans <dje@google.com>
14599
14600 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14601 (READLINE_DIR,READLINE_DEP): Delete.
14602 (INTERNAL_CFLAGS): Update.
14603 (LINTFLAGS): Update.
14604
9b710a42
PA
146052008-10-10 Pedro Alves <pedro@codesourcery.com>
14606
14607 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14608 whole argv from the last run, not just argv[0].
14609
5822d809
PA
146102008-09-08 Pedro Alves <pedro@codesourcery.com>
14611
14612 * regcache.c (new_register_cache): Return NULL if the register
14613 cache size isn't known yet.
14614 (free_register_cache): Avoid dereferencing a NULL regcache.
14615
74aac56f
DJ
146162008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14617
14618 * configure.srv: Merge MIPS and MIPS64.
14619
400b20f5
MR
146202008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14621
14622 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14623
677c5bb1
LM
146242008-08-18 Luis Machado <luisgpm@br.ibm.com>
14625
14626 * Makefile.in: Add required vsx dependencies.
14627
14628 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14629 Declare init_registers_powerpc_vsx32l.
14630 Declare init_registers_powerpc_vsx64l.
14631 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14632 (ppc_arch_setup): Check for VSX in hwcap.
14633 (ppc_fill_vsxregset): New function.
14634 (ppc_store_vsxregset): New function.
14635 Add new VSX entry in regset_info target_regsets.
14636
14637 * configure.srv: Add new VSX dependencies.
14638
a6f3e723
SL
146392008-08-12 Pedro Alves <pedro@codesourcery.com>
14640
14641 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14642 (remote_open): Set or clear transport_is_reliable.
14643 (putpkt_binary): Don't expect acks in noack mode.
14644 (getpkt): Don't send ack/nac in noack mode.
14645 * server.c (handle_general_set): Handle QStartNoAckMode.
14646 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14647 qSupported.
14648 (main): Reset noack_mode on every connection.
14649 * server.h (noack_mode): Declare.
14650
a417dc56
RW
146512008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14652
14653 * Makefile.in (GDBREPLAY_OBS): New variable.
14654 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14655
3221518c
UW
146562008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14657 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14660 (usr_store_inferior_registers): Likewise.
14661 (regsets_store_inferior_registers): Likewise.
14662
ec56be1b
PA
146632008-07-31 Rolf Jansen <rj@surtec.com>
14664 Pedro Alves <pedro@codesourcery.com>
14665
14666 * configure.ac: Check for memmem declaration.
14667 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14668 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14669 (disable_packet_qfThreadInfo): Unconditionally compile.
14670 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14671 * configure, config.in: Regenerate.
14672
2fe5e3ff
DE
146732008-07-28 Doug Kwan <dougkwan@google.com>
14674
14675 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14676 (linux_write_memory): Remove declaration of errno.
14677
836acd6d
UW
146782008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14679
14680 * linux-low.c (handle_extended_wait): Do not use "status"
14681 variable uninitialized.
14682
aeba519e
PA
146832008-07-07 Pedro Alves <pedro@codesourcery.com>
14684
14685 * server.c (handle_v_attach): Inhibit reporting dll changes.
14686
db42f210
PA
146872008-06-27 Pedro Alves <pedro@codesourcery.com>
14688
14689 * remote-utils.c (prepare_resume_reply): If requested, don't
14690 output "thread:TID" in the T stop reply.
14691
14692 * server.c (disable_packet_vCont, disable_packet_Tthread)
14693 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14694 (handle_query): If requested, disable support for qC, qfThreadInfo
14695 and qsThreadInfo.
14696 (handle_v_requests): If requested, disable support for vCont.
14697 (gdbserver_show_disableable): New.
14698 (main): Handle --disable-packet and --disable-packet=LIST.
14699
14700 * server.h (disable_packet_vCont, disable_packet_Tthread)
14701 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14702
8e4c5421
CD
147032008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14704
14705 * server.c (gdbserver_usage): Mention --version.
14706
6e23a804
DJ
147072008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14708
14709 * Makefile.in (gdbreplay.o): New rule.
14710
90aa6a40
JM
147112008-06-06 Joseph Myers <joseph@codesourcery.com>
14712
14713 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14714 message, not gdbserver.
14715
c16158bc 147162008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14717 Nathan Sidwell <nathan@codesourcery.com>
14718 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14719
14720 * acinclude.m4: Include ../../config/acx.m4.
14721 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14722 * configure, config.in: Regenerate.
14723 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14724 * server.c (gdbserver_version): Print PKGVERSION.
14725 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14726 (main): Adjust gdbserver_usage calls.
14727 * gdbreplay.c (version, host_name): Add declarations.
14728 (gdbreplay_version, gdbreplay_usage): New.
14729 (main): Accept --version and --help options.
14730
aeb75bf5
DJ
147312008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14732
14733 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14734 (arm_breakpoint_at): Handle Thumb.
14735 (the_low_target): Add comment.
14736
76b233dd
UW
147372008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14738
14739 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14740
08388c79
DE
147412008-05-09 Doug Evans <dje@google.com>
14742
a3c83fae
DE
14743 * server.h (decode_search_memory_packet): Declare.
14744 * remote-utils.c (decode_search_memory_packet): New fn.
14745 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14746 (handle_search_memory): New fn.
14747 (handle_query): Process qSearch:memory packets.
14748
bb9c3d36
UW
147492008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14750
14751 * regcache.c (registers_length): Remove.
14752 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14753 full register packet.
14754 * regcache.h (registers_length): Remove prototype.
14755 * server.h (PBUFSIZ): Define to 16384.
14756
7284e1be
UW
147572008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14758
14759 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14760 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14761 powerpc-64l.o, and powerpc-altivec64l.o.
14762 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14763 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14764 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14765 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14766 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14767 to srv_xmlfiles.
14768
14769 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14770 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14771 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14772 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14773 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14774 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14775 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14776 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14777 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14778 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14779 (clean): Update.
14780
14781 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14782 (init_registers_powerpc_32l): ... this new prototype.
14783 (init_registers_powerpc_32): Remove, replace by ...
14784 (init_registers_powerpc_altivec32l): ... this new prototype.
14785 (init_registers_powerpc_e500): Remove, replace by ...
14786 (init_registers_powerpc_e500l): ... this new prototype.
14787 (init_registers_ppc64): Remove, replace by ...
14788 (init_registers_powerpc_64l): ... this new prototype.
14789 (init_registers_powerpc_64): Remove, replace by ...
14790 (init_registers_powerpc_altivec64l): ... this new prototype.
14791 (ppc_num_regs): Set to 73.
14792 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14793 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14794 (ppc_cannot_store_register): Handle orig_r3 and trap.
14795 (ppc_arch_setup): Update init_registers_... calls.
14796 (ppc_fill_gregset): Handle orig_r3 and trap.
14797
14798 * inferiors.c (clear_inferiors): Reset current_inferior.
14799
fdc59709
PB
148002008-04-23 Paolo Bonzini <bonzini@gnu.org>
14801
889bf7c5
PA
14802 * acinclude.m4: Add override.m4.
14803 * configure: Regenerate.
fdc59709 14804
c9b2f845
UW
148052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14806
14807 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14808 initial call to init_register_ppc64.
14809
550512b8
UW
148102008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14811
43aaf8b6
PA
14812 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14813 single powerpc*-*-linux* case.
550512b8
UW
14814 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14815
b6430ec3
UW
148162008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14817
14818 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14819 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14820 from reg_xmlfiles.
14821 * linux-ppc-low.c: Include <elf.h>.
14822 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14823 (ppc_hwcap): New global variable.
14824 (ppc_regmap): Remove __SPE__ #ifdef sections.
14825 (ppc_regmap_e500): New global variable.
14826 (ppc_cannot_store_register): Update __SPE__ special case.
14827 (ppc_get_hwcap): New function.
14828 (ppc_arch_setup): Use it to determine whether inferior supports
14829 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14830 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14831 Do not access registers if target does not support AltiVec.
14832 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14833 Do not access registers if target does not support SPE.
14834 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14835
52fa2412
UW
148362008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14837
14838 * linux-low.c (disabled_regsets, num_regsets): New.
14839 (use_regsets_p): Delete.
14840 (linux_wait_for_process): Clear disabled_regsets.
14841 (regsets_fetch_inferior_registers): Check and set it.
14842 (regsets_store_inferior_registers): Likewise.
14843 (linux_fetch_registers, linux_store_registers): Do not use
14844 use_regsets_p.
14845 (initialize_low): Allocate disabled_regsets.
14846
e28b3332
DJ
148472008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14848
14849 * Makefile.in (LIBOBJS): New.
14850 (OBS): Use LIBOBJS.
14851 (memmem.o): New rule.
14852 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14853 * configure: Regenerated.
14854
4536995d
UW
148552008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14856
14857 * server.c (handle_query): Never return "unsupported" for
14858 qXfer:features:read queries.
14859
221c031f
UW
148602008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14861
14862 * server.c (get_features_xml): Fix inverted condition.
14863 (handle_query): Always support qXfer:feature:read.
14864
ccd213ac
DJ
148652008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14866
14867 * server.c (wrapper_argv): New.
14868 (start_inferior): Handle wrapper_argv. If set, expect an extra
14869 trap.
14870 (gdbserver_usage): Document --wrapper.
14871 (main): Parse --wrapper.
14872
6fe305f7
UW
148732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14874
14875 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14876 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14877 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14878 (ppc_set_pc): Likewise.
14879 (ppc_arch_setup): New function.
14880 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14881 of collect_register.
889bf7c5 14882 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14883
5b0a002e
UW
148842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14885
14886 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14887 instead of linux-ppc64-low.o.
14888 * linux-ppc64-low.c: Remove file.
14889 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14890 (linux-ppc64-low.o): Remove rule.
14891
14892 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14893 (init_registers_powerpc_64): Likewise.
14894 (ppc_regmap): Conditionally define depending on __powerpc64__.
14895 (ppc_cannot_store_register): Do not special-case "fpscr" when
14896 compiled on __powerpc64__.
14897 (ppc_collect_ptrace_register): New function.
14898 (ppc_supply_ptrace_register): New function.
14899 (ppc_breakpoint): Change type to "unsigned int".
14900 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14901 (the_low_target): Conditionally provide initializers for the
889bf7c5 14902 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14903 collect_ptrace_register and supply_ptrace_register members.
14904
9b4b61c8
UW
149052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14906
14907 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14908 * server.c (gdbserver_xmltarget): Define.
14909 (get_features_xml): Use it to replace "target.xml" and arch_string.
14910
14911 * configure.srv: Remove srv_xmltarget. Add XML files that were
14912 mentioned there to srv_xmlfiles instead. Remove conditional tests
14913 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14914 srv_xmlfiles and srv_regobj to include all possible choices.
14915 * configure.ac (srv_xmltarget): Remove.
14916 (srv_xmlfiles): Do not add "target.xml".
14917 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14918 checks for supplementary target information.
14919 * configure: Regenerate.
14920 * Makefile.in (XML_TARGET): Remove.
14921 (target.xml): Remove rule.
14922 (clean): Do not clean up target.xml.
14923 (.PRECIOUS): Do not mention target.xml.
14924
14925 * target.h (struct target_ops): Remove arch_string member.
14926 * linux-low.c (linux_arch_string): Remove.
14927 (linux_target_ops): Remove arch_string initializer.
14928 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14929 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14930 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14931 * spu-low.c (spu_arch_string): Remove.
14932 (spu_target_ops): Remove arch_string initializer.
14933 * win32-low.c (win32_arch_string): Remove.
14934 (win32_target_ops): Remove arch_string initializer.
14935 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14936 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14937 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14938
ee1a7ae4
UW
149392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14940
14941 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14942 by collect_ptrace_register and supply_ptrace_register hooks.
14943 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14944 instead of checking for the_low_target.left_pad_xfer.
14945 (usr_store_inferior_registers): Use collect_ptrace_register callback
14946 instead of checking for the_low_target.left_pad_xfer.
14947
14948 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14949 (s390_supply_ptrace_register): Likewise.
14950 (s390_fill_gregset): Call s390_collect_ptrace_register.
14951 (the_low_target): Update.
14952
14953 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14954 (ppc_supply_ptrace_register): Likewise.
14955 (the_low_target): Update.
14956
14957 * linux-i386-low.c (the_low_target): Update.
14958 * linux-x86-64-low.c (the_low_target): Update.
14959
d61ddec4
UW
149602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14961
14962 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14963 reg-s390.o and reg-s390x.o.
14964
14965 * linux-low.c (new_inferior): New global variable.
14966 (linux_create_inferior, linux_attach): Set it.
14967 (linux_wait_for_process): Call the_low_target.arch_setup after the
14968 target has stopped for the first time.
14969 (initialize_low): Do not call the_low_target.arch_setup.
14970
14971 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14972 (s390_set_pc): Likewise.
14973 (s390_arch_setup): New function.
14974 (the_low_target): Use s390_arch_setup as arch_setup routine.
14975
14976 * regcache.c (realloc_register_cache): New function.
14977 (set_register_cache): Call it for each existing regcache.
14978
d05b4ac3
UW
149792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14980
14981 * server.h (init_registers): Remove prototype.
14982
14983 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14984 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14985 instead of init_registers ().
14986 * linux-arm-low.c (init_registers_arm): Add prototype.
14987 (init_registers_arm_with_iwmmxt): Likewise.
14988 (the_low_target): Add initializer for arch_setup field.
14989 * linux-cris-low.c (init_registers_cris): Add prototype.
14990 (the_low_target): Add initializer for arch_setup field.
14991 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14992 (the_low_target): Add initializer for arch_setup field.
14993 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14994 (the_low_target): Add initializer for arch_setup field.
14995 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14996 (the_low_target): Add initializer for arch_setup field.
14997 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14998 (the_low_target): Add initializer for arch_setup field.
14999 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15000 (the_low_target): Add initializer for arch_setup field.
15001 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15002 (init_registers_mips64_linux): Likewise.
15003 (the_low_target): Add initializer for arch_setup field.
15004 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15005 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15006 (the_low_target): Add initializer for arch_setup field.
15007 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15008 (init_registers_powerpc_64): Likewise.
15009 (the_low_target): Add initializer for arch_setup field.
15010 * linux-s390-low.c (init_registers_s390): Add prototype.
15011 (init_registers_s390x): Likewise.
15012 (the_low_target): Add initializer for arch_setup field.
15013 * linux-sh-low.c (init_registers_sh): Add prototype.
15014 (the_low_target): Add initializer for arch_setup field.
15015 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15016 (the_low_target): Add initializer for arch_setup field.
15017 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15018 (the_low_target): Add initializer for arch_setup field.
15019
15020 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15021 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15022 instead of init_registers ().
15023 * win32-arm-low.c (init_registers_arm): Add prototype.
15024 (the_low_target): Add initializer for arch_setup field.
15025 * win32-i386-low.c (init_registers_i386): Add prototype.
15026 (the_low_target): Add initializer for arch_setup field.
15027
15028 * spu-low.c (init_registers_spu): Add prototype.
15029 (initialize_low): Call initialie_registers_spu () instead of
15030 initialize_registers ().
15031
fd96d250
PA
150322008-02-19 Pedro Alves <pedro@codesourcery.com>
15033
15034 * server.c (handle_v_requests): When handling the vRun and vAttach
15035 packets, if already debugging a process, don't kill it. Return an
15036 error instead.
15037
d41b6bb4
DJ
150382008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * server.c (handle_query): Correct length check.
15041
5ac588cf
PA
150422008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15043
15044 * win32-low.c (do_initial_child_stuff): Add process handle
15045 parameter. Set current_process_handle and current_process_id from the
15046 parameters. Clear globals.
15047 (win32_create_inferior): Don't set current_process_handle and
15048 current_process_id here. Instead pass them on the call to
15049 do_initial_child_stuff.
15050 (win32_attach): Likewise.
15051 (win32_clear_inferiors): New.
15052 (win32_kill): Don't close the current process handle or the
15053 current thread handle here. Instead call win32_clear_inferiors.
15054 (win32_detach): Don't open a new handle to the process. Call
15055 win32_clear_inferiors.
15056 (win32_join): Don't rely on current_process_handle; open a new
15057 handle using the process id.
15058 (win32_wait): Call win32_clear_inferiors when the inferior process
15059 has exited.
15060
ecd7ecbc
DJ
150612008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15062
15063 * server.c (monitor_show_help): Add "exit".
15064
1525d545
MG
150652008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15066
ecd7ecbc 15067 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15068 (clean): Add reg-xtensa.c.
15069 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15070 * configure.srv (xtensa*-*-linux*) New target.
15071 * linux-xtensa-low.c: New.
15072 * xtensa-xtregs.c: New.
1525d545 15073
59a016f0
PA
150742008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15075
15076 * hostio.c: Don't include errno.h.
15077 (errno_to_fileio_errno): Move to hostio-errno.
15078 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15079 error number outputting to the target->hostio_last_error callback.
15080 (hostio_packet_error): Use FILEIO_EINVAL directly.
15081 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15082 calls to hostio_error.
15083 * hostio-errno.c: New.
15084 * server.h (hostio_last_error_from_errno): Declare.
15085 * target.h (target_ops): Add hostio_last_error member.
15086 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15087 as hostio_last_error handler.
889bf7c5 15088 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15089 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15090 (wince_hostio_last_error): New functions.
15091 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15092 as hostio_last_error handler.
15093 (win32_target_ops) [!_WIN32_WCE]: Register
15094 hostio_last_error_from_errno as hostio_last_error handler.
15095 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15096 (hostio-errno.o): New rule.
15097 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15098 * configure.srv (srv_hostio_err_objs): New variable. Default to
15099 hostio-errno.o.
15100 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15101 * configure: Regenerate.
15102
2d717e4f
DJ
151032008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15104
15105 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15106 (linux_kill, linux_detach): Clean up the process list.
15107 * remote-utils.c (remote_open): Improve port number parsing.
15108 (putpkt_binary, input_interrupt): Only send interrupts if the target
15109 is running.
15110 * server.c (extended_protocol): Make static.
15111 (attached): Define earlier.
15112 (exit_requested, response_needed, program_argv): New variables.
15113 (target_running): New.
15114 (start_inferior): Clear attached here.
15115 (attach_inferior): Set attached here.
15116 (require_running): Define.
15117 (handle_query): Use require_running and target_running. Implement
15118 "monitor exit".
15119 (handle_v_attach, handle_v_run): New.
15120 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15121 (gdbserver_usage): Update.
15122 (main): Redo argument parsing. Handle --debug and --multi. Handle
15123 --attach along with other options or after the port. Save
15124 program_argv. Support no initial program. Resynchronize
15125 communication with GDB after an error. Handle "monitor exit".
15126 Use require_running and target_running. Always allow the extended
15127 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15128 restart in extended mode.
15129 * README: Refer to the GDB manual. Update --attach usage.
15130
7407e2de
AS
151312007-12-20 Andreas Schwab <schwab@suse.de>
15132
15133 * linux-low.c (STACK_SIZE): Define.
15134 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15135 (linux_test_for_tracefork): Likewise.
15136
b65d95c5
DJ
151372007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15138
15139 * linux-low.c (linux_wait_for_event): Update messages. Do not
15140 reinsert auto-delete breakpoints.
15141 * mem-break.c (struct breakpoint): Change return type of handler to
15142 int.
15143 (set_breakpoint_at): Update handler type.
15144 (reinsert_breakpoint_handler): Return 1 instead of calling
15145 delete_breakpoint.
15146 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15147 setting a new one.
15148 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15149 * mem-break.h (set_breakpoint_at): Update handler type.
15150 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15151 * win32-low.c (auto_delete_breakpoint): New.
15152 (get_child_debug_event): Use it.
15153
4e799345
DJ
151542007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * configure.ac: Check for pread and pwrite.
15157 * hostio.c (handle_pread): Fall back to lseek and read.
15158 (handle_pwrite): Fall back to lseek and write.
15159 * config.in, configure: Regenerated.
15160
27524b67
DJ
151612007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15162
15163 * server.c (myresume): Add own_buf argument.
15164 (main): Update calls.
15165
a20d5e98
DJ
151662007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15167
15168 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15169 * remote-utils.c (remote_open): Do not call disable_async_io.
15170 (block_async_io): Delete.
15171 (unblock_async_io): Make static.
15172 (initialize_async_io): New.
15173 * server.c (handle_v_cont): Handle async I/O here.
15174 (myresume): Likewise. Move other common resume tasks here...
15175 (main): ... from here. Call initialize_async_io. Disable async
15176 I/O before the main loop.
15177 * server.h (initialize_async_io): Declare.
15178 (block_async_io, unblock_async_io): Delete prototypes.
15179 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15180
b79d787e
DJ
151812007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15182
15183 * remote-utils.c (readchar): Allow binary data in received messages.
15184
d97903b2
PA
151852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15186
15187 * win32-low.c (attaching): New global.
15188 (win32_create_inferior): Clear the `attaching' global.
15189 (win32_attach): Set the `attaching' global.
15190 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15191 attaching. Only set a breakpoint at the entry point if not
15192 attaching.
15193
311de423
PA
151942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15195
15196 * server.c (main): Don't report dll events on the initial
15197 connection on attaches.
15198
6c2d16d2
PA
151992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15200
15201 * server.c (main): Relax numerical bases supported for the pid of
15202 the --attach command line argument.
15203
5ca906e6
PA
152042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15205
15206 * win32-low.c (win32_attach): Call OpenProcess before
15207 DebugActiveProcess, not after. Add last error output to error
15208 call.
15209
9c6c8194
PA
152102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15211
15212 * win32-low.c (win32_get_thread_context)
15213 (win32_set_thread_context): New functions.
15214 (thread_rec): Use win32_get_thread_context.
15215 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15216 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15217 field.
15218
4d5d1aaa
PA
152192007-12-03 Leo Zayas
15220 Pedro Alves <pedro_alves@portugalmail.pt>
15221
15222 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15223 global variables.
15224 (child_add_thread): Minor cleanup.
15225 (child_continue): Resume artificially suspended threads before
15226 calling ContinueDebugEvent.
15227 (suspend_one_thread): New.
15228 (fake_breakpoint_event): New.
15229 (get_child_debug_event): Change return type to int. Check here if
15230 gdb sent an interrupt request. If a soft interrupt was requested,
15231 fake a breakpoint event. Return 0 if there is no event to handle,
15232 and 1 otherwise.
15233 (win32_wait): Don't check here if gdb sent an interrupt request.
15234 Ensure there is a valid event to handle.
15235 (win32_request_interrupt): Add soft interruption method as last
15236 resort.
15237
c436e841
PA
152382007-12-03 Leo Zayas
15239 Pedro Alves <pedro_alves@portugalmail.pt>
15240
15241 * win32-low.h (win32_thread_info): Add descriptions to the
15242 structure members. Replace `suspend_count' counter by a
15243 `suspended' flag.
15244 * win32-low.c (thread_rec): Update condition of when to get the
15245 context from the inferior. Rely on ContextFlags being set if it
15246 has already been retrieved. Only suspend the inferior thread if
15247 we haven't already. Warn if that fails.
15248 (continue_one_thread): s/suspend_count/suspended/. Only call
15249 ResumeThread once. Warn if that fails.
15250
e7b5fa67
PA
152512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15252
15253 * win32-low.c (win32_wait): Don't read from the inferior when it
15254 has already exited.
15255
a385171d
PA
152562007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15257
15258 * Makefile.in (win32_low_h): New variable.
15259 (win32-low.o): Add dependency on $(win32_low_h).
15260 (win32-arm-low.o, win32-i386-low.o): New rules.
15261
f80c84b3
DJ
152622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * hostio.c: Correct copyright year.
15265
a6b151f1
DJ
152662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15267
15268 * Makefile.in (OBS): Add hostio.o.
15269 (hostio.o): New rule.
15270 * server.h (handle_vFile): Declare.
15271 * hostio.c: New file.
15272 * server.c (handle_v_requests): Take packet_len and new_packet_len
15273 for binary packets. Call handle_vFile.
15274 (main): Update call to handle_v_requests.
15275
f9387fc3
DJ
152762007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15277
15278 * linux-low.c: Include <sched.h>.
15279
51c2684e
DJ
152802007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15281
15282 * linux-low.c (linux_tracefork_grandchild): New.
15283 (linux_tracefork_child): Use clone.
15284 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15285
75f83163
JB
152862007-10-31 Joel Brobecker <brobecker@adacore.com>
15287
15288 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15289
da5898ce
DJ
152902007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15291
15292 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15293
24a09b5f
DJ
152942007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15295
15296 * inferiors.c (change_inferior_id): Delete.
15297 (add_pid_to_list, pull_pid_from_list): New.
15298 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15299 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15300 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15301 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15302 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15303 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15304 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15305 (using_threads): Always set to 1.
15306 (handle_extended_wait): New.
15307 (add_process): Do not set TID.
15308 (linux_create_inferior): Set must_set_ptrace_flags.
15309 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15310 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15311 (linux_thread_alive): Rename TID argument to LWPID.
15312 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15313 (linux_wait_for_event): Do not use TID or check using_threads. Update
15314 call to dead_thread_notify. Call handle_extended_wait.
15315 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15316 (send_sigstop): Delete sigstop_sent.
15317 (wait_for_sigstop): Avoid TID.
15318 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15319 (linux_test_for_tracefork): New.
15320 (linux_lookup_signals): Use thread_db_active and
15321 linux_supports_tracefork_flag.
15322 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15323 * linux-low.h (get_process_thread): Avoid TID.
15324 (struct process_ifo): Move thread_known and tid to the end. Remove
15325 sigstop_sent.
15326 (linux_attach_lwp, thread_db_init): Update prototypes.
15327 * server.h (change_inferior_id): Delete prototype.
15328 (add_pid_to_list, pull_pid_from_list): New prototypes.
15329 * thread-db.c (thread_db_use_events): New.
15330 (find_first_thread): Rename to...
15331 (find_one_thread): ...this. Update callers and messages. Do not
15332 call fatal. Check thread_db_use_events. Do not call
15333 change_inferior_id or new_thread_notify.
15334 (maybe_attach_thread): Update. Do not call new_thread_notify.
15335 (thread_db_init): Set thread_db_use_events. Check use_events.
15336 * utils.c (fatal, warning): Correct message prefix.
15337
30ed0a8f
DJ
153382007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15339
15340 * Makefile.in (clean): Remove new files.
15341 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15342 (powerpc-64.o, powerpc-64.c): New rules.
15343 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15344 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15345 with SPE.
15346 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15347 SPE targets.
15348 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15349 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15350 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15351 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15352 (target_regsets): Add AltiVec and SPE register sets.
15353 * configure.ac: Check for AltiVec and SPE.
15354 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15355 (ppc_fill_vrregset, ppc_store_vrregset): New.
15356 (target_regsets): Add AltiVec register set.
15357 * configure: Regenerated.
15358
fd462a61
DJ
153592007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * linux-low.c (O_LARGEFILE): Define.
15362 (linux_read_memory): Use /proc/PID/mem.
15363 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15364 * configure, config.in: Regenerated.
15365
69f223ed
DJ
153662007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15367
15368 * linux-low.c (linux_wait_for_event): Do not pass signals while
15369 single-stepping.
15370
aec18585
PA
153712007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15372
15373 * win32-low.c (create_process): New.
15374 (win32_create_inferior): Use create_process instead of
15375 CreateProcess. If create_process failed retry appending an ".exe"
15376 suffix. Store the GetLastError result immediatelly after
15377 create_process calls and use it on the call to error.
15378
34d86ddd
PA
153792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15380
15381 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15382
5a0e3bd0
JB
153832007-08-23 Joel Brobecker <brobecker@adacore.com>
15384
15385 * configure.ac: Switch license to GPLv3.
15386
f88c79e6
MS
153872007-08-01 Michael Snyder <msnyder@access-company.com>
15388
15389 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15390
6b3d9b83
PA
153912007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15392
15393 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15394 typedef.
15395 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15396 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15397 CloseToolhelp32Snapshot.
15398 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15399 CloseToolhelp32Snapshot.
15400
c588c53c
MS
154012007-07-27 Michael Snyder <michael.snyder@access-company.com>
15402
15403 * server.c (main): Check for inferior exit before main loop.
15404
aa0403d9
PA
154052007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15406
15407 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15408 instead of on tmp_desc.
15409
255e7678
DJ
154102007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15411 Daniel Jacobowitz <dan@codesourcery.com>
15412
15413 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15414 (add_thread): Minor cleanups.
15415 (clear_inferiors): Move lower in the file. Clear the DLL
15416 list.
15417 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15418 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15419 (xml_escape_text): New.
15420 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15421 for qSupported.
15422 (handle_v_cont): Report errors.
15423 (gdbserver_version): Update.
15424 (main): Correct size of own_buf. Do not report initial DLL events.
15425 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15426 (unloaded_dll, xml_escape_text): New.
15427 * win32-low.c (enum target_waitkind): Update comments.
15428 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15429 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15430 (win32_EnumProcessModules, win32_GetModuleInformation)
15431 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15432 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15433 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15434 (win32_Module32First, win32_Module32Next, load_toolhelp)
15435 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15436 (get_child_debug_event): Handle DLL events.
15437 (win32_wait): Likewise.
15438
0d37add9
DJ
154392007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15440
15441 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15442 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15443
45e2715e
PA
154442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15445
15446 * win32-low.c (handle_output_debug_string): Ignore event if not
15447 waiting.
15448
c5674cf1
PA
154492007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15450
15451 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15452
2bbe3cc1
DJ
154532007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15454
15455 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15456
ae13219e
DJ
154572007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15458
15459 * inferiors.c (change_inferior_id): Add comment.
15460 * linux-low.c (check_removed_breakpoint): Add an early
15461 prototype. Improve debug output.
15462 (linux_attach): Doc update.
15463 (linux_detach_one_process, linux_detach): Clean up before releasing
15464 each process.
15465 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15466 * linux-low.h (struct process_info): Doc improvement.
15467 * mem-break.c (delete_all_breakpoints): New.
15468 * mem-break.h (delete_all_breakpoints): New prototype.
15469 * thread-db.c (find_first_thread): New.
15470 (thread_db_create_event): Call it instead of
15471 thread_db_find_new_threads. Clean up unused variables.
15472 (maybe_attach_thread): Remove first thread handling.
15473 (thread_db_find_new_threads): Use find_first_thread.
15474 (thread_db_get_tls_address): Likewise.
15475
4105de34
DJ
154762007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * thread-db.c (thread_db_find_new_threads): Add prototype.
15479 (thread_db_create_event): Check for the main thread before adding
15480 a new thread.
15481 (maybe_attach_thread): Only enable event reporting if TID == 0.
15482 (thread_db_get_tls_address): Check for new threads.
15483
2b876972
DJ
154842007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15485
15486 * linux-low.c (linux_create_inferior): Try execv before execvp.
15487 * spu-low.c (spu_create_inferior): Likewise.
15488
7a245884
DJ
154892007-06-13 Mike Frysinger <vapier@gentoo.org>
15490
15491 * linux-low.c (linux_create_inferior): Change execv to execvp.
15492 * spu-low.c (spu_create_inferior): Likewies.
15493
117ce543
DJ
154942007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15495
15496 * Makefile.in (clean): Clean new files instead of deleted ones.
15497 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15498 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15499 rules.
15500 * configure.srv: Specify XML files and new regformats for MIPS and
15501 MIPS64 GNU/Linux.
15502 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15503 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15504 an entry for the restart register.
15505 (mips_cannot_fetch_register, mips_cannot_store_register)
15506 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15507 register names to match the XML descriptions.
15508 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15509 restart register instead of $0.
15510
0e7f50da
UW
155112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15512 Markus Deuling <deuling@de.ibm.com>
15513
15514 * remote-utils.c (decode_xfer_write): New function.
15515 * server.h (decode_xfer_write): Add prototype.
15516 * server.c (handle_query): Add PACKET_LEN argument. Support
15517 qXfer:spu:read and qXfer:spu:write packets.
15518 (main): Pass packet_len to handle_query.
15519 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15520 * target.h (target_ops): Add qxfer_spu.
15521
374c1d38
UW
155222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15523
15524 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15525 accessing non-seekable spufs files.
15526
bb63802a
UW
155272007-05-16 Markus Deuling <deuling@de.ibm.com>
15528
889bf7c5 15529 * server.c (handle_query): Add reply for qC packet.
bb63802a 15530
7390519e
PA
155312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15532 Leo Zayas <lerele@champenstudios@com>
15533
15534 * server.h (check_remote_input_interrupt_request): New function.
15535 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15536 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15537 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15538 (check_remote_input_interrupt_request): New function.
15539 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15540 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15541 winapi_GenerateConsoleCtrlEvent): New typedefs.
15542 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15543 to 250 ms.
15544 (win32_wait): Check for remote interrupt request
15545 with check_remote_input_interrupt_request.
15546 (win32_request_interrupt): New function.
15547 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15548
34b34921
PA
155492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15550
15551 * win32-low.c (debug_registers_changed,
15552 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15553 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15554 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15555 (thread_rec): Get context using the low target.
15556 (child_add_thread): Call thread_added on the low target,
15557 which does the same thing.
15558 (regptr): Delete.
15559 (do_initial_child_stuff): Remove debug registers references.
15560 Set context using the low target. Resume threads after
15561 setting the contexts.
15562 (child_continue): Remove dead variable. Remove debug
15563 registers references.
15564 (child_fetch_inferior_registers): Go through the low target.
15565 (do_child_store_inferior_registers): Remove.
15566 (child_store_inferior_registers): Go through the low target.
15567 (win32_resume): Remove debug registers references.
15568 Set context using the low target.
15569 (handle_exception): Change return type to void. Don't record
15570 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15571 first chance exception.
889bf7c5 15572 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15573 goto loop. Always return after waiting for debug event.
15574 (win32_wait): Convert to switch statement. Handle spurious
15575 events.
15576
15577 * win32-i386-low.c (debug_registers_changed,
15578 debug_registers_used): New.
15579 (initial_stuff): Rename to ...
15580 (i386_initial_stuff): ... this. Clear debug registers
15581 state variables.
15582 (store_debug_registers): Delete.
15583 (i386_get_thread_context): New.
15584 (load_debug_registers): Delete.
15585 (i386_set_thread_context): New.
15586 (i386_thread_added): New.
15587 (single_step): Rename to ...
15588 (i386_single_step): ... this.
15589 (do_fetch_inferior_registers): Rename to ...
15590 (i386_fetch_inferior_register): ... this.
15591 (i386_store_inferior_register): New.
15592 (the_low_target): Adapt to new interface.
15593
15594 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15595 (arm_get_thread_context): New.
15596 (arm_set_thread_context): New.
15597 (regptr): New.
15598 (do_fetch_inferior_registers): Rename to ...
15599 (arm_fetch_inferior_register): ... this.
15600 (arm_store_inferior_register): New.
15601 (arm_wince_breakpoint): Reimplement as unsigned long.
15602 (arm_wince_breakpoint_len): Define.
15603 (the_low_target): Adapt to new interface.
15604
15605 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15606 load_debug_registers. Add get_thread_context, set_thread_context,
15607 thread_added and store_inferior_register. Rename
15608 fetch_inferior_registers to fetch_inferior_register.
15609 (regptr): Remove declaration.
15610
dd6953e1
PA
156112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15612
15613 * linux-low.c (linux_detach): Change return type to int. Return 0.
15614 * spu-low.c (spu_detach): Likewise.
15615
444d6139
PA
156162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15617
15618 * target.h (target_ops): Change return type of detach to int.
15619 Add join.
15620 (join_inferior): New.
15621 * server.c (main): Don't skip detach support on mingw32.
15622 If the inferior doesn't support detaching return error.
15623 Call join_inferior instead of using waitpid.
15624 * linux-low.c (linux_join): New.
15625 (linux_target_op): Add linux_join.
15626 * spu-low.c (spu_join): New.
15627 (spu_target_ops): Add spu_join.
15628 * win32-low.c (win32_detach): Adapt to new interface.
15629 Reopen current_process_handle before detaching. Issue a child
15630 resume before detaching.
15631 (win32_join): New.
15632 (win32_target_op): Add win32_join.
15633
1d5315fe
PA
156342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15635
15636 * win32-low.c (win32-attach): Fix return value.
15637 * target.h (target_ops): Describe ATTACH return values.
15638
bf914831
PA
156392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15640
15641 * win32-low.c (GETPROCADDRESS): Define.
15642 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15643 (winapi_DebugSetProcessKillOnExit): Likewise.
15644 (win32_create_inferior): Force usage of ansi CreateProcessA.
15645 (win32_attach): Use GETPROCADDRESS.
15646 (win32_detach): Likewise.
15647
f72f3e60
PA
156482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15649
15650 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15651
ed50f18f
PA
156522007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15653
15654 * win32-low.c: Commit leftover changes from 2007-03-29.
15655
0c2ead7e
DJ
156562007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15657
15658 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15659 fields short instead of int. Add explicit padding.
15660 (i387_cache_to_fsave): Remove unnecessary casts.
15661 (i387_fsave_to_cache): Doc fix.
15662 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15663
73725ff3
DJ
156642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15665
15666 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15667 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15668
d99f33d8
PA
156692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15670
15671 * configure.srv (arm*-*-mingw32ce*): Move near the other
15672 arm targets.
15673
68070c10
PA
156742007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15675
2482afc6 15676 * configure.ac: Add errno checking.
68070c10
PA
15677 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15678 sys/file.h and malloc.h.
15679 (AC_CHECK_DECLS): Add perror.
15680 (srv_mingwce): Handle.
2482afc6 15681 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15682 win32-i386-low.o to srv_tgtobj.
15683 (i[34567]86-*-mingw*): Likewise.
15684 (arm*-*-mingw32ce*): Add case.
15685 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15686 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15687 [__MINGW32CE__] (strerror): New function.
15688 [__MINGW32CE__] (errno): Define to GetLastError.
15689 [__MINGW32CE__] (COUNTOF): New macro.
15690 (remote_open): Remove extra close call.
15691 * mem-break.c (delete_breakpoint_at): New function.
15692 * mem-break.h (delete_breakpoint_at): Declare.
15693 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15694 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15695 [USE_WIN32API] (read, write): Add char* casts.
15696 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15697 * server.h: Include wincecompat.h on Windows CE.
15698 [HAVE_ERRNO_H]: Check.
15699 (perror): Declare if not declared.
15700 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15701 (perror_with_name): Remove errno declaration.
15702 * wincecompat.h: New.
15703 * wincecompat.c: New.
15704 * win32-low.h: New.
15705 * win32-arm-low.c: New.
15706 * win32-i386-low.c: New.
15707 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15708 (OUTMSG2): Make it safe.
15709 (_T): New macro.
15710 (COUNTOF): New macro.
15711 (NUM_REGS): Get it from the low target.
15712 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15713 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15714 (thread_rec): Let low target handle debug registers.
15715 (child_add_thread): Likewise.
15716 (child_init_thread_list): Likewise.
15717 (continue_one_thread): Likewise.
15718 (regptr): New.
15719 (do_child_fetch_inferior_registers): Move to ...
15720 * win32-i386-low.c: ... here, and rename to ...
15721 (do_fetch_inferior_registers): ... this.
889bf7c5 15722 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15723 Go through the low target.
15724 (do_child_store_inferior_registers): Use regptr.
15725 (strwinerror): New function.
15726 (win32_create_inferior): Handle Windows CE.
15727 Use strwinerror instead of strerror on Windows error
15728 codes. Add program to the error output.
15729 Don't close the main thread handle on Windows CE.
15730 (win32_attach): Use coredll.dll on Windows CE.
15731 (win32_kill): Close current process and current
15732 thread handles.
15733 (win32_detach): Use coredll.dll on Windows CE.
15734 (win32_resume): Let low target handle debug registers, and
15735 step request.
15736 (handle_exception): Add/Remove initial breakpoint. Avoid
15737 non-existant WSTOPSIG on Windows CE.
15738 (win32_read_inferior_memory): Cast to remove warning.
15739 (win32_arch_string): Go through the low target.
15740 (initialize_low): Call set_breakpoint_data with the low
15741 target's breakpoint.
15742 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15743 FOP_REGNUM, mappings): Move to ...
15744 * win32-i386-low.c: ... here.
15745 * win32-low.c (win32_thread_info): Move to ...
15746 * win32-low.h: ... here.
15747 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15748 win32-arm-low.c and wincecompat.c.
15749 (all:): Add $EXEEXT.
15750 (install-only:): Likewise.
15751 (gdbserver:): Likewise.
15752 (gdbreplay:): Likewise.
15753 * config.in: Regenerate.
15754 * configure: Regenerate.
15755
41093d81
PA
157562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15757
15758 * win32-low.c: Rename typedef thread_info to
15759 win32_thread_info throughout.
15760
544afa54
PA
157612007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15762
15763 * win32-i386-low.c: Rename to ...
15764 * win32-low.c: ... this.
15765 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15766 * Makefile.in: Likewise.
15767
bce7165d
PA
157682007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15769
15770 * remote-utils.c (monitor_output): Constify msg parameter.
15771 * server.h (monitor_output): Likewise.
15772 * win32-i386-low.c (handle_output_debug_string): New.
15773 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15774 handle_output_debug_string.
15775 (get_child_debug_event): Likewise.
15776
506c7aa0
DJ
157772007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15778
15779 * server.c (main): Correct strtoul check.
15780
42c81e2a
DJ
157812007-03-27 Jon Ringle <jon@ringle.org>
15782
15783 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15784
9453113a
DJ
157852007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15786
15787 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15788
64a69107
DJ
157892007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * terminal.h: Check HAVE_SGTTY_H.
15792
157932007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15794
15795 * remote-utils.c (remote_open): Print out the assigned port number.
15796
c74d0ad8
DJ
157972007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15798
15799 * remote-utils.c (monitor_output): New function.
15800 * server.c (debug_threads): Define here.
15801 (monitor_show_help): New function.
15802 (handle_query): Handle qRcmd.
15803 (main): Do not handle 'd' packet.
15804 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15805 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15806 of debug_threads.
15807
de7c3b4a
PA
158082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15809
15810 * Makefile.in (EXEEXT): New.
15811 (clean): Use $(EXEEXT).
15812
ef57601b
PA
158132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15814
15815 * target.h (target_ops): Rename send_signal to request_interrupt,
15816 and remove enum target_signal parameter.
15817 * linux-low.c (linux_request_interrupt): Rename from
15818 linux_send_signal, and always send SIGINT.
15819 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15820 and always send SIGINT.
15821 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15822 of send_signal.
15823 (input_interrupt): Likewise.
15824
820f2bda
PA
158252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15826
15827 * server.c (get_features_xml): Check if target implemented
15828 arch_string.
15829 * win32-i386-low.c (win32_arch_string): New.
15830 (win32_target_ops): Add win32_arch_string as arch_string member.
15831
ab39bf24
UW
158322007-02-22 Markus Deuling <deuling@de.ibm.com>
15833
15834 * spu-low.c (spu_arch_string): New.
15835 (spu_target_ops): Add spu_arch_string.
15836
61ff6e04
DJ
158372007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15838
15839 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15840 * configure.ac: Do not check for terminal.h.
15841 * configure, config.in: Regenerated.
15842
fb1e4ffc
DJ
158432007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15844
15845 * Makefile.in (OBS): Add $(XML_BUILTIN).
15846 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15847 (clean): Update.
15848 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15849 (arm-with-iwmmxt.c): New.
15850 * config.in, configure: Regenerate.
15851 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15852 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15853 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15854 (arm*-*-linux*): Add iWMMXt and regset support.
15855 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15856 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15857 (arm_store_wmmxregset, target_regsets): New.
15858 * server.c (get_features_xml): Take annex argument. Check builtin
15859 XML documents.
15860 (handle_query): Handle multiple annexes.
15861
0f48aa01
DJ
158622007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15863
15864 * remote-utils.c [USE_WIN32API] (read, write): Define.
15865 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15866 write.
15867
23181151
DJ
158682007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15869
15870 * linux-i386-low.c (the_low_target): Set arch_string.
15871 * linux-x86-64-low.c (the_low_target): Likewise.
15872 * linux-low.c (linux_arch_string): New.
15873 (linux_target_ops): Add it.
15874 * linux-low.h (struct linux_target_ops): Add arch_string.
15875 * server.c (write_qxfer_response): Use const void * for DATA.
15876 (get_features_xml): New.
15877 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15878 * target.h (struct target_ops): Add arch_string method.
15879
9d606399
DJ
158802007-01-03 Denis Pilat <denis.pilat@st.com>
15881 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * linux-low.c (linux_kill): Handle being called with no threads.
15884 * win32-i386-low.c (win32_kill): Likewise.
15885 (get_child_debug_event): Clear current_process_handle.
15886
158872006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15888 Daniel Jacobowitz <dan@codesourcery.com>
15889
15890 * remote-utils.c (remote_open): Check the type of specified
15891 serial port devices before opening them.
15892 * server.c (main): Kill the inferior if an error occurs during
15893 the first remote_open.
15894
a5e13d24
DJ
158952006-12-05 Markus Deuling <deuling@de.ibm.com>
15896
15897 * README: Update supported targets.
15898
186947f7
DJ
158992006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15900
15901 * Makefile.in (clean): Remove reg-mips64.c.
15902 (reg-mips64.c, reg-mips64.o): New rules.
15903 * configure.srv: Handle mips64. Include regset support for mips.
15904 * linux-mips-low.c (union mips_register): New.
15905 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15906 (mips_breakpoint, mips_breakpoint_at): Use int.
15907 (mips_collect_register, mips_supply_register)
15908 (mips_collect_register_32bit, mips_supply_register_32bit)
15909 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15910 (mips_store_fpregset, target_regsets): New.
15911 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15912
a13e2c95
UW
159132006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15914
15915 * configure.srv: Add target "spu*-*-*".
15916 * Makefile.in (clean): Remove reg-spu.c.
15917 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15918 * spu-low.c: New file.
15919
cb7283db
DJ
159202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15921
15922 * configure.ac: Correct td_thr_tls_get_addr test.
15923 * configure: Regenerated.
15924
89be2091
DJ
159252006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15926
15927 * linux-low.c (linux_wait_for_event): Reformat. Use the
15928 pass_signals array.
15929 * remote-utils.c (decode_address_to_semicolon): New.
15930 * server.c (pass_signals, handle_general_set): New.
15931 (handle_query): Mention QPassSignals for qSupported.
15932 (main): Call handle_general_set.
15933 * server.h (pass_signals, decode_address_to_semicolon): New.
15934
000ef4f0
DJ
159352006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15936
15937 * server.c (handle_query): Correct error handling for read_auxv.
15938
b7149293
UW
159392005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15940
15941 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15942 and srv_linux_thread_db to yes.
15943 * linux-s390-low.c (s390_fill_gregset): New function.
15944 (target_regsets): Define data structure.
15945
dae5f5cf
DJ
159462006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15949 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15950 * config.in, configure: Regenerated.
15951 * inferiors.c (gdb_id_to_thread): New function.
15952 (gdb_id_to_thread_id): Use it.
15953 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15954 * linux-low.h (struct process_info): Add th member.
15955 (thread_db_get_tls_address): New prototype.
15956 * remote-utils.c (decode_address): Make non-static.
15957 * server.c (handle_query): Handle qGetTLSAddr.
15958 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15959 * target.h (struct target_ops): Add get_tls_address.
15960 * thread-db.c (maybe_attach_thread): Save the thread handle.
15961 (thread_db_get_tls_address): New.
15962
32ca6d61
DJ
159632006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15964
15965 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15966 (linux_resume_one_process): Take a siginfo_t *. Update all
15967 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15968 (struct pending_signals): Add a siginfo_t.
15969 (linux_wait_for_process): Always set last_status.
15970 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15971 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15972 * linux-low.h (struct process_info): Add last_status.
15973
5ffff7c1
DJ
159742006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * remote-utils.c (try_rle): New function.
15977 (putpkt_binary): Use it.
15978
8695c747
DJ
159792006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15980
15981 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15982 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15983 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15984 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15985 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15986 point registers.
15987
290fadea
RS
159882006-08-08 Richard Sandiford <richard@codesourcery.com>
15989
15990 * server.c (terminal_fd): New variable.
15991 (old_foreground_pgrp): Likewise.
15992 (restore_old_foreground_pgrp): New function.
15993 (start_inferior): Record the terminal file descriptor in terminal_fd
15994 and its original foreground group in old_foreground_pgrp. Register
15995 restore_old_foreground_pgrp with atexit().
15996
9f2e1e63
DJ
159972006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15998
15999 * server.c (handle_query): Correct qPart to qXfer.
16000
b80864fb
DJ
160012006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16002
16003 * configure.ac: Check for more headers which are missing on
16004 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16005 * configure.srv: Add Cygwin and mingw32.
16006 * remote-utils.c: Don't include headers unconditionally which
16007 are missing on mingw32. Include <winsock.h> for mingw32.
16008 (remote_open): Adjust for mingw32 support. Flush
16009 standard error after writing to it.
16010 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16011 (unblock_async_io, enable_async_io, disable_async_io)
16012 (readchar, getpkt): Update for Winsock support.
16013 (prepare_resume_reply): Expect a protocol signal number.
16014 * server.c: Disable <sys/wait.h> on mingw32.
16015 (start_inferior): Adjust for mingw32 support. Flush
16016 standard error after writing to it.
16017 (attach_inferior): Likewise. Use protocol signal
16018 numbers.
16019 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16020 and names.
16021 * win32-i386-low.c: New file.
16022 * Makefile.in (XM_CLIBS): Set.
16023 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16024 (win32-i386-low.o): New dependency rule.
16025 * linux-low.c (linux_wait): Use target signal numbers.
16026 * target.h (struct target_ops): Doc fix.
16027 * server.h (target_signal_to_name): New prototype.
16028 * gdbreplay.c: Don't include headers unconditionally which
16029 are missing on mingw32. Include <winsock.h> for mingw32.
16030 (remote_close, remote_open): Adjust for Winsock support.
16031 * configure, config.in: Regenerated.
16032
0876f84a
DJ
160332006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16034
16035 * server.c (decode_xfer_read, write_qxfer_response): New.
16036 (handle_query): Take a packet length argument. Handle
16037 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16038 the qSupported response.
16039 (main): Update call to handle_query.
16040
01f9e8fa
DJ
160412006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16042
16043 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16044 (putpkt_binary): Renamed from putpkt and adjusted for binary
16045 data.
16046 (putpkt): New wrapper for putpkt_binary.
16047 (readchar): Don't mask off the high bit.
16048 (decode_X_packet): New function.
16049 * server.c (main): Call putpkt_binary if a handler sets the packet
16050 length. Save the length of the incoming packet. Handle 'X'.
16051 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16052
be2a5f71
DJ
160532006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16054
16055 * server.c (handle_query): Handle qSupported.
16056
ea025f5f
DJ
160572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * remote-utils.c (all_symbols_looked_up): New variable.
16060 (look_up_one_symbol): Check it.
16061 * server.h (look_up_one_symbol): New declaration.
16062 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16063
9308fc88
DJ
160642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16065
16066 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16067 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16068 (PTRACE_GET_THREAD_AREA): Define.
16069 (ps_get_thread_area): New function.
16070
52fb6437
NS
160712006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16072
16073 * configure.srv (m68k*-*-uclinux*): New target.
16074 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16075 (linux_resume_one_process): Remove extraneous cast.
16076 (linux_read_offsets): New.
16077 (linux_target_op): Add linux_read_offsets on mmuless systems.
16078 * server.c (handle_query): Add qOffsets logic.
16079 * target.h (struct target_ops): Add read_offsets.
16080
21b0f40c
DJ
160812006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16082
16083 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16084 (PTRACE_GET_THREAD_AREA): Define.
16085 (ps_get_thread_area): New function.
16086 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16087 (linux-x86-64-low.o): Update.
16088
0050a760
DJ
160892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16090
16091 * configure.ac: Remove checks for prfpregset_t.
16092 * gdb_proc_service.h: New file.
16093 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16094 new "gdb_proc_service.h".
16095 * proc-service.c: Likewise.
16096 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16097 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16098 * Makefile.in (gdb_proc_service_h): Updated.
16099 * configure, config.in: Regenerated.
16100
b92a518e
DJ
161012006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16102
16103 * remote-utils.c (prepare_resume_reply): Move declaration
16104 of gdb_id_from_wait to the top of the block.
16105
545587ee
DJ
161062006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16107
16108 * linux-low.c (regsets_store_inferior_registers): Read the regset
16109 from the target before filling it.
16110
9db87ebd
DJ
161112006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16112
16113 * server.c (attach_inferior): Return SIGTRAP for a successful
16114 attach.
16115
dd24457d
DJ
161162006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16117
16118 * Makefile.in (OBS): Add version.o.
16119 (STAGESTUFF): Delete.
16120 (version.o): Add dependencies.
16121 (version.c): Replace rule.
16122 (clean): Remove version.c.
16123 * server.c (gdbserver_version): New.
16124 (gdbserver_usage): Use printf.
16125 (main): Handle --version and --help.
16126 * server.h (version, host_name): Add declarations.
16127
6f0f660e
EZ
161282005-12-23 Eli Zaretskii <eliz@gnu.org>
16129
889bf7c5
PA
16130 * linux-arm-low.c:
16131 * linux-arm-low.c:
16132 * inferiors.c:
16133 * i387-fp.h:
16134 * i387-fp.c:
16135 * gdbreplay.c:
16136 * regcache.c:
16137 * proc-service.c:
16138 * mem-break.h:
16139 * mem-break.c:
16140 * linux-x86-64-low.c:
16141 * linux-sh-low.c:
16142 * linux-s390-low.c:
16143 * linux-ppc64-low.c:
16144 * linux-ppc-low.c:
16145 * linux-mips-low.c:
16146 * linux-m68k-low.c:
16147 * linux-m32r-low.c:
16148 * linux-low.h:
16149 * linux-low.c:
16150 * linux-ia64-low.c:
16151 * linux-i386-low.c:
16152 * linux-crisv32-low.c:
16153 * thread-db.c:
16154 * terminal.h:
16155 * target.h:
16156 * target.c:
16157 * server.h:
16158 * server.c:
16159 * remote-utils.c:
16160 * regcache.h:
16161 * utils.c:
16162 * Makefile.in:
16163 * configure.ac:
6f0f660e
EZ
16164 * gdbserver.1: Add (C) after Copyright. Update the FSF
16165 address.
16166
9d1fb177
DJ
161672005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16168
16169 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16170 (arm_breakpoint_at): Recognize both breakpoints.
16171 (the_low_target): Use the correct breakpoint instruction.
16172
011a70c2
DJ
161732005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16174
16175 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16176 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16177 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16178 (the_low_target): Update.
16179
7fb85e41
AS
161802005-10-25 Andreas Schwab <schwab@suse.de>
16181
16182 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16183
16184 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16185 (ia64_num_regs): Reduce to 462.
16186
3db0444b
DJ
161872005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16188
16189 * acinclude.m4: Correct quoting.
16190 * aclocal.m4: Regenerated.
16191
16192 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16193 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16194 (thread_db_init): Call thread_db_err_str.
16195 * configure.ac: Check for TD_VERSION.
16196 * config.in, configure: Regenerated.
16197
bee0189a
DJ
161982005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16199
16200 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16201
e9d25b98
DJ
162022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16203
16204 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16205 is not available. Define HAVE_PTRACE_GETREGS if it is.
16206 * config.in, configure: Regenerated.
16207 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16208 * linux-i386-low.c, linux-m68k-low.c: Update to use
16209 HAVE_PTRACE_GETREGS.
16210 * linux-low.c (regsets_fetch_inferior_registers)
16211 (regsets_store_inferior_registers): Only return 0 if we processed
16212 GENERAL_REGS.
16213 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16214 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16215
a06660f7
DJ
162162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16217
16218 * inferiors.c (struct thread_info): Add gdb_id.
16219 (add_thread): Add gdb_id argument.
16220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16221 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16222 calls to add_thread.
16223 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16224 * server.c (handle_query): Use thread_to_gdb_id.
16225 (handle_v_cont, main): Use gdb_id_to_thread_id.
16226 * server.h (add_thread): Update prototype.
16227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16228 prototypes.
16229
5a1f5858
DJ
162302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16231
16232 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16233 left-padded registers.
16234 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16235 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16236
e122f1f5
SE
162372005-07-01 Steve Ellcey <sje@cup.hp.com>
16238
16239 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16240 * configure: Regenerate.
16241 * config.in: Regenerate.
16242 * server.h (NEED_DECLARATION_STRERROR):
16243 Replace with !HAVE_DECL_STRERROR.
16244
d592fa2f
DJ
162452005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16246
16247 * linux-low.c (linux_wait, linux_send_signal): Don't test
16248 an unsigned long variable for > 0 if it could be MAX_ULONG.
16249 * server.c (myresume): Likewise.
16250 * target.c (set_desired_inferior): Likewise.
16251
ccbd4912
MK
162522005-06-13 Mark Kettenis <kettenis@gnu.org>
16253
16254 * configure.ac: Simplify and improve check for socklen_t.
16255 * configure, config.in: Regenerate.
16256
f450004a
DJ
162572005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16258
16259 * acconfig.h: Remove.
16260 * configure.ac: Add a test for socklen_t. Use three-argument
16261 AC_DEFINE throughout.
16262 * config.in: Regenerated using autoheader 2.59.
16263 * configure: Regenerated.
16264
16265 * gdbreplay.c (socklen_t): Provide a default.
16266 (remote_open): Use socklen_t.
16267 * remote-utils.c (socklen_t): Provide a default.
16268 (remote_open): Use socklen_t.
16269 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16270 unsigned char.
16271
16272 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16273 char for buffers.
16274 * linux-low.c (linux_read_memory, linux_write_memory)
16275 (linux_read_auxv): Likewise.
16276 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16277 (check_mem_write): Likewise.
16278 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16279 Likewise.
16280 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16281 (registers_from_string, register_data): Likewise.
16282 * server.c (handle_query, main): Likewise.
16283 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16284 (decode_M_packet): Likewise.
16285 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16286 * target.h (struct target_ops): Update read_memory, write_memory,
16287 and read_auxv.
16288 (read_inferior_memory, write_inferior_memory): Update.
16289 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16290 to unsigned char *.
16291 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16292 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16293 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16294 linux-s390-low.c, linux-sh-low.c: Update for changes in
16295 read_inferior_memory and the_low_target->breakpoint.
16296
eee84df1
DJ
162972005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16298
16299 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16300 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16301 * configure.srv: Add powerpc64-*-linux*.
16302 * linux-ppc64-low.c: New file.
16303
45b134e5
OF
163042005-05-23 Orjan Friberg <orjanf@axis.com>
16305
16306 * linux-cris-low.c: New file with support for CRIS.
16307 * linux-crisv32-low.c: Ditto for CRISv32.
16308 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16309 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16310 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16311 reg-crisv32.o, and reg-crisv32.c to make rules.
16312 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16313 recognized targets.
16314
48d93c75
UW
163152005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16316
16317 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16318 of sizeof (PTRACE_XFER_TYPE).
16319 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16320
e013ee27
OF
163212005-05-12 Orjan Friberg <orjanf@axis.com>
16322
889bf7c5 16323 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16324 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16325 pointers for hardware watchpoint support.
16326 * linux-low.h (struct linux_target_ops): Ditto.
16327 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16328 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16329 to linux_target_ops.
16330 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16331 reply packet.
16332 * server.c (main): Recognize 'Z' and 'z' packets.
16333
b0ded00b
UW
163342005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16335
16336 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16337 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16338 (the_low_target): Add new members.
16339
8643e2ad
DJ
163402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16341
16342 * proc-service.c (ps_lgetregs): Search all_processes instead of
16343 all_threads.
16344
fc620387
DJ
163452005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16346
16347 * server.c (start_inferior): Change return type to int.
16348 (attach_inferior): Change sigptr to int *.
16349 (handle_v_cont, handle_v_requests): Change signal to int *.
16350 (main): Change signal to int.
16351
163522005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16353
16354 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16355 * configure.srv: Add m32r*-*-linux*.
16356 * linux-m32r-low.c: New file.
16357
e0e76420
DJ
163582005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16359
16360 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16361
a1928bad
DJ
163622005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16363
16364 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16365 Take unsigned long arguments for PIDs.
16366 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16367 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16368 (wait_for_sigstop, linux_resume_one_process)
16369 (regsets_fetch_inferior_registers, linux_send_signal)
16370 (linux_read_auxv): Likewise. Update the types of variables holding
16371 PIDs. Update format string specifiers.
16372 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16373 * remote-utils.c (prepare_resume_reply): Likewise.
16374 * server.c (cont_thread, general_thread, step_thread)
16375 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16376 unsigned long.
16377 (handle_query): Update format specifiers.
16378 (handle_v_cont, main): Use strtoul for thread IDs.
16379 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16380 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16381 (general_thread, step_thread, thread_from_wait)
16382 (old_thread_from_wait): Update.
16383 * target.h (struct thread_resume): Use unsigned long for THREAD.
16384 (struct target_ops): Use unsigned long for arguments to attach and
16385 thread_alive.
16386
dcdb98d2
DJ
163872005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * acinclude.m4: Include bfd/bfd.m4 directly.
16390 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16391 <agriffis@toolchain.org>.
16392 * aclocal.m4, configure: Regenerated.
16393
bec39cab
AC
163942005-01-07 Andrew Cagney <cagney@gnu.org>
16395
16396 * configure.ac: Rename configure.in, require autoconf 2.59.
16397 * configure: Re-generate.
16398
434c4c77
DJ
163992004-12-08 Daniel Jacobowitz <dan@debian.org>
16400
16401 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16402 LIBS when finished.
16403 * aclocal.m4: Regenerated.
16404 * configure: Regenerated.
16405
db1d3e1b
AS
164062004-11-21 Andreas Schwab <schwab@suse.de>
16407
16408 * linux-m68k-low.c (m68k_num_gregs): Define.
16409 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16410 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16411 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16412 (m68k_breakpoint_at): New. Add to the_low_target.
16413
16414 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16415 srv_linux_thread_db to yes.
16416
43360365
JB
164172004-10-20 Joel Brobecker <brobecker@gnat.com>
16418
16419 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16420 (ARCH_SET_FS): Likewise.
16421 (ARCH_GET_FS): Likewise.
16422 (ARCH_GET_GS): Likewise.
16423
fd500816
DJ
164242004-10-16 Daniel Jacobowitz <dan@debian.org>
16425
16426 * linux-i386-low.c (ps_get_thread_area): New.
16427 * linux-x86-64-low.c (ps_get_thread_area): New.
16428 * linux-low.c: Include <sys/syscall.h>.
16429 (linux_kill_one_process): Don't kill the first thread here.
16430 (linux_kill): Kill the first thread here.
16431 (kill_lwp): New function.
16432 (send_sigstop, linux_send_signal): Use it.
16433 * proc-service.c: Clean up #ifdefs.
16434 (fpregset_info): Delete.
16435 (ps_lgetregs): Update and enable implementation.
16436 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16437 implementations.
16438 * remote-utils.c (struct sym_cache, symbol_cache): New.
16439 (input_interrupt): Print a clearer message.
16440 (async_io_enabled): New variable.
16441 (enable_async_io, disable_async_io): Use it. Update comments.
16442 (look_up_one_symbol): Use the symbol cache.
16443 * thread-db.c (thread_db_look_up_symbols): New function.
16444 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16445
f6de3c42
DJ
164462004-10-16 Daniel Jacobowitz <dan@debian.org>
16447
16448 * configure.in: Test for -rdynamic.
16449 * configure: Regenerated.
16450 * Makefile (INTERNAL_LDFLAGS): New.
16451 (gdbserver, gdbreplay): Use it.
16452
2c0fc042
AC
164532004-09-02 Andrew Cagney <cagney@gnu.org>
16454
16455 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16456
075b3282
DJ
164572004-03-23 Daniel Jacobowitz <drow@mvista.com>
16458
16459 * linux-low.c (linux_wait): Clear all_processes list also.
16460
fa6a77dc
DJ
164612004-03-12 Daniel Jacobowitz <drow@mvista.com>
16462
16463 * linux-low.c: Include <errno.h>. Remove extern declaration of
16464 errno.
16465
6d782a97
DJ
164662004-03-12 Daniel Jacobowitz <drow@mvista.com>
16467
16468 * gdbreplay.c, server.h, utils.c: Update copyright years.
16469
3a7fb99b
DJ
164702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16471
16472 * server.c (main): Print child status or termination signal from
16473 variable 'signal', not 'sig'.
16474
c3e735a6
DJ
164752004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16476
16477 * linux-low.c (linux_read_memory): Change return type to
16478 int. Check for and return error from ptrace().
16479 * target.c (read_inferior_memory): Change return type to int. Pass
16480 back return status from the_target->read_memory().
16481 * target.h (struct target_ops): Adapt *read_memory() prototype.
16482 Update comment.
16483 (read_inferior_memory): Adapt prototype.
16484 * server.c (main): Return an error packet if
16485 read_inferior_memory() returns an error.
16486
a59d1c82
DJ
164872004-03-04 Daniel Jacobowitz <drow@mvista.com>
16488
16489 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16490 Unify with other clean targets.
16491
dc3f8883
DJ
164922004-02-29 Daniel Jacobowitz <drow@mvista.com>
16493
16494 * server.c (handle_v_cont): Call set_desired_inferior.
16495
89a208da
DJ
164962004-02-29 Daniel Jacobowitz <drow@mvista.com>
16497
16498 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16499
62ea82f5
DJ
165002004-02-29 Daniel Jacobowitz <drow@mvista.com>
16501
16502 * linux-low.c (linux_wait): Unblock async I/O.
16503 (linux_resume): Block and enable async I/O.
16504 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16505 * server.h (block_async_io, unblock_async_io): Add prototypes.
16506
6910d122
DJ
165072004-02-29 Daniel Jacobowitz <drow@mvista.com>
16508
16509 * remote-utils.c (remote_open): Print a status notice after
16510 opening a TCP port.
16511 * server.c (attach_inferior): Print a status notice after
16512 attaching.
16513
165142004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16515
16516 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16517
c89dc5d4
DJ
165182004-02-26 Daniel Jacobowitz <drow@mvista.com>
16519
16520 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16521 error packet.
16522 * server.c, target.h: Update copyright years.
16523
4b8dad4a
RM
165242004-02-25 Roland McGrath <roland@redhat.com>
16525
16526 * target.h (struct target_ops): New member `read_auxv'.
16527 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16528 * linux-low.c (linux_read_auxv): New function.
16529 (linux_target_ops): Initialize `read_auxv' member to that.
16530
d7446758
JB
165312004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16532
16533 Committed by Jim Blandy <jimb@redhat.com>.
16534
16535 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16536 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16537 instead of GPR_SIZE to distiguish s390 and s390x targets.
16538
5544ad89
DJ
165392004-01-31 Daniel Jacobowitz <drow@mvista.com>
16540
16541 * linux-low.c: Update copyright year.
16542 (check_removed_breakpoint): Clear pending_is_breakpoint.
16543 (linux_set_resume_request, linux_queue_one_thread)
16544 (resume_status_pending_p): New functions.
16545 (linux_continue_one_thread): Use process->resume.
16546 (linux_resume): Only resume threads if there are no pending events.
16547 * linux-low.h (struct process_info): Add resume request
16548 pointer.
16549
2a68b70e
DJ
165502004-01-30 Daniel Jacobowitz <drow@mvista.com>
16551
16552 * regcache.c (new_register_cache): Clear the allocated register
16553 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16554
64386c31
DJ
165552003-10-13 Daniel Jacobowitz <drow@mvista.com>
16556
16557 * linux-low.c (linux_resume): Take a struct thread_resume *
16558 argument.
16559 (linux_wait): Update call.
16560 (resume_ptr): New static variable.
16561 (linux_continue_one_thread): Renamed from
16562 linux_continue_one_process. Use resume_ptr.
16563 (linux_resume): Use linux_continue_one_thread.
16564 * server.c (handle_v_cont, handle_v_requests): New functions.
16565 (myresume): New function.
16566 (main): Handle 'v' case.
16567 * target.h (struct thread_resume): New type.
16568 (struct target_ops): Change argument of "resume" to struct
16569 thread_resume *.
16570 (myresume): Delete macro.
16571
c938e9b0
L
165722003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16573
16574 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16575 (uninstall): Support DESTDIR.
16576
7f313d07
BC
16577Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16578
16579 * configure.srv: Add xscale*linux copy of arm*linux entry.
16580
3b2fc2ea
DJ
165812003-07-24 Daniel Jacobowitz <drow@mvista.com>
16582
16583 * linux-arm-low.c (arm_reinsert_addr): New function.
16584 (the_low_target): Add arm_reinsert_addr.
16585
1c0a559e
MK
165862003-07-08 Mark Kettenis <kettenis@gnu.org>
16587
16588 * mem-break.c: Remove whitespace at end of file.
16589
43d5792c
DJ
165902003-06-28 Daniel Jacobowitz <drow@mvista.com>
16591
16592 * configure.in: Check whether we need to prototype strerror.
16593 * server.h: Optionally prototype strerror.
16594 * gdbreplay.c (perror_with_name): Use strerror.
16595 * linux-low.c (linux_attach_lwp): Use strerror.
16596 * utils.c (perror_with_name): Use strerror.
16597 * config.in, configure: Regenerated.
16598
c8a86edf
DJ
165992003-06-28 Daniel Jacobowitz <drow@mvista.com>
16600
16601 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16602 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16603
73d37363
DJ
166042003-06-20 Daniel Jacobowitz <drow@mvista.com>
16605
16606 * Makefile.in (SFILES): Update.
16607 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16608 low-sun3.c: Remove files.
16609
6ad8ae5c
DJ
166102003-06-17 Daniel Jacobowitz <drow@mvista.com>
16611
16612 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16613 (linux_detach_one_process, linux_detach): New functions.
16614 (linux_target_ops): Add linux_detach.
16615 * server.c (main): Handle 'D' packet.
16616 * target.h (struct target_ops): Add "detach" member.
16617 (detach_inferior): Define.
16618
1581182a
MK
166192003-06-13 Mark Kettenis <kettenis@gnu.org>
16620
16621 From Kelley Cook <kelleycook@wideopenwest.com>:
16622 * configure.srv: Accept i[34567]86 variants.
16623
e5379b03
DJ
166242003-06-05 Daniel Jacobowitz <drow@mvista.com>
16625
16626 * linux-low.c (linux_wait_for_event): Correct comment typos.
16627 (linux_resume_one_process): Call check_removed_breakpoint.
16628 (linux_send_signal): New function.
16629 (linux_target_ops): Add linux_send_signal.
16630 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16631 of kill.
16632 * target.h (struct target_ops): Add send_signal.
16633
2ff29de4
JB
166342003-05-29 Jim Blandy <jimb@redhat.com>
16635
16636 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16637 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16638 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16639 away part of the register's value.
16640
254787d4
DJ
166412003-03-26 Daniel Jacobowitz <drow@mvista.com>
16642
16643 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16644 (linux_wait_for_event, linux_init_signals): Likewise.
16645
94e10508
DJ
166462003-03-17 Daniel Jacobowitz <drow@mvista.com>
16647
16648 * configure.in: Check for stdlib.h.
16649 * configure: Regenerated.
16650 * config.in: Regenerated.
16651
4c0711e0
DJ
166522003-01-04 Andreas Schwab <schwab@suse.de>
16653
16654 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16655
ef66e766
AC
166562003-01-02 Andrew Cagney <ac131313@redhat.com>
16657
16658 * Makefile.in: Remove obsolete code.
16659
a1358604
DJ
166602002-11-20 Daniel Jacobowitz <drow@mvista.com>
16661
16662 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16663 defined(PT_FPR0_HI).
16664
23ce3b1c
DJ
166652002-11-17 Stuart Hughes <seh@zee2.com>
16666
16667 * linux-arm-low.c (arm_num_regs): Increase.
16668 (arm_regmap): Include status register.
16669
166702002-11-17 Daniel Jacobowitz <drow@mvista.com>
16671
16672 * linux-low.c (register_addr): Remove incorrect -1 check.
16673
a9fa9f7d
DJ
166742002-08-29 Daniel Jacobowitz <drow@mvista.com>
16675
16676 * linux-low.c (linux_create_inferior): Call setpgid. Return
16677 the new PID.
16678 (unstopped_p, linux_signal_pid): Remove.
16679 (linux_target_ops): Remove linux_signal_pid.
16680 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16681 global instead of target method.
16682 * target.h (struct target_ops): Remove signal_pid. Update comment
16683 for create_inferior.
16684 * server.c (signal_pid): New variable.
16685 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16686 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16687 (attach_inferior): Set signal_pid.
16688
17574093
DJ
166892002-08-23 Daniel Jacobowitz <drow@mvista.com>
16690
16691 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16692
166932002-08-20 Jim Blandy <jimb@redhat.com>
16694
16695 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16696 default for this.
16697
166982002-08-01 Andrew Cagney <cagney@redhat.com>
16699
16700 * Makefile.in: Make chill references obsolete.
16701
167022002-07-24 Kevin Buettner <kevinb@redhat.com>
16703
16704 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16705 * configure: Regenerate.
16706 * config.in: Regenerate.
16707
167082002-07-09 David O'Brien <obrien@FreeBSD.org>
16709
16710 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16711 (perror_with_name, remote_close, remote_open, expect, play): Static.
16712
167132002-07-04 Michal Ludvig <mludvig@suse.cz>
16714
4b8dad4a 16715 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16716 byte offsets instead of an array of indexes.
16717 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16718
167192002-06-13 Daniel Jacobowitz <drow@mvista.com>
16720
16721 * regcache.c: Add comment.
16722
167232002-06-11 Daniel Jacobowitz <drow@mvista.com>
16724
16725 * thread-db.c: New file.
16726 * proc-service.c: New file.
16727 * acinclude.m4: New file.
16728 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16729 proc-service.o, and thread-db.o.
16730 (linux-low.o): Add USE_THREAD_DB.
16731 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16732 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16733 * aclocal.m4: Regenerated.
16734 * config.in: Regenerated.
16735 * configure: Regenerated.
16736 * configure.in: Check for proc_service.h, sys/procfs.h,
16737 thread_db.h, and linux/elf.h headrs.
16738 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16739 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16740 Check for -lthread_db and thread support.
16741 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16742 PowerPC, and SuperH.
16743 * i387-fp.c: Constify arguments.
16744 * i387-fp.h: Likewise.
16745 * inferiors.c: (struct thread_info): Renamed from
16746 `struct inferior_info'. Remove PID member. Use generic inferior
16747 list header. All uses updated.
16748 (inferiors, signal_pid): Removed.
16749 (all_threads): New variable.
16750 (get_thread): Define.
16751 (add_inferior_to_list): New function.
16752 (for_each_inferior): New function.
16753 (change_inferior_id): New function.
16754 (add_inferior): Removed.
16755 (remove_inferior): New function.
16756 (add_thread): New function.
16757 (free_one_thread): New function.
16758 (remove_thread): New function.
16759 (clear_inferiors): Use for_each_inferior and free_one_thread.
16760 (find_inferior): New function.
16761 (find_inferior_id): New function.
16762 (inferior_target_data): Update argument type.
16763 (set_inferior_target_data): Likewise.
16764 (inferior_regcache_data): Likewise.
16765 (set_inferior_regcache_data): Likewise.
16766 * linux-low.c (linux_bp_reinsert): Remove.
16767 (all_processes, stopping_threads, using_thrads)
16768 (struct pending_signals, debug_threads, pid_of): New.
16769 (inferior_pid): Replace with macro.
16770 (struct inferior_linux_data): Remove.
16771 (get_stop_pc, add_process): New functions.
16772 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16773 Use add_process and add_thread.
16774 (linux_attach_lwp): New function, based on old linux_attach. Use
16775 add_process and add_thread. Set stop_expected for new threads.
16776 (linux_attach): New function.
16777 (linux_kill_one_process): New function.
16778 (linux_kill): Kill all LWPs.
16779 (linux_thread_alive): Use find_inferior_id.
16780 (check_removed_breakpoints, status_pending_p): New functions.
16781 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16782 Update. Use WNOHANG. Wait for cloned processes also. Update process
16783 struct for the found process.
16784 (linux_wait_for_event): New function.
16785 (linux_wait): Use it. Support LWPs.
16786 (send_sigstop, wait_for_sigstop, stop_all_processes)
16787 (linux_resume_one_process, linux_continue_one_process): New functions.
16788 (linux_resume): Support LWPs.
16789 (REGISTER_RAW_SIZE): Remove.
16790 (fetch_register): Use register_size instead. Call supply_register.
16791 (usr_store_inferior_registers): Likewise. Call collect_register.
16792 Fix recursive case.
16793 (regsets_fetch_inferior_registers): Improve error message.
16794 (regsets_store_inferior_registers): Add debugging.
16795 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16796 (unstopped_p, linux_signal_pid): New functions.
16797 (linux_target_ops): Add linux_signal_pid.
16798 (linux_init_signals): New function.
16799 (initialize_low): Call it. Initialize using_threads.
16800 * regcache.c (inferior_regcache_data): Add valid
16801 flag.
16802 (get_regcache): Fetch registers lazily. Add fetch argument
16803 and update all callers.
16804 (regcache_invalidate_one, regcache_invalidate): New
16805 functions.
16806 (new_register_cache): Renamed from create_register_cache.
16807 Return the new regcache.
16808 (free_register_cache): Change argument to a void *.
16809 (registers_to_string, registers_from_string): Call get_regcache
16810 with fetch flag set.
16811 (register_data): Make static. Pass fetch flag to get_regcache.
16812 (supply_register): Call get_regcache with fetch flag clear.
16813 (collect_register): Call get_regcache with fetch flag set.
16814 (collect_register_as_string): New function.
16815 * regcache.h: Update.
16816 * remote-utils.c (putpkt): Flush after debug output and use
16817 stderr.
16818 Handle input interrupts while waiting for an ACK.
16819 (input_interrupt): Use signal_pid method.
16820 (getpkt): Flush after debug output and use stderr.
16821 (outreg): Use collect_register_as_string.
16822 (new_thread_notify, dead_thread_notify): New functions.
16823 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16824 and general_thread.
16825 (look_up_one_symbol): Flush after debug output.
16826 * server.c (step_thread, server_waiting): New variables.
16827 (start_inferior): Don't use signal_pid. Update call to mywait.
16828 (attach_inferior): Update call to mywait.
16829 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16830 (main): Don't fetch/store registers explicitly. Use
16831 set_desired_inferior. Support proposed ``Hs'' packet. Update
16832 calls to mywait.
16833 * server.h: Update.
16834 (struct inferior_list, struct_inferior_list_entry): New.
16835 * target.c (set_desired_inferior): New.
16836 (write_inferior_memory): Constify.
16837 (mywait): New function.
16838 * target.h: Update.
16839 (struct target_ops): New signal_pid method.
16840 (mywait): Removed macro, added prototype.
16841
16842 * linux-low.h (regset_func): Removed.
16843 (regset_fill_func, regset_store_func): New.
16844 (enum regset_type): New.
16845 (struct regset_info): Add type field. Use new operation types.
16846 (struct linux_target_ops): stop_pc renamed to get_pc.
16847 Add decr_pc_after_break and breakpoint_at.
16848 (get_process, get_thread_proess, get_process_thread)
16849 (strut process_info, all_processes, linux_attach_lwp)
16850 (thread_db_init): New.
16851
16852 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16853 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16854 (the_low_target): Add new members.
16855 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16856 (i386_store_fpxregset): Constify.
16857 (target_regsets): Add new kind identifier.
16858 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16859 (i386_set_pc): Add debugging.
16860 (i386_breakpoint_at): New function.
16861 (the_low_target): Add new members.
16862 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16863 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16864 (mips_breakpoint_at): New.
16865 (the_low_target): Add new members.
16866 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16867 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16868 (the_low_target): Add new members.
16869 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16870 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16871 (the_low_target): Add new members.
16872 * linux-x86-64-low.c (target_regsets): Add new kind
16873 identifier.
16874
168752002-05-15 Daniel Jacobowitz <drow@mvista.com>
16876
16877 From Martin Pool <mbp@samba.org>:
16878 * server.c (gdbserver_usage): New function.
16879 (main): Call it.
16880
168812002-05-14 Daniel Jacobowitz <drow@mvista.com>
16882
16883 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16884 stop_at -> stop_pc.
16885
168862002-05-04 Andrew Cagney <ac131313@redhat.com>
16887
16888 * Makefile.in: Remove obsolete code.
16889
168902002-04-24 Michal Ludvig <mludvig@suse.cz>
16891
16892 * linux-low.c (regsets_fetch_inferior_registers),
16893 (regsets_store_inferior_registers): Removed cast to int from
16894 ptrace() calls.
16895 * regcache.h: Added declaration of struct inferior_info.
16896
168972002-04-20 Daniel Jacobowitz <drow@mvista.com>
16898
16899 * inferiors.c (struct inferior_info): Add regcache_data.
16900 (add_inferior): Call create_register_cache.
16901 (clear_inferiors): Call free_register_cache.
16902 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16903 * regcache.c (struct inferior_regcache_data): New.
16904 (registers): Remove.
16905 (get_regcache): New function.
16906 (create_register_cache, free_register_cache): New functions.
16907 (set_register_cache): Don't initialize the register cache here.
16908 (registers_to_string, registers_from_string, register_data): Call
16909 get_regcache.
16910 * regcache.h: Add prototypes.
16911 * server.h: Likewise.
16912
169132002-04-20 Daniel Jacobowitz <drow@mvista.com>
16914
16915 * mem-break.c: New file.
16916 * mem-break.h: New file.
16917 * Makefile.in: Add mem-break.o rule; update server.h
16918 dependencies.
16919 * inferiors.c (struct inferior_info): Add target_data
16920 member.
16921 (clear_inferiors): Free target_data member if set.
16922 (inferior_target_data, set_inferior_target_data): New functions.
16923 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16924 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16925 * linux-low.c (linux_bp_reinsert): New variable.
16926 (struct inferior_linux_data): New.
16927 (linux_create_inferior): Use set_inferior_target_data.
16928 (linux_attach): Likewise. Call add_inferior.
16929 (linux_wait_for_one_inferior): New function.
16930 (linux_wait): Call it.
16931 (linux_write_memory): Add const.
16932 (initialize_low): Call set_breakpoint_data.
16933 * linux-low.h (struct linux_target_ops): Add breakpoint
16934 handling members.
16935 * server.c (attach_inferior): Remove extra add_inferior
16936 call.
16937 * server.h: Include mem-break.h. Update inferior.c
16938 prototypes.
16939 * target.c (read_inferior_memory)
16940 (write_inferior_memory): New functions.
16941 * target.h (read_inferior_memory)
16942 (write_inferior_memory): Change macros to prototypes.
16943 (struct target_ops): Update comments. Add const to write_memory
16944 definition.
16945
169462002-04-11 Daniel Jacobowitz <drow@mvista.com>
16947
16948 * linux-low.c (usr_store_inferior_registers): Support
16949 registers which are allowed to fail to store.
16950 * linux-low.h (linux_target_ops): Likewise.
16951 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16952 (ppc_cannot_store_register): FPSCR may not be storable.
16953
169542002-04-09 Daniel Jacobowitz <drow@mvista.com>
16955
16956 * server.h: Include <string.h> if HAVE_STRING_H.
16957 * ChangeLog: Correct paths in last ChangeLog entry.
16958
169592002-04-09 Daniel Jacobowitz <drow@mvista.com>
16960
16961 * linux-low.h: Remove obsolete prototypes.
16962 (struct linux_target_ops): New.
16963 (extern the_low_target): New.
16964 * linux-low.c (num_regs, regmap): Remove declarations.
16965 (register_addr): Use the_low_target explicitly.
16966 (fetch_register): Likewise.
16967 (usr_fetch_inferior_registers): Likewise.
16968 (usr_store_inferior_registers): Likewise.
16969 * linux-arm-low.c (num_regs): Remove.
16970 (arm_num_regs): Define.
16971 (arm_regmap): Renamed from regmap, made static.
16972 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16973 made static.
16974 (arm_cannot_store_register): Renamed from cannot_store_register,
16975 made static.
16976 (the_low_target): New.
16977 * linux-i386-low.c (num_regs): Remove.
16978 (i386_num_regs): Define.
16979 (i386_regmap): Renamed from regmap, made static.
16980 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16981 made static.
16982 (i386_cannot_store_register): Renamed from cannot_store_register,
16983 made static.
16984 (the_low_target): New.
16985 * linux-ia64-low.c (num_regs): Remove.
16986 (ia64_num_regs): Define.
16987 (ia64_regmap): Renamed from regmap, made static.
16988 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16989 made static.
16990 (ia64_cannot_store_register): Renamed from cannot_store_register,
16991 made static.
16992 (the_low_target): New.
16993 * linux-m68k-low.c (num_regs): Remove.
16994 (m68k_num_regs): Define.
16995 (m68k_regmap): Renamed from regmap, made static.
16996 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16997 made static.
16998 (m68k_cannot_store_register): Renamed from cannot_store_register,
16999 made static.
17000 (the_low_target): New.
17001 * linux-mips-low.c (num_regs): Remove.
17002 (mips_num_regs): Define.
17003 (mips_regmap): Renamed from regmap, made static.
17004 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17005 made static.
17006 (mips_cannot_store_register): Renamed from cannot_store_register,
17007 made static.
17008 (the_low_target): New.
17009 * linux-ppc-low.c (num_regs): Remove.
17010 (ppc_num_regs): Define.
17011 (ppc_regmap): Renamed from regmap, made static.
17012 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17013 made static.
17014 (ppc_cannot_store_register): Renamed from cannot_store_register,
17015 made static.
17016 (the_low_target): New.
17017 * linux-s390-low.c (num_regs): Remove.
17018 (s390_num_regs): Define.
17019 (s390_regmap): Renamed from regmap, made static.
17020 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17021 made static.
17022 (s390_cannot_store_register): Renamed from cannot_store_register,
17023 made static.
17024 (the_low_target): New.
17025 * linux-sh-low.c (num_regs): Remove.
17026 (sh_num_regs): Define.
17027 (sh_regmap): Renamed from regmap, made static.
17028 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17029 made static.
17030 (sh_cannot_store_register): Renamed from cannot_store_register,
17031 made static.
17032 (the_low_target): New.
17033 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17034 (the_low_target): New.
17035
170362002-04-09 Daniel Jacobowitz <drow@mvista.com>
17037
17038 * Makefile.in: Add stamp-h target.
17039 * configure.in: Create stamp-h.
17040 * configure: Regenerated.
17041
170422002-04-09 Daniel Jacobowitz <drow@mvista.com>
17043
17044 * inferiors.c: New file.
17045 * target.c: New file.
17046 * target.h: New file.
17047 * Makefile.in: Add target.o and inferiors.o. Update
17048 dependencies.
17049 * linux-low.c (inferior_pid): New static variable,
17050 moved from server.c.
17051 (linux_create_inferior): Renamed from create_inferior.
17052 Call add_inferior. Return 0 on success instead of a PID.
17053 (linux_attach): Renamed from myattach.
17054 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17055 (linux_thread_alive): Renamed from mythread_alive.
17056 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17057 child dies.
17058 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17059 (regsets_store_inferior_registers): Correct error message.
17060 Add missing ``return 0''.
17061 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17062 (linux_store_registers): Renamed from store_inferior_registers.
17063 (linux_read_memory): Renamed from read_inferior_memory.
17064 (linux_write_memory): Renamed from write_inferior_memory.
17065 (linux_target_ops): New structure.
17066 (initialize_low): Call set_target_ops ().
17067 * remote-utils.c (unhexify): New function.
17068 (hexify): New function.
17069 (input_interrupt): Send signals to ``signal_pid''.
17070 * server.c (inferior_pid): Remove.
17071 (start_inferior): Update create_inferior call.
17072 (attach_inferior): Call add_inferior.
17073 (handle_query): New function.
17074 (main): Call handle_query for `q' packets.
17075 * server.h: Include "target.h". Remove obsolete prototypes.
17076 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17077
170782002-04-09 Daniel Jacobowitz <drow@mvista.com>
17079
17080 * Makefile.in: Add WARN_CFLAGS. Update configury
17081 dependencies.
17082 * configure.in: Check for <string.h>
17083 * configure: Regenerate.
17084 * config.in: Regenerate.
17085 * gdbreplay.c: Include needed system headers.
17086 (remote_open): Remove strchr prototype.
17087 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17088 * regcache.c (supply_register): Change buf argument to const void *.
17089 (supply_register_by_name): Likewise.
17090 (collect_register): Change buf argument to void *.
17091 (collect_register_by_name): Likewise.
17092 * regcache.h: Add missing prototypes.
17093 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17094 * server.c (handle_query): New function.
17095 (attached): New static variable, moved out of main.
17096 (main): Quiet longjmp clobber warnings.
17097 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17098 * utils.c (error): Remove NORETURN.
17099 (fatal): Likewise.
This page took 2.515544 seconds and 4 git commands to generate.