Fix regression caused by recently added syscall restart code
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e90a813d
KB
12019-05-06 Kevin Buettner <kevinb@redhat.com>
2
3 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4 sign extension code on 32-bit builds.
5
353ea2d1
EZ
62019-05-03 Eli Zaretskii <eliz@gnu.org>
7
8 * remote-utils.c:
9 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
10
b494cdff
TT
112019-04-19 Tom Tromey <tom@tromey.com>
12
13 * server.c (struct vstop_notif): Derive from notif_event.
14 <base>: Remove.
15 (queue_stop_reply): Update.
16 (remove_all_on_match_ptid): Change type. Rewrite.
17 (discard_queued_stop_replies): Rewrite.
18 (in_queued_stop_replies_ptid): Change type.
19 (in_queued_stop_replies): Rewrite.
20 (notif_stop): Update.
21 (queue_stop_reply_callback): Update.
22 (captured_main): Don't call initialize_notif.
23 (push_stop_notification): Update.
24 * notif.c (notif_write_event, handle_notif_ack)
25 (notif_event_enque, notif_push): Update.
26 (notif_event_xfree, initialize_notif): Remove.
27 * notif.h (struct notif_event): Include <list>, not
28 "common/queue.h".
29 (struct notif_server) <queue>: Now a std::list.
30 (notif_event_p): Remove typedef.
31 (initialize_notif): Don't declare.
32 (struct notif_event): Add virtual destructor.
33
a7e559cc
AH
342019-04-17 Alan Hayward <alan.hayward@arm.com>
35
36 * ax.c (ax_vdebug): Call debug_printf.
37 * debug.c (debug_write): New function.
38 * debug.h (debug_write): New declaration.
39 * linux-low.c (sigchld_handler): Call debug_write.
40
aeb2e706
AH
412019-04-17 Alan Hayward <alan.hayward@arm.com>
42
43 * debug.c (debug_set_output): New function.
44 (debug_vprintf): Send output to debug_file.
45 (debug_flush): Likewise.
46 * debug.h (debug_set_output): New declaration.
47 * server.c (handle_monitor_command): Add debug-file option.
48 (captured_main): Likewise.
49
c1bc0935
AH
502019-04-17 Alan Hayward <alan.hayward@arm.com>
51
52 * debug.c (remote_debug): Add definition.
53 * debug.h (remote_debug): Add declaration.
54 * hostio.c (remote_debug): Remove declaration.
55 * remote-utils.c (struct ui_file): Likewise.
56 (remote_debug): Likewise.
57 * remote-utils.h (remote_debug): Likewise,
58 * server.c (remote_debug): Remove definition.
59
3f52fdbc
KB
602019-04-10 Kevin Buettner <kevinb@redhat.com>
61
62 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
63 when using a 64-bit gdbserver.
64
b0319eaa
TT
652019-04-09 Tom Tromey <tromey@adacore.com>
66
67 * linux-low.c (select_event_lwp): Use find_thread_in_random.
68
eedc3f4f
TT
692019-04-08 Tom Tromey <tom@tromey.com>
70
71 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
72 throw.
73 (linux_resume_one_lwp): Likewise.
74
230d2906
TT
752019-04-08 Tom Tromey <tom@tromey.com>
76
77 * gdbreplay.c: Update.
78 * linux-low.c: Update.
79 * server.c: Update.
80
a70b8144
TT
812019-04-08 Tom Tromey <tom@tromey.com>
82
83 * server.c: Use C++ exception handling.
84 * linux-low.c: Use C++ exception handling.
85 * gdbreplay.c: Use C++ exception handling.
86
3d6e9d23
TT
872019-04-08 Tom Tromey <tom@tromey.com>
88
89 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
90 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
91 (captured_main, main): Update.
92 * gdbreplay.c (main): Update.
93
0570503d
PFC
942019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
95
96 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
97 value in argument pointer, return 1 if the entry is found and 0
98 otherwise. Move comment.
99 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
100 * linux-low.h (linux_get_auxv): Declare.
101 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
102
227a9e65
TT
1032019-04-05 Tom Tromey <tromey@adacore.com>
104
105 * server.c (gdbserver_usage): Use upper-case for metasyntactic
106 variables.
107
69f4c9cc
AH
1082019-03-28 Alan Hayward <alan.hayward@arm.com>
109
110 * linux-low.c (AT_HWCAP2): Add define if not already included.
111
974c89e0
AH
1122019-03-26 Alan Hayward <alan.hayward@arm.com>
113
114 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
115 (aarch64_arch_setup): Call linux_get_hwcap.
116 * linux-arm-low.c (arm_get_hwcap): Remove function.
117 (arm_read_description): Call linux_get_hwcap.
118 * linux-low.c (linux_get_auxv): New function.
119 (linux_get_hwcap): Likewise.
120 (linux_get_hwcap2): Likewise.
121 * linux-low.h (linux_get_hwcap): New declaration.
122 (linux_get_hwcap2): Likewise.
123 * linux-ppc-low.c (ppc_get_auxv): Remove function.
124 (ppc_arch_setup): Call linux_get_hwcap.
125 * linux-s390-low.c (s390_get_hwcap): Remove function.
126 (s390_arch_setup): Call linux_get_hwcap.
127
1ef53e6b
AH
1282019-03-22 Alan Hayward <alan.hayward@arm.com>
129 Jiong Wang <jiong.wang@arm.com>
130
131 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
132 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
133 to fail.
134 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
135
ee4fbcfa
AH
1362019-03-22 Alan Hayward <alan.hayward@arm.com>
137 Jiong Wang <jiong.wang@arm.com>
138
139 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
140 (aarch64_get_hwcap): New function.
141 (aarch64_arch_setup): Read APIA hwcap.
142
6dc0ebde
AH
1432019-03-22 Alan Hayward <alan.hayward@arm.com>
144 Jiong Wang <jiong.wang@arm.com>
145
146 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
147 (initialize_low_tracepoint): Likewise.
148 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
149 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
150 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
151 (aarch64_linux_read_description): Likewise.
152 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
153
1163a4b7
JB
1542019-03-12 John Baldwin <jhb@FreeBSD.org>
155
156 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
157 i386_create_target_description for 'segments' parameter.
158 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
159 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
160 * win32-i386-low.c (i386_arch_setup): Likewise.
161
d3a70e03
TT
1622019-03-12 Tom Tromey <tromey@adacore.com>
163
164 * linux-low.c (iterate_over_lwps): Update.
165
37991b4f
TT
1662019-03-06 Tom Tromey <tom@tromey.com>
167
168 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
169 (captured_main): Use SCOPE_EXIT.
170
45950eb6
SDJ
1712019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
172
173 * configure.srv: Use '$enable_unittest' instead of '$development'
174 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
175 case.
176
43ac54fc
TT
1772019-02-27 Tom Tromey <tromey@adacore.com>
178
179 * gdbreplay.c (logchar): Handle \r\n.
180
df0da8a2
AH
1812019-02-07 Alan Hayward <alan.hayward@arm.com>
182
183 * linux-low.c (linux_attach): Add process before lwp.
184 * server.c (attach_inferior): Check if already attached.
185
1a5c2598
TT
1862019-02-07 Tom Tromey <tom@tromey.com>
187
188 * x86-tdesc.h: Rename include guard.
189 * x86-low.h: Add include guard.
190 * wincecompat.h: Rename include guard.
191 * win32-low.h: Add include guard.
192 * utils.h: Rename include guard.
193 * tracepoint.h: Rename include guard.
194 * tdesc.h: Rename include guard.
195 * target.h: Rename include guard.
196 * server.h: Rename include guard.
197 * remote-utils.h: Rename include guard.
198 * regcache.h: Rename include guard.
199 * nto-low.h: Rename include guard.
200 * notif.h: Add include guard.
201 * mem-break.h: Rename include guard.
202 * lynx-low.h: Add include guard.
203 * linux-x86-tdesc.h: Add include guard.
204 * linux-s390-tdesc.h: Add include guard.
205 * linux-ppc-tdesc-init.h: Add include guard.
206 * linux-low.h: Add include guard.
207 * linux-aarch64-tdesc.h: Add include guard.
208 * linux-aarch32-low.h: Add include guard.
209 * inferiors.h: Rename include guard.
210 * i387-fp.h: Rename include guard.
211 * hostio.h: Rename include guard.
212 * gdbthread.h: Rename include guard.
213 * gdb_proc_service.h: Rename include guard.
214 * event-loop.h: Rename include guard.
215 * dll.h: Rename include guard.
216 * debug.h: Rename include guard.
217 * ax.h: Rename include guard.
218
956cc47c
SN
2192018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
220
221 PR gdb/23985
222 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
223 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
224
a0707f3c
TT
2252019-01-25 Tom Tromey <tom@tromey.com>
226
227 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
228
0747795c
TT
2292019-01-25 Tom Tromey <tom@tromey.com>
230
231 * win32-low.c: Fix common/ includes.
232 * win32-i386-low.c: Fix common/ includes.
233 * tracepoint.c: Fix common/ includes.
234 * thread-db.c: Fix common/ includes.
235 * target.h: Fix common/ includes.
236 * symbol.c: Fix common/ includes.
237 * spu-low.c: Fix common/ includes.
238 * server.h: Fix common/ includes.
239 * server.c: Fix common/ includes.
240 * remote-utils.c: Fix common/ includes.
241 * regcache.h: Fix common/ includes.
242 * regcache.c: Fix common/ includes.
243 * nto-x86-low.c: Fix common/ includes.
244 * notif.h: Fix common/ includes.
245 * mem-break.h: Fix common/ includes.
246 * lynx-low.c: Fix common/ includes.
247 * lynx-i386-low.c: Fix common/ includes.
248 * linux-x86-tdesc-selftest.c: Fix common/ includes.
249 * linux-x86-low.c: Fix common/ includes.
250 * linux-low.c: Fix common/ includes.
251 * inferiors.h: Fix common/ includes.
252 * i387-fp.c: Fix common/ includes.
253 * hostio.c: Fix common/ includes.
254 * hostio-errno.c: Fix common/ includes.
255 * gdbthread.h: Fix common/ includes.
256 * gdbreplay.c: Fix common/ includes.
257 * fork-child.c: Fix common/ includes.
258 * event-loop.c: Fix common/ includes.
259 * ax.c:
260 (enum gdb_agent_op): Fix common/ includes.
261
be6d4f74
TT
2622019-01-21 Tom Tromey <tom@tromey.com>
263
264 * tracepoint.c: Fix includes.
265 * remote-utils.c: Fix includes.
266 * linux-x86-low.c: Fix includes.
267
66d91b39
JB
2682019-01-01 Joel Brobecker <brobecker@adacore.com>
269
270 * gdbreplay.c (gdbreplay_version): Update copyright year in
271 version message.
272 * server.c (gdbserver_version): Likewise.
273
754e3168
AH
2742018-12-05 Alan Hayward <alan.hayward@arm.com>
275
276 * linux-low.c (add_lwp): Switch ordering.
277
d105de22
TT
2782018-11-29 Tom Tromey <tom@tromey.com>
279
280 * win32-low.c (win32_join): Take pid, not process.
281 * target.h (struct target_ops) <join>: Change argument type.
282 (join_inferior): Change argument name.
283 * spu-low.c (spu_join): Take pid, not process.
284 * server.c (handle_detach): Preserve pid before destroying
285 process.
286 * lynx-low.c (lynx_join): Take pid, not process.
287 * linux-low.c (linux_join): Take pid, not process.
288
50138245
AH
2892018-11-23 Alan Hayward <alan.hayward@arm.com>
290
291 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
292 (aarch64_cannot_fetch_register): Likewise.
293 (struct linux_target_ops): Update references.
294
64f57f3d
PFC
2952018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
296
297 * linux-ppc-low.c: Include nat/linux-ptrace.h.
298
8d619c01
EBM
2992018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
300
301 * configure.srv (ipa_ppc_linux_regobj): Add
302 powerpc-isa207-htm-vsx32l-ipa.o and
303 powerpc-isa207-htm-vsx64l-ipa.o.
304 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
305 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
306 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
307 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
308 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
309 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
310 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
311 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
312 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
313 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
314 (init_registers_powerpc_isa207_htm_vsx32l)
315 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
316 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
317 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
318 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
319 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
320 (ppc_store_tm_ctarregset): New functions.
321 (ppc_regsets): Add entries for HTM regsets.
322 (ppc_arch_setup): Set htm in features struct when needed. Set
323 sizes for the HTM regsets.
324 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
325 (initialize_low_arch): Call
326 init_registers_powerpc_isa207_htm_vsx32l and
327 init_registers_powerpc_isa207_htm_vsx64l.
328 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
329 PPC_TDESC_ISA207_HTM_VSX.
330 (initialize_low_tracepoint): Call
331 init_registers_powerpc_isa207_htm_vsx32l and
332 init_registers_powerpc_isa207_htm_vsx64l.
333
232bfb86
EBM
3342018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
335
336 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
337 rs6000/power-linux-pmu.xml to srv_xmlfiles.
338 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
339 (ppc_store_pmuregset): New functions.
340 (ppc_regsets): Add entries for ebb and pmu regsets.
341 (ppc_arch_setup): Set isa207 in features struct if the ebb and
342 pmu regsets are available. Set sizes for these regsets.
343
f2cf6173
EBM
3442018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
345
346 * configure.srv (ipa_ppc_linux_regobj): Add
347 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
348 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
349 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
350 rs6000/powerpc-isa207-vsx32l.xml, and
351 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
352 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
353 <PPC_TDESC_ISA207_VSX>: New enum value.
354 (init_registers_powerpc_isa207_vsx32l): Declare.
355 (init_registers_powerpc_isa207_vsx64l): Declare.
356 * linux-ppc-low.c (ppc_fill_tarregset): New function.
357 (ppc_store_tarregset): New function.
358 (ppc_regsets): Add entry for the TAR regset.
359 (ppc_arch_setup): Set isa207 in features struct when needed. Set
360 size for the TAR regsets.
361 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
362 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
363 and init_registers_powerpc_isa207_vsx64l.
364 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
365 (initialize_low_tracepoint): Call
366 init_registers_powerpc_isa207_vsx32l and
367 init_registers_powerpc_isa207_vsx64l.
368
7ca18ed6
EBM
3692018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
370 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
371
372 * configure.srv (ipa_ppc_linux_regobj): Add
373 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
374 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
375 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
376 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
377 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
378 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
379 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
380 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
381 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
382 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
383 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
384 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
385 (ppc_hwcap): Add comment.
386 (ppc_hwcap2): New global.
387 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
388 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
389 (ppc_regsets): Add entries for the DSCR and PPR regsets.
390 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
391 when needed. Set sizes for the the DSCR and PPR regsets.
392 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
393 (initialize_low_arch): Call
394 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
395 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
396 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
397 PPC_TDESC_ISA205_PPR_DSCR_VSX.
398 (initialize_low_tracepoint): Call
399 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
400 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
401
5c849b22
PFC
4022018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
403
404 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
405
8ecfd7bd
SDJ
4062018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
407 Simon Marchi <simark@simark.ca>
408
409 * acinclude.m4: Include "../selftest.m4".
410 * configure: Regenerate.
411 * configure.ac: Use "GDB_AC_SELFTEST".
412 * configure.srv: Use "$enable_unittests" instead of
413 "$development" when checking whether unit tests have been
414 enabled.
415 * server.c (captured_main): Update message informing that
416 selftests have been disabled.
417
96643e35
TT
4182018-10-04 Tom Tromey <tom@tromey.com>
419
420 * configure: Rebuild.
421
da4ae14a
TT
4222018-10-04 Tom Tromey <tom@tromey.com>
423
424 * server.c (handle_status): Rename inner "thread".
425 (process_serial_event): Declare "res" in 'm' case.
426 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
427 (iterate_over_lwps): Rename inner "thread".
428 (linux_qxfer_libraries_svr4): Rename inner "len".
429 * gdbthread.h (find_thread_in_random): Rename inner "thread".
430
7c619dbd
GB
4312018-10-01 Gary Benson <gbenson@redhat.com>
432
433 * gdb_proc_service.h: Moved common code to
434 common/gdb_proc_service.h.
435
3795e814
GB
4362018-10-01 Gary Benson <gbenson@redhat.com>
437
438 * gdb_proc_service.h: Synchronize comments and whitespace with
439 GDB's version of this file.
440
49b036f1
TT
4412018-09-25 Tom Tromey <tom@tromey.com>
442
443 * configure: Rebuild.
444 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
445
8ff03f0b
SM
4462018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
447
448 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
449 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
450 ($(IPA_LIB)): Sort IPA_OBJS.
451
a1cd91dc
SM
4522018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * Makefile.in: Remove references to $(ADD_DEPS).
455
752312ba
TT
4562018-09-16 Tom Tromey <tom@tromey.com>
457
458 * remote-utils.c (remote_open): Use GNU style for metasyntactic
459 variables.
460 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
461 variables.
462
f1628857
TT
4632018-09-05 Tom Tromey <tom@tromey.com>
464
465 * configure: Rebuild.
466
ad202fcc
SM
4672018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
468
469 PR build/23399
470 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
471
d3d8724a
TT
4722018-08-27 Tom Tromey <tom@tromey.com>
473
474 PR build/23087:
475 * configure: Rebuild.
476
b4f183d2
TT
4772018-08-27 Tom Tromey <tom@tromey.com>
478
479 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
480 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
481 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
482 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
483 (s390x_emit_stack_adjust): Add casts to unsigned char.
484
4e2aa472
SM
4852018-08-22 Simon Marchi <simon.marchi@ericsson.com>
486
487 PR gdb/23374
488 PR gdb/23375
489 * server.h (struct client_state) <disable_randomization>:
490 Initialize to 1.
491
cf4088a9
SM
4922018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
493
494 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
495 variable.
496 (mips_supply_ptrace_register): Likewise.
497
a0de763e
TT
4982018-07-22 Tom Tromey <tom@tromey.com>
499
500 * configure: Rebuild.
501
b0a7723d
TT
5022018-07-22 Tom Tromey <tom@tromey.com>
503
504 * win32-low.c (win32_create_inferior): Remove unused variables.
505 * gdbreplay.c (remote_open): Remove unused variable.
506 * remote-utils.c (remote_prepare): Remove unused variable.
507 * x86-tdesc.h (X86_TDESC_H): Define.
508 (amd64_expedite_regs): Define conditionally.
509 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
510 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
511 * remote-utils.c (readchar): Remove unused variable.
512
a780ef4f
PA
5132018-07-13 Pedro Alves <palves@redhat.com>
514
515 * linux-low.c (linux_kill): Change parameter to process_info
516 pointer instead of pid. Adjust.
517 * lynx-low.c (lynx_kill): Likewise.
518 * nto-low.c (nto_kill): Likewise.
519 * spu-low.c (spu_kill): Likewise.
520 * win32-low.c (win32_kill): Likewise.
521 * server.c (handle_v_kill, kill_inferior_callback)
522 (detach_or_kill_for_exit): Adjust.
523 * target.c (kill_inferior): Change parameter to process_info
524 pointer instead of pid. Adjust.
525 * target.h (struct target_ops) <kill>: Change parameter to
526 process_info pointer instead of pid. Adjust all implementations
527 and callers.
528 (kill_inferior): Likewise.
529
ef2ddb33
PA
5302018-07-13 Pedro Alves <palves@redhat.com>
531
532 * linux-low.c (linux_detach, linux_join): Change parameter to
533 process_info pointer instead of pid. Adjust.
534 * lynx-low.c (lynx_detach, lynx_join): Likewise.
535 * nto-low.c (nto_detach): Likewise.
536 * spu-low.c (spu_detach, spu_join): Likewise.
537 * win32-low.c (win32_detach, win32_join): Likewise.
538 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
539 * target.h (struct target_ops) <detach, join>: Change parameter to
540 process_info pointer instead of pid. Adjust all implementations
541 and callers.
542 (detach_inferior, join_inferior): Rename 'pid' parameter to
543 'proc'.
544
c7ab0aef
SDJ
5452018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
546 Jan Kratochvil <jan.kratochvil@redhat.com>
547 Paul Fertser <fercerpav@gmail.com>
548 Tsutomu Seki <sekiriki@gmail.com>
549
550 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
551 (OBS): Add 'common/netstuff.o'.
552 (GDBREPLAY_OBS): Likewise.
553 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
554 (remote_open): Implement support for IPv6
555 connections.
556 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
557 and 'wspiapi.h'.
558 (handle_accept_event): Accept connections from IPv6 sources.
559 (remote_prepare): Handle IPv6-style hostnames; implement
560 support for IPv6 connections.
561 (remote_open): Implement support for printing connections from
562 IPv6 sources.
563
31445d10
PA
5642018-07-11 Pedro Alves <palves@redhat.com>
565
566 PR gdb/23377
567 * mem-break.c (any_persistent_commands): Add process_info
568 parameter and use it instead of relying on the current process.
569 Change return type to bool.
570 * mem-break.h (any_persistent_commands): Add process_info
571 parameter and change return type to bool.
572 * server.c (handle_detach): Remove require_running_or_return call.
573 Look up the process_info for the process we're about to detach.
574 If not found, return back error to GDB. Adjust
575 any_persistent_commands call to pass down a process pointer.
576
cb197132
PA
5772018-07-11 Pedro Alves <palves@redhat.com>
578
579 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
580 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
581 instead of collect_register_by_name.
582 * regcache.c (regcache_raw_get_unsigned_by_name): New.
583 * regcache.h (regcache_raw_get_unsigned_by_name): New.
584
1b919490
VB
5852018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
586 Pedro Alves <palves@redhat.com>
587
588 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
589
d7e15655
TT
5902018-07-03 Tom Tromey <tom@tromey.com>
591
592 * linux-low.c: Update.
593 * lynx-low.c: Update.
594 * mem-break.c: Update.
595 * nto-low.c: Update.
596 * remote-utils.c: Update.
597 * server.c: Update.
598 * spu-low.c: Update.
599 * target.c: Update.
600 * win32-low.c: Update.
601
26a57c92
TT
6022018-07-03 Tom Tromey <tom@tromey.com>
603
604 * server.c: Update.
605
0e998d96
TT
6062018-07-03 Tom Tromey <tom@tromey.com>
607
608 * linux-low.c: Update.
609
cc6bcb54
TT
6102018-07-03 Tom Tromey <tom@tromey.com>
611
612 * target.c: Update.
613
e38504b3
TT
6142018-07-03 Tom Tromey <tom@tromey.com>
615
616 * linux-low.c: Update.
617 * linux-mips-low.c: Update.
618 * lynx-low.c: Update.
619 * nto-low.c: Update.
620 * remote-utils.c: Update.
621 * server.c: Update.
622 * spu-low.c: Update.
623 * target.c: Update.
624 * thread-db.c: Update.
625
e99b03dc
TT
6262018-07-03 Tom Tromey <tom@tromey.com>
627
628 * linux-low.c: Update.
629 * linux-mips-low.c: Update.
630 * lynx-low.c: Update.
631 * mem-break.c: Update.
632 * nto-low.c: Update.
633 * remote-utils.c: Update.
634 * server.c: Update.
635 * spu-low.c: Update.
636 * target.c: Update.
637 * tracepoint.c: Update.
638
f2907e49
TT
6392018-07-03 Tom Tromey <tom@tromey.com>
640
641 * linux-low.c: Update.
642 * linux-ppc-low.c: Update.
643 * linux-x86-low.c: Update.
644 * proc-service.c: Update.
645 * server.c: Update.
646 * spu-low.c: Update.
647 * thread-db.c: Update.
648 * win32-low.c: Update.
649
fd79271b
TT
6502018-07-03 Tom Tromey <tom@tromey.com>
651
652 * linux-low.c: Update.
653 * lynx-low.c: Update.
654 * nto-low.c: Update.
655 * remote-utils.c: Update.
656 * spu-low.c: Update.
657 * thread-db.c: Update.
658 * win32-low.c: Update.
659
c0867626
SDJ
6602018-06-29 Joel Brobecker <brobecker@adacore.com>
661
662 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
663 parameter in call to 'amd64_create_target_description'.
664
2512d7ef
JK
6652018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
666
667 * x86-tdesc.h: Remove executable permission flag.
668
d0ac1c44
SM
6692018-06-19 Simon Marchi <simon.marchi@ericsson.com>
670
671 * configure.ac: Remove AC_PREREQ, add missing quoting.
672 * configure: Re-generate.
673 * config.in: Re-generate.
674 * aclocal.m4: Re-generate.
675
c4eb05ff
SM
6762018-06-18 Simon Marchi <simon.marchi@ericsson.com>
677
678 * tracepoint.h (current_traceframe): Remove declaration.
679
02895270
AH
6802018-06-18 Alan Hayward <alan.hayward@arm.com>
681
682 * linux-aarch64-low.c (is_sve_tdesc): New function.
683 (aarch64_sve_regs_copy_to_regcache): Likewise.
684 (aarch64_sve_regs_copy_from_regcache): Likewise.
685 (aarch64_regs_info): Add SVE checks.
686 (initialize_low_arch): Initialize SVE.
687
e9902bfc
AH
6882018-06-18 Alan Hayward <alan.hayward@arm.com>
689
690 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
691
fefa175e
AH
6922018-06-11 Alan Hayward <alan.hayward@arm.com>
693
694 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
695 (initialize_low_tracepoint): Likewise
696 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
697 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
698 param.
699 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
700 checks.
701 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
702
b91ad3ff
AH
7032018-06-11 Alan Hayward <alan.hayward@arm.com>
704
705 * server.h (PBUFSIZ): Increase size
706
f868386e
AH
7072018-06-11 Alan Hayward <alan.hayward@arm.com>
708
709 * regcache.c (regcache::raw_compare): New function.
710 * regcache.h (regcache::raw_compare): New declaration.
711
9c861883
AH
7122018-06-11 Alan Hayward <alan.hayward@arm.com>
713
714 * regcache.c (new_register_cache): Use new.
715 (free_register_cache): Use delete.
716 (register_data): Use const.
717 (supply_register): Move body inside regcache.
718 (regcache::raw_supply): New override function.
719 (collect_register): Move body inside regcache.
720 (regcache::raw_collect): New override function.
721 (regcache::get_register_status): New override function.
722 * regcache.h (struct regcache): Inherit from reg_buffer_common.
723
40591844
TT
7242018-06-09 Tom Tromey <tom@tromey.com>
725
726 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
727 declare queue.
728 (event_queue): Use std::queue.
729 (gdb_event_xfree): Remove.
730 (initialize_event_loop, process_event, wait_for_event): Update.
731
6341380d
SC
7322018-06-08 Stan Cox <scox@redhat.com>
733
734 * win32-low.c (win32_create_inferior): last_ptid and last_status
735 moved to client_state.
736
03349c93
PA
7372018-06-08 Pedro Alves <palves@redhat.com>
738
739 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
740 common/common-exceptions.o, common/common-utils.o,
741 common/errors.o, common/print-utils.o and utils.o.
742 * gdbreplay.c: Include "common-defs.h" instead of the two
743 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
744 string.h or alloca.h.
745 (perror_with_name): Delete.
746 (remote_open): Use xstrdup instead of strdup.
747 (main): Rename to ...
748 (captured_main): ... this.
749 (main): New.
750
8dcc53b3
TT
7512018-06-08 Tom Tromey <tom@tromey.com>
752
753 * linux-low.c (linux_low_read_btrace): Update.
754
c12a5089
SC
7552018-06-04 Stan Cox <scox@redhat.com>
756
757 * server.h (struct client_state): New.
758 * server.c (cont_thread, general_thread, multi_process)
759 (report_fork_events, report_vfork_events, report_exec_events)
760 (report_thread_events, swbreak_feature, hwbreak_feature)
761 (vCont_supported, disable_randomization, pass_signals)
762 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
763 Moved to client_state.
764 * remote-utils.c (remote_debug, noack_mode)
765 (transport_is_reliable): Moved to client_state.
766 * tracepoint.c (current_traceframe): Moved to client_state.
767
768 Update all callers.
769 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
770 linux-low.c, remote-utils.h, target.c: Use client_state.
771
122394f1
AH
7722018-05-31 Alan Hayward <alan.hayward@arm.com>
773
774 * configure.srv: Add new c/h file.
775
95228a0d
AH
7762018-05-31 Alan Hayward <alan.hayward@arm.com>
777
778 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
779 null VQ.
780
d8dab6c3
MR
7812018-05-25 Maciej W. Rozycki <macro@mips.com>
782
783 * gdb.arch/mips-fpregset-core.exp: New test.
784 * gdb.arch/mips-fpregset-core.c: New test source.
785
81e25b7c
EK
7862018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
787
788 PR server/23198
789 * hostio.c (require_int): Do not report overflow for integers
790 between 0xfffffff and 0x7fffffff.
791
7e947ad3
MR
7922018-05-22 Maciej W. Rozycki <macro@mips.com>
793
794 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
795 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
796 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
797 functions.
798 (the_low_target): Wire them.
799
1d75a658
PFC
8002018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
801
802 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
803 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
804 mode. Call collect_register_by_name with vscr using
805 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
806 (ppc_store_vrregset): Add and set vscr_offset variable as in
807 ppc_fill_vrregset. Call supply_register_by_name with vscr using
808 vscr_offset.
809
d078308a
PFC
8102018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
811
812 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
813 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
814 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
815
7273b5fc
PFC
8162018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
817
818 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
819 (ppc_store_vsxregset): Likewise.
820 (ppc_fill_vrregset): Likewise.
821 (ppc_store_vrregset): Likewise.
822 (ppc_fill_evrregset): Likewise.
823 (ppc_store_evrregset): Likewise.
824 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
825 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
826 needed.
827
2e077f5e
PFC
8282018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
829
830 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
831 wordsize of the inferior. Call ppc_linux_target_wordsize.
832
bd64614e
PFC
8332018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
834
835 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
836 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
837 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
838 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
839 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
840 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
841 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
842 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
843 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
844 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
845 (tdesc_powerpc_e500l): Remove.
846 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
847 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
848 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
849 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
850 linux-ppc-tdesc.h.
851 (ppc_arch_setup): Remove target description matching code. Fill a
852 ppc_linux_features struct and call ppc_linux_match_description
853 with it.
854
75d74cca
MR
8552018-05-22 Maciej W. Rozycki <macro@mips.com>
856
857 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
858 width of the requested register exceeds the width of the
859 `ptrace' data type.
860 (mips_cannot_store_register): Likewise.
861
e4439e43
MR
8622018-05-21 Maciej W. Rozycki <macro@mips.com>
863
864 * linux-mips-low.c (mips_fetch_register): New function. Update
865 preceding comment.
866 (mips_store_gregset): Supply 0 rather than $restart for $zero.
867 (the_low_target): Wire `mips_fetch_register'.
868
55271bf9
JB
8692018-05-10 Joel Brobecker <brobecker@adacore.com>
870
871 * lynx-i386-low.c (LYNXOS_178): New macro.
872 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
873 the layout on LynxOS-178.
874 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
875 handle floating point registers that are not supported by
876 LynxOS-178.
877
1a34f210
TT
8782018-05-10 Tom Tromey <tom@tromey.com>
879
880 * configure: Rebuild.
881
190852c8
JB
8822018-05-10 Joel Brobecker <brobecker@adacore.com>
883
884 PR server/23158:
885 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
886 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
887 Use it to set the expedite_regs field in the given tdesc.
888 * x86-tdesc.h: New file.
889 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
890 Adjust following the addition of the new expedite_regs parameter
891 to init_target_desc.
892 * linux-tic6x-low.c (tic6x_read_description): Likewise.
893 * linux-x86-tdesc.c: #include "x86-tdesc.h".
894 (i386_linux_read_description, amd64_linux_read_description):
895 Adjust following the addition of the new expedite_regs parameter
896 to init_target_desc.
897 * lynx-i386-low.c: #include "x86-tdesc.h".
898 (lynx_i386_arch_setup): Adjust following the addition of the new
899 expedite_regs parameter to init_target_desc.
900 * nto-x86-low.c: #include "x86-tdesc.h".
901 (nto_x86_arch_setup): Adjust following the addition of the new
902 expedite_regs parameter to init_target_desc.
903 * win32-i386-low.c: #include "x86-tdesc.h".
904 (i386_arch_setup): Adjust following the addition of the new
905 expedite_regs parameter to init_target_desc.
906
7dbac825
JB
9072018-05-10 Joel Brobecker <brobecker@adacore.com>
908
909 PR server/23158:
910 * win32-low.c (win32_create_inferior): Add call to my_wait
911 setting last_status global.
912
906994d9
JB
9132018-05-10 Joel Brobecker <brobecker@adacore.com>
914
915 PR server/23158:
916 * win32-low.c (create_process): Only call gdb_tilde_expand if
917 inferior_cwd is not NULL.
918
8ee22052
AB
9192018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
920
921 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
922 registers to the cache if their values have changed.
923 (i387_xsave_to_cache): Provide default values for x87 control
924 registers when these features are available, but disabled.
925 * regcache.c (supply_register_by_name_zeroed): New function.
926 * regcache.h (supply_register_by_name_zeroed): Declare new
927 function.
928
aff689d3
TT
9292018-05-07 Tom Tromey <tom@tromey.com>
930
931 * configure: Rebuild.
932
85e26832
TT
9332018-05-04 Tom Tromey <tom@tromey.com>
934
935 * configure: Rebuild.
936
a3b60e45
JK
9372018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
938 Pedro Alves <palves@redhat.com>
939
940 * linux-aarch64-low.c (aarch64_stopped_data_address):
941 Likewise.
942
632e107b
TT
9432018-04-27 Tom Tromey <tom@tromey.com>
944
945 * configure: Rebuild.
946
458412c3
TT
9472018-04-23 Tom Tromey <tom@tromey.com>
948
949 * configure: Rebuild.
950
f31c089e
SM
9512018-04-19 Simon Marchi <simon.marchi@ericsson.com>
952
953 * Makefile.in (depcomp): Add "..".
954 (all_deps_files): New and use it.
955
b319b098
AH
9562018-04-18 Alan Hayward <alan.hayward@arm.com>
957
958 * configure.srv (aarch64*-*-linux*): Don't include xml.
959 (i[34567]86-*-cygwin*): Likewise.
960 (i[34567]86-*-linux*): Likewise.
961 (i[34567]86-*-lynxos*): Likewise.
962 (i[34567]86-*-mingw32ce*): Likewise.
963 (i[34567]86-*-mingw*): Likewise.
964 (i[34567]86-*-nto*): Likewise.
965 (tic6x-*-uclinux): Likewise.
966 (x86_64-*-linux*): Likewise.
967 (x86_64-*-mingw*): Likewise.
968 (x86_64-*-cygwin*): Likewise.
969
3b74854b
AH
9702018-04-18 Alan Hayward <alan.hayward@arm.com>
971
972 * tdesc.c: Remove xml parameter.
973
e98577a9
AH
9742018-04-18 Alan Hayward <alan.hayward@arm.com>
975
976 * server.c (get_features_xml): Remove cast.
977 * tdesc.c (void target_desc::accept): Fill in function.
978 (tdesc_get_features_xml): Remove old xml creation.
979 (print_xml_feature::visit_pre): Add xml vistor.
980 * tdesc.h (struct target_desc): Make xmltarget mutable.
981 (tdesc_get_features_xml): Remove declaration.
982
d278f585
AH
9832018-04-18 Alan Hayward <alan.hayward@arm.com>
984
985 * tdesc.c (tdesc_architecture_name): Add new function.
986 (tdesc_osabi_name): Likewise.
987 (tdesc_get_features_xml): Use new functions.
988
eee8a18d
AH
9892018-04-18 Alan Hayward <alan.hayward@arm.com>
990
991 * tdesc.c (tdesc_create_flags): Remove.
992 (tdesc_add_flag): Likewise.
993 (tdesc_named_type): Likewise.
994 (tdesc_create_union): Likewise.
995 (tdesc_create_struct): Likewise.
996 (tdesc_create_vector): Likewise.
997 (tdesc_add_bitfield): Likewise.
998 (tdesc_add_field): Likewise.
999 (tdesc_set_struct_size): Likewise.
1000
82ec9bc7
AH
10012018-04-18 Alan Hayward <alan.hayward@arm.com>
1002
1003 * tdesc.c (~target_desc): Remove implictly deleted items.
1004 (init_target_desc): Iterate all features.
1005 (tdesc_get_features_xml): Use vector.
1006 (tdesc_create_feature): Create feature.
1007 * tdesc.h (tdesc_feature) Remove
1008 (target_desc): Add features.
1009
ea3e7d71
AH
10102018-04-18 Alan Hayward <alan.hayward@arm.com>
1011
1012 * Makefile.in: Add common/tdesc.c
1013 * tdesc.c (init_target_desc): init all reg_defs from register
1014 vector.
1015 (tdesc_create_reg): Create tdesc_reg.
1016 * tdesc.h (tdesc_feature): Add register vector.
1017
17d08cd4
SM
10182018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1019
1020 * tdesc.h (struct target_desc) <features>: Change type to
1021 std::vector<std::string>.
1022 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1023 changes.
1024 (tdesc_get_features_xml): Likewise.
1025 (tdesc_create_feature): Likewise.
1026
5cd3e386
AH
10272018-03-26 Alan Hayward <alan.hayward@arm.com>
1028
1029 * regcache.c (find_register_by_number): Return a ref.
1030 (find_regno): Use references.
1031 (register_size): Likewise.
1032 (register_data): Likewise.
1033 * tdesc.c (target_desc::~target_desc): Remove free calls.
1034 (target_desc::operator==): Use std::vector compare.
1035 (init_target_desc): Use reference.
1036 (tdesc_create_reg): Use reg constructors.
1037 * tdesc.h (struct target_desc): Replace pointer with object.
1038
dff7492c
AH
10392018-03-23 Alan Hayward <alan.hayward@arm.com>
1040
1041 * regcache.c (find_register_by_number): Make static.
1042 (find_regno): Use find_register_by_number
1043 * regcache.h (struct reg): Remove declaration.
1044
d80e5242
AH
10452018-03-23 Alan Hayward <alan.hayward@arm.com>
1046
1047 * tdesc.c (target_desc::~target_desc): Move to here.
1048 (target_desc::operator==): Likewise.
1049 * tdesc.h (target_desc::~target_desc): Move from here.
1050 (target_desc::operator==): Likewise.
1051
f69c5afb
AA
10522018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1053
1054 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1055
ce29f843
AA
10562018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1057
1058 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1059 S390_TDESC_GS.
1060 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1061 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1062 and init_registers_s390_gs_linux64.
1063
c49bd90b
AA
10642018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1065
1066 * linux-s390-low.c (s390_fill_gs): Remove function.
1067 (s390_fill_gsbc): Remove function.
1068 (s390_regsets): Set fill functions for the guarded storage regsets
1069 to NULL.
1070
7edb9bd3
AA
10712018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1072
1073 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1074 the word size. Add comment.
1075 (s390_get_wordsize): New function.
1076 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1077 pswm with it. Instead, use s390_get_wordsize to determine the
1078 word size first and derive the correct tdesc from that directly.
1079
39be3c7e
SM
10802018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1081
1082 * Makefile.in: Include silent-rules.mk.
1083 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1084 (COMPILE): Add ECHO_CXX.
1085 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1086 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1087 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1088 (version-generated.c): Add ECHO_GEN.
1089 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1090 (IPAGENT_COMPILE): Add ECHO_CXX.
1091 (%-generated.c): Add ECHO_REGDAT.
1092
3ae9ce5d
TT
10932018-03-14 Tom Tromey <tom@tromey.com>
1094
1095 PR cli/14977:
1096 * ax.c (ax_printf): Special case for NULL.
1097
e6a58aa8
SM
10982018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1099
1100 * linux-low.c (linux_qxfer_libraries_svr4): Use
1101 xml_escape_text_append.
1102
f6e8a41e
SM
11032018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1104
1105 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1106
b9671caf
SM
11072018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1108
1109 * server.c (handle_general_set): Remove unnecessary xstrdup.
1110
e80aaf61
SM
11112018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1112
1113 * server.c (parse_debug_format_options): Adjust to
1114 delim_string_to_char_ptr_vec changes.
1115 * thread-db.c (thread_db_load_search): Adjust to
1116 dirnames_to_char_ptr_vec changes.
1117
b1223e78
MM
11182018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1119
1120 * target.h (target_enable_btrace, target_disable_btrace)
1121 (target_read_btrace, target_read_btrace_conf): Turn macro into
1122 inline function. Throw error if target method is not defined.
1123 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1124 check for btrace target method. Be prepared to handle exceptions
1125 from btrace target methods.
1126
81561546
SDJ
11272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1128
1129 * server.c (captured_main): Change order of error message printed
1130 when the current working directory cannot be found.
1131
25e3c82c
SDJ
11322018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1133
1134 * server.c: Include "filenames.h" and "pathstuff.h".
1135 (program_name): Delete variable.
1136 (program_path): New anonymous class.
1137 (get_exec_wrapper): Use "program_path" instead of
1138 "program_name".
1139 (handle_v_run): Likewise.
1140 (captured_main): Likewise.
1141 (process_serial_event): Likewise.
1142
b4987c95
SDJ
11432018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1144
1145 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1146 (OBJS): Add "pathstuff.o".
1147 * server.c (current_directory): New global variable.
1148 (captured_main): Initialize "current_directory".
1149
f46cd62a
AH
11502018-02-26 Alan Hayward <alan.hayward@arm.com>
1151
1152 * tdesc.c: Use common/tdesc.h.
1153 * tdesc.h: Likewise.
1154
a543c5ca
AH
11552018-02-20 Alan Hayward <alan.hayward@arm.com>
1156 Simon Marchi <simon.marchi@ericsson.com>
1157
1158 * Makefile.in: Switch order of make rules.
1159
b5884fa7
AH
11602018-02-19 Alan Hayward <alan.hayward@arm.com>
1161
1162 * Makefile.in: Add common directory in build.
1163 * configure.ac: Add common reference.
1164 * configure: Regenerate.
1165
de6242d3
MM
11662018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1167
1168 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1169 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1170 * spu-low.c (spu_target_ops): Likewise.
1171 * win32-low.c (win32_target_ops): Likewise.
1172 * server.c (supported_btrace_packets): Report packets unconditionally.
1173 * target.h (target_ops) <supports_btrace>: Remove.
1174 (target_supports_btrace): Remove.
1175
9ee23a85
MM
11762018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1177
1178 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1179 (handle_btrace_disable): Change return type to void. Use exceptions
1180 to report errors.
1181 (handle_btrace_general_set): Catch exception and copy message to
1182 return message.
1183
8ce47547
TT
11842018-02-08 Tom Tromey <tom@tromey.com>
1185
1186 * linux-low.c (install_software_single_step_breakpoints): Use
1187 make_scoped_restore.
1188 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1189 (do_restore_current_thread_cleanup): Remove.
1190 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1191 declare.
1192
45dd3607
TT
11932018-02-08 Tom Tromey <tom@tromey.com>
1194
1195 * mem-break.c (set_raw_breakpoint_at): Use
1196 gdb::unique_xmalloc_ptr.
1197
e671cd59
PA
11982018-01-30 Pedro Alves <palves@redhat.com>
1199
1200 PR gdb/13211
1201 * target.c (target_terminal::terminal_state): Rename to ...
1202 (target_terminal::m_terminal_state): ... this.
1203
a0aad537
JC
12042018-01-19 James Clarke <jrtc27@jrtc27.com>
1205
1206 * linux-low.c (handle_extended_wait): Surround call to
1207 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1208
4d9b86e1
SM
12092018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1212 linux_ptrace_attach_fail_reason_string now returning an
1213 std::string.
1214 (linux_attach): Likewise.
1215 * thread-db.c (attach_thread): Likewise.
1216
f517c180
EA
12172018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1218
1219 PR gdb/21559
1220 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1221 checking for fs_base/gs_base fields in struct user_regs_struct.
1222 * configure: Regenerate.
1223
9a70f35c
YQ
12242018-01-16 Yao Qi <yao.qi@linaro.org>
1225
1226 PR gdb/18749
1227 * linux-low.c (fetch_register): Call supply_register instead of
1228 error.
1229
605fd3c6
YQ
12302018-01-08 Yao Qi <yao.qi@linaro.org>
1231 Simon Marchi <simon.marchi@ericsson.com>
1232
1233 * Makefile.in (OBS): Remove selftest.o.
1234 * configure.ac: Set srv_selftest_objs if $development is true.
1235 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1236 * configure: Re-generated.
1237 * server.c (captured_main): Wrap variable selftest_filter with
1238 GDB_SELF_TEST.
1239
2cc05030
SM
12402018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * server.c (parse_debug_format_options): Return std::string.
1243 (handle_monitor_command, captured_main): Adjust.
1244
e379cee6
PA
12452018-01-05 Pedro Alves <palves@redhat.com>
1246
1247 PR gdb/18653
1248 * server.c (captured_main): Pass quiet=false to
1249 save_original_signals_state.
1250
82e1e79a
JB
12512018-01-01 Joel Brobecker <brobecker@adacore.com>
1252
1253 * gdbreplay.c (gdbreplay_version): Update copyright year in
1254 version message.
1255 * server.c (gdbserver_version): Likewise.
1256
8e481c3b
TT
12572017-12-08 Tom Tromey <tom@tromey.com>
1258
1259 * ax.c (ax_printf): Update.
1260
a8806230
YQ
12612017-12-07 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1264 aarch64_linux_read_description.
1265 * linux-amd64-ipa.c (idx2mask): New array.
1266 (get_ipa_tdesc): Move idx2mask out.
1267 (initialize_low_tracepoint): Initialize target descriptions.
1268 * linux-i386-ipa.c (idx2mask): New array.
1269 (get_ipa_tdesc): Move idx2mask out.
1270 (initialize_low_tracepoint): Initialize target descriptions.
1271
d4a0e8b5
SM
12722017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1273
1274 * tdesc.c (struct tdesc_type): Change return type.
1275 (tdesc_add_flag): Change parameter type.
1276 (tdesc_add_bitfield): Likewise.
1277 (tdesc_add_field): Likewise.
1278 (tdesc_set_struct_size): Likewise.
1279
798a7429
SM
12802017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1281
1282 * regcache.c (registers_to_string): Remove unused variable.
1283
c0e15c9b
SM
12842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1285
1286 * inferiors.c (for_each_inferior_with_data): Remove.
1287 * inferiors.h (for_each_inferior_with_data): Remove.
1288 * server.c (handle_qxfer_threads_worker): Change parameter type.
1289 (handle_qxfer_threads_proper): Use for_each_thread.
1290
f0045347
SM
12912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1292
1293 * inferiors.c (for_each_inferior): Remove.
1294 (clear_inferiors): Use for_each_thread.
1295 * inferiors.h (for_each_inferior): Remove.
1296 * linux-low.c (linux_wait_for_event_filtered): Use
1297 for_each_thread.
1298 (linux_stabilize_threads): Likewise.
1299 * regcache.c (regcache_release): Likewise.
1300 * server.c (gdb_wants_all_threads_stopped): Likewise.
1301 (clear_pending_status_callback): Remove.
1302 (handle_status): Use for_each_thread.
1303 (captured_main): Likewise.
1304 * win32-low.c (child_init_thread_list): Likewise.
1305 (win32_clear_inferiors): Likewise.
1306 (fake_breakpoint_event): Likewise.
1307
9521758b
SM
13082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1309
1310 * inferiors.h (find_inferior): Remove.
1311 * inferiors.c (find_inferior): Remove.
1312
8f86d7aa
SM
13132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1314
1315 * linux-low.c (resume_status_pending_p): Update comment.
1316 (need_step_over_p): Update comment.
1317
e2b44075
SM
13182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1319
1320 * linux-low.c (proceed_one_lwp): Return void, change parameter
1321 type.
1322 (unsuspend_and_proceed_one_lwp): Likewise.
1323 (proceed_all_lwps): Use for_each_thread.
1324 (unstop_all_lwps): Likewise.
1325
c80825ff
SM
13262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1327
1328 * linux-low.c (linux_resume_one_thread): Return void, take
1329 parameter directly.
1330 (linux_resume): Use for_each_thread.
1331
df3e4dbe
SM
13322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1333
1334 * linux-low.c (send_sigstop_callback): Return void, change
1335 parameter type. Rename to...
1336 (send_sigstop): ... this.
1337 (suspend_and_send_sigstop_callback): Return void, change parameter
1338 type. Rename to...
1339 (suspend_and_send_sigstop): ... this.
1340 (stop_all_lwps): Use for_each_thread.
1341
5a6b0a41
SM
13422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1343
1344 * linux-low.c (lwp_running): Return bool, remove unused
1345 argument.
1346 (linux_stabilize_threads): Use find_thread.
1347
39a64da5
SM
13482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1349
1350 * linux-low.c (select_singlestep_lwp_callback): Remove.
1351 (count_events_callback): Remove.
1352 (select_event_lwp_callback): Remove.
1353 (select_event_lwp): Use find_thread/for_each_thread.
1354
a1385b7b
SM
13552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1356
1357 * linux-low.c (not_stopped_callback): Return bool, take filter
1358 argument directly.
1359 (linux_wait_for_event_filtered): Use find_thread.
1360 (linux_wait_1): Likewise.
1361
454296a2
SM
13622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1363
1364 * linux-low.c (same_lwp): Remove.
1365 (find_lwp_pid): Use find_thread.
1366
6b2a85da
SM
13672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1368
1369 * linux-low.c (delete_lwp_callback): Remove.
1370 (linux_mourn): Use for_each_thread.
1371
798a38e8
SM
13722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1375 args parameter, don't check for pid.
1376 (linux_detach): Use for_each_thread.
1377
e4eb0dec
SM
13782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1379
1380 * linux-low.c (struct counter): Remove.
1381 (second_thread_of_pid_p): Remove.
1382 (last_thread_of_process_p): Use find_thread.
1383
83e1b6c1
SM
13842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1385
1386 * inferiors.c (find_inferior_in_random): Remove.
1387 * inferiors.h (find_inferior_in_random): Remove.
1388 * linux-low.c (status_pending_p_callback): Return bool, accept
1389 parameter ptid directly.
1390 (linux_wait_for_event_filtered): Use find_thread_in_random.
1391 (linux_wait_1): Likewise.
1392
8dc7b443
SM
13932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1394
1395 * inferiors.c (find_inferior_id): Remove.
1396 (find_thread_ptid): Move implemention from find_inferior_id to
1397 here.
1398 * inferiors.h (find_inferior_id): Remove.
1399 * server.c (handle_status): Use find_thread_ptid.
1400 (process_serial_event): Likewise.
1401 * thread-db.c (find_one_thread): Likewise.
1402 (thread_db_thread_handle): Likewise.
1403 * win32-low.c (thread_rec): Likewise.
1404 (child_delete_thread): Likewise.
1405 (win32_thread_alive): Likewise.
1406 (get_child_debug_event): Likewise.
1407
da25033c
SM
14082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1409
1410 * linux-mips-low.c (update_watch_registers_callback): Return
1411 void, remove pid_p parameter, don't check for pid.
1412 (mips_insert_point, mips_remove_point): Use for_each_thread.
1413
c91bb56b
SM
14142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1415
1416 * lynx.low (lynx_delete_thread_callback): Remove.
1417 (lynx_mourn): Use for_each_thread.
1418
634a3254
SM
14192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1420
1421 * regcache.c (regcache_invalidate_one): Remove.
1422 (regcache_invalidate_pid): use for_each_thread.
1423
41272101
TT
14242017-11-26 Tom Tromey <tom@tromey.com>
1425
1426 * linux-low.c (linux_create_inferior): Update.
1427
f5291a6f
UW
14282017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1429
1430 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1431
6654d750
AH
14322017-11-24 Alan Hayward <alan.hayward@arm.com>
1433
1434 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1435 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1436 * linux-aarch64-tdesc-selftest.c: New file.
1437 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1438
14392017-11-24 Alan Hayward <alan.hayward@arm.com>
1440
1441 * configure.srv: Add new file.
1442 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1443 * linux-aarch64-tdesc-selftest.c: New file.
1444 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1445
49bdb7ee
AH
14462017-11-24 Alan Hayward <alan.hayward@arm.com>
1447
1448 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1449 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1450 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1451
d6d7ce56
AH
14522017-11-24 Alan Hayward <alan.hayward@arm.com>
1453
1454 * configure.srv: Add new files.
1455 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1456 aarch64_linux_read_description.
1457 * linux-aarch64-low.c (aarch64_linux_read_description):
1458 Merge with aarch64_arch_setup.
1459 (aarch64_arch_setup): Call aarch64_linux_read_description.
1460 * linux-aarch64-tdesc.c: New file.
1461 * linux-aarch64-tdesc.h: New file.
1462
506fe5f4
YQ
14632017-11-24 Yao Qi <yao.qi@linaro.org>
1464
1465 * configure.srv: Set $srv_regobj for tic6x-linux.
1466 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1467 (tic6x_read_description): Move some code to tic6x_arch_setup.
1468 (tic6x_tdesc_test): New function.
1469 (initialize_low_arch): Call selftests::register_test.
1470
29f9a567
YQ
14712017-11-22 Yao Qi <yao.qi@linaro.org>
1472
1473 * remote-utils.c (prepare_resume_reply): Use memcpy.
1474
578290ec
SM
14752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1476
1477 * linux-low.c (kill_one_lwp_callback): Return void, take
1478 argument directly, don't filter on pid.
1479 (linux_kill): Use for_each_thread.
1480
eca55aec
SM
14812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * linux-low.c (need_step_over_p): Return bool, remove dummy
1484 argument.
1485 (linux_resume, proceed_all_lwps): Use find_thread.
1486
25c28b4d
SM
14872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1488
1489 * linux-low.c (resume_status_pending_p): Return bool, remove
1490 flag_p argument.
1491 (linux_resume): Use find_thread.
1492
5fdda392
SM
14932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1494
1495 * linux-low.c (struct thread_resume_array): Remove.
1496 (linux_set_resume_request): Return void, take arguments
1497 directly.
1498 (linux_resume): Use for_each_thread.
1499
fcb056a5
SM
15002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1503 return bool, remove data argument.
1504 (linux_stabilize_threads): Use find_thread.
1505
139720c5
SM
15062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1507
1508 * linux-low.c (unsuspend_one_lwp): Remove.
1509 (unsuspend_all_lwps): Use for_each_thread, inline code from
1510 unsuspend_one_lwp.
1511
6d1e5673
SM
15122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1513
1514 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1515 * linux-low.c (struct iterate_over_lwps_args): Remove.
1516 (iterate_over_lwps_filter): Remove.
1517 (iterate_over_lwps): Use find_thread.
1518
bbf550d5
SM
15192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1520
1521 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1522 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1523 code from reset_lwp_ptrace_options_callback.
1524
00192f77
SM
15252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * linux-arm-low.c (struct update_registers_data): Remove.
1528 (update_registers_callback): Return void, take arguments
1529 directly, don't check thread's pid.
1530 (arm_insert_point, arm_remove_point): Use for_each_thread.
1531
2bee2b6c
SM
15322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1533
1534 * win32-low.c (continue_one_thread): Return void, take argument
1535 directly.
1536 (child_continue): Use for_each_thread.
1537
0b360f19
SM
15382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1539
1540 * win32-i386-low.c (update_debug_registers_callback): Rename
1541 to ...
1542 (update_debug_registers): ... this, return void, remove pid_p arg.
1543 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1544
f27866ba
SM
15452017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1546
1547 * inferiors.h (struct process_info): Add constructor, initialize
1548 fields..
1549 <syscalls_to_catch>: Change type to std::vector<int>.
1550 * inferiors.c (add_process): Allocate process_info with new.
1551 (remove_process): Free process_info with delete.
1552 * linux-low.c (handle_extended_wait): Adjust.
1553 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1554 * server.c (handle_general_set): Adjust.
1555
e849ea89
PA
15562017-11-16 Pedro Alves <palves@redhat.com>
1557
1558 * remote-utils.c (remote_close): Block SIGIO signals instead of
1559 uninstalling the SIGIO handler.
1560
1d0aa65c
AH
15612017-11-16 Alan Hayward <alan.hayward@arm.com>
1562
1563 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1564
3491a34c
YQ
15652017-11-16 Yao Qi <yao.qi@linaro.org>
1566
1567 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1568 (tic6x_store_gregset): Likewise.
1569 (tic6x_usrregs_info): Move it up.
1570
a602f924
AH
15712017-11-15 Alan Hayward <alan.hayward@arm.com>
1572
1573 * Makefile.in: Update arch rules.
1574 * configure.srv: Explicitly mark arch/ files.
1575
5616b6c3
AS
15762017-11-13 Andreas Schwab <schwab@suse.de>
1577
1578 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1579 function.
1580 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1581
d1928160
PA
15822017-11-06 Pedro Alves <palves@redhat.com>
1583
1584 * config.in, configure: Regenerate.
1585
bac608e7
SM
15862017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1587
1588 * target.c (struct thread_search): Remove.
1589 (thread_search_callback): Remove.
1590 (prepare_to_access_memory): Use for_each_thread instead of
1591 find_inferior. Inline code from thread_search_callback.
1592
eaddb425
SM
15932017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1594
1595 * server.c (struct visit_actioned_threads_data): Remove.
1596 (visit_actioned_threads): Change prototype to take arguments
1597 directly.
1598 (resume): Use find_thread instead of find_inferior.
1599
99078d34
SM
16002017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1601
1602 * server.c (queue_stop_reply_callback): Change prototype, return
1603 void.
1604 (find_status_pending_thread_callback): Remove.
1605 (handle_status): Replace find_inferior with find_thread and
1606 for_each_thread.
1607
cc628f3d
AH
16082017-10-25 Alan Hayward <alan.hayward@arm.com>
1609
1610 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1611 with REGNO.
1612 (aarch64_store_gregset): Likewise.
1613 (aarch64_fill_fpregset): Likewise.
1614 (aarch64_store_fpregset): Likewise.
1615
4d3bb80e
SM
16162017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1617
1618 * gdbthread.h (find_thread, for_each_thread): New functions.
1619 * inferiors.c (thread_of_pid): Remove.
1620 (find_any_thread_of_pid): Use find_thread.
1621 * linux-low.c (num_lwps): Use for_each_thread.
1622
7a7cdfa0
YQ
16232017-10-17 Yao Qi <yao.qi@linaro.org>
1624
1625 * Makefile.in: Remove one rule.
1626 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1627
e675d170
YQ
16282017-10-17 Yao Qi <yao.qi@linaro.org>
1629
1630 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1631 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1632
7eb4e0f9
YQ
16332017-10-17 Yao Qi <yao.qi@linaro.org>
1634
1635 * configure.srv: Rename arm.o with arch/arm.o.
1636
60d6cfc9
YQ
16372017-10-17 Yao Qi <yao.qi@linaro.org>
1638
1639 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1640 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1641 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1642 (arch-i386.o, arch-amd64.o): Remove rules.
1643 (arch/%.o): New rule.
1644 Update POSTCOMPILE and COMPILE.pre.
1645 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1646 * configure: Re-generated.
1647 * configure.srv: Replace arch-i386.o with arch/i386.o.
1648 Replace arch-amd64.o with arch/amd64.o.
1649
5bfda255
YQ
16502017-10-16 Yao Qi <yao.qi@linaro.org>
1651
1652 * configure: Regenerated.
1653
9c80ecd6
SM
16542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1655
1656 * inferiors.h: (struct inferior_list): Remove.
1657 (struct inferior_list_entry); Remove.
1658 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1659 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1660 get_first_inferior): Remove.
1661 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1662 find_inferior_id, find_inferior_in_random): Change signature.
1663 * inferiors.c (all_threads): Change type to
1664 std::list<thread_info *>.
1665 (get_thread): Remove macro.
1666 (find_inferior, find_inferior_id): Change signature, implement
1667 using find_thread.
1668 (find_inferior_in_random): Change signature, implement using
1669 find_thread_in_random.
1670 (for_each_inferior, for_each_inferior_with_data): Change
1671 signature, implement using for_each_thread.
1672 (add_inferior_to_list, remove_inferior): Remove.
1673 (add_thread, get_first_thread, thread_of_pid,
1674 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1675 (get_first_inferior, one_inferior_p, clear_inferior_list):
1676 Remove.
1677 (clear_inferiors, get_thread_process): Update.
1678 * gdbthread.h: Include <list>.
1679 (struct thread_info) <entry>: Remove field.
1680 <id>: New field.
1681 (all_threads): Change type to std::list<thread_info *>.
1682 (get_first_inferior): Add doc.
1683 (find_thread, for_each_thread, find_thread_in_random): New
1684 functions.
1685 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1686 * linux-arm-low.c (update_registers_callback): Update.
1687 * linux-low.c (second_thread_of_pid_p): Update.
1688 (kill_one_lwp_callback, linux_detach_lwp_callback,
1689 delete_lwp_callback, status_pending_p_callback, same_lwp,
1690 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1691 iterate_over_lwps, not_stopped_callback,
1692 resume_stopped_resumed_lwps, count_events_callback,
1693 select_singlestep_lwp_callback, select_event_lwp_callback,
1694 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1695 suspend_and_send_sigstop_callback, wait_for_sigstop,
1696 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1697 lwp_running, linux_set_resume_request, resume_status_pending_p,
1698 need_step_over_p, start_step_over, linux_resume_one_thread,
1699 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1700 reset_lwp_ptrace_options_callback): Update.
1701 * linux-mips-low.c (update_watch_registers_callback): Update.
1702 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1703 Update.
1704 (free_register_cache_thread_one): Remove.
1705 (regcache_release): Update.
1706 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1707 handle_qxfer_threads_worker): Update.
1708 (handle_query): Update, use list iterator.
1709 (visit_actioned_threads, handle_pending_status,
1710 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1711 clear_pending_status_callback, set_pending_status_callback,
1712 find_status_pending_thread_callback, handle_status,
1713 process_serial_event): Update.
1714 * target.c (thread_search_callback): Update.
1715 * thread-db.c (thread_db_get_tls_address): Update.
1716 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1717 Update.
1718 * win32-i386-low.c (update_debug_registers_callback): Update.
1719 * win32-low.c (delete_thread_info, child_delete_thread,
1720 continue_one_thread, suspend_one_thread,
1721 get_child_debug_event): Adjust.
1722
9179355e
SM
17232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1724
1725 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1726 * inferiors.h: Include <list>.
1727 (struct process_info) <entry>: Remove field.
1728 <pid>: New field.
1729 (pid_of): Change macro to function.
1730 (ptid_of, lwpid_of): Remove macro.
1731 (all_processes): Change type to std::list<process_info *>.
1732 (ALL_PROCESSES): Remove macro.
1733 (for_each_process, find_process): New function.
1734 * inferiors.c (all_processes): Change type to
1735 std::list<process_info *>.
1736 (find_thread_process): Adjust.
1737 (add_process): Likewise.
1738 (remove_process): Likewise.
1739 (find_process_pid): Likewise.
1740 (get_first_process): Likewise.
1741 (started_inferior_callback): Remove.
1742 (have_started_inferiors_p): Adjust.
1743 (attached_inferior_callback): Remove.
1744 (have_attached_inferiors_p): Adjust.
1745 * linux-low.c (check_zombie_leaders): Likewise.
1746 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1747 (x86_linux_update_xmltarget): Adjust.
1748 * server.c (handle_query): Likewise.
1749 (gdb_reattached_process): Remove.
1750 (handle_status): Adjust.
1751 (kill_inferior_callback): Likewise.
1752 (detach_or_kill_inferior): Remove.
1753 (print_started_pid): Likewise.
1754 (print_attached_pid): Likewise.
1755 (detach_or_kill_for_exit): Update.
1756 (process_serial_event): Likewise.
1757 * linux-arm-low.c (arm_new_fork): Likewise.
1758
c9cb8905
SM
17592017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1760
1761 * dll.h: Include <list>.
1762 (struct dll_info): Add constructor.
1763 <entry>: Remove field.
1764 (all_dlls): Change type to std::list<dll_info>.
1765 * dll.c: Include <algorithm>.
1766 (get_dll): Remove macro.
1767 (all_dlls): Change type to std::list<dll_info *>.
1768 (free_one_dll): Remove.
1769 (match_dll): Likewise.
1770 (loaded_dll): Adjust.
1771 (unloaded_dll): Adjust to all_dlls type change, use
1772 std::find_if. Inline code from match_dll.
1773 (clear_dlls): Adjust to all_dlls type change.
1774 * server.c (emit_dll_description): Remove.
1775 (handle_qxfer_libraries): Adjust to all_dlls type change,
1776 integrate emit_dll_description's functionality.
1777
04ec7890
SM
17782017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1779
1780 * linux-low.h (struct linux_target_ops) <delete_process>: New
1781 field.
1782 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1783 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1784 (struct linux_target_ops): Add delete_process callback.
1785 * linux-arm-low.c (arm_delete_process): New.
1786 (struct linux_target_ops): Add delete_process callback.
1787 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1788 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1789 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1790 * linux-mips-low.c (mips_linux_delete_process): New.
1791 (struct linux_target_ops): Add delete_process callback.
1792 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1793 * linux-s390-low.c (struct linux_target_ops): Likewise.
1794 * linux-sh-low.c (struct linux_target_ops): Likewise.
1795 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1796 * linux-tile-low.c (struct linux_target_ops): Likewise.
1797 * linux-x86-low.c (x86_linux_delete_process): New.
1798 (struct linux_target_ops): Add delete_process callback.
1799 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1800
466eecee
SM
18012017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1802
1803 * linux-aarch64-low.c (the_low_target): Add thread delete
1804 callback.
1805 * linux-arm-low.c (arm_delete_thread): New function.
1806 (the_low_target): Add thread delete callback.
1807 * linux-bfin-low.c (the_low_target): Likewise.
1808 * linux-crisv32-low.c (the_low_target): Likewise.
1809 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1810 set.
1811 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1812 field.
1813 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1814 * linux-mips-low.c (mips_linux_delete_thread): New function.
1815 (the_low_target): Add thread delete callback.
1816 * linux-ppc-low.c (the_low_target): Likewise.
1817 * linux-s390-low.c (the_low_target): Likewise.
1818 * linux-sh-low.c (the_low_target): Likewise.
1819 * linux-tic6x-low.c (the_low_target): Likewise.
1820 * linux-tile-low.c (the_low_target): Likewise.
1821 * linux-x86-low.c (the_low_target): Likewise.
1822 * linux-xtensa-low.c (the_low_target): Likewise.
1823
b79f7801
YZ
18242017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1825
1826 * win32-low.c: Include "common-inferior.h".
1827
bc3b087d
SDJ
18282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1829
1830 * inferiors.c (set_inferior_cwd): New function.
1831 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1832 (handle_query): Inform that QSetWorkingDir is supported.
1833 * win32-low.c (create_process): Pass the inferior's cwd to
1834 CreateProcess.
1835
d092c5a2
SDJ
18362017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1837
1838 * inferiors.c (current_inferior_cwd): New global variable.
1839 (get_inferior_cwd): New function.
1840 * inferiors.h (struct process_info) <cwd>: New field.
1841
7da0a886
SDJ
18422017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1843
1844 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1845 (OBS): Add gdb_tilde_expand.o.
1846
289a6840
SM
18472017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1848
1849 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1850 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1851
256642e8
PA
18522017-09-29 Pedro Alves <palves@redhat.com>
1853
1854 * ax.c (gdb_parse_agent_expr): Constify.
1855 * ax.h (gdb_parse_agent_expr): Constify.
1856 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1857 Constify.
1858 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1859 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1860 * remote-utils.h (read_ptid): Constify.
1861 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1862 (process_point_options, process_serial_event): Constify.
1863 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1864 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1865 (cmd_qtbuffer): Constify.
1866
5b9ca4d4
PA
18672017-09-29 Pedro Alves <palves@redhat.com>
1868
1869 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1870 fails.
1871
94c207e0
PA
18722017-09-29 Pedro Alves <palves@redhat.com>
1873
1874 * linux-low.c (handle_extended_wait): Pass parent thread instead
1875 of process to thread_db_notice_clone.
1876 * linux-low.h (thread_db_notice_clone): Replace parent process
1877 parameter with parent thread parameter.
1878 * thread-db.c (find_one_thread): Add comment.
1879 (thread_db_notice_clone): Replace parent process parameter with
1880 parent thread parameter. Temporarily switch to the parent thread.
1881
75352e28
SDJ
18822017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1883
1884 * gdbthread.h: Include "common-gdbthread.h".
1885 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1886 "if" when validating the ptid.
1887 * remote-utils.c: Include "gdbthread.h".
1888 (prepare_resume_reply): Use "switch_to_thread".
1889 * target.c (done_accessing_memory): Likewise.
1890
ad339634
AA
18912017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1892
1893 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1894 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1895 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1896 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1897 s390x-gs-linux64-ipa.o to ipa_obj.
1898 * linux-s390-low.c (HWCAP_S390_GS): New define.
1899 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1900 New functions.
1901 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1902 (s390_arch_setup): Check for guarded-storage support and choose
1903 appropriate tdesc.
1904 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1905 init_registers_s390x_gs_linux64.
1906 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1907 enum value.
1908 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1909 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1910
cc4d742f
SM
19112017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1914
f6327dcb
KB
19152017-09-21 Kevin Buettner <kevinb@redhat.com>
1916
1917 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1918 (thread_db_thread_handle): Declare.
1919 * linux-low.c (linux_target_ops): Initialize thread_handle.
1920 * server.c (handle_qxfer_threads_worker): Add support for
1921 "handle" attribute.
1922 * target.h (struct target_ops): Add new function pointer,
1923 thread_handle.
1924 (target_thread_handle): Define.
1925 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1926 field in lwp.
1927 (thread_db_thread_handle): New function.
1928
86299109
KB
19292017-09-21 Kevin Buettner <kevinb@redhat.com>
1930
1931 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1932 * linux-low.h (thread_db_notice_clone): Declare.
1933 * thread-db.c (thread_db_notice_clone): New function.
1934
f557a88a
PA
19352017-09-21 Pedro Alves <palves@redhat.com>
1936
1937 * server.c (gdb_read_memory, handle_status, process_serial_event)
1938 (handle_serial_event, handle_target_event): Adjust to
1939 set_desired_thread prototype change.
1940 * target.c (set_desired_thread): Remove 'use_general' parameter
1941 and adjust.
1942 * target.h (set_desired_thread): Remove 'use_general' parameter.
1943
223ffa71
TT
19442017-09-20 Tom Tromey <tom@tromey.com>
1945
1946 * target.c (target_terminal::terminal_state): Define.
1947 (target_terminal::init): Rename from target_terminal_init.
1948 (target_terminal::inferior): Rename from
1949 target_terminal_inferior.
1950 (target_terminal::ours): Rename from target_terminal_ours.
1951 (target_terminal::ours_for_output, target_terminal::info): New.
1952
04fd3ba9
SM
19532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1954
1955 * server.c (accumulate_file_name_length): Remove.
1956 (emit_dll_description): Adjust to std::string change.
1957 (handle_qxfer_libraries): Use std::string to hold document.
1958
5e187554
SM
19592017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1960
1961 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1962 return type of xml_escape_text.
1963 * server.c (emit_dll_description): Likewise.
1964
1526853e
SM
19652017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1966
1967 * server.c (captured_main): Accept argument for --selftest.
1968 Update run_tests call.
1969 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1970 when registering selftests.
1971
c4dfafab
SDJ
19722017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1973
1974 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1975 instead of "VEC" for "target_desc.reg_defs".
1976 (regcache_cpy): Likewise.
1977 (registers_to_string): Likewise.
1978 (registers_from_string): Likewise.
1979 (find_regno): Likewise.
1980 (supply_regblock): Likewise.
1981 (regcache_raw_read_unsigned): Likewise.
1982 * tdesc.c (init_target_desc): Likewise.
1983 (tdesc_create_reg): Likewise.
1984 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1985 (struct target_desc) <reg_defs>: Convert to "std::vector".
1986 (target_desc): Do not initialize "reg_defs".
1987 (~target_desc): Update code to use "std::vector" instead of "VEC"
1988 for "target_desc.reg_defs".
1989 (operator==): Likewise.
1990
124aceb4
SM
19912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1992
1993 * inferiors.h (thread_to_gdb_id): Remove.
1994 * inferiors.c (thread_to_gdb_id): Remove.
1995 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1996 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1997 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1998 Likewise.
1999 * nto-low.c (nto_fetch_registers, nto_store_registers,
2000 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2001
96cde54f
SM
20022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2003
2004 * inferiors.h (gdb_id_to_thread_id): Remove.
2005 * inferiors.c (gdb_id_to_thread_id): Remove.
2006 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2007 removal. Move pid declaration closer to where it's used.
2008
e8ca139e
SM
20092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2010
2011 * server.c (handle_detach): New function.
2012 (process_serial_event): Move code out, call handle_detach.
2013
f8a4e119
SM
20142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2015
2016 * server.c (require_running): Rename to ...
2017 (require_running_or_return): ... this ...
2018 (require_running_or_break): ... and this.
2019 (handle_query, process_serial_event): Adjust.
2020
0eb0a407
SM
20212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2022
2023 * linux-low.c (linux_set_resume_request): Remove unused
2024 variables.
2025
785922a5
SM
20262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2027
2028 * server.c (first_thread_of): Remove.
2029 (process_serial_event): Replace usage of first_thread_of with
2030 find_any_thread_of_pid.
2031 * tracepoint.c (same_process_p): Remove.
2032 (gdb_agent_about_to_close): Replace usage of same_process_p with
2033 find_any_thread_of_pid.
2034 * linux-x86-low.c (same_process_callback): Remove.
2035 (x86_arch_setup_process_callback): Replace usage of
2036 same_process_callback with find_any_thread_of_pid.
2037 * thread-db.c (any_thread_of): Remove.
2038 (switch_to_process): Replace usage of any_thread_of with
2039 find_any_thread_of_pid.
2040 * inferiors.c (thread_pid_matches_callback): Remove.
2041 (find_thread_process): Adjust to use find_any_thread_of_pid.
2042
a059f00c
SDJ
20432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2044
2045 * regcache.c (get_thread_regcache): Guard calls to "memset"
2046 with "!VEC_empty".
2047
cc397f3a
SDJ
20482017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2049
2050 * linux-low.c (handle_extended_wait): Use
2051 "allocate_target_description" instead of "XNEW".
2052 * linux-x86-low.c (initialize_low_arch): Likewise.
2053
22916b07
YQ
20542017-09-05 Yao Qi <yao.qi@linaro.org>
2055
2056 * configure.srv (srv_i386_regobj): Remove.
2057 (srv_amd64_regobj): Remove.
2058 (srv_regobj): Set it to "" for x86 non-linux targets.
2059 * linux-x86-tdesc.c (i386_linux_read_description):
2060 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2061 (init_registers_i386): Remove the declaration.
2062 (tdesc_i386): Remove the declaration.
2063 (lynx_i386_arch_setup): Call i386_create_target_description.
2064 * nto-x86-low.c: Likewise.
2065 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2066 [!__x86_64__]: include arch/i386.h.
2067 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2068
38602d55
YQ
20692017-09-05 Yao Qi <yao.qi@linaro.org>
2070
2071 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2072 i386/amd64-XXX-linux from it.
2073
44b886ff
YQ
20742017-09-05 Yao Qi <yao.qi@linaro.org>
2075
2076 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2077 false.
2078 (ipa_amd64_linux_regobj): Remove.
2079 (ipa_x32_linux_regobj): Remove.
2080
b4570e4b
YQ
20812017-09-05 Yao Qi <yao.qi@linaro.org>
2082
2083 * Makefile.in (arch-amd64.o): New rule.
2084 * configure.srv: Append arch-amd64.o.
2085 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2086 (get_ipa_tdesc): Call amd64_linux_read_description.
2087 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2088 and init_registers_amd64_XXX.
2089 * linux-x86-low.c (x86_linux_read_description): Call
2090 amd64_linux_read_description.
2091 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2092 (initialize_low_arch): Don't call init_registers_x32_XXX and
2093 init_registers_amd64_XXX.
2094 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2095 and tdesc_amd64_XXX.
2096 [__x86_64__] (amd64_tdesc_test): New function.
2097 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2098 and init_registers_amd64_XXX.
2099 * linux-x86-tdesc.c: Include arch/amd64.h.
2100 (xcr0_to_tdesc_idx): New function.
2101 (i386_linux_read_description): New function.
2102 (amd64_get_ipa_tdesc_idx): New function.
2103 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2104 (amd64_get_ipa_tdesc): Declare.
2105
d1f28ea2
YQ
21062017-09-05 Yao Qi <yao.qi@linaro.org>
2107
2108 * configure.srv (srv_i386_linux_xmlfiles): Remove
2109 i386/i386-XXX-linux.xml from it.
2110
25a93583
YQ
21112017-09-05 Yao Qi <yao.qi@linaro.org>
2112
2113 * configure.srv: Set srv_i386_linux_regobj empty if $development
2114 is false.
2115 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2116 initialize_low_tdesc.
2117 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2118 with #if initialize_low_tdesc.
2119 * linux-x86-tdesc-selftest.c: New file.
2120 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2121
5f035c07
YQ
21222017-09-05 Yao Qi <yao.qi@linaro.org>
2123
2124 * Makefile.in (arch-i386.o): New rule.
2125 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2126 (x86_64-*-linux*): Likewise.
2127 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2128 include arch/i386.h.
2129 (i386_linux_read_description): Remove code and call
2130 i386_create_target_description.
2131 * tdesc.c (allocate_target_description): New function.
2132 * tdesc.h (set_tdesc_architecture): Remove declaration.
2133 (set_tdesc_osabi): Likewise.
2134
0abe8a89
YQ
21352017-09-05 Yao Qi <yao.qi@linaro.org>
2136
2137 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2138 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2139 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2140 .xmltarget.
2141 * server.c (get_features_xml): Call tdesc_get_features_xml.
2142 * tdesc.c (set_tdesc_architecture): New function.
2143 (set_tdesc_osabi): New function.
2144 (tdesc_get_features_xml): New function.
2145 (tdesc_create_feature): Add an argument.
2146 * tdesc.h (struct target_desc) <features>: New field.
2147 <arch, osabi>: New field.
2148 (~target_desc): xfree features, arch, and osabi.
2149 (target_desc::oerator==): Don't compare .xmltarget.
2150 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2151 (set_tdesc_osabi): Likewise.
2152 (tdesc_get_features_xml): Likewise.
2153
0a188386
YQ
21542017-09-05 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-x86-tdesc.c: Include selftest.h.
2157 (i386_tdesc_test): New function.
2158 (initialize_low_tdesc): Call selftests::register_test.
2159 * tdesc.h: Include regdef.h.
2160 (target_desc): Override operator == and !=.
2161
f49ff000
YQ
21622017-09-05 Yao Qi <yao.qi@linaro.org>
2163
2164 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2165 (ipa_obj): Likewise.
2166 * linux-i386-ipa.c: Include common/x86-xstate.h
2167 (get_ipa_tdesc): Call i386_linux_read_description.
2168 (initialize_low_tracepoint): Don't call init_registers_XXX
2169 functions, call initialize_low_tdesc instead.
2170 * linux-x86-low.c (x86_linux_read_description): Call
2171 i386_linux_read_description.
2172 (initialize_low_arch): Don't call init_registers_i386_XXX
2173 functions, call initialize_low_tdesc.
2174 * linux-x86-tdesc.c: New file.
2175 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2176 (i386_get_ipa_tdesc_idx): Declare.
2177 (i386_get_ipa_tdesc): Declare.
2178 (initialize_low_tdesc): Declare.
2179
2b68ef2f
YQ
21802017-09-05 Yao Qi <yao.qi@linaro.org>
2181
2182 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2183 instead of 0.
2184
f7000548
YQ
21852017-09-05 Yao Qi <yao.qi@linaro.org>
2186
2187 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2188 * regcache.c (get_thread_regcache): Use VEC_length.
2189 (init_register_cache): Likewise.
2190 (regcache_cpy): Likewise.
2191 (registers_to_string): Iterate reg_defs via VEC_iterate.
2192 (find_regno): Likewise.
2193 (find_register_by_number): Use VEC_index.
2194 (register_size): Call find_register_by_number.
2195 (register_data): Call find_register_by_number.
2196 (supply_regblock): Use VEC_length.
2197 (regcache_raw_read_unsigned): Likewise.
2198 * tdesc.c (init_target_desc): Iterate reg_defs via
2199 VEC_iterate.
2200 (default_description): Update initializer.
2201 (copy_target_description): Don't update field num_registers.
2202 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2203 <num_registers>: Remove.
2204
50a421ac
SM
22052017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2206
2207 * Makefile.in (.SECONDARY): Define target.
2208
23fdd69e
SM
22092017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2210
2211 * linux-low.c (linux_wait_1): Adjust.
2212 * server.c (queue_stop_reply_callback): Adjust.
2213
0a2dde4a
SDJ
22142017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2215
2216 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2217 QEnvironmentUnset and QEnvironmentReset packets.
2218 (handle_query): Inform remote that QEnvironmentHexEncoded,
2219 QEnvironmentUnset and QEnvironmentReset are supported.
2220
6afd337d
SM
22212017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2222
2223 * inferiors.h (inferior_target_data): Rename to ...
2224 (thread_target_data): ... this.
2225 (inferior_regcache_data): Rename to ...
2226 (thread_regcache_data): ... this.
2227 (set_inferior_regcache_data): Rename to ...
2228 (set_thread_regcache_data): ... this.
2229 * inferiors.c (inferior_target_data): Rename to ...
2230 (thread_target_data): ... this.
2231 (inferior_regcache_data): Rename to ...
2232 (thread_regcache_data): ... this.
2233 (set_inferior_regcache_data): Rename to ...
2234 (set_thread_regcache_data): ... this.
2235 (free_one_thread): Update.
2236 * linux-low.h (get_thread_lwp): Update.
2237 * regcache.c (get_thread_regcache): Update.
2238 (regcache_invalidate_thread): Update.
2239 (free_register_cache_thread): Update.
2240 * win32-i386-low.c (update_debug_registers_callback): Update.
2241 (win32_get_current_dr): Update.
2242 * win32-low.c (thread_rec): Update.
2243 (delete_thread_info): Update.
2244 (continue_one_thread): Update.
2245 (suspend_one_thread): Update.
2246
a160cc46
SM
22472017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2248
2249 * inferiors.c (set_inferior_target_data): Remove.
2250 * inferiors.h (set_inferior_target_data): Remove.
2251
6d580b63
YQ
22522017-08-18 Yao Qi <yao.qi@linaro.org>
2253
2254 * Makefile.in (OBS): Add selftest.o.
2255 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2256 * configure, config.in: Re-generated.
2257 * server.c: Include common/sefltest.h.
2258 (captured_main): Handle option --selftest.
2259
f5a29eb0
YQ
22602017-08-09 Yao Qi <yao.qi@linaro.org>
2261
2262 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2263 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2264 i386-avx-mpx.o and i386-mmx.o.
2265 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2266 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2267 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2268 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2269 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2270 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2271 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2272 i386/amd64-avx-mpx.xml.
2273
57757c2f
YQ
22742017-08-09 Yao Qi <yao.qi@linaro.org>
2275
2276 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2277 and x32-avx-avx512.o.
2278 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2279 i386/x32-avx-avx512.xml.
2280
229d26fc
SM
22812017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * tracepoint.h (enum class fast_tpoint_collect_result): New
2284 enumeration.
2285 (fast_tracepoint_collecting): Change return type to
2286 fast_tpoint_collect_result.
2287 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2288 * linux-low.h: Include tracepoint.h.
2289 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2290 fast_tpoint_collect_result.
2291 * linux-low.c (handle_tracepoints): Adjust.
2292 (linux_fast_tracepoint_collecting): Change return type to
2293 fast_tpoint_collect_result.
2294 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2295 linux_wait_1, stuck_in_jump_pad_callback,
2296 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2297 proceed_one_lwp): Adjust to type change.
2298
2e1e43e1
YQ
22992017-07-10 Yao Qi <yao.qi@linaro.org>
2300
2301 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2302
adc764e7
YQ
23032017-06-29 Yao Qi <yao.qi@linaro.org>
2304
2305 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2306 Remove.
2307 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2308
a206891a
SM
23092017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2310
2311 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2312
9a6c7d9c
SDJ
23132017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2314
2315 * linux-low.c (linux_create_inferior): Adjust code to access the
2316 environment information via 'gdb_environ' class.
2317 * lynx-low.c (lynx_create_inferior): Likewise.
2318 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2319 (get_environ): Return a pointer to 'our_environ'.
2320 (captured_main): Initialize 'our_environ'.
2321 * server.h (get_environ): Adjust prototype.
2322 * spu-low.c (spu_create_inferior): Adjust code to access the
2323 environment information via 'gdb_environ' class.
2324
ae3e2ccf
SM
23252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2326
2327 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2328 usage of "register" keyword.
2329
3e019bdc
SM
23302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2331
2332 * configure: Re-generate.
2333
8465943a
SM
23342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2335
2336 * configure: Re-generate.
2337
cf0dd6f0
SM
23382017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2339
2340 * Makefile.in (COMPILE.pre): Add "-x c++".
2341
9845682b
SDJ
23422017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2343
2344 * fork-child.c: Conditionally include <signal.h>.
2345
aefd8b33
SDJ
23462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2347
2348 * server.c (handle_general_set): Handle new packet
2349 "QStartupWithShell".
2350 (handle_query): Add "QStartupWithShell" to the list of supported
2351 packets.
2352 (gdbserver_usage): Add help text explaining the
2353 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2354 options.
2355 (captured_main): Recognize and act upon the presence of the new
2356 CLI options.
2357
2090129c
SDJ
23582017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2359 Pedro Alves <palves@redhat.com>
2360
2361 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2362 * configure: Regenerate.
2363 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2364 "fork-inferior.o".
2365 (i[34567]86-*-lynxos*): Likewise.
2366 (spu*-*-*): Likewise.
2367 * fork-child.c: New file.
2368 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2369 and "environ.h".
2370 (linux_ptrace_fun): New function.
2371 (linux_create_inferior): Adjust function prototype to reflect
2372 change on "target.h". Adjust function code to use
2373 "fork_inferior".
2374 (linux_request_interrupt): Delete "signal_pid".
2375 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2376 (lynx_ptrace_fun): New function.
2377 (lynx_create_inferior): Adjust function prototype to reflect
2378 change on "target.h". Adjust function code to use
2379 "fork_inferior".
2380 * nto-low.c (nto_create_inferior): Adjust function prototype and
2381 code to reflect change on "target.h". Update comments.
2382 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2383 "common-terminal.h" and "environ.h".
2384 (terminal_fd): Moved to fork-child.c.
2385 (old_foreground_pgrp): Likewise.
2386 (restore_old_foreground_pgrp): Likewise.
2387 (last_status): Make it global.
2388 (last_ptid): Likewise.
2389 (our_environ): New variable.
2390 (startup_with_shell): Likewise.
2391 (program_name): Likewise.
2392 (program_argv): Rename to...
2393 (program_args): ...this.
2394 (wrapper_argv): New variable.
2395 (start_inferior): Delete function.
2396 (get_exec_wrapper): New function.
2397 (get_exec_file): Likewise.
2398 (get_environ): Likewise.
2399 (prefork_hook): Likewise.
2400 (post_fork_inferior): Likewise.
2401 (postfork_hook): Likewise.
2402 (postfork_child_hook): Likewise.
2403 (handle_v_run): Update code to deal with arguments coming from the
2404 remote host. Update calls from "start_inferior" to
2405 "create_inferior".
2406 (captured_main): Likewise. Initialize environment variable. Call
2407 "have_job_control".
2408 * server.h (post_fork_inferior): New prototype.
2409 (get_environ): Likewise.
2410 (last_status): Declare.
2411 (last_ptid): Likewise.
2412 (signal_pid): Likewise.
2413 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2414 (spu_ptrace_fun): New function.
2415 (spu_create_inferior): Adjust function prototype to reflect change
2416 on "target.h". Adjust function code to use "fork_inferior".
2417 * target.c (target_terminal_init): New function.
2418 (target_terminal_inferior): Likewise.
2419 (target_terminal_ours): Likewise.
2420 * target.h: Include <vector>.
2421 (struct target_ops) <create_inferior>: Update prototype.
2422 (create_inferior): Update macro.
2423 * utils.c (gdb_flush_out_err): New function.
2424 * win32-low.c (win32_create_inferior): Adjust function prototype
2425 and code to reflect change on "target.h".
2426
043a4934
SDJ
24272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2428
2429 * inferiors.c (switch_to_thread): New function.
2430
15652511
SDJ
24312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2432
2433 * Makefile.in (SFILE): Add "common/job-control.c".
2434 (OBS): Add "job-control.o".
2435
21ea5acd
SDJ
24362017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2437
2438 * Makefile: Remove "@host_makefile_frag@".
2439
e13cb306
PA
24402017-05-05 Pedro Alves <palves@redhat.com>
2441
2442 * configure: Regenerate.
2443
c94fee56
SDJ
24442017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2445
2446 * configure: Regenerate.
2447
a0ff9e1a
SM
24482017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2449
2450 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2451 software_single_step change of return type to
2452 std::vector<CORE_ADDR>.
2453 * linux-low.c (install_software_single_step_breakpoints):
2454 Likewise.
2455 * linux-low.h (install_software_single_step_breakpoints):
2456 Likewise.
2457
be628ab8
SDJ
24582017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2459
2460 * remote-utils.c: Include "gdb_termios.h" instead of
2461 "terminal.h".
2462 * terminal.h: Delete file.
2463
7c5ded6a
SDJ
24642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2465
2466 * server.c: Include <vector>.
2467 <program_argv, wrapper_argv>: Convert to std::vector.
2468 (start_inferior): Rewrite function to use C++.
2469 (handle_v_run): Likewise. Update code that calculates the argv
2470 based on the vRun packet; use C++.
2471 (captured_main): Likewise.
2472
436252de
SM
24732017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2474
2475 * server.c (handle_v_cont): Initialize thread_resume::thread
2476 with null_ptid.
2477
9bf2a700
PA
24782017-04-05 Pedro Alves <palves@redhat.com>
2479
2480 * configure: Regenerate.
2481
a121b7c1
PA
24822017-04-05 Pedro Alves <palves@redhat.com>
2483
2484 * gdbreplay.c (sync_error): Constify.
2485 * linux-x86-low.c (push_opcode): Constify.
2486
21c8a587
PA
24872017-04-05 Pedro Alves <palves@redhat.com>
2488
2489 * win32-low.c (get_child_debug_event)
2490 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2491 Report TARGET_WAITKIND_SPURIOUS instead.
2492
fb32b4f7
PA
24932017-04-05 Pedro Alves <palves@redhat.com>
2494
2495 * remote-utils.c (remote_prepare, remote_open): Constify.
2496 * remote-utils.h (remote_prepare, remote_open): Constify.
2497 * server.c (captured_main): Constify 'port' handling.
2498
65dd1e59
SM
24992017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2500
2501 * Makefile.in (clean): Clear .deps.
2502
8fa5b777
SM
25032017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2504
2505 * .gitignore: Remove generated files, replace with wildcard.
2506 * (clean): Replace removal of generated files with wildcard.
2507 (version.c): Replace with...
2508 (version-generated.c): ...this.
2509 (xml-builtin.c): Replace with...
2510 (xml-builtin-generated.c): ...this.
2511 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2512 (%.c: *regformats*): Replace with...
2513 (%-generated.c: *regformats*): ...this.
2514
a12e714b
MF
25152017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2516
2517 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2518 (xtensa_fill_gregset): Call collect_register_by_name for
2519 threadptr register.
2520 (xtensa_store_gregset): Call supply_register_by_name for
2521 threadptr register.
2522
1a09b50a
MF
25232017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2524
2525 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2526 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2527 (xtensa_store_gregset): Call supply_register for all registers in
2528 a0_regnum..a0_regnum + C0_NREGS range.
2529
1a01e7c6
SM
25302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2531
2532 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2533 (ax-ipa.o: ax.c): Remove.
2534 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2535 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2536 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2537 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2538 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2539
36bc18a8
SM
25402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2541
2542 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2543 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2544 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2545 (errors-ipa.o: ../common/errors.c): Remove.
2546 (format-ipa.o: ../common/format.c): Remove.
2547 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2548
a8ebe3d5
SM
25492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2550
2551 * Makefile.in (%-ipa.o: %.c): New rule.
2552 (tracepoint-ipa.o: tracepoint.c): Remove.
2553 (utils-ipa.o: utils.c): Remove.
2554 (remote-utils-ipa.o: remote-utils.c): Remove.
2555 (regcache-ipa.o: regcache.c): Remove.
2556 (i386-linux-ipa.o: i386-linux.c): Remove.
2557 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2558 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2559 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2560 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2561 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2562 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2563 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2564 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2565 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2566 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2567 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2568 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2569 (aarch64-ipa.o: aarch64.c): Remove.
2570 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2571 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2572 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2573 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2574 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2575 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2576 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2577 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2578 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2579 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2580 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2581 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2582 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2583 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2584 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2585 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2586 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2587 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2588 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2589 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2590 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2591 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2592 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2593 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2594 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2595 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2596 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2597 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2598 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2599 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2600 (tdesc-ipa.o: tdesc.c): Remove.
2601 (x32-linux-ipa.o: x32-linux.c): Remove.
2602 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2603 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2604
50cfacb7
SM
26052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2606
2607 * Makefile.in (%.o: ../arch/%.c): New rule.
2608 (arm.o: ../arch/arm.c): Remove.
2609 (arm-linux.o: ../arch/arm-linux.c): Remove.
2610 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2611 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2612
c5a22423
SM
26132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2614
2615 * Makefile.in (%.o: ../nat/%.c): New rule.
2616 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2617 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2618 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2619 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2620 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2621 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2622 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2623 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2624 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2625 (linux-personality.o: ../nat/linux-personality.c): Remove.
2626 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2627 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2628 (x86-linux.o: ../nat/x86-linux.c): Remove.
2629 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2630 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2631
6bda016b
SM
26322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2633
2634 * Makefile.in (%.o: ../common/%.c): New rule.
2635 (signals.o: ../common/signals.c): Remove.
2636 (print-utils.o: ../common/print-utils.c): Remove.
2637 (rsp-low.o: ../common/rsp-low.c): Remove.
2638 (common-utils.o: ../common/common-utils.c): Remove.
2639 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2640 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2641 (vec.o: ../common/vec.c): Remove.
2642 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2643 (xml-utils.o: ../common/xml-utils.c): Remove.
2644 (ptid.o: ../common/ptid.c): Remove.
2645 (buffer.o: ../common/buffer.c): Remove.
2646 (format.o: ../common/format.c): Remove.
2647 (filestuff.o: ../common/filestuff.c): Remove.
2648 (agent.o: ../common/agent.c): Remove.
2649 (errors.o: ../common/errors.c): Remove.
2650 (environ.o: ../common/environ.c): Remove.
2651 (common-debug.o: ../common/common-debug.c): Remove.
2652 (cleanups.o: ../common/cleanups.c): Remove.
2653 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2654 (fileio.o: ../common/fileio.c): Remove.
2655 (common-regcache.o: ../common/common-regcache.c): Remove.
2656 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2657 (new-op.o: ../common/new-op.c): Remove.
2658 (btrace-common.o: ../common/btrace-common.c): Remove.
2659
21122961
SM
26602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * Makefile.in (%.o: ../target/%.c): New rule.
2663 (waitstatus.o: ../target/waitstatus.c): Remove.
2664
c362e621
SM
26652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2666
2667 * Makefile.in
2668 (%.c: ../regformats/%.dat,
2669 (%.c: ../regformats/arm/%.dat,
2670 (%.c: ../regformats/i386/%.dat,
2671 (%.c: ../regformats/rs6000/%.dat): New rules.
2672 (aarch64.c): Remove.
2673 (reg-arm.c): Remove.
2674 (arm-with-iwmmxt.c): Remove.
2675 (arm-with-vfpv2.c): Remove.
2676 (arm-with-vfpv3.c): Remove.
2677 (arm-with-neon.c): Remove.
2678 (reg-bfin.c): Remove.
2679 (reg-cris.c): Remove.
2680 (reg-crisv32.c): Remove.
2681 (i386.c): Remove.
2682 (i386-linux.c): Remove.
2683 (i386-avx.c): Remove.
2684 (i386-avx-linux.c): Remove.
2685 (i386-avx-avx512.c): Remove.
2686 (i386-avx-avx512-linux.c): Remove.
2687 (i386-mpx.c): Remove.
2688 (i386-mpx-linux.c): Remove.
2689 (i386-avx-mpx-avx512-pku.c): Remove.
2690 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2691 (i386-avx-mpx.c): Remove.
2692 (i386-avx-mpx-linux.c): Remove.
2693 (i386-mmx.c): Remove.
2694 (i386-mmx-linux.c): Remove.
2695 (reg-ia64.c): Remove.
2696 (reg-m32r.c): Remove.
2697 (reg-m68k.c): Remove.
2698 (reg-cf.c): Remove.
2699 (mips-linux.c): Remove.
2700 (mips-dsp-linux.c): Remove.
2701 (mips64-linux.c): Remove.
2702 (mips64-dsp-linux.c): Remove.
2703 (nios2-linux.c): Remove.
2704 (powerpc-32.c): Remove.
2705 (powerpc-32l.c): Remove.
2706 (powerpc-altivec32l.c): Remove.
2707 (powerpc-cell32l.c): Remove.
2708 (powerpc-vsx32l.c): Remove.
2709 (powerpc-isa205-32l.c): Remove.
2710 (powerpc-isa205-altivec32l.c): Remove.
2711 (powerpc-isa205-vsx32l.c): Remove.
2712 (powerpc-e500l.c): Remove.
2713 (powerpc-64l.c): Remove.
2714 (powerpc-altivec64l.c): Remove.
2715 (powerpc-cell64l.c): Remove.
2716 (powerpc-vsx64l.c): Remove.
2717 (powerpc-isa205-64l.c): Remove.
2718 (powerpc-isa205-altivec64l.c): Remove.
2719 (powerpc-isa205-vsx64l.c): Remove.
2720 (s390-linux32.c): Remove.
2721 (s390-linux32v1.c): Remove.
2722 (s390-linux32v2.c): Remove.
2723 (s390-linux64.c): Remove.
2724 (s390-linux64v1.c): Remove.
2725 (s390-linux64v2.c): Remove.
2726 (s390-te-linux64.c): Remove.
2727 (s390-vx-linux64.c): Remove.
2728 (s390-tevx-linux64.c): Remove.
2729 (s390x-linux64.c): Remove.
2730 (s390x-linux64v1.c): Remove.
2731 (s390x-linux64v2.c): Remove.
2732 (s390x-te-linux64.c): Remove.
2733 (s390x-vx-linux64.c): Remove.
2734 (s390x-tevx-linux64.c): Remove.
2735 (tic6x-c64xp-linux.c): Remove.
2736 (tic6x-c64x-linux.c): Remove.
2737 (tic6x-c62x-linux.c): Remove.
2738 (reg-sh.c): Remove.
2739 (reg-sparc64.c): Remove.
2740 (reg-spu.c): Remove.
2741 (amd64.c): Remove.
2742 (amd64-linux.c): Remove.
2743 (amd64-avx.c): Remove.
2744 (amd64-avx-linux.c): Remove.
2745 (amd64-avx-avx512.c): Remove.
2746 (amd64-avx-avx512-linux.c): Remove.
2747 (amd64-mpx.c): Remove.
2748 (amd64-mpx-linux.c): Remove.
2749 (amd64-avx-mpx-avx512-pku.c): Remove.
2750 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2751 (amd64-avx-mpx.c): Remove.
2752 (amd64-avx-mpx-linux.c): Remove.
2753 (x32.c): Remove.
2754 (x32-linux.c): Remove.
2755 (x32-avx.c): Remove.
2756 (x32-avx-linux.c): Remove.
2757 (x32-avx-avx512.c): Remove.
2758 (x32-avx-avx512-linux.c): Remove.
2759 (reg-xtensa.c): Remove.
2760 (reg-tilegx.c): Remove.
2761 (reg-tilegx32.c): Remove.
2762
1672e0d9
SDJ
27632017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2764
2765 * Makefile.in (SFILES): Add "common/environ.c".
2766 (OBJS): Add "common/environ.h".
2767
239b6d10
WT
27682017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2769
2770 * configure.ac: Check if the fs_base and gs_base members of
2771 `struct user_regs_struct' exist.
2772 * config.in: Regenerated.
2773 * configure: Likewise.
2774
694b382c
AT
27752017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2776
2777 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2778 target_read_memory.
2779 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2780 (get_next_pcs_syscall_next_pc): Likewise.
2781
7dc53023
LM
27822016-12-23 Luis Machado <lgustavo@codesourcery.com>
2783
2784 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2785 * nto-x86-low.c: Likewise.
2786
ad02e4fe
SM
27872016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2788
2789 * Makefile.in: Include disable-implicit-rules.mk.
2790
dcb07cfa
PA
27912016-11-23 Pedro Alves <palves@redhat.com>
2792
2793 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2794 (debug_vprintf): Use std::chrono::steady_clock instead of
2795 gettimeofday. Use '.' instead of ':'.
2796 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2797 (get_timestamp): Use std::chrono::steady_clock instead of
2798 gettimeofday.
2799
8629c02c
SM
28002016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2801
2802 * Makefile.in: Fix whitespace formatting.
2803
b593ecca
SM
28042016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2805
2806 * Makefile.in (SFILES, OBS): Flatten list and order
2807 alphabetically.
2808
9986ba08
PA
28092016-11-23 Pedro Alves <palves@redhat.com>
2810
2811 * event-loop.c (handle_file_event): Use warning.
2812 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2813 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2814 Use warning.
2815
4eefa7bc
PA
28162016-11-23 Pedro Alves <palves@redhat.com>
2817
2818 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2819 output.
2820 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2821 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2822 debug_printf and debug_flush for debug output.
2823 * server.c (handle_general_set): Likewise.
2824 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2825 output.
2826
5443506e
SM
28272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2828
2829 * Makefile.in (.c.o): Replace rule with ...
2830 (%.o: %.c): ... this one.
2831
3b165252
SM
28322016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2833
2834 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2835 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2836 make.
2837 * configure.ac: Remove checks for the make program.
2838 * configure: Re-generate.
2839
0bcda685
PA
28402016-10-28 Pedro Alves <palves@redhat.com>
2841
2842 * Makefile.in (CXX_DIALECT): Get from configure.
2843 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2844 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2845 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2846 * config.in: Regenerate.
2847 * configure: Regenerate.
2848
c3805894
YQ
28492016-10-27 Yao Qi <yao.qi@linaro.org>
2850
2851 * linux-low.c (linux_supports_range_stepping): Return true if
2852 can_software_single_step return true.
2853
89342618
YQ
28542016-10-27 Yao Qi <yao.qi@linaro.org>
2855
2856 * inferiors.c (find_inferior_in_random): New function.
2857 * inferiors.h (find_inferior_in_random): Declare.
2858 * linux-low.c (linux_wait_for_event_filtered): Call
2859 find_inferior_in_random instead of find_inferior.
2860
e3652c84
YQ
28612016-10-27 Yao Qi <yao.qi@linaro.org>
2862
2863 * linux-low.c (linux_wait_1): If single-step breakpoints are
2864 inserted, remove them.
2865
5a04c4cf
PA
28662016-10-26 Pedro Alves <palves@redhat.com>
2867
2868 * linux-low.c (handle_extended_wait): Link parent/child fork
2869 threads.
2870 (linux_wait_1): Unlink them.
2871 (linux_set_resume_request): Ignore resume requests for
2872 already-resumed and unhandled fork child threads.
2873 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2874 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2875 New functions.
2876 (handle_v_requests) <vCont>: Don't call require_running.
2877 * server.h (in_queued_stop_replies): New declaration.
2878
cb93dc7f
YQ
28792016-10-24 Yao Qi <yao.qi@linaro.org>
2880
2881 PR server/20733
2882 * linux-aarch64-low.c (append_insns): Cast the return value to
2883 'uint32_t *'.
2884
a1078bea
YQ
28852016-10-10 Yao Qi <yao.qi@linaro.org>
2886
2887 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2888
1fb77080
SDJ
28892016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2890
2891 * target.c (target_supports_multi_process): New function, moved
2892 from...
2893 * target.h (target_supports_multi_process): ... here. Remove
2894 macro.
2895
39b5a3b9
TT
28962016-10-05 Tom Tromey <tom@tromey.com>
2897
2898 PR remote/20655:
2899 * tracepoint.c (handle_tracepoint_bkpts): Check
2900 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2901
c1d0b70a
YQ
29022016-10-05 Yao Qi <yao.qi@linaro.org>
2903
2904 * configure.srv: Update the path of arm-*.xml files.
2905
0a69eedb
YQ
29062016-10-05 Terry Guo <terry.guo@arm.com>
2907 Yao Qi <yao.qi@linaro.org>
2908
2909 * Makefile.in: Adjust the path of rules.
2910 * configure.srv: Update the path of xml files.
2911 * regformats/arm-with-iwmmxt.dat: Regenerated.
2912 * regformats/arm-with-neon.dat: Likewise.
2913 * regformats/arm-with-vfpv2.dat: Likewise.
2914 * regformats/arm-with-vfpv3.dat Likewise.
2915
17e16485
YQ
29162016-09-30 Yao Qi <yao.qi@linaro.org>
2917
2918 PR gdbserver/20627
2919 * target.c (target_stop_and_wait): Don't call
2920 target_continue_no_signal, use resume_stop instead.
2921
edeeb602
YQ
29222016-09-26 Yao Qi <yao.qi@linaro.org>
2923
2924 * linux-low.c (linux_wait_1): Call debug_exit.
2925
503b1c39
PA
29262016-09-23 Pedro Alves <palves@redhat.com>
2927
2928 * Makefile.in (SFILES): Add common/new-op.c.
2929 (OBS): Add common/new-op.o.
2930 (new-op.o): New rule.
2931
74172ecf
SM
29322016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2933
2934 * .gitinore: Ignore more files.
2935
fc6cda2e
YQ
29362016-09-21 Yao Qi <yao.qi@linaro.org>
2937
2938 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2939 23.
2940
bc1e6c81
SDJ
29412016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2942
2943 * server.c (start_inferior): Call target_mourn_inferior instead of
2944 mourn_inferior; pass ptid_t argument to it.
2945 (resume): Likewise.
2946 (handle_target_event): Likewise.
2947 * target.c (target_mourn_inferior): New function.
2948 * target.h (mourn_inferior): Delete macro.
2949
0e00e962
AA
29502016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2951
2952 * linux-low.c (lwp_is_stepping): New function.
2953
1d8cb77d
CL
29542016-09-06 Carl Love <cel@us.ibm.com>
2955
2956 * server.c (start_inferior): Fixed comment, requested comment change
2957 didn't get updated correctly. Removed reference to ptrace () call as
2958 it is only true on Linux systems.
2959
7313bced
CL
29602016-09-06 Carl Love <cel@us.ibm.com>
2961
2962 * server.c (start_inferior): Do not call
2963 function target_post_create_inferior () if the
2964 inferior process has already exited.
2965
cf6de44d
PA
29662016-09-05 Pedro Alves <palves@redhat.com>
2967
2968 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2969 (COMPILE.pre, CC_LD): Use CXX directly.
2970 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2971 * acinclude.m4: Don't include build-with-cxx.m4.
2972 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2973 * configure: Regenerate.
2974
c1da6748
AT
29752016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2976
2977 PR gdb/19495
2978 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2979 call writing data to own_buf.
2980
f2b9e3df
SDJ
29812016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2982
2983 * target.c (mywait): Call target_wait instead of
2984 the_target->wait.
2985 (target_wait): New function.
2986
049a8570
SDJ
29872016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2988
2989 * server.c (start_inferior): New variable 'ptid'. Replace calls
2990 to the_target->resume by target_continue{,_no_signal}, depending
2991 on the case.
2992 * target.c (target_stop_and_wait): Call target_continue_no_signal
2993 instead of the_target->resume.
2994 (target_continue): New function.
2995
3aa5cfa0
AT
29962016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2997
2998 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2999
754653a7
AZ
30002016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3001
3002 PR server/20491
3003 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3004 ps_prochandle.
3005 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3006 * linux-arm-low.c (ps_get_thread_area): Likewise.
3007 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3008 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3009 * linux-mips-low.c (ps_get_thread_area): Likewise.
3010 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3011 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3012 * linux-x86-low.c (ps_get_thread_area): Likewise.
3013 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3014
ed036b40
PA
30152016-08-19 Pedro Alves <palves@redhat.com>
3016
3017 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3018
c8ef42ee
PA
30192016-08-19 Pedro Alves <palves@redhat.com>
3020
3021 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3022 comment. Use memcpy instead of casting through unsigned long.
3023
9c235a72
PA
30242016-08-19 Pedro Alves <palves@redhat.com>
3025
3026 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3027 allocating around 0x80000000.
3028
201506da
PA
30292016-08-19 Pedro Alves <palves@redhat.com>
3030
3031 PR gdb/20415
3032 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3033 (x32-avx512-linux-ipa.o): New rules.
3034 * configure.ac (x86_64-*-linux*): New x32 check.
3035 * configure.srv (ipa_x32_linux_regobj): New.
3036 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3037 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3038 descriptions.
3039 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3040 descriptions.
3041 * configure: Regenerate.
3042
f348d89a
PA
30432016-08-09 Pedro Alves <palves@redhat.com>
3044
3045 PR gdb/18653
3046 * Makefile.in (OBS): Add signals-state-save-restore.o.
3047 (signals-state-save-restore.o): New rule.
3048 * config.in: Regenerate.
3049 * configure: Regenerate.
3050 * linux-low.c: Include "signals-state-save-restore.h".
3051 (linux_create_inferior): Call
3052 restore_original_signals_state.
3053 * server.c: Include "dispositions-save-restore.h".
3054 (captured_main): Call save_original_signals_state.
3055
1baf5149
PA
30562016-08-05 Pedro Alves <palves@redhat.com>
3057
3058 * configure: Regenerate.
3059
fcd4a73d
YQ
30602016-08-04 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-low.c (regsets_fetch_inferior_registers): Check
3063 errno is ESRCH or not.
3064
979659d0
YQ
30652016-08-02 Yao Qi <yao.qi@linaro.org>
3066
3067 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3068 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3069 (thread_db_load_search): Update.
3070 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3071 td_ta_set_event and td_ta_event_getmsg.
3072
6598661d
PA
30732016-07-26 Pedro Alves <palves@redhat.com>
3074
3075 PR server/20414
3076 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3077 of unsigned long for 64-bit registers and use uint32_t instead of
3078 unsigned int for 32-bit registers.
3079
9cf12d57
PA
30802016-07-26 Pedro Alves <palves@redhat.com>
3081
3082 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3083 to 'ptrace'.
3084
305450ed
TT
30852016-07-21 Tom Tromey <tom@tromey.com>
3086
3087 * configure: Rebuild.
3088
2583da7c
YQ
30892016-07-21 Yao Qi <yao.qi@linaro.org>
3090
3091 * mem-break.c (find_gdb_breakpoint): Cast bp to
3092 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3093
21536b36
YQ
30942016-07-21 Yao Qi <yao.qi@linaro.org>
3095
3096 * server.c (handle_v_requests): Support s and S actions
3097 if target_supports_software_single_step return true.
3098
8901d193
YQ
30992016-07-21 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3102 is resume_step, call maybe_hw_step.
3103 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3104 and unstop them.
3105 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3106 breakpoints or not.
3107 (proceed_one_lwp): If resume request is resume_step, install
3108 reinsert breakpoints and call maybe_hw_step.
3109
0e9a339e
YQ
31102016-07-21 Yao Qi <yao.qi@linaro.org>
3111
3112 * linux-low.c (proceed_one_lwp): Declare.
3113 (linux_resume_one_thread): Remove local variable 'step'.
3114 Lift code enqueue signal. Call proceed_one_lwp instead of
3115 linux_resume_one_lwp.
3116
4281b351
YQ
31172016-07-21 Yao Qi <yao.qi@linaro.org>
3118
3119 * linux-low.c (linux_resume_one_thread): Call
3120 enqueue_pending_signal.
3121
984a2c04
YQ
31222016-07-21 Yao Qi <yao.qi@linaro.org>
3123
3124 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3125 * inferiors.c (do_restore_current_thread_cleanup): New function.
3126 (make_cleanup_restore_current_thread): Likewise.
3127 * linux-low.c (install_software_single_step_breakpoints): Call
3128 make_cleanup_restore_current_thread. Switch current_thread to
3129 thread.
3130
bec903c9
YQ
31312016-07-21 Yao Qi <yao.qi@linaro.org>
3132
3133 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3134 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3135 (clone_one_breakpoint): Likewise.
3136 (delete_reinsert_breakpoints): Change parameter to thread.
3137 Callers updated.
3138 (has_reinsert_breakpoints): Likewise.
3139 (uninsert_reinsert_breakpoints): Likewise.
3140 (reinsert_reinsert_breakpoints): Likewise.
3141 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3142 (delete_reinsert_breakpoints): Likewise.
3143 (reinsert_reinsert_breakpoints): Likewise.
3144 (uninsert_reinsert_breakpoints): Likewise.
3145 (has_reinsert_breakpoints): Likewise.
3146
63c40ec7
YQ
31472016-07-21 Yao Qi <yao.qi@linaro.org>
3148
3149 * inferiors.c (get_thread_process): Make parameter const.
3150 * inferiors.h (get_thread_process): Update declaration.
3151 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3152 Add new parameters child_thread and parent_thread. Callers
3153 updated.
3154 * mem-break.h (clone_all_breakpoints): Update declaration.
3155
9aa76cd0
YQ
31562016-07-21 Yao Qi <yao.qi@linaro.org>
3157
3158 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3159 <command_list, handler>: Remove.
3160 (struct gdb_breakpoint): New.
3161 (struct other_breakpoint): New.
3162 (struct reinsert_breakpoint): New.
3163 (is_gdb_breakpoint): New function.
3164 (any_persistent_commands): Update command_list if
3165 is_gdb_breakpoint returns true.
3166 (set_breakpoint): Create breakpoints according to their types.
3167 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3168 (set_gdb_breakpoint_1): Likewise.
3169 (set_gdb_breakpoint): Likewise.
3170 (clear_breakpoint_conditions): Change parameter type to
3171 'struct gdb_breakpoint *'.
3172 (clear_breakpoint_commands): Likewise.
3173 (clear_breakpoint_conditions_and_commands): Likewise.
3174 (add_condition_to_breakpoint): Likewise.
3175 (add_breakpoint_condition): Likewise.
3176 (add_commands_to_breakpoint): Likewise.
3177 (check_breakpoints): Check other_breakpoint.
3178 (clone_one_breakpoint): Clone breakpopint according to its type.
3179 * mem-break.h (struct gdb_breakpoint): Declare.
3180 (set_gdb_breakpoint): Update declaration.
3181 (clear_breakpoint_conditions_and_commands): Likewise.
3182 (add_breakpoint_condition): Likewise.
3183 (add_breakpoint_commands): Likewise.
3184 * server.c (process_point_options): Change parameter type to
3185 'struct gdb_breakpoint *'.
3186
811f8301
YQ
31872016-07-21 Yao Qi <yao.qi@linaro.org>
3188
3189 * mem-break.c (set_breakpoint_at): Rename it to ...
3190 (set_breakpoint_type_at): ... it.
3191 (set_breakpoint_at): Call set_breakpoint_type_at.
3192 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3193 * mem-break.h (set_breakpoint_at): Update comments.
3194
b1c51e36
CLT
31952016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3196
3197 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3198 to buf parameter.
3199 (nios2_store_gregset): Likewise.
3200
ced2dffb
PA
32012016-07-01 Pedro Alves <palves@redhat.com>
3202 Antoine Tremblay <antoine.tremblay@ericsson.com>
3203
3204 * linux-low.c: Change interface to take the target lwp_info
3205 pointer directly and return void. Handle detaching from a zombie
3206 thread.
3207 (linux_detach_lwp_callback): New function.
3208 (linux_detach): Detach from the leader thread after detaching from
3209 the clone threads.
3210
2ac09a5b
YQ
32112016-06-28 Yao Qi <yao.qi@linaro.org>
3212
3213 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3214 for variable new_offset.
3215 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3216 (aarch64_ftrace_insn_reloc_cb): Likewise.
3217 (aarch64_ftrace_insn_reloc_tb): Likewise.
3218 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3219 PRIx64 instead of PRIx32.
3220
79e7fd4f
YQ
32212016-06-28 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3224 (the_low_target): Install arm_get_syscall_trapinfo.
3225
061fc021
YQ
32262016-06-28 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3229 function.
3230 (the_low_target): Install aarch64_get_syscall_trapinfo.
3231
4cc32bec
YQ
32322016-06-28 Yao Qi <yao.qi@linaro.org>
3233
3234 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3235 Callers updated.
3236 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3237 Remove parameter sysno.
3238 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3239 sysret.
3240
782c1122
AA
32412016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3242
3243 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3244 (s390_emit_ne_goto): Likewise.
3245 (s390_emit_lt_goto): Likewise.
3246 (s390_emit_le_goto): Likewise.
3247 (s390_emit_gt_goto): Likewise.
3248 (s390_emit_ge_goto): Likewise.
3249 (s390x_emit_eq_goto): Likewise.
3250 (s390x_emit_ne_goto): Likewise.
3251 (s390x_emit_lt_goto): Likewise.
3252 (s390x_emit_le_goto): Likewise.
3253 (s390x_emit_gt_goto): Likewise.
3254 (s390x_emit_ge_goto): Likewise.
3255 (s390_emit_ops_impl): Mark variable static.
3256 (s390x_emit_ops): Likewise.
3257
2e7b624b
YQ
32582016-06-17 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-low.c (handle_extended_wait): Call
3261 uninsert_reinsert_breakpoints for the parent process. Remove
3262 reinsert breakpoints from the child process. Reinsert them to
3263 the parent process when vfork is done.
3264 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3265 (reinsert_reinsert_breakpoints): New function.
3266 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3267 (reinsert_reinsert_breakpoints): Declare.
3268
8a81c5d7
YQ
32692016-06-17 Yao Qi <yao.qi@linaro.org>
3270
3271 * linux-low.c (handle_extended_wait): If the parent is doing
3272 step-over, remove the reinsert breakpoints from the forked child.
3273
f50bf8e5
YQ
32742016-06-17 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-low.c (unsuspend_all_lwps): Declare.
3277 (linux_low_filter_event): If thread exited, call finish_step_over.
3278 If step-over is finished, unsuspend other threads.
3279
8376a3cb
YQ
32802016-06-17 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-low.c (linux_resume_one_lwp_throw): Assert
3283 has_reinsert_breakpoints returns false.
3284 * mem-break.c (delete_disabled_breakpoints): Assert
3285 bp type isn't reinsert_breakpoint.
3286
f79b145d
YQ
32872016-06-17 Yao Qi <yao.qi@linaro.org>
3288
3289 * linux-low.c (maybe_hw_step): New function.
3290 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3291 (finish_step_over): Switch current_thread to lwp temporarily,
3292 and assert has_reinsert_breakpoints returns true.
3293 (proceed_one_lwp): Call maybe_hw_step.
3294 * mem-break.c (has_reinsert_breakpoints): New function.
3295 * mem-break.h (has_reinsert_breakpoints): Declare.
3296
0ae534d2
JT
32972016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3298
3299 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3300
fcdad592
YQ
33012016-05-17 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3304 instead of find_inferior.
3305
9e784964
YQ
33062016-05-05 Yao Qi <yao.qi@linaro.org>
3307
3308 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3309 Initialize res to zero.
3310
cf2ebb6e
YQ
33112016-05-05 Yao Qi <yao.qi@linaro.org>
3312
3313 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3314 to uint32_t.
3315
c1aebf87
UW
33162016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3317
3318 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3319 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3320 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3321
35fd2deb 33222016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3323 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3324
3325 * tracepoint.c (write_inferior_int8): New function.
3326 (cmd_qtenable_disable): Write enable flag using
3327 write_inferior_int8.
3328
484b3c32
YQ
33292016-04-25 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3332 (need_step_over_p): Return zero if the LWP has pending signals
3333 can be delivered on software single step target.
3334
85ba7d86
YQ
33352016-04-25 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3338 return instead of error.
3339
3539aa13
YQ
33402016-04-22 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3343 to 23.
3344
5b061e98
YQ
33452016-04-22 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3348 signal when stepping over breakpoint with software single
3349 step.
3350
3451269c
PA
33512016-04-21 Pedro Alves <palves@redhat.com>
3352
3353 * linux-s390-low.c (s390_collect_ptrace_register)
3354 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3355 add casts.
3356 (s390_check_regset): Use void * instead of gdb_byte *.
3357
a2358508
PA
33582016-04-20 Pedro Alves <palves@redhat.com>
3359
3360 * configure: Renegerate.
3361
6885166d
YQ
33622016-04-20 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3365 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3366 number 16.
3367 (arm_store_gregset): Likewise.
3368
2b863f51
WT
33692016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3370
3371 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3372 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3373 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3374 (amd64-avx-mpx-linux.c): New rules.
3375 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3376 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3377 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3378 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3379 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3380 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3381 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3382 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3383 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3384 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3385 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3386 * linux-x86-low.c (x86_linux_read_description): Add case for
3387 X86_XSTATE_AVX_MPX_MASK.
3388 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3389 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3390 init_registers_i386_avx_mpx_linux.
3391 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3392 (initialize_low_tracepoint): Call
3393 init_registers_i386_avx_mpx_linux.
3394 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3395 (initialize_low_tracepoint): Call
3396 init_registers_amd64_avx_mpx_linux.
3397 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3398 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3399 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3400 declarations.
3401
9b30624b
PA
34022016-04-18 Pedro Alves <palves@redhat.com>
3403
3404 * configure: Regenerate.
3405
45e3745e
AT
34062016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3407
3408 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3409 (aarch64_emit_sub): Likewise.
3410
2afc13ff
PA
34112016-04-12 Pedro Alves <palves@redhat.com>
3412
3413 * utils.c (prepare_to_throw_exception): Delete.
3414
6e774b13
SM
34152016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3416
3417 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3418
4dca19f8
MK
34192016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3420
3421 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3422
d0a9981f
MK
34232016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3424
3425 * linux-aarch64-ipa.c: Add <elf.h> include.
3426 * linux-ppc-ipa.c: Add <elf.h> include.
3427 * linux-s390-ipa.c: Add <elf.h> include.
3428
252db07e
MK
34292016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3430
3431 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3432 (get_raw_reg_ptr): Likewise.
3433 (get_trace_state_variable_value_ptr): Likewise.
3434 (set_trace_state_variable_value_ptr): Likewise.
3435 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3436 char *.
3437
14e2b6d9
MK
34382016-03-31 Wei-cheng Wang <cole945@gmail.com>
3439 Marcin Kościelnicki <koriakin@0x04.net>
3440
3441 PR/17221
3442 * linux-ppc-low.c (emit_insns): New function.
3443 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3444 (ppc_emit_prologue): New function.
3445 (ppc_emit_epilogue): New function.
3446 (ppc_emit_add): New function.
3447 (ppc_emit_sub): New function.
3448 (ppc_emit_mul): New function.
3449 (ppc_emit_lsh): New function.
3450 (ppc_emit_rsh_signed): New function.
3451 (ppc_emit_rsh_unsigned): New function.
3452 (ppc_emit_ext): New function.
3453 (ppc_emit_zero_ext): New function.
3454 (ppc_emit_log_not): New function.
3455 (ppc_emit_bit_and): New function.
3456 (ppc_emit_bit_or): New function.
3457 (ppc_emit_bit_xor): New function.
3458 (ppc_emit_bit_not): New function.
3459 (ppc_emit_equal): New function.
3460 (ppc_emit_less_signed): New function.
3461 (ppc_emit_less_unsigned): New function.
3462 (ppc_emit_ref): New function.
3463 (ppc_emit_const): New function.
3464 (ppc_emit_reg): New function.
3465 (ppc_emit_pop): New function.
3466 (ppc_emit_stack_flush): New function.
3467 (ppc_emit_swap): New function.
3468 (ppc_emit_stack_adjust): New function.
3469 (ppc_emit_call): New function.
3470 (ppc_emit_int_call_1): New function.
3471 (ppc_emit_void_call_2): New function.
3472 (ppc_emit_if_goto): New function.
3473 (ppc_emit_goto): New function.
3474 (ppc_emit_eq_goto): New function.
3475 (ppc_emit_ne_goto): New function.
3476 (ppc_emit_lt_goto): New function.
3477 (ppc_emit_le_goto): New function.
3478 (ppc_emit_gt_goto): New function.
3479 (ppc_emit_ge_goto): New function.
3480 (ppc_write_goto_address): New function.
3481 (ppc_emit_ops_impl): New static variable.
3482 (ppc64v1_emit_prologue): New function.
3483 (ppc64v2_emit_prologue): New function.
3484 (ppc64_emit_epilogue): New function.
3485 (ppc64_emit_add): New function.
3486 (ppc64_emit_sub): New function.
3487 (ppc64_emit_mul): New function.
3488 (ppc64_emit_lsh): New function.
3489 (ppc64_emit_rsh_signed): New function.
3490 (ppc64_emit_rsh_unsigned): New function.
3491 (ppc64_emit_ext): New function.
3492 (ppc64_emit_zero_ext): New function.
3493 (ppc64_emit_log_not): New function.
3494 (ppc64_emit_bit_and): New function.
3495 (ppc64_emit_bit_or): New function.
3496 (ppc64_emit_bit_xor): New function.
3497 (ppc64_emit_bit_not): New function.
3498 (ppc64_emit_equal): New function.
3499 (ppc64_emit_less_signed): New function.
3500 (ppc64_emit_less_unsigned): New function.
3501 (ppc64_emit_ref): New function.
3502 (ppc64_emit_const): New function.
3503 (ppc64v1_emit_reg): New function.
3504 (ppc64v2_emit_reg): New function.
3505 (ppc64_emit_pop): New function.
3506 (ppc64_emit_stack_flush): New function.
3507 (ppc64_emit_swap): New function.
3508 (ppc64v1_emit_call): New function.
3509 (ppc64v2_emit_call): New function.
3510 (ppc64v1_emit_int_call_1): New function.
3511 (ppc64v2_emit_int_call_1): New function.
3512 (ppc64v1_emit_void_call_2): New function.
3513 (ppc64v2_emit_void_call_2): New function.
3514 (ppc64_emit_if_goto): New function.
3515 (ppc64_emit_eq_goto): New function.
3516 (ppc64_emit_ne_goto): New function.
3517 (ppc64_emit_lt_goto): New function.
3518 (ppc64_emit_le_goto): New function.
3519 (ppc64_emit_gt_goto): New function.
3520 (ppc64_emit_ge_goto): New function.
3521 (ppc64v1_emit_ops_impl): New static variable.
3522 (ppc64v2_emit_ops_impl): New static variable.
3523 (ppc_emit_ops): New function.
3524 (linux_low_target): Wire in ppc_emit_ops.
3525
a2174ba4
MK
35262016-03-31 Wei-cheng Wang <cole945@gmail.com>
3527 Marcin Kościelnicki <koriakin@0x04.net>
3528
3529 PR/17221
3530 * Makefile.in: Add powerpc-*-ipa.o
3531 * configure.srv: Add ipa_obj for powerpc*-linux.
3532 * linux-ppc-ipa.c: New file.
3533 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3534 includes.
3535 (PPC_FIELD): New macro.
3536 (PPC_SEXT): New macro.
3537 (PPC_OP6): New macro.
3538 (PPC_BO): New macro.
3539 (PPC_LI): New macro.
3540 (PPC_BD): New macro.
3541 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3542 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3543 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3544 (ppc_get_thread_area): New function.
3545 (is_elfv2_inferior): New function.
3546 (gen_ds_form): New function.
3547 (GEN_STD): New macro.
3548 (GEN_STDU): New macro.
3549 (GEN_LD): New macro.
3550 (GEN_LDU): New macro.
3551 (gen_d_form): New function.
3552 (GEN_ADDI): New macro.
3553 (GEN_ADDIS): New macro.
3554 (GEN_LI): New macro.
3555 (GEN_LIS): New macro.
3556 (GEN_ORI): New macro.
3557 (GEN_ORIS): New macro.
3558 (GEN_LWZ): New macro.
3559 (GEN_STW): New macro.
3560 (GEN_STWU): New macro.
3561 (gen_xfx_form): New function.
3562 (GEN_MFSPR): New macro.
3563 (GEN_MTSPR): New macro.
3564 (GEN_MFCR): New macro.
3565 (GEN_MTCR): New macro.
3566 (GEN_SYNC): New macro.
3567 (GEN_LWSYNC): New macro.
3568 (gen_x_form): New function.
3569 (GEN_OR): New macro.
3570 (GEN_MR): New macro.
3571 (GEN_LWARX): New macro.
3572 (GEN_STWCX): New macro.
3573 (GEN_CMPW): New macro.
3574 (gen_md_form): New function.
3575 (GEN_RLDICL): New macro.
3576 (GEN_RLDICR): New macro.
3577 (gen_i_form): New function.
3578 (GEN_B): New macro.
3579 (GEN_BL): New macro.
3580 (gen_b_form): New function.
3581 (GEN_BNE): New macro.
3582 (GEN_LOAD): New macro.
3583 (GEN_STORE): New macro.
3584 (gen_limm): New function.
3585 (gen_atomic_xchg): New function.
3586 (gen_call): New function.
3587 (ppc_relocate_instruction): New function.
3588 (ppc_install_fast_tracepoint_jump_pad): New function.
3589 (ppc_get_min_fast_tracepoint_insn_len): New function.
3590 (ppc_get_ipa_tdesc_idx): New function.
3591 (the_low_target): Wire in the new functions.
3592 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3593 tdescs.
3594 * linux-ppc-tdesc.h: New file.
3595
a13c4696
MK
35962016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3597
3598 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3599 (alloc_jump_pad_buffer): New function.
3600 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3601 (alloc_jump_pad_buffer): New function.
3602 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3603 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3604 (alloc_jump_pad_buffer): New function.
3605 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3606 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3607 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3608 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3609
1cda1512
MK
36102016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3611
3612 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3613 * linux-amd64-ipa.c: Likewise.
3614 * linux-i386-ipa.c: Likewise.
3615 * linux-s390-ipa.c: Likewise.
3616 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3617 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3618 set_trace_state_variable_value_ptr.
3619 (struct ipa_sym_addresses): Likewise.
3620 (symbol_list): Likewise.
3621 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3622 accessing gdb_collect directly.
3623 (gdb_collect_ptr_type): New typedef.
3624 (get_raw_reg_ptr_type): New typedef.
3625 (get_trace_state_variable_value_ptr_type): New typedef.
3626 (set_trace_state_variable_value_ptr_type): New typedef.
3627 (gdb_collect_ptr): New global.
3628 (get_raw_reg_ptr): New global.
3629 (get_trace_state_variable_value_ptr): New global.
3630 (set_trace_state_variable_value_ptr): New global.
3631 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3632 accessing get_raw_reg directly.
3633 (get_get_tsv_func_addr): Likewise for
3634 get_trace_state_variable_value_ptr.
3635 (get_set_tsv_func_addr): Likewise for
3636 set_trace_state_variable_value_ptr.
3637 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3638
72fb5488
SM
36392016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3640
3641 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3642
28170b88
MK
36432016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3644
3645 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3646 packets.
3647 (relocate_instruction): Remove own_buf.
3648 * server.c (own_buf): Make global.
3649 (handle_v_requests): Make global.
3650 * server.h (own_buf): New declaration.
3651 (handle_v_requests): New prototype.
3652
f39e8743
MK
36532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3654
3655 PR 18377
3656 * linux-s390-low.c (add_insns): New function.
3657 (s390_emit_prologue): New function.
3658 (s390_emit_epilogue): New function.
3659 (s390_emit_add): New function.
3660 (s390_emit_sub): New function.
3661 (s390_emit_mul): New function.
3662 (s390_emit_lsh): New function.
3663 (s390_emit_rsh_signed): New function.
3664 (s390_emit_rsh_unsigned): New function.
3665 (s390_emit_ext): New function.
3666 (s390_emit_log_not): New function.
3667 (s390_emit_bit_and): New function.
3668 (s390_emit_bit_or): New function.
3669 (s390_emit_bit_xor): New function.
3670 (s390_emit_bit_not): New function.
3671 (s390_emit_equal): New function.
3672 (s390_emit_less_signed): New function.
3673 (s390_emit_less_unsigned): New function.
3674 (s390_emit_ref): New function.
3675 (s390_emit_if_goto): New function.
3676 (s390_emit_goto): New function.
3677 (s390_write_goto_address): New function.
3678 (s390_emit_litpool): New function.
3679 (s390_emit_const): New function.
3680 (s390_emit_call): New function.
3681 (s390_emit_reg): New function.
3682 (s390_emit_pop): New function.
3683 (s390_emit_stack_flush): New function.
3684 (s390_emit_zero_ext): New function.
3685 (s390_emit_swap): New function.
3686 (s390_emit_stack_adjust): New function.
3687 (s390_emit_set_r2): New function.
3688 (s390_emit_int_call_1): New function.
3689 (s390_emit_void_call_2): New function.
3690 (s390_emit_eq_goto): New function.
3691 (s390_emit_ne_goto): New function.
3692 (s390_emit_lt_goto): New function.
3693 (s390_emit_le_goto): New function.
3694 (s390_emit_gt_goto): New function.
3695 (s390_emit_ge_goto): New function.
3696 (s390x_emit_prologue): New function.
3697 (s390x_emit_epilogue): New function.
3698 (s390x_emit_add): New function.
3699 (s390x_emit_sub): New function.
3700 (s390x_emit_mul): New function.
3701 (s390x_emit_lsh): New function.
3702 (s390x_emit_rsh_signed): New function.
3703 (s390x_emit_rsh_unsigned): New function.
3704 (s390x_emit_ext): New function.
3705 (s390x_emit_log_not): New function.
3706 (s390x_emit_bit_and): New function.
3707 (s390x_emit_bit_or): New function.
3708 (s390x_emit_bit_xor): New function.
3709 (s390x_emit_bit_not): New function.
3710 (s390x_emit_equal): New function.
3711 (s390x_emit_less_signed): New function.
3712 (s390x_emit_less_unsigned): New function.
3713 (s390x_emit_ref): New function.
3714 (s390x_emit_if_goto): New function.
3715 (s390x_emit_const): New function.
3716 (s390x_emit_call): New function.
3717 (s390x_emit_reg): New function.
3718 (s390x_emit_pop): New function.
3719 (s390x_emit_stack_flush): New function.
3720 (s390x_emit_zero_ext): New function.
3721 (s390x_emit_swap): New function.
3722 (s390x_emit_stack_adjust): New function.
3723 (s390x_emit_int_call_1): New function.
3724 (s390x_emit_void_call_2): New function.
3725 (s390x_emit_eq_goto): New function.
3726 (s390x_emit_ne_goto): New function.
3727 (s390x_emit_lt_goto): New function.
3728 (s390x_emit_le_goto): New function.
3729 (s390x_emit_gt_goto): New function.
3730 (s390x_emit_ge_goto): New function.
3731 (s390_emit_ops): New function.
3732 (struct linux_target_ops): Fill in emit_ops hook.
3733
abd9baf9
MK
37342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3735
3736 PR 18377
3737 * Makefile.in: Add s390 IPA files.
3738 * configure.srv: Build IPA for s390.
3739 * linux-s390-ipa.c: New file.
3740 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3741 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3742 (tdesc_s390_linux32): Likewise.
3743 (init_registers_s390_linux32v1): Likewise.
3744 (tdesc_s390_linux32v1): Likewise.
3745 (init_registers_s390_linux32v2): Likewise.
3746 (tdesc_s390_linux32v2): Likewise.
3747 (init_registers_s390_linux64): Likewise.
3748 (tdesc_s390_linux64): Likewise.
3749 (init_registers_s390_linux64v1): Likewise.
3750 (tdesc_s390_linux64v1): Likewise.
3751 (init_registers_s390_linux64v2): Likewise.
3752 (tdesc_s390_linux64v2): Likewise.
3753 (init_registers_s390_te_linux64): Likewise.
3754 (tdesc_s390_te_linux64): Likewise.
3755 (init_registers_s390_vx_linux64): Likewise.
3756 (tdesc_s390_vx_linux64): Likewise.
3757 (init_registers_s390_tevx_linux64): Likewise.
3758 (tdesc_s390_tevx_linux64): Likewise.
3759 (init_registers_s390x_linux64): Likewise.
3760 (tdesc_s390x_linux64): Likewise.
3761 (init_registers_s390x_linux64v1): Likewise.
3762 (tdesc_s390x_linux64v1): Likewise.
3763 (init_registers_s390x_linux64v2): Likewise.
3764 (tdesc_s390x_linux64v2): Likewise.
3765 (init_registers_s390x_te_linux64): Likewise.
3766 (tdesc_s390x_te_linux64): Likewise.
3767 (init_registers_s390x_vx_linux64): Likewise.
3768 (tdesc_s390x_vx_linux64): Likewise.
3769 (init_registers_s390x_tevx_linux64): Likewise.
3770 (tdesc_s390x_tevx_linux64): Likewise.
3771 (have_hwcap_s390_vx): New static variable.
3772 (s390_arch_setup): Fill have_hwcap_s390_vx.
3773 (s390_get_thread_area): New function.
3774 (s390_ft_entry_gpr_esa): New const.
3775 (s390_ft_entry_gpr_zarch): New const.
3776 (s390_ft_entry_misc): New const.
3777 (s390_ft_entry_fr): New const.
3778 (s390_ft_entry_vr): New const.
3779 (s390_ft_main_31): New const.
3780 (s390_ft_main_64): New const.
3781 (s390_ft_exit_fr): New const.
3782 (s390_ft_exit_vr): New const.
3783 (s390_ft_exit_misc): New const.
3784 (s390_ft_exit_gpr_esa): New const.
3785 (s390_ft_exit_gpr_zarch): New const.
3786 (append_insns): New function.
3787 (s390_relocate_instruction): New function.
3788 (s390_install_fast_tracepoint_jump_pad): New function.
3789 (s390_get_min_fast_tracepoint_insn_len): New function.
3790 (s390_get_ipa_tdesc_idx): New function.
3791 (struct linux_target_ops): Wire in the above functions.
3792 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3793 * linux-s390-tdesc.h: New file.
3794
a4105d04
MK
37952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3796
3797 * linux-s390-low.c (s390_supports_tracepoints): New function.
3798 (struct linux_target_ops): Fill supports_tracepoints hook.
3799
35ac8b3e
YQ
38002016-03-18 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-low.c (lwp_signal_can_be_delivered): New function.
3803 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3804
94610ec4
YQ
38052016-03-18 Yao Qi <yao.qi@linaro.org>
3806
3807 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3808 0 if signal is enqueued. Remove 'signal' from one debugging
3809 message. Move one debugging message to some lines below.
3810 Remove code setting 'signal' to 0.
3811
80aea927
YQ
38122016-03-18 Yao Qi <yao.qi@linaro.org>
3813
3814 * linux-low.c (linux_low_filter_event): Remove redundant
3815 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3816
b04fd3be
MK
38172016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3818
3819 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3820 (struct linux_target_ops): Wire in the above.
3821
c40c8d4b
YQ
38222016-03-03 Yao Qi <yao.qi@linaro.org>
3823
3824 * linux-low.c: Update comments to start_step_over.
3825
0f8288ae
YQ
38262016-03-03 Yao Qi <yao.qi@linaro.org>
3827
3828 PR server/19736
3829 * linux-low.c (handle_extended_wait): Set child suspended
3830 if event_lwp->bp_reinsert isn't zero.
3831
fdbd04a8
YQ
38322016-03-02 Yao Qi <yao.qi@linaro.org>
3833
3834 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3835 enqueue_pending_signal.
3836
6896a8fa
MK
38372016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3838
3839 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3840 is actually loaded.
3841
ab503087
MK
38422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3843
3844 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3845 (s390_regmap_3264) [!__s390x__]: New global.
3846 (s390_collect_ptrace_register): Skip map entries containing -1.
3847 (s390_supply_ptrace_register): Ditto.
3848 (s390_fill_gprs_high): New function.
3849 (s390_store_gprs_high): New function.
3850 (s390_regsets): Add NT_S390_HIGH_GPRS.
3851 (s390_get_hwcap): Enable on 31-bit.
3852 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3853 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3854 Detect NT_S390_HIGH_GPRS.
3855 (s390_usrregs_info_3264): Enable on 31-bit.
3856 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3857 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3858
ae91f625
MK
38592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3860
3861 PR gdb/13808
3862 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3863 * configure.srv: Ditto.
3864 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3865 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3866 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3867 (init_registers_amd64_linux): Remove prototype.
3868 (tdesc_amd64_linux): Remove declaration.
3869 (get_ipa_tdesc): New function.
3870 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3871 initialize remaining tdescs.
3872 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3873 (init_registers_i386_linux): Remove prototype.
3874 (tdesc_i386_linux): Remove declaration.
3875 (get_ipa_tdesc): New function.
3876 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3877 initialize remaining tdescs.
3878 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3879 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3880 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3881 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3882 (x86_get_ipa_tdesc_idx): New function.
3883 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3884 * linux-x86-tdesc.h: New file.
3885 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3886 (target_get_ipa_tdesc_idx): New macro.
3887 * tracepoint.c (ipa_tdesc_idx): New macro.
3888 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3889 (symbol_list): Add ipa_tdesc_idx.
3890 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3891 (ipa_tdesc): Remove.
3892 (ipa_tdesc_idx): New variable.
3893 (get_context_regcache): Use get_ipa_tdesc.
3894 (gdb_collect): Ditto.
3895 (gdb_probe): Ditto.
3896 * tracepoint.h (get_ipa_tdesc): New prototype.
3897 (ipa_tdesc): Remove.
3898
e7ad2f14
PA
38992016-02-24 Pedro Alves <palves@redhat.com>
3900
3901 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3902 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3903 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3904 Factor out common code between the USE_SIGTRAP_SIGINFO and
3905 !USE_SIGTRAP_SIGINFO blocks.
3906 (linux_low_filter_event): Call save_stop_reason instead of
3907 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3908 Update comments.
3909 (linux_wait_1): Update comments.
3910
657f9cde
WW
39112016-02-24 Wei-cheng Wang <cole945@gmail.com>
3912
3913 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3914 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3915 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3916 ppc_insert_point, ppc_remove_point.
3917
b00b61e1
MK
39182016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3919
3920 * linux-s390-low.c (s390_supports_z_point_type): New function.
3921 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3922
553cb527
YQ
39232016-02-16 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3926 PC. Get pc from regcache_read_pc.
3927
a5652c21
YQ
39282016-02-12 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3931 or linux_get_pc_32bit.
3932 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3933
ed443b61
YQ
39342016-02-12 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3937 arm_linux_get_next_pcs_fixup.
3938
020ecd38
MK
39392016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3940
3941 * tracepoint.c (x_tracepoint_action_download): Change
3942 write_inferior_data_ptr to write_inferior_data_pointer.
3943 (cmd_qtstart): Likewise.
3944 (write_inferior_data_ptr): Remove.
3945 (download_agent_expr): Change write_inferior_data_ptr to
3946 write_inferior_data_pointer.
3947 (download_tracepoint_1): Likewise.
3948 (download_tracepoint): Likewise.
3949 (download_trace_state_variables): Likewise.
3950
7cae9051
WW
39512016-02-11 Wei-cheng Wang <cole945@gmail.com>
3952 Marcin Kościelnicki <koriakin@0x04.net>
3953
3954 * tracepoint.c (struct tracepoint_action_ops): Remove.
3955 (struct tracepoint_action): Remove ops.
3956 (m_tracepoint_action_download, r_tracepoint_action_download)
3957 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3958 size and offset accordingly.
3959 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3960 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3961 (tracepoint_action_send, tracepoint_action_download): New functions.
3962 Helpers for trace action handlers.
3963 (add_tracepoint_action): Remove setup actions ops.
3964 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3965
9f6a71b4
YQ
39662016-02-10 Yao Qi <yao.qi@linaro.org>
3967
3968 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3969
1e94266c
SM
39702016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3971
3972 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3973 to AC_OUTPUT.
3974 * configure: Regenerate.
3975
8adce034
SM
39762016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3977
3978 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3979 void * to gdb_byte *.
3980 * linux-low.c (siginfo_fixup): Likewise.
3981 (linux_xfer_siginfo): Likewise.
3982 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3983 Likewise.
3984 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3985
93813b37
WT
39862016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3987
3988 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3989 to srv_tgtobj.
3990 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3991 to srv_tgtobj.
3992 * linux-x86-low.c [__x86_64__]: Include
3993 "nat/amd64-linux-siginfo.h".
3994 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3995 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3996 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3997 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3998 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3999 (cpt_si_fd, si_timerid, si_overrun): Move from
4000 nat/amd64-linux-siginfo.c.
4001 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4002
8424cc97
SM
40032016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4004
4005 * server.c (skip_to_semicolon): Remove.
4006 (process_point_options): Use strchrnul instead of
4007 skip_to_semicolon.
4008
4d18591b
YQ
40092016-01-26 Yao Qi <yao.qi@linaro.org>
4010
4011 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4012 * linux-low.c (install_software_single_step_breakpoints): Don't
4013 call regcache_read_pc.
4014 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4015 argument pc.
4016
d8020970
YQ
40172016-01-26 Yao Qi <yao.qi@linaro.org>
4018
4019 * linux-low.c (install_software_single_step_breakpoints): Call
4020 regcache_read_pc instead of get_pc.
4021
8b207339
YQ
40222016-01-26 Yao Qi <yao.qi@linaro.org>
4023
4024 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4025 (unblock_async_io): Rename to ...
4026 (block_unblock_async_io): ... it. New function.
4027 (enable_async_io): Don't install SIGIO handler. Unblock it
4028 instead.
4029 (disable_async_io): Don't ignore SIGIO. Block it instead.
4030 (initialize_async_io): Install SIGIO handler. Don't call
4031 unblock_async_io.
4032
18879fef
YQ
40332016-01-26 Yao Qi <yao.qi@linaro.org>
4034
4035 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4036 first character is '\003', call *the_target->request_interrupt.
4037
a0f8e08a
YQ
40382016-01-25 Yao Qi <yao.qi@linaro.org>
4039
4040 * remote-utils.c (new_thread_notify): Remove.
4041 (dead_thread_notify): Likewise.
4042 * remote-utils.h (new_thread_notify): Remove declaration.
4043 (dead_thread_notify): Likewise.
4044
cc5fd9ab
MK
40452016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4046
4047 * gdb.trace/pending.exp: Fix expected message on continue.
4048
99e8eb11
MK
40492016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4050
4051 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4052 it works properly on big-endian machines where sizeof (CORE_ADDR)
4053 != sizeof (void *).
4054
a994041d
PA
40552016-01-21 Pedro Alves <palves@redhat.com>
4056
4057 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4058 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4059 * configure: Regenerate.
4060
f7a6a40d
YQ
40612016-01-21 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4064 is_thumb and set it according to CPSR saved on the stack.
4065 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4066 arm_sigreturn_next_pc.
4067
6f69e520
YQ
40682016-01-18 Yao Qi <yao.qi@linaro.org>
4069
4070 * linux-low.c (linux_set_pc_64bit): New function.
4071 (linux_get_pc_64bit): New function.
4072 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4073 Declare.
4074 * linux-sparc-low.c (debug_threads): Remove declaration.
4075 (sparc_get_pc): Remove.
4076 (the_low_target): Use linux_get_pc_64bit instead of
4077 sparc_get_pc.
4078 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4079 (the_low_target): Use linux_get_pc_64bit and
4080 linux_set_pc_64bit.
4081
276d4552
YQ
40822016-01-18 Yao Qi <yao.qi@linaro.org>
4083
4084 * linux-arm-low.c (debug_threads): Remove declaration.
4085 (arm_get_pc, arm_set_pc): Remove.
4086 (the_low_target): Use linux_get_pc_32bit and
4087 linux_set_pc_32bit.
4088 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4089 (the_low_target): Use linux_get_pc_32bit and
4090 linux_set_pc_32bit.
4091 * linux-cris-low.c (debug_threads): Remove declaration.
4092 (cris_get_pc, cris_set_pc,): Remove.
4093 (the_low_target): Use linux_get_pc_32bit and
4094 linux_set_pc_32bit.
4095 * linux-crisv32-low.c (debug_threads): Remove declaration.
4096 (cris_get_pc, cris_set_pc): Remove.
4097 (the_low_target): Use linux_get_pc_32bit and
4098 linux_set_pc_32bit.
4099 * linux-low.c: Include inttypes.h.
4100 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4101 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4102 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4103 (the_low_target): Use linux_get_pc_32bit and
4104 linux_set_pc_32bit.
4105 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4106 (the_low_target): Use linux_get_pc_32bit and
4107 linux_set_pc_32bit.
4108 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4109 (the_low_target): Use linux_get_pc_32bit and
4110 linux_set_pc_32bit.
4111 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4112 (the_low_target): Use linux_get_pc_32bit and
4113 linux_set_pc_32bit.
4114 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4115 (the_low_target): Use linux_get_pc_32bit and
4116 linux_set_pc_32bit.
4117
eb0edac8
GB
41182016-01-18 Gary Benson <gbenson@redhat.com>
4119
4120 * configure.ac (AC_FUNC_FORK): New check.
4121 * config.in: Regenerate.
4122 * configure: Likewise.
4123
1b451dda
YQ
41242016-01-14 Yao Qi <yao.qi@linaro.org>
4125
4126 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4127 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4128 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4129 arm_get_next_pcs_ctor.
4130
82075af2
JS
41312016-01-12 Josh Stone <jistone@redhat.com>
4132 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4133
4134 * inferiors.h: Include "gdb_vecs.h".
4135 (struct process_info): Add syscalls_to_catch.
4136 * inferiors.c (remove_process): Free syscalls_to_catch.
4137 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4138 syscall_return stops.
4139 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4140 * server.c (handle_general_set): Handle QCatchSyscalls.
4141 (handle_query): Report support for QCatchSyscalls.
4142 * target.h (struct target_ops): Add supports_catch_syscall.
4143 (target_supports_catch_syscall): New macro.
4144 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4145 (struct lwp_info): Add syscall_state.
4146 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4147 Maintain syscall_state and syscalls_to_catch across exec.
4148 (get_syscall_trapinfo): New function, proxy to the_low_target.
4149 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4150 (linux_low_filter_event): Toggle syscall_state entry/return for
4151 syscall traps, and set it ignored for all others.
4152 (gdb_catching_syscalls_p): New function.
4153 (gdb_catch_this_syscall_p): New function.
4154 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4155 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4156 (linux_supports_catch_syscall): New function.
4157 (linux_target_ops): Install it.
4158 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4159 (the_low_target): Install it.
4160
8f13a3ce
MF
41612016-01-12 Mike Frysinger <vapier@gentoo.org>
4162
4163 * acinclude.m4: Include new ../warning.m4 file.
4164 * configure: Regenerated.
4165 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4166
5b3da067
MF
41672016-01-12 Mike Frysinger <vapier@gentoo.org>
4168
4169 * ax.c (is_goto_target): Mark static.
4170 * linux-low.c (register_addr): Likewise.
4171 (linux_fetch_registers, linux_store_registers): Likewise.
4172 * mem-break.c (any_persistent_commands): Fix old prototype.
4173 (add_commands_to_breakpoint): Mark static.
4174 * regcache.c (find_register_by_name): Delete unused func.
4175 * remote-utils.c (hex_or_minus_one): Mark static.
4176 * server.c (monitor_show_help): Mark static.
4177 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4178 handle_v_requests): Likewise.
4179
bc504a31
PA
41802016-01-12 Pedro Alves <palves@redhat.com>
4181
4182 Remove use of the registered trademark symbol throughout.
4183
5a0dd67a
YQ
41842016-01-08 Yao Qi <yao.qi@linaro.org>
4185
4186 * remote-utils.c (getpkt): If c is '\003', call target hook
4187 request_interrupt.
4188
b2ca446f
YQ
41892016-01-06 Yao Qi <yao.qi@linaro.org>
4190
4191 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4192 linux-aarch32-low.c.
4193 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4194 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4195 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4196 (thumb2_breakpoint): Declare.
4197 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4198 linux-aarch32-low.h.
4199 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4200 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4201 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4202
edd88788
JB
42032016-01-01 Joel Brobecker <brobecker@adacore.com>
4204
4205 * gdbreplay.c (gdbreplay_version): Change copyright year in
4206 version message.
4207 * server.c (gdbserver_version): Likewise.
4208
65da7f14
PP
42092015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4210
4211 * server.c (crc32_table): Delete.
4212 (crc32): Use libiberty's xcrc32 function.
4213
4abd5ed2
JB
42142015-12-22 Joel Brobecker <brobecker@adacore.com>
4215
4216 * lynx-low.c (lynx_delete_thread_callback): New function.
4217 (lynx_mourn): Properly delete our process and all of its
4218 threads. Remove call to clear_inferiors.
4219
0e50fe5c
JB
42202015-12-22 Joel Brobecker <brobecker@adacore.com>
4221
4222 * target.c (thread_search_callback): Add check that
4223 the thread_stopped target callback is not NULL before
4224 calling it.
4225
35adc03f
YQ
42262015-12-21 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4229 arm breakpoint.
4230
bd2b2909
AT
42312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4232
4233 * server.c (handle_query): Call target_supports_software_single_step.
4234
7fe5e27e
AT
42352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4236
4237 * linux-low.c (single_step): New function.
4238 (linux_resume_one_lwp_throw): Call single_step.
4239 (start_step_over): Likewise.
4240
d9311bfa
AT
42412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4242
4243 * Makefile.in (SFILES): Append arch/arm-linux.c,
4244 arch/arm-get-next-pcs.c.
4245 (arm-linux.o): New rule.
4246 (arm-get-next-pcs.o): New rule.
4247 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4248 arm-linux.o.
4249 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4250 to linux-aarch32-low.c.
4251 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4252 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4253 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4254 (thumb2_breakpoint_len): Likewise.
4255 (arm_is_thumb_mode): Make non-static.
4256 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4257 from linux-aarch32-low.c.
4258 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4259 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4260 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4261 (thumb2_breakpoint_len): Likewise.
4262 (arm_is_thumb_mode): New declaration.
4263 * linux-arm-low.c: Include arch/arm-linux.h
4264 aarch/arm-get-next-pcs.h, sys/syscall.h.
4265 (get_next_pcs_ops): New struct.
4266 (get_next_pcs_addr_bits_remove): New function.
4267 (get_next_pcs_is_thumb): New function.
4268 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4269 (arm_sigreturn_next_pc): Likewise.
4270 (get_next_pcs_syscall_next_pc): Likewise.
4271 (arm_gdbserver_get_next_pcs): Likewise.
4272 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4273 Initialize.
4274 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4275 * server.h: Include gdb_vecs.h.
4276
68ce2059
AT
42772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4278
4279 * Makefile.in (SFILES): Append common/common-regcache.c.
4280 (OBS): Append common-regcache.o.
4281 (common-regcache.o): New rule.
4282 * regcache.c (init_register_cache): Initialize cache to
4283 REG_UNAVAILABLE.
4284 (regcache_raw_read_unsigned): New function.
4285 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4286 register_status enum.
4287
fa5308bd
AT
42882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4289
4290 * linux-aarch64-low.c (the_low_targets): Rename
4291 breakpoint_reinsert_addr to get_next_pcs.
4292 * linux-arm-low.c (the_low_targets): Likewise.
4293 * linux-bfin-low.c (the_low_targets): Likewise.
4294 * linux-cris-low.c (the_low_targets): Likewise.
4295 * linux-crisv32-low.c (the_low_targets): Likewise.
4296 * linux-low.c (can_software_single_step): Likewise.
4297 (install_software_single_step_breakpoints): New function.
4298 (start_step_over): Use install_software_single_step_breakpoints.
4299 * linux-low.h: New CORE_ADDR vector.
4300 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4301 get_next_pcs.
4302 * linux-mips-low.c (the_low_targets): Likewise.
4303 * linux-nios2-low.c (the_low_targets): Likewise.
4304 * linux-sparc-low.c (the_low_targets): Likewise.
4305
4a6ed09b
PA
43062015-12-17 Pedro Alves <palves@redhat.com>
4307
4308 * linux-low.c (linux_kill_one_lwp): Remove references to
4309 LinuxThreads.
4310 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4311 to 'kill'.
4312 (linux_init_signals): Delete.
4313 (initialize_low): Adjust.
4314 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4315
7544db95
PA
43162015-12-16 Pedro Alves <palves@redhat.com>
4317
4318 * configure.ac (compiler warning flags): When testing a
4319 -Wno-foo option, check whether -Wfoo works instead.
4320 * configure: Regenerate.
4321
8020350c
DB
43222015-12-11 Don Breazeal <donb@codesourcery.com>
4323
4324 * server.c (process_serial_event): Don't exit from gdbserver
4325 in remote mode if there are still active inferiors.
4326
db91f502
YQ
43272015-12-11 Yao Qi <yao.qi@linaro.org>
4328
4329 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4330 arm_breakpoint_at if the process is 32-bit.
4331
b37a6290
YQ
43322015-12-11 Yao Qi <yao.qi@linaro.org>
4333
4334 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4335 arm breakpoint.
4336
17b1509a
YQ
43372015-12-07 Yao Qi <yao.qi@linaro.org>
4338
4339 * configure.srv: Append arm.o to srv_tgtobj for
4340 aarch64*-*-linux* target.
4341 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4342 from linux-arm-low.c.
4343 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4344 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4345 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4346 (thumb2_breakpoint_len): Likewise.
4347 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4348 (arm_breakpoint_kinds): Likewise.
4349 (arm_breakpoint_kind_from_pc): Likewise.
4350 (arm_sw_breakpoint_from_kind): Likewise.
4351 (arm_breakpoint_kind_from_current_state): Likewise.
4352 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4353 (arm_sw_breakpoint_from_kind): Declare.
4354 (arm_breakpoint_kind_from_current_state): Declare.
4355 (arm_breakpoint_at): Declare.
4356 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4357 arm_sw_breakpoint_from_kind if process is 32-bit.
4358 (aarch64_breakpoint_kind_from_pc): New function.
4359 (aarch64_breakpoint_kind_from_current_state): New function.
4360 (the_low_target): Initialize fields breakpoint_kind_from_pc
4361 and breakpoint_kind_from_current_state.
4362 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4363 linux-aarch32-low.c.
4364 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4365 (arm_breakpoint, arm_breakpoint_len): Likewise.
4366 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4367 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4368 (arm_is_thumb_mode): Likewise.
4369 (arm_breakpoint_at): Likewise.
4370 (arm_breakpoint_kind_from_pc): Likewise.
4371 (arm_sw_breakpoint_from_kind): Likewise.
4372 (arm_breakpoint_kind_from_current_state): Likewise.
4373
4374 Revert:
4375 2015-08-04 Yao Qi <yao.qi@linaro.org>
4376
4377 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4378 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4379 * server.c (extended_protocol): Remove "static".
4380 * server.h (extended_protocol): Declare it.
4381
ece66d65
JS
43822015-12-04 Josh Stone <jistone@redhat.com>
4383
4384 * target.h (struct target_ops) <arch_setup>: Rename to ...
4385 (struct target_ops) <post_create_inferior>: ... this.
4386 (target_arch_setup): Rename to ...
4387 (target_post_create_inferior): ... this, calling post_create_inferior.
4388 * server.c (start_inferior): Update target_arch_setup calls to
4389 target_post_create_inferior.
4390 * linux-low.c (linux_low_ptrace_options): Forward declare.
4391 (linux_arch_setup): Update its comment for general use.
4392 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4393 (struct linux_target_ops): Use linux_post_create_inferior.
4394 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4395 to post_create_inferior.
4396 * nto-low.c (struct nto_target_ops): Likewise.
4397 * spu-low.c (struct spu_target_ops): Likewise.
4398 * win32-low.c (struct win32_target_ops): Likewise.
4399
e58c48b4
AT
44002015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4401
4402 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4403
fbec8956
AT
44042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4405
4406 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4407 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4408 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4410 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4411 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4412 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4413 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4414 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4415 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4416 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4417 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4418
9b4c5f87
AT
44192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4420
4421 * linux-low.c (linux_look_up_symbols): Don't call
4422 linux_supports_traceclone.
4423 * linux-low.h (thread_db_init): Remove use_events argument.
4424 * thread-db.c (thread_db_use_event): Remove global variable.
4425 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4426 (struct thread_db) <td_create_bp>: Remove field.
4427 (thread_db_create_event): Remove function.
4428 (thread_db_enable_reporting): Likewise.
4429 (find_one_thread): Don't check for thread_db_use_events.
4430 (attach_thread): Likewise.
4431 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4432 (try_thread_db_load_1): Don't check for thread_db_use_events.
4433 (thread_db_init): Remove use_events argument and thread events
4434 handling.
4435 (remove_thread_event_breakpoints): Remove function.
4436 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4437
7d00775e
AT
44382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4439
4440 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4441 New function.
4442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4443 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4445 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4446 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4447 Initialize.
4448 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4449 New function.
4450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4451 * linux-low.c (can_hardware_single_step): Use
4452 supports_hardware_single_step.
4453 (can_software_single_step): New function.
4454 (start_step_over): Call can_software_single_step.
4455 (linux_supports_hardware_single_step): New function.
4456 (struct target_ops) <supports_software_single_step>: Initialize.
4457 * linux-low.h (struct linux_target_ops)
4458 <supports_hardware_single_step>: Initialize.
4459 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4461 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4462 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4463 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4465 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4466 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4467 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4468 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4469 Initialize.
4470 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4471 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4472 Initialize.
4473 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4474 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4475 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4476 New function.
4477 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4478 * target.h (struct target_ops): <supports_software_single_step>:
4479 New field.
4480 (target_supports_software_single_step): New macro.
4481
2d97cd35
AT
44822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4483
4484 * linux-low.c (linux_wait_1): Fix pc advance condition.
4485 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4486 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4487
769ef81f
AT
44882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4489
4490 * linux-arm-low.c (arm_is_thumb_mode): New function.
4491 (arm_breakpoint_at): Use arm_is_thumb_mode.
4492 (arm_breakpoint_kind_from_current_state): New function.
4493 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4494 Initialize.
4495 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4496 (linux_breakpoint_kind_from_current_state): New function.
4497 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4498 * linux-low.h (struct linux_target_ops)
4499 <breakpoint_kind_from_current_state>: New field.
4500 * target.h (struct target_ops): Likewise.
4501 (target_breakpoint_kind_from_current_state): New macro.
4502
1bebeeca
PA
45032015-11-30 Pedro Alves <palves@redhat.com>
4504
4505 * linux-low.c (linux_resume): Wake up the event loop before
4506 returning.
4507
a67a9fae
PA
45082015-11-30 Pedro Alves <palves@redhat.com>
4509
4510 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4511 check.
4512 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4513 to -1.
4514 * target.c (struct thread_search): New structure.
4515 (thread_search_callback): New function.
4516 (prev_general_thread): New global.
4517 (prepare_to_access_memory, done_accessing_memory): New functions.
4518 * target.h (prepare_to_access_memory, done_accessing_memory):
4519 Replace macros with function declarations.
4520
f2faf941
PA
45212015-11-30 Pedro Alves <palves@redhat.com>
4522
4523 PR 14618
4524 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4525 report TARGET_WAITKIND_NO_RESUMED.
4526 * remote-utils.c (prepare_resume_reply): Handle
4527 TARGET_WAITKIND_NO_RESUMED.
4528 * server.c (report_no_resumed): New global.
4529 (handle_query) <qSupported>: Handle "no-resumed+". Report
4530 "no-resumed+" support.
4531 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4532 return error if the client doesn't support no-resumed events.
4533 (push_stop_notification): New function.
4534 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4535 events if the client supports them.
4536
a681f9c9
PA
45372015-11-30 Pedro Alves <palves@redhat.com>
4538
4539 * linux-low.c (thread_still_has_status_pending_p): Don't check
4540 vCont;t here.
4541 (lwp_resumed): New function.
4542 (status_pending_p_callback): Return early if the LWP is not
4543 supposed to be resumed.
4544
65706a29
PA
45452015-11-30 Pedro Alves <palves@redhat.com>
4546
4547 * linux-low.c (handle_extended_wait): Assert that the LWP's
4548 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4549 thread create events, leave the new child's status pending.
4550 (linux_low_filter_event): If GDB wants to hear about thread exit
4551 events, leave the LWP marked dead and don't delete it.
4552 (linux_wait_for_event_filtered): Don't check for thread exit.
4553 (filter_exit_event): New function.
4554 (linux_wait_1): Use it, when returning an exit event.
4555 (linux_resume_one_lwp_throw): Assert that the LWP's
4556 waitstatus is TARGET_WAITKIND_IGNORE.
4557 * remote-utils.c (prepare_resume_reply): Handle
4558 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4559 * server.c (report_thread_events): New global.
4560 (handle_general_set): Handle QThreadEvents.
4561 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4562 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4563 TARGET_WAITKIND_THREAD_EXITED.
4564 * server.h (report_thread_events): Declare.
4565
56cf4bed
PA
45662015-11-30 Pedro Alves <palves@redhat.com>
4567
4568 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4569 the thread's last_resume_kind was resume_stop.
4570
500c1d85
PA
45712015-11-30 Pedro Alves <palves@redhat.com>
4572
4573 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4574 before returning.
4575
de979965
PA
45762015-11-30 Pedro Alves <palves@redhat.com>
4577
4578 * server.c (handle_v_requests): Handle vCtrlC.
4579
34c65914
PA
45802015-11-30 Pedro Alves <palves@redhat.com>
4581
4582 * gdbthread.h (find_any_thread_of_pid): Declare.
4583 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4584 functions.
4585 * server.c (handle_query): If current_thread is NULL, look for
4586 another thread of the selected process.
4587
79efa585 45882015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4589 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4590
4591 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4592 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4593 name in reply.
4594 * target.h (struct target_ops) <thread_name>: New field.
4595 (target_thread_name): New macro.
4596
80d82c19
JB
45972015-11-23 Joel Brobecker <brobecker@adacore.com>
4598
4599 * regcache.h (regcache_invalidate_pid): Add declaration.
4600 * regcache.c (regcache_invalidate_pid): New function, extracted
4601 from regcache_invalidate.
4602 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4603 Add trivial documentation comment.
4604 * lynx-low.c: Use regcache_invalidate_pid instead of
4605 regcache_invalidate.
4606
64da5dd5
JB
46072015-11-23 Joel Brobecker <brobecker@adacore.com>
4608
4609 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4610 and Elf64_auxv_t if the target is Android.
4611
37ce4055
DE
46122015-11-22 Doug Evans <xdje42@gmail.com>
4613
4614 * target.h: #include <sys/types.h>.
4615
06e03fff
PA
46162015-11-19 Pedro Alves <palves@redhat.com>
4617
4618 * linux-low.c (linux_process_qsupported): Change prototype.
4619 Adjust.
4620 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4621 Change prototype.
4622 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4623 and adjust to loop over all features.
4624 * server.c (handle_query) <qSupported>: Adjust to call
4625 target_process_qsupported once, passing it a vector of unprocessed
4626 features.
4627 * target.h (struct target_ops) <process_qsupported>: Change
4628 prototype.
4629 (target_process_qsupported): Adjust.
4630
9a084706
PA
46312015-11-19 Pedro Alves <palves@redhat.com>
4632
4633 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4634 mode.
4635 * configure: Regenerate.
4636
dad44a1f
PA
46372015-11-19 Pedro Alves <palves@redhat.com>
4638
4639 * configure: Regenerate.
4640
231c0592
YQ
46412015-11-19 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4644 type to uint32_t.
4645
6c1c9a8b
YQ
46462015-11-19 Yao Qi <yao.qi@linaro.org>
4647
4648 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4649 (struct aarch64_operand): Move enum out.
4650
9caa3311
YQ
46512015-11-19 Yao Qi <yao.qi@linaro.org>
4652
4653 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4654 struct user_fpsimd_state *.
4655 (aarch64_store_fpregset): Likewise.
4656
6a69a054
YQ
46572015-11-19 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4660 struct user_pt_regs *.
4661 (aarch64_store_gregset): Likewise.
4662
1798301e
PA
46632015-11-18 Pedro Alves <palves@redhat.com>
4664
4665 * Makefile.in (all_object_files): Add $IPA_OBJS.
4666
ce7715e2
PA
46672015-11-17 Pedro Alves <palves@redhat.com>
4668
4669 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4670 GDB_SIGNAL_0 and gdb_signal_to_string.
4671
c0879059
PA
46722015-11-17 Pedro Alves <palves@redhat.com>
4673
4674 * win32-low.c (handle_output_debug_string): Remove parameter.
4675 (win32_kill): Remove our_status local and adjust call to
4676 handle_output_debug_string.
4677 (get_child_debug_event): Adjust call to
4678 handle_output_debug_string.
4679
1996e237
SM
46802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4681
4682 * linux-mips-low.c (mips_fill_gregset): Add cast.
4683 (mips_store_gregset): Likewise.
4684 (mips_fill_fpregset): Likewise.
4685 (mips_store_fpregset): Likewise.
4686
cbec665b
SM
46872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4688
4689 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4690 priv.
4691
eb3e3c67
SM
46922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4693
4694 * linux-mips-low.c (mips_linux_new_thread): Change type of
4695 watch_type to enum target_hw_bp_type.
4696
171de4b8
SM
46972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4698
4699 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4700 Change return type to arm_hwbp_type.
4701
04248ead
SM
47022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4703
4704 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4705 (arm_store_gregset): Likewise.
4706 * linux-arm-low.c (arm_get_hwcap): Likewise.
4707 (arm_read_description): Likewise.
4708
04b3479c
SM
47092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4710
4711 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4712
2bc84e8a
SM
47132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4714
4715 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4716 (ppc_fill_vsxregset): Likewise.
4717 (ppc_store_vsxregset): Likewise.
4718 (ppc_fill_vrregset): Likewise.
4719 (ppc_store_vrregset): Likewise.
4720 (ppc_fill_evrregset): Likewise.
4721 (ppc_store_evrregset): Likewise.
4722
e6c5bb05
SM
47232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4724
4725 * linux-ppc-low.c (ppc_usrregs_info): Remove
4726 forward-declaration.
4727 (ppc_arch_setup): Move lower in file.
4728
7ea45d72
SM
47292015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4730
4731 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4732 (ps_pdwrite): Likewise.
4733
69291610
HW
47342015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4735
4736 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4737 to after assert checks.
4738
b42945fd
SM
47392015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4740
4741 * proc-service.c (ps_pdread): Add/adjust casts.
4742 (ps_pdwrite): Add/adjust casts.
4743
d6f85c84
SM
47442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4745
4746 * server.c (handle_search_memory_1): Cast return value of
4747 memmem.
4748
f98cd059
SM
47492015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4750
4751 * server.c (write_qxfer_response): Change type of data to
4752 gdb_byte *.
4753
d2412fa5
PA
47542015-10-29 Pedro Alves <palves@redhat.com>
4755
4756 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4757
c17414a2
PA
47582015-10-29 Pedro Alves <palves@redhat.com>
4759
4760 * tracepoint.c (clear_installed_tracepoints): Add casts.
4761
e053fbc4
PA
47622015-10-29 Pedro Alves <palves@redhat.com>
4763
4764 * server.c (handle_v_cont, process_serial_event): Add enum
4765 gdb_signal casts to signal parsing code.
4766
add67df8
PA
47672015-10-29 Pedro Alves <palves@redhat.com>
4768
4769 * linux-low.h (NULL_REGSET): Define.
4770 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4771 * linux-arm-low.c (arm_regsets): Likewise.
4772 * linux-crisv32-low.c (cris_regsets): Likewise.
4773 * linux-m68k-low.c (m68k_regsets): Likewise.
4774 * linux-mips-low.c (mips_regsets): Likewise.
4775 * linux-nios2-low.c (nios2_regsets): Likewise.
4776 * linux-ppc-low.c (ppc_regsets): Likewise.
4777 * linux-s390-low.c (s390_regsets): Likewise.
4778 * linux-sh-low.c (sh_regsets): Likewise.
4779 * linux-sparc-low.c (sparc_regsets): Likewise.
4780 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4781 * linux-tile-low.c (tile_regsets): Likewise.
4782 * linux-x86-low.c (x86_regsets): Likewise.
4783 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4784
50bc912a
PA
47852015-10-29 Pedro Alves <palves@redhat.com>
4786
4787 * linux-low.h (NULL_REGSET): Define.
4788 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4789 * linux-arm-low.c (arm_regsets): Likewise.
4790 * linux-crisv32-low.c (cris_regsets): Likewise.
4791 * linux-m68k-low.c (m68k_regsets): Likewise.
4792 * linux-mips-low.c (mips_regsets): Likewise.
4793 * linux-nios2-low.c (nios2_regsets): Likewise.
4794 * linux-ppc-low.c (ppc_regsets): Likewise.
4795 * linux-s390-low.c (s390_regsets): Likewise.
4796 * linux-sh-low.c (sh_regsets): Likewise.
4797 * linux-sparc-low.c (sparc_regsets): Likewise.
4798 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4799 * linux-tile-low.c (tile_regsets): Likewise.
4800 * linux-x86-low.c (x86_regsets): Likewise.
4801 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4802
682b2546
DE
48032015-10-26 Doug Evans <dje@google.com>
4804
4805 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4806
963843d4
DE
48072015-10-26 Doug Evans <dje@google.com>
4808
4809 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4810
d41401ac
DE
48112015-10-26 Doug Evans <dje@google.com>
4812
4813 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4814 for debug_printf.
4815 (attach_thread, find_new_threads_callback): Ditto.
4816
3db28855
AT
48172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4818
4819 * mem-break.h (set_breakpoint_data): Remove.
4820
fb78e89c
AT
48212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4822
4823 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4824 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4825 (initialize_low): Remove set_breakpoint_data call.
4826 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4827 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4828 (initialize_low): Remove set_breakpoint_data call.
4829 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4830 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4831 (initialize_low): Remove set_breakpoint_data call.
4832
2e6ee069
AT
48332015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4834
4835 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4836 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4837 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4838 * target.h (target_breakpoint_kind_from_pc): New macro.
4839
1652a986
AT
48402015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4841
4842 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4843 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4844 the default breakpoint kind.
4845
abeead09
AT
48462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4847
4848 * linux-arm-low.c (arm_supports_z_point_type): Add software
4849 breakpoint support.
4850
b0b4b501
AT
48512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4852
4853 * linux-arm-low.c: Refactor breakpoint definitions.
4854 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4855 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4856
8689682c
AT
48572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4858
4859 * Makefile.in: Add arm.c/o.
4860 * configure.srv: Likewise.
4861 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4862 (arm_breakpoint_kind_from_pc): New function.
4863 (arm_sw_breakpoint_from_kind): Return proper kind.
4864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4865
27165294
AT
48662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4867
4868 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4869 removal.
4870 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4871 (struct raw_breakpoint) <size>: Remove.
4872 (struct raw_breakpoint) <kind>: Add.
4873 (bp_size): New function.
4874 (bp_opcode): Likewise.
4875 (find_raw_breakpoint_at): Adjust for kind.
4876 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4877 (remove_memory_breakpoint): Adjust for kind call bp_size.
4878 (set_raw_breakpoint_at): Adjust for kind.
4879 (set_breakpoint): Likewise.
4880 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4881 (delete_raw_breakpoint): Adjust for kind.
4882 (delete_breakpoint): Likewise.
4883 (find_gdb_breakpoint): Likewise.
4884 (set_gdb_breakpoint_1): Likewise.
4885 (set_gdb_breakpoint): Likewise.
4886 (delete_gdb_breakpoint_1): Likewise.
4887 (delete_gdb_breakpoint): Likewise.
4888 (uninsert_raw_breakpoint): Likewise.
4889 (reinsert_raw_breakpoint): Likewise.
4890 (set_breakpoint_data): Remove.
4891 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4892 (check_mem_read): Adjust for kind call bp_size.
4893 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4894 (clone_one_breakpoint): Adjust for kind.
4895 * mem-break.h (set_gdb_breakpoint): Likewise.
4896 (delete_gdb_breakpoint): Likewise.
4897 * server.c (process_serial_event): Likewise.
4898
dd373349
AT
48992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4900
4901 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4902 (struct linux_target_ops) <breakpoint>: Remove.
4903 (struct linux_target_ops) <breakpoint_len>: Remove.
4904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4906 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4907 (arm_sw_breakpoint_from_kind): New function.
4908 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4909 (struct linux_target_ops) <breakpoint>: Remove.
4910 (struct linux_target_ops) <breakpoint_len>: Remove.
4911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4913 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4914 (struct linux_target_ops) <breakpoint>: Remove.
4915 (struct linux_target_ops) <breakpoint_len>: Remove.
4916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4918 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4919 (struct linux_target_ops) <breakpoint>: Remove.
4920 (struct linux_target_ops) <breakpoint_len>: Remove.
4921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4923 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4924 and sw_breakpoint_from_kind to increment the pc.
4925 (linux_breakpoint_kind_from_pc): New function.
4926 (linux_sw_breakpoint_from_kind): New function.
4927 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4928 (initialize_low): Call breakpoint_kind_from_pc and
4929 sw_breakpoint_from_kind to replace breakpoint_data/len.
4930 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4931 New field.
4932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4933 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4934 (struct linux_target_ops) <breakpoint>: Remove.
4935 (struct linux_target_ops) <breakpoint_len>: Remove.
4936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4938 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4939 (struct linux_target_ops) <breakpoint>: Remove.
4940 (struct linux_target_ops) <breakpoint_len>: Remove.
4941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4943 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4944 (struct linux_target_ops) <breakpoint>: Remove.
4945 (struct linux_target_ops) <breakpoint_len>: Remove.
4946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4948 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4949 (struct linux_target_ops) <breakpoint>: Remove.
4950 (struct linux_target_ops) <breakpoint_len>: Remove.
4951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4953 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4954 (struct linux_target_ops) <breakpoint>: Remove.
4955 (struct linux_target_ops) <breakpoint_len>: Remove.
4956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4958 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4959 (struct linux_target_ops) <breakpoint>: Remove.
4960 (struct linux_target_ops) <breakpoint_len>: Remove.
4961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4963 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4964 (struct linux_target_ops) <breakpoint>: Remove.
4965 (struct linux_target_ops) <breakpoint_len>: Remove.
4966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4968 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4969 (struct linux_target_ops) <breakpoint>: Remove.
4970 (struct linux_target_ops) <breakpoint_len>: Remove.
4971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4973 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4974 (struct linux_target_ops) <breakpoint>: Remove.
4975 (struct linux_target_ops) <breakpoint_len>: Remove.
4976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4978 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4979 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4980 (struct linux_target_ops) <breakpoint>: Remove.
4981 (struct linux_target_ops) <breakpoint_len>: Remove.
4982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4984 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4985 (struct linux_target_ops) <breakpoint>: Remove.
4986 (struct linux_target_ops) <breakpoint_len>: Remove.
4987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4989
4cd98a19
AT
49902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4991
4992 * linux-cris-low.c (cris_get_pc): Remove void arg.
4993
774ee6d2
AR
49942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4995
4996 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4997 variable name.
4998
833dcd29
AR
49992015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5000
5001 * inferiors.c (thread_pid_matches_callback): New function.
5002 (find_thread_process): New function.
5003 (remove_thread): Reset current_thread.
5004 (remove_process): Assert threads have been removed first.
5005
8d689ee5
YQ
50062015-10-15 Yao Qi <yao.qi@linaro.org>
5007
5008 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5009 if it is 3.
5010 (aarch64_remove_point): Likewise.
5011 * regcache.c (regcache_register_size): New function.
5012
1c2e1515
YQ
50132015-10-12 Yao Qi <yao.qi@linaro.org>
5014
5015 * linux-aarch64-low.c: Update all callers as emit_load_store
5016 is renamed to aarch64_emit_load_store.
5017
e1c587c3
YQ
50182015-10-12 Yao Qi <yao.qi@linaro.org>
5019
5020 * linux-aarch64-low.c: Update all callers of function renaming
5021 from emit_insn to aarch64_emit_insn.
5022
b6542f81
YQ
50232015-10-12 Yao Qi <yao.qi@linaro.org>
5024
5025 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5026 arch/aarch64-insn.h.
5027 (struct aarch64_memory_operand): Likewise.
5028 (ENCODE): Likewise.
5029 (emit_insn): Move to arch/aarch64-insn.c.
5030 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5031 (emit_load_store): Move to arch/aarch64-insn.c.
5032 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5033 (can_encode_int32): Remove.
5034
246994ce
YQ
50352015-10-12 Yao Qi <yao.qi@linaro.org>
5036
5037 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5038 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5039 (aarch64_relocate_instruction): Likewise.
5040 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5041 (struct aarch64_insn_visitor): Likewise.
5042
0badd99f
YQ
50432015-10-12 Yao Qi <yao.qi@linaro.org>
5044
5045 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5046 (struct aarch64_insn_visitor): New.
5047 (struct aarch64_insn_relocation_data): New.
5048 (aarch64_ftrace_insn_reloc_b): New function.
5049 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5050 (aarch64_ftrace_insn_reloc_cb): Likewise.
5051 (aarch64_ftrace_insn_reloc_tb): Likewise.
5052 (aarch64_ftrace_insn_reloc_adr): Likewise.
5053 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5054 (aarch64_ftrace_insn_reloc_others): Likewise.
5055 (visitor): New.
5056 (aarch64_relocate_instruction): Use visitor.
5057
dfaffe9d
YQ
50582015-10-12 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5061 int. Add argument buf.
5062 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5063 aarch64_relocate_instruction.
5064
70b439f0
YQ
50652015-10-12 Yao Qi <yao.qi@linaro.org>
5066
5067 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5068 argument insn. Remove local variable insn. Don't call
5069 target_read_uint32.
5070 (aarch64_install_fast_tracepoint_jump_pad): Call
5071 target_read_uint32.
5072
7781c06f
YQ
50732015-09-30 Yao Qi <yao.qi@linaro.org>
5074
5075 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5076 (emit_load_store_pair): Likewise.
5077
9a3c8263
SM
50782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5079
5080 * dll.c (match_dll): Add cast(s).
5081 (unloaded_dll): Likewise.
5082 * linux-low.c (second_thread_of_pid_p): Likewise.
5083 (delete_lwp_callback): Likewise.
5084 (count_events_callback): Likewise.
5085 (select_event_lwp_callback): Likewise.
5086 (linux_set_resume_request): Likewise.
5087 * server.c (accumulate_file_name_length): Likewise.
5088 (emit_dll_description): Likewise.
5089 (handle_qxfer_threads_worker): Likewise.
5090 (visit_actioned_threads): Likewise.
5091 * thread-db.c (any_thread_of): Likewise.
5092 * tracepoint.c (same_process_p): Likewise.
5093 (match_blocktype): Likewise.
5094 (build_traceframe_info_xml): Likewise.
5095
224c3ddb
SM
50962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5097
5098 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5099 assignment.
5100 (gdb_unparse_agent_expr): Likewise.
5101 * hostio.c (require_data): Likewise.
5102 (handle_pread): Likewise.
5103 * linux-low.c (disable_regset): Likewise.
5104 (fetch_register): Likewise.
5105 (store_register): Likewise.
5106 (get_dynamic): Likewise.
5107 (linux_qxfer_libraries_svr4): Likewise.
5108 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5109 (set_fast_tracepoint_jump): Likewise.
5110 (uninsert_fast_tracepoint_jumps_at): Likewise.
5111 (reinsert_fast_tracepoint_jumps_at): Likewise.
5112 (validate_inserted_breakpoint): Likewise.
5113 (clone_agent_expr): Likewise.
5114 * regcache.c (init_register_cache): Likewise.
5115 * remote-utils.c (putpkt_binary_1): Likewise.
5116 (decode_M_packet): Likewise.
5117 (decode_X_packet): Likewise.
5118 (look_up_one_symbol): Likewise.
5119 (relocate_instruction): Likewise.
5120 (monitor_output): Likewise.
5121 * server.c (handle_search_memory): Likewise.
5122 (handle_qxfer_exec_file): Likewise.
5123 (handle_qxfer_libraries): Likewise.
5124 (handle_qxfer): Likewise.
5125 (handle_query): Likewise.
5126 (handle_v_cont): Likewise.
5127 (handle_v_run): Likewise.
5128 (captured_main): Likewise.
5129 * target.c (write_inferior_memory): Likewise.
5130 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5131 * tracepoint.c (init_trace_buffer): Likewise.
5132 (add_tracepoint_action): Likewise.
5133 (add_traceframe): Likewise.
5134 (add_traceframe_block): Likewise.
5135 (cmd_qtdpsrc): Likewise.
5136 (cmd_qtdv): Likewise.
5137 (cmd_qtstatus): Likewise.
5138 (response_source): Likewise.
5139 (response_tsv): Likewise.
5140 (cmd_qtnotes): Likewise.
5141 (gdb_collect): Likewise.
5142 (initialize_tracepoint): Likewise.
5143
afbe19f8
PL
51442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5145
5146 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5147 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5148 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5149 <NOP>: New.
5150 (enum aarch64_condition_codes): New enum.
5151 (w0): New static global.
5152 (fp): Likewise.
5153 (lr): Likewise.
5154 (struct aarch64_memory_operand) <type>: New
5155 MEMORY_OPERAND_POSTINDEX type.
5156 (postindex_memory_operand): New helper function.
5157 (emit_ret): New function.
5158 (emit_load_store_pair): New function, factored out of emit_stp
5159 with support for MEMORY_OPERAND_POSTINDEX.
5160 (emit_stp): Rewrite using emit_load_store_pair.
5161 (emit_ldp): New function.
5162 (emit_load_store): Likewise.
5163 (emit_ldr): Mention post-index instruction in comment.
5164 (emit_ldrh): New function.
5165 (emit_ldrb): New function.
5166 (emit_ldrsw): Mention post-index instruction in comment.
5167 (emit_str): Likewise.
5168 (emit_subs): New function.
5169 (emit_cmp): Likewise.
5170 (emit_and): Likewise.
5171 (emit_orr): Likewise.
5172 (emit_orn): Likewise.
5173 (emit_eor): Likewise.
5174 (emit_mvn): Likewise.
5175 (emit_lslv): Likewise.
5176 (emit_lsrv): Likewise.
5177 (emit_asrv): Likewise.
5178 (emit_mul): Likewise.
5179 (emit_sbfm): Likewise.
5180 (emit_sbfx): Likewise.
5181 (emit_ubfm): Likewise.
5182 (emit_ubfx): Likewise.
5183 (emit_csinc): Likewise.
5184 (emit_cset): Likewise.
5185 (emit_nop): Likewise.
5186 (emit_ops_insns): New helper function.
5187 (emit_pop): Likewise.
5188 (emit_push): Likewise.
5189 (aarch64_emit_prologue): New function.
5190 (aarch64_emit_epilogue): Likewise.
5191 (aarch64_emit_add): Likewise.
5192 (aarch64_emit_sub): Likewise.
5193 (aarch64_emit_mul): Likewise.
5194 (aarch64_emit_lsh): Likewise.
5195 (aarch64_emit_rsh_signed): Likewise.
5196 (aarch64_emit_rsh_unsigned): Likewise.
5197 (aarch64_emit_ext): Likewise.
5198 (aarch64_emit_log_not): Likewise.
5199 (aarch64_emit_bit_and): Likewise.
5200 (aarch64_emit_bit_or): Likewise.
5201 (aarch64_emit_bit_xor): Likewise.
5202 (aarch64_emit_bit_not): Likewise.
5203 (aarch64_emit_equal): Likewise.
5204 (aarch64_emit_less_signed): Likewise.
5205 (aarch64_emit_less_unsigned): Likewise.
5206 (aarch64_emit_ref): Likewise.
5207 (aarch64_emit_if_goto): Likewise.
5208 (aarch64_emit_goto): Likewise.
5209 (aarch64_write_goto_address): Likewise.
5210 (aarch64_emit_const): Likewise.
5211 (aarch64_emit_call): Likewise.
5212 (aarch64_emit_reg): Likewise.
5213 (aarch64_emit_pop): Likewise.
5214 (aarch64_emit_stack_flush): Likewise.
5215 (aarch64_emit_zero_ext): Likewise.
5216 (aarch64_emit_swap): Likewise.
5217 (aarch64_emit_stack_adjust): Likewise.
5218 (aarch64_emit_int_call_1): Likewise.
5219 (aarch64_emit_void_call_2): Likewise.
5220 (aarch64_emit_eq_goto): Likewise.
5221 (aarch64_emit_ne_goto): Likewise.
5222 (aarch64_emit_lt_goto): Likewise.
5223 (aarch64_emit_le_goto): Likewise.
5224 (aarch64_emit_gt_goto): Likewise.
5225 (aarch64_emit_ge_got): Likewise.
5226 (aarch64_emit_ops_impl): New static global variable.
5227 (aarch64_emit_ops): New target function, return
5228 &aarch64_emit_ops_impl.
5229 (struct linux_target_ops): Install it.
5230
bb903df0
PL
52312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5232
5233 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5234 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5235 aarch64-ipa.o.
5236 * linux-aarch64-ipa.c: New file.
5237 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5238 and endian.h.
5239 (aarch64_get_thread_area): New target method.
5240 (extract_signed_bitfield): New helper function.
5241 (aarch64_decode_ldr_literal): New function.
5242 (enum aarch64_opcodes): New enum.
5243 (struct aarch64_register): New struct.
5244 (struct aarch64_operand): New struct.
5245 (x0): New static global.
5246 (x1): Likewise.
5247 (x2): Likewise.
5248 (x3): Likewise.
5249 (x4): Likewise.
5250 (w2): Likewise.
5251 (ip0): Likewise.
5252 (sp): Likewise.
5253 (xzr): Likewise.
5254 (aarch64_register): New helper function.
5255 (register_operand): Likewise.
5256 (immediate_operand): Likewise.
5257 (struct aarch64_memory_operand): New struct.
5258 (offset_memory_operand): New helper function.
5259 (preindex_memory_operand): Likewise.
5260 (enum aarch64_system_control_registers): New enum.
5261 (ENCODE): New macro.
5262 (emit_insn): New helper function.
5263 (emit_b): New function.
5264 (emit_bcond): Likewise.
5265 (emit_cb): Likewise.
5266 (emit_tb): Likewise.
5267 (emit_blr): Likewise.
5268 (emit_stp): Likewise.
5269 (emit_ldp_q_offset): Likewise.
5270 (emit_stp_q_offset): Likewise.
5271 (emit_load_store): Likewise.
5272 (emit_ldr): Likewise.
5273 (emit_ldrsw): Likewise.
5274 (emit_str): Likewise.
5275 (emit_ldaxr): Likewise.
5276 (emit_stxr): Likewise.
5277 (emit_stlr): Likewise.
5278 (emit_data_processing_reg): Likewise.
5279 (emit_data_processing): Likewise.
5280 (emit_add): Likewise.
5281 (emit_sub): Likewise.
5282 (emit_mov): Likewise.
5283 (emit_movk): Likewise.
5284 (emit_mov_addr): Likewise.
5285 (emit_mrs): Likewise.
5286 (emit_msr): Likewise.
5287 (emit_sevl): Likewise.
5288 (emit_wfe): Likewise.
5289 (append_insns): Likewise.
5290 (can_encode_int32_in): New helper function.
5291 (aarch64_relocate_instruction): New function.
5292 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5293 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5294 (struct linux_target_ops): Install aarch64_get_thread_area,
5295 aarch64_install_fast_tracepoint_jump_pad and
5296 aarch64_get_min_fast_tracepoint_insn_len.
5297
787749ea
PL
52982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5299
5300 * Makefile.in (aarch64-insn.o): New rule.
5301 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5302
9812b2e6
YQ
53032015-09-21 Yao Qi <yao.qi@linaro.org>
5304
5305 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5306
18fe412b
YQ
53072015-09-21 Yao Qi <yao.qi@linaro.org>
5308
5309 * tracepoint.c (max_jump_pad_size): Remove.
5310
a0cc84cd
YQ
53112015-09-18 Yao Qi <yao.qi@linaro.org>
5312
5313 * linux-aarch64-low.c: Don't include sys/uio.h.
5314 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5315
d78908cf
WW
53162015-09-16 Wei-cheng Wang <cole945@gmail.com>
5317
5318 * tracepoint.c (eval_result_type): Change prototype.
5319 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5320
d57e0d50
PA
53212015-09-15 Pedro Alves <palves@redhat.com>
5322
5323 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5324 Check whether to report exec events instead of checking whether
5325 multiprocess is enabled.
5326
5a676acc
PA
53272015-09-15 Pedro Alves <palves@redhat.com>
5328
5329 PR remote/18965
5330 * remote-utils.c (prepare_resume_reply): Merge
5331 TARGET_WAITKIND_VFORK_DONE switch case with the
5332 TARGET_WAITKIND_FORKED case.
5333
7c5d0fad
YQ
53342015-09-15 Yao Qi <yao.qi@linaro.org>
5335
5336 * server.c (handle_query): Check string comparison using
5337 "else if" instead of "if".
5338
750ce8d1
YQ
53392015-09-15 Yao Qi <yao.qi@linaro.org>
5340
5341 * server.c (vCont_supported): New global variable.
5342 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5343 matches. Append ";vContSupported+" to own_buf.
5344 (handle_v_requests): Append ";s;S" to own_buf if target supports
5345 hardware single step or vCont_supported is false.
5346 (capture_main): Set vCont_supported to zero.
5347
70b90b91
YQ
53482015-09-15 Yao Qi <yao.qi@linaro.org>
5349
5350 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5351 it to ...
5352 (linux_supports_hardware_single_step): ... New function.
5353 (linux_target_ops): Update.
5354 * lynx-low.c (lynx_target_ops): Set field
5355 supports_hardware_single_step to target_can_do_hardware_single_step.
5356 * nto-low.c (nto_target_ops): Likewise.
5357 * spu-low.c (spu_target_ops): Likewise.
5358 * win32-low.c (win32_target_ops): Likewise.
5359 * target.c (target_can_do_hardware_single_step): New function.
5360 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5361 Remove. <supports_hardware_single_step>: New field.
5362 (target_supports_conditional_breakpoints): Remove.
5363 (target_supports_hardware_single_step): New macro.
5364 (target_can_do_hardware_single_step): Declare.
5365 * server.c (handle_query): Use target_supports_hardware_single_step
5366 instead of target_supports_conditional_breakpoints.
5367
ade90bde
YQ
53682015-09-15 Yao Qi <yao.qi@linaro.org>
5369
5370 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5371 function.
5372 (struct linux_target_ops the_low_target): Install
5373 aarch64_linux_siginfo_fixup.
5374
94585166
DB
53752015-09-11 Don Breazeal <donb@codesourcery.com>
5376 Luis Machado <lgustavo@codesourcery.com>
5377
5378 * linux-low.c (linux_mourn): Static declaration.
5379 (linux_arch_setup): Move in front of
5380 handle_extended_wait.
5381 (linux_arch_setup_thread): New function.
5382 (handle_extended_wait): Handle exec events. Call
5383 linux_arch_setup_thread. Make event_lwp argument a
5384 pointer-to-a-pointer.
5385 (check_zombie_leaders): Do not check stopped threads.
5386 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5387 (linux_low_filter_event): Add lwp and thread for exec'ing
5388 non-leader thread if leader thread has been deleted.
5389 Refactor code into linux_arch_setup_thread and call it.
5390 Pass child lwp pointer by reference to handle_extended_wait.
5391 (linux_wait_for_event_filtered): Update comment.
5392 (linux_wait_1): Prevent clobbering exec event status.
5393 (linux_supports_exec_events): New function.
5394 (linux_target_ops) <supports_exec_events>: Initialize new member.
5395 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5396 new member.
5397 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5398 * server.c (report_exec_events): New global variable.
5399 (handle_query): Handle qSupported query for exec-events feature.
5400 (captured_main): Initialize report_exec_events.
5401 * server.h (report_exec_events): Declare new global variable.
5402 * target.h (struct target_ops) <supports_exec_events>: New
5403 member.
5404 (target_supports_exec_events): New macro.
5405 * win32-low.c (win32_target_ops) <supports_exec_events>:
5406 Initialize new member.
5407
0568462b
MM
54082015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5409
5410 * linux-low.c (linux_low_enable_btrace): Remove.
5411 (linux_target_ops): Replace linux_low_enable_btrace with
5412 linux_enable_btrace.
5413
39edd165
YQ
54142015-09-03 Yao Qi <yao.qi@linaro.org>
5415
5416 * linux-aarch64-low.c (aarch64_insert_point): Call
5417 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5418 returns true.
5419
1db33b5a
UW
54202015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5421
5422 * linux-low.c (check_stopped_by_breakpoint): Use
5423 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5424
ab290430
PA
54252015-08-27 Pedro Alves <palves@redhat.com>
5426
5427 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5428
8d749320
SM
54292015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5430
6711b7f8
SM
5431 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5432 the XNEW-family equivalent.
8d749320
SM
5433 (compile_bytecodes): Likewise.
5434 * dll.c (loaded_dll): Likewise.
5435 * event-loop.c (append_callback_event): Likewise.
5436 (create_file_handler): Likewise.
5437 (create_file_event): Likewise.
5438 * hostio.c (handle_open): Likewise.
5439 * inferiors.c (add_thread): Likewise.
5440 (add_process): Likewise.
5441 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5442 * linux-arm-low.c (arm_new_process): Likewise.
5443 (arm_new_thread): Likewise.
5444 * linux-low.c (add_to_pid_list): Likewise.
5445 (linux_add_process): Likewise.
5446 (handle_extended_wait): Likewise.
5447 (add_lwp): Likewise.
5448 (enqueue_one_deferred_signal): Likewise.
5449 (enqueue_pending_signal): Likewise.
5450 (linux_resume_one_lwp_throw): Likewise.
5451 (linux_resume_one_thread): Likewise.
5452 (linux_read_memory): Likewise.
5453 (linux_write_memory): Likewise.
5454 * linux-mips-low.c (mips_linux_new_process): Likewise.
5455 (mips_linux_new_thread): Likewise.
5456 (mips_add_watchpoint): Likewise.
5457 * linux-x86-low.c (initialize_low_arch): Likewise.
5458 * lynx-low.c (lynx_add_process): Likewise.
5459 * mem-break.c (set_raw_breakpoint_at): Likewise.
5460 (set_breakpoint): Likewise.
5461 (add_condition_to_breakpoint): Likewise.
5462 (add_commands_to_breakpoint): Likewise.
5463 (clone_agent_expr): Likewise.
5464 (clone_one_breakpoint): Likewise.
5465 * regcache.c (new_register_cache): Likewise.
5466 * remote-utils.c (look_up_one_symbol): Likewise.
5467 * server.c (queue_stop_reply): Likewise.
5468 (start_inferior): Likewise.
5469 (queue_stop_reply_callback): Likewise.
5470 (handle_target_event): Likewise.
5471 * spu-low.c (fetch_ppc_memory): Likewise.
5472 (store_ppc_memory): Likewise.
5473 * target.c (set_target_ops): Likewise.
5474 * thread-db.c (thread_db_load_search): Likewise.
5475 (try_thread_db_load_1): Likewise.
5476 * tracepoint.c (add_tracepoint): Likewise.
5477 (add_tracepoint_action): Likewise.
5478 (create_trace_state_variable): Likewise.
5479 (cmd_qtdpsrc): Likewise.
5480 (cmd_qtro): Likewise.
5481 (add_while_stepping_state): Likewise.
5482 * win32-low.c (child_add_thread): Likewise.
5483 (get_image_name): Likewise.
5484
ed8b7b42
YQ
54852015-08-25 Yao Qi <yao.qi@linaro.org>
5486
5487 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5488
db3cb7cb
YQ
54892015-08-25 Yao Qi <yao.qi@linaro.org>
5490
5491 * Makefile.in (aarch64-linux.o): New rule.
5492 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5493 srv_tgtobj.
5494 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5495 (aarch64_init_debug_reg_state): Make it extern.
5496 (aarch64_linux_prepare_to_resume): Remove.
5497
f6011a1c
YQ
54982015-08-25 Yao Qi <yao.qi@linaro.org>
5499
5500 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5501 lwp_arch_private_info and ptid_of_lwp.
5502
88e2cf7e
YQ
55032015-08-25 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5506 Find proc_info by find_process_pid. All callers updated.
5507
5e35436e
YQ
55082015-08-25 Yao Qi <yao.qi@linaro.org>
5509
5510 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5511 Remove.
5512 (debug_reg_change_callback): Remove.
5513 (aarch64_notify_debug_reg_change): Remove.
5514
4a8a7965
YQ
55152015-08-25 Yao Qi <yao.qi@linaro.org>
5516
5517 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5518 Call current_lwp_ptid.
5519
32a271ee
YQ
55202015-08-25 Yao Qi <yao.qi@linaro.org>
5521
5522 * linux-aarch64-low.c (debug_reg_change_callback): Use
5523 debug_printf.
5524
0d51c8d7
YQ
55252015-08-25 Yao Qi <yao.qi@linaro.org>
5526
5527 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5528
31a43dd5
YQ
55292015-08-25 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5532
8ee52567
YQ
55332015-08-25 Yao Qi <yao.qi@linaro.org>
5534
5535 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5536 the code.
5537
ff3f0f45
YQ
55382015-08-25 Yao Qi <yao.qi@linaro.org>
5539
5540 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5541 Remove.
5542 (debug_reg_change_callback): Remove argument entry and add argument
5543 lwp. Remove local variable thread. Don't print thread id in the
5544 debugging output. Don't check whether pid of thread equals to pid.
5545 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5546 iterate_over_lwps instead find_inferior.
5547
3d40fbb5
PA
55482015-08-24 Pedro Alves <palves@redhat.com>
5549
5550 * inferiors.c (get_first_process): New function.
5551 * inferiors.h (get_first_process): New declaration.
5552 * remote-utils.c (read_ptid): Default to the first process in the
5553 list, instead of to the current thread's process.
5554
438e1e42
PA
55552015-08-24 Pedro Alves <palves@redhat.com>
5556
5557 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5558 * event-loop.c: Likewise.
5559 * remote-utils.c: Likewise.
5560 * tracepoint.c: Likewise.
5561
a8c6d4fc
PA
55622015-08-24 Pedro Alves <palves@redhat.com>
5563
5564 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5565 ptid_get_lwp.
5566
99b0bb12
PA
55672015-08-21 Pedro Alves <palves@redhat.com>
5568
5569 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5570 instead of literal 1.
5571
f8904751
PA
55722015-08-21 Pedro Alves <palves@redhat.com>
5573
5574 * tdesc.c (default_description): Explicitly zero-initialize.
5575
465a859e
PA
55762015-08-21 Pedro Alves <palves@redhat.com>
5577
5578 PR gdb/18749
5579 * inferiors.c (remove_thread): Discard any pending stop reply for
5580 this thread.
5581 * server.c (remove_all_on_match_pid): Rename to ...
5582 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5583 instead of a pid.
5584 (discard_queued_stop_replies): Change parameter to a ptid. Now
5585 extern.
5586 (handle_v_kill, kill_inferior_callback, captured_main)
5587 (process_serial_event): Adjust.
5588 * server.h (discard_queued_stop_replies): Declare.
5589
f0db101d
PA
55902015-08-21 Pedro Alves <palves@redhat.com>
5591
5592 * linux-low.c (wait_for_sigstop): Always switch to no thread
5593 selected if the previously current thread dies.
5594 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5595 process instead of the current thread's.
5596 * remote-utils.c (input_interrupt): Don't check if there's no
5597 current thread.
5598 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5599 current thread to the general thread fails, error out.
5600 (handle_qxfer_auxv, handle_qxfer_libraries)
5601 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5602 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5603 (handle_query): Check if there's a thread selected instead of
5604 checking whether there's any thread in the thread list.
5605 (handle_qxfer_threads, handle_qxfer_btrace)
5606 (handle_qxfer_btrace_conf): Don't error out early if there's no
5607 thread in the thread list.
5608 (handle_v_cont, myresume): Don't set the current thread to the
5609 continue thread.
5610 (process_serial_event) <Hg handling>: Also set thread_id if the
5611 previous general thread is still alive.
5612 (process_serial_event) <g/G handling>: If setting the current
5613 thread to the general thread fails, error out.
5614 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5615 thread's lwp instead of the current thread's.
5616 * target.c (set_desired_thread): If the desired thread was not
5617 found, leave the current thread pointing to NULL. Return an int
5618 (boolean) indicating success.
5619 * target.h (set_desired_thread): Change return type to int.
5620
40045d91
MF
56212015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5622
5623 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5624 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5625 #includes.
5626 (ps_get_thread_area): New function.
5627
45face3b
GB
56282015-08-19 Gary Benson <gbenson@redhat.com>
5629
5630 * hostio.c (handle_pread): Do not attempt to read more data
5631 than hostio_reply_with_data can fit in a packet.
5632
16d5f642
JB
56332015-08-18 Joel Brobecker <brobecker@adacore.com>
5634
5635 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5636
a738da3a
MF
56372015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5638
5639 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5640
33ebda9d
PA
56412015-08-06 Pedro Alves <palves@redhat.com>
5642
5643 * tracepoint.c (expr_eval_result): Now an int.
5644
a44892be
PA
56452015-08-06 Pedro Alves <palves@redhat.com>
5646
5647 * gdbthread.h (struct regcache): Forward declare.
5648 (struct thread_info) <regcache_data>: Now a struct regcache
5649 pointer.
5650 * inferiors.c (inferior_regcache_data)
5651 (set_inferior_regcache_data): Now work with struct regcache
5652 pointers.
5653 * inferiors.h (struct regcache): Forward declare.
5654 (inferior_regcache_data, set_inferior_regcache_data): Now work
5655 with struct regcache pointers.
5656 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5657 (free_register_cache_thread): Remove struct regcache pointer
5658 casts.
5659
608a1e46
PA
56602015-08-06 Pedro Alves <palves@redhat.com>
5661
5662 * server.c (captured_main): On error, print the exception message
5663 to stderr, and if run_once is set, throw a quit.
5664
f0ce0d3a
PA
56652015-08-06 Pedro Alves <palves@redhat.com>
5666
5667 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5668 the current thread.
5669
bf47e248
PA
56702015-08-06 Pedro Alves <palves@redhat.com>
5671
5672 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5673 reading beyond the passed in buffer length.
5674
b6b9ffcc
PL
56752015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5676
5677 * tracepoint.c (symbol_list) <required>: Remove.
5678
863d01bd
PA
56792015-08-06 Pedro Alves <palves@redhat.com>
5680
5681 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5682 count if stopping and suspending threads.
5683 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5684 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5685 (linux_detach): Complete an ongoing step-over.
5686 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5687 throughout.
5688 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5689 (linux_wait_1): If passing a signal to the inferior after
5690 finishing a step-over, unsuspend and re-resume all lwps. If we
5691 see a single-step event but the thread should be continuing, don't
5692 pass the trap to gdb.
5693 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5694 internal_error instead of gdb_assert.
5695 (enqueue_pending_signal): New function.
5696 (check_ptrace_stopped_lwp_gone): Add debug output.
5697 (start_step_over): Use internal_error instead of gdb_assert.
5698 (complete_ongoing_step_over): New function.
5699 (linux_resume_one_thread): Don't resume a suspended thread.
5700 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5701 it stepping.
5702
00db26fa
PA
57032015-08-06 Pedro Alves <palves@redhat.com>
5704
5705 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5706 (linux_thread_alive): Use lwp_is_marked_dead.
5707 (extended_event_reported): Delete.
5708 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5709 instead of extended_event_reported.
5710 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5711 as well.
5712 (lwp_is_marked_dead): New function.
5713 (lwp_running): Use lwp_is_marked_dead.
5714 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5715 comment.
5716
ad071a30
PA
57172015-08-06 Pedro Alves <palves@redhat.com>
5718
5719 * linux-low.c (linux_wait_1): Move fork event output out of the
5720 !report_to_gdb check. Pass event_child->waitstatus to
5721 target_waitstatus_to_string instead of ourstatus.
5722
524b57e6
YQ
57232015-08-04 Yao Qi <yao.qi@linaro.org>
5724
5725 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5726 if current_thread is 32 bit.
5727
6085d6f6
YQ
57282015-08-04 Yao Qi <yao.qi@linaro.org>
5729
5730 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5731 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5732 * server.c (extended_protocol): Remove "static".
5733 * server.h (extended_protocol): Declare it.
5734
8a7e4587
YQ
57352015-08-04 Yao Qi <yao.qi@linaro.org>
5736
5737 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5738 both aarch64 and aarch32.
5739 (aarch64_set_pc): Likewise.
5740
3b53ae99
YQ
57412015-08-04 Yao Qi <yao.qi@linaro.org>
5742
5743 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5744 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5745 arm-with-neon.xml to srv_xmlfiles.
5746 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5747 (is_64bit_tdesc): New function.
5748 (aarch64_linux_read_description): New function.
5749 (aarch64_arch_setup): Call aarch64_linux_read_description.
5750 (regs_info): Rename to regs_info_aarch64.
5751 (aarch64_regs_info): Return right regs_info.
5752 (initialize_low_arch): Call initialize_low_arch_aarch32.
5753
bd9e6534
YQ
57542015-08-04 Yao Qi <yao.qi@linaro.org>
5755
5756 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5757 * linux-aarch32-low.c: New file.
5758 * linux-aarch32-low.h: New file.
5759 * linux-arm-low.c (arm_fill_gregset): Move it to
5760 linux-aarch32-low.c.
5761 (arm_store_gregset): Likewise.
5762 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5763 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5764 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5765 (regs_info): Rename to regs_info_arm.
5766 (arm_regs_info): Return regs_info_aarch32 if
5767 have_ptrace_getregset is 1 and target description is
5768 arm_with_neon or arm_with_vfpv3.
5769 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5770 Call initialize_low_arch_aarch32 instead.
5771
ded48a5e
YQ
57722015-08-04 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5775 * linux-low.c: ... here.
5776 * linux-low.h (have_ptrace_getregset): Declare it.
5777
96e9210f
PA
57782015-08-04 Pedro Alves <palves@redhat.com>
5779
5780 * thread-db.c (struct thread_db): Use new typedefs.
5781 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5782 CHK calls.
5783 (disable_thread_event_reporting): Cast result of dlsym to
5784 destination function pointer type.
5785 (thread_db_mourn): Use td_ta_delete_ftype.
5786
af60a1ef
SL
57872015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5788
5789 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5790 arch variant.
5791 (CDX_BREAKPOINT): Define for R2.
5792 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5793 (the_low_target): Add comments.
5794
e8b41681
YQ
57952015-07-30 Yao Qi <yao.qi@linaro.org>
5796
5797 * linux-arm-low.c (arm_hwcap): Remove it.
5798 (arm_read_description): New local variable arm_hwcap. Don't
5799 set arm_hwcap to zero.
5800
89abb039
YQ
58012015-07-30 Yao Qi <yao.qi@linaro.org>
5802
5803 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5804 Use regcache->tdesc instead.
5805 (arm_store_wmmxregset): Likewise.
5806 (arm_fill_vfpregset): Likewise.
5807 (arm_store_vfpregset): Likewise.
5808
deca266c
YQ
58092015-07-30 Yao Qi <yao.qi@linaro.org>
5810
5811 * linux-arm-low.c: Include arch/arm.h.
5812 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5813 (arm_store_gregset): Likewise.
5814
aa58a496
SM
58152015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5816
5817 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5818 ptrace's 4th parameter.
5819
50904b25
YQ
58202015-07-27 Yao Qi <yao.qi@linaro.org>
5821
5822 * configure.srv (case aarch64*-*-linux*): Don't set
5823 srv_linux_usrregs.
5824
5826e159
PA
58252015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5826
5827 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5828 sys/ptrace.h.
5829 * linux-arm-low.c: Likewise.
5830 * linux-cris-low.c: Likewise.
5831 * linux-crisv32-low.c: Likewise.
5832 * linux-low.c: Likewise.
5833 * linux-m68k-low.c: Likewise.
5834 * linux-mips-low.c: Likewise.
5835 * linux-nios2-low.c: Likewise.
5836 * linux-s390-low.c: Likewise.
5837 * linux-sparc-low.c: Likewise.
5838 * linux-tic6x-low.c: Likewise.
5839 * linux-tile-low.c: Likewise.
5840 * linux-x86-low.c: Likewise.
5841
54019719
PA
58422015-07-24 Pedro Alves <palves@redhat.com>
5843
5844 * config.in: Regenerate.
5845 * configure: Regenerate.
5846
eb7aa561
PA
58472015-07-24 Pedro Alves <palves@redhat.com>
5848
5849 * acinclude.m4: Include ../ptrace.m4.
5850 * configure.ac: Call GDB_AC_PTRACE.
5851 * config.in, configure: Regenerate.
5852
55d7b841
YQ
58532015-07-24 Yao Qi <yao.qi@linaro.org>
5854
5855 * linux-low.c (linux_create_inferior): Remove setting to
5856 proc->priv->new_inferior.
5857 (linux_attach): Likewise.
5858 (linux_low_filter_event): Likewise.
5859 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5860
c06cbd92
YQ
58612015-07-24 Yao Qi <yao.qi@linaro.org>
5862
5863 * linux-low.c (linux_arch_setup): New function.
5864 (linux_low_filter_event): If proc->tdesc is NULL and
5865 proc->attached is true, call the_low_target.arch_setup.
5866 Otherwise, keep status pending, and return.
5867 (linux_resume_one_lwp_throw): Don't call get_pc if
5868 thread->while_stepping isn't NULL. Don't call
5869 get_thread_regcache if proc->tdesc is NULL.
5870 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5871 (linux_target_ops): Install arch_setup.
5872 * server.c (start_inferior): Call the_target->arch_setup.
5873 * target.h (struct target_ops) <arch_setup>: New field.
5874 (target_arch_setup): New marco.
5875 * lynx-low.c (lynx_target_ops): Update.
5876 * nto-low.c (nto_target_ops): Update.
5877 * spu-low.c (spu_target_ops): Update.
5878 * win32-low.c (win32_target_ops): Update.
5879
5ae3ebba
YQ
58802015-07-24 Yao Qi <yao.qi@linaro.org>
5881
5882 * linux-low.c (linux_add_process): Don't set
5883 proc->priv->new_inferior.
5884 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5885 (linux_attach): Likewise.
5886
eb97750b
YQ
58872015-07-24 Yao Qi <yao.qi@linaro.org>
5888
5889 * server.c (start_inferior): Code refactor.
5890
51aee833
YQ
58912015-07-24 Yao Qi <yao.qi@linaro.org>
5892
5893 * server.c (process_serial_event): Set general_thread.
5894
af1b22f3
YQ
58952015-07-21 Yao Qi <yao.qi@linaro.org>
5896
5897 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5898 aarch64_linux_get_debug_reg_capacity.
5899
554717a3
YQ
59002015-07-17 Yao Qi <yao.qi@linaro.org>
5901
5902 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5903 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5904 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5905 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5906 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5907 (AARCH64_HWP_ALIGNMENT): Likewise.
5908 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5909 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5910 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5911 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5912 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5913 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5914 (struct aarch64_debug_reg_state): Likewise.
5915 (struct arch_lwp_info): Likewise.
5916 (aarch64_align_watchpoint): Likewise.
5917 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5918 (aarch64_watchpoint_length): Likewise.
5919 (aarch64_point_encode_ctrl_reg): Likewise
5920 (aarch64_point_is_aligned): Likewise.
5921 (aarch64_align_watchpoint): Likewise.
5922 (aarch64_linux_set_debug_regs):
5923 (aarch64_dr_state_insert_one_point): Likewise.
5924 (aarch64_dr_state_remove_one_point): Likewise.
5925 (aarch64_handle_breakpoint): Likewise.
5926 (aarch64_handle_aligned_watchpoint): Likewise.
5927 (aarch64_handle_unaligned_watchpoint): Likewise.
5928 (aarch64_handle_watchpoint): Likewise.
5929
c67ca4de
YQ
59302015-07-17 Yao Qi <yao.qi@linaro.org>
5931
5932 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5933 and don't aarch64_get_debug_reg_state. All callers update.
5934 (aarch64_handle_aligned_watchpoint): Likewise.
5935 (aarch64_handle_unaligned_watchpoint): Likewise.
5936 (aarch64_handle_watchpoint): Likewise.
5937 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5938 (aarch64_remove_point): Likewise.
5939
25abf979
YQ
59402015-07-17 Yao Qi <yao.qi@linaro.org>
5941
5942 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5943 debug_printf.
5944 (aarch64_handle_unaligned_watchpoint): Likewise.
5945
db1ff28b
JK
59462015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5947
5948 Revert the previous 3 commits:
5949 Move gdb_regex* to common/
5950 Move linux_find_memory_regions_full & co.
5951 gdbserver build-id attribute generator
5952
700ca40f
JK
59532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5954 Jan Kratochvil <jan.kratochvil@redhat.com>
5955
5956 gdbserver build-id attribute generator.
5957 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5958 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5959 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5960 (find_phdr): New.
5961 (get_dynamic): Use find_pdhr to traverse program headers.
5962 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5963 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5964 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5965 (get_hex_build_id): New.
5966 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5967 to reply XML document.
5968
9904185c
JK
59692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5970 Jan Kratochvil <jan.kratochvil@redhat.com>
5971
5972 * target.c: Include target/target-utils.h and fcntl.h.
5973 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5974 (target_fileio_read_stralloc): New functions.
5975
6e5b4429
JK
59762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5977
5978 * Makefile.in (OBS): Add gdb_regex.o.
5979 (gdb_regex.o): New.
5980 * config.in: Rebuilt.
5981 * configure: Rebuilt.
5982
ddc98fbf
JK
59832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5984 Jan Kratochvil <jan.kratochvil@redhat.com>
5985
5986 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5987 * Makefile.in (OBS): Add target-utils.o.
5988 (linux-maps.o, target-utils.o): New.
5989 * configure.srv (srv_linux_obj): Add linux-maps.o.
5990
e57bb7a0
PL
59912015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5992
5993 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5994 function, return 1.
5995 (the_low_target): Install it.
5996
586b02a9
PA
59972015-07-14 Pedro Alves <palves@redhat.com>
5998
5999 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6000 Instead, ignore ECHILD, and throw an error for other errnos.
6001
58c1b36c
PA
60022015-07-10 Pedro Alves <palves@redhat.com>
6003
6004 * event-loop.c (struct callback_event) <data>: Change type to
6005 gdb_client_data instance instead of gdb_client_data pointer.
6006 (append_callback_event): Adjust.
6007
421530db
PL
60082015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6009
6010 * linux-aarch64-low.c: Add comments for each linux_target_ops
6011 method. Remove comments already covered in target_ops and
6012 linux_target_ops definitions.
6013 (the_low_target): Add comments for each unimplemented method.
6014
c2d65f38
YQ
60152015-07-09 Yao Qi <yao.qi@linaro.org>
6016
6017 * linux-aarch64-low.c (aarch64_regmap): Remove.
6018 (aarch64_usrregs_info): Remove.
6019 (regs_info): Set field usrregs to NULL.
6020
b20a6524
MM
60212015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6022
6023 * linux-low.c: Include "rsp-low.h"
6024 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6025 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6026 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6027 (handle_btrace_enable_pt): New.
6028 (handle_btrace_general_set): Support "pt".
6029 (handle_btrace_conf_general_set): Support "pt:size".
6030
96c97461
PL
60312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6032
6033 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6034 Z_PACKET_SW_BP.
6035
37d66942
PL
60362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6037
6038 * linux-aarch64-low.c: Remove comment about endianness.
6039 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6040 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6041 memcmp.
6042
dc06243f
GB
60432015-06-24 Gary Benson <gbenson@redhat.com>
6044
6045 * linux-i386-ipa.c (stdint.h): Do not include.
6046 * lynx-i386-low.c (stdint.h): Likewise.
6047 * lynx-ppc-low.c (stdint.h): Likewise.
6048 * mem-break.c (stdint.h): Likewise.
6049 * thread-db.c (stdint.h): Likewise.
6050 * tracepoint.c (stdint.h): Likewise.
6051 * win32-low.c (stdint.h): Likewise.
6052
124e13d9
SM
60532015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6054
6055 * server.c (write_qxfer_response): Update call to
6056 remote_escape_output.
6057
909c2cda
JK
60582015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6059 Jan Kratochvil <jan.kratochvil@redhat.com>
6060
6061 Merge multiple hex conversions.
6062 * gdbreplay.c (tohex): Rename to 'fromhex'.
6063 (logchar): Use fromhex.
6064
24c05f46
JK
60652015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 * server.c (handle_qxfer_libraries): Set `version' attribute for
6068 <library-list>.
6069
14d2069a
GB
60702015-06-10 Gary Benson <gbenson@redhat.com>
6071
6072 * target.h (struct target_ops) <multifs_open>: New field.
6073 <multifs_unlink>: Likewise.
6074 <multifs_readlink>: Likewise.
6075 * linux-low.c (nat/linux-namespaces.h): New include.
6076 (linux_target_ops): Initialize the_target->multifs_open,
6077 the_target->multifs_unlink and the_target->multifs_readlink.
6078 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6079 * hostio.c (hostio_fs_pid): New static variable.
6080 (hostio_handle_new_gdb_connection): New function.
6081 (handle_setfs): Likewise.
6082 (handle_open): Use the_target->multifs_open as appropriate.
6083 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6084 (handle_readlink): Use the_target->multifs_readlink as
6085 appropriate.
6086 (handle_vFile): Handle vFile:setfs packets.
6087 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6088 after target_handle_new_gdb_connection.
6089
4b8b5e72
GB
60902015-06-10 Gary Benson <gbenson@redhat.com>
6091
6092 * configure.ac (AC_CHECK_FUNCS): Add setns.
6093 * config.in: Regenerate.
6094 * configure: Likewise.
6095 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6096 (linux-namespaces.o): New rule.
6097 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6098
3ac2e371
GB
60992015-06-09 Gary Benson <gbenson@redhat.com>
6100
6101 * hostio.c (handle_open): Process mode argument with
6102 fileio_to_host_mode.
6103
ca9b78ce
YQ
61042015-06-01 Yao Qi <yao.qi@linaro.org>
6105
6106 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6107 * linux-x86-low.c: Likewise.
6108
bfacd19d
DB
61092015-05-28 Don Breazeal <donb@codesourcery.com>
6110
6111 * linux-low.c (handle_extended_wait): Initialize
6112 thread_info.last_resume_kind for new fork children.
6113
452003ef
PA
61142015-05-15 Pedro Alves <palves@redhat.com>
6115
6116 * target.h (target_handle_new_gdb_connection): Rewrite using if
6117 wrapped in do/while.
6118
1041a03c
JB
61192015-05-14 Joel Brobecker <brobecker@adacore.com>
6120
6121 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6122 * configure, config.in: Regenerate.
6123 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6124 Declare typedef.
6125
c269dbdb
DB
61262015-05-12 Don Breazeal <donb@codesourcery.com>
6127
6128 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6129 PTRACE_EVENT_VFORK_DONE.
6130 (linux_low_ptrace_options, extended_event_reported): Add vfork
6131 events.
6132 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6133 and "vforkdone" for RSP 'T' Stop Reply Packet.
6134 * server.h (report_vfork_events): Declare
6135 global variable.
6136
3a8a0396
DB
61372015-05-12 Don Breazeal <donb@codesourcery.com>
6138
6139 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6140 (the_low_target) <new_fork>: Initialize new member.
6141 * linux-arm-low.c (arm_new_fork): New function.
6142 (the_low_target) <new_fork>: Initialize new member.
6143 * linux-low.c (handle_extended_wait): Call new target function
6144 new_fork.
6145 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6146 * linux-mips-low.c (mips_add_watchpoint): New function
6147 extracted from mips_insert_point.
6148 (the_low_target) <new_fork>: Initialize new member.
6149 (mips_linux_new_fork): New function.
6150 (mips_insert_point): Call mips_add_watchpoint.
6151 * linux-x86-low.c (x86_linux_new_fork): New function.
6152 (the_low_target) <new_fork>: Initialize new member.
6153
de0d863e
DB
61542015-05-12 Don Breazeal <donb@codesourcery.com>
6155
6156 * linux-low.c (handle_extended_wait): Implement return value,
6157 rename argument 'event_child' to 'event_lwp', handle
6158 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6159 (linux_low_ptrace_options): New function.
6160 (linux_low_filter_event): Call linux_low_ptrace_options,
6161 use different argument fo linux_enable_event_reporting,
6162 use return value from handle_extended_wait.
6163 (extended_event_reported): New function.
6164 (linux_wait_1): Call extended_event_reported and set
6165 status to report fork events.
6166 (linux_write_memory): Add pid to debug message.
6167 (reset_lwp_ptrace_options_callback): New function.
6168 (linux_handle_new_gdb_connection): New function.
6169 (linux_target_ops): Initialize new structure member.
6170 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6171 * lynx-low.c: Initialize new structure member.
6172 * remote-utils.c (prepare_resume_reply): Implement stop reason
6173 "fork" for "T" stop message.
6174 * server.c (handle_query): Call handle_new_gdb_connection.
6175 * server.h (report_fork_events): Declare global flag.
6176 * target.h (struct target_ops) <handle_new_gdb_connection>:
6177 New member.
6178 (target_handle_new_gdb_connection): New macro.
6179 * win32-low.c: Initialize new structure member.
6180
ddcbc397
DB
61812015-05-12 Don Breazeal <donb@codesourcery.com>
6182
6183 * mem-break.c (APPEND_TO_LIST): Define macro.
6184 (clone_agent_expr): New function.
6185 (clone_one_breakpoint): New function.
6186 (clone_all_breakpoints): New function.
6187 * mem-break.h: Declare new functions.
6188
89245bc0
DB
61892015-05-12 Don Breazeal <donb@codesourcery.com>
6190
6191 * linux-low.c (linux_supports_fork_events): New function.
6192 (linux_supports_vfork_events): New function.
6193 (linux_target_ops): Initialize new structure members.
6194 (initialize_low): Call linux_check_ptrace_features.
6195 * lynx-low.c (lynx_target_ops): Initialize new structure
6196 members.
6197 * server.c (report_fork_events, report_vfork_events):
6198 New global flags.
6199 (handle_query): Add new features to qSupported packet and
6200 response.
6201 (captured_main): Initialize new global variables.
6202 * target.h (struct target_ops) <supports_fork_events>:
6203 New member.
6204 <supports_vfork_events>: New member.
6205 (target_supports_fork_events): New macro.
6206 (target_supports_vfork_events): New macro.
6207 * win32-low.c (win32_target_ops): Initialize new structure
6208 members.
6209
835205d0
GB
62102015-05-12 Gary Benson <gbenson@redhat.com>
6211
6212 * server.c (handle_qxfer_exec_file): Use current process
6213 if annex is empty.
6214
21e94bd9
SL
62152015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6216
6217 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6218 Remove HAVE_PTRACE_GETREGS conditionals.
6219 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6220 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6221
45614f15
YQ
62222015-05-08 Yao Qi <yao.qi@linaro.org>
6223
6224 * linux-low.c (linux_supports_conditional_breakpoints): New
6225 function.
6226 (linux_target_ops): Install new target method.
6227 * lynx-low.c (lynx_target_ops): Install NULL hook for
6228 supports_conditional_breakpoints.
6229 * nto-low.c (nto_target_ops): Likewise.
6230 * spu-low.c (spu_target_ops): Likewise.
6231 * win32-low.c (win32_target_ops): Likewise.
6232 * server.c (handle_query): Check
6233 target_supports_conditional_breakpoints.
6234 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6235 New field.
6236 (target_supports_conditional_breakpoints): New macro.
6237
80ad801e
PA
62382015-05-06 Pedro Alves <palves@redhat.com>
6239
6240 PR server/18081
6241 * server.c (start_inferior): If the process exits, mourn it.
6242
819843c7
GB
62432015-04-21 Gary Benson <gbenson@redhat.com>
6244
6245 * hostio.c (fileio_open_flags_to_host): Factored out to
6246 fileio_to_host_openflags in common/fileio.c. Single use
6247 updated.
6248
a2d5a9d7
MF
62492015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6250
6251 * linux-xtensa-low.c (xtensa_fill_gregset)
6252 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6253 XCHAL_HAVE_LOOP.
6254
deb44829
MF
62552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6256
6257 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6258 (regs_info): Replace usrregs pointer with NULL.
6259
e57f1de3
GB
62602015-04-17 Gary Benson <gbenson@redhat.com>
6261
6262 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6263 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6264 * server.c (handle_qxfer_exec_file): New function.
6265 (qxfer_packets): Add exec-file entry.
6266 (handle_query): Report qXfer:exec-file:read as supported packet.
6267
62828379
RN
62682015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6269
6270 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6271
b88bb450
GB
62722015-04-09 Gary Benson <gbenson@redhat.com>
6273
6274 * hostio-errno.c (errno_to_fileio_error): Remove function.
6275 Update caller to use remote_fileio_to_fio_error.
6276
c8f4bfdd
YQ
62772015-04-09 Yao Qi <yao.qi@linaro.org>
6278
6279 * linux-low.c (linux_insert_point): Call
6280 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6281 (linux_remove_point): Call remove_memory_breakpoint if type is
6282 raw_bkpt_type_sw.
6283 * linux-x86-low.c (x86_insert_point): Don't call
6284 insert_memory_breakpoint.
6285 (x86_remove_point): Don't call remove_memory_breakpoint.
6286
41f98f02
PA
62872015-04-01 Pedro Alves <palves@redhat.com>
6288 Cleber Rosa <crosa@redhat.com>
6289
6290 * server.c (gdbserver_usage): Reorganize and extend the usage
6291 message.
6292
2bf6fb9d
PA
62932015-03-24 Pedro Alves <palves@redhat.com>
6294
6295 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6296 output. Also dump TRAP_TRACE.
6297 (linux_low_filter_event): In debug output, distinguish a
6298 resume_stop SIGSTOP from a delayed SIGSTOP.
6299
369f6daa
GB
63002015-03-24 Gary Benson <gbenson@redhat.com>
6301
6302 * linux-x86-low.c (x86_linux_new_thread): Moved to
6303 nat/x86-linux.c.
6304 (x86_linux_prepare_to_resume): Likewise.
6305
8e5d4070
GB
63062015-03-24 Gary Benson <gbenson@redhat.com>
6307
6308 * Makefile.in (x86-linux-dregs.o): New rule.
6309 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6310 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6311 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6312 (x86_linux_dr_get): Likewise.
6313 (x86_linux_dr_set): Likewise.
6314 (update_debug_registers_callback): Likewise.
6315 (x86_linux_dr_set_addr): Likewise.
6316 (x86_linux_dr_get_addr): Likewise.
6317 (x86_linux_dr_set_control): Likewise.
6318 (x86_linux_dr_get_control): Likewise.
6319 (x86_linux_dr_get_status): Likewise.
6320 (x86_linux_update_debug_registers): Likewise.
6321
2b95d440
GB
63222015-03-24 Gary Benson <gbenson@redhat.com>
6323
6324 * linux-x86-low.c (x86_linux_update_debug_registers):
6325 New function, factored out from...
6326 (x86_linux_prepare_to_resume): ...this.
6327
14b0bc68
GB
63282015-03-24 Gary Benson <gbenson@redhat.com>
6329
6330 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6331 (x86_linux_dr_set): Likewise.
6332 (update_debug_registers_callback): Likewise.
6333 (x86_linux_dr_set_addr): Likewise.
6334 (x86_linux_dr_get_addr): Likewise.
6335 (x86_linux_dr_set_control): Likewise.
6336 (x86_linux_dr_get_control): Likewise.
6337 (x86_linux_dr_get_status): Likewise.
6338 (x86_linux_prepare_to_resume): Likewise.
6339
5dfe6ca8
GB
63402015-03-24 Gary Benson <gbenson@redhat.com>
6341
6342 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6343 Use perror_with_name. Pass string through gettext.
6344 (x86_linux_dr_set): Likewise.
6345
d33472ad
GB
63462015-03-24 Gary Benson <gbenson@redhat.com>
6347
6348 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6349 (x86_linux_dr_set_addr): ...this.
6350 (x86_dr_low_get_addr): Rename to...
6351 (x86_linux_dr_get_addr): ...this.
6352 (x86_dr_low_set_control): Rename to...
6353 (x86_linux_dr_set_control): ...this.
6354 (x86_dr_low_get_control): Rename to...
6355 (x86_linux_dr_get_control): ...this.
6356 (x86_dr_low_get_status): Rename to...
6357 (x86_linux_dr_get_status): ...this.
6358 (x86_dr_low): Update with new function names.
6359
4b134ca1
GB
63602015-03-24 Gary Benson <gbenson@redhat.com>
6361
6362 * Makefile.in (x86-linux.o): New rule.
6363 * configure.srv: Add x86-linux.o to relevant targets.
6364 * linux-low.c (lwp_set_arch_private_info): New function.
6365 (lwp_arch_private_info): Likewise.
6366 * linux-x86-low.c: Include nat/x86-linux.h.
6367 (arch_lwp_info): Removed structure.
6368 (update_debug_registers_callback):
6369 Use lwp_set_debug_registers_changed.
6370 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6371 and lwp_set_debug_registers_changed.
6372 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6373
34c703da
GB
63742015-03-24 Gary Benson <gbenson@redhat.com>
6375
6376 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6377 * linux-arm-low.c (arm_new_thread): Likewise.
6378 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6379 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6380 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6381 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6382
cff068da
GB
63832015-03-24 Gary Benson <gbenson@redhat.com>
6384
6385 * linux-low.c (ptid_of_lwp): New function.
6386 (lwp_is_stopped): Likewise.
6387 (lwp_stop_reason): Likewise.
6388 * linux-x86-low.c (update_debug_registers_callback):
6389 Use lwp_is_stopped.
6390 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6391 lwp_stop_reason.
6392
b2f7c7e8
GB
63932015-03-24 Gary Benson <gbenson@redhat.com>
6394
6395 * linux-low.h (linux_stop_lwp): Remove declaration.
6396
6d4ee8c6
GB
63972015-03-24 Gary Benson <gbenson@redhat.com>
6398
6399 * linux-low.h: Include nat/linux-nat.h.
6400 * linux-low.c (iterate_over_lwps_args): New structure.
6401 (iterate_over_lwps_filter): New function.
6402 (iterate_over_lwps): Likewise.
6403 * linux-x86-low.c (update_debug_registers_callback):
6404 Update signature to what iterate_over_lwps expects.
6405 Remove PID check that iterate_over_lwps now performs.
6406 (x86_dr_low_set_addr): Use iterate_over_lwps.
6407 (x86_dr_low_set_control): Likewise.
6408
70a0bb6b
GB
64092015-03-24 Gary Benson <gbenson@redhat.com>
6410
6411 * linux-x86-low.c (x86_debug_reg_state): New function.
6412 (x86_linux_prepare_to_resume): Use the above.
6413
7b669087
GB
64142015-03-24 Gary Benson <gbenson@redhat.com>
6415
6416 * linux-low.c (current_lwp_ptid): New function.
6417 * linux-x86-low.c: Include nat/linux-nat.h.
6418 (x86_dr_low_get_addr): Use current_lwp_ptid.
6419 (x86_dr_low_get_control): Likewise.
6420 (x86_dr_low_get_status): Likewise.
6421
eef49a3d
PA
64222015-03-20 Pedro Alves <palves@redhat.com>
6423
6424 * tracepoint.c (cmd_qtstatus): Make "str" const.
6425
b2333d22
PA
64262015-03-20 Pedro Alves <palves@redhat.com>
6427
6428 * server.c (handle_general_set): Make "req_str" const.
6429
23f238d3
PA
64302015-03-19 Pedro Alves <palves@redhat.com>
6431
6432 * linux-low.c (linux_resume_one_lwp): Rename to ...
6433 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6434 instead call perror_with_name.
6435 (check_ptrace_stopped_lwp_gone): New function.
6436 (linux_resume_one_lwp): Reimplement as wrapper around
6437 linux_resume_one_lwp_throw that swallows errors if the LWP is
6438 gone.
6439
91baf43f
PA
64402015-03-19 Pedro Alves <palves@redhat.com>
6441
6442 * linux-low.c (count_events_callback, select_event_lwp_callback):
6443 No longer check whether the thread has resume_stop as last resume
6444 kind.
6445
8bf3b159
PA
64462015-03-19 Pedro Alves <palves@redhat.com>
6447
6448 * linux-low.c (count_events_callback, select_event_lwp_callback):
6449 Use the lwp's status_pending_p field, not the thread's.
6450
b90fc188
PA
64512015-03-19 Pedro Alves <palves@redhat.com>
6452
6453 * linux-low.c (select_event_lwp_callback): Update comments to
6454 no longer mention SIGTRAP.
6455
464b0089
GB
64562015-03-18 Gary Benson <gbenson@redhat.com>
6457
6458 * server.c (handle_query): Do not report vFile:fstat as supported.
6459
aa9e327f
GB
64602015-03-11 Gary Benson <gbenson@redhat.com>
6461
6462 * hostio.c (sys/types.h): New include.
6463 (sys/stat.h): Likewise.
6464 (common-remote-fileio.h): Likewise.
6465 (handle_fstat): New function.
6466 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6467
791c0056
GB
64682015-03-11 Gary Benson <gbenson@redhat.com>
6469
6470 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6471 struct stat.st_blocks and struct stat.st_blksize.
6472 * configure: Regenerate.
6473 * config.in: Likewise.
6474 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6475 (OBS): Add common-remote-fileio.o.
6476 (common-remote-fileio.o): New rule.
6477
9a9df970
PA
64782015-03-09 Pedro Alves <palves@redhat.com>
6479
6480 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6481 'struct sockaddr' pointer in 'accept' call.
6482
9eb1356e
PA
64832015-03-09 Pedro Alves <palves@redhat.com>
6484
6485 Revert:
6486 2015-03-07 Pedro Alves <palves@redhat.com>
6487 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6488 or <winsock2.h> here. Instead include "gdb_socket.h".
6489 (remote_open): Use union gdb_sockaddr_u.
6490 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6491 or <winsock2.h> here. Instead include "gdb_socket.h".
6492 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6493 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6494 or <sys/un.h>.
6495 (init_named_socket, gdb_agent_helper_thread): Use union
6496 gdb_sockaddr_u.
6497
aac331e4
PA
64982015-03-07 Pedro Alves <palves@redhat.com>
6499
6500 * configure.ac (build_warnings): Move
6501 -Wdeclaration-after-statement to the C-specific set.
6502 * configure: Regenerate.
6503
366c75fc
PA
65042015-03-07 Pedro Alves <palves@redhat.com>
6505
6506 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6507 or <winsock2.h> here. Instead include "gdb_socket.h".
6508 (remote_open): Use union gdb_sockaddr_u.
6509 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6510 or <winsock2.h> here. Instead include "gdb_socket.h".
6511 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6512 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6513 or <sys/un.h>.
6514 (init_named_socket, gdb_agent_helper_thread): Use union
6515 gdb_sockaddr_u.
6516
492d29ea
PA
65172015-03-07 Pedro Alves <palves@redhat.com>
6518
6519 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6520 instead.
6521
60a191ed
YQ
65222015-03-06 Yao Qi <yao.qi@linaro.org>
6523
6524 * linux-aarch64-low.c (aarch64_insert_point): Use
6525 show_debug_regs as a boolean.
6526 (aarch64_remove_point): Likewise.
6527
f5771b1d
PA
65282015-03-05 Pedro Alves <palves@redhat.com>
6529
6530 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6531 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6532 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6533 * nto-low.c (nto_target_ops): Likewise.
6534 * spu-low.c (spu_target_ops): Likewise.
6535 * win32-low.c (win32_target_ops): Likewise.
6536
3e572f71
PA
65372015-03-04 Pedro Alves <palves@redhat.com>
6538
72f4393d 6539 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6540 Decide whether a breakpoint triggered based on the SIGTRAP's
6541 siginfo.si_code.
72f4393d
L
6542 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6543 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6544 (linux_low_filter_event): Check for breakpoints before checking
6545 watchpoints.
6546 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6547 siginfo.si_code.
72f4393d
L
6548 (linux_stopped_by_sw_breakpoint)
6549 (linux_supports_stopped_by_sw_breakpoint)
6550 (linux_stopped_by_hw_breakpoint)
6551 (linux_supports_stopped_by_hw_breakpoint): New functions.
6552 (linux_target_ops): Install new target methods.
3e572f71 6553
1ec68e26
PA
65542015-03-04 Pedro Alves <palves@redhat.com>
6555
6556 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6557 * server.c (swbreak_feature, hwbreak_feature): New globals.
6558 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6559 (captured_main): Clear swbreak_feature and hwbreak_feature.
6560 * server.h (swbreak_feature, hwbreak_feature): Declare.
6561 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6562 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6563 supports_stopped_by_hw_breakpoint>: New fields.
6564 (target_supports_stopped_by_sw_breakpoint)
6565 (target_stopped_by_sw_breakpoint)
6566 (target_supports_stopped_by_hw_breakpoint)
6567 (target_stopped_by_hw_breakpoint): Declare.
6568
15c66dd6
PA
65692015-03-04 Pedro Alves <palves@redhat.com>
6570
6571 enum lwp_stop_reason -> enum target_stop_reason
6572 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6573 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6574 (linux_wait_1, stuck_in_jump_pad_callback)
6575 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6576 (linux_stopped_by_watchpoint):
6577 * linux-low.h (enum lwp_stop_reason): Delete.
6578 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6579 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6580
98fc70d6
YQ
65812015-03-04 Yao Qi <yao.qi@linaro.org>
6582
6583 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6584
dd2ac174
GB
65852015-03-03 Gary Benson <gbenson@redhat.com>
6586
6587 * hostio.c (handle_vFile): Fix prefix lengths.
6588
d68e53f4
MM
65892015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6590
6591 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6592 ptr_bits.
6593
bf2d68ab
AA
65942015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6595
6596 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6597 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6598 (clean): Add "rm -f" for above C files.
6599 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6600 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6601 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6602 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6603 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6604 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6605 (init_registers_s390x_vx_linux64)
6606 (init_registers_s390x_tevx_linux64)
6607 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6608 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6609 declarations.
6610 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6611 (s390_store_vxrs_high): New functions.
6612 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6613 NT_S390_VXRS_HIGH.
6614 (s390_arch_setup): Add logic for selecting one of the new target
6615 descriptions. Activate the new vector regsets if applicable.
6616 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6617 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6618 and init_registers_s390x_tevx_linux64.
6619
c966a859
PA
66202015-03-01 Pedro Alves <palves@redhat.com>
6621
6622 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6623 parameter.
6624
4180215b
PA
66252015-02-27 Pedro Alves <palves@redhat.com>
6626
6627 * linux-x86-low.c (u_debugreg_offset): New function.
6628 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6629
749bab01
PA
66302015-02-27 Pedro Alves <palves@redhat.com>
6631
6632 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6633 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6634 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6635 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6636 (ps_lsetfpregs, ps_getpid)
6637 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6638 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6639 (ps_lsetxregs, ps_plog): Declare.
6640
3c14e5a3
PA
66412015-02-27 Pedro Alves <palves@redhat.com>
6642
6643 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6644 IP_AGENT_EXPORT_FUNC.
6645 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6646 IP_AGENT_EXPORT_FUNC.
6647 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6648 (IP_AGENT_EXPORT): Delete.
6649 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6650 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6651 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6652 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6653 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6654 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6655 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6656 (traceframe_read_count, traceframe_write_count)
6657 (traceframes_created, trace_state_variables, get_raw_reg)
6658 (get_trace_state_variable_value, set_trace_state_variable_value)
6659 (ust_loaded, helper_thread_id, cmd_buf): Use
6660 IPA_SYM_EXPORTED_NAME.
6661 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6662 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6663 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6664 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6665 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6666 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6667 EXTERN_C_PUSH/EXTERN_C_POP.
6668 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6669 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6670 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6671 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6672 (traceframe_write_count, traceframe_read_count)
6673 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6674 (about_to_request_buffer_space, get_trace_state_variable_value)
6675 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6676 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6677 EXTERN_C_PUSH/EXTERN_C_POP.
6678 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6679 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6680 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6681 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6682 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6683 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6684 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6685 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6686 Define.
6687 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6688 (IP_AGENT_EXPORT_VAR_DECL): Define.
6689 (tracing): Declare.
6690 (gdb_agent_get_raw_reg): Declare.
6691
fe978cb0
PA
66922015-02-27 Tom Tromey <tromey@redhat.com>
6693 Pedro Alves <palves@redhat.com>
6694
6695 Rename symbols whose names are reserved C++ keywords throughout.
6696
3bc3d82a
PA
66972015-02-27 Pedro Alves <palves@redhat.com>
6698
6699 * Makefile.in (COMPILER): New, get it from autoconf.
6700 (CXX): Get from autoconf instead.
6701 (COMPILE.pre): Use COMPILER.
6702 (CC-LD): Rename to ...
6703 (CC_LD): ... this. Use COMPILER.
6704 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6705 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6706 * acinclude.m4: Include build-with-cxx.m4.
6707 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6708 Disable -Werror by default if building in C++ mode.
6709 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6710 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6711 the C++ compiler. Save/restore CXXFLAGS too.
6712 * configure: Regenerate.
6713
07697489
PA
67142015-02-27 Pedro Alves <palves@redhat.com>
6715
6716 * acinclude.m4: Include libiberty.m4.
6717 * configure.ac: Call libiberty_INIT.
6718 * config.in, configure: Regenerate.
6719
9beb7c4e
PA
67202015-02-26 Pedro Alves <palves@redhat.com>
6721
6722 * linux-low.c (linux_wait_1): When incrementing the PC past a
6723 program breakpoint always use the_low_target.breakpoint_len as
6724 increment, rather than the maximum between that and
6725 the_low_target.decr_pc_after_break.
6726
8090aef2
PA
67272015-02-23 Pedro Alves <palves@redhat.com>
6728
6729 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6730 thread was doing a step-over; always adjust the PC if
6731 we stepped over a permanent breakpoint.
6732 (linux_wait_1): If we stepped over breakpoint that was on top of a
6733 permanent breakpoint, manually advance the PC past it.
6734
bc9540e8
PA
67352015-02-23 Pedro Alves <palves@redhat.com>
6736
6737 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6738 modes.
6739 (x86_fill_gregset, x86_store_gregset): Use it when handling
6740 $orig_eax.
6741
2db9a427
PA
67422015-02-20 Pedro Alves <palves@redhat.com>
6743
6744 * thread-db.c: Include "nat/linux-procfs.h".
6745 (thread_db_init): Skip listing new threads if the kernel supports
6746 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6747
afa8d396
PA
67482015-02-20 Pedro Alves <palves@redhat.com>
6749
6750 * linux-low.c (status_pending_p_callback): Use ptid_match.
6751
c9587f88
AT
67522015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6753
6754 PR breakpoints/16812
6755 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6756 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6757 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6758
b05ec7a5
AT
67592015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6760
6761 PR breakpoints/15956
6762 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6763
d33501a5
MM
67642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6765
6766 * linux-low.c (linux_low_btrace_conf): Print size.
6767 * server.c (handle_btrace_conf_general_set): New.
6768 (hanle_general_set): Call handle_btrace_conf_general_set.
6769 (handle_query): Report Qbtrace-conf:bts:size as supported.
6770
f4abbc16
MM
67712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6772
6773 * linux-low.c (linux_low_enable_btrace): Update parameters.
6774 (linux_low_btrace_conf): New.
6775 (linux_target_ops)<to_btrace_conf>: Initialize.
6776 * server.c (current_btrace_conf): New.
6777 (handle_btrace_enable): Rename to ...
6778 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6779 to target_enable_btrace. Update comment. Update users.
6780 (handle_qxfer_btrace_conf): New.
6781 (qxfer_packets): Add btrace-conf entry.
6782 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6783 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6784 (target_ops)<read_btrace_conf>: New.
6785 (target_enable_btrace): Update parameters.
6786 (target_read_btrace_conf): New.
6787
043c3577
MM
67882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6789
6790 * server.c (handle_btrace_general_set): Remove call to
6791 target_supports_btrace.
6792 (supported_btrace_packets): New.
6793 (handle_query): Call supported_btrace_packets.
6794 * target.h: include btrace-common.h.
6795 (btrace_target_info): Removed.
6796 (supports_btrace, target_supports_btrace): Update parameters.
6797
734b0e4b
MM
67982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6799
6800 * Makefile.in (SFILES): Add common/btrace-common.c.
6801 (OBS): Add common/btrace-common.o.
6802 (btrace-common.o): Add build rules.
6803 * linux-low: Include btrace-common.h.
6804 (linux_low_read_btrace): Use struct btrace_data. Call
6805 btrace_data_init and btrace_data_fini.
6806
d6c146e9
PA
68072015-02-06 Pedro Alves <palves@redhat.com>
6808
6809 * thread-db.c (find_new_threads_callback): Add debug output.
6810
20ba1ce6
PA
68112015-02-04 Pedro Alves <palves@redhat.com>
6812
6813 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6814 (resume_stopped_resumed_lwps): New function.
6815 (linux_wait_for_event_filtered): Use it.
6816
8cc73a39
SDJ
68172015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6818
6819 * Makefile.in (SFILES): Add linux-personality.c.
6820 (linux-personality.o): New rule.
6821 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6822 list of objects to be built.
6823 * linux-low.c: Include nat/linux-personality.h.
6824 (linux_create_inferior): Remove code to disable address space
6825 randomization (moved to ../nat/linux-personality.c). Create
6826 cleanup to disable address space randomization.
6827
fb23d554
SDJ
68282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6829
6830 * Makefile.in (posix-strerror.o): New rule.
6831 (mingw-strerror.o): Likewise.
6832 * configure: Regenerated.
6833 * configure.ac: Source file ../common/common.host. Initialize new
6834 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6835
cdf43629
YQ
68362015-01-14 Yao Qi <yao@codesourcery.com>
6837
6838 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6839 (ppc-linux.o): New rule.
6840 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6841 * configure.ac: AC_CHECK_FUNCS(getauxval).
6842 * config.in: Re-generated.
6843 * configure: Re-generated.
6844 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6845 ppc64_64bit_inferior_p
6846
514c5338
YQ
68472015-01-14 Yao Qi <yao@codesourcery.com>
6848
6849 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6850 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6851 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6852 (PT_ORIG_R3, PT_TRAP): Likewise.
6853 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6854 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6855 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6856
3368c1e5
JB
68572015-01-10 Joel Brobecker <brobecker@adacore.com>
6858
6859 * i387-fp.c (i387_cache_to_xsave): In look over
6860 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6861 zmmh_low_space field by use of zmmh_high_space.
6862
582511be
PA
68632015-01-09 Pedro Alves <palves@redhat.com>
6864
6865 * linux-low.c (step_over_bkpt): Move higher up in the file.
6866 (handle_extended_wait): Don't store the stop_pc here.
6867 (get_stop_pc): Adjust comments and rename to ...
6868 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6869 stopped for a software breakpoint or hardware breakpoint.
6870 (thread_still_has_status_pending_p): New function.
6871 (status_pending_p_callback): Use
6872 thread_still_has_status_pending_p. If the event is no longer
6873 interesting, resume the LWP.
6874 (handle_tracepoints): Add assert.
6875 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6876 (wstatus_maybe_breakpoint): New function.
6877 (cancel_breakpoint): Delete function.
6878 (check_stopped_by_watchpoint): New function, factored out from
6879 linux_low_filter_event.
6880 (lp_status_maybe_breakpoint): Delete function.
6881 (linux_low_filter_event): Remove filter_ptid argument.
6882 Leave thread group exits pending here. Store the LWP's stop PC.
6883 Always leave events pending.
6884 (linux_wait_for_event_filtered): Pull all events out of the
6885 kernel, and leave them all pending.
6886 (count_events_callback, select_event_lwp_callback): Consider all
6887 events.
6888 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6889 (select_event_lwp): Only give preference to the stepping LWP in
6890 all-stop mode. Adjust comments.
6891 (ignore_event): New function.
6892 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6893 references to cancel_breakpoints. Adjust to renames. Also give
6894 equal priority to all LWPs that have had events in non-stop mode.
6895 If reporting a software breakpoint event, unadjust the LWP's PC.
6896 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6897 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6898 Adjust.
6899 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6900 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6901 (linux_stopped_by_watchpoint): Adjust.
6902 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6903 * linux-low.h (enum lwp_stop_reason): New.
6904 (struct lwp_info) <stop_pc>: Adjust comment.
6905 <stopped_by_watchpoint>: Delete field.
6906 <stop_reason>: New field.
6907 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6908 * mem-break.c (software_breakpoint_inserted_here)
6909 (hardware_breakpoint_inserted_here): New function.
6910 * mem-break.h (software_breakpoint_inserted_here)
6911 (hardware_breakpoint_inserted_here): Declare.
6912 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6913 (cancel_breakpoints): Delete.
6914 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6915 (upload_fast_traceframes): Remove references to
6916 cancel_breakpoints.
6917
a33e3959
PA
69182015-01-09 Pedro Alves <palves@redhat.com>
6919
6920 * thread-db.c (find_new_threads_callback): Ignore thread if the
6921 kernel thread ID is -1.
6922
8784d563
PA
69232015-01-09 Pedro Alves <palves@redhat.com>
6924
6925 * linux-low.c (linux_attach_fail_reason_string): Move to
6926 nat/linux-ptrace.c, and rename.
6927 (linux_attach_lwp): Update comment.
6928 (attach_proc_task_lwp_callback): New function.
6929 (linux_attach): Adjust to rename and use
6930 linux_proc_attach_tgid_threads.
6931 (linux_attach_fail_reason_string): Delete declaration.
6932
76f2b779
JB
69332015-01-01 Joel Brobecker <brobecker@adacore.com>
6934
6935 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6936 * server.c (gdbserver_version): Likewise.
6937
fafcc06a
SDJ
69382014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6939
6940 * remote-utils.c: Include ctype.h.
6941 (input_interrupt): Explicitly handle the case when the char
6942 received is the NUL byte. Improve the printing of non-ASCII
6943 characters.
6944
beed38b8
JB
69452014-12-16 Joel Brobecker <brobecker@adacore.com>
6946
6947 * linux-low.c (linux_low_filter_event): Update call to
6948 linux_enable_event_reporting following the addition of
6949 a new parameter to that function.
6950
bf330350
CU
69512014-12-16 Catalin Udma <catalin.udma@freescale.com>
6952
6953 PR server/17457
6954 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6955 (AARCH64_FPCR_REGNO): Likewise.
6956 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6957 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6958 (aarch64_store_fpregset): Likewise.
6959
5227d625
JB
69602014-12-15 Joel Brobecker <brobecker@adacore.com>
6961
6962 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6963 Remove FIXME comment about assumption about N.
6964
f93b65a0
JB
69652014-12-13 Joel Brobecker <brobecker@adacore.com>
6966
6967 * configure.ac: If large-file support is disabled in GDBserver,
6968 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6969 * configure: Regenerate.
6970
e5a9158d
AA
69712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6972
6973 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6974 warning upon ENODATA from ptrace.
6975 * linux-s390-low.c (s390_store_tdb): New.
6976 (s390_regsets): Add regset for NT_S390_TDB.
6977
feea5f36
AA
69782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6979
6980 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6981 without a fill_function.
6982 * linux-s390-low.c (s390_fill_last_break): Remove.
6983 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6984 (s390_arch_setup): Use regset's size instead of fill_function for
6985 loop end condition.
6986
098dbe61
AA
69872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6988
6989 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6990 the regset's store function when ptrace returned an error.
6991 * regcache.c (get_thread_regcache): Invalidate register cache
6992 before fetching inferior's registers.
6993
28eef672
AA
69942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6995
6996 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6997 while-loop as for-loop.
6998 (regsets_store_inferior_registers): Likewise.
6999
bdca27a2
YQ
70002014-11-28 Yao Qi <yao@codesourcery.com>
7001
7002 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7003 * config.in, configure: Re-generate.
7004 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7005 is defined.
7006
9c232dda
YQ
70072014-11-21 Yao Qi <yao@codesourcery.com>
7008
7009 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7010 (AC_CHECK_HEADERS): Remove malloc.h.
7011 * configure: Re-generated.
7012 * config.in: Re-generated.
7013 * server.h: Don't include alloca.h and malloc.h.
7014 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7015 Don't include malloc.h.
7016
43968415
JB
70172014-11-17 Joel Brobecker <brobecker@adacore.com>
7018
7019 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7020 corresponding ERRNO check in same block.
7021
40e91bc7
PA
70222014-11-12 Pedro Alves <palves@redhat.com>
7023
7024 * server.c (cont_thread): Update comment.
7025 (start_inferior, attach_inferior): No longer clear cont_thread.
7026 (handle_v_cont): No longer set cont_thread.
7027 (captured_main): Clear cont_thread each time a GDB connects.
7028
c2c118cf
PA
70292014-11-12 Pedro Alves <palves@redhat.com>
7030
7031 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7032 thread, and don't resume all threads if the Hc thread has exited.
7033
78708b7c
PA
70342014-11-12 Pedro Alves <palves@redhat.com>
7035
7036 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7037 the process group instead of to a specific LWP.
7038
a2abc7de
PA
70392014-10-15 Pedro Alves <palves@redhat.com>
7040
7041 PR server/17487
7042 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7043 parameter.
7044 (arm_set_thread_context): Delete.
7045 (the_low_target): Adjust.
7046 * win32-i386-low.c (debug_registers_changed)
7047 (debug_registers_used): Delete.
7048 (update_debug_registers_callback): New function.
7049 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7050 needing to update their debug registers.
7051 (win32_get_current_dr): New function.
7052 (x86_dr_low_get_addr, x86_dr_low_get_control)
7053 (x86_dr_low_get_status): Fetch the debug register from the thread
7054 record's context.
7055 (i386_initial_stuff): Adjust.
7056 (i386_get_thread_context): Remove current_event parameter. Don't
7057 clear debug_registers_changed nor copy DR values to
7058 debug_reg_state.
7059 (i386_set_thread_context): Delete.
7060 (i386_prepare_to_resume): New function.
7061 (i386_thread_added): Mark the thread as needing to update irs
7062 debug registers.
7063 (the_low_target): Remove i386_set_thread_context and install
7064 i386_prepare_to_resume.
7065 * win32-low.c (win32_get_thread_context): Adjust.
7066 (win32_set_thread_context): Use SetThreadContext
7067 directly.
7068 (win32_prepare_to_resume): New function.
7069 (win32_require_context): New function, factored out from ...
7070 (thread_rec): ... this.
7071 (continue_one_thread): Call win32_prepare_to_resume on each thread
7072 we're about to continue.
7073 (win32_resume): Call win32_prepare_to_resume on the event thread.
7074 * win32-low.h (struct win32_thread_info)
7075 <debug_registers_changed>: New field.
7076 (struct win32_target_ops): Change prototype of set_thread_context,
7077 delete set_thread_context and add prepare_to_resume.
7078 (win32_require_context): New declaration.
7079
a442d071
GB
70802014-10-08 Gary Benson <gbenson@redhat.com>
7081
7082 * server.h: Do not include common-exceptions.h.
7083
6f1947e8
GB
70842014-10-08 Gary Benson <gbenson@redhat.com>
7085
7086 * server.h: Do not include cleanups.h.
7087
63b434a4
JH
70882014-09-30 James Hogan <james.hogan@imgtec.com>
7089
7090 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7091 mips64-dsp-linux.c.
7092
c4d9ceb6
YQ
70932014-09-23 Yao Qi <yao@codesourcery.com>
7094
7095 * linux-low.c (lp_status_maybe_breakpoint): New function.
7096 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7097 (count_events_callback): Likewise.
7098 (select_event_lwp_callback): Likewise.
7099 (cancel_breakpoints_callback): Likewise.
7100
89a5711c
DB
71012014-09-19 Don Breazeal <donb@codesourcery.com>
7102
7103 * linux-low.c (handle_extended_wait): Call
7104 linux_ptrace_get_extended_event.
7105 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7106 linux_is_extended_waitstatus.
7107
bffc0964
JB
71082014-09-16 Joel Brobecker <brobecker@adacore.com>
7109
7110 * Makefile.in (CPPFLAGS): Define.
7111 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7112 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7113
0bfdf32f
GB
71142014-09-16 Gary Benson <gbenson@redhat.com>
7115
7116 * inferiors.h (current_inferior): Renamed as...
7117 (current_thread): New variable. All uses updated.
7118 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7119 (maybe_move_out_of_jump_pad): Likewise.
7120 (cancel_breakpoint): Likewise.
7121 (linux_low_filter_event): Likewise.
7122 (wait_for_sigstop): Likewise.
7123 (linux_resume_one_lwp): Likewise.
7124 (need_step_over_p): Likewise.
7125 (start_step_over): Likewise.
7126 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7127 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7128 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7129 and save_inferior as saved_thread.
7130 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7131 saved_thread.
7132 (regcache_invalidate_thread): Likewise.
7133 * remote-utils.c (prepare_resume_reply): Likewise.
7134 * thread-db.c (thread_db_get_tls_address): Likewise.
7135 (disable_thread_event_reporting): Likewise.
7136 (remove_thread_event_breakpoints): Likewise.
7137 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7138 as saved_thread.
7139 * target.h (set_desired_inferior): Renamed as...
7140 (set_desired_thread): New declaration. All uses updated.
7141 * server.c (myresume): Updated comment to reference thread instead
7142 of inferior.
7143 (handle_serial_event): Likewise.
7144 (handle_target_event): Likewise.
7145
361c8ade
GB
71462014-09-12 Tom Tromey <tromey@redhat.com>
7147 Gary Benson <gbenson@redhat.com>
7148
7149 * regcache.h: Include common-regcache.h.
7150 (regcache_read_pc): Don't declare.
7151 * regcache.c (get_thread_regcache_for_ptid): New function.
7152
bd9269f7
GB
71532014-09-11 Tom Tromey <tromey@redhat.com>
7154 Gary Benson <gbenson@redhat.com>
7155
7156 * symbol.c: New file.
7157 * Makefile.in (SFILES): Add symbol.c.
7158 (OBS): Add symbol.o.
7159
f8c1d06b
GB
71602014-09-11 Gary Benson <gbenson@redhat.com>
7161
7162 * target.c (target_stop_ptid, target_continue_ptid): New
7163 functions.
7164
721ec300
GB
71652014-09-11 Tom Tromey <tromey@redhat.com>
7166 Gary Benson <gbenson@redhat.com>
7167
7168 * target.h: Include target/target.h.
7169 * target.c (target_read_memory, target_read_uint32)
7170 (target_write_memory): New functions.
7171
c5e92cca
GB
71722014-09-11 Gary Benson <gbenson@redhat.com>
7173
7174 * server.h (debug_hw_points): Don't declare.
7175 * server.c (debug_hw_points): Don't define. Replace all uses
7176 with show_debug_regs.
7177 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7178 all uses with show_debug_regs.
7179
2e4bb98a
EBM
71802014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7181
7182 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7183 endianness into account.
7184 (ppc_supply_ptrace_register): Likewise.
7185
ac740bc7
JH
71862014-09-03 James Hogan <james.hogan@imgtec.com>
7187
7188 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7189 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7190
97ea6506
GB
71912014-09-03 Gary Benson <gbenson@redhat.com>
7192
7193 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7194 ALL_DEBUG_ADDRESS_REGISTERS.
7195
df7e5265
GB
71962014-09-02 Gary Benson <gbenson@redhat.com>
7197
7198 * i386-low.h: Renamed as...
7199 * x86-low.h: New file. All type, function and variable name
7200 prefixes changed from "i386_" to "x86_". All references updated.
7201 * i386-low.c: Renamed as...
7202 * x86-low.c: New file. All type, function and variable name
7203 prefixes changed from "i386_" to "x86_". All references updated.
7204
ed859da7
GB
72052014-09-02 Gary Benson <gbenson@redhat.com>
7206
7207 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7208 (x86_linux_new_thread): Likewise.
7209
860789c7
GB
72102014-08-29 Gary Benson <gbenson@redhat.com>
7211
7212 * server.h (setjmp.h): Do not include.
7213 (toplevel): Do not declare.
7214 (common-exceptions.h): Include.
7215 (cleanups.h): Likewise.
7216 * server.c (toplevel): Do not define.
7217 (exit_code): New static global.
7218 (detach_or_kill_for_exit_cleanup): New function.
7219 (main): New function. Original main renamed to...
7220 (captured_main): New function.
7221 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7222
ff55e1b5
GB
72232014-08-29 Gary Benson <gbenson@redhat.com>
7224
7225 * Makefile.in (SFILES): Add common/common-exceptions.c.
7226 (OBS): Add common-exceptions.o.
7227 (common-exceptions.o): New rule.
7228 * utils.c (prepare_to_throw_exception): New function.
7229
e9bcb658
GB
72302014-08-29 Gary Benson <gbenson@redhat.com>
7231
7232 * config.in: Regenerate.
7233 * configure: Likewise.
7234
e3180625
GB
72352014-08-29 Gary Benson <gbenson@redhat.com>
7236
7237 * Makefile.in (SFILES): Add common/cleanups.c.
7238 (OBS): cleanups.o.
7239 (cleanups.o): New rule.
7240
e3d6ba5d
GB
72412014-08-29 Gary Benson <gbenson@redhat.com>
7242
7243 * utils.c (internal_vwarning): New function.
7244
7096e886
GB
72452014-08-28 Gary Benson <gbenson@redhat.com>
7246
7247 * utils.h (fatal): Remove declaration.
7248 * utils.c (fatal): Remove function.
7249
14ce3192
GB
72502014-08-28 Gary Benson <gbenson@redhat.com>
7251
7252 * tracepoint.c (gdb_agent_init): Replace fatal with
7253 perror_with_name.
7254 (initialize_tracepoint): Likewise.
7255
50278d59
GB
72562014-08-28 Gary Benson <gbenson@redhat.com>
7257
7258 * remote-utils.c (remote_prepare): Replace fatal with error.
7259
aa96c426
GB
72602014-08-28 Gary Benson <gbenson@redhat.com>
7261
7262 * linux-low.c (linux_async): Replace fatal with warning.
7263 Tidy up and return.
7264 (linux_start_non_stop): Return -1 if linux_async failed.
7265
f7160e97
GB
72662014-08-28 Gary Benson <gbenson@redhat.com>
7267
7268 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7269 gdb_assert.
7270 (i386_dr_low_get_addr): Remove vague comment.
7271 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7272 gdb_assert.
7273
38e08fca
GB
72742014-08-28 Gary Benson <gbenson@redhat.com>
7275
7276 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7277 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7278 internal_error.
7279 (linux_resume_one_lwp): Likewise.
7280 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7281 gdb_assert.
7282 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7283 with internal_error.
7284 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7285 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7286 (find_register_by_name): Replace fatal with internal_error.
7287 (find_regno): Likewise.
7288 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7289 * thread-db.c (thread_db_create_event): Likewise.
7290 (thread_db_load_search): Likewise.
7291 (try_thread_db_load_1): Likewise.
7292 * tracepoint.c (get_jump_space_head): Replace fatal with
7293 internal_error.
7294 (claim_trampoline_space): Likewise.
7295 (have_fast_tracepoint_trampoline_buffer): Likewise.
7296 (cmd_qtstart): Likewise.
7297 (stop_tracing): Likewise.
7298 (fast_tracepoint_collecting): Likewise.
7299 (target_malloc): Likewise.
7300 (download_tracepoint): Likewise.
7301 (download_trace_state_variables): Replace check with gdb_assert.
7302 (upload_fast_traceframes): Replace fatal with internal_error.
7303
34abf635
GB
73042014-08-19 Tom Tromey <tromey@redhat.com>
7305 Gary Benson <gbenson@redhat.com>
7306
7307 * Makefile.in (SFILES): Add common/common-debug.c.
7308 (OBS): Add common-debug.o.
7309 (common-debug.o): New rule.
7310 * debug.h (debug_printf): Don't declare.
7311 * debug.c (debug_printf): Renamed and rewritten as...
7312 (debug_vprintf): New function.
7313
f6e94d78
GB
73142014-08-19 Gary Benson <gbenson@redhat.com>
7315
7316 * utils.h: Do not include print-utils.h.
7317
9239eeab
GB
73182014-08-19 Tom Tromey <tromey@redhat.com>
7319 Gary Benson <gbenson@redhat.com>
7320
7321 * server.h: Add static assertion.
7322 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7323
ef87c8bb
GB
73242014-08-19 Tom Tromey <tromey@redhat.com>
7325 Gary Benson <gbenson@redhat.com>
7326
7327 * Makefile.in (SFILES): Add common/errors.c.
7328 (OBS): Add errors.o.
7329 (IPA_OBS): Add errors-ipa.o.
7330 (errors.o): New rule.
7331 (errors-ipa.o): Likewise.
7332 * utils.h (perror_with_name, error, warning): Don't declare.
7333 * utils.c (warning): Renamed and rewritten as...
7334 (vwarning): New function.
7335 (error): Renamed and rewritten as...
7336 (verror): New function.
7337 (internal_error): Renamed and rewritten as...
7338 (internal_verror): New function.
7339
bb974a24
GB
73402014-08-07 Gary Benson <gbenson@redhat.com>
7341
7342 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7343 * configure: Regenerate.
7344 * config.in: Likewise.
7345 * server.h: Do not include errno.h.
7346 * event-loop.c: Likewise.
7347 * hostio-errno.c: Likewise.
7348 * linux-low.c: Likewise.
7349 * remote-utils.c: Likewise.
7350 * spu-low.c: Likewise.
7351 * utils.c: Likewise.
7352 * gdbreplay.c: Unconditionally include errno.h.
7353
6d3d12eb
GB
73542014-08-07 Gary Benson <gbenson@redhat.com>
7355
7356 * server.h: Do not include string.h.
7357 * event-loop.c: Likewise.
7358 * linux-low.c: Likewise.
7359 * regcache.c: Likewise.
7360 * remote-utils.c: Likewise.
7361 * spu-low.c: Likewise.
7362 * utils.c: Likewise.
7363
dccbb609
GB
73642014-08-07 Gary Benson <gbenson@redhat.com>
7365
7366 * server.h: Do not include gdb_assert.h.
7367
e76df0d0
GB
73682014-08-07 Gary Benson <gbenson@redhat.com>
7369
7370 * server.h: Do not include common-utils.h.
7371
4cb9c816
GB
73722014-08-07 Gary Benson <gbenson@redhat.com>
7373
7374 * server.h: Do not include ptid.h.
7375 * notif.h: Likewise.
7376
3995eeee
GB
73772014-08-07 Gary Benson <gbenson@redhat.com>
7378
7379 * server.h: Do not include gdb_locale.h.
7380
cb9f1a9b
GB
73812014-08-07 Gary Benson <gbenson@redhat.com>
7382
7383 * server.h: Do not include gdb/signals.h.
7384 * win32-low.c: Likewise.
7385
a5fceff8
GB
73862014-08-07 Gary Benson <gbenson@redhat.com>
7387
7388 * server.h: Do not include pathmax.h.
7389
b9391142
GB
73902014-08-07 Gary Benson <gbenson@redhat.com>
7391
7392 * server.h: Do not include libiberty.h.
7393 * linux-bfin-low.c: Likewise.
7394
0e443c87
GB
73952014-08-07 Gary Benson <gbenson@redhat.com>
7396
7397 * server.h: Do not include ansidecl.h.
7398
8ebb3f56
GB
73992014-08-07 Gary Benson <gbenson@redhat.com>
7400
7401 * linux-x86-low.c: Do not include stddef.h.
7402 * lynx-ppc-low.c: Likewise.
7403 * tracepoint.c: Likewise.
7404
8980bdf6
GB
74052014-08-07 Gary Benson <gbenson@redhat.com>
7406
7407 * server.h: Do not include stdarg.h.
7408 * nto-low.c: Likewise.
7409
d7096f71
GB
74102014-08-07 Gary Benson <gbenson@redhat.com>
7411
7412 * server.h: Do not include stdlib.h.
7413 * inferiors.c: Likewise.
7414 * linux-low.c: Likewise.
7415 * regcache.c: Likewise.
7416 * spu-low.c: Likewise.
7417 * tracepoint.c: Likewise.
7418 * utils.c: Likewise.
7419
d02f550d
GB
74202014-08-07 Gary Benson <gbenson@redhat.com>
7421
7422 * server.h: Do not include stdio.h.
7423 * linux-low.c: Likewise.
7424 * remote-utils.c: Likewise.
7425 * spu-low.c: Likewise.
7426 * utils.c: Likewise.
7427 * wincecompat.c: Likewise.
7428
87f6c4e3
GB
74292014-08-06 Gary Benson <gbenson@redhat.com>
7430
7431 * regcache.c (init_register_cache): Move conditionals inside if.
7432
7089dca4
GB
74332014-08-06 Gary Benson <gbenson@redhat.com>
7434
7435 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7436
462f517e
GB
74372014-07-31 Gary Benson <gbenson@redhat.com>
7438
7439 * ax.h: Do not include server.h.
7440 * gdbthread.h: Likewise.
7441 * lynx-low.h: Likewise.
7442 * notif.h: Likewise.
7443
976411d6
GB
74442014-07-30 Gary Benson <gbenson@redhat.com>
7445
7446 * server.h: Include common-defs.h.
7447 Do not include config.h or build-gnulib-gdbserver/config.h.
7448
d41f6d8e
GB
74492014-07-30 Gary Benson <gbenson@redhat.com>
7450
7451 * hostio-errno.c: Move server.h to top of includes list.
7452 * inferiors.c: Likewise.
7453 * linux-x86-low.c: Likewise.
7454 * notif.c: Include server.h.
7455
314c6a35
TT
74562014-07-24 Tom Tromey <tromey@redhat.com>
7457 Gary Benson <gbenson@redhat.com>
7458
7459 * server.h (CORE_ADDR): Now unsigned.
7460
69ff6be5
PA
74612014-07-16 Pedro Alves <palves@redhat.com>
7462
7463 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7464
ce9e3fe7
PA
74652014-07-15 Pedro Alves <palves@redhat.com>
7466
7467 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7468 copy.
7469
e76126e8
PA
74702014-07-11 Pedro Alves <palves@redhat.com>
7471
7472 * linux-low.c (kill_wait_lwp): New function, based on
7473 kill_one_lwp_callback, but use my_waitpid directly.
7474 (kill_one_lwp_callback, linux_kill): Use it.
7475
8e9db26e
PA
74762014-06-23 Pedro Alves <palves@redhat.com>
7477
7478 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7479 before setting DR0..DR3.
7480
698b3e08
GB
74812014-06-20 Gary Benson <gbenson@redhat.com>
7482
7483 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7484 * configure: Regenerated.
7485 * config.in: Likewise.
7486
125f8a3d
GB
74872014-06-20 Gary Benson <gbenson@redhat.com>
7488
7489 * Makefile.in (SFILES): Update locations for files moved
7490 from common to nat.
7491 (object file files): Reordered.
7492
42995dbd
GB
74932014-06-20 Gary Benson <gbenson@redhat.com>
7494
7495 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7496 (i386_dr_low_set_addr): Likewise.
7497 (i386_dr_low_get_addr): Likewise.
7498 (i386_dr_low_can_set_control): Likewise.
7499 (i386_dr_low_set_control): Likewise.
7500 (i386_dr_low_get_control): Likewise.
7501 (i386_dr_low_get_status): Likewise.
7502 (i386_get_debug_register_length): Likewise.
7503 * linux-x86-low.c (i386_dr_low_set_addr):
7504 Changed signature. Made static.
7505 (i386_dr_low_get_addr): Likewise.
7506 (i386_dr_low_set_control): Likewise.
7507 (i386_dr_low_get_control): Likewise.
7508 (i386_dr_low_get_status): Likewise.
7509 (i386_dr_low): New global variable.
7510 * win32-i386-low.c (i386_dr_low_set_addr):
7511 Changed signature. Made static.
7512 (i386_dr_low_get_addr): Likewise.
7513 (i386_dr_low_set_control): Likewise.
7514 (i386_dr_low_get_control): Likewise.
7515 (i386_dr_low_get_status): Likewise.
7516 (i386_dr_low): New global variable.
7517
e1d2394b
MS
75182014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7519
7520 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7521 * Makefile.in (AR, AR_FLAGS): Define.
7522 * configure: Regenerate.
7523
3a8ee006
GB
75242014-06-19 Gary Benson <gbenson@redhat.com>
7525
7526 * Makefile.in (i386-dregs.o): New rule.
7527 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7528 * i386-low.c (target.h): Remove include.
7529 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7530 (DR_CONTROL_SHIFT): Likewise.
7531 (DR_CONTROL_SIZE): Likewise.
7532 (DR_RW_EXECUTE): Likewise.
7533 (DR_RW_WRITE): Likewise.
7534 (DR_RW_READ): Likewise.
7535 (DR_RW_IORW): Likewise.
7536 (DR_LEN_1): Likewise.
7537 (DR_LEN_2): Likewise.
7538 (DR_LEN_4): Likewise.
7539 (DR_LEN_8): Likewise.
7540 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7541 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7542 (DR_ENABLE_SIZE): Likewise.
7543 (DR_LOCAL_SLOWDOWN): Likewise.
7544 (DR_GLOBAL_SLOWDOWN): Likewise.
7545 (DR_CONTROL_RESERVED): Likewise.
7546 (I386_DR_CONTROL_MASK): Likewise.
7547 (I386_DR_VACANT): Likewise.
7548 (I386_DR_LOCAL_ENABLE): Likewise.
7549 (I386_DR_GLOBAL_ENABLE): Likewise.
7550 (I386_DR_DISABLE): Likewise.
7551 (I386_DR_SET_RW_LEN): Likewise.
7552 (I386_DR_GET_RW_LEN): Likewise.
7553 (I386_DR_WATCH_HIT): Likewise.
7554 (i386_wp_op_t): Likewise.
7555 (i386_show_dr): Likewise.
7556 (i386_length_and_rw_bits): Likewise.
7557 (i386_insert_aligned_watchpoint): Likewise.
7558 (i386_remove_aligned_watchpoint): Likewise.
7559 (i386_handle_nonaligned_watchpoint): Likewise.
7560 i386_update_inferior_debug_regs(): Likewise.
7561 (i386_dr_insert_watchpoint): Likewise.
7562 (i386_dr_remove_watchpoint): Likewise.
7563 (i386_dr_region_ok_for_watchpoint): Likewise.
7564 (i386_dr_stopped_data_address): Likewise.
7565 (i386_dr_stopped_by_watchpoint): Likewise.
7566
8f26655c
GB
75672014-06-19 Gary Benson <gbenson@redhat.com>
7568
7569 * i386-low.c (i386_dr_show): Renamed to
7570 i386_show_dr and made static. All uses updated.
7571 (i386_dr_length_and_rw_bits): Renamed to
7572 i386_length_and_rw_bits and made static.
7573 All uses updated.
7574 (i386_dr_insert_aligned_watchpoint): Renamed to
7575 i386_insert_aligned_watchpoint and made static.
7576 All uses updated.
7577 (i386_dr_remove_aligned_watchpoint): Renamed to
7578 i386_remove_aligned_watchpoint and made static.
7579 All uses updated.
7580 (i386_dr_update_inferior_debug_regs): Renamed to
7581 i386_update_inferior_debug_regs and made static.
7582 All uses updated.
7583
b9228891
GB
75842014-06-18 Gary Benson <gbenson@redhat.com>
7585
5171def3
GB
7586 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7587 (i386_dr_low_can_set_control): Likewise.
7588 (i386_get_debug_register_length): Likewise.
7589 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7590 (i386_dr_low_can_set_control): Likewise.
7591 (i386_get_debug_register_length): Likewise.
7592
75932014-06-17 Gary Benson <gbenson@redhat.com>
7594
b9228891
GB
7595 * i386-low.h (i386-dregs.h): New include.
7596 (DR_FIRSTADDR): Now in i386-dregs.h.
7597 (DR_LASTADDR): Likewise.
7598 (DR_NADDR): Likewise.
7599 (DR_STATUS): Likewise.
7600 (DR_CONTROL): Likewise.
7601 (i386_debug_reg_state): Likewise.
7602 (i386_dr_insert_watchpoint): Likewise.
7603 (i386_dr_remove_watchpoint): Likewise.
7604 (i386_dr_region_ok_for_watchpoint): Likewise.
7605 (i386_dr_stopped_data_address): Likewise.
7606 (i386_dr_stopped_by_watchpoint): Likewise.
7607 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7608
4be83cc2
GB
76092014-06-18 Gary Benson <gbenson@redhat.com>
7610
7611 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7612 i386_dr_insert_watchpoint.
7613 (i386_low_remove_watchpoint): Renamed to
7614 i386_dr_remove_watchpoint.
7615 (i386_low_region_ok_for_watchpoint): Renamed to
7616 i386_dr_region_ok_for_watchpoint.
7617 (i386_low_stopped_data_address): Renamed to
7618 i386_dr_stopped_data_address.
7619 (i386_low_stopped_by_watchpoint): Renamed to
7620 i386_dr_stopped_by_watchpoint.
7621 * i386-low.c (i386_show_dr): Renamed to
7622 i386_dr_show and made nonstatic. All uses updated.
7623 (i386_length_and_rw_bits): Renamed to
7624 i386_dr_length_and_rw_bits and made nonstatic.
7625 All uses updated.
7626 (i386_insert_aligned_watchpoint): Renamed to
7627 i386_dr_insert_aligned_watchpoint and made nonstatic.
7628 All uses updated.
7629 (i386_remove_aligned_watchpoint): Renamed to
7630 i386_dr_remove_aligned_watchpoint and made nonstatic.
7631 All uses updated.
7632 (i386_update_inferior_debug_regs): Renamed to
7633 i386_dr_update_inferior_debug_regs and made nonstatic.
7634 All uses updated.
7635 (i386_low_insert_watchpoint): Renamed to
7636 i386_dr_insert_watchpoint. All uses updated.
7637 (i386_low_remove_watchpoint): Renamed to
7638 i386_dr_remove_watchpoint. All uses updated.
7639 (i386_low_region_ok_for_watchpoint): Renamed to
7640 i386_dr_region_ok_for_watchpoint. All uses updated.
7641 (i386_low_stopped_data_address): Renamed to
7642 i386_dr_stopped_data_address. All uses updated.
7643 (i386_low_stopped_by_watchpoint): Renamed to
7644 i386_dr_stopped_by_watchpoint. All uses updated.
7645
131aa0d4
GB
76462014-06-18 Gary Benson <gbenson@redhat.com>
7647
7648 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7649 (i386_dr_low_can_set_control): Likewise.
7650 (i386_insert_aligned_watchpoint): New check.
7651
d9305f7f
GB
76522014-06-18 Gary Benson <gbenson@redhat.com>
7653
7654 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7655 Renamed to state.
7656
e927c9fc
GB
76572014-06-18 Gary Benson <gbenson@redhat.com>
7658
7659 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7660 instead of fatal and error.
7661 (i386_handle_nonaligned_watchpoint): Likewise.
7662
1b6d4134
GB
76632014-06-18 Gary Benson <gbenson@redhat.com>
7664
7665 * i386-low.c (i386_get_debug_register_length): New macro.
7666 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7667 (i386_show_dr): Use debug_printf instead of fprintf. Use
7668 phex to format values.
7669
6e62758f
GB
76702014-06-18 Gary Benson <gbenson@redhat.com>
7671
7672 * i386-low.h: Comment changes.
7673 * i386-low.c: Likewise.
7674
fc6e2f03
GB
76752014-06-18 Gary Benson <gbenson@redhat.com>
7676
7677 * i386-low.c: Whitespace changes.
7678
f9d1eeed
TT
76792014-06-12 Tom Tromey <tromey@redhat.com>
7680
7681 * utils.c (freeargv): Remove.
7682
0b04e523
TT
76832014-06-12 Tom Tromey <tromey@redhat.com>
7684
7685 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7686 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7687 (parse_debug_format_options): Likewise.
7688 (gdbserver_usage): Likewise.
7689 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7690 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7691 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7692 against libiberty.
7693 ($(LIBGNU)): Depend on libiberty.
7694 (all-lib): Recurse into all subdirs.
7695 (install-only): Invoke "install" target in subdirs.
7696 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7697 targets.
7698 * configure: Rebuild.
7699 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7700 for vasprintf, vsnprintf, or gettimeofday.
7701 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7702 srv_tgtobj.
7703
270c9937
JB
77042014-06-05 Joel Brobecker <brobecker@adacore.com>
7705
7706 * development.sh: Delete.
7707 * Makefile.in (config.status): Adjust dependency on development.sh.
7708 * configure.ac: Adjust development.sh source call.
7709 * configure: Regenerate.
7710
0a261ed8
PA
77112014-06-02 Pedro Alves <palves@redhat.com>
7712
7713 * ax.c (gdb_free_agent_expr): New function.
7714 * ax.h (gdb_free_agent_expr): New declaration.
7715 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7716 list.
7717 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7718 static.
7719 (clear_breakpoint_conditions_and_commands): New function.
7720 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7721 (clear_breakpoint_conditions_and_commands): New declaration.
7722
e9dae05e
RR
77232014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7724
7725 * linux-aarch64-low.c (asm/ptrace.h): Include.
7726
5876f503
JK
77272014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7728
7729 Fix TLS access for -static -pthread.
7730 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7731 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7732 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7733
802e8e6d
PA
77342014-05-20 Pedro Alves <palves@redhat.com>
7735
7736 * linux-aarch64-low.c (aarch64_insert_point)
7737 (aarch64_remove_point): No longer check whether the type is
7738 supported here. Adjust to new interface.
7739 (the_low_target): Install aarch64_supports_z_point_type as
7740 supports_z_point_type method.
7741 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7742 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7743 instead of a Z packet char. Adjust.
7744 (arm_supports_z_point_type): New function.
7745 (arm_insert_point, arm_remove_point): Adjust to new interface.
7746 (the_low_target): Install arm_supports_z_point_type.
7747 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7748 (cris_insert_point, cris_remove_point): Adjust to new interface.
7749 Don't check whether the type is supported here.
7750 (the_low_target): Install cris_supports_z_point_type.
7751 * linux-low.c (linux_supports_z_point_type): New function.
7752 (linux_insert_point, linux_remove_point): Adjust to new interface.
7753 * linux-low.h (struct linux_target_ops) <insert_point,
7754 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7755 raw_breakpoint pointer parameter.
7756 <supports_z_point_type>: New method.
7757 * linux-mips-low.c (mips_supports_z_point_type): New function.
7758 (mips_insert_point, mips_remove_point): Adjust to new interface.
7759 Use mips_supports_z_point_type.
7760 (the_low_target): Install mips_supports_z_point_type.
7761 * linux-ppc-low.c (the_low_target): Install NULL as
7762 supports_z_point_type method.
7763 * linux-s390-low.c (the_low_target): Install NULL as
7764 supports_z_point_type method.
7765 * linux-sparc-low.c (the_low_target): Install NULL as
7766 supports_z_point_type method.
7767 * linux-x86-low.c (x86_supports_z_point_type): New function.
7768 (x86_insert_point): Adjust to new insert_point interface. Use
7769 insert_memory_breakpoint. Adjust to new
7770 i386_low_insert_watchpoint interface.
7771 (x86_remove_point): Adjust to remove_point interface. Use
7772 remove_memory_breakpoint. Adjust to new
7773 i386_low_remove_watchpoint interface.
7774 (the_low_target): Install x86_supports_z_point_type.
7775 * lynx-low.c (lynx_target_ops): Install NULL as
7776 supports_z_point_type callback.
7777 * nto-low.c (nto_supports_z_point_type): New.
7778 (nto_insert_point, nto_remove_point): Adjust to new interface.
7779 (nto_target_ops): Install nto_supports_z_point_type.
7780 * mem-break.c: Adjust intro comment.
7781 (struct raw_breakpoint) <raw_type, size>: New fields.
7782 <inserted>: Update comment.
7783 <shlib_disabled>: Delete field.
7784 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7785 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7786 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7787 (raw_bkpt_type_to_target_hw_bp_type): New function.
7788 (find_enabled_raw_code_breakpoint_at): New function.
7789 (find_raw_breakpoint_at): New type and size parameters. Use them.
7790 (insert_memory_breakpoint): New function, based off
7791 set_raw_breakpoint_at.
7792 (remove_memory_breakpoint): New function.
7793 (set_raw_breakpoint_at): Reimplement.
7794 (set_breakpoint): New, based on set_breakpoint_at.
7795 (set_breakpoint_at): Reimplement.
7796 (delete_raw_breakpoint): Go through the_target->remove_point
7797 instead of assuming memory breakpoints.
7798 (find_gdb_breakpoint_at): Delete.
7799 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7800 (find_gdb_breakpoint): New function.
7801 (set_gdb_breakpoint_at): Delete.
7802 (z_type_supported): New function.
7803 (set_gdb_breakpoint_1): New function, loosely based off
7804 set_gdb_breakpoint_at.
7805 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7806 (delete_gdb_breakpoint_at): Delete.
7807 (delete_gdb_breakpoint_1): New function, loosely based off
7808 delete_gdb_breakpoint_at.
7809 (delete_gdb_breakpoint): New function.
7810 (clear_gdb_breakpoint_conditions): Rename to ...
7811 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7812 breakpoint.
7813 (add_condition_to_breakpoint): Make static.
7814 (add_breakpoint_condition): Take a struct breakpoint pointer
7815 instead of an address. Adjust.
7816 (gdb_condition_true_at_breakpoint): Rename to ...
7817 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7818 z_type parameter.
7819 (gdb_condition_true_at_breakpoint): Reimplement.
7820 (add_breakpoint_commands): Take a struct breakpoint pointer
7821 instead of an address. Adjust.
7822 (gdb_no_commands_at_breakpoint): Rename to ...
7823 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7824 parameter. Return true if no breakpoint was found. Change debug
7825 output.
7826 (gdb_no_commands_at_breakpoint): Reimplement.
7827 (run_breakpoint_commands): Rename to ...
7828 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7829 and change return type to boolean.
7830 (run_breakpoint_commands): New function.
7831 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7832 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7833 breakpoint. Go through the_target->remove_point instead of
7834 assuming memory breakpoint.
7835 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7836 software and hardware breakpoints.
7837 (reinsert_raw_breakpoint): Go through the_target->insert_point
7838 instead of assuming memory breakpoint.
7839 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7840 software and hardware breakpoints.
7841 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7842 Check both software and hardware breakpoints.
7843 (validate_inserted_breakpoint): Assert the breakpoint is a
7844 software breakpoint. Set the inserted flag to -1 instead of
7845 setting shlib_disabled.
7846 (delete_disabled_breakpoints): Adjust.
7847 (validate_breakpoints): Only validate software breakpoints.
7848 Adjust to inserted flag change.
7849 (check_mem_read, check_mem_write): Skip breakpoint types other
7850 than software breakpoints. Adjust to inserted flag change.
7851 * mem-break.h (enum raw_bkpt_type): New enum.
7852 (raw_breakpoint, struct process_info): Forward declare.
7853 (Z_packet_to_target_hw_bp_type): Delete declaration.
7854 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7855 (set_gdb_breakpoint, delete_gdb_breakpoint)
7856 (clear_breakpoint_conditions): New declarations.
7857 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7858 (breakpoint_inserted_here): Update comment.
7859 (add_breakpoint_condition, add_breakpoint_commands): Replace
7860 address parameter with a breakpoint pointer parameter.
7861 (gdb_breakpoint_here): Update comment.
7862 (delete_gdb_breakpoint_at): Delete.
7863 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7864 * server.c (process_point_options): Take a struct breakpoint
7865 pointer instead of an address. Adjust.
7866 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7867 delete_gdb_breakpoint.
7868 * spu-low.c (spu_target_ops): Install NULL as
7869 supports_z_point_type method.
7870 * target.h: Include mem-break.h.
7871 (struct target_ops) <prepare_to_access_memory>: Update comment.
7872 <supports_z_point_type>: New field.
7873 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7874 instead of a char. Also take a raw breakpoint pointer.
7875 * win32-arm-low.c (the_low_target): Install NULL as
7876 supports_z_point_type.
7877 * win32-i386-low.c (i386_supports_z_point_type): New function.
7878 (i386_insert_point, i386_remove_point): Adjust to new interface.
7879 (the_low_target): Install i386_supports_z_point_type.
7880 * win32-low.c (win32_supports_z_point_type): New function.
7881 (win32_insert_point, win32_remove_point): Adjust to new interface.
7882 (win32_target_ops): Install win32_supports_z_point_type.
7883 * win32-low.h (struct win32_target_ops):
7884 <supports_z_point_type>: New method.
7885 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7886 instead of a char. Also take a raw breakpoint pointer.
7887
932539e3
PA
78882014-05-20 Pedro Alves <palves@redhat.com>
7889
7890 * mem-break.h: Include break-common.h.
7891 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7892 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7893 (Z_packet_to_target_hw_bp_type): New declaration.
7894 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7895 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7896 (Z_PACKET_ACCESS_WP): Delete macros.
7897 (Z_packet_to_hw_type): Delete function.
7898 * i386-low.h: Don't include break-common.h here.
7899 (Z_packet_to_hw_type): Delete declaration.
7900 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7901 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7902 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7903 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7904 * linux-aarch64-low.c: Don't include break-common.h here.
7905 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7906 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7907 (Z_packet_to_target_hw_bp_type): Delete function.
7908 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7909 function.
7910 (mips_insert_point, mips_remove_point): Use
7911 Z_packet_to_target_hw_bp_type.
7912
4ff0d3d8
PA
79132014-05-20 Pedro Alves <palves@redhat.com>
7914
7915 * linux-aarch64-low.c: Include break-common.h.
7916 (enum target_point_type): Delete.
7917 (Z_packet_to_point_type): Rename to ...
7918 (Z_packet_to_target_hw_bp_type): ... this, and return a
7919 target_hw_bp_type instead.
7920 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7921 instead of an enum target_point_type.
7922 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7923 breakpoint type.
7924 (aarch64_dr_state_insert_one_point)
7925 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7926 (aarch64_handle_aligned_watchpoint)
7927 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7928 Take an enum target_hw_bp_type instead of an enum
7929 target_point_type.
7930 (aarch64_supports_z_point_type): New function.
7931 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7932 use Z_packet_to_target_hw_bp_type.
7933
786dc519
JB
79342014-05-20 Joel Brobecker <brobecker@adacore.com>
7935
7936 * configure.ac: Only use -Werror by default when DEVELOPMENT
7937 is true.
7938 * configure: Regenerate.
7939
9e0aa64f
JK
79402014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7941
7942 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7943 * linux-x86-low.c (X86_64_USER_REGS): New.
7944 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7945
2b577b92
YQ
79462014-04-28 Yao Qi <yao@codesourcery.com>
7947
7948 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7949 name.
7950
94611da2
PA
79512014-04-25 Pedro Alves <palves@redhat.com>
7952
7953 PR server/16255
7954 * linux-low.c (linux_attach_fail_reason_string): New function.
7955 (linux_attach_lwp): Delete.
7956 (linux_attach_lwp_1): Rename to ...
7957 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7958 argument. Remove "initial" parameter. Return int instead of
7959 void. Don't error or warn here.
7960 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7961 failure to attach to the tgid. Call warning when failing to
7962 attach to an lwp.
7963 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7964 argument. Remove "initial" parameter. Return int instead of
7965 void. Don't error or warn here.
7966 (linux_attach_fail_reason_string): New declaration.
7967 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7968 interface change. Use linux_attach_fail_reason_string.
7969
01f9f808
MS
79702014-04-24 Michael Sturm <michael.sturm@mintel.com>
7971 Walfred Tedeschi <walfred.tedeschi@intel.com>
7972
7973 * Makefile.in: Added rules to handle new files
7974 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7975 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7976 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7977 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7978 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7979 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7980 x32-avx512-linux.o.
7981 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7982 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7983 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7984 i386/x32-avx512.xml.
7985 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7986 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7987 i386/x32-avx512-linux.xml.
7988 * i387-fp.c (num_avx512_k_registers): New constant for number
7989 of K registers.
7990 (num_avx512_zmmh_low_registers): New constant for number of
7991 lower ZMM registers (0-15).
7992 (num_avx512_zmmh_high_registers): New constant for number of
7993 higher ZMM registers (16-31).
7994 (num_avx512_ymmh_registers): New contant for number of higher
7995 YMM registers (ymm16-31 added by avx521 on x86_64).
7996 (num_avx512_xmm_registers): New constant for number of higher
7997 XMM registers (xmm16-31 added by AVX512 on x86_64).
7998 (struct i387_xsave): Add space for AVX512 registers.
7999 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8000 Add code to handle AVX512 registers.
8001 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8002 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8003 prototypei from generated file.
8004 (tdesc_amd64_avx512_linux): Likewise.
8005 (init_registers_x32_avx512_linux): Likewise.
8006 (tdesc_x32_avx512_linux): Likewise.
8007 (init_registers_i386_avx512_linux): Likewise.
8008 (tdesc_i386_avx512_linux): Likewise.
8009 (x86_64_regmap): Add AVX512 registers.
8010 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8011 mask.
8012 (initialize_low_arch): Add code to initialize AVX512 registers.
8013
51aa91f9
PA
80142014-04-23 Pedro Alves <palves@redhat.com>
8015
8016 * mem-break.c (find_gdb_breakpoint_at): Make static.
8017 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8018
a4165e94
PA
80192014-04-23 Pedro Alves <palves@redhat.com>
8020
8021 * i386-low.c: Don't include break-common.h here.
8022 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8023 prototype to take target_hw_bp_type as argument instead of a Z
8024 packet char.
8025 * i386-low.h: Include break-common.h here.
8026 (Z_packet_to_hw_type): Declare.
8027 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8028 prototypes.
8029 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8030 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8031 (x86_remove_point): Convert the packet number to a
8032 target_hw_bp_type before calling i386_low_remove_watchpoint.
8033 * win32-i386-low.c (i386_insert_point): Convert the packet number
8034 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8035 (i386_remove_point): Convert the packet number to a
8036 target_hw_bp_type before calling i386_low_remove_watchpoint.
8037
b8acf843
PA
80382014-04-23 Pedro Alves <palves@redhat.com>
8039
8040 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8041
d708bcd1
PA
80422014-04-10 Pedro Alves <palves@redhat.com>
8043
8044 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8045 Check if the condition or command is NULL before checking if the
8046 breakpoint is known. On success, return true.
8047 * mem-break.h (add_breakpoint_condition): Document return.
8048 (add_breakpoint_commands): Add describing comment.
8049 * server.c (skip_to_semicolon): New function.
8050 (process_point_options): Use it.
8051
2eec7d5b
PA
80522014-04-09 Pedro Alves <palves@redhat.com>
8053
8054 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8055 to lwpid_of.
8056
fa96cb38
PA
80572014-02-27 Pedro Alves <palves@redhat.com>
8058
8059 PR 12702
8060 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8061 macros.
8062 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8063 output.
8064 (last_thread_of_process_p): Take a PID argument instead of a
8065 thread pointer.
8066 (linux_wait_for_lwp): Delete.
8067 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8068 functions.
8069 (linux_low_filter_event): New function, party factored out from
8070 linux_wait_for_event.
8071 (linux_wait_for_event): Rename to ...
8072 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8073 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8074 sigsuspend. Check for zombie leaders.
8075 (linux_wait_for_event): Reimplement as wrapper around
8076 linux_wait_for_event_filtered.
8077 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8078 a normal or signal exit is seen, it's the whole process exiting.
8079 (wait_for_sigstop): No longer a for_each_inferior callback.
8080 Rewrite on top of linux_wait_for_event_filtered.
8081 (stop_all_lwps): Call wait_for_sigstop directly.
8082 * server.c (resume, handle_target_event): Handle
8083 TARGET_WAITKIND_NO_RESUMED.
8084
d763de10
JB
80852014-02-26 Joel Brobecker <brobecker@adacore.com>
8086
8087 * win32-low.c (psapi_get_dll_name,
8088 * win32_CreateToolhelp32Snapshot): Delete.
8089 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8090 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8091 Delete.
8092 (handle_load_dll): Add function description.
8093 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8094
850a0f76
JB
80952014-02-26 Joel Brobecker <brobecker@adacore.com>
8096
8097 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8098 Add comment.
8099 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8100 base address when calling win32_add_one_solib.
8101 (handle_load_dll): Delete local variable load_addr.
8102 Remove 0x1000 offset applied to DLL base address when calling
8103 win32_add_one_solib.
8104 (handle_unload_dll): Add comment.
8105
f25b3fc3
JB
81062014-02-26 Joel Brobecker <brobecker@adacore.com>
8107
8108 * win32-low.c (win32_add_all_dlls): Renames
8109 win32_ensure_ntdll_loaded. Rewrite function documentation.
8110 Adjust implementation to always load all DLLs.
8111 Add 0x1000 offset to DLL base address when calling
8112 win32_add_one_solib.
8113 (child_initialization_done): New static global.
8114 (do_initial_child_stuff): Set child_initialization_done to
8115 zero during child initialization, and 1 after. Replace call
8116 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8117 Add comment.
8118 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8119 (handle_unload_dll): Add function documentation.
8120 (get_child_debug_event): Ignore load and unload DLL events
8121 during child initialization.
8122
d86d4aaf
DE
81232014-02-20 Doug Evans <dje@google.com>
8124
3bc32da3 8125 Remove global all_lwps.
d86d4aaf
DE
8126 * inferiors.h (ptid_of): Move here from linux-low.h.
8127 (pid_of, lwpid_of): Ditto.
8128 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8129 parameter is a struct thread_info * now.
8130 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8131 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8132 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8133 directly.
8134 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8135 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8136 * linux-arm-low.c (update_registers_callback): Update, "entry"
8137 parameter is a struct thread_info * now.
8138 Fetch lwpid from current_inferior directly.
8139 (arm_insert_point): Pass &all_threads to find_inferior instead of
8140 &all_lwps.
8141 (arm_remove_point): Ditto.
8142 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8143 (arm_prepare_to_resume): Fetch pid from thread.
8144 (arm_read_description): Fetch lwpid from current_inferior directly.
8145 * linux-low.c (all_lwps): Delete.
8146 (delete_lwp): Delete call to remove_inferior.
8147 (handle_extended_wait): Fetch lwpid from thread.
8148 (add_lwp): Don't set lwp->entry.id. Remove call to
8149 add_inferior_to_list.
8150 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8151 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8152 (kill_one_lwp_callback): Ditto.
8153 (linux_kill): Don't dereference NULL pointer.
8154 Fetch ptid,lwpid from thread.
8155 (get_detach_signal): Fetch ptid from thread.
8156 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8157 Simplify call to regcache_invalidate_thread.
8158 (delete_lwp_callback): Update, "entry" parameter is a
8159 struct thread_info * now. Fetch pid from thread.
8160 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8161 (status_pending_p_callback): Update, "entry" parameter is a
8162 struct thread_info * now. Fetch ptid from thread.
8163 (find_lwp_pid): Update, "entry" parameter is a
8164 struct thread_info * now.
8165 (linux_wait_for_lwp): Fetch pid from thread.
8166 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8167 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8168 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8169 (dequeue_one_deferred_signal): Ditto.
8170 (cancel_breakpoint): Fetch ptid from current_inferior.
8171 (linux_wait_for_event): Pass &all_threads to find_inferior,
8172 not &all_lwps. Fetch ptid, lwpid from thread.
8173 (count_events_callback): Update, "entry" parameter is a
8174 struct thread_info * now.
8175 (select_singlestep_lwp_callback): Ditto.
8176 (select_event_lwp_callback): Ditto.
8177 (cancel_breakpoints_callback): Ditto.
8178 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8179 not &all_lwps.
8180 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8181 (unsuspend_one_lwp): Update, "entry" parameter is a
8182 struct thread_info * now.
8183 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8184 not &all_lwps.
8185 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8186 Fetch lwpid from thread, not lwp.
8187 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8188 Pass &all_threads to find_inferior, not &all_lwps.
8189 (send_sigstop): Fetch lwpid from thread, not lwp.
8190 (send_sigstop_callback): Update, "entry" parameter is a
8191 struct thread_info * now.
8192 (suspend_and_send_sigstop_callback): Ditto.
8193 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8194 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8195 struct thread_info * now.
8196 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8197 from thread, lwp.
8198 (lwp_running): Update, "entry" parameter is a
8199 struct thread_info * now.
8200 (stop_all_lwps): Fetch ptid from thread.
8201 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8202 (linux_resume_one_lwp): Fetch lwpid from thread.
8203 (linux_set_resume_request): Update, "entry" parameter is a
8204 struct thread_info * now. Fetch pid, lwpid from thread.
8205 (resume_status_pending_p): Update, "entry" parameter is a
8206 struct thread_info * now.
8207 (need_step_over_p): Ditto. Fetch lwpid from thread.
8208 (start_step_over): Fetch lwpid from thread.
8209 (linux_resume_one_thread): Update, "entry" parameter is a
8210 struct thread_info * now. Fetch lwpid from thread.
8211 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8212 (proceed_one_lwp): Update, "entry" parameter is a
8213 struct thread_info * now. Fetch lwpid from thread.
8214 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8215 struct thread_info * now.
8216 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8217 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8218 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8219 directly.
8220 (regsets_store_inferior_registers): Ditto.
8221 (fetch_register, store_register): Ditto.
8222 (linux_read_memory, linux_write_memory): Ditto.
8223 (linux_request_interrupt): Ditto.
8224 (linux_read_auxv): Ditto.
8225 (linux_xfer_siginfo): Ditto.
8226 (linux_qxfer_spu): Ditto.
8227 (linux_qxfer_libraries_svr4): Ditto.
8228 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8229 moved to inferiors.h.
8230 (get_lwp): Delete.
8231 (get_thread_lwp): Update.
8232 (struct lwp_info): Delete member "entry". Simplify comment for
8233 member "thread".
8234 (all_lwps): Delete.
8235 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8236 current_inferior directly.
8237 (update_watch_registers_callback): Update, "entry" parameter is a
8238 struct thread_info * now. Fetch pid from thread.
8239 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8240 (mips_insert_point): Fetch lwpid from current_inferior.
8241 Pass &all_threads to find_inferior, not &all_lwps.
8242 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8243 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8244 directly.
8245 (mips_stopped_data_address): Ditto.
8246 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8247 directly.
8248 * linux-tile-low.c (tile_arch_setup): Ditto.
8249 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8250 (update_debug_registers_callback): Update, "entry" parameter is a
8251 struct thread_info * now. Fetch pid from thread.
8252 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8253 Pass &all_threads to find_inferior, not &all_lwps.
8254 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8255 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8256 Pass &all_threads to find_inferior, not &all_lwps.
8257 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8258 (i386_dr_low_get_status): Ditto.
8259 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8260 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8261 (x86_linux_read_description): Ditto.
8262 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8263
3b8361aa
DE
82642014-02-20 Doug Evans <dje@google.com>
8265
8266 * inferiors.c (get_first_inferior): Fix buglet.
8267
f7667f0d
DE
82682014-02-19 Doug Evans <dje@google.com>
8269
8270 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8271 * inferiors.c (add_thread): Change result type to struct thread_info *.
8272 All callers updated.
8273 (add_lwp): Call add_thread here instead of in callers.
8274 All callers updated.
8275 * linux-low.h (get_lwp_thread): Rewrite.
8276 (struct lwp_info): New member "thread".
8277
b3312d80
DE
82782014-02-19 Doug Evans <dje@google.com>
8279
8280 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8281 All callers updated.
8282
ecc6f45c
DE
82832014-02-19 Doug Evans <dje@google.com>
8284
8285 * inferiors.c (add_thread): Fix whitespace.
8286
649ebbca
DE
82872014-02-19 Doug Evans <dje@google.com>
8288
8289 * dll.c (clear_dlls): Replace accessing list implemention details
8290 with API function.
8291 * gdbthread.h (get_first_thread): Declare.
8292 * inferiors.c (for_each_inferior_with_data): New function.
8293 (get_first_thread): New function.
8294 (find_thread_ptid): Simplify.
8295 (get_first_inferior): New function.
8296 (clear_list): Delete.
8297 (one_inferior_p): New function.
8298 (clear_inferior_list): New function.
8299 (clear_inferiors): Update.
8300 * inferiors.h (for_each_inferior_with_data): Declare.
8301 (clear_inferior_list): Declare.
8302 (one_inferior_p): Declare.
8303 (get_first_inferior): Declare.
8304 * linux-low.c (linux_wait_for_event): Replace accessing list
8305 implemention details with API function.
8306 * server.c (target_running): Ditto.
8307 (accumulate_file_name_length): New function.
8308 (emit_dll_description): New function.
8309 (handle_qxfer_libraries): Replace accessing list implemention
8310 details with API function.
8311 (handle_qxfer_threads_worker): New function.
8312 (handle_qxfer_threads_proper): Replace accessing list implemention
8313 details with API function.
8314 (handle_query): Ditto.
8315 (visit_actioned_threads_callback_ftype): New typedef.
8316 (visit_actioned_threads_data): New struct.
8317 (visit_actioned_threads): Rewrite to be find_inferior callback.
8318 (resume): Call find_inferior.
8319 (handle_status): Replace accessing list implemention
8320 details with API function.
8321 (process_serial_event): Replace accessing list implemention details
8322 with API function.
8323 * target.c (set_desired_inferior): Replace accessing list implemention
8324 details with API function.
8325 * tracepoint.c (same_process_p): New function.
8326 (gdb_agent_about_to_close): Replace accessing list implemention
8327 details with API function.
8328 * win32-low.c (child_delete_thread): Replace accessing list
8329 implemention details with API function.
8330 (match_dll_by_basename): New function.
8331 (dll_is_loaded_by_basename): New function.
8332 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8333 details call to dll_is_loaded_by_basename.
8334
80894984
DE
83352014-02-19 Doug Evans <dje@google.com>
8336
8337 * dll.h (struct dll_info): Add comment.
8338 * gdbthread.h (struct thread_info): Add comment.
8339 (current_ptid): Simplify.
8340 * inferiors.c (add_process): Update.
8341 (remove_process): Update.
8342 * inferiors.h (struct process_info): Rename member "head" to "entry".
8343 * linux-low.c (delete_lwp): Update.
8344 (add_lwp): Update.
8345 (last_thread_of_process_p): Update.
8346 (kill_one_lwp_callback, linux_kill): Update.
8347 (status_pending_p_callback): Update.
8348 (wait_for_sigstop): Update. Simplify read of ptid.
8349 (start_step_over): Update.
8350 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8351 (get_lwp_thread): Update.
8352 (struct lwp_info): Rename member "head" to "entry".
8353 * regcache.h (inferior_list_entry): Delete.
8354 * server.c (kill_inferior_callback): Update.
8355 (detach_or_kill_inferior_callback): Update.
8356 (print_started_pid): Update.
8357 (print_attached_pid): Update.
8358 (process_serial_event): Simplify read of ptid.
8359 * thread-db.c (thread_db_create_event): Update.
8360 (thread_db_get_tls_address): Update.
8361 * win32-low.c (current_inferior_ptid): Simplify.
8362
46917d26
TT
83632014-02-19 Tom Tromey <tromey@redhat.com>
8364
8365 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8366 argument.
8367 (target_supports_btrace): Update.
8368
0759a81e
YQ
83692014-02-14 Yao Qi <yao@codesourcery.com>
8370
8371 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8372 (rsp-low-ipa.o): New target.
8373
a7191e8b
TT
83742014-02-12 Tom Tromey <tromey@redhat.com>
8375
8376 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8377 convert_ascii_to_int.
8378 * regcache.c (registers_to_string): Likewise.
8379 * remote-utils.c (decode_M_packet): Likewise.
8380 * server.c (process_serial_event): Likewise.
8381
ff0e980e
TT
83822014-02-12 Tom Tromey <tromey@redhat.com>
8383
8384 * server.c (handle_query, handle_v_run): Use hex2bin, not
8385 unhexify.
8386 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8387
e9371aff
TT
83882014-02-12 Tom Tromey <tromey@redhat.com>
8389
8390 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8391 convert_int_to_ascii.
8392 * regcache.c (registers_to_string, collect_register_as_string):
8393 Likewise.
8394 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8395 Likewise.
8396 * server.c (process_serial_event): Likewise.
8397 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8398 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8399
971dc0b8
TT
84002014-02-12 Tom Tromey <tromey@redhat.com>
8401
8402 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8403 bin2hex, not hexify.
8404 * tracepoint.c (cmd_qtstatus): Likewise.
8405
0a822afb
TT
84062014-02-12 Tom Tromey <tromey@redhat.com>
8407
8408 * remote-utils.c (monitor_output): Pass explicit length to
8409 hexify.
8410
9c3d6531
TT
84112014-02-12 Tom Tromey <tromey@redhat.com>
8412
8413 * tracepoint.c: Include rsp-low.h.
8414 * server.c: Include rsp-low.h.
8415 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8416 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8417 declare.
8418 * remote-utils.c: Include rsp-low.h.
8419 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8420 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8421 (convert_int_to_ascii, convert_ascii_to_int): Move to
8422 common/rsp-low.c.
8423 * regcache.c: Include rsp-low.h.
8424 * ax.c: Include rsp-low.h.
8425 * Makefile.in (SFILES): Add common/rsp-low.c.
8426 (OBS): Add rsp-low.o.
8427 (rsp-low.o): New target.
8428
01fd3ea5
TT
84292014-02-12 Tom Tromey <tromey@redhat.com>
8430
8431 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8432 Include print-utils.h.
8433 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8434 (plongest, thirty_two, phex_nz): Remove.
8435 * Makefile.in (SFILES): Add common/print-utils.c.
8436 (OBS): Add print-utils.o.
8437 (print-utils-ipa.o): New target.
8438 (print-utils.o): New target.
8439 (IPA_OBJS): Add print-utils-ipa.o.
8440
e99dc820
TT
84412014-02-06 Tom Tromey <tromey@redhat.com>
8442
8443 * Makefile.in (SFILES): Fix indentation.
8444
ee1e2d4f
DE
84452014-02-05 Doug Evans <dje@google.com>
8446
8447 * linux-low.c (linux_wait_for_event): Improve comment.
8448 (linux_wait_1): Keep current_inferior in sync with event_child.
8449
f5a02773
DE
84502014-01-22 Doug Evans <dje@google.com>
8451
8452 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8453
87ce2a04
DE
84542014-01-22 Doug Evans <dje@google.com>
8455
8456 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8457 * configure: Regenerate.
8458 * config.in: Regenerate.
8459 * Makefile.in (SFILES): Add debug.c.
8460 (OBS): Add debug.o.
8461 * debug.c: New file.
8462 * debug.h: New file.
8463 * linux-aarch64-low.c (*): Update all debugging printfs to use
8464 debug_printf instead of fprintf.
8465 * linux-arm-low.c (*): Ditto.
8466 * linux-cris-low.c (*): Ditto.
8467 * linux-crisv32-low.c (*): Ditto.
8468 * linux-m32r-low.c (*): Ditto.
8469 * linux-sparc-low.c (*): Ditto.
8470 * linux-x86.c (*): Ditto.
8471 * linux-low.c (*): Ditto.
8472 (linux_wait_1): Add calls to debug_enter, debug_exit.
8473 (linux_wait): Remove redundant debugging printf.
8474 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8475 (linux_resume, unstop_all_lwps): Ditto.
8476 * mem-break.c (*): Update all debugging printfs to use
8477 debug_printf instead of fprintf.
8478 * remote-utils.c (*): Ditto.
8479 * thread-db.c (*): Ditto.
8480 * server.c #include <ctype.h>, "gdb_vecs.h".
8481 (debug_threads): Moved to debug.c.
8482 (*): Update all debugging printfs to use debug_printf instead of
8483 fprintf.
8484 (start_inferior): Replace call to fflush with call to debug_flush.
8485 (monitor_show_help): Mention set debug-format.
8486 (parse_debug_format_options): New function.
8487 (handle_monitor_command): Handle "monitor set debug-format".
8488 (gdbserver_usage): Mention --debug-format.
8489 (main): Parse --debug-format.
8490 * server.h (debug_threads): Declaration moved to debug.h.
8491 #include "debug.h".
8492 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8493 trace_debug_1 that uses debug_printf.
8494 (tracepoint_look_up_symbols): Update all debugging printfs to use
8495 debug_printf instead of fprintf.
8496
e671835b
BS
84972014-01-20 Baruch Siach <baruch@tkos.co.il>
8498
8499 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8500 sys/ptrace.h.
8501
b5737fa9
PA
85022014-01-17 Pedro Alves <palves@redhat.com>
8503
ea38d2a9 8504 PR build/16445
c7faa97a
PA
8505 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8506 defined after including gdb_proc_service.h.
b5737fa9 8507
40ed484e
DE
85082014-01-16 Doug Evans <dje@google.com>
8509
8510 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8511 (match_dll): Use it.
8512
969c39fb
MM
85132014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8514
8515 * target.h (target_ops) <read_btrace>: Change parameters and
8516 return type to allow error reporting.
8517 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8518 trace reading errors on.
8519 * linux-low.c (linux_low_read_btrace): Pass trace reading
8520 errors on.
8521 (linux_low_disable_btrace): New.
8522
ab7f45ba
DE
85232014-01-15 Doug Evans <dje@google.com>
8524
8525 * inferiors.c (thread_id_to_gdb_id): Delete.
8526 * inferiors.h (thread_id_to_gdb_id): Delete.
8527
66af0f44
EZ
85282014-01-13 Eli Zaretskii <eliz@gnu.org>
8529
8530 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8531 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8532 versions.
8533
9939e131
PA
85342014-01-08 Pedro Alves <palves@redhat.com>
8535
8536 * server.c (handle_status): Don't discard previous queued stop
8537 replies or thread's pending status here.
8538 (main) <disconnection>: Do it here instead.
8539
b7ea362b
PA
85402014-01-08 Pedro Alves <palves@redhat.com>
8541
8542 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8543 * server.c (visit_actioned_threads, handle_pending_status): New
8544 function.
8545 (handle_v_cont): Factor out parts to ...
8546 (resume): ... this new function. If in all-stop, and a thread
8547 being resumed has a pending status, report it without actually
8548 resuming.
8549 (myresume): Adjust to use the new 'resume' function.
8550 (clear_pending_status_callback, set_pending_status_callback)
8551 (find_status_pending_thread_callback): New functions.
8552 (handle_status): Handle the case of multiple threads having
8553 interesting statuses to report. Report threads' real last signal
8554 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8555 with an interesting thread to report the status for, instead of
8556 always reporting the status of the first thread.
8557
28498c42
JB
85582014-01-01 Joel Brobecker <brobecker@adacore.com>
8559
8560 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8561 * gdbreplay.c (gdbreplay_version): Likewise.
8562
f45c82da
YZ
85632013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8564
8565 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8566 iov.iov_len with the real length in use.
8567
379a5e2d
JB
85682013-12-13 Joel Brobecker <brobecker@adacore.com>
8569
8570 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8571 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8572 for all targets that use win32-low.c.
8573 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8574 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8575
4210d83e
PA
85762013-12-13 Pedro Alves <palves@redhat.com>
8577
8578 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8579 if equal to TARGET_WAITKIND_LOADED.
8580 * win32-low.c (cached_status): New static global.
8581 (win32_wait): Add declaration.
8582 (do_initial_child_stuff): Flush all initial pending debug events
8583 up to the initial breakpoint.
8584 (win32_wait): If CACHED_STATUS was set, return that instead
8585 of doing a real wait. Remove the code resuming the execution
8586 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8587 during the initial phase. Also remove the code changing
8588 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8589 TARGET_WAITKIND_STOPPED.
8590
e7f0d979
YQ
85912013-12-11 Yao Qi <yao@codesourcery.com>
8592
8593 * notif.c (handle_notif_ack): Return 0 if no notification
8594 matches.
8595
ebcf782c
DE
85962013-11-20 Doug Evans <dje@google.com>
8597
8598 * linux-low.c (linux_set_resume_request): Fix comment.
8599
20ad9378
DE
86002013-11-20 Doug Evans <dje@google.com>
8601
8602 * linux-low.c (resume_status_pending_p): Tweak comment.
8603
a196ebeb
WT
86042013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8605
8606 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8607 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8608 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8609 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8610 (srv_amd64_regobj): Add amd64-mpx.o.
8611 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8612 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8613 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8614 * i387-fp.c (num_pl_bnd_register) Added constant.
8615 (num_pl_bnd_cfg_registers) Added constant.
8616 (struct i387_xsave) Added reserved area and MPX fields.
8617 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8618 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8619 function.
8620 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8621 (init_registers_amd64_mpx_linux): Declare new function.
8622 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8623 (x86_64_regmap): Add MPX registers.
8624 (x86_linux_read_description): Add MPX case.
8625 (initialize_low_arch): Initialize MPX targets.
8626
0080a2f6
TT
86272013-11-18 Tom Tromey <tromey@redhat.com>
8628
8629 * configure: Rebuild.
8630 * configure.ac: Don't check for stdlib.h.
8631 * gdbreplay.c: Unconditionally include stdlib.h.
8632
2978b111
TT
86332013-11-18 Tom Tromey <tromey@redhat.com>
8634
8635 * config.in: Rebuild.
8636 * configure: Rebuild.
8637 * configure.ac: Don't use AC_HEADER_DIRENT.
8638
a3d08894
TT
86392013-11-18 Tom Tromey <tromey@redhat.com>
8640
8641 * server.h: Don't check HAVE_STRING_H.
8642 * gdbreplay.c: Don't check HAVE_STRING_H.
8643 * configure: Rebuild.
8644
0a5dd17d
TT
86452013-11-18 Tom Tromey <tromey@redhat.com>
8646
8647 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8648 LIBGNU.
8649
1bd2f0ba
TT
86502013-11-08 Tom Tromey <tromey@redhat.com>
8651
8652 * configure, config.in: Rebuild.
8653 * configure.ac: Remove unused configury.
8654
3266f10b
TT
86552013-11-08 Tom Tromey <tromey@redhat.com>
8656
8657 * acinclude.m4: Include common.m4, codeset.m4.
8658 * configure, config.in: Rebuild.
8659 * configure.ac: Use GDB_AC_COMMON.
8660
6682d959
AA
86612013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8662
8663 * linux-s390-low.c (HWCAP_S390_TE): New define.
8664 (s390_arch_setup): Consider the TE field in the HWCAP for
8665 determining 'have_regset_tdb'.
8666
fd0a4d76
SDJ
86672013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8668
8669 PR gdb/16014
8670 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8671 call to sizeof.
8672
1a3d890b
PA
86732013-10-02 Pedro Alves <palves@redhat.com>
8674
8675 * server.c (process_serial_event): Don't output "GDBserver
8676 exiting" if GDB is connected through stdio.
8677 * target.c (mywait): Likewise, be silent if GDB is connected
8678 through stdio.
8679
97ad4581
JB
86802013-10-01 Joel Brobecker <brobecker@adacore.com>
8681
8682 * lynx-low.c (lynx_add_threads_after_attach): New function.
8683 (lynx_attach): Remove call to add_thread. Add call to
8684 lynx_add_threads_after_attach instead.
8685
5b4e221c
MF
86862013-09-28 Mike Frysinger <vapier@gentoo.org>
8687
8688 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8689 * config.in, configure: Regenerated.
8690
ee47b2f8
YQ
86912013-09-18 Yao Qi <yao@codesourcery.com>
8692
8693 PR server/15959
8694 * server.c (start_inferior): Clear 'resume_info'.
8695
d6707650 86962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8697
d6707650
JW
8698 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8699 for each register.
8700
9243dd0e 87012013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8702
9243dd0e
JW
8703 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8704 linux-tile-low.o to srv_tgtobj.
8705
c623a6ef
WN
87062013-09-16 Will Newton <will.newton@linaro.org>
8707
8708 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8709 out regs.
8710
fb71d39e
PA
87112013-09-06 Pedro Alves <palves@redhat.com>
8712
8713 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8714 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8715 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8716 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8717 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8718 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8719
8e7e9910
PA
87202013-09-06 Pedro Alves <palves@redhat.com>
8721
8722 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8723 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8724
7c3a12ca
PA
87252013-09-06 Pedro Alves <palves@redhat.com>
8726
8727 * linux-amd64-ipa.c: Include tracepoint.h.
8728 * linux-i386-ipa.c: Include tracepoint.h.
8729
8eb3d7b6
RW
87302013-09-06 Ricard Wanderlof <ricardw@axis.com>
8731
8732 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8733 (ps_get_thread_area): New function.
8734
eddddb9d
RW
87352013-09-06 Ricard Wanderlof <ricardw@axis.com>
8736
8737 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8738 (initialize_low_arch): Call init_registers_crisv32 rather than
8739 init_register_crisv32.
8740
533b0600
PA
87412013-09-05 Pedro Alves <palves@redhat.com>
8742
8743 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8744 to ...
8745 * hostio.h: ... this new file.
8746 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8747 win32-low.c: Include hostio.h.
8748
0ce3d3b5
PA
87492013-09-05 Pedro Alves <palves@redhat.com>
8750
8751 * server.h (gdb_client_data, handler_func, callback_handler_func)
8752 (delete_file_handler, add_file_handler, append_callback_event)
8753 (delete_callback_event, start_event_loop, initialize_event_loop):
8754 Move to event-loop.h and include it.
8755 * event-loop.h: New file.
8756
799cdc37
PA
87572013-09-05 Pedro Alves <palves@redhat.com>
8758
8759 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8760 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8761 (loaded_dll, unloaded_dll): Move to ...
8762 * dll.h: ... this new file.
8763 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8764
6a6bbd9d
PA
87652013-09-05 Pedro Alves <palves@redhat.com>
8766
8767 * server.h (current_process, get_thread_process, all_processes)
8768 (add_inferior_to_list, for_each_inferior, current_inferior)
8769 (remove_inferior, add_process, remove_process, find_process_pid)
8770 (have_started_inferiors_p, have_attached_inferiors_p)
8771 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8772 (clear_inferiors, find_inferior, find_inferior_id)
8773 (inferior_target_data, set_inferior_target_data)
8774 (inferior_regcache_data, set_inferior_regcache_data): Move to
8775 inferiors.h, and include it.
8776 * inferiors.h: New file.
8777
f699aaba
PA
87782013-09-05 Pedro Alves <palves@redhat.com>
8779
8780 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8781 Move ...
72f4393d 8782 * ax.h: ... here.
f699aaba 8783
c144c7a0
PA
87842013-09-05 Pedro Alves <palves@redhat.com>
8785
8786 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8787 tracepoint.h.
8788 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8789 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8790 (handle_tracepoint_general_set, handle_tracepoint_query)
8791 (tracepoint_finished_step, tracepoint_was_hit)
8792 (release_while_stepping_state_list, current_traceframe)
8793 (in_readonly_region, traceframe_read_mem)
8794 (fetch_traceframe_registers, traceframe_read_sdata)
8795 (traceframe_read_info, struct fast_tpoint_collect_status)
8796 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8797 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8798 (supply_fast_tracepoint_registers)
8799 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8800 (ipa_tdesc, claim_trampoline_space)
8801 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8802 (agent_mem_read, agent_get_trace_state_variable_value)
8803 (agent_set_trace_state_variable_value, agent_tsv_read)
8804 (agent_mem_read_string, get_raw_reg_func_addr)
8805 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8806 * tracepoint.h: ... this new file.
8807
ff42e6ab
PA
88082013-09-05 Pedro Alves <palves@redhat.com>
8809
8810 * server.h (perror_with_name, error, fatal, warning, paddress)
8811 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8812 include it.
8813 * utils.h: New file.
8814
541af0f4
PA
88152013-09-05 Pedro Alves <palves@redhat.com>
8816
8817 * server.h (remote_debug, noack_mode, transport_is_reliable)
8818 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8819 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8820 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8821 (write_enn, initialize_async_io, enable_async_io)
8822 (disable_async_io, check_remote_input_interrupt_request)
8823 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8824 (dead_thread_notify, prepare_resume_reply)
8825 (decode_address_to_semicolon, decode_address, decode_m_packet)
8826 (decode_M_packet, decode_X_packet, decode_xfer_write)
8827 (decode_search_memory_packet, unhexify, hexify)
8828 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8829 (look_up_one_symbol, relocate_instruction)
8830 (monitor_output): Move to remote-utils.h, and include it.
8831 * remote-utils.h: New file.
8832
eebdf26b
PA
88332013-09-05 Pedro Alves <palves@redhat.com>
8834
8835 * server.h (_): Delete.
8836
3aafd2ff
PA
88372013-09-02 Pedro Alves <palves@redhat.com>
8838
8839 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8840 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8841 allocated.
8842 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8843
cee83bcb
PM
88442013-09-02 Pierre Muller <muller@sourceware.org>
8845
8846 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8847 or WriteProcessMemory complete successfully and handle
8848 ERROR_PARTIAL_COPY error.
8849
9a13b2fa
PA
88502013-09-02 Pedro Alves <palves@redhat.com>
8851
8852 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8853 error instead of EIO.
8854
602e3198
JK
88552013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8856
8857 PR server/15604
8858 * linux-low.c: Include filestuff.h.
8859 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8860 * lynx-low.c: Include filestuff.h.
8861 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8862 * server.c: Include filestuff.h.
8863 (main): Call notice_open_fds.
8864 * spu-low.c: Include filestuff.h.
8865 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8866
96d7229d
LM
88672013-08-22 Luis Machado <lgustavo@codesourcery.com>
8868
8869 * Makefile.in: Explain why ../target and ../nat are not
8870 listed as include file search paths.
8871 (linux-waitpid.o): New object file rule.
8872 * configure.srv (srv_native_linux_obj): New variable.
8873 Replace all occurrences of linux native object files with
8874 $srv_native_linux_obj.
8875 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8876 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8877 (linux_enable_event_reporting): Remove declaration.
8878 (my_waitpid): Moved to common/linux-waitpid.c.
8879 (linux_wait_for_event): Pass ptid when calling
8880 linux_enable_event_reporting.
8881 (linux_supports_tracefork_flag): Remove.
8882 (linux_enable_event_reporting): Likewise.
8883 (linux_tracefork_grandchild): Remove.
8884 (STACK_SIZE): Moved to common/linux-ptrace.c.
8885 (linux_tracefork_child): Remove.
8886 (linux_test_for_tracefork): Remove.
8887 (linux_look_up_symbols): Call linux_supports_traceclone.
8888 (initialize_low): Remove call to linux_test_for_tracefork.
8889 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8890 common/linux-ptrace.h.
8891 (PTRACE_TYPE_ARG4): Likewise.
8892 Include linux-ptrace.h.
8893
32940073
PA
88942013-08-21 Pedro Alves <palves@redhat.com>
8895
8896 * config.in: Renegerate.
8897
33b60d58 88982013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8899
33b60d58
LM
8900 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8901 (SFILES): Remove $(srcdir)/common/target-common.c and
8902 add $(srcdir)/target/waitstatus.c.
8903 (OBS): Remove target-common.o and add waitstatus.o.
8904 (server_h): Remove $(srcdir)/../common/target-common.h and
8905 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8906 and $(srcdir)/../target/waitstatus.h.
8907 (target-common.o): Remove.
8908 (waitstatus.o): New target object file.
8909 * target.h: Do not include target-common.h and
8910 include target/resume.h, target/wait.h and
8911 target/waitstatus.h.
8912
b8e1b30e
LM
89132013-08-13 Luis Machado <lgustavo@codesourcery.com>
8914
8915 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8916 to PTRACE_TYPE_ARG3.
8917 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8918 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8919 PTRACE_TYPE_ARG4.
8920 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8921 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8922
7a60ad40
YQ
89232013-07-27 Jie Zhang <jie@codesourcery.com>
8924 Daniel Jacobowitz <dan@codesourcery.com>
8925 Yao Qi <yao@codesourcery.com>
8926
8927 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8928 (mips-linux-watch.o): New rule.
8929 (mips_linux_watch_h): New variable.
8930 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8931 srv_tgtobj.
8932 * linux-mips-low.c: Include mips-linux-watch.h.
8933 (struct arch_process_info, struct arch_lwp_info): New.
8934 (update_watch_registers_callback): New function.
8935 (mips_linux_new_process, mips_linux_new_thread) New functions.
8936 (mips_linux_prepare_to_resume, mips_insert_point): New
8937 functions.
8938 (mips_remove_point, mips_stopped_by_watchpoint): New
8939 functions.
8940 (rsp_bp_type_to_target_hw_bp_type): New function.
8941 (mips_stopped_data_address): New function.
8942 (the_low_target): Add watchpoint support functions.
8943
de6f69ad
YQ
89442013-07-27 Yao Qi <yao@codesourcery.com>
8945
8946 * i386-low.c: Include break-common.h.
8947 (enum target_hw_bp_type): Remove.
8948
3360c0bf
LM
89492013-07-24 Luis Machado <lgustavo@codesourcery.com>
8950
8951 * Makefile.in (SFILES): /common/target-common.c.
8952 (OBS): Add target-common.o.
8953 (server_h): Add $(srcdir)/../common/target-common.h.
8954 (target-common.o): New target.
8955 * server.c (queue_stop_reply_callback): Free
8956 status string after use.
8957 * target.c (target_waitstatus_to_string): Remove.
8958 * target.h: Include target-common.h.
8959 (resume_kind): Likewise.
8960 (target_waitkind): Likewise.
8961 (target_waitstatus): Likewise.
8962 (TARGET_WNOHANG): Likewise.
8963
bd885420
YQ
89642013-07-04 Yao Qi <yao@codesourcery.com>
8965
8966 * Makefile.in (host_alias): Use @host_noncanonical@.
8967 (target_alias): Use @target_noncanonical@.
8968 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8969 ACX_NONCANONICAL_HOST.
8970 * configure: Regenerated.
8971
8972 Revert:
8973 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8974
8975 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8976 * configure: Rebuild.
8977 * Makefile.in (version_host, version_target): Get from configure.
8978 (version.c): Use $(version_host) and $(version_target).
8979
17ef446e
PA
89802013-07-03 Pedro Alves <palves@redhat.com>
8981
8982 * Makefile.in (config.status): Depend on development.sh.
8983 * acinclude.m4: Include libmcheck.m4.
8984 * configure: Regenerate.
8985
7a9a7487
MG
89862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8987
8988 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8989 attribute inside the parentheses.
8990 (winapi_DebugSetProcessKillOnExit): Ditto.
8991 (winapi_DebugBreakProcess): Ditto.
8992 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8993
49b64de6
MG
89942013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8995
8996 * notif.h (notif_event): Add a dummy member to avoid compiler
8997 errors.
8998
d5749ee7
PA
89992013-07-01 Pedro Alves <palves@redhat.com>
9000
9001 * hostio.c (HOSTIO_PATH_MAX): Define.
9002 (require_filename, handle_open, handle_unlink, handle_readlink):
9003 Use it.
9004
d8d2a3ee
PA
90052013-07-01 Pedro Alves <palves@redhat.com>
9006
9007 * server.h: Include "pathmax.h".
9008 * linux-low.c: Don't include sys/param.h.
9009 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9010 MAXPATHLEN.
9011 * win32-low.c: Don't include sys/param.h.
9012 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9013
bc7dea8d
PA
90142013-07-01 Pedro Alves <palves@redhat.com>
9015
9016 * event-loop.c: Don't check HAVE_UNISTD_H before including
9017 <unistd.h>.
9018 * gdbreplay.c: Likewise.
9019 * remote-utils.c: Likewise.
9020 * server.c: Likewise.
9021 * configure.ac: Don't check for unistd.h.
9022 * configure: Regenerate.
9023
d6c2da54
TT
90242013-06-28 Tom Tromey <tromey@redhat.com>
9025
9026 * Makefile.in (version.c): Use version.in, not
9027 common/version.in.
9028
257b6bec
MG
90292013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9030
9031 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9032 * configure: Rebuild.
9033 * Makefile.in (version_host, version_target): Get from configure.
9034 (version.c): Use $(version_host) and $(version_target).
9035
86ebe149
DK
90362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9037
9038 Fix trace-status to output user name without trailing colon.
9039 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9040
f30aa5af
DK
90412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9042
9043 Fix trace-status to output proper start-time and stop-time.
9044 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9045 output start time and stop time in hex as gdb expects.
9046
28a93511
YQ
90472013-06-26 Pedro Alves <pedro@codesourcery.com>
9048
9049 * tracepoint.c (build_traceframe_info_xml): Output trace state
9050 variables present in the trace buffer.
9051
01208463
TT
90522013-06-24 Tom Tromey <tromey@redhat.com>
9053
9054 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9055 create-version.sh.
9056 (version.o): Remove.
9057 * gdbreplay.c: Include version.h.
9058 (version, host_name): Don't declare.
9059 * server.h: Include version.h.
9060 (version, host_name): Don't declare.
9061
760256f9
PA
90622013-06-12 Pedro Alves <palves@redhat.com>
9063
9064 * linux-x86-low.c (linux_is_elf64): Delete global.
9065 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9066 with local linux_pid_exe_is_elf_64_file use.
9067
030031ee
PA
90682013-06-11 Pedro Alves <palves@redhat.com>
9069
9070 * linux-low.c (regset_disabled, disable_regset): New functions.
9071 (regsets_fetch_inferior_registers)
9072 (regsets_store_inferior_registers): Use them.
9073 (initialize_regsets_info); Don't allocate the disabled_regsets
9074 array here.
9075 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9076 comment.
9077
5da6eb0a
PA
90782013-06-11 Pedro Alves <palves@redhat.com>
9079
9080 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9081 xmalloc.
9082
7e5aaa09
PA
90832013-06-11 Pedro Alves <palves@redhat.com>
9084
9085 * linux-x86-low.c (initialize_low_arch): Call
9086 init_registers_x32_avx_linux.
9087
d878444c
JK
90882013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9089
9090 Fix compatibility with Android Bionic.
9091 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9092 it is not empty.
9093
3aee8918
PA
90942013-06-07 Pedro Alves <palves@redhat.com>
9095
5f2b57b5 9096 PR server/14823
3aee8918
PA
9097 * Makefile.in (OBS): Add tdesc.o.
9098 (IPA_OBJS): Add tdesc-ipa.o.
9099 (tdesc-ipa.o): New rule.
9100 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9101 interface.
9102 * linux-low.c (new_inferior): Delete.
9103 (disabled_regsets, num_regsets): Delete.
9104 (linux_add_process): Adjust to set the new per-process
9105 new_inferior flag.
9106 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9107 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9108 was a stop. When calling arch_setup, switch the current inferior
9109 to the thread that got an event.
9110 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9111 (regsets_fetch_inferior_registers)
9112 (regsets_store_inferior_registers): New regsets_info parameter.
9113 Adjust to use it.
9114 (linux_register_in_regsets): New regs_info parameter. Adjust to
9115 use it.
9116 (register_addr, fetch_register, store_register): New usrregs_info
9117 parameter. Adjust to use it.
9118 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9119 parameter regs_info. Adjust to use it.
9120 (linux_fetch_registers): Get the current inferior's regs_info, and
9121 adjust to use it.
9122 (linux_store_registers): Ditto.
9123 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9124 (initialize_low): Don't initialize the target_regsets here. Call
9125 initialize_low_arch.
9126 * linux-low.h (target_regsets): Delete declaration.
9127 (struct regsets_info): New.
9128 (struct usrregs_info): New.
9129 (struct regs_info): New.
9130 (struct process_info_private) <new_inferior>: New field.
9131 (struct linux_target_ops): Delete the num_regs, regmap, and
9132 regset_bitmap fields. New field regs_info.
9133 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9134 * i387-fp.c (num_xmm_registers): Delete.
9135 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9136 calls to new interface.
9137 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9138 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9139 Infer the number of xmm registers from the regcache's target
9140 description.
9141 * i387-fp.h (num_xmm_registers): Delete.
9142 * inferiors.c (add_thread): Don't install the thread's regcache
9143 here.
9144 * proc-service.c (gregset_info): Fetch the current inferior's
9145 regs_info. Adjust to use it.
9146 * regcache.c: Include tdesc.h.
9147 (register_bytes, reg_defs, num_registers)
9148 (gdbserver_expedite_regs): Delete.
9149 (get_thread_regcache): If the thread doesn't have a regcache yet,
9150 create one, instead of aborting gdbserver.
9151 (regcache_invalidate_one): Rename to ...
9152 (regcache_invalidate_thread): ... this.
9153 (regcache_invalidate_one): New.
9154 (regcache_invalidate): Only invalidate registers of the current
9155 process.
9156 (init_register_cache): Add target_desc parameter, and use it.
9157 (new_register_cache): Ditto. Assert the target description has a
9158 non zero registers_size.
9159 (regcache_cpy): Add assertions. Adjust.
9160 (realloc_register_cache, set_register_cache): Delete.
9161 (registers_to_string, registers_from_string): Adjust.
9162 (find_register_by_name, find_regno, find_register_by_number)
9163 (register_cache_size): Add target_desc parameter, and use it.
9164 (free_register_cache_thread, free_register_cache_thread_one)
9165 (regcache_release, register_cache_size): New.
9166 (register_size): Add target_desc parameter, and use it.
9167 (register_data, supply_register, supply_register_zeroed)
9168 (supply_regblock, supply_register_by_name, collect_register)
9169 (collect_register_as_string, collect_register_by_name): Adjust.
9170 * regcache.h (struct target_desc): Forward declare.
9171 (struct regcache) <tdesc>: New field.
9172 (init_register_cache, new_register_cache): Add target_desc
9173 parameter.
9174 (regcache_invalidate_thread): Declare.
9175 (regcache_invalidate_one): Delete declaration.
9176 (regcache_release): Declare.
9177 (find_register_by_number, register_cache_size, register_size)
9178 (find_regno): Add target_desc parameter.
9179 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9180 declarations.
9181 * remote-utils.c: Include tdesc.h.
9182 (outreg, prepare_resume_reply): Adjust.
9183 * server.c: Include tdesc.h.
9184 (gdbserver_xmltarget): Delete declaration.
9185 (get_features_xml, process_serial_event): Adjust.
9186 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9187 declare.
9188 (struct process_info) <tdesc>: New field.
9189 (ipa_tdesc): Declare.
9190 * tdesc.c: New file.
9191 * tdesc.h: New file.
9192 * tracepoint.c: Include tdesc.h.
9193 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9194 (get_context_regcache): Adjust to pass ipa_tdesc down.
9195 (do_action_at_tracepoint): Adjust to get the register cache size
9196 from the context regcache's description.
9197 (traceframe_walk_blocks): Adjust to get the register cache size
9198 from the current trace frame's description.
9199 (traceframe_get_pc): Adjust to get current trace frame's
9200 description and pass it down.
9201 (gdb_collect): Adjust to get the register cache size from the
9202 IPA's description.
9203 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9204 (gdbserver_xmltarget): Delete.
9205 (initialize_low_tracepoint): Set the ipa's target description.
9206 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9207 (initialize_low_tracepoint): Set the ipa's target description.
9208 * linux-x86-low.c: Include tdesc.h.
9209 [__x86_64__] (is_64bit_tdesc): New.
9210 (ps_get_thread_area, x86_get_thread_area): Use it.
9211 (i386_cannot_store_register): Rename to ...
9212 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9213 (i386_cannot_fetch_register): Rename to ...
9214 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9215 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9216 to new interface.
9217 (target_regsets): Rename to ...
9218 (x86_regsets): ... this.
9219 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9220 interface.
9221 (x86_siginfo_fixup): Use is_64bit_tdesc.
9222 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9223 (tdesc_x32_avx_linux, tdesc_x32_linux)
9224 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9225 Declare.
9226 (x86_linux_update_xmltarget): Delete.
9227 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9228 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9229 (AMD64_LINUX_USER64_CS): New.
9230 (x86_linux_read_description): New, based on
9231 x86_linux_update_xmltarget.
9232 (same_process_callback): New.
9233 (x86_arch_setup_process_callback): New.
9234 (x86_linux_update_xmltarget): New.
9235 (x86_regsets_info): New.
9236 (amd64_linux_regs_info): New.
9237 (i386_linux_usrregs_info): New.
9238 (i386_linux_regs_info): New.
9239 (x86_linux_regs_info): New.
9240 (x86_arch_setup): Reimplement.
9241 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9242 (x86_emit_ops): Ditto.
9243 (the_low_target): Adjust. Install x86_linux_regs_info,
9244 x86_cannot_fetch_register, and x86_cannot_store_register.
9245 (initialize_low_arch): New.
9246 * linux-ia64-low.c (tdesc_ia64): Declare.
9247 (ia64_fetch_register): Adjust.
9248 (ia64_usrregs_info, regs_info): New globals.
9249 (ia64_regs_info): New function.
9250 (the_low_target): Adjust.
9251 (initialize_low_arch): New function.
9252 * linux-sparc-low.c (tdesc_sparc64): Declare.
9253 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9254 Adjust.
9255 (sparc_arch_setup): New function.
9256 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9257 (the_low_target): Adjust.
9258 (initialize_low_arch): New function.
9259 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9260 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9261 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9262 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9263 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9264 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9265 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9266 (tdesc_powerpc_isa205_vsx64l): Declare.
9267 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9268 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9269 (ppc_set_pc, ppc_get_hwcap): Adjust.
9270 (ppc_usrregs_info): Forward declare.
9271 (!__powerpc64__) ppc_regmap_adjusted: New global.
9272 (ppc_arch_setup): Adjust to the current process'es target
9273 description.
9274 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9275 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9276 (ppc_store_evrregset): Adjust.
9277 (target_regsets): Rename to ...
9278 (ppc_regsets): ... this, and make static.
9279 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9280 (ppc_regs_info): New function.
9281 (the_low_target): Adjust.
9282 (initialize_low_arch): New function.
9283 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9284 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9285 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9286 (tdesc_s390x_linux64v2): Declare.
9287 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9288 (s390_fill_gregset, s390_store_last_break): Adjust.
9289 (target_regsets): Rename to ...
9290 (s390_regsets): ... this, and make static.
9291 (s390_get_pc, s390_set_pc): Adjust.
9292 (s390_get_hwcap): New target_desc parameter, and use it.
9293 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9294 (s390_arch_setup): Adjust to set the current process'es target
9295 description. Don't adjust the regmap.
9296 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9297 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9298 (regs_info_3264): New globals.
9299 (s390_regs_info): New function.
9300 (the_low_target): Adjust.
9301 (initialize_low_arch): New function.
9302 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9303 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9304 [__mips64] (init_registers_mips_linux)
9305 (init_registers_mips_dsp_linux): Delete defines.
9306 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9307 (have_dsp): New global.
9308 (mips_read_description): New, based on mips_arch_setup.
9309 (mips_arch_setup): Reimplement.
9310 (get_usrregs_info): New function.
9311 (mips_cannot_fetch_register, mips_cannot_store_register)
9312 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9313 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9314 (target_regsets): Rename to ...
9315 (mips_regsets): ... this, and make static.
9316 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9317 (dsp_regs_info, regs_info): New globals.
9318 (mips_regs_info): New function.
9319 (the_low_target): Adjust.
9320 (initialize_low_arch): New function.
9321 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9322 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9323 Declare.
9324 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9325 (arm_read_description): New, with bits factored from
9326 arm_arch_setup.
9327 (arm_arch_setup): Reimplement.
9328 (target_regsets): Rename to ...
9329 (arm_regsets): ... this, and make static.
9330 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9331 (arm_regs_info): New function.
9332 (the_low_target): Adjust.
9333 (initialize_low_arch): New function.
9334 * linux-m68k-low.c (tdesc_m68k): Declare.
9335 (target_regsets): Rename to ...
9336 (m68k_regsets): ... this, and make static.
9337 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9338 (m68k_regs_info): New function.
9339 (m68k_arch_setup): New function.
9340 (the_low_target): Adjust.
9341 (initialize_low_arch): New function.
9342 * linux-sh-low.c (tdesc_sharch): Declare.
9343 (target_regsets): Rename to ...
9344 (sh_regsets): ... this, and make static.
9345 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9346 (sh_regs_info, sh_arch_setup): New functions.
9347 (the_low_target): Adjust.
9348 (initialize_low_arch): New function.
9349 * linux-bfin-low.c (tdesc_bfin): Declare.
9350 (bfin_arch_setup): New function.
9351 (bfin_usrregs_info, regs_info): New globals.
9352 (bfin_regs_info): New function.
9353 (the_low_target): Adjust.
9354 (initialize_low_arch): New function.
9355 * linux-cris-low.c (tdesc_cris): Declare.
9356 (cris_arch_setup): New function.
9357 (cris_usrregs_info, regs_info): New globals.
9358 (cris_regs_info): New function.
9359 (the_low_target): Adjust.
9360 (initialize_low_arch): New function.
9361 * linux-cris-low.c (tdesc_crisv32): Declare.
9362 (cris_arch_setup): New function.
9363 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9364 (cris_regs_info): New function.
9365 (the_low_target): Adjust.
9366 (initialize_low_arch): New function.
9367 * linux-m32r-low.c (tdesc_m32r): Declare.
9368 (m32r_arch_setup): New function.
9369 (m32r_usrregs_info, regs_info): New globals.
9370 (m32r_regs_info): Adjust.
9371 (initialize_low_arch): New function.
9372 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9373 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9374 (tic6x_usrregs_info): Forward declare.
9375 (tic6x_read_description): New function, based on ...
9376 (tic6x_arch_setup): ... this. Reimplement.
9377 (target_regsets): Rename to ...
9378 (tic6x_regsets): ... this, and make static.
9379 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9380 (tic6x_regs_info): New function.
9381 (the_low_target): Adjust.
9382 (initialize_low_arch): New function.
9383 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9384 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9385 (target_regsets): Rename to ...
9386 (xtensa_regsets): ... this, and make static.
9387 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9388 globals.
9389 (xtensa_arch_setup, xtensa_regs_info): New functions.
9390 (the_low_target): Adjust.
9391 (initialize_low_arch): New function.
9392 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9393 (nios2_arch_setup): Set the current process'es tdesc.
9394 (target_regsets): Rename to ...
9395 (nios2_regsets): ... this.
9396 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9397 (nios2_regs_info): New function.
9398 (the_low_target): Adjust.
9399 (initialize_low_arch): New function.
a261b8f5
PA
9400 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9401 (aarch64_arch_setup): Set the current process'es tdesc.
9402 (target_regsets): Rename to ...
9403 (aarch64_regsets): ... this.
9404 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9405 (aarch64_regs_info): New function.
9406 (the_low_target): Adjust.
9407 (initialize_low_arch): New function.
3aee8918
PA
9408 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9409 globals.
9410 (target_regsets): Rename to ...
9411 (tile_regsets): ... this.
9412 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9413 (tile_regs_info): New function.
9414 (tile_arch_setup): Set the current process'es tdesc.
9415 (the_low_target): Adjust.
9416 (initialize_low_arch): New function.
9417 * spu-low.c (tdesc_spu): Declare.
9418 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9419 * win32-arm-low.c (tdesc_arm): Declare.
9420 (arm_arch_setup): New function.
9421 (the_low_target): Install arm_arch_setup instead of
9422 init_registers_arm.
9423 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9424 (init_windows_x86): Rename to ...
9425 (i386_arch_setup): ... this. Set `win32_tdesc'.
9426 (the_low_target): Adjust.
9427 * win32-low.c (win32_tdesc): New global.
9428 (child_add_thread): Don't create the thread cache here.
9429 (do_initial_child_stuff): Set the new process'es tdesc.
9430 * win32-low.h (struct target_desc): Forward declare.
9431 (win32_tdesc): Declare.
9432 * lynx-i386-low.c (tdesc_i386): Declare global.
9433 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9434 * lynx-low.c (lynx_tdesc): New global.
9435 (lynx_add_process): Set the new process'es tdesc.
9436 * lynx-low.h (struct target_desc): Forward declare.
9437 (lynx_tdesc): Declare global.
9438 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9439 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9440 * nto-low.c (nto_tdesc): New global.
9441 (do_attach): Set the new process'es tdesc.
9442 * nto-low.h (struct target_desc): Forward declare.
9443 (nto_tdesc): Declare.
9444 * nto-x86-low.c (tdesc_i386): Declare.
9445 (nto_x86_arch_setup): Set `nto_tdesc'.
9446
b1fbec62
GB
94472013-06-04 Gary Benson <gbenson@redhat.com>
9448
9449 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9450 to qSupported response when appropriate.
9451 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9452 with nonzero-length annex.
9453 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9454 arguments supplied in annex.
9455
d1ec4ce7
DE
94562013-05-31 Doug Evans <dje@google.com>
9457
ac44adcb 9458 PR server/15594
d1ec4ce7
DE
9459 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9460 64 bits in 64-cross-32 environment.
9461
9b25f2d3
PA
94622013-05-28 Pedro Alves <palves@redhat.com>
9463
9464 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9465 (aarch64-without-fpu.c): Delete rule.
9466 * configure.srv (aarch64*-*-linux*): Remove references to
9467 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9468 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9469 declaration.
9470
6740dc9c
PA
94712013-05-24 Pedro Alves <palves@redhat.com>
9472
9473 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9474 instead of strchr/decode_address. Error if the range isn't split
9475 with a ','. Don't assume there's be a ':' in the action.
9476
c2d6af84
PA
94772013-05-23 Yao Qi <yao@codesourcery.com>
9478 Pedro Alves <palves@redhat.com>
9479
9480 * linux-low.c (lwp_in_step_range): New function.
9481 (linux_wait_1): If the thread was range stepping and stopped
9482 outside the stepping range, report the stop to GDB. Otherwise,
9483 continue stepping. Add range stepping debug output.
9484 (linux_set_resume_request): Copy the step range from the resume
9485 request to the lwp.
9486 (linux_supports_range_stepping): New.
9487 (linux_target_ops) <supports_range_stepping>: Set to
9488 linux_supports_range_stepping.
9489 * linux-low.h (struct linux_target_ops)
9490 <supports_range_stepping>: New field.
9491 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9492 * linux-x86-low.c (x86_supports_range_stepping): New.
9493 (the_low_target) <supports_range_stepping>: Set to
9494 x86_supports_range_stepping.
9495 * server.c (handle_v_cont): Handle 'r' action.
9496 (handle_v_requests): Append ";r" if the target supports range
9497 stepping.
9498 * target.h (struct thread_resume) <step_range_start,
9499 step_range_end>: New fields.
9500 (struct target_ops) <supports_range_stepping>:
9501 New field.
9502 (target_supports_range_stepping): New macro.
9503
58794e1a
JB
95042013-05-17 Joel Brobecker <brobecker@adacore.com>
9505
9506 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9507 confusion in comment.
9508
d631c5a7
JB
95092013-05-17 Joel Brobecker <brobecker@adacore.com>
9510
9511 * lynx-low.c (struct process_info_private): New type.
9512 (lynx_add_process): New function.
9513 (lynx_create_inferior, lynx_attach): Replace calls to
9514 add_process by calls to lynx_add_process.
9515 (lynx_resume): If PTID is null, then try using
9516 current_process()->private->last_wait_event_ptid.
9517 Add comments.
9518 (lynx_clear_inferiors): Delete. The contents of that function
9519 has been inlined in lynx_mourn;
9520 (lynx_wait_1): Save the ptid in the process's private data.
9521 (lynx_mourn): Free the process' private data. Replace call
9522 to lynx_clear_inferiors by call to clear_inferiors.
9523
96f7a20f
YQ
95242013-05-17 Yao Qi <yao@codesourcery.com>
9525
9526 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9527 the right place.
9528
db0dfaa0
LM
95292013-05-16 Luis Machado <lgustavo@codesourcery.com>
9530
9531 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9532 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9533 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9534 PT_TEXT_END_ADDR guards. Update comments.
9535 (linux_target_op) <read_offsets>: Conditionally define to
9536 linux_read_offsets if the target is UCLIBC and if it defines
9537 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9538
68f5f838
SL
95392013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9540 Andrew Jenner <andrew@codesourcery.com>
9541
9542 * Makefile.in (SFILES): Add linux-nios2-low.c.
9543 (clean): Add action to delete nios2-linux.c.
9544 (nios2-linux.c): New rule.
9545 * configure.srv: Add nios2*-*-linux*.
9546 * linux-nios2-low.c: New.
9547
1ebff1fd
HAQ
95482013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9549
9550 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9551
f6150862
HZ
95522013-04-25 Hui Zhu <hui@codesourcery.com>
9553
9554 PR gdb/15186
f6150862
HZ
9555 * ax.c (ax_printf): Add fflush.
9556
614c279d
TT
95572013-04-22 Tom Tromey <tromey@redhat.com>
9558
9559 * Makefile.in (SFILES): Add filestuff.c.
9560 (OBS): Add filestuff.o.
9561 (filestuff.o): New target.
9562 * config.in, configure: Rebuild.
9563 * configure.ac: Check for fdwalk, pipe2.
9564
7d4e5717
PA
95652013-04-17 Pedro Alves <palves@redhat.com>
9566
9567 * configure.ac (USE_THREAD_DB): Delete variable.
9568 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9569 Don't AC_SUBST USE_THREAD_DB.
9570 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9571 * config.in, configure: Regenerate.
9572
d5c93e41
PA
95732013-04-16 Pedro Alves <palves@redhat.com>
9574
9575 * linux-low.h (struct lwp_info) <thread_known>: Move under
9576 the USE_THREAD_DB #ifdef.
9577
04f5fe89
PA
95782013-04-16 Pedro Alves <palves@redhat.com>
9579
9580 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9581 (linux-low.o): Delete rule.
9582 * linux-low.h: Always include "gdb_thread_db.h" instead of
9583 conditionally including thread_db.h.
9584 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9585 HAVE_THREAD_DB_H.
9586
480b27bf
JK
95872013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9588
9589 * Makefile.in (install-only): Fix make install regression.
9590
43662968
JK
95912013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9592
9593 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9594 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9595 installation.
9596 * gdbserver.1: Remove.
9597
3e74e146
PA
95982013-03-22 Pedro Alves <palves@redhat.com>
9599
9600 * linux-low.c (handle_extended_wait): Don't call
9601 linux_enable_event_reporting.
9602
a8347a2a
TT
96032013-03-15 Tony Theodore <tonyt@logyst.com>
9604
9605 PR build/9098:
9606 * Makefile.in (SHELL): Use @SHELL@.
9607
eeb56fa7
SDJ
96082013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9609
9610 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9611 compiler warning.
9612
4fa7e2ff
JB
96132013-03-13 Joel Brobecker <brobecker@adacore.com>
9614
9615 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9616 Remove extraneous NULL element.
9617
8ddb1965
YQ
96182013-03-13 Yao Qi <yao@codesourcery.com>
9619
9620 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9621 'V' block in trace frame.
9622
9accd112
MM
96232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9624
9625 * target.h (struct target_ops): Add btrace ops.
9626 (target_supports_btrace): New macro.
9627 (target_enable_btrace): New macro.
9628 (target_disable_btrace): New macro.
9629 (target_read_btrace): New macro.
9630 * gdbthread.h (struct thread_info): Add btrace field.
9631 * server.c: Include btrace-common.h.
9632 (handle_btrace_general_set): New function.
9633 (handle_btrace_enable): New function.
9634 (handle_btrace_disable): New function.
9635 (handle_general_set): Call handle_btrace_general_set.
9636 (handle_qxfer_btrace): New function.
9637 (struct qxfer qxfer_packets[]): Add btrace entry.
9638 * inferiors.c (remove_thread): Disable btrace.
9639 * linux-low: Include linux-btrace.h.
9640 (linux_low_enable_btrace): New function.
9641 (linux_low_read_btrace): New function.
9642 (linux_target_ops): Add btrace ops.
9643 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9644 Add srv_linux_btrace=yes.
9645 (x86_64-*-linux*): Add linux-btrace.o.
9646 Add srv_linux_btrace=yes.
9647 * configure.ac: Define HAVE_LINUX_BTRACE.
9648 * config.in: Regenerated.
9649 * configure: Regenerated.
9650
5cc22e4c
MM
96512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9652
9653 * server.c (handle_qxfer): Preserve error message if -3 is
9654 returned.
9655 (qxfer): Document the -3 return value.
9656
7c97f91e
MM
96572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9658
9659 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9660 (linux_btrace_h): New variable.
9661 (linux-btrace.o): New rule.
9662
be9a119c 96632013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9664 Hafiz Abid Qadeer <abidh@codesourcery.com>
9665
9666 * tracepoint.c (trace_buffer_size): New global.
9667 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9668 (init_trace_buffer): Change to one-argument function. Allocate
9669 trace buffer memory.
9670 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9671 handle QTBuffer:size packet.
9672 (cmd_bigqtbuffer_size): New function.
9673 (initialize_tracepoint): Call init_trace_buffer with
9674 DEFAULT_TRACE_BUFFER_SIZE.
9675 * server.c (handle_query): Add QTBuffer:size in the
9676 supported packets.
9677
e64f7499
YQ
96782013-03-07 Yao Qi <yao@codesourcery.com>
9679
9680 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9681 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9682 of -1.
9683 (cmd_qtsp): Adjust condition. Do post increment.
9684 Set cur_action and cur_step_action back to 0.
9685
f0ae6fc3
PA
96862013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9687
9688 PR server/15236
9689 * linux-low.c (linux_write_memory): Return early success if LEN is
9690 zero.
9691
b5b0b0af
CV
96922013-03-05 Corinna Vinschen <vinschen@redhat.de>
9693
334ad4a8 9694 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9695
589bc927
TT
96962013-02-28 Tom Tromey <tromey@redhat.com>
9697
9698 * configure.ac: Invoke AC_SYS_LARGEFILE.
9699 * configure, config.in: Rebuild.
9700
dfe07582
CV
97012013-02-28 Corinna Vinschen <vinschen@redhat.com>
9702
9703 * win32-low.c: Throughout, fix format strings and casts of
9704 printf-like functions to avoid type related warnings on all
9705 platforms.
9706 (get_child_debug_event): Print dwDebugEventCode as hex since
9707 that's how it's usually documented.
9708
736cd585
YQ
97092013-02-28 Yao Qi <yao@codesourcery.com>
9710
9711 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9712 pulongest.
9713
e1f58301
JW
97142013-02-27 Jiong Wang <jiwang@tilera.com>
9715
9716 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9717 (reg-tilegx32.c): New rule.
9718 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9719 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9720 different register info initializer according to elf class.
9721 (init_registers_tilgx32): New function. The tilegx32 register info
9722 initializer.
9723 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9724 (tile_store_gregset): Likewise.
9725
d171ca78
YQ
97262013-02-27 Yao Qi <yao@codesourcery.com>
9727
9728 * server.c (process_point_options): Print debug message when
9729 debug_threads is true.
9730
282bbdf3
YQ
97312013-02-26 Yao Qi <yao@codesourcery.com>
9732
9733 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9734
aca22551
PA
97352013-02-19 Pedro Alves <palves@redhat.com>
9736 Kai Tietz <ktietz@redhat.com>
9737
9738 PR gdb/15161
9739
9740 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9741 instead of strtoul to extract address from packet.
9742 (process_serial_event) <'z'>: Likewise.
9743
4f3cee1c
YQ
97442013-02-18 Yao Qi <yao@codesourcery.com>
9745
9746 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9747
8e1d55a3
PA
97482013-02-14 Pedro Alves <palves@redhat.com>
9749
9750 Plug memory leak.
9751
9752 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9753 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9754
458820da
PA
97552013-02-14 Pedro Alves <palves@redhat.com>
9756
9757 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9758
baea0dae
PA
97592013-02-14 Pedro Alves <palves@redhat.com>
9760
9761 * tracepoint.c (save_string): Delete.
9762 (add_tracepoint_action): Use savestring instead of save_string.
9763
0b1afbb3
PA
97642013-02-12 Pedro Alves <palves@redhat.com>
9765
9766 * linux-xtensa-low.c: Ditto.
9767 * xtensa-xtregs.c: Ditto.
9768
8a4ac37e
PA
97692013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9770
9771 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9772 thread_db.
9773
148de6bb
MS
97742013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9775
9776 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9777 aarch64_num_wp_regs and aarch64_num_bp_regs to
9778 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9779
55fac6e0
MS
97802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9781
9782 * linux-aarch64-low.c (ps_get_thread_area): Replace
9783 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9784
176eb98c
MS
97852013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9786 Marcus Shawcroft <marcus.shawcroft@arm.com>
9787 Nigel Stephens <nigel.stephens@arm.com>
9788 Yufeng Zhang <yufeng.zhang@arm.com>
9789
9790 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9791 (aarch64.c, aarch64-without-fpu.c): New targets.
9792 * configure.srv (aarch64*-*-linux*): New.
9793 * linux-aarch64-low.c: New file.
9794
56f7af9c
MS
97952013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9796
43aaf8b6 9797 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9798 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9799 (dequeue_one_deferred_signal, linux_resume_one_thread)
9800 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9801 (linux_tracefork_grandchild, linux_test_for_tracefork)
9802 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9803 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9804 where the argument is 0.
9805
60f662b0
YQ
98062013-01-25 Yao Qi <yao@codesourcery.com>
9807
9808 * event-loop.c: Include "queue.h".
9809 (gdb_event_p): New typedef.
9810 (struct gdb_event) <next_event>: Remove.
9811 (event_queue): Change to QUEUE(gdb_event_p).
9812 (async_queue_event): Remove.
9813 (gdb_event_xfree): New.
9814 (initialize_event_loop): New.
9815 (process_event): Use API from QUEUE.
9816 (wait_for_event): Likewise.
9817 * server.c (main): Call initialize_event_loop.
9818 * server.h (initialize_event_loop): Declare.
9819
5ae4861a
YQ
98202013-01-18 Yao Qi <yao@codesourcery.com>
9821
9822 * ax.h (struct eval_agent_expr_context): New.
9823 (gdb_eval_agent_expr): Update declaration.
9824 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9825 TFRAME. Add new argument CTX.
9826 * server.h (struct eval_agent_expr_context): Declare.
9827 (agent_mem_read, agent_tsv_read): Update declaration.
9828 (agent_mem_read_string): Likewise.
9829 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9830 (add_traceframe_block): Add new argument TPOINT.
9831 Increase TPOINT->traceframe_usage.
9832 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9833 eval_tracepoint_agent_expr.
9834 (condition_true_at_tracepoint): Likewise.
9835 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9836 (agent_mem_read_string, agent_tsv_read): Likewise.
9837
85e00e85
YQ
98382013-01-16 Yao Qi <yao@codesourcery.com>
9839
9840 * linux-low.c (linux_resume_one_lwp): Don't check
9841 'lwp->bp_reinsert != 0'.
9842
4039cf45
JB
98432013-01-07 Joel Brobecker <brobecker@adacore.com>
9844 Pedro Alves <palves@redhat.com>
9845
9846 * lynx-low.c (ptrace_request_to_str): Define a temporary
9847 macro and use it to simplify this function's implementation.
9848
9044dee2
JB
98492013-01-07 Joel Brobecker <brobecker@adacore.com>
9850
9851 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9852 sets errno.
9853
e6352c8f
JB
98542013-01-07 Joel Brobecker <brobecker@adacore.com>
9855
9856 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9857
50681a27
JB
98582013-01-07 Joel Brobecker <brobecker@adacore.com>
9859
9860 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9861
3f6e77ef
JB
98622013-01-07 Joel Brobecker <brobecker@adacore.com>
9863
9864 * lynx-low.c (lynx_resume): Use the resume_info parameter
9865 to determine the ptid for the lynx_ptrace call, unless
9866 it is equal to minus_one_ptid, in which case we use the
9867 ptid of the current_inferior.
9868 (lynx_wait_1): After having received a thread create/exit
9869 event, resume the inferior's execution using the signaling
9870 thread's ptid, rather than the old ptid.
9871
7fda33ae
JB
98722013-01-07 Joel Brobecker <brobecker@adacore.com>
9873
9874 * lynx-low.c (lynx_resume): Delete variable ret.
9875
b9786c74
JB
98762013-01-01 Joel Brobecker <brobecker@adacore.com>
9877
9878 * gdbreplay.c (gdbreplay_version): Update copyright year.
9879 * server.c (gdbserver_version): Likewise.
9880
8b93d60f
JB
98812012-12-17 Joel Brobecker <brobecker@adacore.com>
9882
9883 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9884 new thread.
9885
037335a7
JB
98862012-12-17 Joel Brobecker <brobecker@adacore.com>
9887
9888 * lynx-low.c (ptrace_request_to_str): Add handling for
9889 PTRACE_GETTRACESIG.
9890
52d4cbd8
JB
98912012-12-17 Joel Brobecker <brobecker@adacore.com>
9892
9893 * lynx-low.c (lynx_attach): Delete variable new_process.
9894
ab8f6ca9
JB
98952012-12-17 Joel Brobecker <brobecker@adacore.com>
9896
9897 * lynx-low.c (lynx_create_inferior): Delete variable
9898 new_process.
9899
78cbc024
JB
99002012-12-17 Joel Brobecker <brobecker@adacore.com>
9901
9902 * lynx-low.c (ptrace_request_to_str): Do not handle
9903 PTRACE_GETTHREADLIST if this macro does not exist.
9904
14a00470
YQ
99052012-12-15 Yao Qi <yao@codesourcery.com>
9906
9907 * Makefile.in (OBS): Add notif.o.
9908 * notif.c, notif.h: New.
9909 * server.c: Include "notif.h".
9910 (struct vstop_notif) <next>: Remove.
9911 <base>: New field.
9912 (queue_stop_reply): Update.
9913 (push_event, send_next_stop_reply): Remove.
9914 (discard_queued_stop_replies): Update.
9915 (notif_stop): New variable.
9916 (handle_v_stopped): Remove.
9917 (handle_v_requests): Don't call handle_v_stopped. Call
9918 handle_ack_notif instead.
9919 (queue_stop_reply_callback): Call notif_event_enque instead
9920 of queue_stop_reply.
9921 (handle_status): Don't call send_next_stop_reply, call
9922 notif_write_event instead.
9923 (kill_inferior_callback): Likewise.
9924 (detach_or_kill_inferior_callback): Likewise.
9925 (main): Call initialize_notif.
9926 (process_serial_event): Call QUEUE_is_empty.
9927 (handle_target_event): Call notif_push instead of push event.
9928 * server.h (push_event): Remove declaration.
9929
61c125b9
TT
99302012-12-10 Tom Tromey <tromey@redhat.com>
9931
9932 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9933 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9934 macros.
9935 (.c.o): Rewrite.
9936 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9937 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9938 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9939 (amd64-linux-ipa.o, ax.o): Rewrite.
9940 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9941 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9942 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9943 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9944 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9945 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9946 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9947 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9948 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9949 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9950 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9951 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9952 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9953 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9954 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9955 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9956 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9957 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9958 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9959 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9960 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9961 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9962 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9963 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9964 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9965 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9966 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9967 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9968 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9969 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9970 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9971 (reg-tilegx.o): Remove.
9972 (all_object_files): New macro.
9973 Include .deps files.
9974 * aclocal.m4, configure: Rebuild.
9975 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9976 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9977 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9978
e90e9ad9
TT
99792012-12-05 Tom Tromey <tromey@redhat.com>
9980
9981 PR gdb/14917:
9982 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9983
02d403bf 99842012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9985
9986 * configure.ac: Check for linux/perf_event.h.
9987 * config.in: Regenerated.
9988 * configure: Regenerated.
9989
0270a750
PA
99902012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9991
9992 * hostio.c (handle_readlink): Decrease buffer size
9993 parameter passed to readlink by one byte.
9994
8c29b58e
YQ
99952012-11-26 Yao Qi <yao@codesourcery.com>
9996
9997 * configure.ac (build_warnings): Append '-Wempty-body'.
9998 * configure: Regenerated.
9999 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10000 body.
10001
8bdce1ff
PM
100022012-11-15 Pierre Muller <muller@sourceware.org>
10003
10004 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10005 * config.in: Regenerate.
10006 * configure: Regenerate.
10007 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10008 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10009 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10010 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10011 header.
10012 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10013 instead of <sys/wait.h> header.
10014 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10015
02d403bf 100162012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10017
10018 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10019 (various make rules): Remove -DGDBSERVER
10020
fbd5db48
YQ
100212012-11-09 Yao Qi <yao@codesourcery.com>
10022
10023 * spu-low.c (current_ptid): Move it to ..
10024 * gdbthread.h: ... here. New.
10025 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10026 * server.c (myresume, process_serial_event): Likewise.
10027 * thread-db.c (thread_db_find_new_threads): Likewise.
10028 * tracepoint.c (run_inferior_command): Likewise.
10029
b3dc46ff
AB
100302012-10-01 Andrew Burgess <aburgess@broadcom.com>
10031
10032 * server.c (handle_search_memory_1): Include access length in
10033 warning message.
10034
07c04788
HPN
100352012-09-05 Michael Brandt <michael.brandt@axis.com>
10036
10037 * linux-crisv32-low.c: Fix compile errors.
10038
918d227b
YQ
100392012-09-04 Yao Qi <yao@codesourcery.com>
10040
10041 * tracepoint.c (cmd_qtsv): Adjust debug message.
10042 Don't check CUR_TPOINT.
10043
18c1b81a
YQ
100442012-08-28 Yao Qi <yao@codesourcery.com>
10045
10046 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10047 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10048 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10049 Remove declarations of xmalloc, xreallloc, xstrdup and
10050 freeargv.
10051 * Makefile.in (libiberty_h): New.
10052 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10053 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10054
dc82f37b
YQ
100552012-08-23 Yao Qi <yao@codesourcery.com>
10056
10057 * server.h: Remove declaration of 'xsnprintf'.
10058
406b1477
KS
100592012-08-22 Keith Seitz <keiths@redhat.com>
10060
10061 * server.h: Include build-gnulib-gbserver/config.h.
10062 * gdbreplay.c: Likewise.
10063
e6712ff1
DE
100642012-08-08 Doug Evans <dje@google.com>
10065
10066 * Makefile.in (SFILES): Add gdb_vecs.c.
10067 (OBS): Add gdb_vecs.o.
10068 (gdb_vecs_h, host_defs_h): New variables.
10069 (thread-db.o): Add $(gdb_vecs_h) dependency.
10070 (gdb_vecs.o): New rule.
10071 * thread-db.c: #include "gdb_vecs.h".
10072 (thread_db_load_search): Use a vector to iterate over path elements.
10073 Handle text appearing after "$pdir".
10074
10075 * configure.ac: Add check for strstr.
10076 * config.in: Regenerate.
10077 * configure: Regenerate.
10078
7c3270ae
UW
100792012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10080
10081 * hostio.c (handle_pread): If pread fails, fall back to attempting
10082 lseek/read.
10083 (handle_pwrite): Likewise for pwrite.
10084
b62e2b27
UW
100852012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10086
10087 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10088 between unsupported TYPE and unimplementable ADDR/LEN combination.
10089 (arm_insert_point): Act on new return value.
10090
78a99e91
PA
100912012-07-31 Pedro Alves <palves@redhat.com>
10092
10093 * server.c (process_point_options): Only skip tokens if we find
10094 one that is unrecognized. Don't treat 'X' specially while
10095 skipping unrecognized tokens.
10096
fcf303ab
UW
100972012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10098
10099 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10100 to 4-byte-align HW breakpoint addresses for Thumb.
10101
7255706c
YQ
101022012-07-27 Yao Qi <yao@codesourcery.com>
10103
10104 PR remote/14161.
10105
10106 * server.h: Declare gdb_agent_about_to_close.
10107 * target.c (kill_inferior): Include "agent.h".
10108 New. Send command 'kill'.
10109 * target.h (kill_inferior): Removed macro.
10110 * tracepoint.c (gdb_agent_about_to_close): New.
10111 (gdb_agent_helper_thread): Handle command 'close'.
10112 Wait endlessly until the inferior stops.
10113 Install gdb_agent_remove_socket to atexit hook.
10114 (agent_socket_name): New static variable.
10115 (gdb_agent_socket_init): Replace local variable 'name' with
10116 'agent_socket_name'.
10117 (gdb_agent_remove_socket): New.
10118
5a3f286f
YQ
101192012-07-27 Yao Qi <yao@codesourcery.com>
10120
10121 * server.c (process_point_options): Stop at 'X' when parsing.
10122
961bd387
ME
101232012-07-19 Michael Eager <eager@eagercon.com>
10124
a261b8f5 10125 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10126 to hw_execute.
10127 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10128 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10129 hardware breakpoint.
10130
aa7c7447
JK
101312012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10132
10133 * gdbserver/linux-low.c (initialize_low): Call
10134 linux_ptrace_init_warnings.
10135
7f216e7c
DE
101362012-07-02 Doug Evans <dje@google.com>
10137
10138 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10139 pointer to int.
10140
d3ce09f5
SS
101412012-07-02 Stan Shebs <stan@codesourcery.com>
10142
10143 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10144 (ax.o): Add it to build rule.
10145 (ax-ipa.o): Ditto.
10146 (OBS): Add format.o.
10147 (IPA_OBS): Add format.o.
10148 * server.c (handle_query): Claim support for breakpoint commands.
10149 (process_point_options): Add command case.
10150 (process_serial_event): Leave running if there are printfs in
10151 effect.
10152 * mem-break.h (any_persistent_commands): Declare.
10153 (add_breakpoint_commands): Declare.
10154 (gdb_no_commands_at_breakpoint): Declare.
10155 (run_breakpoint_commands): Declare.
10156 * mem-break.c (struct point_command_list): New struct.
10157 (struct breakpoint): New field command_list.
10158 (any_persistent_commands): New function.
10159 (add_commands_to_breakpoint): New function.
10160 (add_breakpoint_commands): New function.
10161 (gdb_no_commands_at_breakpoint): New function.
10162 (run_breakpoint_commands): New function.
10163 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10164 locally.
10165 * ax.c: Include format.h.
10166 (ax_printf): New function.
10167 (gdb_eval_agent_expr): Add printf opcode.
10168
2f8f6aed
YQ
101692012-06-13 Yao Qi <yao@codesourcery.com>
10170
10171 * server.c (start_inferior): Remove duplicated writes to fields
10172 'last_resume_kind' and 'last_status' of 'current_inferior'.
10173
0c9070b3
YQ
101742012-06-12 Yao Qi <yao@codesourcery.com>
10175 Pedro Alves <palves@redhat.com>
10176
10177 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10178 comment.
10179 * server.c (handle_v_cont): Extend comment.
10180
c52daf70
YQ
101812012-06-11 Yao Qi <yao@codesourcery.com>
10182
10183 * linux-low.c (linux_attach): Add 'static'.
10184
d38bbb0a
YQ
101852012-06-06 Yao Qi <yao@codesourcery.com>
10186
10187 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10188
89dc0afd
JK
101892012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10190
10191 Fix gcc -flto compilation warning.
10192 * server.c (main): Make variable multi_mode and attach volatile.
10193
75f62ce7
TJB
101942012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10195
10196 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10197 if the platform doesn't know about it.
10198
65f479b6
PA
101992012-05-30 Jeff Kenton <jkenton@tilera.com>
10200
10201 * Makefile.in (SFILES): Add linux-tile-low.c.
10202 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10203 * configure.srv: Handle tilegx-*-linux*.
10204 * linux-tile-low.c: New file.
10205
0c5bf5a9
JK
102062012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10207
10208 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10209
a493e3e2
PA
102102012-05-24 Pedro Alves <palves@redhat.com>
10211
10212 PR gdb/7205
10213
43aaf8b6 10214 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10215
2ea28649
PA
102162012-05-24 Pedro Alves <palves@redhat.com>
10217
10218 PR gdb/7205
10219
10220 Replace target_signal with gdb_signal throughout.
10221
8d409d16
MR
102222012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10223
10224 * linux-low.c (linux_store_registers): Avoid the copying sequence
10225 when no data has been retrieved by ptrace.
10226
23512c01
MGD
102272012-05-22 Will Deacon <will.deacon@arm.com>
10228
10229 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10230 Include asm/ptrace.h.
10231 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10232 already defined.
10233
4934b29e
MR
102342012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10235
10236 * linux-low.c (linux_store_registers): Don't re-retrieve data
10237 with ptrace that has already been obtained from /proc. Always
10238 copy any data retrieved with ptrace to the buffer supplied.
10239
bde24c0a
PA
102402012-05-11 Yao Qi <yao@codesourcery.com>
10241 Pedro Alves <palves@redhat.com>
10242
10243 * linux-low.c (enum stopping_threads_kind): New.
10244 (stopping_threads): Change type to `enum stopping_threads_kind'.
10245 (handle_extended_wait): If stopping and suspending threads, leave
10246 the new_lwp suspended too.
10247 (linux_wait_for_event): Adjust.
10248 (stop_all_lwps): Set `stopping_threads' to
10249 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10250 whether we're suspending threads or just stopping them. Assert no
10251 recursion happens.
10252
623b6bdf
YQ
102532012-04-29 Yao Qi <yao@codesourcery.com>
10254
10255 * server.h: Move some code to ...
10256 * gdbthread.h: ... here. New.
10257 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10258 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10259 (nto-low.o, win32-low.o): Likewise.
10260 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10261 * regcache.c, remote-utils.c, server.c: Likewise.
10262 * target.c, tracepoint.c, win32-low.c: Likewise.
10263
f15f9948
TJB
102642012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10265
10266 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10267 (PTRACE_ARG4_TYPE): Likewise.
10268 (PTRACE_XFER_TYPE): Likewise.
10269 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10270 ptrace to PTRACE_ARG3_TYPE.
10271 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10272 (PTRACE_ARG4_TYPE): Likewise.
10273 (PTRACE_XFER_TYPE): Likewise.
10274 (linux_detach_one_lwp): Cast fourth argument of
10275 ptrace to long then PTRACE_ARG4_TYPE.
10276 (regsets_fetch_inferior_registers): Cast third argument of
10277 ptrace to long then PTRACE_ARG3_TYPE.
10278 (regsets_store_inferior_registers): Likewise.
10279
38ea300a
PA
102802012-04-20 Pedro Alves <palves@redhat.com>
10281
10282 * configure: Regenerate.
10283
c971b7fa
PA
102842012-04-19 Pedro Alves <palves@redhat.com>
10285
43aaf8b6 10286 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10287 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10288 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10289 (all, install-only, uninstall, clean-info, all-lib, clean): No
10290 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10291 (maintainer-clean realclean distclean): Use subdir_do.
10292 (subdir_do): New.
10293 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10294 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10295 * acinclude.m4: Include acx_configure_dir.m4.
10296 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10297 calls. Call AC_PROG_RANLIB. Configure gnulib using
10298 ACX_CONFIGURE_DIR.
10299 (GNULIB): New.
10300 (GNULIB_STDINT_H): Adjust.
10301 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10302 * gdbreplay.c: Include build-gnulib/config.h.
10303 * server.h: Likewise.
10304 * aclocal.m4: Regenerate.
10305 * config.in: Regenerate.
10306 * configure: Regenerate.
c971b7fa 10307
809277f8
PA
103082012-04-19 Pedro Alves <palves@redhat.com>
10309
10310 * Makefile.in (LIBGNU, INCGNU): Adjust.
10311 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10312 (all, install-only, uninstall, clean-info, all-lib, clean)
10313 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10314 * configure.ac: Adjust AC_OUTPUT output.
10315 * aclocal.m4: Regenerate.
10316 * configure: Regenerate.
10317
fd9bb8b8
PA
103182012-04-19 Pedro Alves <palves@redhat.com>
10319
10320 * Makefile.in (generated_files): New.
10321 (server_h): Remove the explicit dependency on config.h, and depend
10322 on $generated_files.
10323
1c298c66
PA
103242012-04-19 Pedro Alves <palves@redhat.com>
10325
10326 * Makefile.in (INCGNU): Add -Ignulib.
10327
57c4b50b
PA
103282012-04-19 Pedro Alves <palves@redhat.com>
10329
10330 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10331 (INCGNU): ... this, and spell out -I here.
10332 (GNULIB_LIB): Rename to ...
10333 (LIBGNU): ... this.
10334 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10335
1030e047
PA
103362012-04-19 Pedro Alves <palves@redhat.com>
10337
10338 * config.in: Regenerate.
10339
447d4319
PA
103402012-04-19 Pedro Alves <palves@redhat.com>
10341
10342 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10343 * server.h (memmem): Remove declaration.
10344 * config.in: Regenerate.
10345 * configure: Regenerate.
10346
aad9eab9
YQ
103472012-04-19 Yao Qi <yao@codesourcery.com>
10348
10349 * Makefile.in (SFILES): Add common/vec.c.
10350 (OBS): Add vec.o.
10351 (vec.o): New rule.
10352
3e10640f
YQ
103532012-04-19 Yao Qi <yao@codesourcery.com>
10354
10355 * remote-utils.c (prepare_resume_reply): Replace with macro
10356 target_core_of_thread.
10357 * server.c (handle_qxfer_threads_proper): Likewise.
10358 * target.h (traget_core_of_thread): New macro.
10359
71622373
PA
103602012-04-18 Pedro Alves <palves@redhat.com>
10361
10362 * aclocal.m4: Regenerate.
10363 * configure: Regenerate.
10364
80d26939
YQ
103652012-04-16 Yao Qi <yao@codesourcery.com>
10366
10367 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10368 duplicated on address.
10369
42476b70
YQ
103702012-04-16 Yao Qi <yao@codesourcery.com>
10371
10372 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10373 (struct tracepoint_action_ops) <send>: New field.
10374 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10375 (agent_expr_send, x_tracepoint_action_send): New.
10376 (l_tracepoint_action_send): New.
10377 (cmd_qtdp): Download and install tracepoint
10378 according to `use_agent'.
10379 (run_inferior_command): Add one more parameter `len'.
10380 Update callers.
10381 (tracepoint_send_agent): New.
10382 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10383
7bc83639
YQ
103842012-04-16 Yao Qi <yao@codesourcery.com>
10385
10386 * tracepoint.c (download_tracepoints): Moved to ...
10387 (cmd_qtstart): ... here.
10388
5f18041e
YQ
103892012-04-14 Yao Qi <yao@codesourcery.com>
10390
10391 * tracepoint.c: Include inttypes.h.
10392 (struct collect_memory_action): Use sized types.
10393 (struct tracepoint): Likewise.
10394 (cmd_qtdp, stop_tracing): Update print specifiers.
10395 (cmd_qtp, response_tracepoint): Likewise.
10396 (collect_data_at_tracepoint): Likewise.
10397 (collect_data_at_step): Likewise.
10398
55a8c076
YQ
103992012-04-14 Yao Qi <yao@codesourcery.com>
10400
10401 Import gnulib module inttypes.
10402 * aclocal.m4, config.in, configure: Regenerated.
10403
dc750257
YQ
104042012-04-14 Yao Qi <yao@codesourcery.com>
10405
10406 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10407 Makefile and config.status at last.
10408
0ab5faf9
YQ
104092012-04-13 Yao Qi <yao@codesourcery.com>
10410
10411 * tracepoint.c: Include stdint.h unconditionally.
10412
18f5fd81
TJB
104132012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10414
10415 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10416 on BFD_HAVE_SYS_PROCFS_TYPE.
10417 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10418 * configure: Regenerate.
10419 * config.in: Likewise.
10420
4d47af5c
L
104212012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10422
10423 * Makefile.in (clean): Also remove x32.c x32-linux.c
10424 x32-avx.c x32-avx-linux.c.
10425 (x32.o): New target.
10426 (x32.c): Likewise.
10427 (x32-linux.o): Likewise.
10428 (x32-linux.c): Likewise.
10429 (x32-avx.o): Likewise.
10430 (x32-avx.c): Likewise.
10431 (x32-avx-linux.o): Likewise.
10432 (x32-avx-linux.c): Likewise.
10433
10434 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10435 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10436 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10437 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10438 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10439 i386/x32-avx-linux.xml.
10440
10441 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10442 (init_registers_x32_avx_linux): Likwise.
10443 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10444 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10445
ecedbe58
PA
104462012-04-13 Pedro Alves <palves@redhat.com>
10447
10448 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10449 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10450 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10451 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10452 the sub-make.
10453
c92b5177
L
104542012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10455
10456 * linux-x86-low.c (compat_x32_clock_t): New.
10457 (compat_x32_siginfo_t): Likewise.
10458 (compat_x32_siginfo_from_siginfo): Likewise.
10459 (siginfo_from_compat_x32_siginfo): Likewise.
10460 (linux_is_elf64): Likewise.
10461 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10462 and siginfo_from_compat_x32_siginfo for x32.
10463 (x86_arch_setup): Set linux_is_elf64.
10464
214d508e
L
104652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10466
10467 PR gdb/13969
10468 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10469 e_machine field.
10470 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10471 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10472 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10473 compatible with process.
10474
c9a1864a
YQ
104752012-04-12 Yao Qi <yao@codesourcery.com>
10476
10477 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10478 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10479 (install-only, install-info, clean): Handle sub dir gnulib.
10480 (all-lib, am--refresh): New targets.
10481 (memmem.o): Remove target.
10482 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10483 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10484 (AC_REPLACE_FUNCS): Remove memmem.
10485 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10486 (AC_OUTPUT): Generate Makefile in gnulib/.
10487 * aclocal.m4, config.in, configure: Regenerated.
10488
367ba2c2
MR
104892012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10490
10491 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10492
9d236627
PA
104932012-04-05 Pedro Alves <palves@redhat.com>
10494
10495 -Werror=strict-aliasing
10496
10497 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10498 pointer.
10499
111217b3
PA
105002012-04-04 Pedro Alves <palves@redhat.com>
10501
10502 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10503 (sparc_store_gregset_from_stack, sparc_store_gregset)
10504 (sparc_breakpoint_at): Fix formatting.
10505
8365dcf5
TJB
105062012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10507
10508 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10509 are available.
10510 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10511 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10512 * config.in: Regenerate.
10513 * configure: Likewise.
10514
689cc2ae
PA
105152012-03-29 Pedro Alves <palves@redhat.com>
10516
10517 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10518 Correct ptrace arguments.
10519
c14dfd32
PA
105202012-03-28 Pedro Alves <palves@redhat.com>
10521
10522 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10523 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10524 (IA64_FR1_REGNUM): New defines.
10525 (ia64_fetch_register): New.
10526 (the_low_target): Install it.
10527 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10528 field.
10529 * linux-low.c (linux_fetch_registers): Try the
10530 the_low_target.fetch_register hook first.
10531
10532 * linux-arm-low.c (the_low_target): Adjust.
10533 * linux-bfin-low.c (the_low_target): Adjust.
10534 * linux-cris-low.c (the_low_target): Adjust.
10535 * linux-crisv32-low.c (the_low_target): Adjust.
10536 * linux-m32r-low.c (the_low_target): Adjust.
10537 * linux-m68k-low.c (the_low_target): Adjust.
10538 * linux-mips-low.c (the_low_target): Adjust.
10539 * linux-ppc-low.c (the_low_target): Adjust.
10540 * linux-s390-low.c (the_low_target): Adjust.
10541 * linux-sh-low.c (the_low_target): Adjust.
10542 * linux-sparc-low.c (the_low_target): Adjust.
10543 * linux-tic6x-low.c (the_low_target): Adjust.
10544 * linux-x86-low.c (the_low_target): Adjust.
10545 * linux-xtensa-low.c (the_low_target): Adjust.
10546
63c88e13
PA
105472012-03-26 Pedro Alves <palves@redhat.com>
10548
10549 * server.c (handle_qxfer_libraries): Don't bail early if
10550 the_target->qxfer_libraries_svr4 is not NULL.
10551
fb723180
PA
105522012-03-26 Pedro Alves <palves@redhat.com>
10553
10554 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10555
0afae3cf
PA
105562012-03-23 Pedro Alves <palves@redhat.com>
10557
10558 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10559 "library-list-svr4" element's start tag when the the DSO list is
10560 empty.
10561
485f1ee4
PA
105622012-03-23 Pedro Alves <palves@redhat.com>
10563
10564 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10565 a variable whose type size is the same as the inferior's pointer
10566 size.
10567
a5362b9a
TS
105682012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10569
10570 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10571 struct siginfo.
10572 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10573 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10574 * linux-low.h: Include <signal.h>.
10575 (struct siginfo): Remove forward declaration.
10576 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10577 struct siginfo.
10578
d226c142
MF
105792012-03-21 Mike Frysinger <vapier@gentoo.org>
10580
10581 * .gitignore: Ignore more files.
10582
122f36ef
PA
105832012-03-19 Pedro Alves <palves@redhat.com>
10584 Jan Kratochvil <jan.kratochvil@redhat.com>
10585
10586 * server.c (cont_thread, general_thread): Add describing comments.
10587 (start_inferior): Clear `cont_thread'.
10588 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10589 of a process.
10590
fc3e5175
YQ
105912012-03-15 Yao Qi <yao@codesourcery.com>
10592
10593 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10594 handling to ...
10595 (cmd_qtdp): ... here.
10596
8d0d92cd
YQ
105972012-03-15 Yao Qi <yao@codesourcery.com>
10598
10599 * tracepoint.c (struct tracepoint_action_ops): New.
10600 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10601 (m_tracepoint_action_download): New.
10602 (r_tracepoint_action_download): New.
10603 (x_tracepoint_action_download): New.
10604 (l_tracepoint_action_download): New.
10605 (add_tracepoint_action): Install `action->ops' according type.
10606 (download_tracepoint_1): Move code `download' function pointer
10607 of various tracepoint_action_ops.
10608
87b0bb13
JK
106092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10610
10611 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10612 linux_ptrace_attach_warnings.
10613
5f572dec
JK
106142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10615
10616 * Makefile.in (linux-ptrace.o): New.
10617 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10618 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10619 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10620 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10621 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10622 of these targets.
10623 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10624
f4647387
YQ
106252012-03-08 Yao Qi <yao@codesourcery.com>
10626 Pedro Alves <palves@redhat.com>
10627
10628 Fix PR server/13392.
10629 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10630 offset of JMP insn.
10631 * tracepoint.c (remove_tracepoint): New.
10632 (cmd_qtdp): Call remove_tracepoint when failed to install.
10633
9b224c5e
PA
106342012-03-07 Pedro Alves <palves@redhat.com>
10635
10636 * linux-low.c (get_detach_signal): New.
10637 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10638 Pass on pending signals to PTRACE_DETACH. Check the result of the
10639 ptrace call.
10640 * server.c (program_signals, program_signals_p): New.
10641 (handle_general_set): Handle QProgramSignals.
10642 * server.h (program_signals, program_signals_p): Declare.
10643
e237a7e2
JK
106442012-03-05 Pedro Alves <palves@redhat.com>
10645 Jan Kratochvil <jan.kratochvil@redhat.com>
10646
10647 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10648 New comment why.
10649
5808517f
YQ
106502012-03-03 Yao Qi <yao@codesourcery.com>
10651
10652 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10653 agent_look_up_symbols.
10654
58b4daa5
YQ
106552012-03-03 Yao Qi <yao@codesourcery.com>
10656
10657 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10658 (linux-x86-low.o): Likewise.
10659 * server.h: Remove in_process_agent_loaded.
10660 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10661 common/agent.c.
10662 Update callers.
10663
8ffcbaaf
YQ
106642012-03-03 Yao Qi <yao@codesourcery.com>
10665
10666 * tracepoint.c (gdb_agent_capability): New global.
10667 (in_process_agent_loaded_ust): Renamed to
10668 `in_process_agent_supports_ust'.
10669 Update callers.
10670 (in_process_agent_supports_ust): Call agent_capability_check.
10671 (clear_installed_tracepoints): Assert that agent supports
10672 agent.
10673
d1feda86
YQ
106742012-03-03 Yao Qi <yao@codesourcery.com>
10675
10676 * linux-low.c (linux_supports_agent): New.
10677 (linux_target_ops): Initialize field `supports_agent' with
10678 linux_supports_agent.
10679 * target.h (struct target_ops) <supports_agent>: New.
10680 (target_supports_agent): New macro.
10681 * server.c (handle_general_set): Handle packet 'QAgent'.
10682 (handle_query): Send `QAgent+'.
10683 * Makefile.in (server.o): Depends on agent.h.
10684
2fa291ac
YQ
106852012-03-03 Yao Qi <yao@codesourcery.com>
10686
10687 * Makefile.in (OBS): Add agent.o.
10688 Add new rule for agent.o.
10689 Track dependence of tracepoint.c on agent.h.
10690 * tracepoint.c (run_inferior_command_1):
10691 (run_inferior_command): Call agent_run_command.
10692 (gdb_ust_connect_sync_socket): Deleted. Move it to
10693 common/agent.c.
10694 (resume_thread, stop_thread): Likewise.
10695 (gdb_ust_socket_init): Renamed to ...
10696 (gdb_agent_socket_init): ... New.
10697 (gdb_ust_thread): Renamed to ...
10698 (gdb_agent_helper_thread): ... New.
10699 (gdb_ust_init): Move some code to ...
10700 (gdb_agent_init): ... here. New.
10701 [HAVE_UST]: Call gdb_ust_init.
10702 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10703 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10704 * config.in, configure: Regenerated.
10705
05044653
PA
107062012-03-02 Pedro Alves <palves@redhat.com>
10707
10708 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10709 * linux-low.c (struct simple_pid_list): New.
10710 (stopped_pids): New a struct simple_pid_list pointer.
10711 (add_to_pid_list, pull_pid_from_list): New.
10712 (handle_extended_wait): Don't assume the first signal new children
10713 report is SIGSTOP. Adjust call to pull_pid_from_list.
10714 (linux_wait_for_lwp): Adjust.
10715
8d00225b
YQ
107162012-03-02 Yao Qi <yao@codesourcery.com>
10717
10718 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10719 debug log.
10720
19560ba5
YQ
107212012-03-02 Yao Qi <yao@codesourcery.com>
10722
10723 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10724 `stop_pc' and `tpoint'. Update caller.
10725
1faeff08
MR
107262012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10727
10728 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10729 * linux-low.c (use_linux_regsets): New macro.
10730 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10731 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10732 (linux_register_in_regsets): New function.
10733 (usr_fetch_inferior_registers): Skip registers covered by
10734 regsets.
10735 (usr_store_inferior_registers): Likewise.
10736 (usr_fetch_inferior_registers): New macro.
10737 (usr_store_inferior_registers): Likewise.
10738 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10739 (linux_store_registers): Likewise.
10740 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10741 prototype.
10742 (init_registers_mips64_dsp_linux): Likewise.
10743 (init_registers_mips_linux): New macro.
10744 (init_registers_mips_dsp_linux): Likewise.
10745 (mips_dsp_num_regs): Likewise.
10746 (DSP_BASE, DSP_CONTROL): New fallback macros.
10747 (mips_base_regs): New macro.
10748 (mips_regmap): Use it. Fix the size.
10749 (mips_dsp_regmap): New variable.
10750 (mips_dsp_regset_bitmap): Likewise.
10751 (mips_arch_setup): New function.
10752 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10753 than mips_regmap.
10754 (mips_cannot_store_register): Likewise.
10755 (the_low_target): Update .arch_setup, .num_regs and .regmap
10756 initializers. Add .regset_bitmap initializer.
10757 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10758 initializer.
10759 * linux-bfin-low.c (the_low_target): Likewise.
10760 * linux-cris-low.c (the_low_target): Likewise.
10761 * linux-crisv32-low.c (the_low_target): Likewise.
10762 * linux-ia64-low.c (the_low_target): Likewise.
10763 * linux-m32r-low.c (the_low_target): Likewise.
10764 * linux-m68k-low.c (the_low_target): Likewise.
10765 * linux-ppc-low.c (the_low_target): Likewise.
10766 * linux-s390-low.c (the_low_target): Likewise.
10767 * linux-sh-low.c (the_low_target): Likewise.
10768 * linux-sparc-low.c (the_low_target): Likewise.
10769 * linux-tic6x-low.c (the_low_target): Likewise.
10770 * linux-x86-low.c (the_low_target): Likewise.
10771 * linux-xtensa-low.c (the_low_target): Likewise.
10772 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10773 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10774 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10775 srv_xmlfiles.
10776 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10777 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10778
c03e6ccc
YQ
107792012-02-29 Yao Qi <yao@codesourcery.com>
10780 Pedro Alves <palves@redhat.com>
10781
10782 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10783 `step_over_finished' is true.
10784
644cebc9
PA
107852012-02-27 Pedro Alves <palves@redhat.com>
10786
10787 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10788 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10789
c14d7ab2
PA
107902012-02-27 Pedro Alves <palves@redhat.com>
10791
10792 PR server/9684
10793 * linux-low.c (pid_is_stopped): New.
10794 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10795
412c89dd
LM
107962012-02-25 Luis Machado <lgustavo@codesourcery.com>
10797
10798 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10799 of conditions.
10800
b745defe
MR
108012012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10802
10803 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10804
9f3a5c85
LM
108052012-02-24 Luis Machado <lgustavo@codesourcery>
10806
10807 * server.c (handle_query): Advertise support for target-side
10808 breakpoint condition evaluation.
10809 (process_point_options): New function.
10810 (process_serial_event): When inserting a breakpoint, check for
10811 a target-side condition that should be evaluated.
10812
10813 * mem-break.c: Include regcache.h and ax.h.
10814 (point_cond_list_t): New data structure.
10815 (breakpoint) <cond_list>: New field.
10816 (find_gdb_breakpoint_at): Make non-static.
10817 (delete_gdb_breakpoint_at): Clear any target-side
10818 conditions.
10819 (clear_gdb_breakpoint_conditions): New function.
10820 (add_condition_to_breakpoint): Likewise.
10821 (add_breakpoint_condition): Likewise.
10822 (gdb_condition_true_at_breakpoint): Likewise.
10823 (gdb_breakpoint_here): Return result directly instead
10824 of going through a local variable.
10825
10826 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10827 (clear_gdb_breakpoint_conditions): Likewise.
10828 (add_breakpoint_condition): Likewise.
10829 (gdb_condition_true_at_breakpoint): Likewise.
10830
10831 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10832 (need_step_over_p): Take target-side breakpoint condition into
10833 consideration.
10834
5e1dc496
LM
108352012-02-24 Luis Machado <lgustavo@codesourcery>
10836
10837 * server.h: Include tracepoint.h.
10838 (agent_mem_read, agent_get_trace_state_variable_value,
10839 agent_set_trace_state_variable_value,
10840 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10841 get_set_tsv_func_addr): New prototypes.
10842
10843 * ax.h: New include file.
10844 * ax.c: New source file.
10845
10846 * tracepoint.c: Include ax.h.
10847 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10848 agent_expr, eval_result_type): Move to ax.h.
10849 (parse_agent_expr): Rename to ...
10850 (gdb_parse_agent_expr): ... this, make it non-static and move
10851 to ax.h.
10852 (unparse_agent_expr) Rename to ...
10853 (gdb_unparse_agent_expr): ... this, make it non-static and move
10854 to ax.h.
10855 (eval_agent_expr): Rename to ...
10856 (eval_tracepoint_agent_expr): ... this.
10857 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10858 forward declarations.
10859 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10860 (agent_get_trace_state_variable_value): New function.
10861 (agent_set_trace_state_variable_value): New function.
10862 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10863 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10864 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10865 (condition_true_at_tracepoint): Likewise.
10866 (parse_agent_expr): Rename to ...
10867 (gdb_parse_agent_expr): ... this and move to ax.c.
10868 (unparse_agent_expr): Rename to ...
10869 (gdb_unparse_agent_expr): ... this and move to ax.c.
10870 (gdb_agent_op_name): Move to ax.c.
10871 (eval_agent_expr): Rename to ...
10872 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10873 and move to ax.c.
10874 (eval_tracepoint_agent_expr): New function.
10875 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10876 non-static.
5e1dc496
LM
10877 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10878 ax.c.
10879 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10880 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10881 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10882 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10883 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10884 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10885 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10886 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10887 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10888 (compile_bytecodes): Remove forward declaration.
10889 (is_goto_target): Move to ax.c.
10890 (compile_bytecodes): Move to ax.c and call
10891 agent_get_trace_state_variable_value (...) and
10892 agent_set_trace_state_variable_value (...).
10893
10894 * Makefile.in: Update ax.c and IPA dependencies.
10895
277e4e52
PA
108962012-02-24 Pedro Alves <palves@redhat.com>
10897
10898 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10899 (cmd_bigqtbuffer_circular): ... this. Only handle
10900 'QTBuffer:circular:'.
10901 (handle_tracepoint_general_set): Adjust.
10902
bf4c19f7
YQ
109032012-02-16 Yao Qi <yao@codesourcery.com>
10904
10905 * inferiors.c: Move code to ...
10906 * dll.c: .... here. New.
10907 * server.h: Declare clear_dlls.
10908 * Makefile.in (SFILES): Add dll.c.
10909 (OBS): Add dll.o
10910 (dll.o): New rule.
10911
d73f2619
YQ
109122012-02-11 Yao Qi <yao@codesourcery.com>
10913
10914 * server.c: (handle_monitor_command): Add a new parameter
10915 `own_buf'.
10916 (handle_query): Update caller.
10917
f8255c2a
JB
109182012-02-09 Joel Brobecker <brobecker@adacore.com>
10919
10920 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10921 * configure, config.in: Regenerate.
10922 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10923 is not defined.
10924
da84f473
PA
109252012-02-02 Pedro Alves <palves@redhat.com>
10926
10927 Try SIGKILL first, then PTRACE_KILL.
10928 * linux-low.c (linux_kill_one_lwp): New.
10929 (linux_kill_one_lwp): Rename to ...
10930 (kill_one_lwp_callback): ... this. Use the new
10931 linux_kill_one_lwp.
10932
e886a173
PA
109332012-02-02 Pedro Alves <palves@redhat.com>
10934
10935 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10936 inferior.
10937
be07f1a2
PA
109382012-01-27 Pedro Alves <palves@redhat.com>
10939
10940 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10941 (elf_64_file_p): Make static.
10942 (linux_pid_exe_is_elf_64_file): New.
10943 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10944 Delete declarations.
10945 (linux_pid_exe_is_elf_64_file): Declare.
10946 * linux-x86-low.c (x86_arch_setup): Use
10947 linux_pid_exe_is_elf_64_file.
10948
d8301ad1
JK
109492012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10950
10951 * linux-low.c (linux_wait_for_event_1): Rename to ...
10952 (linux_wait_for_event): ... here and merge it with former
10953 linux_wait_for_event - new variable wait_ptid, use it.
10954 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10955
01b17894
PA
109562012-01-23 Pedro Alves <palves@redhat.com>
10957
10958 * server.c (main): Avoid yet another case of infinite loop while
10959 detaching/killing after a longjmp.
10960
e825046f
JK
109612012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10962
10963 Code cleanup.
10964 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10965
b9e7b9c3
UW
109662012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10967
10968 * hostio.c (handle_readlink): New function.
10969 (handle_vFile): Call it to handle "vFile:readlink" packets.
10970
901f9912
UW
109712012-01-20 Pedro Alves <palves@redhat.com>
10972 Ulrich Weigand <ulrich.weigand@linaro.org>
10973
10974 * server.c (handle_v_requests): Only support vAttach and vRun to
10975 start multiple processes when in extended protocol mode.
10976
fc1ab1a0
PA
109772012-01-17 Pedro Alves <palves@redhat.com>
10978
10979 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10980 memalign plus mprotect to allocate the scratch buffer.
10981
7d5d4e98
PA
109822012-01-13 Pedro Alves <palves@redhat.com>
10983
10984 * server.c (attach_inferior): Clear `cont_thread'.
10985
f128d5e9
PA
109862012-01-13 Pedro Alves <palves@redhat.com>
10987
10988 * server.c (main): Avoid infinite loop while detaching/killing
10989 after a longjmp.
10990
06db92f0
DE
109912012-01-09 Doug Evans <dje@google.com>
10992
10993 * server.c (start_inferior): Set last_ptid in --wrapper case.
10994
32d92999
YQ
109952012-01-06 Yao Qi <yao@codesourcery.com>
10996
10997 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10998 defined.
10999 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11000
5e0a92a9
YQ
110012012-01-04 Yao Qi <yao@codesourcery.com>
11002
11003 * tracepoint.c (cmd_qtdp): Print debug message
11004 for static tracepoint.
11005
ae639e8c
YQ
110062012-01-04 Yao Qi <yao@codesourcery.com>
11007
11008 * tracepoint.c (trace_vdebug): Differentiate debug message
11009 between gdbserver and IPA.
11010
f72429c5
YQ
110112012-01-03 Yao Qi <yao@codesourcery.com>
11012
11013 * tracepoint.c (tracepoint_was_hit): Don't collect for
11014 static tracepoint.
11015
12c3e59c
JB
110162012-01-02 Joel Brobecker <brobecker@adacore.com>
11017
11018 * terminal.h: Reformat copyright header.
11019
67827812
JB
110202012-01-02 Joel Brobecker <brobecker@adacore.com>
11021
11022 * server.c (gdbserver_version): Update copyright year.
11023 * gdbreplay.c (gdbreplay_version): Likewise.
11024
3e52c33d
JK
110252011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11026
11027 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11028
11029 Revert:
11030 2011-12-18 Hui Zhu <teawater@gmail.com>
11031 * linux-low.c (linux_create_inferior): Save return value to ret.
11032
66f1260e
HZ
110332011-12-18 Hui Zhu <teawater@gmail.com>
11034
11035 * linux-low.c (linux_create_inferior): Save return value to ret.
11036
e77616d7
DE
110372011-12-16 Doug Evans <dje@google.com>
11038
e7b06c57
DE
11039 * linux-low.c (linux_create_inferior): If stdio connection,
11040 redirect stdin from /dev/null, stdout to stderr.
11041 * remote-utils.c (remote_is_stdio): New static global.
11042 (remote_connection_is_stdio): New function.
11043 (remote_prepare): Handle stdio connection.
11044 (remote_open): Ditto.
11045 (remote_close): Don't close stdin for stdio connections.
11046 (read_prim,write_prim): New functions. Replace all calls to
11047 read/write to these.
11048 * server.c (main): Watch for "-" argument. Move call to
11049 remote_prepare before start_inferior.
11050 * server.h (STDIO_CONNECTION_NAME): New macro.
11051 (remote_connection_is_stdio): Declare.
11052
e77616d7
DE
11053 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11054 in debugging output.
11055
82067193
YQ
110562011-12-15 Yao Qi <yao@codesourcery.com>
11057
11058 * tracepoint.c: Include sys/syscall.h.
11059 (gdb_ust_thread): Remove preprocessor conditional.
11060
82bfbe7e
PA
110612011-12-14 Pedro Alves <pedro@codesourcery.com>
11062
11063 * linux-low.c (linux_detach_one_lwp): Call
11064 the_low_target.prepare_to_resume before detaching.
11065
712c6575
YQ
110662011-12-14 Yao Qi <yao@codesourcery.com>
11067
11068 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11069 of write.
11070
d54d1edf
YQ
110712011-12-14 Yao Qi <yao@codesourcery.com>
11072
11073 * i386-low.c (i386_low_stopped_data_address): Initialize local
11074 variable `control'.
11075
6210a125
PA
110762011-12-13 Pedro Alves <pedro@codesourcery.com>
11077
11078 PR remote/13492
11079
11080 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11081 DR_CONTROL unless necessary. Extend comments.
11082 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11083 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11084
2ece8244
YQ
110852011-12-13 Yao Qi <yao@codesourcery.com>
11086
11087 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11088 macros.
11089 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11090
784867a5
JK
110912011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11092
11093 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11094 Print new debug message for such case.
11095
6bf36717
JK
110962011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11097
11098 Fix overlapping memcpy.
11099 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11100 the read_inferior_memory transfer.
11101 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11102 write_inferior_memory transfer.
11103 (set_fast_tracepoint_jump): New variable buf. Use it for the
11104 read_inferior_memory and write_inferior_memory transfers.
11105 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11106 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11107 Use it for the write_inferior_memory transfer.
11108 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11109 buffers.
11110
50275556
MR
111112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11112
11113 * linux-low.c (fetch_register, store_register): Make code
11114 consistent, fix formatting.
11115
7325beb4
MR
111162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11117
11118 * linux-low.c (usr_store_inferior_registers): Factor out code
11119 to handle individual registers into...
11120 (store_register): ... this new function.
11121
c642a434
UW
111222011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11123
11124 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11125 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11126 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11127 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11128 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11129 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11130 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11131 (srv_xmlfiles): Add new XML files.
11132
11133 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11134 and <sys/uio.h>.
11135 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11136 (init_registers_s390_linux32v1): Add prototype.
11137 (init_registers_s390_linux32v2): Likewise.
11138 (init_registers_s390_linux64v1): Likewise.
11139 (init_registers_s390_linux64v2): Likewise.
11140 (init_registers_s390x_linux64v1): Likewise.
11141 (init_registers_s390x_linux64v2): Likewise.
11142 (s390_num_regs): Increment to 52.
11143 (s390_regmap): Add orig_r2 register.
11144 (s390_num_regs_3264): Increment to 68.
11145 (s390_regmap_3264): Add orig_r2 register.
11146 (s390_collect_ptrace_register): Handle orig_r2 register.
11147 (s390_supply_ptrace_register): Likewise.
11148 (s390_fill_last_break): New function.
11149 (s390_store_last_break): Likewise.
11150 (s390_fill_system_call): New function.
11151 (s390_store_system_call): Likewise.
11152 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11153 register sets.
11154 (s390_check_regset): New function.
11155 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11156 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11157 Update target_regsets for available register sets.
11158
2268b414
JK
111592011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11160 Jan Kratochvil <jan.kratochvil@redhat.com>
11161
11162 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11163 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11164 New.
11165 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11166 * linux-low.h (struct process_info_private): New member r_debug.
11167 * server.c (handle_qxfer_libraries): Call
11168 the_target->qxfer_libraries_svr4.
11169 (handle_qxfer_libraries_svr4): New function.
11170 (qxfer_packets): New entry "libraries-svr4".
11171 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11172 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11173 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11174 PACKET_qXfer_libraries_svr4.
11175
d6db1fab
UW
111762011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11177
11178 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11179 PSW address/mask between 8-byte and 16-byte formats.
11180 (s390_supply_ptrace_register): Likewise.
11181 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11182 basic addressing mode bit.
11183
242f5f1c
SS
111842011-11-24 Stan Shebs <stan@codesourcery.com>
11185
11186 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11187
f196051f
SS
111882011-11-17 Stan Shebs <stan@codesourcery.com>
11189
11190 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11191 (tracing_start_time): New global.
11192 (tracing_stop_time): New global.
11193 (tracing_user_name): New global.
11194 (tracing_notes): New global.
11195 (tracing_stop_note): New global.
11196 (cmd_qtstart): Set traceframe_usage, start_time.
11197 (stop_tracing): Set stop_time.
11198 (cmd_qtstatus): Report additional status.
11199 (cmd_qtp): New function.
11200 (handle_tracepoint_query): Call it.
11201 (cmd_qtnotes): New function.
11202 (handle_tracepoint_general_set): Call it.
11203 (get_timestamp): Rename from tsv_get_timestamp.
11204
405f8e94
SS
112052011-11-14 Stan Shebs <stan@codesourcery.com>
11206 Kwok Cheung Yeung <kcy@codesourcery.com>
11207
11208 * linux-x86-low.c (small_jump_insn): New.
11209 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11210 trampoline and error message, build a trampoline and issue a small
11211 jump instruction to it.
11212 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11213 trampoline and error message.
11214 (x86_get_min_fast_tracepoint_insn_len): New.
11215 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11216 * linux-low.h (struct linux_target_ops): Add arguments to
11217 install_fast_tracepoint_jump_pad operation, add new operation.
11218 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11219 arguments.
11220 (linux_get_min_fast_tracepoint_insn_len): New function.
11221 (linux_target_op): Add new operation.
11222 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11223 (gdb_trampoline_buffer_end): Ditto.
11224 (gdb_trampoline_buffer_error): Ditto.
11225 (struct ipa_sym_addresses): Add fields for new IPA variables.
11226 (symbol_list): Add entries for new IPA variables.
11227 (struct tracepoint): Add fields to hold the address range of the
11228 trampoline used by the tracepoint.
11229 (trampoline_buffer_head): New static variable.
11230 (trampoline_buffer_tail): Ditto.
11231 (claim_trampoline_space): New function.
11232 (have_fast_tracepoint_trampoline_buffer): New function.
11233 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11234 structure.
11235 (install_fast_tracepoint): Ditto, also add error buffer argument.
11236 (cmd_qtminftpilen): New function.
11237 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11238 (fast_tracepoint_from_trampoline_address): New function.
11239 (fast_tracepoint_collecting): Handle trampoline as part of jump
11240 pad space.
11241 (set_trampoline_buffer_space): New function.
11242 (initialize_tracepoint): Initialize new IPA variables.
11243 * target.h (struct target_ops): Add arguments to
11244 install_fast_tracepoint_jump_pad operation, add new
11245 get_min_fast_tracepoint_insn_len operation.
11246 (target_get_min_fast_tracepoint_insn_len): New.
11247 (install_fast_tracepoint_jump_pad): Add arguments.
11248 * server.h (IPA_BUFSIZ): Define.
11249 * linux-i386-ipa.c: Include extra header files.
11250 (initialize_fast_tracepoint_trampoline_buffer): New function.
11251 (initialize_low_tracepoint): Call it.
11252 * server.h (set_trampoline_buffer_space): Declare.
11253 (claim_trampoline_space): Ditto.
11254 (have_fast_tracepoint_trampoline_buffer): Ditto.
11255
1e4d1764
YQ
112562011-11-14 Yao Qi <yao@codesourcery.com>
11257
11258 * server.c (handle_query): Handle InstallInTrace for qSupported.
11259 * tracepoint.c (add_tracepoint): Sort list.
11260 (install_tracepoint, download_tracepoint): New.
11261 (cmd_qtdp): Call them to install and download tracepoints.
11262 (sort_tracepoints): Removed.
11263 (cmd_qtstart): Update.
11264
5c73ff4e
YQ
112652011-11-14 Yao Qi <yao@codesourcery.com>
11266
11267 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11268 * mem-break.h: Declare.
11269 * tracepoint.c (cmd_qtstart): Move some code to ...
11270 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11271 New.
11272 (download_tracepoints): Move some code to ...
11273 (download_tracepoint_1): ... here. New.
11274
86a30030
YQ
112752011-11-08 Yao Qi <yao@codesourcery.com>
11276
11277 * remote-utils.c (relocate_instruction): A comment fix.
11278
8d26e50c
JB
112792011-11-07 Joel Brobecker <brobecker@adacore.com>
11280
11281 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11282 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11283 dr_status_mirror and dr_control_mirror from debug_reg_state.
11284 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11285 (i386_initial_stuff): Remove use of deleted globals.
11286 (i386_get_thread_context, i386_set_thread_context,
11287 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11288 from debug_reg_state.
11289
a59306a3
YQ
112902011-11-05 Yao Qi <yao@codesourcery.com>
11291
11292 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11293 address as TPOINT's.
11294
3065dfb6
SS
112952011-11-02 Stan Shebs <stan@codesourcery.com>
11296
11297 * tracepoint.c (agent_mem_read_string): New function.
11298 (eval_agent_expr): Call it for tracenz.
11299 * server.c (handle_query): Report support for tracenz.
11300
fd0d8c7c
YQ
113012011-11-02 Yao Qi <yao@codesourcery.com>
11302
11303 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11304
609086b1
YQ
113052011-11-02 Yao Qi <yao@codesourcery.com>
11306
11307 * target.h: Fix a typo in comment.
11308
b9fd1791
PA
113092011-10-31 Pedro Alves <pedro@codesourcery.com>
11310
11311 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11312 clobber the breakpoints' shadows with fast tracepoint jumps.
11313 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11314 * target.c (write_inferior_memory): Also pass MYADDR down to
11315 check_mem_write.
11316
03583c20
UW
113172011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11318
11319 * configure.ac: Check support for personality routine.
11320 * configure: Regenerate.
11321 * config.in: Likewise.
11322 * linux-low.c: Include <sys/personality.h>.
11323 Define ADDR_NO_RANDOMIZE if necessary.
11324 (linux_create_inferior): Disable address space randomization when
11325 forking inferior, if requested.
11326 (linux_supports_disable_randomization): New function.
11327 (linux_target_ops): Install it.
11328 * server.h (disable_randomization): Declare.
11329 * server.c (disable_randomization): New global variable.
11330 (handle_general_set): Handle QDisableRandomization.
11331 (handle_query): Likewise for qSupported.
11332 (main): Support --disable-randomization and --no-disable-randomization
11333 command line arguments.
11334 * target.h (struct target_ops): Add supports_disable_randomization.
11335 (target_supports_disable_randomization): New macro.
11336
723b724b
MF
113372011-09-29 Mike Frysinger <vapier@gentoo.org>
11338
11339 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11340 ifdef check.
11341 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11342 [!PT_GETDSBT] (target_loadmap): New definition.
11343 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11344 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11345 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11346 and PT_GETDSBT to LINUX_LOADMAP.
11347 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11348 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11349
55329a5c 113502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11351
11352 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11353 (arm_linux_hwbp_cap): New static variable.
11354 (arm_linux_get_hwbp_cap): Replace by ...
11355 (arm_linux_init_hwbp_cap): ... this new function.
11356 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11357 (arm_linux_get_hw_watchpoint_count): Likewise.
11358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11359 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11360 (arm_prepare_to_resume): Use perror_with_name instead of error.
11361
55329a5c 113622011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11363
11364 * linux-arm-low.c: Include <signal.h>.
11365 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11366 (struct arm_linux_hwbp_cap): New data type.
11367 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11368 (struct arm_linux_hw_breakpoint): New data type.
11369 (MAX_BPTS, MAX_WPTS): Define.
11370 (struct arch_process_info, struct arch_lwp_info): New data types.
11371 (arm_linux_get_hwbp_cap): New function.
11372 (arm_linux_get_hw_breakpoint_count): Likewise.
11373 (arm_linux_get_hw_watchpoint_count): Likewise.
11374 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11375 (arm_hwbp_control_initialize): Likewise.
11376 (arm_hwbp_control_is_enabled): Likewise.
11377 (arm_hwbp_control_is_initialized): Likewise.
11378 (arm_hwbp_control_disable): Likewise.
11379 (arm_linux_hw_breakpoint_equal): Likewise.
11380 (arm_linux_hw_point_initialize): Likewise.
11381 (struct update_registers_data): New data structure.
11382 (update_registers_callback: New function.
11383 (arm_insert_point): Likewise.
11384 (arm_remove_point): Likewise.
11385 (arm_stopped_by_watchpoint): Likewise.
11386 (arm_stopped_data_address): Likewise.
11387 (arm_new_process): Likewise.
11388 (arm_new_thread): Likewise.
11389 (arm_prepare_to_resume): Likewise.
11390 (the_low_target): Register arm_insert_point, arm_remove_point,
11391 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11392 arm_new_thread, and arm_prepare_to_resume.
11393
6b9801d4
SS
113942011-09-15 Stan Shebs <stan@codesourcery.com>
11395
11396 * server.h (struct emit_ops): Add compare-goto fields.
11397 * tracepoint.c (gdb_agent_op_sizes): New table.
11398 (emit_eq_goto): New function.
11399 (emit_ne_goto): New function.
11400 (emit_lt_goto): New function.
11401 (emit_le_goto): New function.
11402 (emit_gt_goto): New function.
11403 (emit_ge_goto): New function.
11404 (is_goto_target): New function.
11405 (compile_bytecodes): Recognize special cases of compare-goto
11406 combinations and call specialized emitters for them.
11407 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11408 (amd64_emit_ne_goto): New function.
11409 (amd64_emit_lt_goto): New function.
11410 (amd64_emit_le_goto): New function.
11411 (amd64_emit_gt_goto): New function.
11412 (amd64_emit_ge_goto): New function.
11413 (amd64_emit_ops): Add the new functions.
11414 (i386_emit_eq_goto): New function.
11415 (i386_emit_ne_goto): New function.
11416 (i386_emit_lt_goto): New function.
11417 (i386_emit_le_goto): New function.
11418 (i386_emit_gt_goto): New function.
11419 (i386_emit_ge_goto): New function.
11420 (i386_emit_ops): Add the new functions.
11421
bf15cbda
SS
114222011-09-08 Stan Shebs <stan@codesourcery.com>
11423
11424 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11425 (i386_emit_epilogue): Restore %ebx.
11426
943ca1dd
JZ
114272011-08-31 Jie Zhang <jzhang918@gmail.com>
11428
11429 * server.c (step_thread): Remove definition.
11430 (process_serial_event): Don't handle Hs.
11431 * server.h (step_thread): Remove declaration.
11432 * target.c (set_desired_inferior): Remove use of step_thread.
11433
e3deef73
LM
114342011-08-24 Luis Machado <lgustavo@codesourcery.com>
11435
11436 * linux-low.c: Include linux-procfs.h.
11437 (linux_attach_lwp_1): Update comments.
11438 (linux_attach): Scan for existing threads when attaching to a
11439 process that is the tgid.
11440 * Makefile.in: Update dependencies.
11441
13da1c97
LM
114422011-08-24 Luis Machado <lgustavo@codesourcery.com>
11443
11444 * configure.srv: Add linux-procfs.o dependencies.
11445
881127c9
YQ
114462011-08-14 Yao Qi <yao@codesourcery.com>
11447
11448 * target.h (struct target_ops): Fix indent.
11449 * win32-low.c (win32_target_ops): Fix comment.
11450
58dbd541
YQ
114512011-08-14 Andrew Jenner <andrew@codesourcery.com>
11452 Yao Qi <yao@codesourcery.com>
11453
11454 * Makefile.in (clean): Remove tic6x-*.c files.
11455 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11456 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11457 (tic6x-c64xp-linux.c): Likewise.
11458 * configure.srv: Add support for tic6x-*-uclinux.
11459 * linux-tic6x-low.c: New.
11460 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11461
78d85199
YQ
114622011-08-14 Andrew Stubbs <ams@codesourcery.com>
11463 Yao Qi <yao@codesourcery.com>
11464
11465 * target.h (struct target_ops): Add read_loadmap.
11466 * linux-low.c (struct target_loadseg): New type.
11467 (struct target_loadmap): New type.
11468 (linux_read_loadmap): New function.
11469 (linux_target_ops): Add linux_read_loadmap.
11470 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11471 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11472 to NULL.
78d85199 11473
a959a88d
EZ
114742011-08-05 Eli Zaretskii <eliz@gnu.org>
11475
11476 * win32-low.c: Include <stdint.h>.
11477
1ced966e
PA
114782011-07-22 Pedro Alves <pedro@codesourcery.com>
11479
11480 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11481 to the inferior here.
11482 (i386_remove_aligned_watchpoint): Ditto.
11483 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11484 fit part of the watchpoint in the debug registers.
11485 (i386_update_inferior_debug_regs): New.
11486 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11487 registers, and only update the inferior on success.
11488 (i386_low_remove_watchpoint): Ditto.
11489
d26e3629
KY
114902011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11491
11492 * linux-low.c (compare_ints, unique, list_threads, show_process,
11493 linux_core_of_thread): Delete.
11494 (linux_target_ops): Change linux_core_of_thread to
11495 linux_common_core_of_thread.
11496 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11497 * utils.c (malloc_failure): Change type of argument.
11498 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11499 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11500 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11501 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11502 (IPA_OBJS): Add common-utils-ipa.o.
11503 (ptid_h, linux_osdata_h): New macros.
11504 (server_h): Add common/common-utils.h, common/xml-utils.h,
11505 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11506 common/ptid.h.
11507 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11508 ptid.o, buffer.o): New rules.
11509 (linux-low.o): Add common/linux-osdata.h as a dependency.
11510 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11511 * configure.ac: Add AC_HEADER_DIRENT check.
11512 * config.in: Regenerate.
11513 * configure: Regenerate.
11514 * remote-utils.c (xml_escape_text): Delete.
11515 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11516 buffer_xml_printf): Move to common/buffer.c.
11517 * server.c (main): Remove call to initialize_inferiors.
11518 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11519 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11520 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11521 internal_error, gdb_assert, gdb_assert_fail): Delete.
11522 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11523 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11524 common/buffer.h.
11525 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11526 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11527 initialize_inferiors): Delete.
11528
2275a1a7
PA
115292011-07-20 Pedro Alves <pedro@codesourcery.com>
11530
11531 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11532 symbol error.
11533
0a5b1e09
PA
115342011-05-31 Pedro Alves <pedro@codesourcery.com>
11535
11536 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11537 assertion.
11538 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11539
6938fd34
YQ
115402011-05-26 Yao Qi <yao@codesourcery.com>
11541
11542 * Makefile.in (thread-db.o): Track dependence to
11543 common/gdb_thread_db.h.
11544 * thread-db.c: include gdb_thread_db.h from right place.
11545
b481f9e0
TT
115462011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11547
11548 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11549 __FILE__ and __LINE__ to internal_error.
11550
98a5dd13
DE
115512011-05-13 Doug Evans <dje@google.com>
11552
11553 * thread-db.c (try_thread_db_load_from_sdir): New function.
11554 (try_thread_db_load_from_dir): New function.
11555 (thread_db_load_search): Handle $sdir, ignore $pdir.
11556 Remove trying of system directories if search of
11557 libthread-db-search-path fails, that is now done via $sdir.
11558
d248b706
KY
115592011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11560
11561 * server.c (handle_query): Add EnableDisableTracepoints to the list
11562 of supported features.
43aaf8b6 11563 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11564 tracepoints.
43aaf8b6
PA
11565 (cmd_qtenable_disable): New.
11566 (cmd_qtstart): Install tracepoints even if disabled.
11567 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11568 receiving a QTEnable or QTDisable packet.
11569 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11570 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11571 tracepoints.
11572 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11573
84e578fb
DE
115742011-05-10 Doug Evans <dje@google.com>
11575
11576 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11577
71f55dd8
DE
115782011-05-04 Doug Evans <dje@google.com>
11579
11580 * linux-low.c (linux_join): Skip process lookup.
11581 * spu-low.c (spu_join): Ditto.
11582 * server.c (join_inferiors_callback): Delete.
11583 (process_serial_event): For 'D' packet (detach) call join_inferior
11584 directly.
11585
4d393d60
JM
115862011-05-04 Joseph Myers <joseph@codesourcery.com>
11587
11588 * README: Don't mention xscale*-*-linux*.
11589 * configure.srv (xscale*-*-linux*): Don't handle target.
11590
b00ad6ff
NF
115912011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11592
11593 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11594 casting pointers.
11595 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11596 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11597 (i386_emit_void_call_2): Likewise.
11598
af96c192
YQ
115992011-04-26 Yao Qi <yao@codesourcery.com>
11600
43aaf8b6
PA
11601 * linux-low.c: Move common macros to linux-ptrace.h.
11602 Include linux-ptrace.h.
af96c192
YQ
11603 * Makefile.in (linux_ptrace_h): New.
11604 (linux-low.o): Depends on linux-ptrace.h.
11605
03f2bd59
JK
116062011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11607
11608 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11609 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11610 (remote_prepare): New function with most of the TCP code from ...
11611 (remote_open): ... here. Detect PORT here unconditionally. Move also
11612 setting transport_is_reliable.
11613 * server.c (run_once): New variable.
11614 (gdbserver_usage): Document it.
11615 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11616 the first run if RUN_ONCE.
11617 * server.h (run_once, remote_prepare): New declarations.
11618
7a9dd1b2
TT
116192011-04-19 Tom Tromey <tromey@redhat.com>
11620
11621 * win32-low.c (handle_load_dll): Remove duplicate "the".
11622
81239425
PM
116232011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11624
11625 Remove support for old Cygwin 1.5 versions.
11626 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11627 function to avoid warning.
11628 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11629 warning.
11630
9e0627f1
PM
116312011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11632
11633 * gdbserver/server.h (Macro _): Define it if not available.
11634
588eebee
MS
116352011-03-14 Michael Snyder <msnyder@vmware.com>
11636
348af9f7 11637 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11638
43f70d4c
JB
116392011-03-10 Joel Brobecker <brobecker@adacore.com>
11640
11641 * Makefile.in (maintainer-clean realclean distclean): Remove
11642 "make ... subdir_do" command.
11643
348af9f7
MS
116442011-03-10 Michael Snyder <msnyder@vmware.com>
11645
11646 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11647
11648 * server.c (handle_v_run): Free alloced buffer on early return.
11649
e637a4f5
YQ
116502011-03-09 Yao Qi <yao@codesourcery.com>
11651
11652 Revert:
11653 2011-03-04 Yao Qi <yao@codesourcery.com>
11654
11655 * Makefile.in: Remove GNU make feature --directory.
11656
11657 2011-03-05 Yao Qi <yao@codesourcery.com>
11658
11659 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11660 (subdir_do): New make target. Copied from gdb/Makefile.
11661 (maintainer-clean, realclean, distclean, clean): Call corresponding
11662 make targets in common/Makefile.
11663
11664 2011-02-11 Yao Qi <yao@codesourcery.com>
11665
11666 * configure.ac: Call AC_PROG_RANLIB.
11667 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11668 * configure: Regenerate.
11669
e6edda56
JK
116702011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11671
11672 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11673
e5141119
JB
116742011-03-06 Yao Qi <yao@codesourcery.com>
11675
11676 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11677
64794aa4
JB
116782011-03-05 Yao Qi <yao@codesourcery.com>
11679
11680 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11681 (subdir_do): New make target. Copied from gdb/Makefile.
11682 (maintainer-clean, realclean, distclean, clean): Call corresponding
11683 make targets in common/Makefile.
11684
7a762829
YQ
116852011-03-04 Yao Qi <yao@codesourcery.com>
11686
11687 * Makefile.in: Remove GNU make feature --directory.
11688
348af9f7
MS
116892011-03-04 Michael Snyder <msnyder@vmware.com>
11690
11691 * server.c (queue_stop_reply): Call xmalloc not malloc.
11692
116932011-03-02 Michael Snyder <msnyder@vmware.com>
11694
11695 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11696
9f72fee2
MS
116972011-02-28 Michael Snyder <msnyder@vmware.com>
11698
588eebee
MS
11699 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11700 (cmd_qtframe): Ditto.
11701 (cmd_qtbuffer): Ditto.
11702 (cmd_bigqtbuffer): Ditto.
11703
9f72fee2
MS
11704 * utils.c (decimal2str): Initialize 'width' to nine, then
11705 don't mess with it.
11706
8040bd49
UW
117072011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11708
11709 * hostio.c (require_data): Free *data, not data.
11710
7e52cbd0
JK
117112011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11712
11713 * hostio.c (require_data): Use free, not xfree.
11714
9130f83e
MS
117152011-02-27 Michael Snyder <msnyder@vmware.com>
11716
4b812f4e
MS
11717 * server.c (handle_query): Discard unused value.
11718
9130f83e
MS
11719 * hostio.c (require_data): Free malloc memory before returning
11720 error.
11721
69d37113
MS
117222011-02-26 Michael Snyder <msnyder@vmware.com>
11723
11724 * linux-low.c (list_threads): Call closedir for dirent.
11725
35f5825a
MS
117262011-02-27 Michael Snyder <msnyder@vmware.com>
11727
2a589cef
MS
11728 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11729 a case statement falls through.
11730
0adea5f7
MS
11731 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11732
35f5825a
MS
11733 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11734 in comparison.
11735
238f1c74
MS
117362011-02-26 Michael Snyder <msnyder@vmware.com>
11737
11738 * utils.c (decimal2str): Eliminate dead code and dead param.
11739 (pulongest): Drop dead param from call to decimal2str.
11740 (plongest): Ditto.
11741
633ff500
JB
117422011-02-24 Joel Brobecker <brobecker@adacore.com>
11743
11744 Revert the following patch (not approved yet):
11745 2011-02-21 Hui Zhu <teawater@gmail.com>
11746 * tracepoint.c (tp_printf): New function.
11747 (eval_agent_expr): Handle gdb_agent_op_printf.
11748
f9c6ff72
HZ
117492011-02-21 Hui Zhu <teawater@gmail.com>
11750
11751 * tracepoint.c (tp_printf): New function.
11752 (eval_agent_expr): Handle gdb_agent_op_printf.
11753
94d5e490
TT
117542011-02-18 Tom Tromey <tromey@redhat.com>
11755
11756 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11757 (tracepoint.o): Likewise.
11758 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11759 (gdb_agent_op_names): Likewise.
11760
c7f96d2b
TT
117612011-02-18 Tom Tromey <tromey@redhat.com>
11762
11763 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11764 gdb_agent_op_rot>: New constants.
11765 (gdb_agent_op_names): Add pick and roll.
11766 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11767 cases.
11768
0feedb2c
JK
117692011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11770
11771 * aclocal.m4: Regenerated with aclocal-1.11.1.
11772
b3b9301e
PA
117732011-02-14 Pedro Alves <pedro@codesourcery.com>
11774
11775 * server.c (handle_qxfer_traceframe_info): New.
11776 (qxfer_packets): Register "traceframe-info".
11777 (handle_query): Report support for qXfer:traceframe-info:read+.
11778 * tracepoint.c (match_blocktype): New.
11779 (traceframe_find_block_type): Rename to ...
11780 (traceframe_walk_blocks): ... this. Add callback filter argument,
11781 and use it.
11782 (traceframe_find_block_type): New, reimplemented on top of
11783 traceframe_walk_blocks.
11784 (build_traceframe_info_xml): New.
11785 (traceframe_read_info): New.
11786 * server.h (traceframe_read_info): Declare.
11787
4f3e6fb7
YQ
117882011-02-11 Yao Qi <yao@codesourcery.com>
11789
11790 * configure.ac: Call AC_PROG_RANLIB.
11791 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11792 * configure: Regenerate.
11793
764880b7
PA
117942011-02-07 Pedro Alves <pedro@codesourcery.com>
11795
11796 * server.c (gdb_read_memory): Change return semantics to allow
11797 partial transfers.
11798 (handle_search_memory_1): Adjust.
11799 (process_serial_event) <'m' packet>: Handle partial transfers.
11800 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11801
1c79eb8a
PA
118022011-01-28 Pedro Alves <pedro@codesourcery.com>
11803
11804 * regcache.c (init_register_cache): Initialize
11805 regcache->register_status.
11806 (free_register_cache): Release regcache->register_status.
11807 (regcache_cpy): Copy register_status.
11808 (registers_to_string): Print 'x's for unavailable registers.
11809 (supply_register): Mark the register's status valid or
11810 unavailable, depending on whether a buffer was passed in or not.
11811 (supply_register_zeroed): New.
11812 (supply_regblock): Mark the registers' status valid or
11813 unavailable, depending on whether a buffer was passed in or not.
11814 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11815 (struct regcache): New `register_status' field.
11816 (supply_register_zeroed): Declare.
11817 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11818 supply_register_zeroed, rather than passing a NULL buffer to
11819 supply_register.
11820 * tracepoint.c (fetch_traceframe_registers): Update comment.
11821
85724a0e
PA
118222011-01-28 Pedro Alves <pedro@codesourcery.com>
11823
11824 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11825 buffer explicit.
11826
d08aafef
PA
118272011-01-25 Pedro Alves <pedro@codesourcery.com>
11828
11829 * server.h (decode_xfer_write): Change prototype.
11830 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11831 and don't extract the annex here.
11832 * server.c (decode_xfer_read): Remove `annex' parameter,
11833 and don't extract the annex here.
11834 (decode_xfer): New.
11835 (struct qxfer): New.
11836 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11837 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11838 (handle_qxfer_statictrace): New functions, abstracted out from
11839 handle_query, and made to use the struct qxfer interface.
11840 (handle_threads_qxfer_proper): Rename to ...
11841 (handle_qxfer_threads_proper): ... this.
11842 (handle_threads_qxfer): Rename to ...
11843 (handle_qxfer_threads): ... this. Adjust.
11844 (qxfer_packets): New array.
11845 (handle_qxfer): New function.
11846 (handle_query): Use handle_qxfer.
11847
493e2a69
MS
118482011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11849
11850 * gdbreplay.c: Shorten lines of >= 80 columns.
11851 * linux-low.c: Ditto.
11852 * linux-ppc-low.c: Ditto.
11853 * linux-s390-low.c: Ditto.
11854 * linux-sparc-low.c: Ditto.
11855 * linux-x86-low.c: Ditto.
11856 * linux-xtensa-low.c: Ditto.
11857 * mem-break.c: Ditto.
11858 * nto-low.c: Ditto.
11859 * regcache.h: Ditto.
11860 * remote-utils.c: Ditto.
11861 * server.c: Ditto.
11862 * server.h: Ditto.
11863 * thread-db.c: Ditto.
11864 * tracepoint.c: Ditto.
11865 * utils.c: Ditto.
11866 * win32-low.h: Ditto.
11867
44944448
JB
118682011-01-05 Joel Brobecker <brobecker@adacore.com>
11869
11870 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11871 update.
11872
71ce852c
JB
118732011-01-01 Joel Brobecker <brobecker@adacore.com>
11874
11875 * server.c (gdbserver_version): Update copyright year in version
11876 output.
11877 * gdbreplay.c (gdbreplay_version): Ditto.
11878
eb826dc6
MF
118792010-12-29 Jie Zhang <jie.zhang@analog.com>
11880
11881 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11882 * linux-bfin-low.c: New file.
11883 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11884 PT_DATA_ADDR for BFIN targets.
11885 * Makefile.in (SFILES): Add linux-bfin-low.c.
11886 (clean): Remove reg-bfin.c.
11887 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11888 * README: Mention supported Blackfin targets.
11889
39ab222a
MF
118902010-12-23 Mike Frysinger <vapier@gentoo.org>
11891
11892 * .gitignore: New file.
11893
a1f2ce7d
MF
118942010-11-16 Mike Frysinger <vapier@gentoo.org>
11895
11896 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11897
f474844c
JZ
118982010-10-22 Jie Zhang <jie@codesourcery.com>
11899
11900 * Makefile.in: Add FLAGS_TO_PASS variable.
11901 (install): Remove dependency of install-only and recursively
11902 invoke make for install-only.
11903
f1048712
DE
119042010-10-04 Doug Evans <dje@google.com>
11905
11906 * Makefile.in (uninstall): Use $(DESTDIR).
11907
b53a1623
PA
119082010-09-24 Pedro Alves <pedro@codesourcery.com>
11909
e6ee044d
PA
11910 PR gdb/11842
11911
b53a1623
PA
11912 * linux-x86-low.c (compat_siginfo_from_siginfo)
11913 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11914 si_code is < 0. Check for si_code == SI_TIMER before checking for
11915 si_code < 0.
11916
fa1bd1e4
JB
119172010-09-13 Joel Brobecker <brobecker@adacore.com>
11918
11919 * lynx-i386-low.c: New file.
11920 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11921
47fac8f8
JB
119222010-09-13 Joel Brobecker <brobecker@adacore.com>
11923
11924 * lynx-low.c (ptrace_request_to_str): Remove handling for
11925 request values that have been removed in LynxOS 5.x.
11926
1adfc54d
JB
119272010-09-13 Joel Brobecker <brobecker@adacore.com>
11928
11929 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11930 <ptrace.h>
11931
c2a66c29
NS
119322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11933
11934 * configure.ac: Add --enable-inprocess-agent option.
11935 * configure: Rebuilt.
11936
32fcada3
YQ
119372010-09-06 Yao Qi <yao@codesourcery.com>
11938
11939 * linux-low.c (linux_kill): Remove unused variable.
11940 (linux_stabilize_threads): Likewise.
11941 * server.c (start_inferior): Likewise.
11942 (queue_stop_reply_callback): Likewise.
11943 * tracepoint.c (do_action_at_tracepoint): Likewise.
11944
0cccb683
YQ
119452010-09-06 Yao Qi <yao@codesourcery.com>
11946
11947 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11948 on return.
11949
423ec54c
JK
119502010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11951
11952 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11953
12ac6819
PA
119542010-09-06 Pedro Alves <pedro@codesourcery.com>
11955
11956 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11957 "$(IPA_DEPFILES)".
11958
8ed54b31
JB
119592010-09-01 Joel Brobecker <brobecker@adacore.com>
11960
11961 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11962 gdbserver/lynx-ppc-low.c: New files.
11963 * Makefile.in (lynx_low_h): New variable.
11964 (lynx-low.o, lynx-ppc-low.o): New rules.
11965 * configure.ac: On LynxOS, link with -lnetinet.
11966 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11967 * configure: regenerate.
11968
bb0116a4
JB
119692010-09-01 Joel Brobecker <brobecker@adacore.com>
11970
11971 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11972 * configure.ac: Add check for vasprintf and vsnprintf.
11973 * configure, config.in: Regenerate.
11974 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11975
a778ab81 119762010-09-01 Joel Brobecker <brobecker@adacore.com>
11977
11978 * gdbreplay.c: Move include of alloca.h up, next to include of
11979 malloc.h.
11980 * server.h: Add include of malloc.h.
11981 * mem-break.c: Remove include of malloc.h.
11982 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11983
8b034a19 119842010-09-01 Joel Brobecker <brobecker@adacore.com>
11985
11986 * Makefile.in (memmem.o): Build with -Wno-error.
11987
119882010-09-01 Joel Brobecker <brobecker@adacore.com>
11989
11990 * utils.c (xsnprintf): Make non-static.
11991 * server.h: Add xsnprintf declaration.
11992 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11993 replace calls to snprintf by calls to xsnprintf throughout.
11994
119952010-09-01 Joel Brobecker <brobecker@adacore.com>
11996
11997 * configure.ac: Add configure check for alloca.
11998 * configure, config.in: Regenerate.
11999 * server.h: Include alloca.h if it exists.
12000 * gdbreplay.c: Include alloca.h if it exists.
12001
1a981360
PA
120022010-08-28 Pedro Alves <pedro@codesourcery.com>
12003
12004 * linux-low.c (__SIGRTMIN): Define if not already defined.
12005 (linux_create_inferior): Check for __ANDROID__ rather than
12006 __SIGRTMIN.
12007 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12008 are already deferred.
12009 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12010 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12011 stopped and already has a pending signal to report.
12012 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12013 a pending signal to report or is moving out of a jump pad.
12014 (linux_init_signals): Check for __ANDROID__ rather than
12015 __SIGRTMIN.
12016
b4d51a55
PA
120172010-08-28 Pedro Alves <pedro@codesourcery.com>
12018
12019 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12020 debug_threads check. Avoid a linear search when not doing debug
12021 output.
12022
ec48365d
PA
120232010-08-27 Pedro Alves <pedro@codesourcery.com>
12024
12025 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12026 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12027 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12028 (process_event): Change local fd's type to gdb_fildes_t.
12029 (create_file_handler): Adjust prototype.
12030 (delete_file_handler): Adjust prototype.
12031 (handle_file_event): Adjust prototype. Use pfildes.
12032 (create_file_event): Adjsut prototype.
12033 * remote-utils.c (remote_desc, listen_desc): Change type to
12034 gdb_fildes_t.
12035 * server.h: New gdb_fildes_t typedef.
12036 [USE_WIN32API]: Include winsock2.h.
12037 (delete_file_handler, add_file_handler): Adjust prototypes.
12038 (pfildes): Declare.
12039 * utils.c (pfildes): New.
12040
854d88f0
PA
120412010-08-27 Pedro Alves <pedro@codesourcery.com>
12042
12043 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12044 * configure: Regenerate.
12045
0146f85b
PA
120462010-08-27 Pedro Alves <pedro@codesourcery.com>
12047
12048 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12049 (linux_done_accessing_memory): ... this.
12050 (linux_target_ops): Adjust.
12051 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12052 * nto-low.c (nto_target_ops): Adjust comment.
12053 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12054 * spu-low.c (spu_target_ops): Adjust comment.
12055 * target.h (target_ops): Rename unprepare_to_access_memory field
12056 to done_accessing_memory.
12057 (unprepare_to_access_memory): Rename to ...
12058 (done_accessing_memory): ... this.
12059
90d74c30
PA
120602010-08-26 Pedro Alves <pedro@codesourcery.com>
12061
12062 * linux-low.c (linux_prepare_to_access_memory): New.
12063 (linux_unprepare_to_access_memory): New.
12064 (linux_target_ops): Install them.
12065 * server.c (read_memory): Rename to ...
12066 (gdb_read_memory): ... this. Use
12067 prepare_to_access_memory/prepare_to_access_memory.
12068 (write_memory): Rename to ...
12069 (gdb_write_memory): ... this. Use
12070 prepare_to_access_memory/prepare_to_access_memory.
12071 (handle_search_memory_1): Adjust.
12072 (process_serial_event): Adjust.
12073 * target.h (struct target_ops): New fields
12074 prepare_to_access_memory and unprepare_to_access_memory.
12075 (prepare_to_access_memory, unprepare_to_access_memory): New.
12076 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12077 prepare_to_access_memory/prepare_to_access_memory.
12078 * nto-low.c (nto_target_ops): Adjust.
12079 * spu-low.c (spu_target_ops): Adjust.
12080 * win32-low.c (win32_target_ops): Adjust.
12081
fd467969
PA
120822010-08-26 Pedro Alves <pedro@codesourcery.com>
12083
12084 * Makefile.in (WARN_CFLAGS): Get it from configure.
12085 (WERROR_CFLAGS): New.
12086 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12087 * configure.ac: Introduce --enable-werror, which adds -Werror to
12088 the compiler command line. Enabled by default. Disable with
12089 --disable-werror. Add -Wdeclaration-after-statement
12090 Wpointer-arith and -Wformat-nonliteral to warning flags.
12091 * configure: Regenerate.
12092
331e2f5f
PA
120932010-08-26 Pedro Alves <pedro@codesourcery.com>
12094
12095 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12096
e581f2b4
PA
120972010-08-26 Pedro Alves <pedro@codesourcery.com>
12098
12099 * gdbreplay.c (remote_error): New.
12100 (gdbchar): New.
12101 (expect): Use gdbchar. Check for error reading from GDB.
12102 Clarify sync error output.
12103 (play): Check for errors writing to GDB.
12104 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12105 * remote-utils.c (getpkt): Check for errors writing to the remote
12106 descriptor.
12107
3c11dd79
PA
121082010-08-25 Pedro Alves <pedro@codesourcery.com>
12109
12110 * linux-low.c (linux_wait_1): Move non-debugging code out of
12111 `debug_threads' control.
12112
d20a8ad9
PA
121132010-08-25 Pedro Alves <pedro@codesourcery.com>
12114
12115 * linux-low.c (linux_wait_1): Don't set last_status here.
12116 * server.c (push_event, queue_stop_reply_callback): Assert we're
12117 not pushing a TARGET_WAITKIND_IGNORE event.
12118 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12119 (myresume, handle_target_event): Set the thread's last_resume_kind
12120 and last_status from the target returned status.
12121
964e4306
PA
121222010-08-25 Pedro Alves <pedro@codesourcery.com>
12123
12124 PR threads/10729
12125
12126 * linux-x86-low.c (update_debug_registers_callback): New.
12127 (i386_dr_low_set_addr): Use it.
12128 (i386_dr_low_get_addr): New.
12129 (i386_dr_low_set_control): Use update_debug_registers_callback.
12130 (i386_dr_low_get_control): New.
12131 (i386_dr_low_get_status): Adjust.
12132 * linux-low.c (linux_stop_lwp): New.
12133 * linux-low.h (linux_stop_lwp): Declare.
12134
12135 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12136 argument instead of a i386_debug_reg_state.
12137 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12138 a i386_debug_reg_state.
12139 (i386_insert_aligned_watchpoint): Adjust.
12140 (i386_remove_aligned_watchpoint): Adjust.
12141 (i386_low_stopped_data_address): Read the debug registers from the
12142 inferior instead of from the mirrors.
12143 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12144 (i386_dr_low_get_addr): Declare.
12145 (i386_dr_low_get_control): Declare.
12146 (i386_dr_low_get_status): Change prototype.
12147
12148 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12149 (i386_dr_low_get_addr): New.
12150 (i386_dr_low_get_control): New.
12151 (i386_dr_low_get_status): Adjust prototype. Return
12152 dr_status_mirror.
12153 (i386_initial_stuff): Clear dr_status_mirror and
12154 dr_control_mirror.
12155 (i386_get_thread_context): Adjust.
12156 (i386_set_thread_context): Adjust.
12157 (i386_thread_added): Adjust.
12158
5f21a75b
PA
121592010-08-24 Pedro Alves <pedro@codesourcery.com>
12160
12161 * linux-low.h (linux_thread_area): Delete declaration.
12162
3e4c1235
TS
121632010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12164
12165 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12166 after its termination.
12167
1971b033
PA
121682010-08-09 Pedro Alves <pedro@codesourcery.com>
12169
12170 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12171 (gdb_wants_all_stopped): Delete.
12172 (linux_wait_1): Don't call them.
12173 * server.c (handle_v_cont): Tag all threads as want-stopped.
12174 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12175 stopped as "client-wants-stopped".
12176
310444ac
PA
121772010-07-31 Pedro Alves <pedro@codesourcery.com>
12178
12179 * Makefile.in (signals_h): New.
12180 (server_h): Depend on it.
12181 (server.o): Don't depend on $(signals_def).
12182 (signals.o): Depend on $(signals_def).
12183
a19cae16
JK
121842010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12185
12186 * Makefile.in (signals_def): New.
12187 (server_h): Append include/gdb/signals.h and signals_def.
12188 (server.o): Append signals_def.
12189
30d50328
JK
121902010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12191
12192 * server.c (handle_target_event): Use target_signal_to_host for
12193 resume_info.sig initialization.
12194 * target.h (struct thread_resume) <sig>: New comment.
12195
5c3216e2
OS
121962010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12197
c6f46ca0
OS
12198 * server.c (handle_query): strcpy() the returned string from paddress()
12199 instead of sprintf().
5c3216e2
OS
12200 * utils.c (paddress): Return phex_nz().
12201
6bd31874
JB
122022010-07-07 Joel Brobecker <brobecker@adacore.com>
12203
12204 * server.c (handle_v_cont): Call mourn_inferior if process
12205 just exited.
12206 (myresume): Likewise.
12207
0fb4aa4b
PA
122082010-07-01 Pedro Alves <pedro@codesourcery.com>
12209
12210 Static tracepoints, and integration with UST.
12211
12212 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12213 * mem-break.c (uninsert_all_breakpoints)
12214 (reinsert_all_breakpoints): New.
12215 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12216 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12217 (gdb_agent_ust_loaded, helper_thread_id)
12218 (gdb_agent_helper_thread_id): New macros.
12219 (struct ipa_sym_addresses): Add addr_ust_loaded,
12220 addr_helper_thread_id, addr_cmd_buf.
12221 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12222 (in_process_agent_loaded_ust): New.
12223 (write_e_ust_not_loaded): New.
12224 (maybe_write_ipa_ust_not_loaded): New.
12225 (struct collect_static_trace_data_action): New.
12226 (enum tracepoint_type) <static_tracepoint>: New.
12227 (struct tracepoint) <handle>: Mention static tracepoints.
12228 (struct static_tracepoint_ctx): New.
12229 (CMD_BUF_SIZE): New.
12230 (add_tracepoint_action): Handle static tracepoint actions.
12231 (unprobe_marker_at): New.
12232 (clear_installed_tracepoints): Handle static tracepoints.
12233 (cmd_qtdp): Handle static tracepoints.
12234 (probe_marker_at): New.
12235 (cmd_qtstart): Handle static tracepoints.
12236 (response_tracepoint): Handle static tracepoints.
12237 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12238 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12239 (get_context_regcache): Handle static tracepoints.
12240 (do_action_at_tracepoint): Handle static tracepoint actions.
12241 (traceframe_find_block_type): Handle static trace data blocks.
12242 (traceframe_read_sdata): New.
12243 (download_tracepoints): Download static tracepoint actions.
12244 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12245 (GDB_PROBE_NAME): New.
12246 (ust_ops): New.
12247 (GET_UST_SYM): New.
12248 (USTF): New.
12249 (dlsym_ust): New.
12250 (ust_marker_to_static_tracepoint): New.
12251 (gdb_probe): New.
12252 (collect_ust_data_at_tracepoint): New.
12253 (gdb_ust_probe): New.
12254 (UNIX_PATH_MAX, SOCK_DIR): New.
12255 (gdb_ust_connect_sync_socket): New.
12256 (resume_thread, stop_thread): New.
12257 (run_inferior_command): New.
12258 (init_named_socket): New.
12259 (gdb_ust_socket_init): New.
12260 (cstr_to_hexstr): New.
12261 (next_st): New.
12262 (first_marker, next_marker): New.
12263 (response_ust_marker): New.
12264 (cmd_qtfstm, cmd_qtsstm): New.
12265 (unprobe_marker_at, probe_marker_at): New.
12266 (cmd_qtstmat, gdb_ust_thread): New.
12267 (gdb_ust_init): New.
12268 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12269 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12270 (ST_REGENTRY): New.
12271 (x86_64_st_collect_regmap): New.
12272 (X86_64_NUM_ST_COLLECT_GREGS): New.
12273 (AMD64_RIP_REGNUM): New.
12274 (supply_static_tracepoint_registers): New.
12275 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12276 (ST_REGENTRY): New.
12277 (i386_st_collect_regmap): New.
12278 (i386_NUM_ST_COLLECT_GREGS): New.
12279 (supply_static_tracepoint_registers): New.
12280 * server.c (handle_query): Handle qXfer:statictrace:read.
12281 <qSupported>: Report support for StaticTracepoints, and
12282 qXfer:statictrace:read features.
12283 * server.h (traceframe_read_sdata)
12284 (supply_static_tracepoint_registers): Declare.
12285 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12286 (unpack_varlen_hex): Include in IPA build.
12287 * Makefile.in (ustlibs, ustinc): New.
12288 (IPA_OBJS): Add remote-utils-ipa.o.
12289 ($(IPA_LIB)): Link -ldl and -lpthread.
12290 (UST_CFLAGS): New.
12291 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12292 * config.in, configure: Regenerate.
12293
9e4344e5
PA
122942010-06-20 Ian Lance Taylor <iant@google.com>
12295 Pedro Alves <pedro@codesourcery.com>
12296
12297 * linux-x86-low.c (always_true): Delete.
12298 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12299 trying to fool the compiler with always_true.
12300
c6beb2cb
PA
123012010-06-20 Pedro Alves <pedro@codesourcery.com>
12302
12303 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12304 conditions in gdbserver.
12305
d2ed6730
UW
123062010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12307
12308 * spu-low.c (spu_read_memory): Wrap around local store limit.
12309 (spu_write_memory): Likewise.
12310
4e29fb54
PA
123112010-06-15 Pedro Alves <pedro@codesourcery.com>
12312
12313 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12314 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12315 LONGEST uses.
12316 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12317 uses.
12318 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12319 uses with LONGEST uses.
12320
6a271cae
PA
123212010-06-14 Stan Shebs <stan@codesourcery.com>
12322 Pedro Alves <pedro@codesourcery.com>
12323
12324 Bytecode compiler.
12325
12326 * linux-x86-low.c: Include limits.h.
12327 (add_insns): New.
12328 (always_true): New.
12329 (EMIT_ASM): New.
12330 (EMIT_ASM32): New.
12331 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12332 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12333 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12334 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12335 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12336 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12337 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12338 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12339 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12340 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12341 (amd64_emit_void_call_2): New.
12342 (amd64_emit_ops): New.
12343 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12344 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12345 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12346 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12347 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12348 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12349 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12350 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12351 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12352 (i386_emit_stack_adjust, i386_emit_int_call_1)
12353 (i386_emit_void_call_2): New.
12354 (i386_emit_ops): New.
12355 (x86_emit_ops): New.
12356 (the_low_target): Install x86_emit_ops.
12357 * server.h (struct emit_ops): New.
12358 (get_raw_reg_func_addr): Declare.
12359 (current_insn_ptr, emit_error): Declare.
12360 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12361 (set_trace_state_variable_value): New defines.
12362 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12363 addr_get_trace_state_variable_value and
12364 addr_set_trace_state_variable_value.
12365 (symbol_list): New fields for get_raw_reg,
12366 get_trace_state_variable_value and set_trace_state_variable_value.
12367 (condfn): New typedef.
12368 (struct tracepoint): New field `compiled_cond'.
12369 (do_action_at_tracepoint): Clear compiled_cond.
12370 (get_trace_state_variable_value, set_trace_state_variable_value):
12371 Export in the IPA.
12372 (condition_true_at_tracepoint): If there's a compiled condition,
12373 run that.
12374 (current_insn_ptr, emit_error): New globals.
12375 (struct bytecode_address): New.
12376 (get_raw_reg_func_addr): New.
12377 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12378 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12379 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12380 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12381 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12382 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12383 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12384 (compile_tracepoint_condition, compile_bytecodes): New.
12385 * target.h (emit_ops): Forward declare.
12386 (struct target_ops): New field emit_ops.
12387 (target_emit_ops): New.
12388 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12389 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12390 * linux-low.c (linux_emit_ops): New.
12391 (linux_target_ops): Install it.
12392 * linux-low.h (struct linux_target_ops): New field emit_ops.
12393
92b72907
UW
123942010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12395
12396 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12397 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12398
fa593d66
PA
123992010-06-01 Pedro Alves <pedro@codesourcery.com>
12400 Stan Shebs <stan@codesourcery.com>
12401
12402 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12403 (all): Depend on $(extra_libraries).
12404 (install-only): Install the IPA.
12405 (IPA_OBJS, IPA_LIB): New.
12406 (clean): Remove the IPA lib.
12407 (IPAGENT_CFLAGS): New.
12408 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12409 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12410 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12411 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12412 * configure.ac: Check for atomic builtins support in the compiler.
12413 (IPA_DEPFILES, extra_libraries): Define.
12414 * configure.srv (ipa_obj): Add description.
12415 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12416 (i[34567]86-*-linux*): Set ipa_obj.
12417 (x86_64-*-linux*): Set ipa_obj.
12418 * linux-low.c (stabilizing_threads): New.
12419 (supports_fast_tracepoints): New.
12420 (linux_detach): Stabilize threads before detaching.
12421 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12422 the lwp is either not stabilizing, or is moving out of a jump pad.
12423 (linux_fast_tracepoint_collecting): New.
12424 (maybe_move_out_of_jump_pad): New.
12425 (enqueue_one_deferred_signal): New.
12426 (dequeue_one_deferred_signal): New.
12427 (linux_wait_for_event_1): If moving out of a jump pad, defer
12428 pending signals to later.
12429 (linux_stabilize_threads): New.
12430 (linux_wait_1): Check if threads need moving out of jump pads, and
12431 do it if so.
12432 (stuck_in_jump_pad_callback): New.
12433 (move_out_of_jump_pad_callback): New.
12434 (lwp_running): New.
12435 (linux_resume_one_lwp): Handle moving out of jump pads.
12436 (linux_set_resume_request): Dequeue deferred signals.
12437 (need_step_over_p): Also step over fast tracepoint jumps.
12438 (start_step_over): Also uninsert fast tracepoint jumps.
12439 (finish_step_over): Also reinsert fast tracepoint jumps.
12440 (linux_install_fast_tracepoint_jump): New.
12441 (linux_target_ops): Install linux_stabilize_threads and
12442 linux_install_fast_tracepoint_jump_pad.
12443 * linux-low.h (linux_target_ops) <get_thread_area,
12444 install_fast_tracepoint_jump_pad>: New fields.
12445 (struct lwp_info) <collecting_fast_tracepoint,
12446 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12447 (linux_get_thread_area): Declare.
12448 * linux-x86-low.c (jump_insn): New.
12449 (x86_get_thread_area): New.
12450 (append_insns): New.
12451 (push_opcode): New.
12452 (amd64_install_fast_tracepoint_jump_pad): New.
12453 (i386_install_fast_tracepoint_jump_pad): New.
12454 (x86_install_fast_tracepoint_jump_pad): New.
12455 (the_low_target): Install x86_get_thread_area and
12456 x86_install_fast_tracepoint_jump_pad.
12457 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12458 (struct fast_tracepoint_jump): New.
12459 (fast_tracepoint_jump_insn): New.
12460 (fast_tracepoint_jump_shadow): New.
12461 (find_fast_tracepoint_jump_at): New.
12462 (fast_tracepoint_jump_here): New.
12463 (delete_fast_tracepoint_jump): New.
12464 (set_fast_tracepoint_jump): New.
12465 (uninsert_fast_tracepoint_jumps_at): New.
12466 (reinsert_fast_tracepoint_jumps_at): New.
12467 (set_breakpoint_at): Use write_inferior_memory.
12468 (uninsert_raw_breakpoint): Use write_inferior_memory.
12469 (check_mem_read): Mask out fast tracepoint jumps.
12470 (check_mem_write): Mask out fast tracepoint jumps.
12471 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12472 (set_fast_tracepoint_jump): Declare.
12473 (delete_fast_tracepoint_jump)
12474 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12475 (reinsert_fast_tracepoint_jumps_at): Declare.
12476 * regcache.c: Don't compile many functions when building the
12477 in-process agent library.
12478 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12479 the register buffer in the heap.
12480 (free_register_cache): If the register buffer isn't owned by the
12481 regcache, don't free it.
12482 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12483 pre-existing register caches.
12484 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12485 type.
12486 (convert_ascii_to_int): : Constify `from' parameter type.
12487 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12488 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12489 the needed buffer in-place.
12490 (relocate_instruction): New.
12491 * server.c (handle_query) <qSymbols>: If the target supports
12492 tracepoints, give it a chance of looking up symbols. Report
12493 support for fast tracepoints.
12494 (handle_status): Stabilize threads.
12495 (process_serial_event): Adjust.
12496 * server.h (struct fast_tracepoint_jump): Forward declare.
12497 (struct process_info) <fast_tracepoint_jumps>: New field.
12498 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12499 (decode_X_packet, decode_M_packet): Adjust.
12500 (relocate_instruction): Declare.
12501 (in_process_agent_loaded): Declare.
12502 (tracepoint_look_up_symbols): Declare.
12503 (struct fast_tpoint_collect_status): Declare.
12504 (fast_tracepoint_collecting): Declare.
12505 (force_unlock_trace_buffer): Declare.
12506 (handle_tracepoint_bkpts): Declare.
12507 (initialize_low_tracepoint)
12508 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12509 * target.h (struct target_ops) <stabilize_threads,
12510 install_fast_tracepoint_jump_pad>: New fields.
12511 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12512 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12513 [HAVE_STDINT_H]: Include stdint.h.
12514 (trace_debug_1): Rename to ...
12515 (trace_vdebug): ... this.
12516 (trace_debug): Rename to ...
12517 (trace_debug_1): ... this. Add `level' parameter.
12518 (trace_debug): New.
12519 (ATTR_USED, ATTR_NOINLINE): New.
12520 (IP_AGENT_EXPORT): New.
12521 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12522 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12523 (about_to_request_buffer_space, trace_buffer_is_full)
12524 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12525 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12526 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12527 (traceframe_write_count, traceframes_created)
12528 (trace_state_variables)
12529 New renaming defines.
12530 (struct ipa_sym_addresses): New.
12531 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12532 (symbol_list): New.
12533 (ipa_sym_addrs): New.
12534 (all_tracepoint_symbols_looked_up): New.
12535 (in_process_agent_loaded): New.
12536 (write_e_ipa_not_loaded): New.
12537 (maybe_write_ipa_not_loaded): New.
12538 (tracepoint_look_up_symbols): New.
12539 (debug_threads) [IN_PROCESS_AGENT]: New.
12540 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12541 (UNKNOWN_SIDE_EFFECTS): New.
12542 (stop_tracing): New.
12543 (flush_trace_buffer): New.
12544 (stop_tracing_bkpt): New.
12545 (flush_trace_buffer_bkpt): New.
12546 (read_inferior_integer): New.
12547 (read_inferior_uinteger): New.
12548 (read_inferior_data_pointer): New.
12549 (write_inferior_data_pointer): New.
12550 (write_inferior_integer): New.
12551 (write_inferior_uinteger): New.
12552 (struct collect_static_trace_data_action): Delete.
12553 (enum tracepoint_type): New.
12554 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12555 <actions_str, step_actions, step_actions_str>: Only include in
12556 GDBserver.
fa593d66
PA
12557 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12558 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12559 (tracepoints): Use IP_AGENT_EXPORT.
12560 (last_tracepoint): Don't include in the IPA.
12561 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12562 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12563 (alloced_trace_state_variables): New.
12564 (trace_state_variables): Use IP_AGENT_EXPORT.
12565 (traceframe_t): Delete unused variable.
12566 (circular_trace_buffer): Don't include in the IPA.
12567 (trace_buffer_start): Delete.
12568 (struct trace_buffer_control): New.
12569 (trace_buffer_free): Delete.
12570 (struct ipa_trace_buffer_control): New.
12571 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12572 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12573 New.
12574 (trace_buffer_ctrl): New.
12575 (TRACE_BUFFER_CTRL_CURR): New.
12576 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12577 Reimplement as macros.
12578 (trace_buffer_wrap): Delete.
12579 (traceframe_write_count, traceframe_read_count)
12580 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12581 (struct tracepoint_hit_ctx) <type>: New field.
12582 (struct fast_tracepoint_ctx): New.
12583 (memory_barrier): New.
12584 (cmpxchg): New.
12585 (record_tracepoint_error): Update atomically in the IPA.
12586 (clear_inferior_trace_buffer): New.
12587 (about_to_request_buffer_space): New.
12588 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12589 updating the same buffer.
12590 (add_tracepoint): Default the tracepoint's type to trap
12591 tracepoint, and orig_size to -1.
12592 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12593 internal variables.
12594 (create_trace_state_variable): New parameter `gdb'. Handle it.
12595 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12596 (cmd_qtdp): Handle fast tracepoints.
12597 (cmd_qtdv): Adjust.
12598 (max_jump_pad_size): New.
12599 (gdb_jump_pad_head): New.
12600 (get_jump_space_head): New.
12601 (claim_jump_space): New.
12602 (sort_tracepoints): New.
12603 (MAX_JUMP_SIZE): New.
12604 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12605 IPA.
12606 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12607 support. Upload fast traceframes, and delete internal IPA
12608 breakpoints.
12609 (stop_tracing_handler): New.
12610 (flush_trace_buffer_handler): New.
12611 (cmd_qtstop): Upload fast tracepoints.
12612 (response_tracepoint): Handle fast tracepoints.
12613 (tracepoint_finished_step): Upload fast traceframes. Set the
12614 tracepoint hit context's tracepoint type.
12615 (handle_tracepoint_bkpts): New.
12616 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12617 type. Add comment about fast tracepoints.
12618 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12619 non-existing action_str field.
12620 (get_context_regcache): Handle fast tracepoints.
12621 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12622 to the regcache.
12623 (fast_tracepoint_from_jump_pad_address): New.
12624 (fast_tracepoint_from_ipa_tpoint_address): New.
12625 (collecting_t): New.
12626 (force_unlock_trace_buffer): New.
12627 (fast_tracepoint_collecting): New.
12628 (collecting): New.
12629 (gdb_collect): New.
12630 (write_inferior_data_ptr): New.
12631 (target_tp_heap): New.
12632 (target_malloc): New.
12633 (download_agent_expr): New.
12634 (UALIGN): New.
12635 (download_tracepoints): New.
12636 (download_trace_state_variables): New.
12637 (upload_fast_traceframes): New.
12638 (IPA_FIRST_TRACEFRAME): New.
12639 (IPA_NEXT_TRACEFRAME_1): New.
12640 (IPA_NEXT_TRACEFRAME): New.
12641 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12642 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12643 (gdb_jump_pad_buffer_end): New.
12644 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12645 (initialize_tracepoint): Adjust.
12646 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12647 buffer. Initialize the low module.
12648 * utils.c (PREFIX, TOOLNAME): New.
12649 (malloc_failure): Use PREFIX.
12650 (error): In the IPA, an error causes an exit.
12651 (fatal, warning): Use PREFIX.
12652 (internal_error): Use TOOLNAME.
12653 (NUMCELLS): Increase to 10.
12654 * configure, config.in: Regenerate.
12655
d149dd1d
PA
126562010-06-01 Pedro Alves <pedro@codesourcery.com>
12657
12658 * server.c (handle_query) <qSupported>: Do two passes over the
12659 qSupported string to avoid nesting strtok.
12660
f6528abd
JK
126612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12662
12663 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12664 (CDEPS): New.
12665 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12666 -Wl,--dynamic-list.
12667 * configure: Regenerate.
12668 * proc-service.list: New.
12669
ca2a87a0
JK
126702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12671
12672 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12673 New comment.
12674
363a6e9f
OS
126752010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12676
12677 * gdbreplay.c (remote_open): Check error return from socket() call by
12678 its equality to -1 not by it being negative.
12679 * remote-utils.c (remote_open): Likewise.
12680
d23b6cb1
PA
126812010-05-23 Pedro Alves <pedro@codesourcery.com>
12682
12683 * config.h: Regenerate.
12684
28d3cf85
MK
126852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12686
12687 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12688 doesn't provide PTRACE_GET_THREAD_AREA.
12689
fea36a59
MK
126902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12691
12692 * linux-m68k-low.c: Include <asm/ptrace.h>
12693 (ps_get_thread_area): Implement.
12694
24b066ba
DE
126952010-05-03 Doug Evans <dje@google.com>
12696
12697 * event-loop.c (struct callback_event): New struct.
12698 (callback_list): New global.
12699 (append_callback_event, delete_callback_event): New functions.
12700 (process_callback): New function.
12701 (start_event_loop): Call it.
12702 * remote-utils.c (NOT_SCHEDULED): Define.
12703 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12704 moved out of readchar.
12705 (readchar): Rewrite. Call reschedule before returning.
12706 (reset_readchar): New function.
12707 (remote_close): Call it.
12708 (process_remaining, reschedule): New functions.
12709 * server.h (callback_handler_func): New typedef.
12710 (append_callback_event, delete_callback_event): Declare.
12711
9836d6ea
PA
127122010-05-03 Pedro Alves <pedro@codesourcery.com>
12713
12714 * proc-service.c (ps_pglobal_lookup): Use
12715 thread_db_look_up_one_symbol.
12716 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12717 parameter. Use it instead of all_symbols_looked_up.
12718 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12719 field.
12720 (all_symbols_looked_up): Don't declare.
12721 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12722 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12723 field.
12724 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12725 Set all_symbols_looked_up here.
12726 (thread_db_look_up_one_symbol): New.
12727 (thread_db_get_tls_address): Adjust.
12728 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12729 thread_db object on the heap, and tentatively set it in the
12730 process structure.
12731 (thread_db_init): Don't set all_symbols_looked_up here.
12732 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12733
7984d532
PA
127342010-05-03 Pedro Alves <pedro@codesourcery.com>
12735
12736 * linux-low.c (linux_kill, linux_detach): Adjust.
12737 (status_pending_p_callback): Remove redundant statement. Check
12738 for !TARGET_WAITIKIND_IGNORE, instead of
12739 TARGET_WAITKIND_STOPPED.
12740 (handle_tracepoints): Make sure LWP is locked. Adjust.
12741 (linux_wait_for_event_1): Adjust.
12742 (linux_cancel_breakpoints): New.
12743 (unsuspend_one_lwp): New.
12744 (unsuspend_all_lwps): New.
12745 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12746 (send_sigstop_callback): Change return type to int, add new
12747 `except' parameter and handle it.
12748 (suspend_and_send_sigstop_callback): New.
12749 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12750 pass them down. If SUSPEND, also increment the lwp's suspend
12751 count.
12752 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12753 (need_step_over_p): Don't consider suspended LWPs.
12754 (start_step_over): Adjust.
12755 (proceed_one_lwp): Change return type to int, add new `except'
12756 parameter and handle it.
12757 (unsuspend_and_proceed_one_lwp): New.
12758 (proceed_all_lwps): Use find_inferior instead of
12759 for_each_inferior.
12760 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12761 also decrement the suspend count of LWPs. Pass `except' down,
12762 instead of hacking its suspend count.
12763 (linux_pause_all): Add `freeze' parameter. Adjust.
12764 (linux_unpause_all): New.
12765 (linux_target_ops): Install linux_unpause_all.
12766 * server.c (handle_status): Adjust.
12767 * target.h (struct target_ops): New fields `unpause_all' and
12768 `cancel_breakpoints'. Add new parameter to `pause_all'.
12769 (pause_all): Add new `freeze' parameter.
12770 (unpause_all): New.
12771 (cancel_breakpoints): New.
12772 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12773 cancel breakpoints.
12774 (cmd_qtstart): Pause threads.
12775 (stop_tracing): Pause threads, and cancel breakpoints.
12776 * win32-low.c (win32_target_ops): Adjust.
12777
e471f25b
PA
127782010-05-03 Pedro Alves <pedro@codesourcery.com>
12779
12780 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12781 the inferior right away from here...
12782 (linux_wait_1): ... to here, and adjust to check the thread's
12783 last_resume_kind instead of the lwp's step or stop_expected flags.
12784
1915ef4f
PA
127852010-05-02 Pedro Alves <pedro@codesourcery.com>
12786
12787 * README: Use consistent `GDB' and `GDBserver' spellings.
12788
f9e39928
PA
127892010-05-02 Pedro Alves <pedro@codesourcery.com>
12790
12791 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12792 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12793 (linux_detach_one_lwp): Assume the lwp is stopped.
12794 (any_thread_of): Delete.
12795 (linux_detach): Stop all lwps here. Don't blindly delete all
12796 breakpoints.
12797 (delete_lwp_callback): New.
12798 (linux_mourn): Delete all lwps of the process that is gone.
12799 (linux_wait_1): Don't delete the last lwp of the process here.
12800 * mem-break.h (mark_breakpoints_out): Declare.
12801 * mem-break.c (mark_breakpoints_out): New.
12802 (free_all_breakpoints): Use it.
12803 * server.c (handle_target_event): If the process is gone, mark
12804 breakpoints out.
12805 * thread-db.c (struct thread_db) <create_bp>: New field.
12806 (thread_db_enable_reporting): Fix prototype. Store a thread event
12807 breakpoint reference in the thread_db struct.
12808 (thread_db_load_search): Clear the thread_db object.
12809 (try_thread_db_load_1): Ditto.
12810 (switch_to_process): New.
12811 (disable_thread_event_reporting): Use it.
12812 (remove_thread_event_breakpoints): New.
12813 (thread_db_detach, thread_db_mourn): Use it.
12814
1e7fc18c
PA
128152010-05-01 Pedro Alves <pedro@codesourcery.com>
12816
12817 * linux-low.c (linux_enable_event_reporting): New.
12818 (linux_wait_for_event_1, handle_extended_wait): Use it.
12819
02fc4de7
PA
128202010-04-30 Pedro Alves <pedro@codesourcery.com>
12821
12822 * linux-low.c (linux_kill_one_lwp, linux_kill)
12823 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12824 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12825 SIGSTOP even if the LWP is stopped.
12826 (send_sigstop_callback): New.
12827 (stop_all_lwps): Use send_sigstop_callback instead.
12828 (linux_resume_one_thread): Adjust.
12829 (proceed_one_lwp): Still proceed an LWP that the client has
12830 requested to stop, if we haven't reported it as stopped yet. Make
12831 sure that LWPs the client want stopped, have a pending SIGSTOP.
12832
bc3b5632
DE
128332010-04-26 Doug Evans <dje@google.com>
12834
ae1ada35
DE
12835 * server.c (handle_general_set): Make static.
12836
bc3b5632
DE
12837 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12838 Print received char after testing for error/eof instead of before.
12839 (input_interrupt): Tweak comment.
12840
65730243
DE
128412010-04-23 Doug Evans <dje@google.com>
12842
12843 * server.c (start_inferior): Print inferior argv if --debug.
12844
a8ae7dc0
AR
128452010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12846
12847 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12848 * nto-x86-low.c: Include server.h
12849
1c07cc19
PM
128502010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12851
12852 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12853 be consistent with other sources of this directory.
12854 (init_registers_amd64): Correct name of source file of this function
12855 in the comment.
12856
e0a61e09
PM
128572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12858
12859 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12860 64-bit executables.
12861
54709339
PM
128622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12863
12864 * win32-i386-low.c: Add 64-bit support.
12865 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12866 (init_registers_amd64): Declare.
12867 (mappings): Add 64-bit version of array.
12868 (init_windows_x86): New function.
12869 (the_low_target): Change init_arch field to init_windows_x86.
12870
e8f0053d
PM
128712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12872
12873 * win32-low.c: Adapt to support also 64-bit architecture.
12874 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12875 (get_image_name): Use SIZE_T type for local variable `done'.
12876 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12877 (toolhelp_get_dll_name): Idem.
12878 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12879 Use uintptr_t typecast to avoid warning.
12880 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12881 (handle_exception): Use phex_nz to avoid warning.
12882 (win32_wait): Remove unused local variable `process'.
12883
c481e77e
PM
128842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12885
12886 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12887 `amd64-avx.o'.
12888
12ea4b69
PM
128892010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12890
12891 * configure.ac: Use `ws2_32' library for srv_mingw.
12892 * configure: Regenerate.
12893 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12894 * remote-utils.c: Likewise.
12895
f6d1620c
L
128962010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12897
12898 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12899 if __x86_64__ is defined.
12900
8e642873
PM
129012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12902
12903 * configure: Regenerate.
12904
711e434b
PM
129052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12906
12907 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12908 * target.h (target_ops): New get_tib_address field.
12909 * win32-low.h (win32_thread_info): Add thread_local_base field.
12910 * win32-low.c (child_add_thread): Add tlb argument.
12911 Set thread_local_base field to TLB.
12912 (get_child_debug_event): Adapt to child_add_thread change.
12913 (win32_get_tib_address): New function.
12914 (win32_target_ops): Set get_tib_address field to
12915 win32_get_tib_address.
12916 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12917
505106cd
PA
129182010-04-12 Pedro Alves <pedro@codesourcery.com>
12919
505106cd
PA
12920 * linux-low.c (linux_mourn): Also remove the process.
12921 * server.c (handle_target_event): Don't remove the process here.
12922 * nto-low.c (nto_mourn): New.
12923 (nto_target_ops): Install it.
12924 * spu-low.c (spu_mourn): New.
12925 (spu_target_ops): Install it.
12926 * win32-low.c (win32_mourn): New.
12927 (win32_target_ops): Install it.
12928
e8470a06
PA
129292010-04-12 Pedro Alves <pedro@codesourcery.com>
12930
12931 * server.h (buffer_xml_printf): Remove redundant `;'.
12932
45ba0d02
PA
129332010-04-12 Pedro Alves <pedro@codesourcery.com>
12934
12935 * regcache.c (set_register_cache): Invalidate regcaches before
12936 changing the register cache layout.
12937 (regcache_invalidate_one): Allow a NULL regcache.
12938 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12939 regcaches before changing the register cache layout or the target
12940 regsets.
12941
59e04013
L
129422010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12943
12944 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12945 variable warning on Linux/x86-64.
12946
8336d594
PA
129472010-04-11 Pedro Alves <pedro@codesourcery.com>
12948
12949 GDBserver disconnected tracing support.
12950
12951 * linux-low.c (linux_remove_process): Delete.
12952 (add_lwp): Don't set last_resume_kind here.
12953 (linux_kill): Use `mourn'.
12954 (linux_detach): Use `thread_db_detach', and `mourn'.
12955 (linux_mourn): New.
12956 (linux_attach_lwp_1): Adjust comment.
12957 (linux_attach): last_resume_kind moved the thread_info; adjust.
12958 (status_pending_p_callback): Adjust.
12959 (linux_wait_for_event_1): Adjust.
12960 (count_events_callback, select_singlestep_lwp_callback)
12961 (select_event_lwp_callback, cancel_breakpoints_callback)
12962 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12963 (proceed_one_lwp): Adjust.
12964 (linux_async): Add debug output.
12965 (linux_thread_stopped): New.
12966 (linux_pause_all): New.
12967 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12968 linux_pause_all.
12969 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12970 (thread_db_free): Delete declaration.
12971 (thread_db_detach, thread_db_mourn): Declare.
12972 * thread-db.c (thread_db_init): Use thread_db_mourn.
12973 (thread_db_free): Delete, split in two.
12974 (disable_thread_event_reporting): New.
12975 (thread_db_detach): New.
12976 (thread_db_mourn): New.
12977
12978 * server.h (struct thread_info) <last_resume_kind>: New field.
12979 <attached>: Add comment.
12980 <gdb_detached>: New field.
12981 (handler_func): Change return type to int.
12982 (handle_serial_event, handle_target_event): Ditto.
12983 (gdb_connected): Declare.
12984 (tracing): Delete.
12985 (disconnected_tracing): Declare.
12986 (stop_tracing): Declare.
12987
12988 * server.c (handle_query) <qSupported>: Report support for
12989 disconnected tracing.
12990 (queue_stop_reply_callback): Account for running threads.
12991 (gdb_wants_thread_stopped): New.
12992 (gdb_wants_all_threads_stopped): New.
12993 (gdb_reattached_process): New.
12994 (handle_status): Clear the `gdb_detached' flag of all processes.
12995 In all-stop, stop all threads.
12996 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12997 (process_serial_event): If the remote connection breaks, or if an
12998 exit was forced with "monitor exit", force an event loop exit.
12999 Handle disconnected tracing on detach.
13000 (handle_serial_event): Adjust.
13001 (handle_target_event): If GDB isn't connected, forward events back
13002 to the inferior, unless the last process exited, in which case,
13003 exit gdbserver. Adjust interface.
13004
13005 * remote-utils.c (remote_open): Don't block in accept. Instead
13006 register an event loop source on the listen socket file
13007 descriptor. Refactor bits into ...
13008 (listen_desc): ... this new global.
13009 (gdb_connected): ... this new function.
13010 (enable_async_notification): ... this new function.
13011 (handle_accept_event): ... this new function.
13012 (remote_close): Clear remote_desc.
13013
13014 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13015
13016 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13017 New fields.
13018 (mourn_inferior): Define.
13019 (target_process_qsupported): Avoid the dangling else problem.
13020 (thread_stopped): Define.
13021 (pause_all): Define.
13022 (target_waitstatus_to_string): Declare.
13023 * target.c (target_waitstatus_to_string): New.
13024
13025 * tracepoint.c (tracing): Make extern.
13026 (disconnected_tracing): New.
13027 (stop_tracing): Make extern. Handle tracing stops due to GDB
13028 disconnecting.
13029 (cmd_qtdisconnected): New.
13030 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13031 (handle_tracepoint_general_set): Handle QTDisconnected.
13032
13033 * event-loop.c (event_handler_func): Change return type to int.
13034 (process_event): Bail out if the event handler wants the event
13035 loop to stop.
13036 (handle_file_event): Ditto.
13037 (start_event_loop): Bail out if the event handler wants the event
13038 loop to stop.
13039
13040 * nto-low.c (nto_target_ops): Adjust.
13041 * spu-low.c (spu_wait): Don't remove the process here.
13042 (spu_target_ops): Adjust.
13043 * win32-low.c (win32_wait): Don't remove the process here.
13044 (win32_target_ops): Adjust.
13045
5d267c4c
PA
130462010-04-11 Pedro Alves <pedro@codesourcery.com>
13047
13048 * regcache.c (realloc_register_cache): Invalidate inferior's
13049 regcache before recreating it.
13050
623ccd72
PA
130512010-04-09 Pedro Alves <pedro@codesourcery.com>
13052
13053 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13054
219f2f23
PA
130552010-04-09 Stan Shebs <stan@codesourcery.com>
13056 Pedro Alves <pedro@codesourcery.com>
13057
13058 * server.h (LONGEST): New.
13059 (struct thread_info) <while_stepping>: New field.
13060 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13061 Declare.
13062 (initialize_tracepoint, handle_tracepoint_general_set)
13063 (handle_tracepoint_query, tracepoint_finished_step)
13064 (tracepoint_was_hit, release_while_stepping_state_list):
13065 (current_traceframe): Declare.
13066 * server.c (handle_general_set): Handle tracepoint packets.
13067 (read_memory): New.
13068 (write_memory): New.
13069 (handle_search_memory_1): Use read_memory.
13070 (handle_query): Report support for conditional tracepoints, trace
13071 state variables, and tracepoint sources. Handle tracepoint
13072 queries.
13073 (main): Initialize the tracepoints module.
13074 (process_serial_event): Handle traceframe reads/writes.
13075
13076 * linux-low.c (handle_tracepoints): New.
13077 (linux_wait_1): Call it.
13078 (linux_resume_one_lwp): Handle while-stepping.
13079 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13080 (linux_target_ops): Install them.
13081 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13082 New field.
13083 * linux-x86-low.c (x86_supports_tracepoints): New.
13084 (the_low_target). Install it.
13085
13086 * mem-break.h (delete_breakpoint): Declare.
13087 * mem-break.c (delete_breakpoint): Make external.
13088
13089 * target.h (struct target_ops): Add `supports_tracepoints',
13090 `read_pc', and `write_pc' fields.
13091 (target_supports_tracepoints): Define.
13092 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13093 (phex_nz): New.
13094
13095 * regcache.h (struct regcache) <registers_owned>: New field.
13096 (init_register_cache, regcache_cpy): Declare.
13097 (regcache_read_pc, regcache_write_pc): Declare.
13098 (register_cache_size): Declare.
13099 (supply_regblock): Declare.
13100 * regcache.c (init_register_cache): New.
13101 (new_register_cache): Use it.
13102 (regcache_cpy): New.
13103 (register_cache_size): New.
13104 (supply_regblock): New.
13105 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13106
219f2f23
PA
13107 * tracepoint.c: New.
13108
13109 * Makefile.in (OBS): Add tracepoint.o.
13110 (tracepoint.o): New rule.
13111
3a13a53b
L
131122010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13113
13114 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13115 (i386-mmx.o): New.
13116 (i386-mmx.c): Likewise.
13117 (i386-mmx-linux.o): Likewise.
13118 (i386-mmx-linux.c): Likewise.
13119
13120 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13121 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13122 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13123 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13124
13125 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13126 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13127 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13128
1570b33e
L
131292010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13130
13131 * Makefile.in (clean): Updated.
13132 (i386-avx.o): New.
13133 (i386-avx.c): Likewise.
13134 (i386-avx-linux.o): Likewise.
13135 (i386-avx-linux.c): Likewise.
13136 (amd64-avx.o): Likewise.
13137 (amd64-avx.c): Likewise.
13138 (amd64-avx-linux.o): Likewise.
13139 (amd64-avx-linux.c): Likewise.
13140
13141 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13142 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13143 (srv_amd64_regobj): Add amd64-avx.o.
13144 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13145 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13146 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13147 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13148 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13149 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13150 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13151
13152 * i387-fp.c: Include "i386-xstate.h".
13153 (i387_xsave): New.
13154 (i387_cache_to_xsave): Likewise.
13155 (i387_xsave_to_cache): Likewise.
13156 (x86_xcr0): Likewise.
13157
13158 * i387-fp.h (i387_cache_to_xsave): Likewise.
13159 (i387_xsave_to_cache): Likewise.
13160 (x86_xcr0): Likewise.
13161
13162 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13163 * linux-crisv32-low.c (target_regsets): Likewise.
13164 * linux-m68k-low.c (target_regsets): Likewise.
13165 * linux-mips-low.c (target_regsets): Likewise.
13166 * linux-ppc-low.c (target_regsets): Likewise.
13167 * linux-s390-low.c (target_regsets): Likewise.
13168 * linux-sh-low.c (target_regsets): Likewise.
13169 * linux-sparc-low.c (target_regsets): Likewise.
13170 * linux-xtensa-low.c (target_regsets): Likewise.
13171
13172 * linux-low.c: Include <sys/uio.h>.
13173 (regsets_fetch_inferior_registers): Support nt_type.
13174 (regsets_store_inferior_registers): Likewise.
13175 (linux_process_qsupported): New.
13176 (linux_target_ops): Add linux_process_qsupported.
13177
13178 * linux-low.h (regset_info): Add nt_type.
13179 (linux_target_ops): Add process_qsupported.
13180
13181 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13182 and <sys/uio.h>.
13183 (init_registers_i386_avx_linux): New.
13184 (init_registers_amd64_avx_linux): Likewise.
13185 (xmltarget_i386_linux_no_xml): Likewise.
13186 (xmltarget_amd64_linux_no_xml): Likewise.
13187 (PTRACE_GETREGSET): Likewise.
13188 (PTRACE_SETREGSET): Likewise.
13189 (x86_fill_xstateregset): Likewise.
13190 (x86_store_xstateregset): Likewise.
13191 (use_xml): Likewise.
13192 (x86_linux_update_xmltarget): Likewise.
13193 (x86_linux_process_qsupported): Likewise.
13194 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13195 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13196 init_registers_i386_linux here. Call
13197 x86_linux_update_xmltarget.
13198 (the_low_target): Add x86_linux_process_qsupported.
13199
13200 * server.c (handle_query): Call target_process_qsupported.
13201
13202 * target.h (target_ops): Add process_qsupported.
13203 (target_process_qsupported): New.
13204
fc7238bb
PA
132052010-04-03 Pedro Alves <pedro@codesourcery.com>
13206
13207 * inferiors.c (add_thread): Set last_status kind to
13208 TARGET_WAITKIND_IGNORE.
13209 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13210 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13211 (linux_wait_1): Move `thread' local definition to block that uses
13212 it. Don't NULL initialize `event_child'.
13213 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13214 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13215 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13216
bdabb078
PA
132172010-04-01 Pedro Alves <pedro@codesourcery.com>
13218
13219 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13220 an extended waitstatus, or by a watchpoint.
13221 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13222 thread was stepping or has been stopped by a watchpoint.
13223
d3bbe7a0
PA
132242010-04-01 Pedro Alves <pedro@codesourcery.com>
13225
13226 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13227 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13228 of another, then delete the previous, and validate all
13229 breakpoints.
13230 (validate_inserted_breakpoint): New.
13231 (delete_disabled_breakpoints): New.
13232 (validate_breakpoints): New.
13233 (check_mem_read): Validate breakpoints before trusting their
13234 shadow. Delete disabled breakpoints.
13235 (check_mem_write): Validate breakpoints before trusting they
13236 should be inserted. Delete disabled breakpoints.
13237 * mem-break.h (validate_breakpoints):
13238 * server.c (handle_query): Validate breakpoints when we see a
13239 qSymbol query.
13240
8b07ae33
PA
132412010-04-01 Pedro Alves <pedro@codesourcery.com>
13242
13243 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13244 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13245 if we could tell there's a GDB breakpoint at stop_pc.
13246 (need_step_over_p): Don't do a step over if we find a GDB
13247 breakpoint at the resume PC.
13248
13249 * mem-break.c (struct raw_breakpoint): New.
13250 (enum bkpt_type): New type `gdb_breakpoint'.
13251 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13252 fields. New field `raw'.
13253 (find_raw_breakpoint_at): New.
13254 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13255 breakpoint instead.
13256 (set_breakpoint_at): Adjust.
13257 (delete_raw_breakpoint): New.
13258 (release_breakpoint): New.
13259 (delete_breakpoint): Rename to...
13260 (delete_breakpoint_1): ... this. Add proc parameter. Use
13261 release_breakpoint. Return ENOENT.
13262 (delete_breakpoint): Reimplement.
13263 (find_breakpoint_at): Delete.
13264 (find_gdb_breakpoint_at): New.
13265 (delete_breakpoint_at): Delete.
13266 (set_gdb_breakpoint_at): New.
13267 (delete_gdb_breakpoint_at): New.
13268 (gdb_breakpoint_here): New.
13269 (set_reinsert_breakpoint): Use release_breakpoint.
13270 (uninsert_breakpoint): Rename to ...
13271 (uninsert_raw_breakpoint): ... this.
13272 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13273 (reinsert_raw_breakpoint): Change parameter type to
13274 raw_breakpoint.
13275 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13276 instead.
13277 (check_breakpoints): Adjust. Use release_breakpoint.
13278 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13279 (breakpoint_inserted_here): Ditto.
13280 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13281 Don't trust the breakpoint's shadow if it is not inserted.
13282 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13283 (delete_all_breakpoints): Adjust.
13284 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13285 use delete_breakpoint_1.
13286
13287 * mem-break.h (breakpoints_supported): Delete declaration.
13288 (set_gdb_breakpoint_at): Declare.
13289 (gdb_breakpoint_here): Declare.
13290 (delete_breakpoint_at): Delete.
13291 (delete_gdb_breakpoint_at): Declare.
13292
13293 * server.h (struct raw_breakpoint): Forward declare.
13294 (struct process_info): New field `raw_breakpoints'.
13295
13296 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13297 breakpoints.
13298
6bf5e0ba
PA
132992010-03-24 Pedro Alves <pedro@codesourcery.com>
13300
13301 * linux-low.c (status_pending_p_callback): Fix comment.
13302 (linux_wait_for_event_1): Move most of the internal breakpoint
13303 handling from here...
13304 (linux_wait_1): ... to here.
13305 (count_events_callback): New.
13306 (select_singlestep_lwp_callback): New.
13307 (select_event_lwp_callback): New.
13308 (cancel_breakpoints_callback): New.
13309 (select_event_lwp): New.
13310 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13311 priority to all LWPs that have had events that should be reported
13312 to the client. Cancel breakpoints when about to reporting the
13313 event to the client, not while stopping lwps. No longer cancel
13314 finished single-steps here.
13315 (cancel_finished_single_step): Delete.
13316 (cancel_finished_single_steps): Delete.
13317
414a389f
PA
133182010-03-24 Pedro Alves <pedro@codesourcery.com>
13319
13320 * mem-break.c (enum bkpt_type): New.
13321 (struct breakpoint): New field `type'.
13322 (set_breakpoint_at): Change return type to struct breakpoint
13323 pointer. Set type to `other_breakpoint' by default.
13324 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13325 in the breakpoint list.
13326 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13327 (reinsert_breakpoint): Rename to ...
13328 (reinsert_raw_breakpoint): ... this.
13329 (reinsert_breakpoints_at): Adjust.
13330 * mem-break.h (struct breakpoint): Declare.
13331 (set_breakpoint_at): Change return type to struct breakpoint
13332 pointer.
13333
2280c721
PA
133342010-03-24 Pedro Alves <pedro@codesourcery.com>
13335
13336 * server.c (handle_query): Assign, not compare.
13337
d50171e4
PA
133382010-03-24 Pedro Alves <pedro@codesourcery.com>
13339
13340 Teach linux gdbserver to step-over-breakpoints.
13341
13342 * linux-low.c (can_hardware_single_step): New.
13343 (supports_breakpoints): New.
13344 (handle_extended_wait): If stopping threads, read the stop pc of
13345 the new cloned LWP.
13346 (get_pc): New.
13347 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13348 low target doesn't support retrieving the PC.
13349 (add_lwp): Set last_resume_kind to resume_continue.
13350 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13351 (linux_attach): Don't clear stop_expected. Set the lwp's
13352 last_resume_kind to resume_stop.
13353 (linux_detach_one_lwp): Don't check for removed breakpoints.
13354 (check_removed_breakpoint): Delete.
13355 (status_pending_p): Rename to ...
13356 (status_pending_p_callback): ... this. Don't check for removed
13357 breakpoints. Don't consider threads that are stopped from GDB's
13358 perspective.
13359 (linux_wait_for_lwp): Always read the stop_pc here.
13360 (cancel_breakpoint): New.
13361 (step_over_bkpt): New global.
13362 (linux_wait_for_event_1): Implement stepping over breakpoints.
13363 (gdb_wants_lwp_stopped): New.
13364 (gdb_wants_all_stopped): New.
13365 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13366 single-step traps here. Store the thread's last reported target
13367 wait status.
13368 (send_sigstop): Don't clear stop_expected. Always set it,
13369 instead.
13370 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13371 (cancel_finished_single_step): New.
13372 (cancel_finished_single_steps): New.
13373 (wait_for_sigstop): Don't cancel finished single-step traps here.
13374 (linux_resume_one_lwp): Don't check for removed breakpoints.
13375 Don't set `step' on non-hardware step archs.
13376 (linux_set_resume_request): Ignore resume_stop requests if already
13377 stopping or stopped. Set the lwp's last_resume_kind.
13378 (resume_status_pending_p): Don't check for removed breakpoints.
13379 (need_step_over_p): New.
13380 (start_step_over): New.
13381 (finish_step_over): New.
13382 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13383 requests. Clear the thread's last reported target waitstatus.
13384 Don't use the `suspended' flag. Don't consider pending breakpoints.
13385 (linux_resume): Start a step-over if necessary.
13386 (proceed_one_lwp): New.
13387 (proceed_all_lwps): New.
13388 (unstop_all_lwps): New.
13389 * linux-low.h (struct lwp_info): Rewrite comment for the
13390 `suspended' flag. Add the `stop_pc' field. Delete the
13391 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13392 Add `'last_resume_kind' and `need_step_over' fields.
13393 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13394 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13395 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13396 (set_raw_breakpoint_at): New.
13397 (set_breakpoint_at): Rewrite to use it.
13398 (reinsert_breakpoint_handler): Delete.
13399 (set_reinsert_breakpoint): New.
13400 (reinsert_breakpoint_by_bp): Delete.
13401 (delete_reinsert_breakpoints): New.
13402 (uninsert_breakpoint): Rewrite.
13403 (uninsert_breakpoints_at): New.
13404 (reinsert_breakpoint): Rewrite.
13405 (reinsert_breakpoints_at): New.
13406 (check_breakpoints): Rewrite.
13407 (breakpoint_here): New.
13408 (breakpoint_inserted_here): New.
13409 (check_mem_read): Adjust.
13410 * mem-break.h (breakpoints_supported, breakpoint_here)
13411 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13412 (reinsert_breakpoint_by_bp): Delete declaration.
13413 (delete_reinsert_breakpoints): Declare.
13414 (reinsert_breakpoint): Delete declaration.
13415 (reinsert_breakpoints_at): Declare.
13416 (uninsert_breakpoint): Delete declaration.
13417 (uninsert_breakpoints_at): Declare.
13418 (check_breakpoints): Adjust prototype.
13419 * server.h: Adjust include order.
13420 (struct thread_info): Declare here. Add a `last_status' field.
13421
30ba68cb
MS
134222010-03-23 Michael Snyder <msnyder@vmware.com>
13423
13424 * server.c (crc32): New function.
13425 (handle_query): Add handling for 'qCRC:' request.
13426
b9a881c2
PA
134272010-03-23 Pedro Alves <pedro@codesourcery.com>
13428
13429 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13430 lwp had been stopped by a watchpoint.
13431
e92d13d5
PA
134322010-03-16 Pedro Alves <pedro@codesourcery.com>
13433
13434 * server.h (internal_error): Declare.
13435 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13436 * utils.c (internal_error): New function.
13437
64daa791
AS
134382010-03-15 Andreas Schwab <schwab@redhat.com>
13439
13440 * configure.srv: Fix typo setting srv_regobj.
13441
f52cd8cd
PA
134422010-03-15 Pedro Alves <pedro@codesourcery.com>
13443
13444 * linux-low.c (fetch_register): Avoid passing a non string literal
13445 format to `error'.
13446 (usr_store_inferior_registers): Ditto.
13447
93ae6fdc
PA
134482010-03-14 Pedro Alves <pedro@codesourcery.com>
13449
13450 * linux-low.c (linux_write_memory): Bail out early if peeking
13451 memory failed.
13452
c3adc08c
PA
134532010-03-14 Pedro Alves <pedro@codesourcery.com>
13454
13455 * linux-low.h (struct lwp_info): New fields
13456 `stopped_by_watchpoint' and `stopped_data_address'.
13457 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13458 here, and cache them in the lwp object.
13459 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13460 directly.
13461 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13462 field.
13463 (linux_stopped_by_watchpoint): Rewrite.
13464 (linux_stopped_data_address): Rewrite.
13465
bce522a2
PA
134662010-03-06 Simo Melenius <simo.melenius@iki.fi>
13467
13468 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13469 switching the current inferior, not before.
13470
90884b2b
L
134712010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13472
13473 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13474 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13475 i386-linux.c and amd64-linux.c.
13476 (reg-i386.o): Removed.
13477 (reg-i386.c): Likewise.
13478 (reg-i386-linux.o): Likewise.
13479 (reg-i386-linux.c): Likewise.
13480 (reg-x86-64.o): Likewise.
13481 (reg-x86-64.c): Likewise.
13482 (reg-x86-64-linux.o): Likewise.
13483 (reg-x86-64-linux.c): Likewise.
13484 (i386.o): New.
13485 (i386.c): Likewise.
13486 (i386-linux.o): Likewise.
13487 (i386-linux.c): Likewise.
13488 (amd64.o): Likewise.
13489 (amd64.c): Likewise.
13490 (amd64-linux.o): Likewise.
13491 (amd64-linux.c): Likewise.
13492
13493 * configure.srv (srv_i386_regobj): New.
13494 (srv_i386_linux_regobj): Likewise.
13495 (srv_amd64_regobj): Likewise.
13496 (srv_amd64_linux_regobj): Likewise.
13497 (srv_i386_32bit_xmlfiles): Likewise.
13498 (srv_i386_64bit_xmlfiles): Likewise.
13499 (srv_i386_xmlfiles): Likewise.
13500 (srv_amd64_xmlfiles): Likewise.
13501 (srv_i386_linux_xmlfiles): Likewise.
13502 (srv_amd64_linux_xmlfiles): Likewise.
13503 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13504 srv_xmlfiles to $srv_i386_xmlfiles.
13505 (i[34567]86-*-mingw32ce*): Likewise.
13506 (i[34567]86-*-mingw*): Likewise.
13507 (i[34567]86-*-nto*): Likewise.
13508 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13509 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13510 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13511 (x86_64-*-linux*): Likewise.
13512
13513 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13514 (init_registers_amd64_linux): New.
13515 (x86_arch_setup): Replace init_registers_x86_64_linux with
13516 init_registers_amd64_linux.
13517
193f13e6
MK
135182010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13519
13520 * configure.ac: Check for libdl. If it is not available link against
13521 static libthread_db.
13522 * configure: Regenerate.
13523
85d721b8
PA
135242010-02-22 Pedro Alves <pedro@codesourcery.com>
13525
13526 PR9605
13527
13528 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13529 handing a read watchpoint.
13530 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13531
6076632b
DE
135322010-02-12 Doug Evans <dje@google.com>
13533
13534 * linux-low.c (linux_supports_tracefork_flag): Document.
13535 (linux_look_up_symbols): Add comment.
13536
3327ccf7
L
135372010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13538
13539 * regcache.c (supply_register): Clear regcache if buf is NULL.
13540
0718675c 135412010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13542 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13543
13544 * inferiors.c (find_inferior): Add function documentation.
13545 (unloaded_dll): Handle the case where the unloaded dll has not
13546 been previously registered in the dll list.
13547
177321bd
DJ
135482010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13551 (thumb2_breakpoint): New.
13552 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13553
2b009048
DJ
135542010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13555
13556 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13557 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13558 breakpoints.
13559
3be029c7
PA
135602010-01-21 Pedro Alves <pedro@codesourcery.com>
13561
13562 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13563
18f5de3b
JK
135642010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13565
13566 * linux-s390-low.c (s390_collect_ptrace_register)
13567 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13568
3743bb4f
DE
135692010-01-21 Doug Evans <dje@google.com>
13570
14ce3065
DE
13571 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13572 (PTRACE_ARG4_TYPE): New macro.
13573 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13574 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13575 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13576 (usr_store_inferior_registers): Ditto.
13577 (linux_read_memory, linux_write_memory): Ditto.
13578 (linux_test_for_tracefork): Ditto.
13579
3743bb4f
DE
13580 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13581 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13582
8b315be5
PA
135832010-01-21 Pedro Alves <pedro@codesourcery.com>
13584
13585 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13586 target.
13587
85492558
PA
135882010-01-21 Pedro Alves <pedro@codesourcery.com>
13589
13590 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13591 prototype to take a regcache. Adjust.
13592
442ea881
PA
135932010-01-20 Pedro Alves <pedro@codesourcery.com>
13594
13595 * regcache.h (struct thread_info): Forward declare.
13596 (struct regcache): New.
13597 (new_register_cache): Adjust prototype.
13598 (get_thread_regcache): Declare.
13599 (free_register_cache): Adjust prototype.
13600 (registers_to_string, registers_from_string): Ditto.
13601 (supply_register, supply_register_by_name, collect_register)
13602 (collect_register_as_string, collect_register_by_name): Ditto.
13603 * regcache.c (struct inferior_regcache_data): Delete.
13604 (get_regcache): Rename to ...
13605 (get_thread_regcache): ... this. Adjust. Switch inferior before
13606 fetching registers.
13607 (regcache_invalidate_one): Adjust.
13608 (regcache_invalidate): Fix prototype.
13609 (new_register_cache): Return the new register cache.
13610 (free_register_cache): Change prototype.
13611 (realloc_register_cache): Adjust.
13612 (registers_to_string): Change prototype to take a regcache. Adjust.
13613 (registers_from_string): Ditto.
13614 (register_data): Ditto.
13615 (supply_register): Ditto.
13616 (supply_register_by_name): Ditto.
13617 (collect_register): Ditto.
13618 (collect_register_as_string): Ditto.
13619 (collect_register_by_name): Ditto.
13620 * server.c (process_serial_event): Adjust.
13621 * linux-low.h (regset_fill_func, regset_store_func): Change
13622 prototype.
13623 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13624 Change prototype.
13625 * linux-low.c (get_stop_pc): Adjust.
13626 (check_removed_breakpoint): Adjust.
13627 (linux_wait_for_event): Adjust.
13628 (linux_resume_one_lwp): Adjust.
13629 (fetch_register): Add regcache parameter. Adjust.
13630 (usr_store_inferior_registers): Ditto.
13631 (regsets_fetch_inferior_registers): Ditto.
13632 (regsets_store_inferior_registers): Ditto.
13633 (linux_fetch_registers, linux_store_registers): Ditto.
13634 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13635 regcache. Adjust.
43aaf8b6
PA
13636 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13637 Ditto.
442ea881
PA
13638 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13639 prototype to take a regcache.
13640 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13641 * remote-utils.c (convert_ascii_to_int, outreg)
13642 (prepare_resume_reply): Change prototype to take a regcache.
13643 Adjust.
13644 * target.h (struct target_ops) <fetch_registers, store_registers>:
13645 Change prototype to take a regcache.
13646 (fetch_inferior_registers, store_inferior_registers): Change
13647 prototype to take a regcache. Adjust.
13648 * proc-service.c (ps_lgetregs): Adjust.
13649 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13650 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13651 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13652 take a regcache. Adjust.
13653 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13654 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13655 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13656 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13657 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13658 (cris_cannot_fetch_register):
13659 (cris_breakpoint_at): Change prototype to take a regcache.
13660 Adjust.
13661 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13662 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13663 to take a regcache. Adjust.
13664 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13665 Adjust.
13666 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13667 take a regcache. Adjust.
13668 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13669 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13670 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13671 * linux-mips-low.c (mips_get_pc):
13672 (mips_set_pc): Change prototype to take a regcache. Adjust.
13673 (mips_reinsert_addr): Adjust.
13674 (mips_collect_register): Change prototype to take a regcache.
13675 Adjust.
13676 (mips_supply_register):
13677 (mips_collect_register_32bit, mips_supply_register_32bit)
13678 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13679 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13680 * linux-ppc-low.c (ppc_supply_ptrace_register)
13681 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13682 (parse_spufs_run): Adjust.
13683 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13684 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13685 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13686 take a regcache. Adjust.
13687 * linux-s390-low.c (s390_collect_ptrace_register)
13688 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13689 (s390_set_pc): Change prototype to take a regcache. Adjust.
13690 (s390_arch_setup): Adjust.
13691 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13692 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13693 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13694 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13695 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13696 regcache. Adjust.
13697 (sparc_breakpoint_at): Adjust.
13698 * linux-xtensa-low.c (xtensa_fill_gregset):
13699 (xtensa_store_gregset):
13700 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13701 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13702 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13703 prototype to take a regcache. Adjust.
13704 * win32-arm-low.c (arm_fetch_inferior_register)
13705 (arm_store_inferior_register): Change prototype to take a
13706 regcache. Adjust.
13707 * win32-i386-low.c (i386_fetch_inferior_register)
13708 (i386_store_inferior_register): Change prototype to take a
13709 regcache. Adjust.
13710 * win32-low.c (child_fetch_inferior_registers)
13711 (child_store_inferior_registers): Change prototype to take a
13712 regcache. Adjust.
13713 (win32_wait): Adjust.
13714 (win32_fetch_inferior_registers): Change prototype to take a
13715 regcache. Adjust.
13716 (win32_store_inferior_registers): Adjust.
13717 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13718 store_inferior_register>: Change prototype to take a regcache.
13719
60c3d7b0
DE
137202010-01-20 Doug Evans <dje@google.com>
13721
13722 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13723 #ifdef.
13724 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13725 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13726
dc146f7c
VP
137272010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13728
13729 * linux-low.c (linux_core_of_thread): New.
13730 (compare_ints, show_process, list_threads): New.
13731 (linux_qxfer_osdata): Report threads and cores.
13732 (linux_target_op): Register linux_core_of_thread.
13733 * remote-utils.c (prepare_resume_reply): Report the core.
13734 (buffer_xml_printf): Support %d specifier.
13735 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13736 New.
13737 (handle_query): Handle qXfer:threads. Announce availability
13738 thereof.
13739 * target.h (struct target_ops): New field core_of_thread.
13740
7803799a
UW
137412010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13742
13743 * Makefile.in (clean): Remove new generated files.
13744 (reg-s390.o, reg-s390.c): Remove rules.
13745 (reg-s390x.o, reg-s390x.c): Likewise.
13746 (s390-linux32.o, s390-linux32.c): Add rules.
13747 (s390-linux64.o, s390-linux64.c): Likewise.
13748 (s390x-linux64.o, s390x-linux64.c): Likewise.
13749 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13750 * linux-s390-low.c: Include <elf.h>.
13751 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13752 (init_registers_s390): Remove prototype.
13753 (init_registers_s390x): Likewise.
13754 (init_registers_s390_linux32): Add prototype.
13755 (init_registers_s390_linux64): Likewise.
13756 (init_registers_s390x_linux64): Likewise.
13757 (s390_num_regs_3264): New define.
13758 (s390_regmap_3264): New global variable.
13759 (s390_cannot_fetch_register): Remove obsolete check.
13760 (s390_cannot_store_register): Likewise.
13761 (s390_collect_ptrace_register): Handle upper/lower register halves.
13762 (s390_supply_ptrace_register): Likewise.
13763 (s390_fill_gregset): Update to register number changes.
13764 (s390_get_hwcap): New routine.
13765 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13766 Install appropriate regmap and register set.
13767
6e7ffa39
JB
137682010-01-01 Joel Brobecker <brobecker@adacore.com>
13769
13770 * server.c (gdbserver_version): Update copyright year to 2010.
13771 * gdbreplay.c (gdbreplay_version): Likewise.
13772
957f3f49
DE
137732009-12-28 Doug Evans <dje@google.com>
13774
13775 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13776 elf/external.h. Include <elf.h> instead but only if necessary.
13777
ca5c370d
PA
137782009-12-28 Pedro Alves <pedro@codesourcery.com>
13779
13780 * linux-low.c (linux_remove_process): Remove `detaching'
13781 parameter. Don't release/detach from thread_db here.
13782 (linux_kill): Release/detach from thread_db here, ...
13783 (linux_detach): ... and here, before actually detaching.
13784 (linux_wait_1): ... and here, when a process exits.
13785 * thread-db.c (any_thread_of): New.
13786 (thread_db_free): Switch the current inferior to a thread of the
13787 passed in process.
13788
4ee62156
DE
137892009-12-21 Doug Evans <dje@google.com>
13790
d90e6a88
DE
13791 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13792
c5f62d5f
DE
13793 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13794 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13795 warning ifndef __NR_tkill. Move setting of errno there too.
13796 Delete unnecessary resetting of errno after syscall.
13797 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13798
10e86dd7
DE
13799 * configure.ac: Check for dladdr.
13800 * config.in: Regenerate.
13801 * configure: Regenerate.
13802 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13803 (try_thread_db_load): Update.
13804
4ee62156
DE
13805 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13806
00f515da
DE
138072009-12-18 Doug Evans <dje@google.com>
13808
e9464885
DE
13809 * event-loop.c: Include unistd.h if it exists.
13810
07d4f67e
DE
13811 * linux-low.c (my_waitpid): Move definition away from being in
13812 between linux_tracefork_child/linux_test_for_tracefork.
13813
00f515da
DE
13814 * gdb_proc_service.h (psaddr_t): Fix type.
13815 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13816 signature to match glibc.
13817
1de1badb
DE
138182009-12-16 Doug Evans <dje@google.com>
13819
13820 * linux-low.c (linux_read_memory): Fix argument to read.
13821
aeeb81d1
PA
138222009-11-26 Pedro Alves <pedro@codesourcery.com>
13823
13824 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13825 events, don't leave current_inferior pointing at null.
13826
10357975
PA
138272009-11-26 Pedro Alves <pedro@codesourcery.com>
13828
13829 * win32-low.c (LOG): Delete.
13830 (OUTMSG): Output to stderr.
13831 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13832 on compile time LOG macro.
13833 (win32_wait): Fix debug output.
13834
cf6e3471
PA
138352009-11-26 Pedro Alves <pedro@codesourcery.com>
13836
13837 * win32-low.c (win32_add_one_solib): If the dll name is
13838 "ntdll.dll", prepend the system directory to the dll path.
13839
0c85e18e
MK
138402009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13841
13842 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13843
9ac544ce 138442009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13845 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13846
13847 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13848 * configure.ac: Check for __mcoldfire__ and set
13849 gdb_cv_m68k_is_coldfire.
13850 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13851 reg-cf.o and reg-m68k.o.
13852 * configure: Regenerated.
13853
fd7dd3e6
PA
138542009-11-16 Pedro Alves <pedro@codesourcery.com>
13855
13856 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13857 Pass it to thread_db_free.
13858 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13859 proper `detaching' argument to linux_remove_process.
13860 * linux-low.h (thread_db_free): Add `detaching' parameter.
13861 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13862 to thread_db_free.
13863 (thread_db_free): Add `detaching' parameter. Only
13864 call td_ta_clear_event if detaching from process.
13865
75aa492e
MK
138662009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13867
13868 * thread-db.c (thread_db_free): Fix typo.
13869
21e1bee4
PP
138702009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13871
13872 PR gdb/10838
13873 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13874
8838b45e
NS
138752009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13876
13877 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13878 with an i686 compiler.
13879 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13880 needed.
13881 * configure: Rebuilt.
13882
8a35fb51
SL
138832009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13884
13885 PR gdb/10783
13886
13887 * server.c (handle_search_memory_1): Correct read_addr initialization
13888 in loop for searching subsequent chunks.
13889
96f15937
PP
138902009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13891
13892 * configure.ac: New --with-libthread-db option.
13893 * thread-db.c: Allow direct dependence on libthread_db.
13894 (thread_db_free): Adjust.
13895 * config.in: Regenerate.
13896 * configure: Likewise.
889bf7c5 13897
5f7d1694
PP
138982009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13899
13900 PR gdb/10757
13901 * thread-db.c (attach_thread): New function.
13902 (maybe_attach_thread): Return success/failure.
13903 (find_new_threads_callback): Adjust.
889bf7c5
PA
13904 (thread_db_find_new_threads): Loop until no new threads.
13905
88e3b899
PA
139062009-10-13 Pedro Alves <pedro@codesourcery.com>
13907
13908 * proc-service.c (ps_lgetregs): Formatting.
13909
cdbfd419
PP
139102009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13911
13912 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13913 * configure.ac: Adjust.
13914 * linux-low.h (struct process_info_private): Move members to struct
13915 thread_db.
13916 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13917 * linux-low.c (linux_remove_process): Adjust.
13918 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13919 * server.c (handle_query): Move code ...
13920 (handle_monitor_command): ... here. New function.
13921 * target.h (struct target_ops): New member.
13922 * thread-db.c (struct thread_db): New.
13923 (libthread_db_search_path): New variable.
13924 (thread_db_create_event, thread_db_enable_reporting)
13925 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13926 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13927 (try_thread_db_load_1, dladdr_to_soname): New functions.
13928 (try_thread_db_load, thread_db_load_search): New functions.
13929 (thread_db_init): Search for libthread_db.
13930 (thread_db_free): New function.
13931 (thread_db_handle_monitor_command): Likewise.
13932 * config.in: Regenerate.
13933 * configure: Regenerate.
889bf7c5 13934
4168d2d6
UW
139352009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13936
13937 * spu-low.c (spu_kill): Wait for inferior to terminate.
13938 Call clear_inferiors.
13939 (spu_detach): Call clear_inferiors.
13940
81ecdfbb
RW
139412009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13942
13943 * aclocal.m4: Regenerate.
13944 * config.in: Likewise.
13945 * configure: Likewise.
13946
0b9ff2c0
UW
139472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13948
13949 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13950 (parse_spufs_run): New function.
13951 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13952 (ppc_breakpoint_at): Handle SPU breakpoints.
13953
efcbbd14
UW
139542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13955
13956 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13957 (SPUFS_MAGIC): Define.
13958 (spu_enumerate_spu_ids): New function.
13959 (linux_qxfer_spu): New function.
13960 (linux_target_ops): Install linux_qxfer_spu.
13961
f4d9bade
UW
139622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13963
13964 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13965 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13966 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13967 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13968 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13969 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13970 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13971 (init_registers_powerpc_cell32l): Add prototype.
13972 (init_registers_powerpc_cell64l): Likewise.
13973 (ppc_arch_setup): Detect Cell/B.E. architecture.
13974
96e946ca
RW
139752009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13976
13977 * Makefile.in (datarootdir): New variable.
13978
58d6951d
DJ
139792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * linux-low.c (linux_write_memory): Update debugging output.
13982 * Makefile.in (clean): Add new descriptions.
13983 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13984 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13985 * configure.srv: Add new files for arm*-*-linux*.
13986 * linux-arm-low.c: Add new declarations.
13987 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13988 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13989 (HWCAP_VFPv3D16): New.
13990 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13991 instead of __IWMMXT__.
13992 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13993 (arm_arch_setup): New.
13994 (target_regsets): Remove #ifdef. Add VFP regset.
13995 (the_low_target): Use arm_arch_setup.
13996
12b42a12
DJ
139972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13998
13999 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14000 the main thread again.
14001
ac8c974e
AR
140022009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14003
14004 Adding Neutrino gdbserver.
14005 * configure: Regenerated.
14006 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14007 * configure.srv (i[34567]86-*-nto*): New target.
14008 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14009 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14010 (nto_comctrl) [__QNX__]: New function.
14011 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14012
4424e0c3 140132009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14014
14015 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14016 srv_tgtobj.
14017
912cf4ba
PA
140182009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14019 Pedro Alves <pedro@codesourcery.com>
14020
14021 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14022 don't support CONTEXT_EXTENDED_REGISTERS.
14023 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14024 (the_low_target): Install them.
14025 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14026 failing with ERROR_PIPE_NOT_CONNECTED.
14027
aa5ca48f
DE
140282009-06-30 Doug Evans <dje@google.com>
14029 Pierre Muller <muller@ics.u-strasbg.fr>
14030
14031 Add h/w watchpoint support to x86-linux, win32-i386.
14032 * Makefile.in (SFILES): Add i386-low.c
14033 (i386_low_h): Define.
14034 (i386-low.o): Add dependencies.
14035 (linux-x86-low.o): Add i386-low.h dependency.
14036 (win32-i386-low.o): Ditto.
14037 * i386-low.c: New file.
14038 * i386-low.h: New file.
14039 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14040 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14041 * linux-low.c (linux_add_process): Initialize arch_private.
14042 (linux_remove_process): Free arch_private.
14043 (add_lwp): Initialize arch_private.
14044 (delete_lwp): Free arch_private.
14045 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14046 provided.
14047 * linux-low.h (process_info_private): New member arch_private.
14048 (lwp_info): New member arch_private.
14049 (linux_target_ops): New members new_process, new_thread,
14050 prepare_to_resume.
14051 (ptid_of): New macro.
14052 * linux-x86-low.c: Include stddef.h, i386-low.h.
14053 (arch_process_info): New struct.
14054 (arch_lwp_info): New struct.
14055 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14056 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14057 (i386_dr_low_get_status): New function.
14058 (x86_insert_point, x86_remove_point): New functions.
14059 (x86_stopped_by_watchpoint): New function.
14060 (x86_stopped_data_address): New function.
14061 (x86_linux_new_process, x86_linux_new_thread): New functions.
14062 (x86_linux_prepare_to_resume): New function.
14063 (the_low_target): Add entries for insert_point, remove_point,
14064 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14065 prepare_to_resume.
14066 * server.c (debug_hw_points): New global.
14067 (monitor_show_help): Document set debug-hw-points.
14068 (handle_query): Process "set debug-hw-points".
14069 * server.h (debug_hw_points): Declare.
14070 (paddress): Declare.
14071 * utils.c (NUMCELLS, CELLSIZE): New macros.
14072 (get_sell, xsnprintf, paddress): New functions.
14073 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14074 remove_point, stopped_by_watchpoint, stopped_data_address.
14075 * win32-i386-low.c: Include i386-low.h.
14076 (debug_reg_state): Replaces dr.
14077 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14078 (i386_dr_low_get_status): New function.
14079 (i386_insert_point, i386_remove_point): New functions.
14080 (i386_stopped_by_watchpoint): New function.
14081 (i386_stopped_data_address): New function.
14082 (i386_initial_stuff): Update.
14083 (get_thread_context,set_thread_context,i386_thread_added): Update.
14084 (the_low_target): Add entries for insert_point,
14085 remove_point, stopped_by_watchpoint, stopped_data_address.
14086 * win32-low.c (win32_insert_watchpoint): New function.
14087 (win32_remove_watchpoint): New function.
14088 (win32_stopped_by_watchpoint): New function.
14089 (win32_stopped_data_address): New function.
14090 (win32_target_ops): Add entries for insert_watchpoint,
14091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14092 * win32-low.h (win32_target_ops): New members insert_point,
14093 remove_point, stopped_by_watchpoint, stopped_data_address.
14094
d993e290
PA
140952009-06-25 Pedro Alves <pedro@codesourcery.com>
14096
14097 * server.c (process_serial_event): Re-return unsupported, not
14098 error, if the type isn't recognized. Re-allow supporting only
14099 insert or remove packets. Also call require_running for
14100 breakpoints. Add missing break statement to default case. Tidy.
14101 * target.h (struct target_ops): Rename insert_watchpoint to
14102 insert_point, and remove_watchpoint to remove_point.
14103
14104 * linux-low.h (struct linux_target_ops): Likewise.
14105 * linux-low.c (linux_insert_watchpoint): Rename to ...
14106 (linux_insert_point): ... this. Adjust.
14107 (linux_remove_watchpoint): Rename to ...
14108 (linux_remove_point): ... this. Adjust.
14109 (linux_target_ops): Adjust.
14110 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14111 (cris_insert_point): ... this.
14112 (cris_remove_watchpoint): Rename to ...
14113 (cris_remove_point): ... this.
14114 (the_low_target): Adjust.
14115
0f54c268
PM
141162009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14117
14118 * server.c (handle_v_kill): Pass signal_pid to
14119 kill_inferior if multi_process is zero.
14120
c6314022
AR
141212009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14122
14123 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14124 * target.h (target_ops): Comment for *_watchpoint to make it clear
14125 the functions can get types '0' and '1'.
14126
4463ce24
AR
141272009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14128
14129 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14130 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14131 * regcache.c (get_regcache): Likewise.
14132 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14133 * win32-low.c (child_fetch_inferior_registers): Remove check for
14134 regno 0.
14135
cf8fd78b
PA
141362009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14137 Pedro Alves <pedro@codesourcery.com>
14138
14139 * target.h (struct target_ops) <supports_multi_process>: New
14140 callback.
14141 (target_supports_multi_process): New.
14142 * server.c (handle_query): Even if GDB reports support, only
14143 enable multi-process if the target also supports it. Report
14144 multi-process support only if the target backend supports it.
14145 * linux-low.c (linux_supports_multi_process): New function.
14146 (linux_target_ops): Install it as target_supports_multi_process
14147 callback.
14148
47c0c975
DE
141492009-05-24 Doug Evans <dje@google.com>
14150
e09875d4
DE
14151 Global renaming of find_thread_pid to find_thread_ptid.
14152 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14153 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14154 All callers updated.
14155
e27d73f6
DE
14156 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14157 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14158 directly.
14159
47c0c975
DE
14160 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14161 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14162 (linux_resume_one_lwp): Ditto.
14163
2acc282a
DE
141642009-05-23 Doug Evans <dje@google.com>
14165
14166 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14167 from struct inferior_list_entry * to struct lwp_info *.
14168 All callers updated.
14169
9f1036c1
DE
141702009-05-13 Doug Evans <dje@google.com>
14171
14172 * linux-x86-low.c: Don't include assert.h.
14173 (x86_siginfo_fixup): Use fatal, not assert.
14174 (x86_arch_setup): Fix comment.
14175
d0722149
DE
141762009-05-12 Doug Evans <dje@google.com>
14177
14178 Biarch support for i386/amd64 gdbserver.
14179 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14180 Add linux-x86-low.c.
14181 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14182 (linux-x86-low.o): Add.
14183 * linux-x86-64-low.c: Delete.
14184 * linux-i386-low.c: Delete.
14185 * linux-x86-low.c: New file.
14186 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14187 linux-x86-low.o.
14188 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14189 linux-x86-low.o.
14190 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14191 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14192 (linux_child_pid_to_exec_file): New function.
14193 (elf_64_header_p, elf_64_file_p): New functions.
14194 (siginfo_fixup): New function.
14195 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14196 give target a chance to convert layout.
14197 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14198 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14199
fdeb2a12
DE
142002009-05-07 Doug Evans <dje@google.com>
14201
14202 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14203 (regsets_store_inferior_registers): Ditto.
14204
a6dbe5df
PA
142052009-05-06 Pedro Alves <pedro@codesourcery.com>
14206
14207 PR server/10048
14208
14209 * linux-low.c (must_set_ptrace_flags): Delete.
14210 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14211 of the global.
14212 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14213 `lwp->must_set_ptrace_flags' instead.
ba42693b 14214 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14215 (linux_wait_1): ... not here.
14216
5091eb23
DE
142172009-04-30 Doug Evans <dje@google.com>
14218
9f767825
DE
14219 * inferiors.c (started_inferior_callback): New function.
14220 (attached_inferior_callback): New function.
14221 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14222 * server.c (print_started_pid, print_attached_pid): New functions.
14223 (detach_or_kill_for_exit): New function.
14224 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14225 * server.h (have_started_inferiors_p): Declare.
14226 (have_attached_inferiors_p): Declare.
14227
5091eb23
DE
14228 * inferiors.c (remove_process): Fix memory leak, free process.
14229 * linux-low.c (linux_remove_process): New function.
14230 (linux_kill): Call it instead of remove_process.
14231 (linux_detach, linux_wait_1): Ditto.
14232
155c8968
PA
142332009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14234
14235 * configure.srv: Add x86 Windows CE target.
14236
7fe519cb
UW
142372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14238
14239 * inferiors.c (get_thread_process): Make global.
14240 * server.h (get_thread_process): Add prototype.
14241 * thread-db.c (find_one_thread): Use get_thread_process
14242 instead of current_process.
14243 (thread_db_get_tls_address): Do not crash if called when
14244 thread layer is not yet initialized.
14245
5472f405
UW
142462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14247
14248 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14249 * spu-low.c (current_tid): Rename to ...
14250 (current_ptid): ... this.
14251 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14252 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14253 ptid_get_lwp (current_ptid) instead of current_tid.
14254 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14255 instead of current_tid. Use find_process_pid to verify pid
14256 argument is valid. Pass proper argument to remove_process.
14257 (spu_thread_alive): Compare current_ptid instead of current_tid.
14258 (spu_resume): Likewise.
14259
55ac2b99
PA
142602009-04-02 Pedro Alves <pedro@codesourcery.com>
14261
14262 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14263 variable.
14264
95954743
PA
142652009-04-01 Pedro Alves <pedro@codesourcery.com>
14266
14267 Implement the multiprocess extensions, and add linux multiprocess
14268 support.
14269
14270 * server.h (ULONGEST): Declare.
14271 (struct ptid, ptid_t): New.
14272 (minus_one_ptid, null_ptid): Declare.
14273 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14274 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14275 (struct inferior_list_entry): Change `id' type from unsigned from
14276 to ptid_t.
14277 (struct sym_cache, struct breakpoint, struct
14278 process_info_private): Forward declare.
14279 (struct process_info): Declare.
14280 (current_process): Declare.
14281 (all_processes): Declare.
14282 (initialize_inferiors): Declare.
14283 (add_thread): Adjust to use ptid_t.
14284 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14285 (add_process, remove_process, find_thread_pid): Declare.
14286 (find_inferior_id): Adjust to use ptid_t.
14287 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14288 (multi_process): Declare.
14289 (push_event): Adjust to use ptid_t.
14290 (read_ptid, write_ptid): Declare.
14291 (prepare_resume_reply): Adjust to use ptid_t.
14292 (clear_symbol_cache): Declare.
14293 * inferiors.c (all_processes): New.
14294 (null_ptid, minus_one_ptid): New.
14295 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14296 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14297 (add_thread): Change unsigned long to ptid. Remove gdb_id
14298 parameter. Adjust.
14299 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14300 (gdb_id_to_thread): Rename to ...
14301 (find_thread_pid): ... this. Change unsigned long to ptid.
14302 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14303 (loaded_dll, pull_pid_from_list): Adjust.
14304 (add_process, remove_process, find_process_pid)
14305 (get_thread_process, current_process, initialize_inferiors): New.
14306 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14307 (struct target_waitstatus) <related_pid>: Ditto.
14308 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14309 return type to int.
14310 (struct target_ops) <join>: Add `pid' argument.
14311 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14312 (struct target_ops) <wait>: Add `ptid' field. Change return type
14313 to ptid.
14314 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14315 (mywait): Add `ptid' argument. Change return type to ptid_t.
14316 (target_pid_to_str): Declare.
14317 * target.c (set_desired_inferior): Adjust to use ptids.
14318 (mywait): Add new `ptid' argument. Adjust.
14319 (target_pid_to_str): New.
14320 * mem-break.h (free_all_breakpoints): Declare.
14321 * mem-break.c (breakpoints): Delelete.
14322 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14323 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14324 to use per-process breakpoint list.
14325 (free_all_breakpoints): New.
14326 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14327 (symbol_cache, all_symbols_looked_up): Delete.
14328 (hexchars): New.
14329 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14330 read_ptid): New.
14331 (prepare_resume_reply): Change ptid argument's type from unsigned
14332 long to ptid_t. Adjust. Implement W;process and X;process.
14333 (free_sym_cache, clear_symbol_cache): New.
14334 (look_up_one_symbol): Adjust to per-process symbol cache. *
14335 * server.c (cont_thread, general_thread, step_thread): Change type
14336 to ptid_t.
14337 (attached): Delete.
14338 (multi_process): New.
14339 (last_ptid): Change type to ptid_t.
14340 (struct vstop_notif) <ptid>: Change type to ptid_t.
14341 (queue_stop_reply, push_event): Change `ptid' argument's type to
14342 ptid_t.
14343 (discard_queued_stop_replies): Add `pid' argument.
14344 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14345 changes. Don't reference the `attached' global.
14346 (attach_inferior): Adjust to mywait interface changes.
14347 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14348 features. Handle and report "multiprocess+". Handle
14349 "qAttached:PID".
14350 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14351 changes.
14352 (handle_v_kill): New.
14353 (handle_v_stopped): Adjust to use target_pid_to_str.
14354 (handle_v_requests): Allow multiple attaches and runs when
14355 multiprocess extensions are in effect. Handle "vKill".
14356 (myresume): Adjust to use ptids.
14357 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14358 (handle_status): Adjust to discard_queued_stop_replies interface
14359 change.
14360 (first_thread_of, kill_inferior_callback)
14361 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14362 (main): Call initialize_inferiors. Adjust to use ptids, killing
14363 and detaching from all inferiors. Handle multiprocess packet
14364 variants.
14365 * linux-low.h: Include gdb_proc_service.h.
14366 (struct process_info_private): New.
14367 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14368 <lwpid_of>: Use ptid_get_lwp.
14369 (get_lwp_thread): Adjust.
14370 (struct lwp_info): Add `dead' member.
14371 (find_lwp_pid): Declare.
14372 * linux-low.c (thread_db_active): Delete.
14373 (new_inferior): Adjust comment.
14374 (inferior_pid): Delete.
14375 (linux_add_process): New.
14376 (handle_extended_wait): Adjust.
14377 (add_lwp): Change unsigned long to ptid.
14378 (linux_create_inferior): Add process to processes table. Adjust
14379 to use ptids. Don't set new_inferior here.
14380 (linux_attach_lwp): Rename to ...
14381 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14382 it. Adjust to use ptids.
14383 (linux_attach_lwp): New.
14384 (linux_attach): Add process to processes table. Don't set
14385 new_inferior here.
14386 (struct counter): New.
14387 (second_thread_of_pid_p, last_thread_of_process_p): New.
14388 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14389 multiple processes.
14390 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14391 processes. Remove process from process table.
14392 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14393 to multiple processes.
14394 (any_thread_of): New.
14395 (linux_detach): Add `pid' argument, and handle it. Remove process
14396 from processes table.
14397 (linux_join): Add `pid' argument. Handle it.
14398 (linux_thread_alive): Change unsighed long argument to ptid_t.
14399 Consider dead lwps as not being alive.
14400 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14401 threads we're not interested in.
14402 (same_lwp, find_lwp_pid): New.
14403 (linux_wait_for_lwp): Change `pid' argument's type from int to
14404 ptid_t. Adjust.
14405 (linux_wait_for_event): Rename to ...
14406 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14407 from int to ptid_t. Adjust.
14408 (linux_wait_for_event): New.
14409 (linux_wait_1): Add `ptid' argument. Change return type to
14410 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14411 that exit from the process table.
14412 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14413 Adjust.
14414 (mark_lwp_dead): New.
14415 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14416 stopping all threads, mark its main lwp as dead.
14417 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14418 ptids.
14419 (fetch_register, usr_store_inferior_registers)
14420 (regsets_fetch_inferior_registers)
14421 (regsets_store_inferior_registers, linux_read_memory)
14422 (linux_write_memory): Inline `inferior_pid'.
14423 (linux_look_up_symbols): Adjust to use per-process
14424 `thread_db_active'.
14425 (linux_request_interrupt): Adjust to use ptids.
14426 (linux_read_auxv): Inline `inferior_pid'.
14427 (initialize_low): Don't reference thread_db_active.
14428 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14429 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14430 (ps_getpid): Return the pid of the current inferior.
14431 * thread-db.c (proc_handle, thread_agent): Delete.
14432 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14433 per-process data.
14434 (find_one_thread): Change argument type to ptid_t. Adjust to
14435 per-process data.
14436 (maybe_attach_thread): Adjust to per-process data and ptids.
14437 (thread_db_find_new_threads): Ditto.
14438 (thread_db_init): Ditto.
14439 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14440 processes table. Adjust to use ptids.
14441 (spu_kill, spu_detach): Adjust interface. Remove process from
14442 processes table.
14443 (spu_join, spu_thread_alive): Adjust interface.
14444 (spu_wait): Adjust interface. Remove process from processes
14445 table. Adjust to use ptids.
14446 * win32-low.c (current_inferior_tid): Delete.
14447 (current_inferior_ptid): New.
14448 (debug_event_ptid): New.
14449 (thread_rec): Take a ptid. Adjust.
14450 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14451 (child_delete_thread): Ditto.
14452 (do_initial_child_stuff): Add `attached' argument. Add process to
14453 processes table.
14454 (child_fetch_inferior_registers, child_store_inferior_registers):
14455 Adjust.
14456 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14457 (win32_attach): Pass 1 to do_initial_child_stuff.
14458 (win32_kill): Adjust interface. Remove process from processes
14459 table.
14460 (win32_detach): Ditto.
14461 (win32_join): Adjust interface.
14462 (win32_thread_alive): Take a ptid.
14463 (win32_resume): Adjust to use ptids.
14464 (get_child_debug_event): Ditto.
14465 (win32_wait): Adjust interface. Remove exiting process from
14466 processes table.
14467
bd99dc85
PA
144682009-04-01 Pedro Alves <pedro@codesourcery.com>
14469
14470 Non-stop mode support.
14471
14472 * server.h (non_stop): Declare.
14473 (gdb_client_data, handler_func): Declare.
14474 (delete_file_handler, add_file_handler, start_event_loop):
14475 Declare.
14476 (handle_serial_event, handle_target_event, push_event)
14477 (putpkt_notif): Declare.
14478 * target.h (enum resume_kind): New.
14479 (struct thread_resume): Replace `step' field by `kind' field.
14480 (TARGET_WNOHANG): Define.
14481 (struct target_ops) <wait>: Add `options' argument.
14482 <supports_non_stop, async, start_non_stop>: New fields.
14483 (target_supports_non_stop, target_async): New.
14484 (start_non_stop): Declare.
14485 (mywait): Add `options' argument.
14486 * target.c (mywait): Add `options' argument. Print child exit
14487 notifications here.
14488 (start_non_stop): New.
14489 * server.c (non_stop, own_buf, mem_buf): New globals.
14490 (struct vstop_notif): New.
14491 (notif_queue): New global.
14492 (queue_stop_reply, push_event, discard_queued_stop_replies)
14493 (send_next_stop_reply): New.
14494 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14495 interface changes.
14496 (attach_inferior): In non-stop mode, don't wait for the target
14497 here.
14498 (handle_general_set): Handle QNonStop.
14499 (handle_query): When handling qC, return the current general
14500 thread, instead of the first thread of the list.
14501 (handle_query): If the backend supports non-stop mode, include
14502 QNonStop+ in the qSupported query response.
14503 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14504 and non-stop mode.
14505 (handle_v_attach, handle_v_run): Handle non-stop mode.
14506 (handle_v_stopped): New.
14507 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14508 (myresume): Adjust to use resume_kind. Handle non-stop.
14509 (queue_stop_reply_callback): New.
14510 (handle_status): Handle non-stop mode.
14511 (main): Clear non_stop flag on reconnection. Use the event-loop.
14512 Refactor serial protocol handling from here ...
14513 (process_serial_event): ... to this new function. When GDB
14514 selects any thread, select one here. In non-stop mode, wait until
14515 GDB acks all pending events before exiting.
14516 (handle_serial_event, handle_target_event): New.
14517 * remote-utils.c (remote_open): Install remote_desc in the event
14518 loop.
14519 (remote_close): Remove remote_desc from the event loop.
14520 (putpkt_binary): Rename to...
14521 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14522 (putpkt_binary): New as wrapper around putpkt_binary_1.
14523 (putpkt_notif): New.
14524 (prepare_resume_reply): In non-stop mode, don't change the
14525 general_thread.
14526 * event-loop.c: New.
14527 * Makefile.in (OBJ): Add event-loop.o.
14528 (event-loop.o): New rule.
14529
14530 * linux-low.h (pid_of): Moved here.
14531 (lwpid_of): New.
14532 (get_lwp_thread): Use lwpid_of.
14533 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14534 * linux-low.c (pid_of): Delete.
14535 (inferior_pid): Use lwpid_of.
14536 (linux_event_pipe): New.
14537 (target_is_async_p): New.
14538 (delete_lwp): New.
14539 (handle_extended_wait): Use lwpid_of.
14540 (add_lwp): Don't set lwpid field.
14541 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14542 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14543 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14544 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14545 first. Adjust to linux_wait_for_event interface changes. Use
14546 lwpid_of.
14547 (linux_detach): Don't delete the main lwp here.
14548 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14549 (status_pending_p): Don't consider explicitly suspended lwps.
14550 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14551 pointer. Add OPTIONS argument. Change return type to int. Use
14552 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14553 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14554 pointer. Add status pointer argument. Return a pid instead of a
14555 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14556 changes. In non-stop mode, don't switch to a random thread.
14557 (linux_wait): Rename to...
14558 (linux_wait_1): ... this. Add target_options argument, and handle
14559 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14560 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14561 clean exit and signal exit code. Don't stop all threads in
14562 non-stop mode. In all-stop mode, only stop all threads when
14563 reporting a stop to GDB. Handle explicit thread stop requests.
14564 (async_file_flush, async_file_mark): New.
14565 (linux_wait): New.
14566 (send_sigstop): Use lwpid_of.
14567 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14568 interface changes. In non-stop mode, don't switch to a random
14569 thread.
14570 (linux_resume_one_lwp): Use lwpid_of.
14571 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14572 (linux_resume_one_thread): ... this. Handle resume_stop. In
14573 non-stop mode, don't look for pending flag in all threads.
14574 (resume_status_pending_p): Don't consider explicitly suspended
14575 threads.
14576 (my_waitpid): Reimplement. Emulate __WALL.
14577 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14578 Use lwpid_of.
14579 (sigchld_handler, linux_supports_non_stop, linux_async)
14580 (linux_start_non_stop): New.
14581 (linux_target_ops): Register linux_supports_non_stop, linux_async
14582 and linux_start_non_stop.
14583 (initialize_low): Install SIGCHLD handler.
14584 * thread-db.c (thread_db_create_event, find_one_thread)
14585 (thread_db_get_tls_address): Use lwpid_of.
14586 * win32-low.c (win32_detach): Adjust to use resume_kind.
14587 (win32_wait): Add `options' argument.
14588 * spu-low.c (spu_resume): Adjust to use resume_kind.
14589 (spu_wait): Add `options' argument.
14590
5b1c542e
PA
145912009-04-01 Pedro Alves <pedro@codesourcery.com>
14592
14593 Decouple target code from remote protocol.
14594
14595 * target.h (enum target_waitkind): New.
14596 (struct target_waitstatus): New.
14597 (struct target_ops) <wait>: Return an unsigned long. Take a
14598 target_waitstatus pointer instead of a char pointer.
14599 (mywait): Likewise.
14600 * target.c (mywait): Change prototype to return an unsigned long.
14601 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14602 * server.h (thread_from_wait, old_thread_from_wait): Delete
14603 declarations.
14604 (prepare_resume_reply): Change prototype to take a
14605 target_waitstatus.
14606 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14607 (last_status, last_ptid): New.
14608 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14609 pid instead of a signal.
14610 (attach_inferior): Remove "status" and "signal" parameters.
14611 Adjust.
14612 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14613 not as an address.
14614 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14615 (handle_v_requests, myresume): Remove "status" and "signal"
14616 parameters. Adjust.
14617 (handle_status): New.
14618 (main): Delete local `status'. Adjust.
14619 * remote-utils.c: Include target.h.
14620 (prepare_resume_reply): Change prototype to take a
14621 target_waitstatus. Adjust.
14622
14623 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14624 interface.
14625 * spu-low.c (spu_wait): Adjust.
14626 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14627 Delete.
14628 (win32_wait): Adjust.
14629
2bd7c093
PA
146302009-04-01 Pedro Alves <pedro@codesourcery.com>
14631
14632 * target.h (struct thread_resume): Delete leave_stopped member.
14633 (struct target_ops): Add a `n' argument to the `resume' callback.
14634 * server.c (start_inferior): Adjust.
14635 (handle_v_cont, myresume): Adjust.
14636 * linux-low.c (check_removed_breakpoint): Adjust to resume
14637 interface change, and to removed leave_stopped field.
14638 (resume_ptr): Delete.
14639 (struct thread_resume_array): New.
14640 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14641 resume interface change.
14642 (linux_continue_one_thread, linux_queue_one_thread)
14643 (resume_status_pending_p): Check if the resume field is NULL
14644 instead of checking the leave_stopped member.
14645 (linux_resume): Adjust to the target resume interface change.
14646 * spu-low.c (spu_resume): Adjust to the target resume interface
14647 change.
14648 * win32-low.c (win32_detach, win32_resume): Ditto.
14649
c35fafde
PA
146502009-04-01 Pedro Alves <pedro@codesourcery.com>
14651
14652 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14653 flag.
14654 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14655 pending.
14656 (linux_continue_one_thread): Only preserve the stepping flag if
14657 there's a pending breakpoint.
14658
0a59d50b
PA
146592009-03-31 Pedro Alves <pedro@codesourcery.com>
14660
14661 * server.c (main): After the inferior having exited, call
14662 remote_close before exiting gdbserver.
14663
f04c6d38
TJB
146642009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14665
14666 Fix size of FPSCR in Power 7 processors.
14667 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14668 (PPC_FEATURE_HAS_DFP): New #define.
14669 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14670 size of the FPSCR.
14671
78e5cee6
PA
146722009-03-23 Pedro Alves <pedro@codesourcery.com>
14673
14674 * server.c (handle_query) Whitespace and formatting.
14675
1b3f6016
PA
146762009-03-22 Pedro Alves <pedro@codesourcery.com>
14677
14678 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14679 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14680 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14681 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14682 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14683 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14684 Makefile.in, configure.ac: Fix whitespace throughout.
14685 * configure: Regenerate.
14686
a07b2135
PA
146872009-03-22 Pedro Alves <pedro@codesourcery.com>
14688
14689 * inferiors.c (find_inferior): Make it safe for the callback
14690 function to delete the currently iterated inferior.
14691
67cc2626
PA
146922009-03-22 Pedro Alves <pedro@codesourcery.com>
14693
14694 * Makefile.in (linuw_low_h): Move higher.
14695 (thread-db.o): Depend on $(linux_low_h).
14696
54a0b537
PA
146972009-03-17 Pedro Alves <pedro@codesourcery.com>
14698
14699 Rename "process" to "lwp" throughout.
14700
14701 * linux-low.c (all_processes): Rename to...
14702 (all_lwps): ... this.
14703 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14704 (add_process): Rename to ...
14705 (add_lwp): ... this. Adjust.
14706 (linux_create_inferior): Adjust.
14707 (linux_attach_lwp): Adjust.
14708 (linux_attach): Adjust.
14709 (linux_kill_one_process): Rename to ...
14710 (linux_kill_one_lwp): ... this. Adjust.
14711 (linux_kill): Adjust.
14712 (linux_detach_one_process): Rename to ...
14713 (linux_detach_one_lwp): ... this. Adjust.
14714 (linux_detach): Adjust.
14715 (check_removed_breakpoint): Adjust.
14716 (status_pending_p): Adjust.
14717 (linux_wait_for_process): Rename to ...
14718 (linux_wait_for_lwp): ... this. Adjust.
14719 (linux_wait_for_event): Adjust.
14720 (send_sigstop): Adjust.
14721 (wait_for_sigstop): Adjust.
14722 (stop_all_processes): Rename to ...
14723 (stop_all_lwps): ... this.
14724 (linux_resume_one_process): Rename to ...
14725 (linux_resume_one_lwp): ... this. Adjust.
14726 (linux_set_resume_request, linux_continue_one_thread)
14727 (linux_queue_one_thread, resume_status_pending_p)
14728 (usr_store_inferior_registers, regsets_store_inferior_registers)
14729 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14730 Adjust.
14731 * linux-low.h (get_process): Rename to ...
14732 (get_lwp): ... this. Adjust.
14733 (get_thread_process): Rename to ...
14734 (get_thread_lwp): ... this. Adjust.
14735 (get_process_thread): Rename to ...
14736 (get_lwp_thread): ... this. Adjust.
14737 (struct process_info): Rename to ...
14738 (struct lwp_info): ... this.
14739 (all_processes): Rename to ...
14740 (all_lwps): ... this.
14741 * proc-service.c (ps_lgetregs): Adjust.
14742 * thread-db.c (thread_db_create_event, find_one_thread)
14743 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14744
0b16c5cf
PA
147452009-03-14 Pedro Alves <pedro@codesourcery.com>
14746
14747 * server.c (handle_query): Handle "qAttached".
14748
32de4b9d
NS
147492009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14750
14751 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14752 GPLv3, update license URL.
14753
2aecd87f
DE
147542009-03-01 Doug Evans <dje@google.com>
14755
93efd302 14756 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14757 (server_h): Add gdb_signals.h.
14758 (signals.o): Update.
14759 * server.h (target_signal_from_host,target_signal_to_host_p)
14760 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14761
86b1f9c5
PM
147622009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14763
14764 * remote-utils.c (getpkt): Also generate remote-debug
14765 information if noack_mode is set.
14766
4aa995e1
PA
147672009-02-06 Pedro Alves <pedro@codesourcery.com>
14768
14769 * server.c (handle_query): Report qXfer:siginfo:read and
14770 qXfer:siginfo:write as supported and handle them.
14771 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14772 * linux-low.c (linux_xfer_siginfo): New.
14773 (linux_target_ops): Set it.
14774
62709adf
PA
147752009-01-26 Pedro Alves <pedro@codesourcery.com>
14776
14777 * server.c (gdbserver_usage): Mention --remote-debug.
14778 (main): Accept '--remote-debug' switch.
14779
aef93bd7
DE
147802009-01-18 Doug Evans <dje@google.com>
14781
14782 * regcache.c (new_register_cache): No need to check result of xcalloc.
14783 * server.c (handle_search_memory): Back out calls to xmalloc,
14784 result is checked and error is returned to user upon failure.
14785 (handle_query): Ditto. Add more checks for result of malloc.
14786 (handle_v_cont): Check result of malloc, report error back to
14787 user upon failure.
14788 (handle_v_run): Ditto. Call freeargv.
14789 * server.h (freeargv): Declare.
14790 * utils.c (freeargv): New fn.
14791
54363045
DE
147922009-01-15 Doug Evans <dje@google.com>
14793
f626972c
DE
14794 * gdbreplay.c (perror_with_name): Make arg const char *.
14795 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14796 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14797 * utils.c (perror_with_name): Make arg const char *.
54363045 14798
18aae699
PA
147992009-01-14 Pedro Alves <pedro@codesourcery.com>
14800
14801 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14802 when handling a EXIT_PROCESS_DEBUG_EVENT.
14803
ff703abe
JB
148042009-01-06 Joel Brobecker <brobecker@adacore.com>
14805
14806 * gdbreplay.c (gdbreplay_version): Update copyright year.
14807 * server.c (gdbserver_version): Likewise.
14808
f21cc1a2 148092009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14810
14811 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14812 (handle_extended_wait): Improve comment.
0e21c1ec 14813
bca929d3
DE
148142008-12-13 Doug Evans <dje@google.com>
14815
14816 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14817 * server.h (ATTR_MALLOC): New macro.
14818 (xmalloc,xcalloc,xstrdup): Declare.
14819 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14820 * inferiors.c: Ditto.
14821 * linux-low.c: Ditto.
14822 * mem-break.c: Ditto.
14823 * regcache.c: Ditto.
14824 * remote-utils.c: Ditto.
14825 * server.c: Ditto.
14826 * target.c: Ditto.
14827 * win32-low.c: Ditto.
14828
97438e3f
DE
148292008-12-12 Doug Evans <dje@google.com>
14830
896c7fbb
DE
14831 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14832 in debugging printf.
14833
97438e3f
DE
14834 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14835
e3b886f8
DE
148362008-12-09 Doug Evans <dje@google.com>
14837
14838 * linux-low.h (struct process_info): Delete member tid, unused.
14839 * thread-db.c (find_one_thread): Update.
14840 (maybe_attach_thread): Update.
14841
07e059b5
VP
148422008-12-02 Pedro Alves <pedro@codesourcery.com>
14843
889bf7c5
PA
14844 * target.h (struct target_ops): Add qxfer_osdata member.
14845 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14846 and dirent.h.
14847 (linux_qxfer_osdata): New functions.
14848 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14849 callback.
14850 * server.c (handle_query): Handle "qXfer:osdata:read:".
14851 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14852 (buffer_xml_printf): New functions.
14853 * server.h (struct buffer): New.
14854 (buffer_grow_str, buffer_grow_str0): New macros.
14855 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14856 (buffer_xml_printf): Declare.
07e059b5 14857
4cab47ab
DE
148582008-11-24 Doug Evans <dje@google.com>
14859
14860 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14861
f142445f
DJ
148622008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * server.c (handle_v_run): Always use the supplied argument list.
14865
d0107bb6 148662008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14867
d0107bb6
BW
14868 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14869 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14870
2c4ad781
TJB
148712008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14872
14873 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14874 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14875 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14876 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14877 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14878 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14879 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14880 XML target descriptions.
14881 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14882 when inferior is running on an ISA 2.05 or later processor. Add
14883 special case to return offset for full 64-bit slot of FPSCR when
14884 in 32-bits.
14885
dfb64f85
DJ
148862008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14887
14888 * Makefile.in (SFILES, clean): Added sparc64 files.
14889 (reg-sparc64.o, reg-sparc64.c): New.
14890 * configure.srv (sparc*-*-linux*): New configuration.
14891 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14892 syscall arguments for SPARC.
14893 (regsets_store_inferior_registers): Likewise.
14894 * linux-sparc-low.c: New file.
14895
66b6e1dd
DE
148962008-10-21 Doug Evans <dje@google.com>
14897
14898 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14899 (READLINE_DIR,READLINE_DEP): Delete.
14900 (INTERNAL_CFLAGS): Update.
14901 (LINTFLAGS): Update.
14902
9b710a42
PA
149032008-10-10 Pedro Alves <pedro@codesourcery.com>
14904
14905 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14906 whole argv from the last run, not just argv[0].
14907
5822d809
PA
149082008-09-08 Pedro Alves <pedro@codesourcery.com>
14909
14910 * regcache.c (new_register_cache): Return NULL if the register
14911 cache size isn't known yet.
14912 (free_register_cache): Avoid dereferencing a NULL regcache.
14913
74aac56f
DJ
149142008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14915
14916 * configure.srv: Merge MIPS and MIPS64.
14917
400b20f5
MR
149182008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14919
14920 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14921
677c5bb1
LM
149222008-08-18 Luis Machado <luisgpm@br.ibm.com>
14923
14924 * Makefile.in: Add required vsx dependencies.
14925
14926 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14927 Declare init_registers_powerpc_vsx32l.
14928 Declare init_registers_powerpc_vsx64l.
14929 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14930 (ppc_arch_setup): Check for VSX in hwcap.
14931 (ppc_fill_vsxregset): New function.
14932 (ppc_store_vsxregset): New function.
14933 Add new VSX entry in regset_info target_regsets.
14934
14935 * configure.srv: Add new VSX dependencies.
14936
a6f3e723
SL
149372008-08-12 Pedro Alves <pedro@codesourcery.com>
14938
14939 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14940 (remote_open): Set or clear transport_is_reliable.
14941 (putpkt_binary): Don't expect acks in noack mode.
14942 (getpkt): Don't send ack/nac in noack mode.
14943 * server.c (handle_general_set): Handle QStartNoAckMode.
14944 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14945 qSupported.
14946 (main): Reset noack_mode on every connection.
14947 * server.h (noack_mode): Declare.
14948
a417dc56
RW
149492008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14950
14951 * Makefile.in (GDBREPLAY_OBS): New variable.
14952 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14953
3221518c
UW
149542008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14955 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14958 (usr_store_inferior_registers): Likewise.
14959 (regsets_store_inferior_registers): Likewise.
14960
ec56be1b
PA
149612008-07-31 Rolf Jansen <rj@surtec.com>
14962 Pedro Alves <pedro@codesourcery.com>
14963
14964 * configure.ac: Check for memmem declaration.
14965 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14966 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14967 (disable_packet_qfThreadInfo): Unconditionally compile.
14968 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14969 * configure, config.in: Regenerate.
14970
2fe5e3ff
DE
149712008-07-28 Doug Kwan <dougkwan@google.com>
14972
14973 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14974 (linux_write_memory): Remove declaration of errno.
14975
836acd6d
UW
149762008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14977
14978 * linux-low.c (handle_extended_wait): Do not use "status"
14979 variable uninitialized.
14980
aeba519e
PA
149812008-07-07 Pedro Alves <pedro@codesourcery.com>
14982
14983 * server.c (handle_v_attach): Inhibit reporting dll changes.
14984
db42f210
PA
149852008-06-27 Pedro Alves <pedro@codesourcery.com>
14986
14987 * remote-utils.c (prepare_resume_reply): If requested, don't
14988 output "thread:TID" in the T stop reply.
14989
14990 * server.c (disable_packet_vCont, disable_packet_Tthread)
14991 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14992 (handle_query): If requested, disable support for qC, qfThreadInfo
14993 and qsThreadInfo.
14994 (handle_v_requests): If requested, disable support for vCont.
14995 (gdbserver_show_disableable): New.
14996 (main): Handle --disable-packet and --disable-packet=LIST.
14997
14998 * server.h (disable_packet_vCont, disable_packet_Tthread)
14999 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15000
8e4c5421
CD
150012008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15002
15003 * server.c (gdbserver_usage): Mention --version.
15004
6e23a804
DJ
150052008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15006
15007 * Makefile.in (gdbreplay.o): New rule.
15008
90aa6a40
JM
150092008-06-06 Joseph Myers <joseph@codesourcery.com>
15010
15011 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15012 message, not gdbserver.
15013
c16158bc 150142008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15015 Nathan Sidwell <nathan@codesourcery.com>
15016 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15017
15018 * acinclude.m4: Include ../../config/acx.m4.
15019 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15020 * configure, config.in: Regenerate.
15021 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15022 * server.c (gdbserver_version): Print PKGVERSION.
15023 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15024 (main): Adjust gdbserver_usage calls.
15025 * gdbreplay.c (version, host_name): Add declarations.
15026 (gdbreplay_version, gdbreplay_usage): New.
15027 (main): Accept --version and --help options.
15028
aeb75bf5
DJ
150292008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15030
15031 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15032 (arm_breakpoint_at): Handle Thumb.
15033 (the_low_target): Add comment.
15034
76b233dd
UW
150352008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15036
15037 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15038
08388c79
DE
150392008-05-09 Doug Evans <dje@google.com>
15040
a3c83fae
DE
15041 * server.h (decode_search_memory_packet): Declare.
15042 * remote-utils.c (decode_search_memory_packet): New fn.
15043 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15044 (handle_search_memory): New fn.
15045 (handle_query): Process qSearch:memory packets.
15046
bb9c3d36
UW
150472008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15048
15049 * regcache.c (registers_length): Remove.
15050 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15051 full register packet.
15052 * regcache.h (registers_length): Remove prototype.
15053 * server.h (PBUFSIZ): Define to 16384.
15054
7284e1be
UW
150552008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15056
15057 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15058 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15059 powerpc-64l.o, and powerpc-altivec64l.o.
15060 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15061 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15062 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15063 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15064 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15065 to srv_xmlfiles.
15066
15067 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15068 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15069 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15070 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15071 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15072 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15073 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15074 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15075 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15076 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15077 (clean): Update.
15078
15079 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15080 (init_registers_powerpc_32l): ... this new prototype.
15081 (init_registers_powerpc_32): Remove, replace by ...
15082 (init_registers_powerpc_altivec32l): ... this new prototype.
15083 (init_registers_powerpc_e500): Remove, replace by ...
15084 (init_registers_powerpc_e500l): ... this new prototype.
15085 (init_registers_ppc64): Remove, replace by ...
15086 (init_registers_powerpc_64l): ... this new prototype.
15087 (init_registers_powerpc_64): Remove, replace by ...
15088 (init_registers_powerpc_altivec64l): ... this new prototype.
15089 (ppc_num_regs): Set to 73.
15090 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15091 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15092 (ppc_cannot_store_register): Handle orig_r3 and trap.
15093 (ppc_arch_setup): Update init_registers_... calls.
15094 (ppc_fill_gregset): Handle orig_r3 and trap.
15095
15096 * inferiors.c (clear_inferiors): Reset current_inferior.
15097
fdc59709
PB
150982008-04-23 Paolo Bonzini <bonzini@gnu.org>
15099
889bf7c5
PA
15100 * acinclude.m4: Add override.m4.
15101 * configure: Regenerate.
fdc59709 15102
c9b2f845
UW
151032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15104
15105 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15106 initial call to init_register_ppc64.
15107
550512b8
UW
151082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15109
43aaf8b6
PA
15110 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15111 single powerpc*-*-linux* case.
550512b8
UW
15112 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15113
b6430ec3
UW
151142008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15115
15116 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15117 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15118 from reg_xmlfiles.
15119 * linux-ppc-low.c: Include <elf.h>.
15120 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15121 (ppc_hwcap): New global variable.
15122 (ppc_regmap): Remove __SPE__ #ifdef sections.
15123 (ppc_regmap_e500): New global variable.
15124 (ppc_cannot_store_register): Update __SPE__ special case.
15125 (ppc_get_hwcap): New function.
15126 (ppc_arch_setup): Use it to determine whether inferior supports
15127 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15128 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15129 Do not access registers if target does not support AltiVec.
15130 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15131 Do not access registers if target does not support SPE.
15132 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15133
52fa2412
UW
151342008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15135
15136 * linux-low.c (disabled_regsets, num_regsets): New.
15137 (use_regsets_p): Delete.
15138 (linux_wait_for_process): Clear disabled_regsets.
15139 (regsets_fetch_inferior_registers): Check and set it.
15140 (regsets_store_inferior_registers): Likewise.
15141 (linux_fetch_registers, linux_store_registers): Do not use
15142 use_regsets_p.
15143 (initialize_low): Allocate disabled_regsets.
15144
e28b3332
DJ
151452008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15146
15147 * Makefile.in (LIBOBJS): New.
15148 (OBS): Use LIBOBJS.
15149 (memmem.o): New rule.
15150 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15151 * configure: Regenerated.
15152
4536995d
UW
151532008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15154
15155 * server.c (handle_query): Never return "unsupported" for
15156 qXfer:features:read queries.
15157
221c031f
UW
151582008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15159
15160 * server.c (get_features_xml): Fix inverted condition.
15161 (handle_query): Always support qXfer:feature:read.
15162
ccd213ac
DJ
151632008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15164
15165 * server.c (wrapper_argv): New.
15166 (start_inferior): Handle wrapper_argv. If set, expect an extra
15167 trap.
15168 (gdbserver_usage): Document --wrapper.
15169 (main): Parse --wrapper.
15170
6fe305f7
UW
151712008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15172
15173 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15174 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15175 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15176 (ppc_set_pc): Likewise.
15177 (ppc_arch_setup): New function.
15178 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15179 of collect_register.
889bf7c5 15180 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15181
5b0a002e
UW
151822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15183
15184 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15185 instead of linux-ppc64-low.o.
15186 * linux-ppc64-low.c: Remove file.
15187 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15188 (linux-ppc64-low.o): Remove rule.
15189
15190 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15191 (init_registers_powerpc_64): Likewise.
15192 (ppc_regmap): Conditionally define depending on __powerpc64__.
15193 (ppc_cannot_store_register): Do not special-case "fpscr" when
15194 compiled on __powerpc64__.
15195 (ppc_collect_ptrace_register): New function.
15196 (ppc_supply_ptrace_register): New function.
15197 (ppc_breakpoint): Change type to "unsigned int".
15198 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15199 (the_low_target): Conditionally provide initializers for the
889bf7c5 15200 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15201 collect_ptrace_register and supply_ptrace_register members.
15202
9b4b61c8
UW
152032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15204
15205 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15206 * server.c (gdbserver_xmltarget): Define.
15207 (get_features_xml): Use it to replace "target.xml" and arch_string.
15208
15209 * configure.srv: Remove srv_xmltarget. Add XML files that were
15210 mentioned there to srv_xmlfiles instead. Remove conditional tests
15211 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15212 srv_xmlfiles and srv_regobj to include all possible choices.
15213 * configure.ac (srv_xmltarget): Remove.
15214 (srv_xmlfiles): Do not add "target.xml".
15215 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15216 checks for supplementary target information.
15217 * configure: Regenerate.
15218 * Makefile.in (XML_TARGET): Remove.
15219 (target.xml): Remove rule.
15220 (clean): Do not clean up target.xml.
15221 (.PRECIOUS): Do not mention target.xml.
15222
15223 * target.h (struct target_ops): Remove arch_string member.
15224 * linux-low.c (linux_arch_string): Remove.
15225 (linux_target_ops): Remove arch_string initializer.
15226 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15227 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15228 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15229 * spu-low.c (spu_arch_string): Remove.
15230 (spu_target_ops): Remove arch_string initializer.
15231 * win32-low.c (win32_arch_string): Remove.
15232 (win32_target_ops): Remove arch_string initializer.
15233 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15234 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15235 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15236
ee1a7ae4
UW
152372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15238
15239 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15240 by collect_ptrace_register and supply_ptrace_register hooks.
15241 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15242 instead of checking for the_low_target.left_pad_xfer.
15243 (usr_store_inferior_registers): Use collect_ptrace_register callback
15244 instead of checking for the_low_target.left_pad_xfer.
15245
15246 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15247 (s390_supply_ptrace_register): Likewise.
15248 (s390_fill_gregset): Call s390_collect_ptrace_register.
15249 (the_low_target): Update.
15250
15251 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15252 (ppc_supply_ptrace_register): Likewise.
15253 (the_low_target): Update.
15254
15255 * linux-i386-low.c (the_low_target): Update.
15256 * linux-x86-64-low.c (the_low_target): Update.
15257
d61ddec4
UW
152582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15259
15260 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15261 reg-s390.o and reg-s390x.o.
15262
15263 * linux-low.c (new_inferior): New global variable.
15264 (linux_create_inferior, linux_attach): Set it.
15265 (linux_wait_for_process): Call the_low_target.arch_setup after the
15266 target has stopped for the first time.
15267 (initialize_low): Do not call the_low_target.arch_setup.
15268
15269 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15270 (s390_set_pc): Likewise.
15271 (s390_arch_setup): New function.
15272 (the_low_target): Use s390_arch_setup as arch_setup routine.
15273
15274 * regcache.c (realloc_register_cache): New function.
15275 (set_register_cache): Call it for each existing regcache.
15276
d05b4ac3
UW
152772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15278
15279 * server.h (init_registers): Remove prototype.
15280
15281 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15282 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15283 instead of init_registers ().
15284 * linux-arm-low.c (init_registers_arm): Add prototype.
15285 (init_registers_arm_with_iwmmxt): Likewise.
15286 (the_low_target): Add initializer for arch_setup field.
15287 * linux-cris-low.c (init_registers_cris): Add prototype.
15288 (the_low_target): Add initializer for arch_setup field.
15289 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15290 (the_low_target): Add initializer for arch_setup field.
15291 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15292 (the_low_target): Add initializer for arch_setup field.
15293 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15294 (the_low_target): Add initializer for arch_setup field.
15295 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15296 (the_low_target): Add initializer for arch_setup field.
15297 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15298 (the_low_target): Add initializer for arch_setup field.
15299 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15300 (init_registers_mips64_linux): Likewise.
15301 (the_low_target): Add initializer for arch_setup field.
15302 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15303 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15304 (the_low_target): Add initializer for arch_setup field.
15305 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15306 (init_registers_powerpc_64): Likewise.
15307 (the_low_target): Add initializer for arch_setup field.
15308 * linux-s390-low.c (init_registers_s390): Add prototype.
15309 (init_registers_s390x): Likewise.
15310 (the_low_target): Add initializer for arch_setup field.
15311 * linux-sh-low.c (init_registers_sh): Add prototype.
15312 (the_low_target): Add initializer for arch_setup field.
15313 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15314 (the_low_target): Add initializer for arch_setup field.
15315 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15316 (the_low_target): Add initializer for arch_setup field.
15317
15318 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15319 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15320 instead of init_registers ().
15321 * win32-arm-low.c (init_registers_arm): Add prototype.
15322 (the_low_target): Add initializer for arch_setup field.
15323 * win32-i386-low.c (init_registers_i386): Add prototype.
15324 (the_low_target): Add initializer for arch_setup field.
15325
15326 * spu-low.c (init_registers_spu): Add prototype.
15327 (initialize_low): Call initialie_registers_spu () instead of
15328 initialize_registers ().
15329
fd96d250
PA
153302008-02-19 Pedro Alves <pedro@codesourcery.com>
15331
15332 * server.c (handle_v_requests): When handling the vRun and vAttach
15333 packets, if already debugging a process, don't kill it. Return an
15334 error instead.
15335
d41b6bb4
DJ
153362008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * server.c (handle_query): Correct length check.
15339
5ac588cf
PA
153402008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15341
15342 * win32-low.c (do_initial_child_stuff): Add process handle
15343 parameter. Set current_process_handle and current_process_id from the
15344 parameters. Clear globals.
15345 (win32_create_inferior): Don't set current_process_handle and
15346 current_process_id here. Instead pass them on the call to
15347 do_initial_child_stuff.
15348 (win32_attach): Likewise.
15349 (win32_clear_inferiors): New.
15350 (win32_kill): Don't close the current process handle or the
15351 current thread handle here. Instead call win32_clear_inferiors.
15352 (win32_detach): Don't open a new handle to the process. Call
15353 win32_clear_inferiors.
15354 (win32_join): Don't rely on current_process_handle; open a new
15355 handle using the process id.
15356 (win32_wait): Call win32_clear_inferiors when the inferior process
15357 has exited.
15358
ecd7ecbc
DJ
153592008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * server.c (monitor_show_help): Add "exit".
15362
1525d545
MG
153632008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15364
ecd7ecbc 15365 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15366 (clean): Add reg-xtensa.c.
15367 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15368 * configure.srv (xtensa*-*-linux*) New target.
15369 * linux-xtensa-low.c: New.
15370 * xtensa-xtregs.c: New.
1525d545 15371
59a016f0
PA
153722008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15373
15374 * hostio.c: Don't include errno.h.
15375 (errno_to_fileio_errno): Move to hostio-errno.
15376 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15377 error number outputting to the target->hostio_last_error callback.
15378 (hostio_packet_error): Use FILEIO_EINVAL directly.
15379 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15380 calls to hostio_error.
15381 * hostio-errno.c: New.
15382 * server.h (hostio_last_error_from_errno): Declare.
15383 * target.h (target_ops): Add hostio_last_error member.
15384 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15385 as hostio_last_error handler.
889bf7c5 15386 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15387 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15388 (wince_hostio_last_error): New functions.
15389 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15390 as hostio_last_error handler.
15391 (win32_target_ops) [!_WIN32_WCE]: Register
15392 hostio_last_error_from_errno as hostio_last_error handler.
15393 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15394 (hostio-errno.o): New rule.
15395 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15396 * configure.srv (srv_hostio_err_objs): New variable. Default to
15397 hostio-errno.o.
15398 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15399 * configure: Regenerate.
15400
2d717e4f
DJ
154012008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15402
15403 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15404 (linux_kill, linux_detach): Clean up the process list.
15405 * remote-utils.c (remote_open): Improve port number parsing.
15406 (putpkt_binary, input_interrupt): Only send interrupts if the target
15407 is running.
15408 * server.c (extended_protocol): Make static.
15409 (attached): Define earlier.
15410 (exit_requested, response_needed, program_argv): New variables.
15411 (target_running): New.
15412 (start_inferior): Clear attached here.
15413 (attach_inferior): Set attached here.
15414 (require_running): Define.
15415 (handle_query): Use require_running and target_running. Implement
15416 "monitor exit".
15417 (handle_v_attach, handle_v_run): New.
15418 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15419 (gdbserver_usage): Update.
15420 (main): Redo argument parsing. Handle --debug and --multi. Handle
15421 --attach along with other options or after the port. Save
15422 program_argv. Support no initial program. Resynchronize
15423 communication with GDB after an error. Handle "monitor exit".
15424 Use require_running and target_running. Always allow the extended
15425 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15426 restart in extended mode.
15427 * README: Refer to the GDB manual. Update --attach usage.
15428
7407e2de
AS
154292007-12-20 Andreas Schwab <schwab@suse.de>
15430
15431 * linux-low.c (STACK_SIZE): Define.
15432 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15433 (linux_test_for_tracefork): Likewise.
15434
b65d95c5
DJ
154352007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * linux-low.c (linux_wait_for_event): Update messages. Do not
15438 reinsert auto-delete breakpoints.
15439 * mem-break.c (struct breakpoint): Change return type of handler to
15440 int.
15441 (set_breakpoint_at): Update handler type.
15442 (reinsert_breakpoint_handler): Return 1 instead of calling
15443 delete_breakpoint.
15444 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15445 setting a new one.
15446 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15447 * mem-break.h (set_breakpoint_at): Update handler type.
15448 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15449 * win32-low.c (auto_delete_breakpoint): New.
15450 (get_child_debug_event): Use it.
15451
4e799345
DJ
154522007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15453
15454 * configure.ac: Check for pread and pwrite.
15455 * hostio.c (handle_pread): Fall back to lseek and read.
15456 (handle_pwrite): Fall back to lseek and write.
15457 * config.in, configure: Regenerated.
15458
27524b67
DJ
154592007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15460
15461 * server.c (myresume): Add own_buf argument.
15462 (main): Update calls.
15463
a20d5e98
DJ
154642007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15465
15466 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15467 * remote-utils.c (remote_open): Do not call disable_async_io.
15468 (block_async_io): Delete.
15469 (unblock_async_io): Make static.
15470 (initialize_async_io): New.
15471 * server.c (handle_v_cont): Handle async I/O here.
15472 (myresume): Likewise. Move other common resume tasks here...
15473 (main): ... from here. Call initialize_async_io. Disable async
15474 I/O before the main loop.
15475 * server.h (initialize_async_io): Declare.
15476 (block_async_io, unblock_async_io): Delete prototypes.
15477 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15478
b79d787e
DJ
154792007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15480
15481 * remote-utils.c (readchar): Allow binary data in received messages.
15482
d97903b2
PA
154832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15484
15485 * win32-low.c (attaching): New global.
15486 (win32_create_inferior): Clear the `attaching' global.
15487 (win32_attach): Set the `attaching' global.
15488 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15489 attaching. Only set a breakpoint at the entry point if not
15490 attaching.
15491
311de423
PA
154922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15493
15494 * server.c (main): Don't report dll events on the initial
15495 connection on attaches.
15496
6c2d16d2
PA
154972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15498
15499 * server.c (main): Relax numerical bases supported for the pid of
15500 the --attach command line argument.
15501
5ca906e6
PA
155022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15503
15504 * win32-low.c (win32_attach): Call OpenProcess before
15505 DebugActiveProcess, not after. Add last error output to error
15506 call.
15507
9c6c8194
PA
155082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15509
15510 * win32-low.c (win32_get_thread_context)
15511 (win32_set_thread_context): New functions.
15512 (thread_rec): Use win32_get_thread_context.
15513 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15514 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15515 field.
15516
4d5d1aaa
PA
155172007-12-03 Leo Zayas
15518 Pedro Alves <pedro_alves@portugalmail.pt>
15519
15520 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15521 global variables.
15522 (child_add_thread): Minor cleanup.
15523 (child_continue): Resume artificially suspended threads before
15524 calling ContinueDebugEvent.
15525 (suspend_one_thread): New.
15526 (fake_breakpoint_event): New.
15527 (get_child_debug_event): Change return type to int. Check here if
15528 gdb sent an interrupt request. If a soft interrupt was requested,
15529 fake a breakpoint event. Return 0 if there is no event to handle,
15530 and 1 otherwise.
15531 (win32_wait): Don't check here if gdb sent an interrupt request.
15532 Ensure there is a valid event to handle.
15533 (win32_request_interrupt): Add soft interruption method as last
15534 resort.
15535
c436e841
PA
155362007-12-03 Leo Zayas
15537 Pedro Alves <pedro_alves@portugalmail.pt>
15538
15539 * win32-low.h (win32_thread_info): Add descriptions to the
15540 structure members. Replace `suspend_count' counter by a
15541 `suspended' flag.
15542 * win32-low.c (thread_rec): Update condition of when to get the
15543 context from the inferior. Rely on ContextFlags being set if it
15544 has already been retrieved. Only suspend the inferior thread if
15545 we haven't already. Warn if that fails.
15546 (continue_one_thread): s/suspend_count/suspended/. Only call
15547 ResumeThread once. Warn if that fails.
15548
e7b5fa67
PA
155492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15550
15551 * win32-low.c (win32_wait): Don't read from the inferior when it
15552 has already exited.
15553
a385171d
PA
155542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15555
15556 * Makefile.in (win32_low_h): New variable.
15557 (win32-low.o): Add dependency on $(win32_low_h).
15558 (win32-arm-low.o, win32-i386-low.o): New rules.
15559
f80c84b3
DJ
155602007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15561
15562 * hostio.c: Correct copyright year.
15563
a6b151f1
DJ
155642007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * Makefile.in (OBS): Add hostio.o.
15567 (hostio.o): New rule.
15568 * server.h (handle_vFile): Declare.
15569 * hostio.c: New file.
15570 * server.c (handle_v_requests): Take packet_len and new_packet_len
15571 for binary packets. Call handle_vFile.
15572 (main): Update call to handle_v_requests.
15573
f9387fc3
DJ
155742007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * linux-low.c: Include <sched.h>.
15577
51c2684e
DJ
155782007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15579
15580 * linux-low.c (linux_tracefork_grandchild): New.
15581 (linux_tracefork_child): Use clone.
15582 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15583
75f83163
JB
155842007-10-31 Joel Brobecker <brobecker@adacore.com>
15585
15586 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15587
da5898ce
DJ
155882007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15589
15590 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15591
24a09b5f
DJ
155922007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15593
15594 * inferiors.c (change_inferior_id): Delete.
15595 (add_pid_to_list, pull_pid_from_list): New.
15596 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15597 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15598 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15599 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15600 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15601 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15602 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15603 (using_threads): Always set to 1.
15604 (handle_extended_wait): New.
15605 (add_process): Do not set TID.
15606 (linux_create_inferior): Set must_set_ptrace_flags.
15607 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15608 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15609 (linux_thread_alive): Rename TID argument to LWPID.
15610 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15611 (linux_wait_for_event): Do not use TID or check using_threads. Update
15612 call to dead_thread_notify. Call handle_extended_wait.
15613 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15614 (send_sigstop): Delete sigstop_sent.
15615 (wait_for_sigstop): Avoid TID.
15616 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15617 (linux_test_for_tracefork): New.
15618 (linux_lookup_signals): Use thread_db_active and
15619 linux_supports_tracefork_flag.
15620 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15621 * linux-low.h (get_process_thread): Avoid TID.
15622 (struct process_ifo): Move thread_known and tid to the end. Remove
15623 sigstop_sent.
15624 (linux_attach_lwp, thread_db_init): Update prototypes.
15625 * server.h (change_inferior_id): Delete prototype.
15626 (add_pid_to_list, pull_pid_from_list): New prototypes.
15627 * thread-db.c (thread_db_use_events): New.
15628 (find_first_thread): Rename to...
15629 (find_one_thread): ...this. Update callers and messages. Do not
15630 call fatal. Check thread_db_use_events. Do not call
15631 change_inferior_id or new_thread_notify.
15632 (maybe_attach_thread): Update. Do not call new_thread_notify.
15633 (thread_db_init): Set thread_db_use_events. Check use_events.
15634 * utils.c (fatal, warning): Correct message prefix.
15635
30ed0a8f
DJ
156362007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15637
15638 * Makefile.in (clean): Remove new files.
15639 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15640 (powerpc-64.o, powerpc-64.c): New rules.
15641 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15642 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15643 with SPE.
15644 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15645 SPE targets.
15646 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15647 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15648 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15649 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15650 (target_regsets): Add AltiVec and SPE register sets.
15651 * configure.ac: Check for AltiVec and SPE.
15652 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15653 (ppc_fill_vrregset, ppc_store_vrregset): New.
15654 (target_regsets): Add AltiVec register set.
15655 * configure: Regenerated.
15656
fd462a61
DJ
156572007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15658
15659 * linux-low.c (O_LARGEFILE): Define.
15660 (linux_read_memory): Use /proc/PID/mem.
15661 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15662 * configure, config.in: Regenerated.
15663
69f223ed
DJ
156642007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15665
15666 * linux-low.c (linux_wait_for_event): Do not pass signals while
15667 single-stepping.
15668
aec18585
PA
156692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15670
15671 * win32-low.c (create_process): New.
15672 (win32_create_inferior): Use create_process instead of
15673 CreateProcess. If create_process failed retry appending an ".exe"
15674 suffix. Store the GetLastError result immediatelly after
15675 create_process calls and use it on the call to error.
15676
34d86ddd
PA
156772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15678
15679 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15680
5a0e3bd0
JB
156812007-08-23 Joel Brobecker <brobecker@adacore.com>
15682
15683 * configure.ac: Switch license to GPLv3.
15684
f88c79e6
MS
156852007-08-01 Michael Snyder <msnyder@access-company.com>
15686
15687 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15688
6b3d9b83
PA
156892007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15690
15691 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15692 typedef.
15693 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15694 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15695 CloseToolhelp32Snapshot.
15696 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15697 CloseToolhelp32Snapshot.
15698
c588c53c
MS
156992007-07-27 Michael Snyder <michael.snyder@access-company.com>
15700
15701 * server.c (main): Check for inferior exit before main loop.
15702
aa0403d9
PA
157032007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15704
15705 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15706 instead of on tmp_desc.
15707
255e7678
DJ
157082007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15709 Daniel Jacobowitz <dan@codesourcery.com>
15710
15711 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15712 (add_thread): Minor cleanups.
15713 (clear_inferiors): Move lower in the file. Clear the DLL
15714 list.
15715 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15716 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15717 (xml_escape_text): New.
15718 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15719 for qSupported.
15720 (handle_v_cont): Report errors.
15721 (gdbserver_version): Update.
15722 (main): Correct size of own_buf. Do not report initial DLL events.
15723 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15724 (unloaded_dll, xml_escape_text): New.
15725 * win32-low.c (enum target_waitkind): Update comments.
15726 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15727 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15728 (win32_EnumProcessModules, win32_GetModuleInformation)
15729 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15730 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15731 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15732 (win32_Module32First, win32_Module32Next, load_toolhelp)
15733 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15734 (get_child_debug_event): Handle DLL events.
15735 (win32_wait): Likewise.
15736
0d37add9
DJ
157372007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15738
15739 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15740 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15741
45e2715e
PA
157422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15743
15744 * win32-low.c (handle_output_debug_string): Ignore event if not
15745 waiting.
15746
c5674cf1
PA
157472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15748
15749 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15750
2bbe3cc1
DJ
157512007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15752
15753 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15754
ae13219e
DJ
157552007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * inferiors.c (change_inferior_id): Add comment.
15758 * linux-low.c (check_removed_breakpoint): Add an early
15759 prototype. Improve debug output.
15760 (linux_attach): Doc update.
15761 (linux_detach_one_process, linux_detach): Clean up before releasing
15762 each process.
15763 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15764 * linux-low.h (struct process_info): Doc improvement.
15765 * mem-break.c (delete_all_breakpoints): New.
15766 * mem-break.h (delete_all_breakpoints): New prototype.
15767 * thread-db.c (find_first_thread): New.
15768 (thread_db_create_event): Call it instead of
15769 thread_db_find_new_threads. Clean up unused variables.
15770 (maybe_attach_thread): Remove first thread handling.
15771 (thread_db_find_new_threads): Use find_first_thread.
15772 (thread_db_get_tls_address): Likewise.
15773
4105de34
DJ
157742007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15775
15776 * thread-db.c (thread_db_find_new_threads): Add prototype.
15777 (thread_db_create_event): Check for the main thread before adding
15778 a new thread.
15779 (maybe_attach_thread): Only enable event reporting if TID == 0.
15780 (thread_db_get_tls_address): Check for new threads.
15781
2b876972
DJ
157822007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15783
15784 * linux-low.c (linux_create_inferior): Try execv before execvp.
15785 * spu-low.c (spu_create_inferior): Likewise.
15786
7a245884
DJ
157872007-06-13 Mike Frysinger <vapier@gentoo.org>
15788
15789 * linux-low.c (linux_create_inferior): Change execv to execvp.
15790 * spu-low.c (spu_create_inferior): Likewies.
15791
117ce543
DJ
157922007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * Makefile.in (clean): Clean new files instead of deleted ones.
15795 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15796 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15797 rules.
15798 * configure.srv: Specify XML files and new regformats for MIPS and
15799 MIPS64 GNU/Linux.
15800 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15801 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15802 an entry for the restart register.
15803 (mips_cannot_fetch_register, mips_cannot_store_register)
15804 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15805 register names to match the XML descriptions.
15806 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15807 restart register instead of $0.
15808
0e7f50da
UW
158092007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15810 Markus Deuling <deuling@de.ibm.com>
15811
15812 * remote-utils.c (decode_xfer_write): New function.
15813 * server.h (decode_xfer_write): Add prototype.
15814 * server.c (handle_query): Add PACKET_LEN argument. Support
15815 qXfer:spu:read and qXfer:spu:write packets.
15816 (main): Pass packet_len to handle_query.
15817 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15818 * target.h (target_ops): Add qxfer_spu.
15819
374c1d38
UW
158202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15821
15822 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15823 accessing non-seekable spufs files.
15824
bb63802a
UW
158252007-05-16 Markus Deuling <deuling@de.ibm.com>
15826
889bf7c5 15827 * server.c (handle_query): Add reply for qC packet.
bb63802a 15828
7390519e
PA
158292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15830 Leo Zayas <lerele@champenstudios@com>
15831
15832 * server.h (check_remote_input_interrupt_request): New function.
15833 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15834 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15835 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15836 (check_remote_input_interrupt_request): New function.
15837 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15838 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15839 winapi_GenerateConsoleCtrlEvent): New typedefs.
15840 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15841 to 250 ms.
15842 (win32_wait): Check for remote interrupt request
15843 with check_remote_input_interrupt_request.
15844 (win32_request_interrupt): New function.
15845 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15846
34b34921
PA
158472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15848
15849 * win32-low.c (debug_registers_changed,
15850 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15851 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15852 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15853 (thread_rec): Get context using the low target.
15854 (child_add_thread): Call thread_added on the low target,
15855 which does the same thing.
15856 (regptr): Delete.
15857 (do_initial_child_stuff): Remove debug registers references.
15858 Set context using the low target. Resume threads after
15859 setting the contexts.
15860 (child_continue): Remove dead variable. Remove debug
15861 registers references.
15862 (child_fetch_inferior_registers): Go through the low target.
15863 (do_child_store_inferior_registers): Remove.
15864 (child_store_inferior_registers): Go through the low target.
15865 (win32_resume): Remove debug registers references.
15866 Set context using the low target.
15867 (handle_exception): Change return type to void. Don't record
15868 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15869 first chance exception.
889bf7c5 15870 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15871 goto loop. Always return after waiting for debug event.
15872 (win32_wait): Convert to switch statement. Handle spurious
15873 events.
15874
15875 * win32-i386-low.c (debug_registers_changed,
15876 debug_registers_used): New.
15877 (initial_stuff): Rename to ...
15878 (i386_initial_stuff): ... this. Clear debug registers
15879 state variables.
15880 (store_debug_registers): Delete.
15881 (i386_get_thread_context): New.
15882 (load_debug_registers): Delete.
15883 (i386_set_thread_context): New.
15884 (i386_thread_added): New.
15885 (single_step): Rename to ...
15886 (i386_single_step): ... this.
15887 (do_fetch_inferior_registers): Rename to ...
15888 (i386_fetch_inferior_register): ... this.
15889 (i386_store_inferior_register): New.
15890 (the_low_target): Adapt to new interface.
15891
15892 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15893 (arm_get_thread_context): New.
15894 (arm_set_thread_context): New.
15895 (regptr): New.
15896 (do_fetch_inferior_registers): Rename to ...
15897 (arm_fetch_inferior_register): ... this.
15898 (arm_store_inferior_register): New.
15899 (arm_wince_breakpoint): Reimplement as unsigned long.
15900 (arm_wince_breakpoint_len): Define.
15901 (the_low_target): Adapt to new interface.
15902
15903 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15904 load_debug_registers. Add get_thread_context, set_thread_context,
15905 thread_added and store_inferior_register. Rename
15906 fetch_inferior_registers to fetch_inferior_register.
15907 (regptr): Remove declaration.
15908
dd6953e1
PA
159092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15910
15911 * linux-low.c (linux_detach): Change return type to int. Return 0.
15912 * spu-low.c (spu_detach): Likewise.
15913
444d6139
PA
159142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15915
15916 * target.h (target_ops): Change return type of detach to int.
15917 Add join.
15918 (join_inferior): New.
15919 * server.c (main): Don't skip detach support on mingw32.
15920 If the inferior doesn't support detaching return error.
15921 Call join_inferior instead of using waitpid.
15922 * linux-low.c (linux_join): New.
15923 (linux_target_op): Add linux_join.
15924 * spu-low.c (spu_join): New.
15925 (spu_target_ops): Add spu_join.
15926 * win32-low.c (win32_detach): Adapt to new interface.
15927 Reopen current_process_handle before detaching. Issue a child
15928 resume before detaching.
15929 (win32_join): New.
15930 (win32_target_op): Add win32_join.
15931
1d5315fe
PA
159322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15933
15934 * win32-low.c (win32-attach): Fix return value.
15935 * target.h (target_ops): Describe ATTACH return values.
15936
bf914831
PA
159372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15938
15939 * win32-low.c (GETPROCADDRESS): Define.
15940 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15941 (winapi_DebugSetProcessKillOnExit): Likewise.
15942 (win32_create_inferior): Force usage of ansi CreateProcessA.
15943 (win32_attach): Use GETPROCADDRESS.
15944 (win32_detach): Likewise.
15945
f72f3e60
PA
159462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15949
ed50f18f
PA
159502007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15951
15952 * win32-low.c: Commit leftover changes from 2007-03-29.
15953
0c2ead7e
DJ
159542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15955
15956 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15957 fields short instead of int. Add explicit padding.
15958 (i387_cache_to_fsave): Remove unnecessary casts.
15959 (i387_fsave_to_cache): Doc fix.
15960 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15961
73725ff3
DJ
159622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15963
15964 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15965 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15966
d99f33d8
PA
159672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15968
15969 * configure.srv (arm*-*-mingw32ce*): Move near the other
15970 arm targets.
15971
68070c10
PA
159722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15973
2482afc6 15974 * configure.ac: Add errno checking.
68070c10
PA
15975 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15976 sys/file.h and malloc.h.
15977 (AC_CHECK_DECLS): Add perror.
15978 (srv_mingwce): Handle.
2482afc6 15979 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15980 win32-i386-low.o to srv_tgtobj.
15981 (i[34567]86-*-mingw*): Likewise.
15982 (arm*-*-mingw32ce*): Add case.
15983 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15984 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15985 [__MINGW32CE__] (strerror): New function.
15986 [__MINGW32CE__] (errno): Define to GetLastError.
15987 [__MINGW32CE__] (COUNTOF): New macro.
15988 (remote_open): Remove extra close call.
15989 * mem-break.c (delete_breakpoint_at): New function.
15990 * mem-break.h (delete_breakpoint_at): Declare.
15991 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15992 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15993 [USE_WIN32API] (read, write): Add char* casts.
15994 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15995 * server.h: Include wincecompat.h on Windows CE.
15996 [HAVE_ERRNO_H]: Check.
15997 (perror): Declare if not declared.
15998 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15999 (perror_with_name): Remove errno declaration.
16000 * wincecompat.h: New.
16001 * wincecompat.c: New.
16002 * win32-low.h: New.
16003 * win32-arm-low.c: New.
16004 * win32-i386-low.c: New.
16005 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16006 (OUTMSG2): Make it safe.
16007 (_T): New macro.
16008 (COUNTOF): New macro.
16009 (NUM_REGS): Get it from the low target.
16010 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16011 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16012 (thread_rec): Let low target handle debug registers.
16013 (child_add_thread): Likewise.
16014 (child_init_thread_list): Likewise.
16015 (continue_one_thread): Likewise.
16016 (regptr): New.
16017 (do_child_fetch_inferior_registers): Move to ...
16018 * win32-i386-low.c: ... here, and rename to ...
16019 (do_fetch_inferior_registers): ... this.
889bf7c5 16020 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16021 Go through the low target.
16022 (do_child_store_inferior_registers): Use regptr.
16023 (strwinerror): New function.
16024 (win32_create_inferior): Handle Windows CE.
16025 Use strwinerror instead of strerror on Windows error
16026 codes. Add program to the error output.
16027 Don't close the main thread handle on Windows CE.
16028 (win32_attach): Use coredll.dll on Windows CE.
16029 (win32_kill): Close current process and current
16030 thread handles.
16031 (win32_detach): Use coredll.dll on Windows CE.
16032 (win32_resume): Let low target handle debug registers, and
16033 step request.
16034 (handle_exception): Add/Remove initial breakpoint. Avoid
16035 non-existant WSTOPSIG on Windows CE.
16036 (win32_read_inferior_memory): Cast to remove warning.
16037 (win32_arch_string): Go through the low target.
16038 (initialize_low): Call set_breakpoint_data with the low
16039 target's breakpoint.
16040 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16041 FOP_REGNUM, mappings): Move to ...
16042 * win32-i386-low.c: ... here.
16043 * win32-low.c (win32_thread_info): Move to ...
16044 * win32-low.h: ... here.
16045 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16046 win32-arm-low.c and wincecompat.c.
16047 (all:): Add $EXEEXT.
16048 (install-only:): Likewise.
16049 (gdbserver:): Likewise.
16050 (gdbreplay:): Likewise.
16051 * config.in: Regenerate.
16052 * configure: Regenerate.
16053
41093d81
PA
160542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16055
16056 * win32-low.c: Rename typedef thread_info to
16057 win32_thread_info throughout.
16058
544afa54
PA
160592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16060
16061 * win32-i386-low.c: Rename to ...
16062 * win32-low.c: ... this.
16063 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16064 * Makefile.in: Likewise.
16065
bce7165d
PA
160662007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16067
16068 * remote-utils.c (monitor_output): Constify msg parameter.
16069 * server.h (monitor_output): Likewise.
16070 * win32-i386-low.c (handle_output_debug_string): New.
16071 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16072 handle_output_debug_string.
16073 (get_child_debug_event): Likewise.
16074
506c7aa0
DJ
160752007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16076
16077 * server.c (main): Correct strtoul check.
16078
42c81e2a
DJ
160792007-03-27 Jon Ringle <jon@ringle.org>
16080
16081 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16082
9453113a
DJ
160832007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16084
16085 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16086
64a69107
DJ
160872007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16088
16089 * terminal.h: Check HAVE_SGTTY_H.
16090
160912007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16092
16093 * remote-utils.c (remote_open): Print out the assigned port number.
16094
c74d0ad8
DJ
160952007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16096
16097 * remote-utils.c (monitor_output): New function.
16098 * server.c (debug_threads): Define here.
16099 (monitor_show_help): New function.
16100 (handle_query): Handle qRcmd.
16101 (main): Do not handle 'd' packet.
16102 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16103 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16104 of debug_threads.
16105
de7c3b4a
PA
161062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16107
16108 * Makefile.in (EXEEXT): New.
16109 (clean): Use $(EXEEXT).
16110
ef57601b
PA
161112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16112
16113 * target.h (target_ops): Rename send_signal to request_interrupt,
16114 and remove enum target_signal parameter.
16115 * linux-low.c (linux_request_interrupt): Rename from
16116 linux_send_signal, and always send SIGINT.
16117 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16118 and always send SIGINT.
16119 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16120 of send_signal.
16121 (input_interrupt): Likewise.
16122
820f2bda
PA
161232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16124
16125 * server.c (get_features_xml): Check if target implemented
16126 arch_string.
16127 * win32-i386-low.c (win32_arch_string): New.
16128 (win32_target_ops): Add win32_arch_string as arch_string member.
16129
ab39bf24
UW
161302007-02-22 Markus Deuling <deuling@de.ibm.com>
16131
16132 * spu-low.c (spu_arch_string): New.
16133 (spu_target_ops): Add spu_arch_string.
16134
61ff6e04
DJ
161352007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16136
16137 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16138 * configure.ac: Do not check for terminal.h.
16139 * configure, config.in: Regenerated.
16140
fb1e4ffc
DJ
161412007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16142
16143 * Makefile.in (OBS): Add $(XML_BUILTIN).
16144 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16145 (clean): Update.
16146 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16147 (arm-with-iwmmxt.c): New.
16148 * config.in, configure: Regenerate.
16149 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16150 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16151 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16152 (arm*-*-linux*): Add iWMMXt and regset support.
16153 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16154 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16155 (arm_store_wmmxregset, target_regsets): New.
16156 * server.c (get_features_xml): Take annex argument. Check builtin
16157 XML documents.
16158 (handle_query): Handle multiple annexes.
16159
0f48aa01
DJ
161602007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16161
16162 * remote-utils.c [USE_WIN32API] (read, write): Define.
16163 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16164 write.
16165
23181151
DJ
161662007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * linux-i386-low.c (the_low_target): Set arch_string.
16169 * linux-x86-64-low.c (the_low_target): Likewise.
16170 * linux-low.c (linux_arch_string): New.
16171 (linux_target_ops): Add it.
16172 * linux-low.h (struct linux_target_ops): Add arch_string.
16173 * server.c (write_qxfer_response): Use const void * for DATA.
16174 (get_features_xml): New.
16175 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16176 * target.h (struct target_ops): Add arch_string method.
16177
9d606399
DJ
161782007-01-03 Denis Pilat <denis.pilat@st.com>
16179 Daniel Jacobowitz <dan@codesourcery.com>
16180
16181 * linux-low.c (linux_kill): Handle being called with no threads.
16182 * win32-i386-low.c (win32_kill): Likewise.
16183 (get_child_debug_event): Clear current_process_handle.
16184
161852006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16186 Daniel Jacobowitz <dan@codesourcery.com>
16187
16188 * remote-utils.c (remote_open): Check the type of specified
16189 serial port devices before opening them.
16190 * server.c (main): Kill the inferior if an error occurs during
16191 the first remote_open.
16192
a5e13d24
DJ
161932006-12-05 Markus Deuling <deuling@de.ibm.com>
16194
16195 * README: Update supported targets.
16196
186947f7
DJ
161972006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16198
16199 * Makefile.in (clean): Remove reg-mips64.c.
16200 (reg-mips64.c, reg-mips64.o): New rules.
16201 * configure.srv: Handle mips64. Include regset support for mips.
16202 * linux-mips-low.c (union mips_register): New.
16203 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16204 (mips_breakpoint, mips_breakpoint_at): Use int.
16205 (mips_collect_register, mips_supply_register)
16206 (mips_collect_register_32bit, mips_supply_register_32bit)
16207 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16208 (mips_store_fpregset, target_regsets): New.
16209 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16210
a13e2c95
UW
162112006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16212
16213 * configure.srv: Add target "spu*-*-*".
16214 * Makefile.in (clean): Remove reg-spu.c.
16215 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16216 * spu-low.c: New file.
16217
cb7283db
DJ
162182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16219
16220 * configure.ac: Correct td_thr_tls_get_addr test.
16221 * configure: Regenerated.
16222
89be2091
DJ
162232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * linux-low.c (linux_wait_for_event): Reformat. Use the
16226 pass_signals array.
16227 * remote-utils.c (decode_address_to_semicolon): New.
16228 * server.c (pass_signals, handle_general_set): New.
16229 (handle_query): Mention QPassSignals for qSupported.
16230 (main): Call handle_general_set.
16231 * server.h (pass_signals, decode_address_to_semicolon): New.
16232
000ef4f0
DJ
162332006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16234
16235 * server.c (handle_query): Correct error handling for read_auxv.
16236
b7149293
UW
162372005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16238
16239 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16240 and srv_linux_thread_db to yes.
16241 * linux-s390-low.c (s390_fill_gregset): New function.
16242 (target_regsets): Define data structure.
16243
dae5f5cf
DJ
162442006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16245
16246 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16247 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16248 * config.in, configure: Regenerated.
16249 * inferiors.c (gdb_id_to_thread): New function.
16250 (gdb_id_to_thread_id): Use it.
16251 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16252 * linux-low.h (struct process_info): Add th member.
16253 (thread_db_get_tls_address): New prototype.
16254 * remote-utils.c (decode_address): Make non-static.
16255 * server.c (handle_query): Handle qGetTLSAddr.
16256 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16257 * target.h (struct target_ops): Add get_tls_address.
16258 * thread-db.c (maybe_attach_thread): Save the thread handle.
16259 (thread_db_get_tls_address): New.
16260
32ca6d61
DJ
162612006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16264 (linux_resume_one_process): Take a siginfo_t *. Update all
16265 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16266 (struct pending_signals): Add a siginfo_t.
16267 (linux_wait_for_process): Always set last_status.
16268 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16269 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16270 * linux-low.h (struct process_info): Add last_status.
16271
5ffff7c1
DJ
162722006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16273
16274 * remote-utils.c (try_rle): New function.
16275 (putpkt_binary): Use it.
16276
8695c747
DJ
162772006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16278
16279 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16280 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16281 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16282 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16283 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16284 point registers.
16285
290fadea
RS
162862006-08-08 Richard Sandiford <richard@codesourcery.com>
16287
16288 * server.c (terminal_fd): New variable.
16289 (old_foreground_pgrp): Likewise.
16290 (restore_old_foreground_pgrp): New function.
16291 (start_inferior): Record the terminal file descriptor in terminal_fd
16292 and its original foreground group in old_foreground_pgrp. Register
16293 restore_old_foreground_pgrp with atexit().
16294
9f2e1e63
DJ
162952006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16296
16297 * server.c (handle_query): Correct qPart to qXfer.
16298
b80864fb
DJ
162992006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16300
16301 * configure.ac: Check for more headers which are missing on
16302 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16303 * configure.srv: Add Cygwin and mingw32.
16304 * remote-utils.c: Don't include headers unconditionally which
16305 are missing on mingw32. Include <winsock.h> for mingw32.
16306 (remote_open): Adjust for mingw32 support. Flush
16307 standard error after writing to it.
16308 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16309 (unblock_async_io, enable_async_io, disable_async_io)
16310 (readchar, getpkt): Update for Winsock support.
16311 (prepare_resume_reply): Expect a protocol signal number.
16312 * server.c: Disable <sys/wait.h> on mingw32.
16313 (start_inferior): Adjust for mingw32 support. Flush
16314 standard error after writing to it.
16315 (attach_inferior): Likewise. Use protocol signal
16316 numbers.
16317 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16318 and names.
16319 * win32-i386-low.c: New file.
16320 * Makefile.in (XM_CLIBS): Set.
16321 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16322 (win32-i386-low.o): New dependency rule.
16323 * linux-low.c (linux_wait): Use target signal numbers.
16324 * target.h (struct target_ops): Doc fix.
16325 * server.h (target_signal_to_name): New prototype.
16326 * gdbreplay.c: Don't include headers unconditionally which
16327 are missing on mingw32. Include <winsock.h> for mingw32.
16328 (remote_close, remote_open): Adjust for Winsock support.
16329 * configure, config.in: Regenerated.
16330
0876f84a
DJ
163312006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16332
16333 * server.c (decode_xfer_read, write_qxfer_response): New.
16334 (handle_query): Take a packet length argument. Handle
16335 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16336 the qSupported response.
16337 (main): Update call to handle_query.
16338
01f9e8fa
DJ
163392006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16340
16341 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16342 (putpkt_binary): Renamed from putpkt and adjusted for binary
16343 data.
16344 (putpkt): New wrapper for putpkt_binary.
16345 (readchar): Don't mask off the high bit.
16346 (decode_X_packet): New function.
16347 * server.c (main): Call putpkt_binary if a handler sets the packet
16348 length. Save the length of the incoming packet. Handle 'X'.
16349 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16350
be2a5f71
DJ
163512006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16352
16353 * server.c (handle_query): Handle qSupported.
16354
ea025f5f
DJ
163552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16356
16357 * remote-utils.c (all_symbols_looked_up): New variable.
16358 (look_up_one_symbol): Check it.
16359 * server.h (look_up_one_symbol): New declaration.
16360 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16361
9308fc88
DJ
163622006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16363
16364 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16365 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16366 (PTRACE_GET_THREAD_AREA): Define.
16367 (ps_get_thread_area): New function.
16368
52fb6437
NS
163692006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16370
16371 * configure.srv (m68k*-*-uclinux*): New target.
16372 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16373 (linux_resume_one_process): Remove extraneous cast.
16374 (linux_read_offsets): New.
16375 (linux_target_op): Add linux_read_offsets on mmuless systems.
16376 * server.c (handle_query): Add qOffsets logic.
16377 * target.h (struct target_ops): Add read_offsets.
16378
21b0f40c
DJ
163792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16380
16381 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16382 (PTRACE_GET_THREAD_AREA): Define.
16383 (ps_get_thread_area): New function.
16384 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16385 (linux-x86-64-low.o): Update.
16386
0050a760
DJ
163872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * configure.ac: Remove checks for prfpregset_t.
16390 * gdb_proc_service.h: New file.
16391 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16392 new "gdb_proc_service.h".
16393 * proc-service.c: Likewise.
16394 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16395 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16396 * Makefile.in (gdb_proc_service_h): Updated.
16397 * configure, config.in: Regenerated.
16398
b92a518e
DJ
163992006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16400
16401 * remote-utils.c (prepare_resume_reply): Move declaration
16402 of gdb_id_from_wait to the top of the block.
16403
545587ee
DJ
164042006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * linux-low.c (regsets_store_inferior_registers): Read the regset
16407 from the target before filling it.
16408
9db87ebd
DJ
164092006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16410
16411 * server.c (attach_inferior): Return SIGTRAP for a successful
16412 attach.
16413
dd24457d
DJ
164142006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16415
16416 * Makefile.in (OBS): Add version.o.
16417 (STAGESTUFF): Delete.
16418 (version.o): Add dependencies.
16419 (version.c): Replace rule.
16420 (clean): Remove version.c.
16421 * server.c (gdbserver_version): New.
16422 (gdbserver_usage): Use printf.
16423 (main): Handle --version and --help.
16424 * server.h (version, host_name): Add declarations.
16425
6f0f660e
EZ
164262005-12-23 Eli Zaretskii <eliz@gnu.org>
16427
889bf7c5
PA
16428 * linux-arm-low.c:
16429 * linux-arm-low.c:
16430 * inferiors.c:
16431 * i387-fp.h:
16432 * i387-fp.c:
16433 * gdbreplay.c:
16434 * regcache.c:
16435 * proc-service.c:
16436 * mem-break.h:
16437 * mem-break.c:
16438 * linux-x86-64-low.c:
16439 * linux-sh-low.c:
16440 * linux-s390-low.c:
16441 * linux-ppc64-low.c:
16442 * linux-ppc-low.c:
16443 * linux-mips-low.c:
16444 * linux-m68k-low.c:
16445 * linux-m32r-low.c:
16446 * linux-low.h:
16447 * linux-low.c:
16448 * linux-ia64-low.c:
16449 * linux-i386-low.c:
16450 * linux-crisv32-low.c:
16451 * thread-db.c:
16452 * terminal.h:
16453 * target.h:
16454 * target.c:
16455 * server.h:
16456 * server.c:
16457 * remote-utils.c:
16458 * regcache.h:
16459 * utils.c:
16460 * Makefile.in:
16461 * configure.ac:
6f0f660e
EZ
16462 * gdbserver.1: Add (C) after Copyright. Update the FSF
16463 address.
16464
9d1fb177
DJ
164652005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16466
16467 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16468 (arm_breakpoint_at): Recognize both breakpoints.
16469 (the_low_target): Use the correct breakpoint instruction.
16470
011a70c2
DJ
164712005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16472
16473 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16474 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16475 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16476 (the_low_target): Update.
16477
7fb85e41
AS
164782005-10-25 Andreas Schwab <schwab@suse.de>
16479
16480 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16481
16482 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16483 (ia64_num_regs): Reduce to 462.
16484
3db0444b
DJ
164852005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16486
16487 * acinclude.m4: Correct quoting.
16488 * aclocal.m4: Regenerated.
16489
16490 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16491 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16492 (thread_db_init): Call thread_db_err_str.
16493 * configure.ac: Check for TD_VERSION.
16494 * config.in, configure: Regenerated.
16495
bee0189a
DJ
164962005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16497
16498 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16499
e9d25b98
DJ
165002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16501
16502 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16503 is not available. Define HAVE_PTRACE_GETREGS if it is.
16504 * config.in, configure: Regenerated.
16505 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16506 * linux-i386-low.c, linux-m68k-low.c: Update to use
16507 HAVE_PTRACE_GETREGS.
16508 * linux-low.c (regsets_fetch_inferior_registers)
16509 (regsets_store_inferior_registers): Only return 0 if we processed
16510 GENERAL_REGS.
16511 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16512 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16513
a06660f7
DJ
165142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16515
16516 * inferiors.c (struct thread_info): Add gdb_id.
16517 (add_thread): Add gdb_id argument.
16518 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16519 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16520 calls to add_thread.
16521 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16522 * server.c (handle_query): Use thread_to_gdb_id.
16523 (handle_v_cont, main): Use gdb_id_to_thread_id.
16524 * server.h (add_thread): Update prototype.
16525 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16526 prototypes.
16527
5a1f5858
DJ
165282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16529
16530 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16531 left-padded registers.
16532 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16533 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16534
e122f1f5
SE
165352005-07-01 Steve Ellcey <sje@cup.hp.com>
16536
16537 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16538 * configure: Regenerate.
16539 * config.in: Regenerate.
16540 * server.h (NEED_DECLARATION_STRERROR):
16541 Replace with !HAVE_DECL_STRERROR.
16542
d592fa2f
DJ
165432005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16544
16545 * linux-low.c (linux_wait, linux_send_signal): Don't test
16546 an unsigned long variable for > 0 if it could be MAX_ULONG.
16547 * server.c (myresume): Likewise.
16548 * target.c (set_desired_inferior): Likewise.
16549
ccbd4912
MK
165502005-06-13 Mark Kettenis <kettenis@gnu.org>
16551
16552 * configure.ac: Simplify and improve check for socklen_t.
16553 * configure, config.in: Regenerate.
16554
f450004a
DJ
165552005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16556
16557 * acconfig.h: Remove.
16558 * configure.ac: Add a test for socklen_t. Use three-argument
16559 AC_DEFINE throughout.
16560 * config.in: Regenerated using autoheader 2.59.
16561 * configure: Regenerated.
16562
16563 * gdbreplay.c (socklen_t): Provide a default.
16564 (remote_open): Use socklen_t.
16565 * remote-utils.c (socklen_t): Provide a default.
16566 (remote_open): Use socklen_t.
16567 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16568 unsigned char.
16569
16570 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16571 char for buffers.
16572 * linux-low.c (linux_read_memory, linux_write_memory)
16573 (linux_read_auxv): Likewise.
16574 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16575 (check_mem_write): Likewise.
16576 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16577 Likewise.
16578 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16579 (registers_from_string, register_data): Likewise.
16580 * server.c (handle_query, main): Likewise.
16581 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16582 (decode_M_packet): Likewise.
16583 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16584 * target.h (struct target_ops): Update read_memory, write_memory,
16585 and read_auxv.
16586 (read_inferior_memory, write_inferior_memory): Update.
16587 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16588 to unsigned char *.
16589 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16590 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16591 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16592 linux-s390-low.c, linux-sh-low.c: Update for changes in
16593 read_inferior_memory and the_low_target->breakpoint.
16594
eee84df1
DJ
165952005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16596
16597 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16598 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16599 * configure.srv: Add powerpc64-*-linux*.
16600 * linux-ppc64-low.c: New file.
16601
45b134e5
OF
166022005-05-23 Orjan Friberg <orjanf@axis.com>
16603
16604 * linux-cris-low.c: New file with support for CRIS.
16605 * linux-crisv32-low.c: Ditto for CRISv32.
16606 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16607 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16608 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16609 reg-crisv32.o, and reg-crisv32.c to make rules.
16610 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16611 recognized targets.
16612
48d93c75
UW
166132005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16614
16615 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16616 of sizeof (PTRACE_XFER_TYPE).
16617 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16618
e013ee27
OF
166192005-05-12 Orjan Friberg <orjanf@axis.com>
16620
889bf7c5 16621 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16622 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16623 pointers for hardware watchpoint support.
16624 * linux-low.h (struct linux_target_ops): Ditto.
16625 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16626 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16627 to linux_target_ops.
16628 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16629 reply packet.
16630 * server.c (main): Recognize 'Z' and 'z' packets.
16631
b0ded00b
UW
166322005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16633
16634 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16635 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16636 (the_low_target): Add new members.
16637
8643e2ad
DJ
166382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16639
16640 * proc-service.c (ps_lgetregs): Search all_processes instead of
16641 all_threads.
16642
fc620387
DJ
166432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16644
16645 * server.c (start_inferior): Change return type to int.
16646 (attach_inferior): Change sigptr to int *.
16647 (handle_v_cont, handle_v_requests): Change signal to int *.
16648 (main): Change signal to int.
16649
166502005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16651
16652 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16653 * configure.srv: Add m32r*-*-linux*.
16654 * linux-m32r-low.c: New file.
16655
e0e76420
DJ
166562005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16659
a1928bad
DJ
166602005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16661
16662 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16663 Take unsigned long arguments for PIDs.
16664 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16665 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16666 (wait_for_sigstop, linux_resume_one_process)
16667 (regsets_fetch_inferior_registers, linux_send_signal)
16668 (linux_read_auxv): Likewise. Update the types of variables holding
16669 PIDs. Update format string specifiers.
16670 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16671 * remote-utils.c (prepare_resume_reply): Likewise.
16672 * server.c (cont_thread, general_thread, step_thread)
16673 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16674 unsigned long.
16675 (handle_query): Update format specifiers.
16676 (handle_v_cont, main): Use strtoul for thread IDs.
16677 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16678 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16679 (general_thread, step_thread, thread_from_wait)
16680 (old_thread_from_wait): Update.
16681 * target.h (struct thread_resume): Use unsigned long for THREAD.
16682 (struct target_ops): Use unsigned long for arguments to attach and
16683 thread_alive.
16684
dcdb98d2
DJ
166852005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16686
16687 * acinclude.m4: Include bfd/bfd.m4 directly.
16688 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16689 <agriffis@toolchain.org>.
16690 * aclocal.m4, configure: Regenerated.
16691
bec39cab
AC
166922005-01-07 Andrew Cagney <cagney@gnu.org>
16693
16694 * configure.ac: Rename configure.in, require autoconf 2.59.
16695 * configure: Re-generate.
16696
434c4c77
DJ
166972004-12-08 Daniel Jacobowitz <dan@debian.org>
16698
16699 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16700 LIBS when finished.
16701 * aclocal.m4: Regenerated.
16702 * configure: Regenerated.
16703
db1d3e1b
AS
167042004-11-21 Andreas Schwab <schwab@suse.de>
16705
16706 * linux-m68k-low.c (m68k_num_gregs): Define.
16707 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16708 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16709 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16710 (m68k_breakpoint_at): New. Add to the_low_target.
16711
16712 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16713 srv_linux_thread_db to yes.
16714
43360365
JB
167152004-10-20 Joel Brobecker <brobecker@gnat.com>
16716
16717 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16718 (ARCH_SET_FS): Likewise.
16719 (ARCH_GET_FS): Likewise.
16720 (ARCH_GET_GS): Likewise.
16721
fd500816
DJ
167222004-10-16 Daniel Jacobowitz <dan@debian.org>
16723
16724 * linux-i386-low.c (ps_get_thread_area): New.
16725 * linux-x86-64-low.c (ps_get_thread_area): New.
16726 * linux-low.c: Include <sys/syscall.h>.
16727 (linux_kill_one_process): Don't kill the first thread here.
16728 (linux_kill): Kill the first thread here.
16729 (kill_lwp): New function.
16730 (send_sigstop, linux_send_signal): Use it.
16731 * proc-service.c: Clean up #ifdefs.
16732 (fpregset_info): Delete.
16733 (ps_lgetregs): Update and enable implementation.
16734 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16735 implementations.
16736 * remote-utils.c (struct sym_cache, symbol_cache): New.
16737 (input_interrupt): Print a clearer message.
16738 (async_io_enabled): New variable.
16739 (enable_async_io, disable_async_io): Use it. Update comments.
16740 (look_up_one_symbol): Use the symbol cache.
16741 * thread-db.c (thread_db_look_up_symbols): New function.
16742 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16743
f6de3c42
DJ
167442004-10-16 Daniel Jacobowitz <dan@debian.org>
16745
16746 * configure.in: Test for -rdynamic.
16747 * configure: Regenerated.
16748 * Makefile (INTERNAL_LDFLAGS): New.
16749 (gdbserver, gdbreplay): Use it.
16750
2c0fc042
AC
167512004-09-02 Andrew Cagney <cagney@gnu.org>
16752
16753 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16754
075b3282
DJ
167552004-03-23 Daniel Jacobowitz <drow@mvista.com>
16756
16757 * linux-low.c (linux_wait): Clear all_processes list also.
16758
fa6a77dc
DJ
167592004-03-12 Daniel Jacobowitz <drow@mvista.com>
16760
16761 * linux-low.c: Include <errno.h>. Remove extern declaration of
16762 errno.
16763
6d782a97
DJ
167642004-03-12 Daniel Jacobowitz <drow@mvista.com>
16765
16766 * gdbreplay.c, server.h, utils.c: Update copyright years.
16767
3a7fb99b
DJ
167682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16769
16770 * server.c (main): Print child status or termination signal from
16771 variable 'signal', not 'sig'.
16772
c3e735a6
DJ
167732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16774
16775 * linux-low.c (linux_read_memory): Change return type to
16776 int. Check for and return error from ptrace().
16777 * target.c (read_inferior_memory): Change return type to int. Pass
16778 back return status from the_target->read_memory().
16779 * target.h (struct target_ops): Adapt *read_memory() prototype.
16780 Update comment.
16781 (read_inferior_memory): Adapt prototype.
16782 * server.c (main): Return an error packet if
16783 read_inferior_memory() returns an error.
16784
a59d1c82
DJ
167852004-03-04 Daniel Jacobowitz <drow@mvista.com>
16786
16787 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16788 Unify with other clean targets.
16789
dc3f8883
DJ
167902004-02-29 Daniel Jacobowitz <drow@mvista.com>
16791
16792 * server.c (handle_v_cont): Call set_desired_inferior.
16793
89a208da
DJ
167942004-02-29 Daniel Jacobowitz <drow@mvista.com>
16795
16796 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16797
62ea82f5
DJ
167982004-02-29 Daniel Jacobowitz <drow@mvista.com>
16799
16800 * linux-low.c (linux_wait): Unblock async I/O.
16801 (linux_resume): Block and enable async I/O.
16802 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16803 * server.h (block_async_io, unblock_async_io): Add prototypes.
16804
6910d122
DJ
168052004-02-29 Daniel Jacobowitz <drow@mvista.com>
16806
16807 * remote-utils.c (remote_open): Print a status notice after
16808 opening a TCP port.
16809 * server.c (attach_inferior): Print a status notice after
16810 attaching.
16811
168122004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16813
16814 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16815
c89dc5d4
DJ
168162004-02-26 Daniel Jacobowitz <drow@mvista.com>
16817
16818 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16819 error packet.
16820 * server.c, target.h: Update copyright years.
16821
4b8dad4a
RM
168222004-02-25 Roland McGrath <roland@redhat.com>
16823
16824 * target.h (struct target_ops): New member `read_auxv'.
16825 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16826 * linux-low.c (linux_read_auxv): New function.
16827 (linux_target_ops): Initialize `read_auxv' member to that.
16828
d7446758
JB
168292004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16830
16831 Committed by Jim Blandy <jimb@redhat.com>.
16832
16833 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16834 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16835 instead of GPR_SIZE to distiguish s390 and s390x targets.
16836
5544ad89
DJ
168372004-01-31 Daniel Jacobowitz <drow@mvista.com>
16838
16839 * linux-low.c: Update copyright year.
16840 (check_removed_breakpoint): Clear pending_is_breakpoint.
16841 (linux_set_resume_request, linux_queue_one_thread)
16842 (resume_status_pending_p): New functions.
16843 (linux_continue_one_thread): Use process->resume.
16844 (linux_resume): Only resume threads if there are no pending events.
16845 * linux-low.h (struct process_info): Add resume request
16846 pointer.
16847
2a68b70e
DJ
168482004-01-30 Daniel Jacobowitz <drow@mvista.com>
16849
16850 * regcache.c (new_register_cache): Clear the allocated register
16851 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16852
64386c31
DJ
168532003-10-13 Daniel Jacobowitz <drow@mvista.com>
16854
16855 * linux-low.c (linux_resume): Take a struct thread_resume *
16856 argument.
16857 (linux_wait): Update call.
16858 (resume_ptr): New static variable.
16859 (linux_continue_one_thread): Renamed from
16860 linux_continue_one_process. Use resume_ptr.
16861 (linux_resume): Use linux_continue_one_thread.
16862 * server.c (handle_v_cont, handle_v_requests): New functions.
16863 (myresume): New function.
16864 (main): Handle 'v' case.
16865 * target.h (struct thread_resume): New type.
16866 (struct target_ops): Change argument of "resume" to struct
16867 thread_resume *.
16868 (myresume): Delete macro.
16869
c938e9b0
L
168702003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16871
16872 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16873 (uninstall): Support DESTDIR.
16874
7f313d07
BC
16875Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16876
16877 * configure.srv: Add xscale*linux copy of arm*linux entry.
16878
3b2fc2ea
DJ
168792003-07-24 Daniel Jacobowitz <drow@mvista.com>
16880
16881 * linux-arm-low.c (arm_reinsert_addr): New function.
16882 (the_low_target): Add arm_reinsert_addr.
16883
1c0a559e
MK
168842003-07-08 Mark Kettenis <kettenis@gnu.org>
16885
16886 * mem-break.c: Remove whitespace at end of file.
16887
43d5792c
DJ
168882003-06-28 Daniel Jacobowitz <drow@mvista.com>
16889
16890 * configure.in: Check whether we need to prototype strerror.
16891 * server.h: Optionally prototype strerror.
16892 * gdbreplay.c (perror_with_name): Use strerror.
16893 * linux-low.c (linux_attach_lwp): Use strerror.
16894 * utils.c (perror_with_name): Use strerror.
16895 * config.in, configure: Regenerated.
16896
c8a86edf
DJ
168972003-06-28 Daniel Jacobowitz <drow@mvista.com>
16898
16899 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16900 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16901
73d37363
DJ
169022003-06-20 Daniel Jacobowitz <drow@mvista.com>
16903
16904 * Makefile.in (SFILES): Update.
16905 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16906 low-sun3.c: Remove files.
16907
6ad8ae5c
DJ
169082003-06-17 Daniel Jacobowitz <drow@mvista.com>
16909
16910 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16911 (linux_detach_one_process, linux_detach): New functions.
16912 (linux_target_ops): Add linux_detach.
16913 * server.c (main): Handle 'D' packet.
16914 * target.h (struct target_ops): Add "detach" member.
16915 (detach_inferior): Define.
16916
1581182a
MK
169172003-06-13 Mark Kettenis <kettenis@gnu.org>
16918
16919 From Kelley Cook <kelleycook@wideopenwest.com>:
16920 * configure.srv: Accept i[34567]86 variants.
16921
e5379b03
DJ
169222003-06-05 Daniel Jacobowitz <drow@mvista.com>
16923
16924 * linux-low.c (linux_wait_for_event): Correct comment typos.
16925 (linux_resume_one_process): Call check_removed_breakpoint.
16926 (linux_send_signal): New function.
16927 (linux_target_ops): Add linux_send_signal.
16928 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16929 of kill.
16930 * target.h (struct target_ops): Add send_signal.
16931
2ff29de4
JB
169322003-05-29 Jim Blandy <jimb@redhat.com>
16933
16934 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16935 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16936 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16937 away part of the register's value.
16938
254787d4
DJ
169392003-03-26 Daniel Jacobowitz <drow@mvista.com>
16940
16941 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16942 (linux_wait_for_event, linux_init_signals): Likewise.
16943
94e10508
DJ
169442003-03-17 Daniel Jacobowitz <drow@mvista.com>
16945
16946 * configure.in: Check for stdlib.h.
16947 * configure: Regenerated.
16948 * config.in: Regenerated.
16949
4c0711e0
DJ
169502003-01-04 Andreas Schwab <schwab@suse.de>
16951
16952 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16953
ef66e766
AC
169542003-01-02 Andrew Cagney <ac131313@redhat.com>
16955
16956 * Makefile.in: Remove obsolete code.
16957
a1358604
DJ
169582002-11-20 Daniel Jacobowitz <drow@mvista.com>
16959
16960 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16961 defined(PT_FPR0_HI).
16962
23ce3b1c
DJ
169632002-11-17 Stuart Hughes <seh@zee2.com>
16964
16965 * linux-arm-low.c (arm_num_regs): Increase.
16966 (arm_regmap): Include status register.
16967
169682002-11-17 Daniel Jacobowitz <drow@mvista.com>
16969
16970 * linux-low.c (register_addr): Remove incorrect -1 check.
16971
a9fa9f7d
DJ
169722002-08-29 Daniel Jacobowitz <drow@mvista.com>
16973
16974 * linux-low.c (linux_create_inferior): Call setpgid. Return
16975 the new PID.
16976 (unstopped_p, linux_signal_pid): Remove.
16977 (linux_target_ops): Remove linux_signal_pid.
16978 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16979 global instead of target method.
16980 * target.h (struct target_ops): Remove signal_pid. Update comment
16981 for create_inferior.
16982 * server.c (signal_pid): New variable.
16983 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16984 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16985 (attach_inferior): Set signal_pid.
16986
17574093
DJ
169872002-08-23 Daniel Jacobowitz <drow@mvista.com>
16988
16989 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16990
169912002-08-20 Jim Blandy <jimb@redhat.com>
16992
16993 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16994 default for this.
16995
169962002-08-01 Andrew Cagney <cagney@redhat.com>
16997
16998 * Makefile.in: Make chill references obsolete.
16999
170002002-07-24 Kevin Buettner <kevinb@redhat.com>
17001
17002 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17003 * configure: Regenerate.
17004 * config.in: Regenerate.
17005
170062002-07-09 David O'Brien <obrien@FreeBSD.org>
17007
17008 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17009 (perror_with_name, remote_close, remote_open, expect, play): Static.
17010
170112002-07-04 Michal Ludvig <mludvig@suse.cz>
17012
4b8dad4a 17013 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17014 byte offsets instead of an array of indexes.
17015 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17016
170172002-06-13 Daniel Jacobowitz <drow@mvista.com>
17018
17019 * regcache.c: Add comment.
17020
170212002-06-11 Daniel Jacobowitz <drow@mvista.com>
17022
17023 * thread-db.c: New file.
17024 * proc-service.c: New file.
17025 * acinclude.m4: New file.
17026 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17027 proc-service.o, and thread-db.o.
17028 (linux-low.o): Add USE_THREAD_DB.
17029 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17030 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17031 * aclocal.m4: Regenerated.
17032 * config.in: Regenerated.
17033 * configure: Regenerated.
17034 * configure.in: Check for proc_service.h, sys/procfs.h,
17035 thread_db.h, and linux/elf.h headrs.
17036 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17037 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17038 Check for -lthread_db and thread support.
17039 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17040 PowerPC, and SuperH.
17041 * i387-fp.c: Constify arguments.
17042 * i387-fp.h: Likewise.
17043 * inferiors.c: (struct thread_info): Renamed from
17044 `struct inferior_info'. Remove PID member. Use generic inferior
17045 list header. All uses updated.
17046 (inferiors, signal_pid): Removed.
17047 (all_threads): New variable.
17048 (get_thread): Define.
17049 (add_inferior_to_list): New function.
17050 (for_each_inferior): New function.
17051 (change_inferior_id): New function.
17052 (add_inferior): Removed.
17053 (remove_inferior): New function.
17054 (add_thread): New function.
17055 (free_one_thread): New function.
17056 (remove_thread): New function.
17057 (clear_inferiors): Use for_each_inferior and free_one_thread.
17058 (find_inferior): New function.
17059 (find_inferior_id): New function.
17060 (inferior_target_data): Update argument type.
17061 (set_inferior_target_data): Likewise.
17062 (inferior_regcache_data): Likewise.
17063 (set_inferior_regcache_data): Likewise.
17064 * linux-low.c (linux_bp_reinsert): Remove.
17065 (all_processes, stopping_threads, using_thrads)
17066 (struct pending_signals, debug_threads, pid_of): New.
17067 (inferior_pid): Replace with macro.
17068 (struct inferior_linux_data): Remove.
17069 (get_stop_pc, add_process): New functions.
17070 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17071 Use add_process and add_thread.
17072 (linux_attach_lwp): New function, based on old linux_attach. Use
17073 add_process and add_thread. Set stop_expected for new threads.
17074 (linux_attach): New function.
17075 (linux_kill_one_process): New function.
17076 (linux_kill): Kill all LWPs.
17077 (linux_thread_alive): Use find_inferior_id.
17078 (check_removed_breakpoints, status_pending_p): New functions.
17079 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17080 Update. Use WNOHANG. Wait for cloned processes also. Update process
17081 struct for the found process.
17082 (linux_wait_for_event): New function.
17083 (linux_wait): Use it. Support LWPs.
17084 (send_sigstop, wait_for_sigstop, stop_all_processes)
17085 (linux_resume_one_process, linux_continue_one_process): New functions.
17086 (linux_resume): Support LWPs.
17087 (REGISTER_RAW_SIZE): Remove.
17088 (fetch_register): Use register_size instead. Call supply_register.
17089 (usr_store_inferior_registers): Likewise. Call collect_register.
17090 Fix recursive case.
17091 (regsets_fetch_inferior_registers): Improve error message.
17092 (regsets_store_inferior_registers): Add debugging.
17093 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17094 (unstopped_p, linux_signal_pid): New functions.
17095 (linux_target_ops): Add linux_signal_pid.
17096 (linux_init_signals): New function.
17097 (initialize_low): Call it. Initialize using_threads.
17098 * regcache.c (inferior_regcache_data): Add valid
17099 flag.
17100 (get_regcache): Fetch registers lazily. Add fetch argument
17101 and update all callers.
17102 (regcache_invalidate_one, regcache_invalidate): New
17103 functions.
17104 (new_register_cache): Renamed from create_register_cache.
17105 Return the new regcache.
17106 (free_register_cache): Change argument to a void *.
17107 (registers_to_string, registers_from_string): Call get_regcache
17108 with fetch flag set.
17109 (register_data): Make static. Pass fetch flag to get_regcache.
17110 (supply_register): Call get_regcache with fetch flag clear.
17111 (collect_register): Call get_regcache with fetch flag set.
17112 (collect_register_as_string): New function.
17113 * regcache.h: Update.
17114 * remote-utils.c (putpkt): Flush after debug output and use
17115 stderr.
17116 Handle input interrupts while waiting for an ACK.
17117 (input_interrupt): Use signal_pid method.
17118 (getpkt): Flush after debug output and use stderr.
17119 (outreg): Use collect_register_as_string.
17120 (new_thread_notify, dead_thread_notify): New functions.
17121 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17122 and general_thread.
17123 (look_up_one_symbol): Flush after debug output.
17124 * server.c (step_thread, server_waiting): New variables.
17125 (start_inferior): Don't use signal_pid. Update call to mywait.
17126 (attach_inferior): Update call to mywait.
17127 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17128 (main): Don't fetch/store registers explicitly. Use
17129 set_desired_inferior. Support proposed ``Hs'' packet. Update
17130 calls to mywait.
17131 * server.h: Update.
17132 (struct inferior_list, struct_inferior_list_entry): New.
17133 * target.c (set_desired_inferior): New.
17134 (write_inferior_memory): Constify.
17135 (mywait): New function.
17136 * target.h: Update.
17137 (struct target_ops): New signal_pid method.
17138 (mywait): Removed macro, added prototype.
17139
17140 * linux-low.h (regset_func): Removed.
17141 (regset_fill_func, regset_store_func): New.
17142 (enum regset_type): New.
17143 (struct regset_info): Add type field. Use new operation types.
17144 (struct linux_target_ops): stop_pc renamed to get_pc.
17145 Add decr_pc_after_break and breakpoint_at.
17146 (get_process, get_thread_proess, get_process_thread)
17147 (strut process_info, all_processes, linux_attach_lwp)
17148 (thread_db_init): New.
17149
17150 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17151 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17152 (the_low_target): Add new members.
17153 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17154 (i386_store_fpxregset): Constify.
17155 (target_regsets): Add new kind identifier.
17156 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17157 (i386_set_pc): Add debugging.
17158 (i386_breakpoint_at): New function.
17159 (the_low_target): Add new members.
17160 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17161 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17162 (mips_breakpoint_at): New.
17163 (the_low_target): Add new members.
17164 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17165 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17166 (the_low_target): Add new members.
17167 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17168 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17169 (the_low_target): Add new members.
17170 * linux-x86-64-low.c (target_regsets): Add new kind
17171 identifier.
17172
171732002-05-15 Daniel Jacobowitz <drow@mvista.com>
17174
17175 From Martin Pool <mbp@samba.org>:
17176 * server.c (gdbserver_usage): New function.
17177 (main): Call it.
17178
171792002-05-14 Daniel Jacobowitz <drow@mvista.com>
17180
17181 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17182 stop_at -> stop_pc.
17183
171842002-05-04 Andrew Cagney <ac131313@redhat.com>
17185
17186 * Makefile.in: Remove obsolete code.
17187
171882002-04-24 Michal Ludvig <mludvig@suse.cz>
17189
17190 * linux-low.c (regsets_fetch_inferior_registers),
17191 (regsets_store_inferior_registers): Removed cast to int from
17192 ptrace() calls.
17193 * regcache.h: Added declaration of struct inferior_info.
17194
171952002-04-20 Daniel Jacobowitz <drow@mvista.com>
17196
17197 * inferiors.c (struct inferior_info): Add regcache_data.
17198 (add_inferior): Call create_register_cache.
17199 (clear_inferiors): Call free_register_cache.
17200 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17201 * regcache.c (struct inferior_regcache_data): New.
17202 (registers): Remove.
17203 (get_regcache): New function.
17204 (create_register_cache, free_register_cache): New functions.
17205 (set_register_cache): Don't initialize the register cache here.
17206 (registers_to_string, registers_from_string, register_data): Call
17207 get_regcache.
17208 * regcache.h: Add prototypes.
17209 * server.h: Likewise.
17210
172112002-04-20 Daniel Jacobowitz <drow@mvista.com>
17212
17213 * mem-break.c: New file.
17214 * mem-break.h: New file.
17215 * Makefile.in: Add mem-break.o rule; update server.h
17216 dependencies.
17217 * inferiors.c (struct inferior_info): Add target_data
17218 member.
17219 (clear_inferiors): Free target_data member if set.
17220 (inferior_target_data, set_inferior_target_data): New functions.
17221 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17222 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17223 * linux-low.c (linux_bp_reinsert): New variable.
17224 (struct inferior_linux_data): New.
17225 (linux_create_inferior): Use set_inferior_target_data.
17226 (linux_attach): Likewise. Call add_inferior.
17227 (linux_wait_for_one_inferior): New function.
17228 (linux_wait): Call it.
17229 (linux_write_memory): Add const.
17230 (initialize_low): Call set_breakpoint_data.
17231 * linux-low.h (struct linux_target_ops): Add breakpoint
17232 handling members.
17233 * server.c (attach_inferior): Remove extra add_inferior
17234 call.
17235 * server.h: Include mem-break.h. Update inferior.c
17236 prototypes.
17237 * target.c (read_inferior_memory)
17238 (write_inferior_memory): New functions.
17239 * target.h (read_inferior_memory)
17240 (write_inferior_memory): Change macros to prototypes.
17241 (struct target_ops): Update comments. Add const to write_memory
17242 definition.
17243
172442002-04-11 Daniel Jacobowitz <drow@mvista.com>
17245
17246 * linux-low.c (usr_store_inferior_registers): Support
17247 registers which are allowed to fail to store.
17248 * linux-low.h (linux_target_ops): Likewise.
17249 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17250 (ppc_cannot_store_register): FPSCR may not be storable.
17251
172522002-04-09 Daniel Jacobowitz <drow@mvista.com>
17253
17254 * server.h: Include <string.h> if HAVE_STRING_H.
17255 * ChangeLog: Correct paths in last ChangeLog entry.
17256
172572002-04-09 Daniel Jacobowitz <drow@mvista.com>
17258
17259 * linux-low.h: Remove obsolete prototypes.
17260 (struct linux_target_ops): New.
17261 (extern the_low_target): New.
17262 * linux-low.c (num_regs, regmap): Remove declarations.
17263 (register_addr): Use the_low_target explicitly.
17264 (fetch_register): Likewise.
17265 (usr_fetch_inferior_registers): Likewise.
17266 (usr_store_inferior_registers): Likewise.
17267 * linux-arm-low.c (num_regs): Remove.
17268 (arm_num_regs): Define.
17269 (arm_regmap): Renamed from regmap, made static.
17270 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17271 made static.
17272 (arm_cannot_store_register): Renamed from cannot_store_register,
17273 made static.
17274 (the_low_target): New.
17275 * linux-i386-low.c (num_regs): Remove.
17276 (i386_num_regs): Define.
17277 (i386_regmap): Renamed from regmap, made static.
17278 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17279 made static.
17280 (i386_cannot_store_register): Renamed from cannot_store_register,
17281 made static.
17282 (the_low_target): New.
17283 * linux-ia64-low.c (num_regs): Remove.
17284 (ia64_num_regs): Define.
17285 (ia64_regmap): Renamed from regmap, made static.
17286 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17287 made static.
17288 (ia64_cannot_store_register): Renamed from cannot_store_register,
17289 made static.
17290 (the_low_target): New.
17291 * linux-m68k-low.c (num_regs): Remove.
17292 (m68k_num_regs): Define.
17293 (m68k_regmap): Renamed from regmap, made static.
17294 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17295 made static.
17296 (m68k_cannot_store_register): Renamed from cannot_store_register,
17297 made static.
17298 (the_low_target): New.
17299 * linux-mips-low.c (num_regs): Remove.
17300 (mips_num_regs): Define.
17301 (mips_regmap): Renamed from regmap, made static.
17302 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17303 made static.
17304 (mips_cannot_store_register): Renamed from cannot_store_register,
17305 made static.
17306 (the_low_target): New.
17307 * linux-ppc-low.c (num_regs): Remove.
17308 (ppc_num_regs): Define.
17309 (ppc_regmap): Renamed from regmap, made static.
17310 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17311 made static.
17312 (ppc_cannot_store_register): Renamed from cannot_store_register,
17313 made static.
17314 (the_low_target): New.
17315 * linux-s390-low.c (num_regs): Remove.
17316 (s390_num_regs): Define.
17317 (s390_regmap): Renamed from regmap, made static.
17318 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17319 made static.
17320 (s390_cannot_store_register): Renamed from cannot_store_register,
17321 made static.
17322 (the_low_target): New.
17323 * linux-sh-low.c (num_regs): Remove.
17324 (sh_num_regs): Define.
17325 (sh_regmap): Renamed from regmap, made static.
17326 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17327 made static.
17328 (sh_cannot_store_register): Renamed from cannot_store_register,
17329 made static.
17330 (the_low_target): New.
17331 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17332 (the_low_target): New.
17333
173342002-04-09 Daniel Jacobowitz <drow@mvista.com>
17335
17336 * Makefile.in: Add stamp-h target.
17337 * configure.in: Create stamp-h.
17338 * configure: Regenerated.
17339
173402002-04-09 Daniel Jacobowitz <drow@mvista.com>
17341
17342 * inferiors.c: New file.
17343 * target.c: New file.
17344 * target.h: New file.
17345 * Makefile.in: Add target.o and inferiors.o. Update
17346 dependencies.
17347 * linux-low.c (inferior_pid): New static variable,
17348 moved from server.c.
17349 (linux_create_inferior): Renamed from create_inferior.
17350 Call add_inferior. Return 0 on success instead of a PID.
17351 (linux_attach): Renamed from myattach.
17352 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17353 (linux_thread_alive): Renamed from mythread_alive.
17354 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17355 child dies.
17356 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17357 (regsets_store_inferior_registers): Correct error message.
17358 Add missing ``return 0''.
17359 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17360 (linux_store_registers): Renamed from store_inferior_registers.
17361 (linux_read_memory): Renamed from read_inferior_memory.
17362 (linux_write_memory): Renamed from write_inferior_memory.
17363 (linux_target_ops): New structure.
17364 (initialize_low): Call set_target_ops ().
17365 * remote-utils.c (unhexify): New function.
17366 (hexify): New function.
17367 (input_interrupt): Send signals to ``signal_pid''.
17368 * server.c (inferior_pid): Remove.
17369 (start_inferior): Update create_inferior call.
17370 (attach_inferior): Call add_inferior.
17371 (handle_query): New function.
17372 (main): Call handle_query for `q' packets.
17373 * server.h: Include "target.h". Remove obsolete prototypes.
17374 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17375
173762002-04-09 Daniel Jacobowitz <drow@mvista.com>
17377
17378 * Makefile.in: Add WARN_CFLAGS. Update configury
17379 dependencies.
17380 * configure.in: Check for <string.h>
17381 * configure: Regenerate.
17382 * config.in: Regenerate.
17383 * gdbreplay.c: Include needed system headers.
17384 (remote_open): Remove strchr prototype.
17385 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17386 * regcache.c (supply_register): Change buf argument to const void *.
17387 (supply_register_by_name): Likewise.
17388 (collect_register): Change buf argument to void *.
17389 (collect_register_by_name): Likewise.
17390 * regcache.h: Add missing prototypes.
17391 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17392 * server.c (handle_query): New function.
17393 (attached): New static variable, moved out of main.
17394 (main): Quiet longjmp clobber warnings.
17395 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17396 * utils.c (error): Remove NORETURN.
17397 (fatal): Likewise.
This page took 2.192349 seconds and 4 git commands to generate.