Remove linux-waitpid.c debugging code
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
422186a9
TT
12019-06-10 Tom Tromey <tromey@adacore.com>
2
3 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4 end warning with a newline.
5 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
6 newline.
7 * thread-db.c (attach_thread): Don't end warning with a newline.
8 (thread_db_notice_clone): Likewise.
9 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
10 newline.
11 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
12 end warning with a newline.
13
b02f78f9
PA
142019-06-04 Pedro Alves <palves@redhat.com>
15
16 * server.c (captured_main): Use make_unique_xstrdup.
17
88ed7edb
TT
182019-06-02 Tom Tromey <tom@tromey.com>
19
20 * gdbreplay.c (fromhex): Remove.
21 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
22
33a6bc35
TT
232019-05-29 Tom Tromey <tromey@adacore.com>
24
25 * configure: Rebuild.
26
e90a813d
KB
272019-05-06 Kevin Buettner <kevinb@redhat.com>
28
29 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
30 sign extension code on 32-bit builds.
31
353ea2d1
EZ
322019-05-03 Eli Zaretskii <eliz@gnu.org>
33
34 * remote-utils.c:
35 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
36
b494cdff
TT
372019-04-19 Tom Tromey <tom@tromey.com>
38
39 * server.c (struct vstop_notif): Derive from notif_event.
40 <base>: Remove.
41 (queue_stop_reply): Update.
42 (remove_all_on_match_ptid): Change type. Rewrite.
43 (discard_queued_stop_replies): Rewrite.
44 (in_queued_stop_replies_ptid): Change type.
45 (in_queued_stop_replies): Rewrite.
46 (notif_stop): Update.
47 (queue_stop_reply_callback): Update.
48 (captured_main): Don't call initialize_notif.
49 (push_stop_notification): Update.
50 * notif.c (notif_write_event, handle_notif_ack)
51 (notif_event_enque, notif_push): Update.
52 (notif_event_xfree, initialize_notif): Remove.
53 * notif.h (struct notif_event): Include <list>, not
54 "common/queue.h".
55 (struct notif_server) <queue>: Now a std::list.
56 (notif_event_p): Remove typedef.
57 (initialize_notif): Don't declare.
58 (struct notif_event): Add virtual destructor.
59
a7e559cc
AH
602019-04-17 Alan Hayward <alan.hayward@arm.com>
61
62 * ax.c (ax_vdebug): Call debug_printf.
63 * debug.c (debug_write): New function.
64 * debug.h (debug_write): New declaration.
65 * linux-low.c (sigchld_handler): Call debug_write.
66
aeb2e706
AH
672019-04-17 Alan Hayward <alan.hayward@arm.com>
68
69 * debug.c (debug_set_output): New function.
70 (debug_vprintf): Send output to debug_file.
71 (debug_flush): Likewise.
72 * debug.h (debug_set_output): New declaration.
73 * server.c (handle_monitor_command): Add debug-file option.
74 (captured_main): Likewise.
75
c1bc0935
AH
762019-04-17 Alan Hayward <alan.hayward@arm.com>
77
78 * debug.c (remote_debug): Add definition.
79 * debug.h (remote_debug): Add declaration.
80 * hostio.c (remote_debug): Remove declaration.
81 * remote-utils.c (struct ui_file): Likewise.
82 (remote_debug): Likewise.
83 * remote-utils.h (remote_debug): Likewise,
84 * server.c (remote_debug): Remove definition.
85
3f52fdbc
KB
862019-04-10 Kevin Buettner <kevinb@redhat.com>
87
88 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
89 when using a 64-bit gdbserver.
90
b0319eaa
TT
912019-04-09 Tom Tromey <tromey@adacore.com>
92
93 * linux-low.c (select_event_lwp): Use find_thread_in_random.
94
eedc3f4f
TT
952019-04-08 Tom Tromey <tom@tromey.com>
96
97 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
98 throw.
99 (linux_resume_one_lwp): Likewise.
100
230d2906
TT
1012019-04-08 Tom Tromey <tom@tromey.com>
102
103 * gdbreplay.c: Update.
104 * linux-low.c: Update.
105 * server.c: Update.
106
a70b8144
TT
1072019-04-08 Tom Tromey <tom@tromey.com>
108
109 * server.c: Use C++ exception handling.
110 * linux-low.c: Use C++ exception handling.
111 * gdbreplay.c: Use C++ exception handling.
112
3d6e9d23
TT
1132019-04-08 Tom Tromey <tom@tromey.com>
114
115 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
116 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
117 (captured_main, main): Update.
118 * gdbreplay.c (main): Update.
119
0570503d
PFC
1202019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
121
122 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
123 value in argument pointer, return 1 if the entry is found and 0
124 otherwise. Move comment.
125 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
126 * linux-low.h (linux_get_auxv): Declare.
127 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
128
227a9e65
TT
1292019-04-05 Tom Tromey <tromey@adacore.com>
130
131 * server.c (gdbserver_usage): Use upper-case for metasyntactic
132 variables.
133
69f4c9cc
AH
1342019-03-28 Alan Hayward <alan.hayward@arm.com>
135
136 * linux-low.c (AT_HWCAP2): Add define if not already included.
137
974c89e0
AH
1382019-03-26 Alan Hayward <alan.hayward@arm.com>
139
140 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
141 (aarch64_arch_setup): Call linux_get_hwcap.
142 * linux-arm-low.c (arm_get_hwcap): Remove function.
143 (arm_read_description): Call linux_get_hwcap.
144 * linux-low.c (linux_get_auxv): New function.
145 (linux_get_hwcap): Likewise.
146 (linux_get_hwcap2): Likewise.
147 * linux-low.h (linux_get_hwcap): New declaration.
148 (linux_get_hwcap2): Likewise.
149 * linux-ppc-low.c (ppc_get_auxv): Remove function.
150 (ppc_arch_setup): Call linux_get_hwcap.
151 * linux-s390-low.c (s390_get_hwcap): Remove function.
152 (s390_arch_setup): Call linux_get_hwcap.
153
1ef53e6b
AH
1542019-03-22 Alan Hayward <alan.hayward@arm.com>
155 Jiong Wang <jiong.wang@arm.com>
156
157 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
158 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
159 to fail.
160 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
161
ee4fbcfa
AH
1622019-03-22 Alan Hayward <alan.hayward@arm.com>
163 Jiong Wang <jiong.wang@arm.com>
164
165 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
166 (aarch64_get_hwcap): New function.
167 (aarch64_arch_setup): Read APIA hwcap.
168
6dc0ebde
AH
1692019-03-22 Alan Hayward <alan.hayward@arm.com>
170 Jiong Wang <jiong.wang@arm.com>
171
172 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
173 (initialize_low_tracepoint): Likewise.
174 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
175 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
176 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
177 (aarch64_linux_read_description): Likewise.
178 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
179
1163a4b7
JB
1802019-03-12 John Baldwin <jhb@FreeBSD.org>
181
182 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
183 i386_create_target_description for 'segments' parameter.
184 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
185 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
186 * win32-i386-low.c (i386_arch_setup): Likewise.
187
d3a70e03
TT
1882019-03-12 Tom Tromey <tromey@adacore.com>
189
190 * linux-low.c (iterate_over_lwps): Update.
191
37991b4f
TT
1922019-03-06 Tom Tromey <tom@tromey.com>
193
194 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
195 (captured_main): Use SCOPE_EXIT.
196
45950eb6
SDJ
1972019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
198
199 * configure.srv: Use '$enable_unittest' instead of '$development'
200 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
201 case.
202
43ac54fc
TT
2032019-02-27 Tom Tromey <tromey@adacore.com>
204
205 * gdbreplay.c (logchar): Handle \r\n.
206
df0da8a2
AH
2072019-02-07 Alan Hayward <alan.hayward@arm.com>
208
209 * linux-low.c (linux_attach): Add process before lwp.
210 * server.c (attach_inferior): Check if already attached.
211
1a5c2598
TT
2122019-02-07 Tom Tromey <tom@tromey.com>
213
214 * x86-tdesc.h: Rename include guard.
215 * x86-low.h: Add include guard.
216 * wincecompat.h: Rename include guard.
217 * win32-low.h: Add include guard.
218 * utils.h: Rename include guard.
219 * tracepoint.h: Rename include guard.
220 * tdesc.h: Rename include guard.
221 * target.h: Rename include guard.
222 * server.h: Rename include guard.
223 * remote-utils.h: Rename include guard.
224 * regcache.h: Rename include guard.
225 * nto-low.h: Rename include guard.
226 * notif.h: Add include guard.
227 * mem-break.h: Rename include guard.
228 * lynx-low.h: Add include guard.
229 * linux-x86-tdesc.h: Add include guard.
230 * linux-s390-tdesc.h: Add include guard.
231 * linux-ppc-tdesc-init.h: Add include guard.
232 * linux-low.h: Add include guard.
233 * linux-aarch64-tdesc.h: Add include guard.
234 * linux-aarch32-low.h: Add include guard.
235 * inferiors.h: Rename include guard.
236 * i387-fp.h: Rename include guard.
237 * hostio.h: Rename include guard.
238 * gdbthread.h: Rename include guard.
239 * gdb_proc_service.h: Rename include guard.
240 * event-loop.h: Rename include guard.
241 * dll.h: Rename include guard.
242 * debug.h: Rename include guard.
243 * ax.h: Rename include guard.
244
956cc47c
SN
2452018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
246
247 PR gdb/23985
248 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
249 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
250
a0707f3c
TT
2512019-01-25 Tom Tromey <tom@tromey.com>
252
253 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
254
0747795c
TT
2552019-01-25 Tom Tromey <tom@tromey.com>
256
257 * win32-low.c: Fix common/ includes.
258 * win32-i386-low.c: Fix common/ includes.
259 * tracepoint.c: Fix common/ includes.
260 * thread-db.c: Fix common/ includes.
261 * target.h: Fix common/ includes.
262 * symbol.c: Fix common/ includes.
263 * spu-low.c: Fix common/ includes.
264 * server.h: Fix common/ includes.
265 * server.c: Fix common/ includes.
266 * remote-utils.c: Fix common/ includes.
267 * regcache.h: Fix common/ includes.
268 * regcache.c: Fix common/ includes.
269 * nto-x86-low.c: Fix common/ includes.
270 * notif.h: Fix common/ includes.
271 * mem-break.h: Fix common/ includes.
272 * lynx-low.c: Fix common/ includes.
273 * lynx-i386-low.c: Fix common/ includes.
274 * linux-x86-tdesc-selftest.c: Fix common/ includes.
275 * linux-x86-low.c: Fix common/ includes.
276 * linux-low.c: Fix common/ includes.
277 * inferiors.h: Fix common/ includes.
278 * i387-fp.c: Fix common/ includes.
279 * hostio.c: Fix common/ includes.
280 * hostio-errno.c: Fix common/ includes.
281 * gdbthread.h: Fix common/ includes.
282 * gdbreplay.c: Fix common/ includes.
283 * fork-child.c: Fix common/ includes.
284 * event-loop.c: Fix common/ includes.
285 * ax.c:
286 (enum gdb_agent_op): Fix common/ includes.
287
be6d4f74
TT
2882019-01-21 Tom Tromey <tom@tromey.com>
289
290 * tracepoint.c: Fix includes.
291 * remote-utils.c: Fix includes.
292 * linux-x86-low.c: Fix includes.
293
66d91b39
JB
2942019-01-01 Joel Brobecker <brobecker@adacore.com>
295
296 * gdbreplay.c (gdbreplay_version): Update copyright year in
297 version message.
298 * server.c (gdbserver_version): Likewise.
299
754e3168
AH
3002018-12-05 Alan Hayward <alan.hayward@arm.com>
301
302 * linux-low.c (add_lwp): Switch ordering.
303
d105de22
TT
3042018-11-29 Tom Tromey <tom@tromey.com>
305
306 * win32-low.c (win32_join): Take pid, not process.
307 * target.h (struct target_ops) <join>: Change argument type.
308 (join_inferior): Change argument name.
309 * spu-low.c (spu_join): Take pid, not process.
310 * server.c (handle_detach): Preserve pid before destroying
311 process.
312 * lynx-low.c (lynx_join): Take pid, not process.
313 * linux-low.c (linux_join): Take pid, not process.
314
50138245
AH
3152018-11-23 Alan Hayward <alan.hayward@arm.com>
316
317 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
318 (aarch64_cannot_fetch_register): Likewise.
319 (struct linux_target_ops): Update references.
320
64f57f3d
PFC
3212018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
322
323 * linux-ppc-low.c: Include nat/linux-ptrace.h.
324
8d619c01
EBM
3252018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
326
327 * configure.srv (ipa_ppc_linux_regobj): Add
328 powerpc-isa207-htm-vsx32l-ipa.o and
329 powerpc-isa207-htm-vsx64l-ipa.o.
330 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
331 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
332 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
333 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
334 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
335 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
336 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
337 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
338 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
339 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
340 (init_registers_powerpc_isa207_htm_vsx32l)
341 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
342 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
343 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
344 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
345 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
346 (ppc_store_tm_ctarregset): New functions.
347 (ppc_regsets): Add entries for HTM regsets.
348 (ppc_arch_setup): Set htm in features struct when needed. Set
349 sizes for the HTM regsets.
350 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
351 (initialize_low_arch): Call
352 init_registers_powerpc_isa207_htm_vsx32l and
353 init_registers_powerpc_isa207_htm_vsx64l.
354 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
355 PPC_TDESC_ISA207_HTM_VSX.
356 (initialize_low_tracepoint): Call
357 init_registers_powerpc_isa207_htm_vsx32l and
358 init_registers_powerpc_isa207_htm_vsx64l.
359
232bfb86
EBM
3602018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
361
362 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
363 rs6000/power-linux-pmu.xml to srv_xmlfiles.
364 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
365 (ppc_store_pmuregset): New functions.
366 (ppc_regsets): Add entries for ebb and pmu regsets.
367 (ppc_arch_setup): Set isa207 in features struct if the ebb and
368 pmu regsets are available. Set sizes for these regsets.
369
f2cf6173
EBM
3702018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
371
372 * configure.srv (ipa_ppc_linux_regobj): Add
373 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
374 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
375 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
376 rs6000/powerpc-isa207-vsx32l.xml, and
377 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
378 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
379 <PPC_TDESC_ISA207_VSX>: New enum value.
380 (init_registers_powerpc_isa207_vsx32l): Declare.
381 (init_registers_powerpc_isa207_vsx64l): Declare.
382 * linux-ppc-low.c (ppc_fill_tarregset): New function.
383 (ppc_store_tarregset): New function.
384 (ppc_regsets): Add entry for the TAR regset.
385 (ppc_arch_setup): Set isa207 in features struct when needed. Set
386 size for the TAR regsets.
387 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
388 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
389 and init_registers_powerpc_isa207_vsx64l.
390 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
391 (initialize_low_tracepoint): Call
392 init_registers_powerpc_isa207_vsx32l and
393 init_registers_powerpc_isa207_vsx64l.
394
7ca18ed6
EBM
3952018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
396 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
397
398 * configure.srv (ipa_ppc_linux_regobj): Add
399 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
400 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
401 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
402 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
403 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
404 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
405 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
406 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
407 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
408 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
409 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
410 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
411 (ppc_hwcap): Add comment.
412 (ppc_hwcap2): New global.
413 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
414 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
415 (ppc_regsets): Add entries for the DSCR and PPR regsets.
416 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
417 when needed. Set sizes for the the DSCR and PPR regsets.
418 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
419 (initialize_low_arch): Call
420 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
421 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
422 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
423 PPC_TDESC_ISA205_PPR_DSCR_VSX.
424 (initialize_low_tracepoint): Call
425 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
426 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
427
5c849b22
PFC
4282018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
429
430 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
431
8ecfd7bd
SDJ
4322018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
433 Simon Marchi <simark@simark.ca>
434
435 * acinclude.m4: Include "../selftest.m4".
436 * configure: Regenerate.
437 * configure.ac: Use "GDB_AC_SELFTEST".
438 * configure.srv: Use "$enable_unittests" instead of
439 "$development" when checking whether unit tests have been
440 enabled.
441 * server.c (captured_main): Update message informing that
442 selftests have been disabled.
443
96643e35
TT
4442018-10-04 Tom Tromey <tom@tromey.com>
445
446 * configure: Rebuild.
447
da4ae14a
TT
4482018-10-04 Tom Tromey <tom@tromey.com>
449
450 * server.c (handle_status): Rename inner "thread".
451 (process_serial_event): Declare "res" in 'm' case.
452 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
453 (iterate_over_lwps): Rename inner "thread".
454 (linux_qxfer_libraries_svr4): Rename inner "len".
455 * gdbthread.h (find_thread_in_random): Rename inner "thread".
456
7c619dbd
GB
4572018-10-01 Gary Benson <gbenson@redhat.com>
458
459 * gdb_proc_service.h: Moved common code to
460 common/gdb_proc_service.h.
461
3795e814
GB
4622018-10-01 Gary Benson <gbenson@redhat.com>
463
464 * gdb_proc_service.h: Synchronize comments and whitespace with
465 GDB's version of this file.
466
49b036f1
TT
4672018-09-25 Tom Tromey <tom@tromey.com>
468
469 * configure: Rebuild.
470 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
471
8ff03f0b
SM
4722018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
475 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
476 ($(IPA_LIB)): Sort IPA_OBJS.
477
a1cd91dc
SM
4782018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
479
480 * Makefile.in: Remove references to $(ADD_DEPS).
481
752312ba
TT
4822018-09-16 Tom Tromey <tom@tromey.com>
483
484 * remote-utils.c (remote_open): Use GNU style for metasyntactic
485 variables.
486 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
487 variables.
488
f1628857
TT
4892018-09-05 Tom Tromey <tom@tromey.com>
490
491 * configure: Rebuild.
492
ad202fcc
SM
4932018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
494
495 PR build/23399
496 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
497
d3d8724a
TT
4982018-08-27 Tom Tromey <tom@tromey.com>
499
500 PR build/23087:
501 * configure: Rebuild.
502
b4f183d2
TT
5032018-08-27 Tom Tromey <tom@tromey.com>
504
505 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
506 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
507 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
508 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
509 (s390x_emit_stack_adjust): Add casts to unsigned char.
510
4e2aa472
SM
5112018-08-22 Simon Marchi <simon.marchi@ericsson.com>
512
513 PR gdb/23374
514 PR gdb/23375
515 * server.h (struct client_state) <disable_randomization>:
516 Initialize to 1.
517
cf4088a9
SM
5182018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
519
520 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
521 variable.
522 (mips_supply_ptrace_register): Likewise.
523
a0de763e
TT
5242018-07-22 Tom Tromey <tom@tromey.com>
525
526 * configure: Rebuild.
527
b0a7723d
TT
5282018-07-22 Tom Tromey <tom@tromey.com>
529
530 * win32-low.c (win32_create_inferior): Remove unused variables.
531 * gdbreplay.c (remote_open): Remove unused variable.
532 * remote-utils.c (remote_prepare): Remove unused variable.
533 * x86-tdesc.h (X86_TDESC_H): Define.
534 (amd64_expedite_regs): Define conditionally.
535 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
536 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
537 * remote-utils.c (readchar): Remove unused variable.
538
a780ef4f
PA
5392018-07-13 Pedro Alves <palves@redhat.com>
540
541 * linux-low.c (linux_kill): Change parameter to process_info
542 pointer instead of pid. Adjust.
543 * lynx-low.c (lynx_kill): Likewise.
544 * nto-low.c (nto_kill): Likewise.
545 * spu-low.c (spu_kill): Likewise.
546 * win32-low.c (win32_kill): Likewise.
547 * server.c (handle_v_kill, kill_inferior_callback)
548 (detach_or_kill_for_exit): Adjust.
549 * target.c (kill_inferior): Change parameter to process_info
550 pointer instead of pid. Adjust.
551 * target.h (struct target_ops) <kill>: Change parameter to
552 process_info pointer instead of pid. Adjust all implementations
553 and callers.
554 (kill_inferior): Likewise.
555
ef2ddb33
PA
5562018-07-13 Pedro Alves <palves@redhat.com>
557
558 * linux-low.c (linux_detach, linux_join): Change parameter to
559 process_info pointer instead of pid. Adjust.
560 * lynx-low.c (lynx_detach, lynx_join): Likewise.
561 * nto-low.c (nto_detach): Likewise.
562 * spu-low.c (spu_detach, spu_join): Likewise.
563 * win32-low.c (win32_detach, win32_join): Likewise.
564 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
565 * target.h (struct target_ops) <detach, join>: Change parameter to
566 process_info pointer instead of pid. Adjust all implementations
567 and callers.
568 (detach_inferior, join_inferior): Rename 'pid' parameter to
569 'proc'.
570
c7ab0aef
SDJ
5712018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
572 Jan Kratochvil <jan.kratochvil@redhat.com>
573 Paul Fertser <fercerpav@gmail.com>
574 Tsutomu Seki <sekiriki@gmail.com>
575
576 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
577 (OBS): Add 'common/netstuff.o'.
578 (GDBREPLAY_OBS): Likewise.
579 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
580 (remote_open): Implement support for IPv6
581 connections.
582 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
583 and 'wspiapi.h'.
584 (handle_accept_event): Accept connections from IPv6 sources.
585 (remote_prepare): Handle IPv6-style hostnames; implement
586 support for IPv6 connections.
587 (remote_open): Implement support for printing connections from
588 IPv6 sources.
589
31445d10
PA
5902018-07-11 Pedro Alves <palves@redhat.com>
591
592 PR gdb/23377
593 * mem-break.c (any_persistent_commands): Add process_info
594 parameter and use it instead of relying on the current process.
595 Change return type to bool.
596 * mem-break.h (any_persistent_commands): Add process_info
597 parameter and change return type to bool.
598 * server.c (handle_detach): Remove require_running_or_return call.
599 Look up the process_info for the process we're about to detach.
600 If not found, return back error to GDB. Adjust
601 any_persistent_commands call to pass down a process pointer.
602
cb197132
PA
6032018-07-11 Pedro Alves <palves@redhat.com>
604
605 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
606 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
607 instead of collect_register_by_name.
608 * regcache.c (regcache_raw_get_unsigned_by_name): New.
609 * regcache.h (regcache_raw_get_unsigned_by_name): New.
610
1b919490
VB
6112018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
612 Pedro Alves <palves@redhat.com>
613
614 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
615
d7e15655
TT
6162018-07-03 Tom Tromey <tom@tromey.com>
617
618 * linux-low.c: Update.
619 * lynx-low.c: Update.
620 * mem-break.c: Update.
621 * nto-low.c: Update.
622 * remote-utils.c: Update.
623 * server.c: Update.
624 * spu-low.c: Update.
625 * target.c: Update.
626 * win32-low.c: Update.
627
26a57c92
TT
6282018-07-03 Tom Tromey <tom@tromey.com>
629
630 * server.c: Update.
631
0e998d96
TT
6322018-07-03 Tom Tromey <tom@tromey.com>
633
634 * linux-low.c: Update.
635
cc6bcb54
TT
6362018-07-03 Tom Tromey <tom@tromey.com>
637
638 * target.c: Update.
639
e38504b3
TT
6402018-07-03 Tom Tromey <tom@tromey.com>
641
642 * linux-low.c: Update.
643 * linux-mips-low.c: Update.
644 * lynx-low.c: Update.
645 * nto-low.c: Update.
646 * remote-utils.c: Update.
647 * server.c: Update.
648 * spu-low.c: Update.
649 * target.c: Update.
650 * thread-db.c: Update.
651
e99b03dc
TT
6522018-07-03 Tom Tromey <tom@tromey.com>
653
654 * linux-low.c: Update.
655 * linux-mips-low.c: Update.
656 * lynx-low.c: Update.
657 * mem-break.c: Update.
658 * nto-low.c: Update.
659 * remote-utils.c: Update.
660 * server.c: Update.
661 * spu-low.c: Update.
662 * target.c: Update.
663 * tracepoint.c: Update.
664
f2907e49
TT
6652018-07-03 Tom Tromey <tom@tromey.com>
666
667 * linux-low.c: Update.
668 * linux-ppc-low.c: Update.
669 * linux-x86-low.c: Update.
670 * proc-service.c: Update.
671 * server.c: Update.
672 * spu-low.c: Update.
673 * thread-db.c: Update.
674 * win32-low.c: Update.
675
fd79271b
TT
6762018-07-03 Tom Tromey <tom@tromey.com>
677
678 * linux-low.c: Update.
679 * lynx-low.c: Update.
680 * nto-low.c: Update.
681 * remote-utils.c: Update.
682 * spu-low.c: Update.
683 * thread-db.c: Update.
684 * win32-low.c: Update.
685
c0867626
SDJ
6862018-06-29 Joel Brobecker <brobecker@adacore.com>
687
688 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
689 parameter in call to 'amd64_create_target_description'.
690
2512d7ef
JK
6912018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
692
693 * x86-tdesc.h: Remove executable permission flag.
694
d0ac1c44
SM
6952018-06-19 Simon Marchi <simon.marchi@ericsson.com>
696
697 * configure.ac: Remove AC_PREREQ, add missing quoting.
698 * configure: Re-generate.
699 * config.in: Re-generate.
700 * aclocal.m4: Re-generate.
701
c4eb05ff
SM
7022018-06-18 Simon Marchi <simon.marchi@ericsson.com>
703
704 * tracepoint.h (current_traceframe): Remove declaration.
705
02895270
AH
7062018-06-18 Alan Hayward <alan.hayward@arm.com>
707
708 * linux-aarch64-low.c (is_sve_tdesc): New function.
709 (aarch64_sve_regs_copy_to_regcache): Likewise.
710 (aarch64_sve_regs_copy_from_regcache): Likewise.
711 (aarch64_regs_info): Add SVE checks.
712 (initialize_low_arch): Initialize SVE.
713
e9902bfc
AH
7142018-06-18 Alan Hayward <alan.hayward@arm.com>
715
716 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
717
fefa175e
AH
7182018-06-11 Alan Hayward <alan.hayward@arm.com>
719
720 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
721 (initialize_low_tracepoint): Likewise
722 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
723 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
724 param.
725 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
726 checks.
727 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
728
b91ad3ff
AH
7292018-06-11 Alan Hayward <alan.hayward@arm.com>
730
731 * server.h (PBUFSIZ): Increase size
732
f868386e
AH
7332018-06-11 Alan Hayward <alan.hayward@arm.com>
734
735 * regcache.c (regcache::raw_compare): New function.
736 * regcache.h (regcache::raw_compare): New declaration.
737
9c861883
AH
7382018-06-11 Alan Hayward <alan.hayward@arm.com>
739
740 * regcache.c (new_register_cache): Use new.
741 (free_register_cache): Use delete.
742 (register_data): Use const.
743 (supply_register): Move body inside regcache.
744 (regcache::raw_supply): New override function.
745 (collect_register): Move body inside regcache.
746 (regcache::raw_collect): New override function.
747 (regcache::get_register_status): New override function.
748 * regcache.h (struct regcache): Inherit from reg_buffer_common.
749
40591844
TT
7502018-06-09 Tom Tromey <tom@tromey.com>
751
752 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
753 declare queue.
754 (event_queue): Use std::queue.
755 (gdb_event_xfree): Remove.
756 (initialize_event_loop, process_event, wait_for_event): Update.
757
6341380d
SC
7582018-06-08 Stan Cox <scox@redhat.com>
759
760 * win32-low.c (win32_create_inferior): last_ptid and last_status
761 moved to client_state.
762
03349c93
PA
7632018-06-08 Pedro Alves <palves@redhat.com>
764
765 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
766 common/common-exceptions.o, common/common-utils.o,
767 common/errors.o, common/print-utils.o and utils.o.
768 * gdbreplay.c: Include "common-defs.h" instead of the two
769 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
770 string.h or alloca.h.
771 (perror_with_name): Delete.
772 (remote_open): Use xstrdup instead of strdup.
773 (main): Rename to ...
774 (captured_main): ... this.
775 (main): New.
776
8dcc53b3
TT
7772018-06-08 Tom Tromey <tom@tromey.com>
778
779 * linux-low.c (linux_low_read_btrace): Update.
780
c12a5089
SC
7812018-06-04 Stan Cox <scox@redhat.com>
782
783 * server.h (struct client_state): New.
784 * server.c (cont_thread, general_thread, multi_process)
785 (report_fork_events, report_vfork_events, report_exec_events)
786 (report_thread_events, swbreak_feature, hwbreak_feature)
787 (vCont_supported, disable_randomization, pass_signals)
788 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
789 Moved to client_state.
790 * remote-utils.c (remote_debug, noack_mode)
791 (transport_is_reliable): Moved to client_state.
792 * tracepoint.c (current_traceframe): Moved to client_state.
793
794 Update all callers.
795 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
796 linux-low.c, remote-utils.h, target.c: Use client_state.
797
122394f1
AH
7982018-05-31 Alan Hayward <alan.hayward@arm.com>
799
800 * configure.srv: Add new c/h file.
801
95228a0d
AH
8022018-05-31 Alan Hayward <alan.hayward@arm.com>
803
804 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
805 null VQ.
806
d8dab6c3
MR
8072018-05-25 Maciej W. Rozycki <macro@mips.com>
808
809 * gdb.arch/mips-fpregset-core.exp: New test.
810 * gdb.arch/mips-fpregset-core.c: New test source.
811
81e25b7c
EK
8122018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
813
814 PR server/23198
815 * hostio.c (require_int): Do not report overflow for integers
816 between 0xfffffff and 0x7fffffff.
817
7e947ad3
MR
8182018-05-22 Maciej W. Rozycki <macro@mips.com>
819
820 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
821 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
822 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
823 functions.
824 (the_low_target): Wire them.
825
1d75a658
PFC
8262018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
827
828 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
829 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
830 mode. Call collect_register_by_name with vscr using
831 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
832 (ppc_store_vrregset): Add and set vscr_offset variable as in
833 ppc_fill_vrregset. Call supply_register_by_name with vscr using
834 vscr_offset.
835
d078308a
PFC
8362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
837
838 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
839 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
840 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
841
7273b5fc
PFC
8422018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
843
844 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
845 (ppc_store_vsxregset): Likewise.
846 (ppc_fill_vrregset): Likewise.
847 (ppc_store_vrregset): Likewise.
848 (ppc_fill_evrregset): Likewise.
849 (ppc_store_evrregset): Likewise.
850 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
851 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
852 needed.
853
2e077f5e
PFC
8542018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
855
856 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
857 wordsize of the inferior. Call ppc_linux_target_wordsize.
858
bd64614e
PFC
8592018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
860
861 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
862 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
863 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
864 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
865 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
866 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
867 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
868 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
869 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
870 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
871 (tdesc_powerpc_e500l): Remove.
872 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
873 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
874 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
875 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
876 linux-ppc-tdesc.h.
877 (ppc_arch_setup): Remove target description matching code. Fill a
878 ppc_linux_features struct and call ppc_linux_match_description
879 with it.
880
75d74cca
MR
8812018-05-22 Maciej W. Rozycki <macro@mips.com>
882
883 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
884 width of the requested register exceeds the width of the
885 `ptrace' data type.
886 (mips_cannot_store_register): Likewise.
887
e4439e43
MR
8882018-05-21 Maciej W. Rozycki <macro@mips.com>
889
890 * linux-mips-low.c (mips_fetch_register): New function. Update
891 preceding comment.
892 (mips_store_gregset): Supply 0 rather than $restart for $zero.
893 (the_low_target): Wire `mips_fetch_register'.
894
55271bf9
JB
8952018-05-10 Joel Brobecker <brobecker@adacore.com>
896
897 * lynx-i386-low.c (LYNXOS_178): New macro.
898 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
899 the layout on LynxOS-178.
900 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
901 handle floating point registers that are not supported by
902 LynxOS-178.
903
1a34f210
TT
9042018-05-10 Tom Tromey <tom@tromey.com>
905
906 * configure: Rebuild.
907
190852c8
JB
9082018-05-10 Joel Brobecker <brobecker@adacore.com>
909
910 PR server/23158:
911 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
912 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
913 Use it to set the expedite_regs field in the given tdesc.
914 * x86-tdesc.h: New file.
915 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
916 Adjust following the addition of the new expedite_regs parameter
917 to init_target_desc.
918 * linux-tic6x-low.c (tic6x_read_description): Likewise.
919 * linux-x86-tdesc.c: #include "x86-tdesc.h".
920 (i386_linux_read_description, amd64_linux_read_description):
921 Adjust following the addition of the new expedite_regs parameter
922 to init_target_desc.
923 * lynx-i386-low.c: #include "x86-tdesc.h".
924 (lynx_i386_arch_setup): Adjust following the addition of the new
925 expedite_regs parameter to init_target_desc.
926 * nto-x86-low.c: #include "x86-tdesc.h".
927 (nto_x86_arch_setup): Adjust following the addition of the new
928 expedite_regs parameter to init_target_desc.
929 * win32-i386-low.c: #include "x86-tdesc.h".
930 (i386_arch_setup): Adjust following the addition of the new
931 expedite_regs parameter to init_target_desc.
932
7dbac825
JB
9332018-05-10 Joel Brobecker <brobecker@adacore.com>
934
935 PR server/23158:
936 * win32-low.c (win32_create_inferior): Add call to my_wait
937 setting last_status global.
938
906994d9
JB
9392018-05-10 Joel Brobecker <brobecker@adacore.com>
940
941 PR server/23158:
942 * win32-low.c (create_process): Only call gdb_tilde_expand if
943 inferior_cwd is not NULL.
944
8ee22052
AB
9452018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
946
947 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
948 registers to the cache if their values have changed.
949 (i387_xsave_to_cache): Provide default values for x87 control
950 registers when these features are available, but disabled.
951 * regcache.c (supply_register_by_name_zeroed): New function.
952 * regcache.h (supply_register_by_name_zeroed): Declare new
953 function.
954
aff689d3
TT
9552018-05-07 Tom Tromey <tom@tromey.com>
956
957 * configure: Rebuild.
958
85e26832
TT
9592018-05-04 Tom Tromey <tom@tromey.com>
960
961 * configure: Rebuild.
962
a3b60e45
JK
9632018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
964 Pedro Alves <palves@redhat.com>
965
966 * linux-aarch64-low.c (aarch64_stopped_data_address):
967 Likewise.
968
632e107b
TT
9692018-04-27 Tom Tromey <tom@tromey.com>
970
971 * configure: Rebuild.
972
458412c3
TT
9732018-04-23 Tom Tromey <tom@tromey.com>
974
975 * configure: Rebuild.
976
f31c089e
SM
9772018-04-19 Simon Marchi <simon.marchi@ericsson.com>
978
979 * Makefile.in (depcomp): Add "..".
980 (all_deps_files): New and use it.
981
b319b098
AH
9822018-04-18 Alan Hayward <alan.hayward@arm.com>
983
984 * configure.srv (aarch64*-*-linux*): Don't include xml.
985 (i[34567]86-*-cygwin*): Likewise.
986 (i[34567]86-*-linux*): Likewise.
987 (i[34567]86-*-lynxos*): Likewise.
988 (i[34567]86-*-mingw32ce*): Likewise.
989 (i[34567]86-*-mingw*): Likewise.
990 (i[34567]86-*-nto*): Likewise.
991 (tic6x-*-uclinux): Likewise.
992 (x86_64-*-linux*): Likewise.
993 (x86_64-*-mingw*): Likewise.
994 (x86_64-*-cygwin*): Likewise.
995
3b74854b
AH
9962018-04-18 Alan Hayward <alan.hayward@arm.com>
997
998 * tdesc.c: Remove xml parameter.
999
e98577a9
AH
10002018-04-18 Alan Hayward <alan.hayward@arm.com>
1001
1002 * server.c (get_features_xml): Remove cast.
1003 * tdesc.c (void target_desc::accept): Fill in function.
1004 (tdesc_get_features_xml): Remove old xml creation.
1005 (print_xml_feature::visit_pre): Add xml vistor.
1006 * tdesc.h (struct target_desc): Make xmltarget mutable.
1007 (tdesc_get_features_xml): Remove declaration.
1008
d278f585
AH
10092018-04-18 Alan Hayward <alan.hayward@arm.com>
1010
1011 * tdesc.c (tdesc_architecture_name): Add new function.
1012 (tdesc_osabi_name): Likewise.
1013 (tdesc_get_features_xml): Use new functions.
1014
eee8a18d
AH
10152018-04-18 Alan Hayward <alan.hayward@arm.com>
1016
1017 * tdesc.c (tdesc_create_flags): Remove.
1018 (tdesc_add_flag): Likewise.
1019 (tdesc_named_type): Likewise.
1020 (tdesc_create_union): Likewise.
1021 (tdesc_create_struct): Likewise.
1022 (tdesc_create_vector): Likewise.
1023 (tdesc_add_bitfield): Likewise.
1024 (tdesc_add_field): Likewise.
1025 (tdesc_set_struct_size): Likewise.
1026
82ec9bc7
AH
10272018-04-18 Alan Hayward <alan.hayward@arm.com>
1028
1029 * tdesc.c (~target_desc): Remove implictly deleted items.
1030 (init_target_desc): Iterate all features.
1031 (tdesc_get_features_xml): Use vector.
1032 (tdesc_create_feature): Create feature.
1033 * tdesc.h (tdesc_feature) Remove
1034 (target_desc): Add features.
1035
ea3e7d71
AH
10362018-04-18 Alan Hayward <alan.hayward@arm.com>
1037
1038 * Makefile.in: Add common/tdesc.c
1039 * tdesc.c (init_target_desc): init all reg_defs from register
1040 vector.
1041 (tdesc_create_reg): Create tdesc_reg.
1042 * tdesc.h (tdesc_feature): Add register vector.
1043
17d08cd4
SM
10442018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * tdesc.h (struct target_desc) <features>: Change type to
1047 std::vector<std::string>.
1048 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1049 changes.
1050 (tdesc_get_features_xml): Likewise.
1051 (tdesc_create_feature): Likewise.
1052
5cd3e386
AH
10532018-03-26 Alan Hayward <alan.hayward@arm.com>
1054
1055 * regcache.c (find_register_by_number): Return a ref.
1056 (find_regno): Use references.
1057 (register_size): Likewise.
1058 (register_data): Likewise.
1059 * tdesc.c (target_desc::~target_desc): Remove free calls.
1060 (target_desc::operator==): Use std::vector compare.
1061 (init_target_desc): Use reference.
1062 (tdesc_create_reg): Use reg constructors.
1063 * tdesc.h (struct target_desc): Replace pointer with object.
1064
dff7492c
AH
10652018-03-23 Alan Hayward <alan.hayward@arm.com>
1066
1067 * regcache.c (find_register_by_number): Make static.
1068 (find_regno): Use find_register_by_number
1069 * regcache.h (struct reg): Remove declaration.
1070
d80e5242
AH
10712018-03-23 Alan Hayward <alan.hayward@arm.com>
1072
1073 * tdesc.c (target_desc::~target_desc): Move to here.
1074 (target_desc::operator==): Likewise.
1075 * tdesc.h (target_desc::~target_desc): Move from here.
1076 (target_desc::operator==): Likewise.
1077
f69c5afb
AA
10782018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1079
1080 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1081
ce29f843
AA
10822018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1083
1084 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1085 S390_TDESC_GS.
1086 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1087 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1088 and init_registers_s390_gs_linux64.
1089
c49bd90b
AA
10902018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1091
1092 * linux-s390-low.c (s390_fill_gs): Remove function.
1093 (s390_fill_gsbc): Remove function.
1094 (s390_regsets): Set fill functions for the guarded storage regsets
1095 to NULL.
1096
7edb9bd3
AA
10972018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1098
1099 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1100 the word size. Add comment.
1101 (s390_get_wordsize): New function.
1102 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1103 pswm with it. Instead, use s390_get_wordsize to determine the
1104 word size first and derive the correct tdesc from that directly.
1105
39be3c7e
SM
11062018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1107
1108 * Makefile.in: Include silent-rules.mk.
1109 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1110 (COMPILE): Add ECHO_CXX.
1111 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1112 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1113 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1114 (version-generated.c): Add ECHO_GEN.
1115 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1116 (IPAGENT_COMPILE): Add ECHO_CXX.
1117 (%-generated.c): Add ECHO_REGDAT.
1118
3ae9ce5d
TT
11192018-03-14 Tom Tromey <tom@tromey.com>
1120
1121 PR cli/14977:
1122 * ax.c (ax_printf): Special case for NULL.
1123
e6a58aa8
SM
11242018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1125
1126 * linux-low.c (linux_qxfer_libraries_svr4): Use
1127 xml_escape_text_append.
1128
f6e8a41e
SM
11292018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1130
1131 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1132
b9671caf
SM
11332018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1134
1135 * server.c (handle_general_set): Remove unnecessary xstrdup.
1136
e80aaf61
SM
11372018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * server.c (parse_debug_format_options): Adjust to
1140 delim_string_to_char_ptr_vec changes.
1141 * thread-db.c (thread_db_load_search): Adjust to
1142 dirnames_to_char_ptr_vec changes.
1143
b1223e78
MM
11442018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1145
1146 * target.h (target_enable_btrace, target_disable_btrace)
1147 (target_read_btrace, target_read_btrace_conf): Turn macro into
1148 inline function. Throw error if target method is not defined.
1149 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1150 check for btrace target method. Be prepared to handle exceptions
1151 from btrace target methods.
1152
81561546
SDJ
11532018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1154
1155 * server.c (captured_main): Change order of error message printed
1156 when the current working directory cannot be found.
1157
25e3c82c
SDJ
11582018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1159
1160 * server.c: Include "filenames.h" and "pathstuff.h".
1161 (program_name): Delete variable.
1162 (program_path): New anonymous class.
1163 (get_exec_wrapper): Use "program_path" instead of
1164 "program_name".
1165 (handle_v_run): Likewise.
1166 (captured_main): Likewise.
1167 (process_serial_event): Likewise.
1168
b4987c95
SDJ
11692018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1170
1171 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1172 (OBJS): Add "pathstuff.o".
1173 * server.c (current_directory): New global variable.
1174 (captured_main): Initialize "current_directory".
1175
f46cd62a
AH
11762018-02-26 Alan Hayward <alan.hayward@arm.com>
1177
1178 * tdesc.c: Use common/tdesc.h.
1179 * tdesc.h: Likewise.
1180
a543c5ca
AH
11812018-02-20 Alan Hayward <alan.hayward@arm.com>
1182 Simon Marchi <simon.marchi@ericsson.com>
1183
1184 * Makefile.in: Switch order of make rules.
1185
b5884fa7
AH
11862018-02-19 Alan Hayward <alan.hayward@arm.com>
1187
1188 * Makefile.in: Add common directory in build.
1189 * configure.ac: Add common reference.
1190 * configure: Regenerate.
1191
de6242d3
MM
11922018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1193
1194 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1195 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1196 * spu-low.c (spu_target_ops): Likewise.
1197 * win32-low.c (win32_target_ops): Likewise.
1198 * server.c (supported_btrace_packets): Report packets unconditionally.
1199 * target.h (target_ops) <supports_btrace>: Remove.
1200 (target_supports_btrace): Remove.
1201
9ee23a85
MM
12022018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1203
1204 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1205 (handle_btrace_disable): Change return type to void. Use exceptions
1206 to report errors.
1207 (handle_btrace_general_set): Catch exception and copy message to
1208 return message.
1209
8ce47547
TT
12102018-02-08 Tom Tromey <tom@tromey.com>
1211
1212 * linux-low.c (install_software_single_step_breakpoints): Use
1213 make_scoped_restore.
1214 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1215 (do_restore_current_thread_cleanup): Remove.
1216 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1217 declare.
1218
45dd3607
TT
12192018-02-08 Tom Tromey <tom@tromey.com>
1220
1221 * mem-break.c (set_raw_breakpoint_at): Use
1222 gdb::unique_xmalloc_ptr.
1223
e671cd59
PA
12242018-01-30 Pedro Alves <palves@redhat.com>
1225
1226 PR gdb/13211
1227 * target.c (target_terminal::terminal_state): Rename to ...
1228 (target_terminal::m_terminal_state): ... this.
1229
a0aad537
JC
12302018-01-19 James Clarke <jrtc27@jrtc27.com>
1231
1232 * linux-low.c (handle_extended_wait): Surround call to
1233 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1234
4d9b86e1
SM
12352018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1238 linux_ptrace_attach_fail_reason_string now returning an
1239 std::string.
1240 (linux_attach): Likewise.
1241 * thread-db.c (attach_thread): Likewise.
1242
f517c180
EA
12432018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1244
1245 PR gdb/21559
1246 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1247 checking for fs_base/gs_base fields in struct user_regs_struct.
1248 * configure: Regenerate.
1249
9a70f35c
YQ
12502018-01-16 Yao Qi <yao.qi@linaro.org>
1251
1252 PR gdb/18749
1253 * linux-low.c (fetch_register): Call supply_register instead of
1254 error.
1255
605fd3c6
YQ
12562018-01-08 Yao Qi <yao.qi@linaro.org>
1257 Simon Marchi <simon.marchi@ericsson.com>
1258
1259 * Makefile.in (OBS): Remove selftest.o.
1260 * configure.ac: Set srv_selftest_objs if $development is true.
1261 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1262 * configure: Re-generated.
1263 * server.c (captured_main): Wrap variable selftest_filter with
1264 GDB_SELF_TEST.
1265
2cc05030
SM
12662018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1267
1268 * server.c (parse_debug_format_options): Return std::string.
1269 (handle_monitor_command, captured_main): Adjust.
1270
e379cee6
PA
12712018-01-05 Pedro Alves <palves@redhat.com>
1272
1273 PR gdb/18653
1274 * server.c (captured_main): Pass quiet=false to
1275 save_original_signals_state.
1276
82e1e79a
JB
12772018-01-01 Joel Brobecker <brobecker@adacore.com>
1278
1279 * gdbreplay.c (gdbreplay_version): Update copyright year in
1280 version message.
1281 * server.c (gdbserver_version): Likewise.
1282
8e481c3b
TT
12832017-12-08 Tom Tromey <tom@tromey.com>
1284
1285 * ax.c (ax_printf): Update.
1286
a8806230
YQ
12872017-12-07 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1290 aarch64_linux_read_description.
1291 * linux-amd64-ipa.c (idx2mask): New array.
1292 (get_ipa_tdesc): Move idx2mask out.
1293 (initialize_low_tracepoint): Initialize target descriptions.
1294 * linux-i386-ipa.c (idx2mask): New array.
1295 (get_ipa_tdesc): Move idx2mask out.
1296 (initialize_low_tracepoint): Initialize target descriptions.
1297
d4a0e8b5
SM
12982017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1299
1300 * tdesc.c (struct tdesc_type): Change return type.
1301 (tdesc_add_flag): Change parameter type.
1302 (tdesc_add_bitfield): Likewise.
1303 (tdesc_add_field): Likewise.
1304 (tdesc_set_struct_size): Likewise.
1305
798a7429
SM
13062017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1307
1308 * regcache.c (registers_to_string): Remove unused variable.
1309
c0e15c9b
SM
13102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1311
1312 * inferiors.c (for_each_inferior_with_data): Remove.
1313 * inferiors.h (for_each_inferior_with_data): Remove.
1314 * server.c (handle_qxfer_threads_worker): Change parameter type.
1315 (handle_qxfer_threads_proper): Use for_each_thread.
1316
f0045347
SM
13172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1318
1319 * inferiors.c (for_each_inferior): Remove.
1320 (clear_inferiors): Use for_each_thread.
1321 * inferiors.h (for_each_inferior): Remove.
1322 * linux-low.c (linux_wait_for_event_filtered): Use
1323 for_each_thread.
1324 (linux_stabilize_threads): Likewise.
1325 * regcache.c (regcache_release): Likewise.
1326 * server.c (gdb_wants_all_threads_stopped): Likewise.
1327 (clear_pending_status_callback): Remove.
1328 (handle_status): Use for_each_thread.
1329 (captured_main): Likewise.
1330 * win32-low.c (child_init_thread_list): Likewise.
1331 (win32_clear_inferiors): Likewise.
1332 (fake_breakpoint_event): Likewise.
1333
9521758b
SM
13342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1335
1336 * inferiors.h (find_inferior): Remove.
1337 * inferiors.c (find_inferior): Remove.
1338
8f86d7aa
SM
13392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1340
1341 * linux-low.c (resume_status_pending_p): Update comment.
1342 (need_step_over_p): Update comment.
1343
e2b44075
SM
13442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1345
1346 * linux-low.c (proceed_one_lwp): Return void, change parameter
1347 type.
1348 (unsuspend_and_proceed_one_lwp): Likewise.
1349 (proceed_all_lwps): Use for_each_thread.
1350 (unstop_all_lwps): Likewise.
1351
c80825ff
SM
13522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1353
1354 * linux-low.c (linux_resume_one_thread): Return void, take
1355 parameter directly.
1356 (linux_resume): Use for_each_thread.
1357
df3e4dbe
SM
13582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1359
1360 * linux-low.c (send_sigstop_callback): Return void, change
1361 parameter type. Rename to...
1362 (send_sigstop): ... this.
1363 (suspend_and_send_sigstop_callback): Return void, change parameter
1364 type. Rename to...
1365 (suspend_and_send_sigstop): ... this.
1366 (stop_all_lwps): Use for_each_thread.
1367
5a6b0a41
SM
13682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1369
1370 * linux-low.c (lwp_running): Return bool, remove unused
1371 argument.
1372 (linux_stabilize_threads): Use find_thread.
1373
39a64da5
SM
13742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1375
1376 * linux-low.c (select_singlestep_lwp_callback): Remove.
1377 (count_events_callback): Remove.
1378 (select_event_lwp_callback): Remove.
1379 (select_event_lwp): Use find_thread/for_each_thread.
1380
a1385b7b
SM
13812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1382
1383 * linux-low.c (not_stopped_callback): Return bool, take filter
1384 argument directly.
1385 (linux_wait_for_event_filtered): Use find_thread.
1386 (linux_wait_1): Likewise.
1387
454296a2
SM
13882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1389
1390 * linux-low.c (same_lwp): Remove.
1391 (find_lwp_pid): Use find_thread.
1392
6b2a85da
SM
13932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1394
1395 * linux-low.c (delete_lwp_callback): Remove.
1396 (linux_mourn): Use for_each_thread.
1397
798a38e8
SM
13982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1399
1400 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1401 args parameter, don't check for pid.
1402 (linux_detach): Use for_each_thread.
1403
e4eb0dec
SM
14042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1405
1406 * linux-low.c (struct counter): Remove.
1407 (second_thread_of_pid_p): Remove.
1408 (last_thread_of_process_p): Use find_thread.
1409
83e1b6c1
SM
14102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * inferiors.c (find_inferior_in_random): Remove.
1413 * inferiors.h (find_inferior_in_random): Remove.
1414 * linux-low.c (status_pending_p_callback): Return bool, accept
1415 parameter ptid directly.
1416 (linux_wait_for_event_filtered): Use find_thread_in_random.
1417 (linux_wait_1): Likewise.
1418
8dc7b443
SM
14192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1420
1421 * inferiors.c (find_inferior_id): Remove.
1422 (find_thread_ptid): Move implemention from find_inferior_id to
1423 here.
1424 * inferiors.h (find_inferior_id): Remove.
1425 * server.c (handle_status): Use find_thread_ptid.
1426 (process_serial_event): Likewise.
1427 * thread-db.c (find_one_thread): Likewise.
1428 (thread_db_thread_handle): Likewise.
1429 * win32-low.c (thread_rec): Likewise.
1430 (child_delete_thread): Likewise.
1431 (win32_thread_alive): Likewise.
1432 (get_child_debug_event): Likewise.
1433
da25033c
SM
14342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * linux-mips-low.c (update_watch_registers_callback): Return
1437 void, remove pid_p parameter, don't check for pid.
1438 (mips_insert_point, mips_remove_point): Use for_each_thread.
1439
c91bb56b
SM
14402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1441
1442 * lynx.low (lynx_delete_thread_callback): Remove.
1443 (lynx_mourn): Use for_each_thread.
1444
634a3254
SM
14452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1446
1447 * regcache.c (regcache_invalidate_one): Remove.
1448 (regcache_invalidate_pid): use for_each_thread.
1449
41272101
TT
14502017-11-26 Tom Tromey <tom@tromey.com>
1451
1452 * linux-low.c (linux_create_inferior): Update.
1453
f5291a6f
UW
14542017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1455
1456 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1457
6654d750
AH
14582017-11-24 Alan Hayward <alan.hayward@arm.com>
1459
1460 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1461 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1462 * linux-aarch64-tdesc-selftest.c: New file.
1463 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1464
14652017-11-24 Alan Hayward <alan.hayward@arm.com>
1466
1467 * configure.srv: Add new file.
1468 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1469 * linux-aarch64-tdesc-selftest.c: New file.
1470 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1471
49bdb7ee
AH
14722017-11-24 Alan Hayward <alan.hayward@arm.com>
1473
1474 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1475 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1476 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1477
d6d7ce56
AH
14782017-11-24 Alan Hayward <alan.hayward@arm.com>
1479
1480 * configure.srv: Add new files.
1481 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1482 aarch64_linux_read_description.
1483 * linux-aarch64-low.c (aarch64_linux_read_description):
1484 Merge with aarch64_arch_setup.
1485 (aarch64_arch_setup): Call aarch64_linux_read_description.
1486 * linux-aarch64-tdesc.c: New file.
1487 * linux-aarch64-tdesc.h: New file.
1488
506fe5f4
YQ
14892017-11-24 Yao Qi <yao.qi@linaro.org>
1490
1491 * configure.srv: Set $srv_regobj for tic6x-linux.
1492 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1493 (tic6x_read_description): Move some code to tic6x_arch_setup.
1494 (tic6x_tdesc_test): New function.
1495 (initialize_low_arch): Call selftests::register_test.
1496
29f9a567
YQ
14972017-11-22 Yao Qi <yao.qi@linaro.org>
1498
1499 * remote-utils.c (prepare_resume_reply): Use memcpy.
1500
578290ec
SM
15012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * linux-low.c (kill_one_lwp_callback): Return void, take
1504 argument directly, don't filter on pid.
1505 (linux_kill): Use for_each_thread.
1506
eca55aec
SM
15072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * linux-low.c (need_step_over_p): Return bool, remove dummy
1510 argument.
1511 (linux_resume, proceed_all_lwps): Use find_thread.
1512
25c28b4d
SM
15132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * linux-low.c (resume_status_pending_p): Return bool, remove
1516 flag_p argument.
1517 (linux_resume): Use find_thread.
1518
5fdda392
SM
15192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1520
1521 * linux-low.c (struct thread_resume_array): Remove.
1522 (linux_set_resume_request): Return void, take arguments
1523 directly.
1524 (linux_resume): Use for_each_thread.
1525
fcb056a5
SM
15262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1527
1528 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1529 return bool, remove data argument.
1530 (linux_stabilize_threads): Use find_thread.
1531
139720c5
SM
15322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1533
1534 * linux-low.c (unsuspend_one_lwp): Remove.
1535 (unsuspend_all_lwps): Use for_each_thread, inline code from
1536 unsuspend_one_lwp.
1537
6d1e5673
SM
15382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1539
1540 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1541 * linux-low.c (struct iterate_over_lwps_args): Remove.
1542 (iterate_over_lwps_filter): Remove.
1543 (iterate_over_lwps): Use find_thread.
1544
bbf550d5
SM
15452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1548 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1549 code from reset_lwp_ptrace_options_callback.
1550
00192f77
SM
15512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1552
1553 * linux-arm-low.c (struct update_registers_data): Remove.
1554 (update_registers_callback): Return void, take arguments
1555 directly, don't check thread's pid.
1556 (arm_insert_point, arm_remove_point): Use for_each_thread.
1557
2bee2b6c
SM
15582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1559
1560 * win32-low.c (continue_one_thread): Return void, take argument
1561 directly.
1562 (child_continue): Use for_each_thread.
1563
0b360f19
SM
15642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * win32-i386-low.c (update_debug_registers_callback): Rename
1567 to ...
1568 (update_debug_registers): ... this, return void, remove pid_p arg.
1569 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1570
f27866ba
SM
15712017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * inferiors.h (struct process_info): Add constructor, initialize
1574 fields..
1575 <syscalls_to_catch>: Change type to std::vector<int>.
1576 * inferiors.c (add_process): Allocate process_info with new.
1577 (remove_process): Free process_info with delete.
1578 * linux-low.c (handle_extended_wait): Adjust.
1579 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1580 * server.c (handle_general_set): Adjust.
1581
e849ea89
PA
15822017-11-16 Pedro Alves <palves@redhat.com>
1583
1584 * remote-utils.c (remote_close): Block SIGIO signals instead of
1585 uninstalling the SIGIO handler.
1586
1d0aa65c
AH
15872017-11-16 Alan Hayward <alan.hayward@arm.com>
1588
1589 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1590
3491a34c
YQ
15912017-11-16 Yao Qi <yao.qi@linaro.org>
1592
1593 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1594 (tic6x_store_gregset): Likewise.
1595 (tic6x_usrregs_info): Move it up.
1596
a602f924
AH
15972017-11-15 Alan Hayward <alan.hayward@arm.com>
1598
1599 * Makefile.in: Update arch rules.
1600 * configure.srv: Explicitly mark arch/ files.
1601
5616b6c3
AS
16022017-11-13 Andreas Schwab <schwab@suse.de>
1603
1604 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1605 function.
1606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1607
d1928160
PA
16082017-11-06 Pedro Alves <palves@redhat.com>
1609
1610 * config.in, configure: Regenerate.
1611
bac608e7
SM
16122017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1613
1614 * target.c (struct thread_search): Remove.
1615 (thread_search_callback): Remove.
1616 (prepare_to_access_memory): Use for_each_thread instead of
1617 find_inferior. Inline code from thread_search_callback.
1618
eaddb425
SM
16192017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1620
1621 * server.c (struct visit_actioned_threads_data): Remove.
1622 (visit_actioned_threads): Change prototype to take arguments
1623 directly.
1624 (resume): Use find_thread instead of find_inferior.
1625
99078d34
SM
16262017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1627
1628 * server.c (queue_stop_reply_callback): Change prototype, return
1629 void.
1630 (find_status_pending_thread_callback): Remove.
1631 (handle_status): Replace find_inferior with find_thread and
1632 for_each_thread.
1633
cc628f3d
AH
16342017-10-25 Alan Hayward <alan.hayward@arm.com>
1635
1636 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1637 with REGNO.
1638 (aarch64_store_gregset): Likewise.
1639 (aarch64_fill_fpregset): Likewise.
1640 (aarch64_store_fpregset): Likewise.
1641
4d3bb80e
SM
16422017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1643
1644 * gdbthread.h (find_thread, for_each_thread): New functions.
1645 * inferiors.c (thread_of_pid): Remove.
1646 (find_any_thread_of_pid): Use find_thread.
1647 * linux-low.c (num_lwps): Use for_each_thread.
1648
7a7cdfa0
YQ
16492017-10-17 Yao Qi <yao.qi@linaro.org>
1650
1651 * Makefile.in: Remove one rule.
1652 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1653
e675d170
YQ
16542017-10-17 Yao Qi <yao.qi@linaro.org>
1655
1656 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1657 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1658
7eb4e0f9
YQ
16592017-10-17 Yao Qi <yao.qi@linaro.org>
1660
1661 * configure.srv: Rename arm.o with arch/arm.o.
1662
60d6cfc9
YQ
16632017-10-17 Yao Qi <yao.qi@linaro.org>
1664
1665 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1666 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1667 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1668 (arch-i386.o, arch-amd64.o): Remove rules.
1669 (arch/%.o): New rule.
1670 Update POSTCOMPILE and COMPILE.pre.
1671 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1672 * configure: Re-generated.
1673 * configure.srv: Replace arch-i386.o with arch/i386.o.
1674 Replace arch-amd64.o with arch/amd64.o.
1675
5bfda255
YQ
16762017-10-16 Yao Qi <yao.qi@linaro.org>
1677
1678 * configure: Regenerated.
1679
9c80ecd6
SM
16802017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1681
1682 * inferiors.h: (struct inferior_list): Remove.
1683 (struct inferior_list_entry); Remove.
1684 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1685 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1686 get_first_inferior): Remove.
1687 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1688 find_inferior_id, find_inferior_in_random): Change signature.
1689 * inferiors.c (all_threads): Change type to
1690 std::list<thread_info *>.
1691 (get_thread): Remove macro.
1692 (find_inferior, find_inferior_id): Change signature, implement
1693 using find_thread.
1694 (find_inferior_in_random): Change signature, implement using
1695 find_thread_in_random.
1696 (for_each_inferior, for_each_inferior_with_data): Change
1697 signature, implement using for_each_thread.
1698 (add_inferior_to_list, remove_inferior): Remove.
1699 (add_thread, get_first_thread, thread_of_pid,
1700 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1701 (get_first_inferior, one_inferior_p, clear_inferior_list):
1702 Remove.
1703 (clear_inferiors, get_thread_process): Update.
1704 * gdbthread.h: Include <list>.
1705 (struct thread_info) <entry>: Remove field.
1706 <id>: New field.
1707 (all_threads): Change type to std::list<thread_info *>.
1708 (get_first_inferior): Add doc.
1709 (find_thread, for_each_thread, find_thread_in_random): New
1710 functions.
1711 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1712 * linux-arm-low.c (update_registers_callback): Update.
1713 * linux-low.c (second_thread_of_pid_p): Update.
1714 (kill_one_lwp_callback, linux_detach_lwp_callback,
1715 delete_lwp_callback, status_pending_p_callback, same_lwp,
1716 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1717 iterate_over_lwps, not_stopped_callback,
1718 resume_stopped_resumed_lwps, count_events_callback,
1719 select_singlestep_lwp_callback, select_event_lwp_callback,
1720 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1721 suspend_and_send_sigstop_callback, wait_for_sigstop,
1722 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1723 lwp_running, linux_set_resume_request, resume_status_pending_p,
1724 need_step_over_p, start_step_over, linux_resume_one_thread,
1725 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1726 reset_lwp_ptrace_options_callback): Update.
1727 * linux-mips-low.c (update_watch_registers_callback): Update.
1728 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1729 Update.
1730 (free_register_cache_thread_one): Remove.
1731 (regcache_release): Update.
1732 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1733 handle_qxfer_threads_worker): Update.
1734 (handle_query): Update, use list iterator.
1735 (visit_actioned_threads, handle_pending_status,
1736 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1737 clear_pending_status_callback, set_pending_status_callback,
1738 find_status_pending_thread_callback, handle_status,
1739 process_serial_event): Update.
1740 * target.c (thread_search_callback): Update.
1741 * thread-db.c (thread_db_get_tls_address): Update.
1742 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1743 Update.
1744 * win32-i386-low.c (update_debug_registers_callback): Update.
1745 * win32-low.c (delete_thread_info, child_delete_thread,
1746 continue_one_thread, suspend_one_thread,
1747 get_child_debug_event): Adjust.
1748
9179355e
SM
17492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1752 * inferiors.h: Include <list>.
1753 (struct process_info) <entry>: Remove field.
1754 <pid>: New field.
1755 (pid_of): Change macro to function.
1756 (ptid_of, lwpid_of): Remove macro.
1757 (all_processes): Change type to std::list<process_info *>.
1758 (ALL_PROCESSES): Remove macro.
1759 (for_each_process, find_process): New function.
1760 * inferiors.c (all_processes): Change type to
1761 std::list<process_info *>.
1762 (find_thread_process): Adjust.
1763 (add_process): Likewise.
1764 (remove_process): Likewise.
1765 (find_process_pid): Likewise.
1766 (get_first_process): Likewise.
1767 (started_inferior_callback): Remove.
1768 (have_started_inferiors_p): Adjust.
1769 (attached_inferior_callback): Remove.
1770 (have_attached_inferiors_p): Adjust.
1771 * linux-low.c (check_zombie_leaders): Likewise.
1772 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1773 (x86_linux_update_xmltarget): Adjust.
1774 * server.c (handle_query): Likewise.
1775 (gdb_reattached_process): Remove.
1776 (handle_status): Adjust.
1777 (kill_inferior_callback): Likewise.
1778 (detach_or_kill_inferior): Remove.
1779 (print_started_pid): Likewise.
1780 (print_attached_pid): Likewise.
1781 (detach_or_kill_for_exit): Update.
1782 (process_serial_event): Likewise.
1783 * linux-arm-low.c (arm_new_fork): Likewise.
1784
c9cb8905
SM
17852017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1786
1787 * dll.h: Include <list>.
1788 (struct dll_info): Add constructor.
1789 <entry>: Remove field.
1790 (all_dlls): Change type to std::list<dll_info>.
1791 * dll.c: Include <algorithm>.
1792 (get_dll): Remove macro.
1793 (all_dlls): Change type to std::list<dll_info *>.
1794 (free_one_dll): Remove.
1795 (match_dll): Likewise.
1796 (loaded_dll): Adjust.
1797 (unloaded_dll): Adjust to all_dlls type change, use
1798 std::find_if. Inline code from match_dll.
1799 (clear_dlls): Adjust to all_dlls type change.
1800 * server.c (emit_dll_description): Remove.
1801 (handle_qxfer_libraries): Adjust to all_dlls type change,
1802 integrate emit_dll_description's functionality.
1803
04ec7890
SM
18042017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * linux-low.h (struct linux_target_ops) <delete_process>: New
1807 field.
1808 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1809 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1810 (struct linux_target_ops): Add delete_process callback.
1811 * linux-arm-low.c (arm_delete_process): New.
1812 (struct linux_target_ops): Add delete_process callback.
1813 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1814 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1815 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1816 * linux-mips-low.c (mips_linux_delete_process): New.
1817 (struct linux_target_ops): Add delete_process callback.
1818 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1819 * linux-s390-low.c (struct linux_target_ops): Likewise.
1820 * linux-sh-low.c (struct linux_target_ops): Likewise.
1821 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1822 * linux-tile-low.c (struct linux_target_ops): Likewise.
1823 * linux-x86-low.c (x86_linux_delete_process): New.
1824 (struct linux_target_ops): Add delete_process callback.
1825 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1826
466eecee
SM
18272017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1828
1829 * linux-aarch64-low.c (the_low_target): Add thread delete
1830 callback.
1831 * linux-arm-low.c (arm_delete_thread): New function.
1832 (the_low_target): Add thread delete callback.
1833 * linux-bfin-low.c (the_low_target): Likewise.
1834 * linux-crisv32-low.c (the_low_target): Likewise.
1835 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1836 set.
1837 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1838 field.
1839 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1840 * linux-mips-low.c (mips_linux_delete_thread): New function.
1841 (the_low_target): Add thread delete callback.
1842 * linux-ppc-low.c (the_low_target): Likewise.
1843 * linux-s390-low.c (the_low_target): Likewise.
1844 * linux-sh-low.c (the_low_target): Likewise.
1845 * linux-tic6x-low.c (the_low_target): Likewise.
1846 * linux-tile-low.c (the_low_target): Likewise.
1847 * linux-x86-low.c (the_low_target): Likewise.
1848 * linux-xtensa-low.c (the_low_target): Likewise.
1849
b79f7801
YZ
18502017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1851
1852 * win32-low.c: Include "common-inferior.h".
1853
bc3b087d
SDJ
18542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1855
1856 * inferiors.c (set_inferior_cwd): New function.
1857 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1858 (handle_query): Inform that QSetWorkingDir is supported.
1859 * win32-low.c (create_process): Pass the inferior's cwd to
1860 CreateProcess.
1861
d092c5a2
SDJ
18622017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1863
1864 * inferiors.c (current_inferior_cwd): New global variable.
1865 (get_inferior_cwd): New function.
1866 * inferiors.h (struct process_info) <cwd>: New field.
1867
7da0a886
SDJ
18682017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1869
1870 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1871 (OBS): Add gdb_tilde_expand.o.
1872
289a6840
SM
18732017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1876 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1877
256642e8
PA
18782017-09-29 Pedro Alves <palves@redhat.com>
1879
1880 * ax.c (gdb_parse_agent_expr): Constify.
1881 * ax.h (gdb_parse_agent_expr): Constify.
1882 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1883 Constify.
1884 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1885 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1886 * remote-utils.h (read_ptid): Constify.
1887 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1888 (process_point_options, process_serial_event): Constify.
1889 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1890 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1891 (cmd_qtbuffer): Constify.
1892
5b9ca4d4
PA
18932017-09-29 Pedro Alves <palves@redhat.com>
1894
1895 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1896 fails.
1897
94c207e0
PA
18982017-09-29 Pedro Alves <palves@redhat.com>
1899
1900 * linux-low.c (handle_extended_wait): Pass parent thread instead
1901 of process to thread_db_notice_clone.
1902 * linux-low.h (thread_db_notice_clone): Replace parent process
1903 parameter with parent thread parameter.
1904 * thread-db.c (find_one_thread): Add comment.
1905 (thread_db_notice_clone): Replace parent process parameter with
1906 parent thread parameter. Temporarily switch to the parent thread.
1907
75352e28
SDJ
19082017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1909
1910 * gdbthread.h: Include "common-gdbthread.h".
1911 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1912 "if" when validating the ptid.
1913 * remote-utils.c: Include "gdbthread.h".
1914 (prepare_resume_reply): Use "switch_to_thread".
1915 * target.c (done_accessing_memory): Likewise.
1916
ad339634
AA
19172017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1918
1919 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1920 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1921 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1922 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1923 s390x-gs-linux64-ipa.o to ipa_obj.
1924 * linux-s390-low.c (HWCAP_S390_GS): New define.
1925 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1926 New functions.
1927 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1928 (s390_arch_setup): Check for guarded-storage support and choose
1929 appropriate tdesc.
1930 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1931 init_registers_s390x_gs_linux64.
1932 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1933 enum value.
1934 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1935 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1936
cc4d742f
SM
19372017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1938
1939 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1940
f6327dcb
KB
19412017-09-21 Kevin Buettner <kevinb@redhat.com>
1942
1943 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1944 (thread_db_thread_handle): Declare.
1945 * linux-low.c (linux_target_ops): Initialize thread_handle.
1946 * server.c (handle_qxfer_threads_worker): Add support for
1947 "handle" attribute.
1948 * target.h (struct target_ops): Add new function pointer,
1949 thread_handle.
1950 (target_thread_handle): Define.
1951 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1952 field in lwp.
1953 (thread_db_thread_handle): New function.
1954
86299109
KB
19552017-09-21 Kevin Buettner <kevinb@redhat.com>
1956
1957 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1958 * linux-low.h (thread_db_notice_clone): Declare.
1959 * thread-db.c (thread_db_notice_clone): New function.
1960
f557a88a
PA
19612017-09-21 Pedro Alves <palves@redhat.com>
1962
1963 * server.c (gdb_read_memory, handle_status, process_serial_event)
1964 (handle_serial_event, handle_target_event): Adjust to
1965 set_desired_thread prototype change.
1966 * target.c (set_desired_thread): Remove 'use_general' parameter
1967 and adjust.
1968 * target.h (set_desired_thread): Remove 'use_general' parameter.
1969
223ffa71
TT
19702017-09-20 Tom Tromey <tom@tromey.com>
1971
1972 * target.c (target_terminal::terminal_state): Define.
1973 (target_terminal::init): Rename from target_terminal_init.
1974 (target_terminal::inferior): Rename from
1975 target_terminal_inferior.
1976 (target_terminal::ours): Rename from target_terminal_ours.
1977 (target_terminal::ours_for_output, target_terminal::info): New.
1978
04fd3ba9
SM
19792017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1980
1981 * server.c (accumulate_file_name_length): Remove.
1982 (emit_dll_description): Adjust to std::string change.
1983 (handle_qxfer_libraries): Use std::string to hold document.
1984
5e187554
SM
19852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1986
1987 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1988 return type of xml_escape_text.
1989 * server.c (emit_dll_description): Likewise.
1990
1526853e
SM
19912017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1992
1993 * server.c (captured_main): Accept argument for --selftest.
1994 Update run_tests call.
1995 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1996 when registering selftests.
1997
c4dfafab
SDJ
19982017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1999
2000 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2001 instead of "VEC" for "target_desc.reg_defs".
2002 (regcache_cpy): Likewise.
2003 (registers_to_string): Likewise.
2004 (registers_from_string): Likewise.
2005 (find_regno): Likewise.
2006 (supply_regblock): Likewise.
2007 (regcache_raw_read_unsigned): Likewise.
2008 * tdesc.c (init_target_desc): Likewise.
2009 (tdesc_create_reg): Likewise.
2010 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2011 (struct target_desc) <reg_defs>: Convert to "std::vector".
2012 (target_desc): Do not initialize "reg_defs".
2013 (~target_desc): Update code to use "std::vector" instead of "VEC"
2014 for "target_desc.reg_defs".
2015 (operator==): Likewise.
2016
124aceb4
SM
20172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2018
2019 * inferiors.h (thread_to_gdb_id): Remove.
2020 * inferiors.c (thread_to_gdb_id): Remove.
2021 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2022 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2023 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2024 Likewise.
2025 * nto-low.c (nto_fetch_registers, nto_store_registers,
2026 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2027
96cde54f
SM
20282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * inferiors.h (gdb_id_to_thread_id): Remove.
2031 * inferiors.c (gdb_id_to_thread_id): Remove.
2032 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2033 removal. Move pid declaration closer to where it's used.
2034
e8ca139e
SM
20352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2036
2037 * server.c (handle_detach): New function.
2038 (process_serial_event): Move code out, call handle_detach.
2039
f8a4e119
SM
20402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2041
2042 * server.c (require_running): Rename to ...
2043 (require_running_or_return): ... this ...
2044 (require_running_or_break): ... and this.
2045 (handle_query, process_serial_event): Adjust.
2046
0eb0a407
SM
20472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2048
2049 * linux-low.c (linux_set_resume_request): Remove unused
2050 variables.
2051
785922a5
SM
20522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2053
2054 * server.c (first_thread_of): Remove.
2055 (process_serial_event): Replace usage of first_thread_of with
2056 find_any_thread_of_pid.
2057 * tracepoint.c (same_process_p): Remove.
2058 (gdb_agent_about_to_close): Replace usage of same_process_p with
2059 find_any_thread_of_pid.
2060 * linux-x86-low.c (same_process_callback): Remove.
2061 (x86_arch_setup_process_callback): Replace usage of
2062 same_process_callback with find_any_thread_of_pid.
2063 * thread-db.c (any_thread_of): Remove.
2064 (switch_to_process): Replace usage of any_thread_of with
2065 find_any_thread_of_pid.
2066 * inferiors.c (thread_pid_matches_callback): Remove.
2067 (find_thread_process): Adjust to use find_any_thread_of_pid.
2068
a059f00c
SDJ
20692017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2070
2071 * regcache.c (get_thread_regcache): Guard calls to "memset"
2072 with "!VEC_empty".
2073
cc397f3a
SDJ
20742017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2075
2076 * linux-low.c (handle_extended_wait): Use
2077 "allocate_target_description" instead of "XNEW".
2078 * linux-x86-low.c (initialize_low_arch): Likewise.
2079
22916b07
YQ
20802017-09-05 Yao Qi <yao.qi@linaro.org>
2081
2082 * configure.srv (srv_i386_regobj): Remove.
2083 (srv_amd64_regobj): Remove.
2084 (srv_regobj): Set it to "" for x86 non-linux targets.
2085 * linux-x86-tdesc.c (i386_linux_read_description):
2086 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2087 (init_registers_i386): Remove the declaration.
2088 (tdesc_i386): Remove the declaration.
2089 (lynx_i386_arch_setup): Call i386_create_target_description.
2090 * nto-x86-low.c: Likewise.
2091 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2092 [!__x86_64__]: include arch/i386.h.
2093 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2094
38602d55
YQ
20952017-09-05 Yao Qi <yao.qi@linaro.org>
2096
2097 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2098 i386/amd64-XXX-linux from it.
2099
44b886ff
YQ
21002017-09-05 Yao Qi <yao.qi@linaro.org>
2101
2102 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2103 false.
2104 (ipa_amd64_linux_regobj): Remove.
2105 (ipa_x32_linux_regobj): Remove.
2106
b4570e4b
YQ
21072017-09-05 Yao Qi <yao.qi@linaro.org>
2108
2109 * Makefile.in (arch-amd64.o): New rule.
2110 * configure.srv: Append arch-amd64.o.
2111 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2112 (get_ipa_tdesc): Call amd64_linux_read_description.
2113 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2114 and init_registers_amd64_XXX.
2115 * linux-x86-low.c (x86_linux_read_description): Call
2116 amd64_linux_read_description.
2117 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2118 (initialize_low_arch): Don't call init_registers_x32_XXX and
2119 init_registers_amd64_XXX.
2120 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2121 and tdesc_amd64_XXX.
2122 [__x86_64__] (amd64_tdesc_test): New function.
2123 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2124 and init_registers_amd64_XXX.
2125 * linux-x86-tdesc.c: Include arch/amd64.h.
2126 (xcr0_to_tdesc_idx): New function.
2127 (i386_linux_read_description): New function.
2128 (amd64_get_ipa_tdesc_idx): New function.
2129 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2130 (amd64_get_ipa_tdesc): Declare.
2131
d1f28ea2
YQ
21322017-09-05 Yao Qi <yao.qi@linaro.org>
2133
2134 * configure.srv (srv_i386_linux_xmlfiles): Remove
2135 i386/i386-XXX-linux.xml from it.
2136
25a93583
YQ
21372017-09-05 Yao Qi <yao.qi@linaro.org>
2138
2139 * configure.srv: Set srv_i386_linux_regobj empty if $development
2140 is false.
2141 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2142 initialize_low_tdesc.
2143 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2144 with #if initialize_low_tdesc.
2145 * linux-x86-tdesc-selftest.c: New file.
2146 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2147
5f035c07
YQ
21482017-09-05 Yao Qi <yao.qi@linaro.org>
2149
2150 * Makefile.in (arch-i386.o): New rule.
2151 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2152 (x86_64-*-linux*): Likewise.
2153 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2154 include arch/i386.h.
2155 (i386_linux_read_description): Remove code and call
2156 i386_create_target_description.
2157 * tdesc.c (allocate_target_description): New function.
2158 * tdesc.h (set_tdesc_architecture): Remove declaration.
2159 (set_tdesc_osabi): Likewise.
2160
0abe8a89
YQ
21612017-09-05 Yao Qi <yao.qi@linaro.org>
2162
2163 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2164 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2165 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2166 .xmltarget.
2167 * server.c (get_features_xml): Call tdesc_get_features_xml.
2168 * tdesc.c (set_tdesc_architecture): New function.
2169 (set_tdesc_osabi): New function.
2170 (tdesc_get_features_xml): New function.
2171 (tdesc_create_feature): Add an argument.
2172 * tdesc.h (struct target_desc) <features>: New field.
2173 <arch, osabi>: New field.
2174 (~target_desc): xfree features, arch, and osabi.
2175 (target_desc::oerator==): Don't compare .xmltarget.
2176 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2177 (set_tdesc_osabi): Likewise.
2178 (tdesc_get_features_xml): Likewise.
2179
0a188386
YQ
21802017-09-05 Yao Qi <yao.qi@linaro.org>
2181
2182 * linux-x86-tdesc.c: Include selftest.h.
2183 (i386_tdesc_test): New function.
2184 (initialize_low_tdesc): Call selftests::register_test.
2185 * tdesc.h: Include regdef.h.
2186 (target_desc): Override operator == and !=.
2187
f49ff000
YQ
21882017-09-05 Yao Qi <yao.qi@linaro.org>
2189
2190 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2191 (ipa_obj): Likewise.
2192 * linux-i386-ipa.c: Include common/x86-xstate.h
2193 (get_ipa_tdesc): Call i386_linux_read_description.
2194 (initialize_low_tracepoint): Don't call init_registers_XXX
2195 functions, call initialize_low_tdesc instead.
2196 * linux-x86-low.c (x86_linux_read_description): Call
2197 i386_linux_read_description.
2198 (initialize_low_arch): Don't call init_registers_i386_XXX
2199 functions, call initialize_low_tdesc.
2200 * linux-x86-tdesc.c: New file.
2201 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2202 (i386_get_ipa_tdesc_idx): Declare.
2203 (i386_get_ipa_tdesc): Declare.
2204 (initialize_low_tdesc): Declare.
2205
2b68ef2f
YQ
22062017-09-05 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2209 instead of 0.
2210
f7000548
YQ
22112017-09-05 Yao Qi <yao.qi@linaro.org>
2212
2213 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2214 * regcache.c (get_thread_regcache): Use VEC_length.
2215 (init_register_cache): Likewise.
2216 (regcache_cpy): Likewise.
2217 (registers_to_string): Iterate reg_defs via VEC_iterate.
2218 (find_regno): Likewise.
2219 (find_register_by_number): Use VEC_index.
2220 (register_size): Call find_register_by_number.
2221 (register_data): Call find_register_by_number.
2222 (supply_regblock): Use VEC_length.
2223 (regcache_raw_read_unsigned): Likewise.
2224 * tdesc.c (init_target_desc): Iterate reg_defs via
2225 VEC_iterate.
2226 (default_description): Update initializer.
2227 (copy_target_description): Don't update field num_registers.
2228 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2229 <num_registers>: Remove.
2230
50a421ac
SM
22312017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * Makefile.in (.SECONDARY): Define target.
2234
23fdd69e
SM
22352017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2236
2237 * linux-low.c (linux_wait_1): Adjust.
2238 * server.c (queue_stop_reply_callback): Adjust.
2239
0a2dde4a
SDJ
22402017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2241
2242 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2243 QEnvironmentUnset and QEnvironmentReset packets.
2244 (handle_query): Inform remote that QEnvironmentHexEncoded,
2245 QEnvironmentUnset and QEnvironmentReset are supported.
2246
6afd337d
SM
22472017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2248
2249 * inferiors.h (inferior_target_data): Rename to ...
2250 (thread_target_data): ... this.
2251 (inferior_regcache_data): Rename to ...
2252 (thread_regcache_data): ... this.
2253 (set_inferior_regcache_data): Rename to ...
2254 (set_thread_regcache_data): ... this.
2255 * inferiors.c (inferior_target_data): Rename to ...
2256 (thread_target_data): ... this.
2257 (inferior_regcache_data): Rename to ...
2258 (thread_regcache_data): ... this.
2259 (set_inferior_regcache_data): Rename to ...
2260 (set_thread_regcache_data): ... this.
2261 (free_one_thread): Update.
2262 * linux-low.h (get_thread_lwp): Update.
2263 * regcache.c (get_thread_regcache): Update.
2264 (regcache_invalidate_thread): Update.
2265 (free_register_cache_thread): Update.
2266 * win32-i386-low.c (update_debug_registers_callback): Update.
2267 (win32_get_current_dr): Update.
2268 * win32-low.c (thread_rec): Update.
2269 (delete_thread_info): Update.
2270 (continue_one_thread): Update.
2271 (suspend_one_thread): Update.
2272
a160cc46
SM
22732017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2274
2275 * inferiors.c (set_inferior_target_data): Remove.
2276 * inferiors.h (set_inferior_target_data): Remove.
2277
6d580b63
YQ
22782017-08-18 Yao Qi <yao.qi@linaro.org>
2279
2280 * Makefile.in (OBS): Add selftest.o.
2281 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2282 * configure, config.in: Re-generated.
2283 * server.c: Include common/sefltest.h.
2284 (captured_main): Handle option --selftest.
2285
f5a29eb0
YQ
22862017-08-09 Yao Qi <yao.qi@linaro.org>
2287
2288 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2289 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2290 i386-avx-mpx.o and i386-mmx.o.
2291 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2292 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2293 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2294 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2295 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2296 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2297 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2298 i386/amd64-avx-mpx.xml.
2299
57757c2f
YQ
23002017-08-09 Yao Qi <yao.qi@linaro.org>
2301
2302 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2303 and x32-avx-avx512.o.
2304 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2305 i386/x32-avx-avx512.xml.
2306
229d26fc
SM
23072017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2308
2309 * tracepoint.h (enum class fast_tpoint_collect_result): New
2310 enumeration.
2311 (fast_tracepoint_collecting): Change return type to
2312 fast_tpoint_collect_result.
2313 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2314 * linux-low.h: Include tracepoint.h.
2315 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2316 fast_tpoint_collect_result.
2317 * linux-low.c (handle_tracepoints): Adjust.
2318 (linux_fast_tracepoint_collecting): Change return type to
2319 fast_tpoint_collect_result.
2320 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2321 linux_wait_1, stuck_in_jump_pad_callback,
2322 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2323 proceed_one_lwp): Adjust to type change.
2324
2e1e43e1
YQ
23252017-07-10 Yao Qi <yao.qi@linaro.org>
2326
2327 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2328
adc764e7
YQ
23292017-06-29 Yao Qi <yao.qi@linaro.org>
2330
2331 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2332 Remove.
2333 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2334
a206891a
SM
23352017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2336
2337 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2338
9a6c7d9c
SDJ
23392017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2340
2341 * linux-low.c (linux_create_inferior): Adjust code to access the
2342 environment information via 'gdb_environ' class.
2343 * lynx-low.c (lynx_create_inferior): Likewise.
2344 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2345 (get_environ): Return a pointer to 'our_environ'.
2346 (captured_main): Initialize 'our_environ'.
2347 * server.h (get_environ): Adjust prototype.
2348 * spu-low.c (spu_create_inferior): Adjust code to access the
2349 environment information via 'gdb_environ' class.
2350
ae3e2ccf
SM
23512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2352
2353 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2354 usage of "register" keyword.
2355
3e019bdc
SM
23562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2357
2358 * configure: Re-generate.
2359
8465943a
SM
23602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * configure: Re-generate.
2363
cf0dd6f0
SM
23642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * Makefile.in (COMPILE.pre): Add "-x c++".
2367
9845682b
SDJ
23682017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2369
2370 * fork-child.c: Conditionally include <signal.h>.
2371
aefd8b33
SDJ
23722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2373
2374 * server.c (handle_general_set): Handle new packet
2375 "QStartupWithShell".
2376 (handle_query): Add "QStartupWithShell" to the list of supported
2377 packets.
2378 (gdbserver_usage): Add help text explaining the
2379 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2380 options.
2381 (captured_main): Recognize and act upon the presence of the new
2382 CLI options.
2383
2090129c
SDJ
23842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2385 Pedro Alves <palves@redhat.com>
2386
2387 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2388 * configure: Regenerate.
2389 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2390 "fork-inferior.o".
2391 (i[34567]86-*-lynxos*): Likewise.
2392 (spu*-*-*): Likewise.
2393 * fork-child.c: New file.
2394 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2395 and "environ.h".
2396 (linux_ptrace_fun): New function.
2397 (linux_create_inferior): Adjust function prototype to reflect
2398 change on "target.h". Adjust function code to use
2399 "fork_inferior".
2400 (linux_request_interrupt): Delete "signal_pid".
2401 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2402 (lynx_ptrace_fun): New function.
2403 (lynx_create_inferior): Adjust function prototype to reflect
2404 change on "target.h". Adjust function code to use
2405 "fork_inferior".
2406 * nto-low.c (nto_create_inferior): Adjust function prototype and
2407 code to reflect change on "target.h". Update comments.
2408 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2409 "common-terminal.h" and "environ.h".
2410 (terminal_fd): Moved to fork-child.c.
2411 (old_foreground_pgrp): Likewise.
2412 (restore_old_foreground_pgrp): Likewise.
2413 (last_status): Make it global.
2414 (last_ptid): Likewise.
2415 (our_environ): New variable.
2416 (startup_with_shell): Likewise.
2417 (program_name): Likewise.
2418 (program_argv): Rename to...
2419 (program_args): ...this.
2420 (wrapper_argv): New variable.
2421 (start_inferior): Delete function.
2422 (get_exec_wrapper): New function.
2423 (get_exec_file): Likewise.
2424 (get_environ): Likewise.
2425 (prefork_hook): Likewise.
2426 (post_fork_inferior): Likewise.
2427 (postfork_hook): Likewise.
2428 (postfork_child_hook): Likewise.
2429 (handle_v_run): Update code to deal with arguments coming from the
2430 remote host. Update calls from "start_inferior" to
2431 "create_inferior".
2432 (captured_main): Likewise. Initialize environment variable. Call
2433 "have_job_control".
2434 * server.h (post_fork_inferior): New prototype.
2435 (get_environ): Likewise.
2436 (last_status): Declare.
2437 (last_ptid): Likewise.
2438 (signal_pid): Likewise.
2439 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2440 (spu_ptrace_fun): New function.
2441 (spu_create_inferior): Adjust function prototype to reflect change
2442 on "target.h". Adjust function code to use "fork_inferior".
2443 * target.c (target_terminal_init): New function.
2444 (target_terminal_inferior): Likewise.
2445 (target_terminal_ours): Likewise.
2446 * target.h: Include <vector>.
2447 (struct target_ops) <create_inferior>: Update prototype.
2448 (create_inferior): Update macro.
2449 * utils.c (gdb_flush_out_err): New function.
2450 * win32-low.c (win32_create_inferior): Adjust function prototype
2451 and code to reflect change on "target.h".
2452
043a4934
SDJ
24532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2454
2455 * inferiors.c (switch_to_thread): New function.
2456
15652511
SDJ
24572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2458
2459 * Makefile.in (SFILE): Add "common/job-control.c".
2460 (OBS): Add "job-control.o".
2461
21ea5acd
SDJ
24622017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2463
2464 * Makefile: Remove "@host_makefile_frag@".
2465
e13cb306
PA
24662017-05-05 Pedro Alves <palves@redhat.com>
2467
2468 * configure: Regenerate.
2469
c94fee56
SDJ
24702017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2471
2472 * configure: Regenerate.
2473
a0ff9e1a
SM
24742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2475
2476 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2477 software_single_step change of return type to
2478 std::vector<CORE_ADDR>.
2479 * linux-low.c (install_software_single_step_breakpoints):
2480 Likewise.
2481 * linux-low.h (install_software_single_step_breakpoints):
2482 Likewise.
2483
be628ab8
SDJ
24842017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2485
2486 * remote-utils.c: Include "gdb_termios.h" instead of
2487 "terminal.h".
2488 * terminal.h: Delete file.
2489
7c5ded6a
SDJ
24902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2491
2492 * server.c: Include <vector>.
2493 <program_argv, wrapper_argv>: Convert to std::vector.
2494 (start_inferior): Rewrite function to use C++.
2495 (handle_v_run): Likewise. Update code that calculates the argv
2496 based on the vRun packet; use C++.
2497 (captured_main): Likewise.
2498
436252de
SM
24992017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2500
2501 * server.c (handle_v_cont): Initialize thread_resume::thread
2502 with null_ptid.
2503
9bf2a700
PA
25042017-04-05 Pedro Alves <palves@redhat.com>
2505
2506 * configure: Regenerate.
2507
a121b7c1
PA
25082017-04-05 Pedro Alves <palves@redhat.com>
2509
2510 * gdbreplay.c (sync_error): Constify.
2511 * linux-x86-low.c (push_opcode): Constify.
2512
21c8a587
PA
25132017-04-05 Pedro Alves <palves@redhat.com>
2514
2515 * win32-low.c (get_child_debug_event)
2516 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2517 Report TARGET_WAITKIND_SPURIOUS instead.
2518
fb32b4f7
PA
25192017-04-05 Pedro Alves <palves@redhat.com>
2520
2521 * remote-utils.c (remote_prepare, remote_open): Constify.
2522 * remote-utils.h (remote_prepare, remote_open): Constify.
2523 * server.c (captured_main): Constify 'port' handling.
2524
65dd1e59
SM
25252017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2526
2527 * Makefile.in (clean): Clear .deps.
2528
8fa5b777
SM
25292017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2530
2531 * .gitignore: Remove generated files, replace with wildcard.
2532 * (clean): Replace removal of generated files with wildcard.
2533 (version.c): Replace with...
2534 (version-generated.c): ...this.
2535 (xml-builtin.c): Replace with...
2536 (xml-builtin-generated.c): ...this.
2537 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2538 (%.c: *regformats*): Replace with...
2539 (%-generated.c: *regformats*): ...this.
2540
a12e714b
MF
25412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2542
2543 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2544 (xtensa_fill_gregset): Call collect_register_by_name for
2545 threadptr register.
2546 (xtensa_store_gregset): Call supply_register_by_name for
2547 threadptr register.
2548
1a09b50a
MF
25492017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2550
2551 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2552 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2553 (xtensa_store_gregset): Call supply_register for all registers in
2554 a0_regnum..a0_regnum + C0_NREGS range.
2555
1a01e7c6
SM
25562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2557
2558 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2559 (ax-ipa.o: ax.c): Remove.
2560 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2561 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2562 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2563 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2564 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2565
36bc18a8
SM
25662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2567
2568 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2569 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2570 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2571 (errors-ipa.o: ../common/errors.c): Remove.
2572 (format-ipa.o: ../common/format.c): Remove.
2573 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2574
a8ebe3d5
SM
25752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2576
2577 * Makefile.in (%-ipa.o: %.c): New rule.
2578 (tracepoint-ipa.o: tracepoint.c): Remove.
2579 (utils-ipa.o: utils.c): Remove.
2580 (remote-utils-ipa.o: remote-utils.c): Remove.
2581 (regcache-ipa.o: regcache.c): Remove.
2582 (i386-linux-ipa.o: i386-linux.c): Remove.
2583 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2584 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2585 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2586 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2587 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2588 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2589 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2590 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2591 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2592 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2593 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2594 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2595 (aarch64-ipa.o: aarch64.c): Remove.
2596 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2597 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2598 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2599 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2600 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2601 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2602 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2603 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2604 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2605 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2606 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2607 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2608 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2609 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2610 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2611 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2612 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2613 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2614 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2615 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2616 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2617 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2618 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2619 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2620 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2621 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2622 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2623 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2624 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2625 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2626 (tdesc-ipa.o: tdesc.c): Remove.
2627 (x32-linux-ipa.o: x32-linux.c): Remove.
2628 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2629 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2630
50cfacb7
SM
26312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2632
2633 * Makefile.in (%.o: ../arch/%.c): New rule.
2634 (arm.o: ../arch/arm.c): Remove.
2635 (arm-linux.o: ../arch/arm-linux.c): Remove.
2636 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2637 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2638
c5a22423
SM
26392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * Makefile.in (%.o: ../nat/%.c): New rule.
2642 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2643 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2644 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2645 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2646 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2647 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2648 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2649 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2650 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2651 (linux-personality.o: ../nat/linux-personality.c): Remove.
2652 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2653 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2654 (x86-linux.o: ../nat/x86-linux.c): Remove.
2655 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2656 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2657
6bda016b
SM
26582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2659
2660 * Makefile.in (%.o: ../common/%.c): New rule.
2661 (signals.o: ../common/signals.c): Remove.
2662 (print-utils.o: ../common/print-utils.c): Remove.
2663 (rsp-low.o: ../common/rsp-low.c): Remove.
2664 (common-utils.o: ../common/common-utils.c): Remove.
2665 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2666 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2667 (vec.o: ../common/vec.c): Remove.
2668 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2669 (xml-utils.o: ../common/xml-utils.c): Remove.
2670 (ptid.o: ../common/ptid.c): Remove.
2671 (buffer.o: ../common/buffer.c): Remove.
2672 (format.o: ../common/format.c): Remove.
2673 (filestuff.o: ../common/filestuff.c): Remove.
2674 (agent.o: ../common/agent.c): Remove.
2675 (errors.o: ../common/errors.c): Remove.
2676 (environ.o: ../common/environ.c): Remove.
2677 (common-debug.o: ../common/common-debug.c): Remove.
2678 (cleanups.o: ../common/cleanups.c): Remove.
2679 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2680 (fileio.o: ../common/fileio.c): Remove.
2681 (common-regcache.o: ../common/common-regcache.c): Remove.
2682 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2683 (new-op.o: ../common/new-op.c): Remove.
2684 (btrace-common.o: ../common/btrace-common.c): Remove.
2685
21122961
SM
26862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2687
2688 * Makefile.in (%.o: ../target/%.c): New rule.
2689 (waitstatus.o: ../target/waitstatus.c): Remove.
2690
c362e621
SM
26912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2692
2693 * Makefile.in
2694 (%.c: ../regformats/%.dat,
2695 (%.c: ../regformats/arm/%.dat,
2696 (%.c: ../regformats/i386/%.dat,
2697 (%.c: ../regformats/rs6000/%.dat): New rules.
2698 (aarch64.c): Remove.
2699 (reg-arm.c): Remove.
2700 (arm-with-iwmmxt.c): Remove.
2701 (arm-with-vfpv2.c): Remove.
2702 (arm-with-vfpv3.c): Remove.
2703 (arm-with-neon.c): Remove.
2704 (reg-bfin.c): Remove.
2705 (reg-cris.c): Remove.
2706 (reg-crisv32.c): Remove.
2707 (i386.c): Remove.
2708 (i386-linux.c): Remove.
2709 (i386-avx.c): Remove.
2710 (i386-avx-linux.c): Remove.
2711 (i386-avx-avx512.c): Remove.
2712 (i386-avx-avx512-linux.c): Remove.
2713 (i386-mpx.c): Remove.
2714 (i386-mpx-linux.c): Remove.
2715 (i386-avx-mpx-avx512-pku.c): Remove.
2716 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2717 (i386-avx-mpx.c): Remove.
2718 (i386-avx-mpx-linux.c): Remove.
2719 (i386-mmx.c): Remove.
2720 (i386-mmx-linux.c): Remove.
2721 (reg-ia64.c): Remove.
2722 (reg-m32r.c): Remove.
2723 (reg-m68k.c): Remove.
2724 (reg-cf.c): Remove.
2725 (mips-linux.c): Remove.
2726 (mips-dsp-linux.c): Remove.
2727 (mips64-linux.c): Remove.
2728 (mips64-dsp-linux.c): Remove.
2729 (nios2-linux.c): Remove.
2730 (powerpc-32.c): Remove.
2731 (powerpc-32l.c): Remove.
2732 (powerpc-altivec32l.c): Remove.
2733 (powerpc-cell32l.c): Remove.
2734 (powerpc-vsx32l.c): Remove.
2735 (powerpc-isa205-32l.c): Remove.
2736 (powerpc-isa205-altivec32l.c): Remove.
2737 (powerpc-isa205-vsx32l.c): Remove.
2738 (powerpc-e500l.c): Remove.
2739 (powerpc-64l.c): Remove.
2740 (powerpc-altivec64l.c): Remove.
2741 (powerpc-cell64l.c): Remove.
2742 (powerpc-vsx64l.c): Remove.
2743 (powerpc-isa205-64l.c): Remove.
2744 (powerpc-isa205-altivec64l.c): Remove.
2745 (powerpc-isa205-vsx64l.c): Remove.
2746 (s390-linux32.c): Remove.
2747 (s390-linux32v1.c): Remove.
2748 (s390-linux32v2.c): Remove.
2749 (s390-linux64.c): Remove.
2750 (s390-linux64v1.c): Remove.
2751 (s390-linux64v2.c): Remove.
2752 (s390-te-linux64.c): Remove.
2753 (s390-vx-linux64.c): Remove.
2754 (s390-tevx-linux64.c): Remove.
2755 (s390x-linux64.c): Remove.
2756 (s390x-linux64v1.c): Remove.
2757 (s390x-linux64v2.c): Remove.
2758 (s390x-te-linux64.c): Remove.
2759 (s390x-vx-linux64.c): Remove.
2760 (s390x-tevx-linux64.c): Remove.
2761 (tic6x-c64xp-linux.c): Remove.
2762 (tic6x-c64x-linux.c): Remove.
2763 (tic6x-c62x-linux.c): Remove.
2764 (reg-sh.c): Remove.
2765 (reg-sparc64.c): Remove.
2766 (reg-spu.c): Remove.
2767 (amd64.c): Remove.
2768 (amd64-linux.c): Remove.
2769 (amd64-avx.c): Remove.
2770 (amd64-avx-linux.c): Remove.
2771 (amd64-avx-avx512.c): Remove.
2772 (amd64-avx-avx512-linux.c): Remove.
2773 (amd64-mpx.c): Remove.
2774 (amd64-mpx-linux.c): Remove.
2775 (amd64-avx-mpx-avx512-pku.c): Remove.
2776 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2777 (amd64-avx-mpx.c): Remove.
2778 (amd64-avx-mpx-linux.c): Remove.
2779 (x32.c): Remove.
2780 (x32-linux.c): Remove.
2781 (x32-avx.c): Remove.
2782 (x32-avx-linux.c): Remove.
2783 (x32-avx-avx512.c): Remove.
2784 (x32-avx-avx512-linux.c): Remove.
2785 (reg-xtensa.c): Remove.
2786 (reg-tilegx.c): Remove.
2787 (reg-tilegx32.c): Remove.
2788
1672e0d9
SDJ
27892017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2790
2791 * Makefile.in (SFILES): Add "common/environ.c".
2792 (OBJS): Add "common/environ.h".
2793
239b6d10
WT
27942017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2795
2796 * configure.ac: Check if the fs_base and gs_base members of
2797 `struct user_regs_struct' exist.
2798 * config.in: Regenerated.
2799 * configure: Likewise.
2800
694b382c
AT
28012017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2802
2803 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2804 target_read_memory.
2805 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2806 (get_next_pcs_syscall_next_pc): Likewise.
2807
7dc53023
LM
28082016-12-23 Luis Machado <lgustavo@codesourcery.com>
2809
2810 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2811 * nto-x86-low.c: Likewise.
2812
ad02e4fe
SM
28132016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * Makefile.in: Include disable-implicit-rules.mk.
2816
dcb07cfa
PA
28172016-11-23 Pedro Alves <palves@redhat.com>
2818
2819 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2820 (debug_vprintf): Use std::chrono::steady_clock instead of
2821 gettimeofday. Use '.' instead of ':'.
2822 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2823 (get_timestamp): Use std::chrono::steady_clock instead of
2824 gettimeofday.
2825
8629c02c
SM
28262016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2827
2828 * Makefile.in: Fix whitespace formatting.
2829
b593ecca
SM
28302016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2831
2832 * Makefile.in (SFILES, OBS): Flatten list and order
2833 alphabetically.
2834
9986ba08
PA
28352016-11-23 Pedro Alves <palves@redhat.com>
2836
2837 * event-loop.c (handle_file_event): Use warning.
2838 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2839 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2840 Use warning.
2841
4eefa7bc
PA
28422016-11-23 Pedro Alves <palves@redhat.com>
2843
2844 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2845 output.
2846 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2847 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2848 debug_printf and debug_flush for debug output.
2849 * server.c (handle_general_set): Likewise.
2850 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2851 output.
2852
5443506e
SM
28532016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2854
2855 * Makefile.in (.c.o): Replace rule with ...
2856 (%.o: %.c): ... this one.
2857
3b165252
SM
28582016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2859
2860 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2861 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2862 make.
2863 * configure.ac: Remove checks for the make program.
2864 * configure: Re-generate.
2865
0bcda685
PA
28662016-10-28 Pedro Alves <palves@redhat.com>
2867
2868 * Makefile.in (CXX_DIALECT): Get from configure.
2869 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2870 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2871 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2872 * config.in: Regenerate.
2873 * configure: Regenerate.
2874
c3805894
YQ
28752016-10-27 Yao Qi <yao.qi@linaro.org>
2876
2877 * linux-low.c (linux_supports_range_stepping): Return true if
2878 can_software_single_step return true.
2879
89342618
YQ
28802016-10-27 Yao Qi <yao.qi@linaro.org>
2881
2882 * inferiors.c (find_inferior_in_random): New function.
2883 * inferiors.h (find_inferior_in_random): Declare.
2884 * linux-low.c (linux_wait_for_event_filtered): Call
2885 find_inferior_in_random instead of find_inferior.
2886
e3652c84
YQ
28872016-10-27 Yao Qi <yao.qi@linaro.org>
2888
2889 * linux-low.c (linux_wait_1): If single-step breakpoints are
2890 inserted, remove them.
2891
5a04c4cf
PA
28922016-10-26 Pedro Alves <palves@redhat.com>
2893
2894 * linux-low.c (handle_extended_wait): Link parent/child fork
2895 threads.
2896 (linux_wait_1): Unlink them.
2897 (linux_set_resume_request): Ignore resume requests for
2898 already-resumed and unhandled fork child threads.
2899 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2900 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2901 New functions.
2902 (handle_v_requests) <vCont>: Don't call require_running.
2903 * server.h (in_queued_stop_replies): New declaration.
2904
cb93dc7f
YQ
29052016-10-24 Yao Qi <yao.qi@linaro.org>
2906
2907 PR server/20733
2908 * linux-aarch64-low.c (append_insns): Cast the return value to
2909 'uint32_t *'.
2910
a1078bea
YQ
29112016-10-10 Yao Qi <yao.qi@linaro.org>
2912
2913 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2914
1fb77080
SDJ
29152016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2916
2917 * target.c (target_supports_multi_process): New function, moved
2918 from...
2919 * target.h (target_supports_multi_process): ... here. Remove
2920 macro.
2921
39b5a3b9
TT
29222016-10-05 Tom Tromey <tom@tromey.com>
2923
2924 PR remote/20655:
2925 * tracepoint.c (handle_tracepoint_bkpts): Check
2926 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2927
c1d0b70a
YQ
29282016-10-05 Yao Qi <yao.qi@linaro.org>
2929
2930 * configure.srv: Update the path of arm-*.xml files.
2931
0a69eedb
YQ
29322016-10-05 Terry Guo <terry.guo@arm.com>
2933 Yao Qi <yao.qi@linaro.org>
2934
2935 * Makefile.in: Adjust the path of rules.
2936 * configure.srv: Update the path of xml files.
2937 * regformats/arm-with-iwmmxt.dat: Regenerated.
2938 * regformats/arm-with-neon.dat: Likewise.
2939 * regformats/arm-with-vfpv2.dat: Likewise.
2940 * regformats/arm-with-vfpv3.dat Likewise.
2941
17e16485
YQ
29422016-09-30 Yao Qi <yao.qi@linaro.org>
2943
2944 PR gdbserver/20627
2945 * target.c (target_stop_and_wait): Don't call
2946 target_continue_no_signal, use resume_stop instead.
2947
edeeb602
YQ
29482016-09-26 Yao Qi <yao.qi@linaro.org>
2949
2950 * linux-low.c (linux_wait_1): Call debug_exit.
2951
503b1c39
PA
29522016-09-23 Pedro Alves <palves@redhat.com>
2953
2954 * Makefile.in (SFILES): Add common/new-op.c.
2955 (OBS): Add common/new-op.o.
2956 (new-op.o): New rule.
2957
74172ecf
SM
29582016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2959
2960 * .gitinore: Ignore more files.
2961
fc6cda2e
YQ
29622016-09-21 Yao Qi <yao.qi@linaro.org>
2963
2964 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2965 23.
2966
bc1e6c81
SDJ
29672016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2968
2969 * server.c (start_inferior): Call target_mourn_inferior instead of
2970 mourn_inferior; pass ptid_t argument to it.
2971 (resume): Likewise.
2972 (handle_target_event): Likewise.
2973 * target.c (target_mourn_inferior): New function.
2974 * target.h (mourn_inferior): Delete macro.
2975
0e00e962
AA
29762016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2977
2978 * linux-low.c (lwp_is_stepping): New function.
2979
1d8cb77d
CL
29802016-09-06 Carl Love <cel@us.ibm.com>
2981
2982 * server.c (start_inferior): Fixed comment, requested comment change
2983 didn't get updated correctly. Removed reference to ptrace () call as
2984 it is only true on Linux systems.
2985
7313bced
CL
29862016-09-06 Carl Love <cel@us.ibm.com>
2987
2988 * server.c (start_inferior): Do not call
2989 function target_post_create_inferior () if the
2990 inferior process has already exited.
2991
cf6de44d
PA
29922016-09-05 Pedro Alves <palves@redhat.com>
2993
2994 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2995 (COMPILE.pre, CC_LD): Use CXX directly.
2996 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2997 * acinclude.m4: Don't include build-with-cxx.m4.
2998 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2999 * configure: Regenerate.
3000
c1da6748
AT
30012016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3002
3003 PR gdb/19495
3004 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3005 call writing data to own_buf.
3006
f2b9e3df
SDJ
30072016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3008
3009 * target.c (mywait): Call target_wait instead of
3010 the_target->wait.
3011 (target_wait): New function.
3012
049a8570
SDJ
30132016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3014
3015 * server.c (start_inferior): New variable 'ptid'. Replace calls
3016 to the_target->resume by target_continue{,_no_signal}, depending
3017 on the case.
3018 * target.c (target_stop_and_wait): Call target_continue_no_signal
3019 instead of the_target->resume.
3020 (target_continue): New function.
3021
3aa5cfa0
AT
30222016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3023
3024 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3025
754653a7
AZ
30262016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3027
3028 PR server/20491
3029 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3030 ps_prochandle.
3031 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3032 * linux-arm-low.c (ps_get_thread_area): Likewise.
3033 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3034 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3035 * linux-mips-low.c (ps_get_thread_area): Likewise.
3036 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3037 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3038 * linux-x86-low.c (ps_get_thread_area): Likewise.
3039 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3040
ed036b40
PA
30412016-08-19 Pedro Alves <palves@redhat.com>
3042
3043 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3044
c8ef42ee
PA
30452016-08-19 Pedro Alves <palves@redhat.com>
3046
3047 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3048 comment. Use memcpy instead of casting through unsigned long.
3049
9c235a72
PA
30502016-08-19 Pedro Alves <palves@redhat.com>
3051
3052 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3053 allocating around 0x80000000.
3054
201506da
PA
30552016-08-19 Pedro Alves <palves@redhat.com>
3056
3057 PR gdb/20415
3058 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3059 (x32-avx512-linux-ipa.o): New rules.
3060 * configure.ac (x86_64-*-linux*): New x32 check.
3061 * configure.srv (ipa_x32_linux_regobj): New.
3062 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3063 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3064 descriptions.
3065 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3066 descriptions.
3067 * configure: Regenerate.
3068
f348d89a
PA
30692016-08-09 Pedro Alves <palves@redhat.com>
3070
3071 PR gdb/18653
3072 * Makefile.in (OBS): Add signals-state-save-restore.o.
3073 (signals-state-save-restore.o): New rule.
3074 * config.in: Regenerate.
3075 * configure: Regenerate.
3076 * linux-low.c: Include "signals-state-save-restore.h".
3077 (linux_create_inferior): Call
3078 restore_original_signals_state.
3079 * server.c: Include "dispositions-save-restore.h".
3080 (captured_main): Call save_original_signals_state.
3081
1baf5149
PA
30822016-08-05 Pedro Alves <palves@redhat.com>
3083
3084 * configure: Regenerate.
3085
fcd4a73d
YQ
30862016-08-04 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-low.c (regsets_fetch_inferior_registers): Check
3089 errno is ESRCH or not.
3090
979659d0
YQ
30912016-08-02 Yao Qi <yao.qi@linaro.org>
3092
3093 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3094 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3095 (thread_db_load_search): Update.
3096 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3097 td_ta_set_event and td_ta_event_getmsg.
3098
6598661d
PA
30992016-07-26 Pedro Alves <palves@redhat.com>
3100
3101 PR server/20414
3102 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3103 of unsigned long for 64-bit registers and use uint32_t instead of
3104 unsigned int for 32-bit registers.
3105
9cf12d57
PA
31062016-07-26 Pedro Alves <palves@redhat.com>
3107
3108 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3109 to 'ptrace'.
3110
305450ed
TT
31112016-07-21 Tom Tromey <tom@tromey.com>
3112
3113 * configure: Rebuild.
3114
2583da7c
YQ
31152016-07-21 Yao Qi <yao.qi@linaro.org>
3116
3117 * mem-break.c (find_gdb_breakpoint): Cast bp to
3118 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3119
21536b36
YQ
31202016-07-21 Yao Qi <yao.qi@linaro.org>
3121
3122 * server.c (handle_v_requests): Support s and S actions
3123 if target_supports_software_single_step return true.
3124
8901d193
YQ
31252016-07-21 Yao Qi <yao.qi@linaro.org>
3126
3127 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3128 is resume_step, call maybe_hw_step.
3129 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3130 and unstop them.
3131 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3132 breakpoints or not.
3133 (proceed_one_lwp): If resume request is resume_step, install
3134 reinsert breakpoints and call maybe_hw_step.
3135
0e9a339e
YQ
31362016-07-21 Yao Qi <yao.qi@linaro.org>
3137
3138 * linux-low.c (proceed_one_lwp): Declare.
3139 (linux_resume_one_thread): Remove local variable 'step'.
3140 Lift code enqueue signal. Call proceed_one_lwp instead of
3141 linux_resume_one_lwp.
3142
4281b351
YQ
31432016-07-21 Yao Qi <yao.qi@linaro.org>
3144
3145 * linux-low.c (linux_resume_one_thread): Call
3146 enqueue_pending_signal.
3147
984a2c04
YQ
31482016-07-21 Yao Qi <yao.qi@linaro.org>
3149
3150 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3151 * inferiors.c (do_restore_current_thread_cleanup): New function.
3152 (make_cleanup_restore_current_thread): Likewise.
3153 * linux-low.c (install_software_single_step_breakpoints): Call
3154 make_cleanup_restore_current_thread. Switch current_thread to
3155 thread.
3156
bec903c9
YQ
31572016-07-21 Yao Qi <yao.qi@linaro.org>
3158
3159 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3160 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3161 (clone_one_breakpoint): Likewise.
3162 (delete_reinsert_breakpoints): Change parameter to thread.
3163 Callers updated.
3164 (has_reinsert_breakpoints): Likewise.
3165 (uninsert_reinsert_breakpoints): Likewise.
3166 (reinsert_reinsert_breakpoints): Likewise.
3167 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3168 (delete_reinsert_breakpoints): Likewise.
3169 (reinsert_reinsert_breakpoints): Likewise.
3170 (uninsert_reinsert_breakpoints): Likewise.
3171 (has_reinsert_breakpoints): Likewise.
3172
63c40ec7
YQ
31732016-07-21 Yao Qi <yao.qi@linaro.org>
3174
3175 * inferiors.c (get_thread_process): Make parameter const.
3176 * inferiors.h (get_thread_process): Update declaration.
3177 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3178 Add new parameters child_thread and parent_thread. Callers
3179 updated.
3180 * mem-break.h (clone_all_breakpoints): Update declaration.
3181
9aa76cd0
YQ
31822016-07-21 Yao Qi <yao.qi@linaro.org>
3183
3184 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3185 <command_list, handler>: Remove.
3186 (struct gdb_breakpoint): New.
3187 (struct other_breakpoint): New.
3188 (struct reinsert_breakpoint): New.
3189 (is_gdb_breakpoint): New function.
3190 (any_persistent_commands): Update command_list if
3191 is_gdb_breakpoint returns true.
3192 (set_breakpoint): Create breakpoints according to their types.
3193 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3194 (set_gdb_breakpoint_1): Likewise.
3195 (set_gdb_breakpoint): Likewise.
3196 (clear_breakpoint_conditions): Change parameter type to
3197 'struct gdb_breakpoint *'.
3198 (clear_breakpoint_commands): Likewise.
3199 (clear_breakpoint_conditions_and_commands): Likewise.
3200 (add_condition_to_breakpoint): Likewise.
3201 (add_breakpoint_condition): Likewise.
3202 (add_commands_to_breakpoint): Likewise.
3203 (check_breakpoints): Check other_breakpoint.
3204 (clone_one_breakpoint): Clone breakpopint according to its type.
3205 * mem-break.h (struct gdb_breakpoint): Declare.
3206 (set_gdb_breakpoint): Update declaration.
3207 (clear_breakpoint_conditions_and_commands): Likewise.
3208 (add_breakpoint_condition): Likewise.
3209 (add_breakpoint_commands): Likewise.
3210 * server.c (process_point_options): Change parameter type to
3211 'struct gdb_breakpoint *'.
3212
811f8301
YQ
32132016-07-21 Yao Qi <yao.qi@linaro.org>
3214
3215 * mem-break.c (set_breakpoint_at): Rename it to ...
3216 (set_breakpoint_type_at): ... it.
3217 (set_breakpoint_at): Call set_breakpoint_type_at.
3218 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3219 * mem-break.h (set_breakpoint_at): Update comments.
3220
b1c51e36
CLT
32212016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3222
3223 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3224 to buf parameter.
3225 (nios2_store_gregset): Likewise.
3226
ced2dffb
PA
32272016-07-01 Pedro Alves <palves@redhat.com>
3228 Antoine Tremblay <antoine.tremblay@ericsson.com>
3229
3230 * linux-low.c: Change interface to take the target lwp_info
3231 pointer directly and return void. Handle detaching from a zombie
3232 thread.
3233 (linux_detach_lwp_callback): New function.
3234 (linux_detach): Detach from the leader thread after detaching from
3235 the clone threads.
3236
2ac09a5b
YQ
32372016-06-28 Yao Qi <yao.qi@linaro.org>
3238
3239 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3240 for variable new_offset.
3241 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3242 (aarch64_ftrace_insn_reloc_cb): Likewise.
3243 (aarch64_ftrace_insn_reloc_tb): Likewise.
3244 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3245 PRIx64 instead of PRIx32.
3246
79e7fd4f
YQ
32472016-06-28 Yao Qi <yao.qi@linaro.org>
3248
3249 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3250 (the_low_target): Install arm_get_syscall_trapinfo.
3251
061fc021
YQ
32522016-06-28 Yao Qi <yao.qi@linaro.org>
3253
3254 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3255 function.
3256 (the_low_target): Install aarch64_get_syscall_trapinfo.
3257
4cc32bec
YQ
32582016-06-28 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3261 Callers updated.
3262 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3263 Remove parameter sysno.
3264 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3265 sysret.
3266
782c1122
AA
32672016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3268
3269 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3270 (s390_emit_ne_goto): Likewise.
3271 (s390_emit_lt_goto): Likewise.
3272 (s390_emit_le_goto): Likewise.
3273 (s390_emit_gt_goto): Likewise.
3274 (s390_emit_ge_goto): Likewise.
3275 (s390x_emit_eq_goto): Likewise.
3276 (s390x_emit_ne_goto): Likewise.
3277 (s390x_emit_lt_goto): Likewise.
3278 (s390x_emit_le_goto): Likewise.
3279 (s390x_emit_gt_goto): Likewise.
3280 (s390x_emit_ge_goto): Likewise.
3281 (s390_emit_ops_impl): Mark variable static.
3282 (s390x_emit_ops): Likewise.
3283
2e7b624b
YQ
32842016-06-17 Yao Qi <yao.qi@linaro.org>
3285
3286 * linux-low.c (handle_extended_wait): Call
3287 uninsert_reinsert_breakpoints for the parent process. Remove
3288 reinsert breakpoints from the child process. Reinsert them to
3289 the parent process when vfork is done.
3290 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3291 (reinsert_reinsert_breakpoints): New function.
3292 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3293 (reinsert_reinsert_breakpoints): Declare.
3294
8a81c5d7
YQ
32952016-06-17 Yao Qi <yao.qi@linaro.org>
3296
3297 * linux-low.c (handle_extended_wait): If the parent is doing
3298 step-over, remove the reinsert breakpoints from the forked child.
3299
f50bf8e5
YQ
33002016-06-17 Yao Qi <yao.qi@linaro.org>
3301
3302 * linux-low.c (unsuspend_all_lwps): Declare.
3303 (linux_low_filter_event): If thread exited, call finish_step_over.
3304 If step-over is finished, unsuspend other threads.
3305
8376a3cb
YQ
33062016-06-17 Yao Qi <yao.qi@linaro.org>
3307
3308 * linux-low.c (linux_resume_one_lwp_throw): Assert
3309 has_reinsert_breakpoints returns false.
3310 * mem-break.c (delete_disabled_breakpoints): Assert
3311 bp type isn't reinsert_breakpoint.
3312
f79b145d
YQ
33132016-06-17 Yao Qi <yao.qi@linaro.org>
3314
3315 * linux-low.c (maybe_hw_step): New function.
3316 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3317 (finish_step_over): Switch current_thread to lwp temporarily,
3318 and assert has_reinsert_breakpoints returns true.
3319 (proceed_one_lwp): Call maybe_hw_step.
3320 * mem-break.c (has_reinsert_breakpoints): New function.
3321 * mem-break.h (has_reinsert_breakpoints): Declare.
3322
0ae534d2
JT
33232016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3324
3325 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3326
fcdad592
YQ
33272016-05-17 Yao Qi <yao.qi@linaro.org>
3328
3329 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3330 instead of find_inferior.
3331
9e784964
YQ
33322016-05-05 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3335 Initialize res to zero.
3336
cf2ebb6e
YQ
33372016-05-05 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3340 to uint32_t.
3341
c1aebf87
UW
33422016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3343
3344 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3345 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3346 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3347
35fd2deb 33482016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3349 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3350
3351 * tracepoint.c (write_inferior_int8): New function.
3352 (cmd_qtenable_disable): Write enable flag using
3353 write_inferior_int8.
3354
484b3c32
YQ
33552016-04-25 Yao Qi <yao.qi@linaro.org>
3356
3357 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3358 (need_step_over_p): Return zero if the LWP has pending signals
3359 can be delivered on software single step target.
3360
85ba7d86
YQ
33612016-04-25 Yao Qi <yao.qi@linaro.org>
3362
3363 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3364 return instead of error.
3365
3539aa13
YQ
33662016-04-22 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3369 to 23.
3370
5b061e98
YQ
33712016-04-22 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3374 signal when stepping over breakpoint with software single
3375 step.
3376
3451269c
PA
33772016-04-21 Pedro Alves <palves@redhat.com>
3378
3379 * linux-s390-low.c (s390_collect_ptrace_register)
3380 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3381 add casts.
3382 (s390_check_regset): Use void * instead of gdb_byte *.
3383
a2358508
PA
33842016-04-20 Pedro Alves <palves@redhat.com>
3385
3386 * configure: Renegerate.
3387
6885166d
YQ
33882016-04-20 Yao Qi <yao.qi@linaro.org>
3389
3390 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3391 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3392 number 16.
3393 (arm_store_gregset): Likewise.
3394
2b863f51
WT
33952016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3396
3397 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3398 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3399 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3400 (amd64-avx-mpx-linux.c): New rules.
3401 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3402 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3403 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3404 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3405 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3406 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3407 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3408 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3409 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3410 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3411 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3412 * linux-x86-low.c (x86_linux_read_description): Add case for
3413 X86_XSTATE_AVX_MPX_MASK.
3414 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3415 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3416 init_registers_i386_avx_mpx_linux.
3417 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3418 (initialize_low_tracepoint): Call
3419 init_registers_i386_avx_mpx_linux.
3420 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3421 (initialize_low_tracepoint): Call
3422 init_registers_amd64_avx_mpx_linux.
3423 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3424 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3425 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3426 declarations.
3427
9b30624b
PA
34282016-04-18 Pedro Alves <palves@redhat.com>
3429
3430 * configure: Regenerate.
3431
45e3745e
AT
34322016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3433
3434 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3435 (aarch64_emit_sub): Likewise.
3436
2afc13ff
PA
34372016-04-12 Pedro Alves <palves@redhat.com>
3438
3439 * utils.c (prepare_to_throw_exception): Delete.
3440
6e774b13
SM
34412016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3442
3443 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3444
4dca19f8
MK
34452016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3446
3447 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3448
d0a9981f
MK
34492016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3450
3451 * linux-aarch64-ipa.c: Add <elf.h> include.
3452 * linux-ppc-ipa.c: Add <elf.h> include.
3453 * linux-s390-ipa.c: Add <elf.h> include.
3454
252db07e
MK
34552016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3456
3457 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3458 (get_raw_reg_ptr): Likewise.
3459 (get_trace_state_variable_value_ptr): Likewise.
3460 (set_trace_state_variable_value_ptr): Likewise.
3461 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3462 char *.
3463
14e2b6d9
MK
34642016-03-31 Wei-cheng Wang <cole945@gmail.com>
3465 Marcin Kościelnicki <koriakin@0x04.net>
3466
3467 PR/17221
3468 * linux-ppc-low.c (emit_insns): New function.
3469 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3470 (ppc_emit_prologue): New function.
3471 (ppc_emit_epilogue): New function.
3472 (ppc_emit_add): New function.
3473 (ppc_emit_sub): New function.
3474 (ppc_emit_mul): New function.
3475 (ppc_emit_lsh): New function.
3476 (ppc_emit_rsh_signed): New function.
3477 (ppc_emit_rsh_unsigned): New function.
3478 (ppc_emit_ext): New function.
3479 (ppc_emit_zero_ext): New function.
3480 (ppc_emit_log_not): New function.
3481 (ppc_emit_bit_and): New function.
3482 (ppc_emit_bit_or): New function.
3483 (ppc_emit_bit_xor): New function.
3484 (ppc_emit_bit_not): New function.
3485 (ppc_emit_equal): New function.
3486 (ppc_emit_less_signed): New function.
3487 (ppc_emit_less_unsigned): New function.
3488 (ppc_emit_ref): New function.
3489 (ppc_emit_const): New function.
3490 (ppc_emit_reg): New function.
3491 (ppc_emit_pop): New function.
3492 (ppc_emit_stack_flush): New function.
3493 (ppc_emit_swap): New function.
3494 (ppc_emit_stack_adjust): New function.
3495 (ppc_emit_call): New function.
3496 (ppc_emit_int_call_1): New function.
3497 (ppc_emit_void_call_2): New function.
3498 (ppc_emit_if_goto): New function.
3499 (ppc_emit_goto): New function.
3500 (ppc_emit_eq_goto): New function.
3501 (ppc_emit_ne_goto): New function.
3502 (ppc_emit_lt_goto): New function.
3503 (ppc_emit_le_goto): New function.
3504 (ppc_emit_gt_goto): New function.
3505 (ppc_emit_ge_goto): New function.
3506 (ppc_write_goto_address): New function.
3507 (ppc_emit_ops_impl): New static variable.
3508 (ppc64v1_emit_prologue): New function.
3509 (ppc64v2_emit_prologue): New function.
3510 (ppc64_emit_epilogue): New function.
3511 (ppc64_emit_add): New function.
3512 (ppc64_emit_sub): New function.
3513 (ppc64_emit_mul): New function.
3514 (ppc64_emit_lsh): New function.
3515 (ppc64_emit_rsh_signed): New function.
3516 (ppc64_emit_rsh_unsigned): New function.
3517 (ppc64_emit_ext): New function.
3518 (ppc64_emit_zero_ext): New function.
3519 (ppc64_emit_log_not): New function.
3520 (ppc64_emit_bit_and): New function.
3521 (ppc64_emit_bit_or): New function.
3522 (ppc64_emit_bit_xor): New function.
3523 (ppc64_emit_bit_not): New function.
3524 (ppc64_emit_equal): New function.
3525 (ppc64_emit_less_signed): New function.
3526 (ppc64_emit_less_unsigned): New function.
3527 (ppc64_emit_ref): New function.
3528 (ppc64_emit_const): New function.
3529 (ppc64v1_emit_reg): New function.
3530 (ppc64v2_emit_reg): New function.
3531 (ppc64_emit_pop): New function.
3532 (ppc64_emit_stack_flush): New function.
3533 (ppc64_emit_swap): New function.
3534 (ppc64v1_emit_call): New function.
3535 (ppc64v2_emit_call): New function.
3536 (ppc64v1_emit_int_call_1): New function.
3537 (ppc64v2_emit_int_call_1): New function.
3538 (ppc64v1_emit_void_call_2): New function.
3539 (ppc64v2_emit_void_call_2): New function.
3540 (ppc64_emit_if_goto): New function.
3541 (ppc64_emit_eq_goto): New function.
3542 (ppc64_emit_ne_goto): New function.
3543 (ppc64_emit_lt_goto): New function.
3544 (ppc64_emit_le_goto): New function.
3545 (ppc64_emit_gt_goto): New function.
3546 (ppc64_emit_ge_goto): New function.
3547 (ppc64v1_emit_ops_impl): New static variable.
3548 (ppc64v2_emit_ops_impl): New static variable.
3549 (ppc_emit_ops): New function.
3550 (linux_low_target): Wire in ppc_emit_ops.
3551
a2174ba4
MK
35522016-03-31 Wei-cheng Wang <cole945@gmail.com>
3553 Marcin Kościelnicki <koriakin@0x04.net>
3554
3555 PR/17221
3556 * Makefile.in: Add powerpc-*-ipa.o
3557 * configure.srv: Add ipa_obj for powerpc*-linux.
3558 * linux-ppc-ipa.c: New file.
3559 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3560 includes.
3561 (PPC_FIELD): New macro.
3562 (PPC_SEXT): New macro.
3563 (PPC_OP6): New macro.
3564 (PPC_BO): New macro.
3565 (PPC_LI): New macro.
3566 (PPC_BD): New macro.
3567 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3568 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3569 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3570 (ppc_get_thread_area): New function.
3571 (is_elfv2_inferior): New function.
3572 (gen_ds_form): New function.
3573 (GEN_STD): New macro.
3574 (GEN_STDU): New macro.
3575 (GEN_LD): New macro.
3576 (GEN_LDU): New macro.
3577 (gen_d_form): New function.
3578 (GEN_ADDI): New macro.
3579 (GEN_ADDIS): New macro.
3580 (GEN_LI): New macro.
3581 (GEN_LIS): New macro.
3582 (GEN_ORI): New macro.
3583 (GEN_ORIS): New macro.
3584 (GEN_LWZ): New macro.
3585 (GEN_STW): New macro.
3586 (GEN_STWU): New macro.
3587 (gen_xfx_form): New function.
3588 (GEN_MFSPR): New macro.
3589 (GEN_MTSPR): New macro.
3590 (GEN_MFCR): New macro.
3591 (GEN_MTCR): New macro.
3592 (GEN_SYNC): New macro.
3593 (GEN_LWSYNC): New macro.
3594 (gen_x_form): New function.
3595 (GEN_OR): New macro.
3596 (GEN_MR): New macro.
3597 (GEN_LWARX): New macro.
3598 (GEN_STWCX): New macro.
3599 (GEN_CMPW): New macro.
3600 (gen_md_form): New function.
3601 (GEN_RLDICL): New macro.
3602 (GEN_RLDICR): New macro.
3603 (gen_i_form): New function.
3604 (GEN_B): New macro.
3605 (GEN_BL): New macro.
3606 (gen_b_form): New function.
3607 (GEN_BNE): New macro.
3608 (GEN_LOAD): New macro.
3609 (GEN_STORE): New macro.
3610 (gen_limm): New function.
3611 (gen_atomic_xchg): New function.
3612 (gen_call): New function.
3613 (ppc_relocate_instruction): New function.
3614 (ppc_install_fast_tracepoint_jump_pad): New function.
3615 (ppc_get_min_fast_tracepoint_insn_len): New function.
3616 (ppc_get_ipa_tdesc_idx): New function.
3617 (the_low_target): Wire in the new functions.
3618 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3619 tdescs.
3620 * linux-ppc-tdesc.h: New file.
3621
a13c4696
MK
36222016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3623
3624 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3625 (alloc_jump_pad_buffer): New function.
3626 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3627 (alloc_jump_pad_buffer): New function.
3628 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3629 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3630 (alloc_jump_pad_buffer): New function.
3631 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3632 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3633 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3634 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3635
1cda1512
MK
36362016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3637
3638 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3639 * linux-amd64-ipa.c: Likewise.
3640 * linux-i386-ipa.c: Likewise.
3641 * linux-s390-ipa.c: Likewise.
3642 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3643 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3644 set_trace_state_variable_value_ptr.
3645 (struct ipa_sym_addresses): Likewise.
3646 (symbol_list): Likewise.
3647 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3648 accessing gdb_collect directly.
3649 (gdb_collect_ptr_type): New typedef.
3650 (get_raw_reg_ptr_type): New typedef.
3651 (get_trace_state_variable_value_ptr_type): New typedef.
3652 (set_trace_state_variable_value_ptr_type): New typedef.
3653 (gdb_collect_ptr): New global.
3654 (get_raw_reg_ptr): New global.
3655 (get_trace_state_variable_value_ptr): New global.
3656 (set_trace_state_variable_value_ptr): New global.
3657 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3658 accessing get_raw_reg directly.
3659 (get_get_tsv_func_addr): Likewise for
3660 get_trace_state_variable_value_ptr.
3661 (get_set_tsv_func_addr): Likewise for
3662 set_trace_state_variable_value_ptr.
3663 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3664
72fb5488
SM
36652016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3666
3667 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3668
28170b88
MK
36692016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3670
3671 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3672 packets.
3673 (relocate_instruction): Remove own_buf.
3674 * server.c (own_buf): Make global.
3675 (handle_v_requests): Make global.
3676 * server.h (own_buf): New declaration.
3677 (handle_v_requests): New prototype.
3678
f39e8743
MK
36792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3680
3681 PR 18377
3682 * linux-s390-low.c (add_insns): New function.
3683 (s390_emit_prologue): New function.
3684 (s390_emit_epilogue): New function.
3685 (s390_emit_add): New function.
3686 (s390_emit_sub): New function.
3687 (s390_emit_mul): New function.
3688 (s390_emit_lsh): New function.
3689 (s390_emit_rsh_signed): New function.
3690 (s390_emit_rsh_unsigned): New function.
3691 (s390_emit_ext): New function.
3692 (s390_emit_log_not): New function.
3693 (s390_emit_bit_and): New function.
3694 (s390_emit_bit_or): New function.
3695 (s390_emit_bit_xor): New function.
3696 (s390_emit_bit_not): New function.
3697 (s390_emit_equal): New function.
3698 (s390_emit_less_signed): New function.
3699 (s390_emit_less_unsigned): New function.
3700 (s390_emit_ref): New function.
3701 (s390_emit_if_goto): New function.
3702 (s390_emit_goto): New function.
3703 (s390_write_goto_address): New function.
3704 (s390_emit_litpool): New function.
3705 (s390_emit_const): New function.
3706 (s390_emit_call): New function.
3707 (s390_emit_reg): New function.
3708 (s390_emit_pop): New function.
3709 (s390_emit_stack_flush): New function.
3710 (s390_emit_zero_ext): New function.
3711 (s390_emit_swap): New function.
3712 (s390_emit_stack_adjust): New function.
3713 (s390_emit_set_r2): New function.
3714 (s390_emit_int_call_1): New function.
3715 (s390_emit_void_call_2): New function.
3716 (s390_emit_eq_goto): New function.
3717 (s390_emit_ne_goto): New function.
3718 (s390_emit_lt_goto): New function.
3719 (s390_emit_le_goto): New function.
3720 (s390_emit_gt_goto): New function.
3721 (s390_emit_ge_goto): New function.
3722 (s390x_emit_prologue): New function.
3723 (s390x_emit_epilogue): New function.
3724 (s390x_emit_add): New function.
3725 (s390x_emit_sub): New function.
3726 (s390x_emit_mul): New function.
3727 (s390x_emit_lsh): New function.
3728 (s390x_emit_rsh_signed): New function.
3729 (s390x_emit_rsh_unsigned): New function.
3730 (s390x_emit_ext): New function.
3731 (s390x_emit_log_not): New function.
3732 (s390x_emit_bit_and): New function.
3733 (s390x_emit_bit_or): New function.
3734 (s390x_emit_bit_xor): New function.
3735 (s390x_emit_bit_not): New function.
3736 (s390x_emit_equal): New function.
3737 (s390x_emit_less_signed): New function.
3738 (s390x_emit_less_unsigned): New function.
3739 (s390x_emit_ref): New function.
3740 (s390x_emit_if_goto): New function.
3741 (s390x_emit_const): New function.
3742 (s390x_emit_call): New function.
3743 (s390x_emit_reg): New function.
3744 (s390x_emit_pop): New function.
3745 (s390x_emit_stack_flush): New function.
3746 (s390x_emit_zero_ext): New function.
3747 (s390x_emit_swap): New function.
3748 (s390x_emit_stack_adjust): New function.
3749 (s390x_emit_int_call_1): New function.
3750 (s390x_emit_void_call_2): New function.
3751 (s390x_emit_eq_goto): New function.
3752 (s390x_emit_ne_goto): New function.
3753 (s390x_emit_lt_goto): New function.
3754 (s390x_emit_le_goto): New function.
3755 (s390x_emit_gt_goto): New function.
3756 (s390x_emit_ge_goto): New function.
3757 (s390_emit_ops): New function.
3758 (struct linux_target_ops): Fill in emit_ops hook.
3759
abd9baf9
MK
37602016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3761
3762 PR 18377
3763 * Makefile.in: Add s390 IPA files.
3764 * configure.srv: Build IPA for s390.
3765 * linux-s390-ipa.c: New file.
3766 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3767 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3768 (tdesc_s390_linux32): Likewise.
3769 (init_registers_s390_linux32v1): Likewise.
3770 (tdesc_s390_linux32v1): Likewise.
3771 (init_registers_s390_linux32v2): Likewise.
3772 (tdesc_s390_linux32v2): Likewise.
3773 (init_registers_s390_linux64): Likewise.
3774 (tdesc_s390_linux64): Likewise.
3775 (init_registers_s390_linux64v1): Likewise.
3776 (tdesc_s390_linux64v1): Likewise.
3777 (init_registers_s390_linux64v2): Likewise.
3778 (tdesc_s390_linux64v2): Likewise.
3779 (init_registers_s390_te_linux64): Likewise.
3780 (tdesc_s390_te_linux64): Likewise.
3781 (init_registers_s390_vx_linux64): Likewise.
3782 (tdesc_s390_vx_linux64): Likewise.
3783 (init_registers_s390_tevx_linux64): Likewise.
3784 (tdesc_s390_tevx_linux64): Likewise.
3785 (init_registers_s390x_linux64): Likewise.
3786 (tdesc_s390x_linux64): Likewise.
3787 (init_registers_s390x_linux64v1): Likewise.
3788 (tdesc_s390x_linux64v1): Likewise.
3789 (init_registers_s390x_linux64v2): Likewise.
3790 (tdesc_s390x_linux64v2): Likewise.
3791 (init_registers_s390x_te_linux64): Likewise.
3792 (tdesc_s390x_te_linux64): Likewise.
3793 (init_registers_s390x_vx_linux64): Likewise.
3794 (tdesc_s390x_vx_linux64): Likewise.
3795 (init_registers_s390x_tevx_linux64): Likewise.
3796 (tdesc_s390x_tevx_linux64): Likewise.
3797 (have_hwcap_s390_vx): New static variable.
3798 (s390_arch_setup): Fill have_hwcap_s390_vx.
3799 (s390_get_thread_area): New function.
3800 (s390_ft_entry_gpr_esa): New const.
3801 (s390_ft_entry_gpr_zarch): New const.
3802 (s390_ft_entry_misc): New const.
3803 (s390_ft_entry_fr): New const.
3804 (s390_ft_entry_vr): New const.
3805 (s390_ft_main_31): New const.
3806 (s390_ft_main_64): New const.
3807 (s390_ft_exit_fr): New const.
3808 (s390_ft_exit_vr): New const.
3809 (s390_ft_exit_misc): New const.
3810 (s390_ft_exit_gpr_esa): New const.
3811 (s390_ft_exit_gpr_zarch): New const.
3812 (append_insns): New function.
3813 (s390_relocate_instruction): New function.
3814 (s390_install_fast_tracepoint_jump_pad): New function.
3815 (s390_get_min_fast_tracepoint_insn_len): New function.
3816 (s390_get_ipa_tdesc_idx): New function.
3817 (struct linux_target_ops): Wire in the above functions.
3818 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3819 * linux-s390-tdesc.h: New file.
3820
a4105d04
MK
38212016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3822
3823 * linux-s390-low.c (s390_supports_tracepoints): New function.
3824 (struct linux_target_ops): Fill supports_tracepoints hook.
3825
35ac8b3e
YQ
38262016-03-18 Yao Qi <yao.qi@linaro.org>
3827
3828 * linux-low.c (lwp_signal_can_be_delivered): New function.
3829 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3830
94610ec4
YQ
38312016-03-18 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3834 0 if signal is enqueued. Remove 'signal' from one debugging
3835 message. Move one debugging message to some lines below.
3836 Remove code setting 'signal' to 0.
3837
80aea927
YQ
38382016-03-18 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-low.c (linux_low_filter_event): Remove redundant
3841 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3842
b04fd3be
MK
38432016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3844
3845 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3846 (struct linux_target_ops): Wire in the above.
3847
c40c8d4b
YQ
38482016-03-03 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-low.c: Update comments to start_step_over.
3851
0f8288ae
YQ
38522016-03-03 Yao Qi <yao.qi@linaro.org>
3853
3854 PR server/19736
3855 * linux-low.c (handle_extended_wait): Set child suspended
3856 if event_lwp->bp_reinsert isn't zero.
3857
fdbd04a8
YQ
38582016-03-02 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3861 enqueue_pending_signal.
3862
6896a8fa
MK
38632016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3864
3865 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3866 is actually loaded.
3867
ab503087
MK
38682016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3869
3870 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3871 (s390_regmap_3264) [!__s390x__]: New global.
3872 (s390_collect_ptrace_register): Skip map entries containing -1.
3873 (s390_supply_ptrace_register): Ditto.
3874 (s390_fill_gprs_high): New function.
3875 (s390_store_gprs_high): New function.
3876 (s390_regsets): Add NT_S390_HIGH_GPRS.
3877 (s390_get_hwcap): Enable on 31-bit.
3878 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3879 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3880 Detect NT_S390_HIGH_GPRS.
3881 (s390_usrregs_info_3264): Enable on 31-bit.
3882 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3883 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3884
ae91f625
MK
38852016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3886
3887 PR gdb/13808
3888 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3889 * configure.srv: Ditto.
3890 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3891 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3892 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3893 (init_registers_amd64_linux): Remove prototype.
3894 (tdesc_amd64_linux): Remove declaration.
3895 (get_ipa_tdesc): New function.
3896 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3897 initialize remaining tdescs.
3898 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3899 (init_registers_i386_linux): Remove prototype.
3900 (tdesc_i386_linux): Remove declaration.
3901 (get_ipa_tdesc): New function.
3902 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3903 initialize remaining tdescs.
3904 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3905 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3906 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3907 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3908 (x86_get_ipa_tdesc_idx): New function.
3909 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3910 * linux-x86-tdesc.h: New file.
3911 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3912 (target_get_ipa_tdesc_idx): New macro.
3913 * tracepoint.c (ipa_tdesc_idx): New macro.
3914 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3915 (symbol_list): Add ipa_tdesc_idx.
3916 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3917 (ipa_tdesc): Remove.
3918 (ipa_tdesc_idx): New variable.
3919 (get_context_regcache): Use get_ipa_tdesc.
3920 (gdb_collect): Ditto.
3921 (gdb_probe): Ditto.
3922 * tracepoint.h (get_ipa_tdesc): New prototype.
3923 (ipa_tdesc): Remove.
3924
e7ad2f14
PA
39252016-02-24 Pedro Alves <palves@redhat.com>
3926
3927 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3928 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3929 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3930 Factor out common code between the USE_SIGTRAP_SIGINFO and
3931 !USE_SIGTRAP_SIGINFO blocks.
3932 (linux_low_filter_event): Call save_stop_reason instead of
3933 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3934 Update comments.
3935 (linux_wait_1): Update comments.
3936
657f9cde
WW
39372016-02-24 Wei-cheng Wang <cole945@gmail.com>
3938
3939 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3940 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3941 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3942 ppc_insert_point, ppc_remove_point.
3943
b00b61e1
MK
39442016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3945
3946 * linux-s390-low.c (s390_supports_z_point_type): New function.
3947 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3948
553cb527
YQ
39492016-02-16 Yao Qi <yao.qi@linaro.org>
3950
3951 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3952 PC. Get pc from regcache_read_pc.
3953
a5652c21
YQ
39542016-02-12 Yao Qi <yao.qi@linaro.org>
3955
3956 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3957 or linux_get_pc_32bit.
3958 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3959
ed443b61
YQ
39602016-02-12 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3963 arm_linux_get_next_pcs_fixup.
3964
020ecd38
MK
39652016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3966
3967 * tracepoint.c (x_tracepoint_action_download): Change
3968 write_inferior_data_ptr to write_inferior_data_pointer.
3969 (cmd_qtstart): Likewise.
3970 (write_inferior_data_ptr): Remove.
3971 (download_agent_expr): Change write_inferior_data_ptr to
3972 write_inferior_data_pointer.
3973 (download_tracepoint_1): Likewise.
3974 (download_tracepoint): Likewise.
3975 (download_trace_state_variables): Likewise.
3976
7cae9051
WW
39772016-02-11 Wei-cheng Wang <cole945@gmail.com>
3978 Marcin Kościelnicki <koriakin@0x04.net>
3979
3980 * tracepoint.c (struct tracepoint_action_ops): Remove.
3981 (struct tracepoint_action): Remove ops.
3982 (m_tracepoint_action_download, r_tracepoint_action_download)
3983 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3984 size and offset accordingly.
3985 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3986 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3987 (tracepoint_action_send, tracepoint_action_download): New functions.
3988 Helpers for trace action handlers.
3989 (add_tracepoint_action): Remove setup actions ops.
3990 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3991
9f6a71b4
YQ
39922016-02-10 Yao Qi <yao.qi@linaro.org>
3993
3994 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3995
1e94266c
SM
39962016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3997
3998 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3999 to AC_OUTPUT.
4000 * configure: Regenerate.
4001
8adce034
SM
40022016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4003
4004 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4005 void * to gdb_byte *.
4006 * linux-low.c (siginfo_fixup): Likewise.
4007 (linux_xfer_siginfo): Likewise.
4008 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4009 Likewise.
4010 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4011
93813b37
WT
40122016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4013
4014 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4015 to srv_tgtobj.
4016 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4017 to srv_tgtobj.
4018 * linux-x86-low.c [__x86_64__]: Include
4019 "nat/amd64-linux-siginfo.h".
4020 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4021 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4022 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4023 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4024 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4025 (cpt_si_fd, si_timerid, si_overrun): Move from
4026 nat/amd64-linux-siginfo.c.
4027 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4028
8424cc97
SM
40292016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4030
4031 * server.c (skip_to_semicolon): Remove.
4032 (process_point_options): Use strchrnul instead of
4033 skip_to_semicolon.
4034
4d18591b
YQ
40352016-01-26 Yao Qi <yao.qi@linaro.org>
4036
4037 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4038 * linux-low.c (install_software_single_step_breakpoints): Don't
4039 call regcache_read_pc.
4040 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4041 argument pc.
4042
d8020970
YQ
40432016-01-26 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-low.c (install_software_single_step_breakpoints): Call
4046 regcache_read_pc instead of get_pc.
4047
8b207339
YQ
40482016-01-26 Yao Qi <yao.qi@linaro.org>
4049
4050 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4051 (unblock_async_io): Rename to ...
4052 (block_unblock_async_io): ... it. New function.
4053 (enable_async_io): Don't install SIGIO handler. Unblock it
4054 instead.
4055 (disable_async_io): Don't ignore SIGIO. Block it instead.
4056 (initialize_async_io): Install SIGIO handler. Don't call
4057 unblock_async_io.
4058
18879fef
YQ
40592016-01-26 Yao Qi <yao.qi@linaro.org>
4060
4061 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4062 first character is '\003', call *the_target->request_interrupt.
4063
a0f8e08a
YQ
40642016-01-25 Yao Qi <yao.qi@linaro.org>
4065
4066 * remote-utils.c (new_thread_notify): Remove.
4067 (dead_thread_notify): Likewise.
4068 * remote-utils.h (new_thread_notify): Remove declaration.
4069 (dead_thread_notify): Likewise.
4070
cc5fd9ab
MK
40712016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4072
4073 * gdb.trace/pending.exp: Fix expected message on continue.
4074
99e8eb11
MK
40752016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4076
4077 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4078 it works properly on big-endian machines where sizeof (CORE_ADDR)
4079 != sizeof (void *).
4080
a994041d
PA
40812016-01-21 Pedro Alves <palves@redhat.com>
4082
4083 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4084 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4085 * configure: Regenerate.
4086
f7a6a40d
YQ
40872016-01-21 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4090 is_thumb and set it according to CPSR saved on the stack.
4091 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4092 arm_sigreturn_next_pc.
4093
6f69e520
YQ
40942016-01-18 Yao Qi <yao.qi@linaro.org>
4095
4096 * linux-low.c (linux_set_pc_64bit): New function.
4097 (linux_get_pc_64bit): New function.
4098 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4099 Declare.
4100 * linux-sparc-low.c (debug_threads): Remove declaration.
4101 (sparc_get_pc): Remove.
4102 (the_low_target): Use linux_get_pc_64bit instead of
4103 sparc_get_pc.
4104 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4105 (the_low_target): Use linux_get_pc_64bit and
4106 linux_set_pc_64bit.
4107
276d4552
YQ
41082016-01-18 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-arm-low.c (debug_threads): Remove declaration.
4111 (arm_get_pc, arm_set_pc): Remove.
4112 (the_low_target): Use linux_get_pc_32bit and
4113 linux_set_pc_32bit.
4114 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4115 (the_low_target): Use linux_get_pc_32bit and
4116 linux_set_pc_32bit.
4117 * linux-cris-low.c (debug_threads): Remove declaration.
4118 (cris_get_pc, cris_set_pc,): Remove.
4119 (the_low_target): Use linux_get_pc_32bit and
4120 linux_set_pc_32bit.
4121 * linux-crisv32-low.c (debug_threads): Remove declaration.
4122 (cris_get_pc, cris_set_pc): Remove.
4123 (the_low_target): Use linux_get_pc_32bit and
4124 linux_set_pc_32bit.
4125 * linux-low.c: Include inttypes.h.
4126 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4127 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4128 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4129 (the_low_target): Use linux_get_pc_32bit and
4130 linux_set_pc_32bit.
4131 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4132 (the_low_target): Use linux_get_pc_32bit and
4133 linux_set_pc_32bit.
4134 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4135 (the_low_target): Use linux_get_pc_32bit and
4136 linux_set_pc_32bit.
4137 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4138 (the_low_target): Use linux_get_pc_32bit and
4139 linux_set_pc_32bit.
4140 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4141 (the_low_target): Use linux_get_pc_32bit and
4142 linux_set_pc_32bit.
4143
eb0edac8
GB
41442016-01-18 Gary Benson <gbenson@redhat.com>
4145
4146 * configure.ac (AC_FUNC_FORK): New check.
4147 * config.in: Regenerate.
4148 * configure: Likewise.
4149
1b451dda
YQ
41502016-01-14 Yao Qi <yao.qi@linaro.org>
4151
4152 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4153 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4154 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4155 arm_get_next_pcs_ctor.
4156
82075af2
JS
41572016-01-12 Josh Stone <jistone@redhat.com>
4158 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4159
4160 * inferiors.h: Include "gdb_vecs.h".
4161 (struct process_info): Add syscalls_to_catch.
4162 * inferiors.c (remove_process): Free syscalls_to_catch.
4163 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4164 syscall_return stops.
4165 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4166 * server.c (handle_general_set): Handle QCatchSyscalls.
4167 (handle_query): Report support for QCatchSyscalls.
4168 * target.h (struct target_ops): Add supports_catch_syscall.
4169 (target_supports_catch_syscall): New macro.
4170 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4171 (struct lwp_info): Add syscall_state.
4172 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4173 Maintain syscall_state and syscalls_to_catch across exec.
4174 (get_syscall_trapinfo): New function, proxy to the_low_target.
4175 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4176 (linux_low_filter_event): Toggle syscall_state entry/return for
4177 syscall traps, and set it ignored for all others.
4178 (gdb_catching_syscalls_p): New function.
4179 (gdb_catch_this_syscall_p): New function.
4180 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4181 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4182 (linux_supports_catch_syscall): New function.
4183 (linux_target_ops): Install it.
4184 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4185 (the_low_target): Install it.
4186
8f13a3ce
MF
41872016-01-12 Mike Frysinger <vapier@gentoo.org>
4188
4189 * acinclude.m4: Include new ../warning.m4 file.
4190 * configure: Regenerated.
4191 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4192
5b3da067
MF
41932016-01-12 Mike Frysinger <vapier@gentoo.org>
4194
4195 * ax.c (is_goto_target): Mark static.
4196 * linux-low.c (register_addr): Likewise.
4197 (linux_fetch_registers, linux_store_registers): Likewise.
4198 * mem-break.c (any_persistent_commands): Fix old prototype.
4199 (add_commands_to_breakpoint): Mark static.
4200 * regcache.c (find_register_by_name): Delete unused func.
4201 * remote-utils.c (hex_or_minus_one): Mark static.
4202 * server.c (monitor_show_help): Mark static.
4203 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4204 handle_v_requests): Likewise.
4205
bc504a31
PA
42062016-01-12 Pedro Alves <palves@redhat.com>
4207
4208 Remove use of the registered trademark symbol throughout.
4209
5a0dd67a
YQ
42102016-01-08 Yao Qi <yao.qi@linaro.org>
4211
4212 * remote-utils.c (getpkt): If c is '\003', call target hook
4213 request_interrupt.
4214
b2ca446f
YQ
42152016-01-06 Yao Qi <yao.qi@linaro.org>
4216
4217 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4218 linux-aarch32-low.c.
4219 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4220 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4221 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4222 (thumb2_breakpoint): Declare.
4223 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4224 linux-aarch32-low.h.
4225 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4226 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4227 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4228
edd88788
JB
42292016-01-01 Joel Brobecker <brobecker@adacore.com>
4230
4231 * gdbreplay.c (gdbreplay_version): Change copyright year in
4232 version message.
4233 * server.c (gdbserver_version): Likewise.
4234
65da7f14
PP
42352015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4236
4237 * server.c (crc32_table): Delete.
4238 (crc32): Use libiberty's xcrc32 function.
4239
4abd5ed2
JB
42402015-12-22 Joel Brobecker <brobecker@adacore.com>
4241
4242 * lynx-low.c (lynx_delete_thread_callback): New function.
4243 (lynx_mourn): Properly delete our process and all of its
4244 threads. Remove call to clear_inferiors.
4245
0e50fe5c
JB
42462015-12-22 Joel Brobecker <brobecker@adacore.com>
4247
4248 * target.c (thread_search_callback): Add check that
4249 the thread_stopped target callback is not NULL before
4250 calling it.
4251
35adc03f
YQ
42522015-12-21 Yao Qi <yao.qi@linaro.org>
4253
4254 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4255 arm breakpoint.
4256
bd2b2909
AT
42572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4258
4259 * server.c (handle_query): Call target_supports_software_single_step.
4260
7fe5e27e
AT
42612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4262
4263 * linux-low.c (single_step): New function.
4264 (linux_resume_one_lwp_throw): Call single_step.
4265 (start_step_over): Likewise.
4266
d9311bfa
AT
42672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4268
4269 * Makefile.in (SFILES): Append arch/arm-linux.c,
4270 arch/arm-get-next-pcs.c.
4271 (arm-linux.o): New rule.
4272 (arm-get-next-pcs.o): New rule.
4273 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4274 arm-linux.o.
4275 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4276 to linux-aarch32-low.c.
4277 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4278 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4279 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4280 (thumb2_breakpoint_len): Likewise.
4281 (arm_is_thumb_mode): Make non-static.
4282 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4283 from linux-aarch32-low.c.
4284 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4285 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4286 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4287 (thumb2_breakpoint_len): Likewise.
4288 (arm_is_thumb_mode): New declaration.
4289 * linux-arm-low.c: Include arch/arm-linux.h
4290 aarch/arm-get-next-pcs.h, sys/syscall.h.
4291 (get_next_pcs_ops): New struct.
4292 (get_next_pcs_addr_bits_remove): New function.
4293 (get_next_pcs_is_thumb): New function.
4294 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4295 (arm_sigreturn_next_pc): Likewise.
4296 (get_next_pcs_syscall_next_pc): Likewise.
4297 (arm_gdbserver_get_next_pcs): Likewise.
4298 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4299 Initialize.
4300 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4301 * server.h: Include gdb_vecs.h.
4302
68ce2059
AT
43032015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4304
4305 * Makefile.in (SFILES): Append common/common-regcache.c.
4306 (OBS): Append common-regcache.o.
4307 (common-regcache.o): New rule.
4308 * regcache.c (init_register_cache): Initialize cache to
4309 REG_UNAVAILABLE.
4310 (regcache_raw_read_unsigned): New function.
4311 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4312 register_status enum.
4313
fa5308bd
AT
43142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4315
4316 * linux-aarch64-low.c (the_low_targets): Rename
4317 breakpoint_reinsert_addr to get_next_pcs.
4318 * linux-arm-low.c (the_low_targets): Likewise.
4319 * linux-bfin-low.c (the_low_targets): Likewise.
4320 * linux-cris-low.c (the_low_targets): Likewise.
4321 * linux-crisv32-low.c (the_low_targets): Likewise.
4322 * linux-low.c (can_software_single_step): Likewise.
4323 (install_software_single_step_breakpoints): New function.
4324 (start_step_over): Use install_software_single_step_breakpoints.
4325 * linux-low.h: New CORE_ADDR vector.
4326 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4327 get_next_pcs.
4328 * linux-mips-low.c (the_low_targets): Likewise.
4329 * linux-nios2-low.c (the_low_targets): Likewise.
4330 * linux-sparc-low.c (the_low_targets): Likewise.
4331
4a6ed09b
PA
43322015-12-17 Pedro Alves <palves@redhat.com>
4333
4334 * linux-low.c (linux_kill_one_lwp): Remove references to
4335 LinuxThreads.
4336 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4337 to 'kill'.
4338 (linux_init_signals): Delete.
4339 (initialize_low): Adjust.
4340 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4341
7544db95
PA
43422015-12-16 Pedro Alves <palves@redhat.com>
4343
4344 * configure.ac (compiler warning flags): When testing a
4345 -Wno-foo option, check whether -Wfoo works instead.
4346 * configure: Regenerate.
4347
8020350c
DB
43482015-12-11 Don Breazeal <donb@codesourcery.com>
4349
4350 * server.c (process_serial_event): Don't exit from gdbserver
4351 in remote mode if there are still active inferiors.
4352
db91f502
YQ
43532015-12-11 Yao Qi <yao.qi@linaro.org>
4354
4355 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4356 arm_breakpoint_at if the process is 32-bit.
4357
b37a6290
YQ
43582015-12-11 Yao Qi <yao.qi@linaro.org>
4359
4360 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4361 arm breakpoint.
4362
17b1509a
YQ
43632015-12-07 Yao Qi <yao.qi@linaro.org>
4364
4365 * configure.srv: Append arm.o to srv_tgtobj for
4366 aarch64*-*-linux* target.
4367 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4368 from linux-arm-low.c.
4369 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4370 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4371 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4372 (thumb2_breakpoint_len): Likewise.
4373 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4374 (arm_breakpoint_kinds): Likewise.
4375 (arm_breakpoint_kind_from_pc): Likewise.
4376 (arm_sw_breakpoint_from_kind): Likewise.
4377 (arm_breakpoint_kind_from_current_state): Likewise.
4378 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4379 (arm_sw_breakpoint_from_kind): Declare.
4380 (arm_breakpoint_kind_from_current_state): Declare.
4381 (arm_breakpoint_at): Declare.
4382 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4383 arm_sw_breakpoint_from_kind if process is 32-bit.
4384 (aarch64_breakpoint_kind_from_pc): New function.
4385 (aarch64_breakpoint_kind_from_current_state): New function.
4386 (the_low_target): Initialize fields breakpoint_kind_from_pc
4387 and breakpoint_kind_from_current_state.
4388 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4389 linux-aarch32-low.c.
4390 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4391 (arm_breakpoint, arm_breakpoint_len): Likewise.
4392 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4393 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4394 (arm_is_thumb_mode): Likewise.
4395 (arm_breakpoint_at): Likewise.
4396 (arm_breakpoint_kind_from_pc): Likewise.
4397 (arm_sw_breakpoint_from_kind): Likewise.
4398 (arm_breakpoint_kind_from_current_state): Likewise.
4399
4400 Revert:
4401 2015-08-04 Yao Qi <yao.qi@linaro.org>
4402
4403 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4404 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4405 * server.c (extended_protocol): Remove "static".
4406 * server.h (extended_protocol): Declare it.
4407
ece66d65
JS
44082015-12-04 Josh Stone <jistone@redhat.com>
4409
4410 * target.h (struct target_ops) <arch_setup>: Rename to ...
4411 (struct target_ops) <post_create_inferior>: ... this.
4412 (target_arch_setup): Rename to ...
4413 (target_post_create_inferior): ... this, calling post_create_inferior.
4414 * server.c (start_inferior): Update target_arch_setup calls to
4415 target_post_create_inferior.
4416 * linux-low.c (linux_low_ptrace_options): Forward declare.
4417 (linux_arch_setup): Update its comment for general use.
4418 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4419 (struct linux_target_ops): Use linux_post_create_inferior.
4420 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4421 to post_create_inferior.
4422 * nto-low.c (struct nto_target_ops): Likewise.
4423 * spu-low.c (struct spu_target_ops): Likewise.
4424 * win32-low.c (struct win32_target_ops): Likewise.
4425
e58c48b4
AT
44262015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4427
4428 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4429
fbec8956
AT
44302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4431
4432 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4433 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4434 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4435 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4436 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4437 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4438 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4439 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4440 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4441 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4442 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4443 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4444
9b4c5f87
AT
44452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4446
4447 * linux-low.c (linux_look_up_symbols): Don't call
4448 linux_supports_traceclone.
4449 * linux-low.h (thread_db_init): Remove use_events argument.
4450 * thread-db.c (thread_db_use_event): Remove global variable.
4451 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4452 (struct thread_db) <td_create_bp>: Remove field.
4453 (thread_db_create_event): Remove function.
4454 (thread_db_enable_reporting): Likewise.
4455 (find_one_thread): Don't check for thread_db_use_events.
4456 (attach_thread): Likewise.
4457 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4458 (try_thread_db_load_1): Don't check for thread_db_use_events.
4459 (thread_db_init): Remove use_events argument and thread events
4460 handling.
4461 (remove_thread_event_breakpoints): Remove function.
4462 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4463
7d00775e
AT
44642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4465
4466 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4467 New function.
4468 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4469 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4470 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4471 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4472 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4473 Initialize.
4474 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4475 New function.
4476 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4477 * linux-low.c (can_hardware_single_step): Use
4478 supports_hardware_single_step.
4479 (can_software_single_step): New function.
4480 (start_step_over): Call can_software_single_step.
4481 (linux_supports_hardware_single_step): New function.
4482 (struct target_ops) <supports_software_single_step>: Initialize.
4483 * linux-low.h (struct linux_target_ops)
4484 <supports_hardware_single_step>: Initialize.
4485 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4486 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4487 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4488 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4489 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4490 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4491 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4492 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4493 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4494 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4495 Initialize.
4496 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4497 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4498 Initialize.
4499 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4500 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4501 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4502 New function.
4503 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4504 * target.h (struct target_ops): <supports_software_single_step>:
4505 New field.
4506 (target_supports_software_single_step): New macro.
4507
2d97cd35
AT
45082015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4509
4510 * linux-low.c (linux_wait_1): Fix pc advance condition.
4511 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4512 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4513
769ef81f
AT
45142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4515
4516 * linux-arm-low.c (arm_is_thumb_mode): New function.
4517 (arm_breakpoint_at): Use arm_is_thumb_mode.
4518 (arm_breakpoint_kind_from_current_state): New function.
4519 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4520 Initialize.
4521 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4522 (linux_breakpoint_kind_from_current_state): New function.
4523 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4524 * linux-low.h (struct linux_target_ops)
4525 <breakpoint_kind_from_current_state>: New field.
4526 * target.h (struct target_ops): Likewise.
4527 (target_breakpoint_kind_from_current_state): New macro.
4528
1bebeeca
PA
45292015-11-30 Pedro Alves <palves@redhat.com>
4530
4531 * linux-low.c (linux_resume): Wake up the event loop before
4532 returning.
4533
a67a9fae
PA
45342015-11-30 Pedro Alves <palves@redhat.com>
4535
4536 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4537 check.
4538 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4539 to -1.
4540 * target.c (struct thread_search): New structure.
4541 (thread_search_callback): New function.
4542 (prev_general_thread): New global.
4543 (prepare_to_access_memory, done_accessing_memory): New functions.
4544 * target.h (prepare_to_access_memory, done_accessing_memory):
4545 Replace macros with function declarations.
4546
f2faf941
PA
45472015-11-30 Pedro Alves <palves@redhat.com>
4548
4549 PR 14618
4550 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4551 report TARGET_WAITKIND_NO_RESUMED.
4552 * remote-utils.c (prepare_resume_reply): Handle
4553 TARGET_WAITKIND_NO_RESUMED.
4554 * server.c (report_no_resumed): New global.
4555 (handle_query) <qSupported>: Handle "no-resumed+". Report
4556 "no-resumed+" support.
4557 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4558 return error if the client doesn't support no-resumed events.
4559 (push_stop_notification): New function.
4560 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4561 events if the client supports them.
4562
a681f9c9
PA
45632015-11-30 Pedro Alves <palves@redhat.com>
4564
4565 * linux-low.c (thread_still_has_status_pending_p): Don't check
4566 vCont;t here.
4567 (lwp_resumed): New function.
4568 (status_pending_p_callback): Return early if the LWP is not
4569 supposed to be resumed.
4570
65706a29
PA
45712015-11-30 Pedro Alves <palves@redhat.com>
4572
4573 * linux-low.c (handle_extended_wait): Assert that the LWP's
4574 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4575 thread create events, leave the new child's status pending.
4576 (linux_low_filter_event): If GDB wants to hear about thread exit
4577 events, leave the LWP marked dead and don't delete it.
4578 (linux_wait_for_event_filtered): Don't check for thread exit.
4579 (filter_exit_event): New function.
4580 (linux_wait_1): Use it, when returning an exit event.
4581 (linux_resume_one_lwp_throw): Assert that the LWP's
4582 waitstatus is TARGET_WAITKIND_IGNORE.
4583 * remote-utils.c (prepare_resume_reply): Handle
4584 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4585 * server.c (report_thread_events): New global.
4586 (handle_general_set): Handle QThreadEvents.
4587 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4588 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4589 TARGET_WAITKIND_THREAD_EXITED.
4590 * server.h (report_thread_events): Declare.
4591
56cf4bed
PA
45922015-11-30 Pedro Alves <palves@redhat.com>
4593
4594 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4595 the thread's last_resume_kind was resume_stop.
4596
500c1d85
PA
45972015-11-30 Pedro Alves <palves@redhat.com>
4598
4599 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4600 before returning.
4601
de979965
PA
46022015-11-30 Pedro Alves <palves@redhat.com>
4603
4604 * server.c (handle_v_requests): Handle vCtrlC.
4605
34c65914
PA
46062015-11-30 Pedro Alves <palves@redhat.com>
4607
4608 * gdbthread.h (find_any_thread_of_pid): Declare.
4609 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4610 functions.
4611 * server.c (handle_query): If current_thread is NULL, look for
4612 another thread of the selected process.
4613
79efa585 46142015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4615 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4616
4617 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4618 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4619 name in reply.
4620 * target.h (struct target_ops) <thread_name>: New field.
4621 (target_thread_name): New macro.
4622
80d82c19
JB
46232015-11-23 Joel Brobecker <brobecker@adacore.com>
4624
4625 * regcache.h (regcache_invalidate_pid): Add declaration.
4626 * regcache.c (regcache_invalidate_pid): New function, extracted
4627 from regcache_invalidate.
4628 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4629 Add trivial documentation comment.
4630 * lynx-low.c: Use regcache_invalidate_pid instead of
4631 regcache_invalidate.
4632
64da5dd5
JB
46332015-11-23 Joel Brobecker <brobecker@adacore.com>
4634
4635 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4636 and Elf64_auxv_t if the target is Android.
4637
37ce4055
DE
46382015-11-22 Doug Evans <xdje42@gmail.com>
4639
4640 * target.h: #include <sys/types.h>.
4641
06e03fff
PA
46422015-11-19 Pedro Alves <palves@redhat.com>
4643
4644 * linux-low.c (linux_process_qsupported): Change prototype.
4645 Adjust.
4646 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4647 Change prototype.
4648 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4649 and adjust to loop over all features.
4650 * server.c (handle_query) <qSupported>: Adjust to call
4651 target_process_qsupported once, passing it a vector of unprocessed
4652 features.
4653 * target.h (struct target_ops) <process_qsupported>: Change
4654 prototype.
4655 (target_process_qsupported): Adjust.
4656
9a084706
PA
46572015-11-19 Pedro Alves <palves@redhat.com>
4658
4659 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4660 mode.
4661 * configure: Regenerate.
4662
dad44a1f
PA
46632015-11-19 Pedro Alves <palves@redhat.com>
4664
4665 * configure: Regenerate.
4666
231c0592
YQ
46672015-11-19 Yao Qi <yao.qi@linaro.org>
4668
4669 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4670 type to uint32_t.
4671
6c1c9a8b
YQ
46722015-11-19 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4675 (struct aarch64_operand): Move enum out.
4676
9caa3311
YQ
46772015-11-19 Yao Qi <yao.qi@linaro.org>
4678
4679 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4680 struct user_fpsimd_state *.
4681 (aarch64_store_fpregset): Likewise.
4682
6a69a054
YQ
46832015-11-19 Yao Qi <yao.qi@linaro.org>
4684
4685 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4686 struct user_pt_regs *.
4687 (aarch64_store_gregset): Likewise.
4688
1798301e
PA
46892015-11-18 Pedro Alves <palves@redhat.com>
4690
4691 * Makefile.in (all_object_files): Add $IPA_OBJS.
4692
ce7715e2
PA
46932015-11-17 Pedro Alves <palves@redhat.com>
4694
4695 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4696 GDB_SIGNAL_0 and gdb_signal_to_string.
4697
c0879059
PA
46982015-11-17 Pedro Alves <palves@redhat.com>
4699
4700 * win32-low.c (handle_output_debug_string): Remove parameter.
4701 (win32_kill): Remove our_status local and adjust call to
4702 handle_output_debug_string.
4703 (get_child_debug_event): Adjust call to
4704 handle_output_debug_string.
4705
1996e237
SM
47062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4707
4708 * linux-mips-low.c (mips_fill_gregset): Add cast.
4709 (mips_store_gregset): Likewise.
4710 (mips_fill_fpregset): Likewise.
4711 (mips_store_fpregset): Likewise.
4712
cbec665b
SM
47132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4714
4715 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4716 priv.
4717
eb3e3c67
SM
47182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4719
4720 * linux-mips-low.c (mips_linux_new_thread): Change type of
4721 watch_type to enum target_hw_bp_type.
4722
171de4b8
SM
47232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4724
4725 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4726 Change return type to arm_hwbp_type.
4727
04248ead
SM
47282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4729
4730 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4731 (arm_store_gregset): Likewise.
4732 * linux-arm-low.c (arm_get_hwcap): Likewise.
4733 (arm_read_description): Likewise.
4734
04b3479c
SM
47352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4736
4737 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4738
2bc84e8a
SM
47392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4740
4741 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4742 (ppc_fill_vsxregset): Likewise.
4743 (ppc_store_vsxregset): Likewise.
4744 (ppc_fill_vrregset): Likewise.
4745 (ppc_store_vrregset): Likewise.
4746 (ppc_fill_evrregset): Likewise.
4747 (ppc_store_evrregset): Likewise.
4748
e6c5bb05
SM
47492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4750
4751 * linux-ppc-low.c (ppc_usrregs_info): Remove
4752 forward-declaration.
4753 (ppc_arch_setup): Move lower in file.
4754
7ea45d72
SM
47552015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4756
4757 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4758 (ps_pdwrite): Likewise.
4759
69291610
HW
47602015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4761
4762 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4763 to after assert checks.
4764
b42945fd
SM
47652015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4766
4767 * proc-service.c (ps_pdread): Add/adjust casts.
4768 (ps_pdwrite): Add/adjust casts.
4769
d6f85c84
SM
47702015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4771
4772 * server.c (handle_search_memory_1): Cast return value of
4773 memmem.
4774
f98cd059
SM
47752015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4776
4777 * server.c (write_qxfer_response): Change type of data to
4778 gdb_byte *.
4779
d2412fa5
PA
47802015-10-29 Pedro Alves <palves@redhat.com>
4781
4782 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4783
c17414a2
PA
47842015-10-29 Pedro Alves <palves@redhat.com>
4785
4786 * tracepoint.c (clear_installed_tracepoints): Add casts.
4787
e053fbc4
PA
47882015-10-29 Pedro Alves <palves@redhat.com>
4789
4790 * server.c (handle_v_cont, process_serial_event): Add enum
4791 gdb_signal casts to signal parsing code.
4792
add67df8
PA
47932015-10-29 Pedro Alves <palves@redhat.com>
4794
4795 * linux-low.h (NULL_REGSET): Define.
4796 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4797 * linux-arm-low.c (arm_regsets): Likewise.
4798 * linux-crisv32-low.c (cris_regsets): Likewise.
4799 * linux-m68k-low.c (m68k_regsets): Likewise.
4800 * linux-mips-low.c (mips_regsets): Likewise.
4801 * linux-nios2-low.c (nios2_regsets): Likewise.
4802 * linux-ppc-low.c (ppc_regsets): Likewise.
4803 * linux-s390-low.c (s390_regsets): Likewise.
4804 * linux-sh-low.c (sh_regsets): Likewise.
4805 * linux-sparc-low.c (sparc_regsets): Likewise.
4806 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4807 * linux-tile-low.c (tile_regsets): Likewise.
4808 * linux-x86-low.c (x86_regsets): Likewise.
4809 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4810
50bc912a
PA
48112015-10-29 Pedro Alves <palves@redhat.com>
4812
4813 * linux-low.h (NULL_REGSET): Define.
4814 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4815 * linux-arm-low.c (arm_regsets): Likewise.
4816 * linux-crisv32-low.c (cris_regsets): Likewise.
4817 * linux-m68k-low.c (m68k_regsets): Likewise.
4818 * linux-mips-low.c (mips_regsets): Likewise.
4819 * linux-nios2-low.c (nios2_regsets): Likewise.
4820 * linux-ppc-low.c (ppc_regsets): Likewise.
4821 * linux-s390-low.c (s390_regsets): Likewise.
4822 * linux-sh-low.c (sh_regsets): Likewise.
4823 * linux-sparc-low.c (sparc_regsets): Likewise.
4824 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4825 * linux-tile-low.c (tile_regsets): Likewise.
4826 * linux-x86-low.c (x86_regsets): Likewise.
4827 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4828
682b2546
DE
48292015-10-26 Doug Evans <dje@google.com>
4830
4831 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4832
963843d4
DE
48332015-10-26 Doug Evans <dje@google.com>
4834
4835 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4836
d41401ac
DE
48372015-10-26 Doug Evans <dje@google.com>
4838
4839 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4840 for debug_printf.
4841 (attach_thread, find_new_threads_callback): Ditto.
4842
3db28855
AT
48432015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4844
4845 * mem-break.h (set_breakpoint_data): Remove.
4846
fb78e89c
AT
48472015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4848
4849 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4850 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4851 (initialize_low): Remove set_breakpoint_data call.
4852 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4853 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4854 (initialize_low): Remove set_breakpoint_data call.
4855 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4856 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4857 (initialize_low): Remove set_breakpoint_data call.
4858
2e6ee069
AT
48592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4860
4861 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4862 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4863 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4864 * target.h (target_breakpoint_kind_from_pc): New macro.
4865
1652a986
AT
48662015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4867
4868 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4869 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4870 the default breakpoint kind.
4871
abeead09
AT
48722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4873
4874 * linux-arm-low.c (arm_supports_z_point_type): Add software
4875 breakpoint support.
4876
b0b4b501
AT
48772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4878
4879 * linux-arm-low.c: Refactor breakpoint definitions.
4880 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4881 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4882
8689682c
AT
48832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4884
4885 * Makefile.in: Add arm.c/o.
4886 * configure.srv: Likewise.
4887 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4888 (arm_breakpoint_kind_from_pc): New function.
4889 (arm_sw_breakpoint_from_kind): Return proper kind.
4890 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4891
27165294
AT
48922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4893
4894 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4895 removal.
4896 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4897 (struct raw_breakpoint) <size>: Remove.
4898 (struct raw_breakpoint) <kind>: Add.
4899 (bp_size): New function.
4900 (bp_opcode): Likewise.
4901 (find_raw_breakpoint_at): Adjust for kind.
4902 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4903 (remove_memory_breakpoint): Adjust for kind call bp_size.
4904 (set_raw_breakpoint_at): Adjust for kind.
4905 (set_breakpoint): Likewise.
4906 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4907 (delete_raw_breakpoint): Adjust for kind.
4908 (delete_breakpoint): Likewise.
4909 (find_gdb_breakpoint): Likewise.
4910 (set_gdb_breakpoint_1): Likewise.
4911 (set_gdb_breakpoint): Likewise.
4912 (delete_gdb_breakpoint_1): Likewise.
4913 (delete_gdb_breakpoint): Likewise.
4914 (uninsert_raw_breakpoint): Likewise.
4915 (reinsert_raw_breakpoint): Likewise.
4916 (set_breakpoint_data): Remove.
4917 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4918 (check_mem_read): Adjust for kind call bp_size.
4919 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4920 (clone_one_breakpoint): Adjust for kind.
4921 * mem-break.h (set_gdb_breakpoint): Likewise.
4922 (delete_gdb_breakpoint): Likewise.
4923 * server.c (process_serial_event): Likewise.
4924
dd373349
AT
49252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4926
4927 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4928 (struct linux_target_ops) <breakpoint>: Remove.
4929 (struct linux_target_ops) <breakpoint_len>: Remove.
4930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4932 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4933 (arm_sw_breakpoint_from_kind): New function.
4934 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4935 (struct linux_target_ops) <breakpoint>: Remove.
4936 (struct linux_target_ops) <breakpoint_len>: Remove.
4937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4939 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4940 (struct linux_target_ops) <breakpoint>: Remove.
4941 (struct linux_target_ops) <breakpoint_len>: Remove.
4942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4944 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4945 (struct linux_target_ops) <breakpoint>: Remove.
4946 (struct linux_target_ops) <breakpoint_len>: Remove.
4947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4949 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4950 and sw_breakpoint_from_kind to increment the pc.
4951 (linux_breakpoint_kind_from_pc): New function.
4952 (linux_sw_breakpoint_from_kind): New function.
4953 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4954 (initialize_low): Call breakpoint_kind_from_pc and
4955 sw_breakpoint_from_kind to replace breakpoint_data/len.
4956 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4957 New field.
4958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4959 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4960 (struct linux_target_ops) <breakpoint>: Remove.
4961 (struct linux_target_ops) <breakpoint_len>: Remove.
4962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4964 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4965 (struct linux_target_ops) <breakpoint>: Remove.
4966 (struct linux_target_ops) <breakpoint_len>: Remove.
4967 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4969 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4970 (struct linux_target_ops) <breakpoint>: Remove.
4971 (struct linux_target_ops) <breakpoint_len>: Remove.
4972 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4974 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4975 (struct linux_target_ops) <breakpoint>: Remove.
4976 (struct linux_target_ops) <breakpoint_len>: Remove.
4977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4979 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4990 (struct linux_target_ops) <breakpoint>: Remove.
4991 (struct linux_target_ops) <breakpoint_len>: Remove.
4992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4994 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4995 (struct linux_target_ops) <breakpoint>: Remove.
4996 (struct linux_target_ops) <breakpoint_len>: Remove.
4997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4999 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5000 (struct linux_target_ops) <breakpoint>: Remove.
5001 (struct linux_target_ops) <breakpoint_len>: Remove.
5002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5004 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5005 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5006 (struct linux_target_ops) <breakpoint>: Remove.
5007 (struct linux_target_ops) <breakpoint_len>: Remove.
5008 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5009 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5010 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5011 (struct linux_target_ops) <breakpoint>: Remove.
5012 (struct linux_target_ops) <breakpoint_len>: Remove.
5013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5014 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5015
4cd98a19
AT
50162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5017
5018 * linux-cris-low.c (cris_get_pc): Remove void arg.
5019
774ee6d2
AR
50202015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5021
5022 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5023 variable name.
5024
833dcd29
AR
50252015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5026
5027 * inferiors.c (thread_pid_matches_callback): New function.
5028 (find_thread_process): New function.
5029 (remove_thread): Reset current_thread.
5030 (remove_process): Assert threads have been removed first.
5031
8d689ee5
YQ
50322015-10-15 Yao Qi <yao.qi@linaro.org>
5033
5034 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5035 if it is 3.
5036 (aarch64_remove_point): Likewise.
5037 * regcache.c (regcache_register_size): New function.
5038
1c2e1515
YQ
50392015-10-12 Yao Qi <yao.qi@linaro.org>
5040
5041 * linux-aarch64-low.c: Update all callers as emit_load_store
5042 is renamed to aarch64_emit_load_store.
5043
e1c587c3
YQ
50442015-10-12 Yao Qi <yao.qi@linaro.org>
5045
5046 * linux-aarch64-low.c: Update all callers of function renaming
5047 from emit_insn to aarch64_emit_insn.
5048
b6542f81
YQ
50492015-10-12 Yao Qi <yao.qi@linaro.org>
5050
5051 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5052 arch/aarch64-insn.h.
5053 (struct aarch64_memory_operand): Likewise.
5054 (ENCODE): Likewise.
5055 (emit_insn): Move to arch/aarch64-insn.c.
5056 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5057 (emit_load_store): Move to arch/aarch64-insn.c.
5058 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5059 (can_encode_int32): Remove.
5060
246994ce
YQ
50612015-10-12 Yao Qi <yao.qi@linaro.org>
5062
5063 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5064 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5065 (aarch64_relocate_instruction): Likewise.
5066 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5067 (struct aarch64_insn_visitor): Likewise.
5068
0badd99f
YQ
50692015-10-12 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5072 (struct aarch64_insn_visitor): New.
5073 (struct aarch64_insn_relocation_data): New.
5074 (aarch64_ftrace_insn_reloc_b): New function.
5075 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5076 (aarch64_ftrace_insn_reloc_cb): Likewise.
5077 (aarch64_ftrace_insn_reloc_tb): Likewise.
5078 (aarch64_ftrace_insn_reloc_adr): Likewise.
5079 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5080 (aarch64_ftrace_insn_reloc_others): Likewise.
5081 (visitor): New.
5082 (aarch64_relocate_instruction): Use visitor.
5083
dfaffe9d
YQ
50842015-10-12 Yao Qi <yao.qi@linaro.org>
5085
5086 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5087 int. Add argument buf.
5088 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5089 aarch64_relocate_instruction.
5090
70b439f0
YQ
50912015-10-12 Yao Qi <yao.qi@linaro.org>
5092
5093 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5094 argument insn. Remove local variable insn. Don't call
5095 target_read_uint32.
5096 (aarch64_install_fast_tracepoint_jump_pad): Call
5097 target_read_uint32.
5098
7781c06f
YQ
50992015-09-30 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5102 (emit_load_store_pair): Likewise.
5103
9a3c8263
SM
51042015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5105
5106 * dll.c (match_dll): Add cast(s).
5107 (unloaded_dll): Likewise.
5108 * linux-low.c (second_thread_of_pid_p): Likewise.
5109 (delete_lwp_callback): Likewise.
5110 (count_events_callback): Likewise.
5111 (select_event_lwp_callback): Likewise.
5112 (linux_set_resume_request): Likewise.
5113 * server.c (accumulate_file_name_length): Likewise.
5114 (emit_dll_description): Likewise.
5115 (handle_qxfer_threads_worker): Likewise.
5116 (visit_actioned_threads): Likewise.
5117 * thread-db.c (any_thread_of): Likewise.
5118 * tracepoint.c (same_process_p): Likewise.
5119 (match_blocktype): Likewise.
5120 (build_traceframe_info_xml): Likewise.
5121
224c3ddb
SM
51222015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5123
5124 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5125 assignment.
5126 (gdb_unparse_agent_expr): Likewise.
5127 * hostio.c (require_data): Likewise.
5128 (handle_pread): Likewise.
5129 * linux-low.c (disable_regset): Likewise.
5130 (fetch_register): Likewise.
5131 (store_register): Likewise.
5132 (get_dynamic): Likewise.
5133 (linux_qxfer_libraries_svr4): Likewise.
5134 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5135 (set_fast_tracepoint_jump): Likewise.
5136 (uninsert_fast_tracepoint_jumps_at): Likewise.
5137 (reinsert_fast_tracepoint_jumps_at): Likewise.
5138 (validate_inserted_breakpoint): Likewise.
5139 (clone_agent_expr): Likewise.
5140 * regcache.c (init_register_cache): Likewise.
5141 * remote-utils.c (putpkt_binary_1): Likewise.
5142 (decode_M_packet): Likewise.
5143 (decode_X_packet): Likewise.
5144 (look_up_one_symbol): Likewise.
5145 (relocate_instruction): Likewise.
5146 (monitor_output): Likewise.
5147 * server.c (handle_search_memory): Likewise.
5148 (handle_qxfer_exec_file): Likewise.
5149 (handle_qxfer_libraries): Likewise.
5150 (handle_qxfer): Likewise.
5151 (handle_query): Likewise.
5152 (handle_v_cont): Likewise.
5153 (handle_v_run): Likewise.
5154 (captured_main): Likewise.
5155 * target.c (write_inferior_memory): Likewise.
5156 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5157 * tracepoint.c (init_trace_buffer): Likewise.
5158 (add_tracepoint_action): Likewise.
5159 (add_traceframe): Likewise.
5160 (add_traceframe_block): Likewise.
5161 (cmd_qtdpsrc): Likewise.
5162 (cmd_qtdv): Likewise.
5163 (cmd_qtstatus): Likewise.
5164 (response_source): Likewise.
5165 (response_tsv): Likewise.
5166 (cmd_qtnotes): Likewise.
5167 (gdb_collect): Likewise.
5168 (initialize_tracepoint): Likewise.
5169
afbe19f8
PL
51702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5171
5172 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5173 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5174 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5175 <NOP>: New.
5176 (enum aarch64_condition_codes): New enum.
5177 (w0): New static global.
5178 (fp): Likewise.
5179 (lr): Likewise.
5180 (struct aarch64_memory_operand) <type>: New
5181 MEMORY_OPERAND_POSTINDEX type.
5182 (postindex_memory_operand): New helper function.
5183 (emit_ret): New function.
5184 (emit_load_store_pair): New function, factored out of emit_stp
5185 with support for MEMORY_OPERAND_POSTINDEX.
5186 (emit_stp): Rewrite using emit_load_store_pair.
5187 (emit_ldp): New function.
5188 (emit_load_store): Likewise.
5189 (emit_ldr): Mention post-index instruction in comment.
5190 (emit_ldrh): New function.
5191 (emit_ldrb): New function.
5192 (emit_ldrsw): Mention post-index instruction in comment.
5193 (emit_str): Likewise.
5194 (emit_subs): New function.
5195 (emit_cmp): Likewise.
5196 (emit_and): Likewise.
5197 (emit_orr): Likewise.
5198 (emit_orn): Likewise.
5199 (emit_eor): Likewise.
5200 (emit_mvn): Likewise.
5201 (emit_lslv): Likewise.
5202 (emit_lsrv): Likewise.
5203 (emit_asrv): Likewise.
5204 (emit_mul): Likewise.
5205 (emit_sbfm): Likewise.
5206 (emit_sbfx): Likewise.
5207 (emit_ubfm): Likewise.
5208 (emit_ubfx): Likewise.
5209 (emit_csinc): Likewise.
5210 (emit_cset): Likewise.
5211 (emit_nop): Likewise.
5212 (emit_ops_insns): New helper function.
5213 (emit_pop): Likewise.
5214 (emit_push): Likewise.
5215 (aarch64_emit_prologue): New function.
5216 (aarch64_emit_epilogue): Likewise.
5217 (aarch64_emit_add): Likewise.
5218 (aarch64_emit_sub): Likewise.
5219 (aarch64_emit_mul): Likewise.
5220 (aarch64_emit_lsh): Likewise.
5221 (aarch64_emit_rsh_signed): Likewise.
5222 (aarch64_emit_rsh_unsigned): Likewise.
5223 (aarch64_emit_ext): Likewise.
5224 (aarch64_emit_log_not): Likewise.
5225 (aarch64_emit_bit_and): Likewise.
5226 (aarch64_emit_bit_or): Likewise.
5227 (aarch64_emit_bit_xor): Likewise.
5228 (aarch64_emit_bit_not): Likewise.
5229 (aarch64_emit_equal): Likewise.
5230 (aarch64_emit_less_signed): Likewise.
5231 (aarch64_emit_less_unsigned): Likewise.
5232 (aarch64_emit_ref): Likewise.
5233 (aarch64_emit_if_goto): Likewise.
5234 (aarch64_emit_goto): Likewise.
5235 (aarch64_write_goto_address): Likewise.
5236 (aarch64_emit_const): Likewise.
5237 (aarch64_emit_call): Likewise.
5238 (aarch64_emit_reg): Likewise.
5239 (aarch64_emit_pop): Likewise.
5240 (aarch64_emit_stack_flush): Likewise.
5241 (aarch64_emit_zero_ext): Likewise.
5242 (aarch64_emit_swap): Likewise.
5243 (aarch64_emit_stack_adjust): Likewise.
5244 (aarch64_emit_int_call_1): Likewise.
5245 (aarch64_emit_void_call_2): Likewise.
5246 (aarch64_emit_eq_goto): Likewise.
5247 (aarch64_emit_ne_goto): Likewise.
5248 (aarch64_emit_lt_goto): Likewise.
5249 (aarch64_emit_le_goto): Likewise.
5250 (aarch64_emit_gt_goto): Likewise.
5251 (aarch64_emit_ge_got): Likewise.
5252 (aarch64_emit_ops_impl): New static global variable.
5253 (aarch64_emit_ops): New target function, return
5254 &aarch64_emit_ops_impl.
5255 (struct linux_target_ops): Install it.
5256
bb903df0
PL
52572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5258
5259 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5260 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5261 aarch64-ipa.o.
5262 * linux-aarch64-ipa.c: New file.
5263 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5264 and endian.h.
5265 (aarch64_get_thread_area): New target method.
5266 (extract_signed_bitfield): New helper function.
5267 (aarch64_decode_ldr_literal): New function.
5268 (enum aarch64_opcodes): New enum.
5269 (struct aarch64_register): New struct.
5270 (struct aarch64_operand): New struct.
5271 (x0): New static global.
5272 (x1): Likewise.
5273 (x2): Likewise.
5274 (x3): Likewise.
5275 (x4): Likewise.
5276 (w2): Likewise.
5277 (ip0): Likewise.
5278 (sp): Likewise.
5279 (xzr): Likewise.
5280 (aarch64_register): New helper function.
5281 (register_operand): Likewise.
5282 (immediate_operand): Likewise.
5283 (struct aarch64_memory_operand): New struct.
5284 (offset_memory_operand): New helper function.
5285 (preindex_memory_operand): Likewise.
5286 (enum aarch64_system_control_registers): New enum.
5287 (ENCODE): New macro.
5288 (emit_insn): New helper function.
5289 (emit_b): New function.
5290 (emit_bcond): Likewise.
5291 (emit_cb): Likewise.
5292 (emit_tb): Likewise.
5293 (emit_blr): Likewise.
5294 (emit_stp): Likewise.
5295 (emit_ldp_q_offset): Likewise.
5296 (emit_stp_q_offset): Likewise.
5297 (emit_load_store): Likewise.
5298 (emit_ldr): Likewise.
5299 (emit_ldrsw): Likewise.
5300 (emit_str): Likewise.
5301 (emit_ldaxr): Likewise.
5302 (emit_stxr): Likewise.
5303 (emit_stlr): Likewise.
5304 (emit_data_processing_reg): Likewise.
5305 (emit_data_processing): Likewise.
5306 (emit_add): Likewise.
5307 (emit_sub): Likewise.
5308 (emit_mov): Likewise.
5309 (emit_movk): Likewise.
5310 (emit_mov_addr): Likewise.
5311 (emit_mrs): Likewise.
5312 (emit_msr): Likewise.
5313 (emit_sevl): Likewise.
5314 (emit_wfe): Likewise.
5315 (append_insns): Likewise.
5316 (can_encode_int32_in): New helper function.
5317 (aarch64_relocate_instruction): New function.
5318 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5319 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5320 (struct linux_target_ops): Install aarch64_get_thread_area,
5321 aarch64_install_fast_tracepoint_jump_pad and
5322 aarch64_get_min_fast_tracepoint_insn_len.
5323
787749ea
PL
53242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5325
5326 * Makefile.in (aarch64-insn.o): New rule.
5327 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5328
9812b2e6
YQ
53292015-09-21 Yao Qi <yao.qi@linaro.org>
5330
5331 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5332
18fe412b
YQ
53332015-09-21 Yao Qi <yao.qi@linaro.org>
5334
5335 * tracepoint.c (max_jump_pad_size): Remove.
5336
a0cc84cd
YQ
53372015-09-18 Yao Qi <yao.qi@linaro.org>
5338
5339 * linux-aarch64-low.c: Don't include sys/uio.h.
5340 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5341
d78908cf
WW
53422015-09-16 Wei-cheng Wang <cole945@gmail.com>
5343
5344 * tracepoint.c (eval_result_type): Change prototype.
5345 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5346
d57e0d50
PA
53472015-09-15 Pedro Alves <palves@redhat.com>
5348
5349 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5350 Check whether to report exec events instead of checking whether
5351 multiprocess is enabled.
5352
5a676acc
PA
53532015-09-15 Pedro Alves <palves@redhat.com>
5354
5355 PR remote/18965
5356 * remote-utils.c (prepare_resume_reply): Merge
5357 TARGET_WAITKIND_VFORK_DONE switch case with the
5358 TARGET_WAITKIND_FORKED case.
5359
7c5d0fad
YQ
53602015-09-15 Yao Qi <yao.qi@linaro.org>
5361
5362 * server.c (handle_query): Check string comparison using
5363 "else if" instead of "if".
5364
750ce8d1
YQ
53652015-09-15 Yao Qi <yao.qi@linaro.org>
5366
5367 * server.c (vCont_supported): New global variable.
5368 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5369 matches. Append ";vContSupported+" to own_buf.
5370 (handle_v_requests): Append ";s;S" to own_buf if target supports
5371 hardware single step or vCont_supported is false.
5372 (capture_main): Set vCont_supported to zero.
5373
70b90b91
YQ
53742015-09-15 Yao Qi <yao.qi@linaro.org>
5375
5376 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5377 it to ...
5378 (linux_supports_hardware_single_step): ... New function.
5379 (linux_target_ops): Update.
5380 * lynx-low.c (lynx_target_ops): Set field
5381 supports_hardware_single_step to target_can_do_hardware_single_step.
5382 * nto-low.c (nto_target_ops): Likewise.
5383 * spu-low.c (spu_target_ops): Likewise.
5384 * win32-low.c (win32_target_ops): Likewise.
5385 * target.c (target_can_do_hardware_single_step): New function.
5386 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5387 Remove. <supports_hardware_single_step>: New field.
5388 (target_supports_conditional_breakpoints): Remove.
5389 (target_supports_hardware_single_step): New macro.
5390 (target_can_do_hardware_single_step): Declare.
5391 * server.c (handle_query): Use target_supports_hardware_single_step
5392 instead of target_supports_conditional_breakpoints.
5393
ade90bde
YQ
53942015-09-15 Yao Qi <yao.qi@linaro.org>
5395
5396 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5397 function.
5398 (struct linux_target_ops the_low_target): Install
5399 aarch64_linux_siginfo_fixup.
5400
94585166
DB
54012015-09-11 Don Breazeal <donb@codesourcery.com>
5402 Luis Machado <lgustavo@codesourcery.com>
5403
5404 * linux-low.c (linux_mourn): Static declaration.
5405 (linux_arch_setup): Move in front of
5406 handle_extended_wait.
5407 (linux_arch_setup_thread): New function.
5408 (handle_extended_wait): Handle exec events. Call
5409 linux_arch_setup_thread. Make event_lwp argument a
5410 pointer-to-a-pointer.
5411 (check_zombie_leaders): Do not check stopped threads.
5412 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5413 (linux_low_filter_event): Add lwp and thread for exec'ing
5414 non-leader thread if leader thread has been deleted.
5415 Refactor code into linux_arch_setup_thread and call it.
5416 Pass child lwp pointer by reference to handle_extended_wait.
5417 (linux_wait_for_event_filtered): Update comment.
5418 (linux_wait_1): Prevent clobbering exec event status.
5419 (linux_supports_exec_events): New function.
5420 (linux_target_ops) <supports_exec_events>: Initialize new member.
5421 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5422 new member.
5423 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5424 * server.c (report_exec_events): New global variable.
5425 (handle_query): Handle qSupported query for exec-events feature.
5426 (captured_main): Initialize report_exec_events.
5427 * server.h (report_exec_events): Declare new global variable.
5428 * target.h (struct target_ops) <supports_exec_events>: New
5429 member.
5430 (target_supports_exec_events): New macro.
5431 * win32-low.c (win32_target_ops) <supports_exec_events>:
5432 Initialize new member.
5433
0568462b
MM
54342015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5435
5436 * linux-low.c (linux_low_enable_btrace): Remove.
5437 (linux_target_ops): Replace linux_low_enable_btrace with
5438 linux_enable_btrace.
5439
39edd165
YQ
54402015-09-03 Yao Qi <yao.qi@linaro.org>
5441
5442 * linux-aarch64-low.c (aarch64_insert_point): Call
5443 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5444 returns true.
5445
1db33b5a
UW
54462015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5447
5448 * linux-low.c (check_stopped_by_breakpoint): Use
5449 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5450
ab290430
PA
54512015-08-27 Pedro Alves <palves@redhat.com>
5452
5453 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5454
8d749320
SM
54552015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5456
6711b7f8
SM
5457 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5458 the XNEW-family equivalent.
8d749320
SM
5459 (compile_bytecodes): Likewise.
5460 * dll.c (loaded_dll): Likewise.
5461 * event-loop.c (append_callback_event): Likewise.
5462 (create_file_handler): Likewise.
5463 (create_file_event): Likewise.
5464 * hostio.c (handle_open): Likewise.
5465 * inferiors.c (add_thread): Likewise.
5466 (add_process): Likewise.
5467 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5468 * linux-arm-low.c (arm_new_process): Likewise.
5469 (arm_new_thread): Likewise.
5470 * linux-low.c (add_to_pid_list): Likewise.
5471 (linux_add_process): Likewise.
5472 (handle_extended_wait): Likewise.
5473 (add_lwp): Likewise.
5474 (enqueue_one_deferred_signal): Likewise.
5475 (enqueue_pending_signal): Likewise.
5476 (linux_resume_one_lwp_throw): Likewise.
5477 (linux_resume_one_thread): Likewise.
5478 (linux_read_memory): Likewise.
5479 (linux_write_memory): Likewise.
5480 * linux-mips-low.c (mips_linux_new_process): Likewise.
5481 (mips_linux_new_thread): Likewise.
5482 (mips_add_watchpoint): Likewise.
5483 * linux-x86-low.c (initialize_low_arch): Likewise.
5484 * lynx-low.c (lynx_add_process): Likewise.
5485 * mem-break.c (set_raw_breakpoint_at): Likewise.
5486 (set_breakpoint): Likewise.
5487 (add_condition_to_breakpoint): Likewise.
5488 (add_commands_to_breakpoint): Likewise.
5489 (clone_agent_expr): Likewise.
5490 (clone_one_breakpoint): Likewise.
5491 * regcache.c (new_register_cache): Likewise.
5492 * remote-utils.c (look_up_one_symbol): Likewise.
5493 * server.c (queue_stop_reply): Likewise.
5494 (start_inferior): Likewise.
5495 (queue_stop_reply_callback): Likewise.
5496 (handle_target_event): Likewise.
5497 * spu-low.c (fetch_ppc_memory): Likewise.
5498 (store_ppc_memory): Likewise.
5499 * target.c (set_target_ops): Likewise.
5500 * thread-db.c (thread_db_load_search): Likewise.
5501 (try_thread_db_load_1): Likewise.
5502 * tracepoint.c (add_tracepoint): Likewise.
5503 (add_tracepoint_action): Likewise.
5504 (create_trace_state_variable): Likewise.
5505 (cmd_qtdpsrc): Likewise.
5506 (cmd_qtro): Likewise.
5507 (add_while_stepping_state): Likewise.
5508 * win32-low.c (child_add_thread): Likewise.
5509 (get_image_name): Likewise.
5510
ed8b7b42
YQ
55112015-08-25 Yao Qi <yao.qi@linaro.org>
5512
5513 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5514
db3cb7cb
YQ
55152015-08-25 Yao Qi <yao.qi@linaro.org>
5516
5517 * Makefile.in (aarch64-linux.o): New rule.
5518 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5519 srv_tgtobj.
5520 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5521 (aarch64_init_debug_reg_state): Make it extern.
5522 (aarch64_linux_prepare_to_resume): Remove.
5523
f6011a1c
YQ
55242015-08-25 Yao Qi <yao.qi@linaro.org>
5525
5526 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5527 lwp_arch_private_info and ptid_of_lwp.
5528
88e2cf7e
YQ
55292015-08-25 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5532 Find proc_info by find_process_pid. All callers updated.
5533
5e35436e
YQ
55342015-08-25 Yao Qi <yao.qi@linaro.org>
5535
5536 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5537 Remove.
5538 (debug_reg_change_callback): Remove.
5539 (aarch64_notify_debug_reg_change): Remove.
5540
4a8a7965
YQ
55412015-08-25 Yao Qi <yao.qi@linaro.org>
5542
5543 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5544 Call current_lwp_ptid.
5545
32a271ee
YQ
55462015-08-25 Yao Qi <yao.qi@linaro.org>
5547
5548 * linux-aarch64-low.c (debug_reg_change_callback): Use
5549 debug_printf.
5550
0d51c8d7
YQ
55512015-08-25 Yao Qi <yao.qi@linaro.org>
5552
5553 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5554
31a43dd5
YQ
55552015-08-25 Yao Qi <yao.qi@linaro.org>
5556
5557 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5558
8ee52567
YQ
55592015-08-25 Yao Qi <yao.qi@linaro.org>
5560
5561 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5562 the code.
5563
ff3f0f45
YQ
55642015-08-25 Yao Qi <yao.qi@linaro.org>
5565
5566 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5567 Remove.
5568 (debug_reg_change_callback): Remove argument entry and add argument
5569 lwp. Remove local variable thread. Don't print thread id in the
5570 debugging output. Don't check whether pid of thread equals to pid.
5571 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5572 iterate_over_lwps instead find_inferior.
5573
3d40fbb5
PA
55742015-08-24 Pedro Alves <palves@redhat.com>
5575
5576 * inferiors.c (get_first_process): New function.
5577 * inferiors.h (get_first_process): New declaration.
5578 * remote-utils.c (read_ptid): Default to the first process in the
5579 list, instead of to the current thread's process.
5580
438e1e42
PA
55812015-08-24 Pedro Alves <palves@redhat.com>
5582
5583 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5584 * event-loop.c: Likewise.
5585 * remote-utils.c: Likewise.
5586 * tracepoint.c: Likewise.
5587
a8c6d4fc
PA
55882015-08-24 Pedro Alves <palves@redhat.com>
5589
5590 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5591 ptid_get_lwp.
5592
99b0bb12
PA
55932015-08-21 Pedro Alves <palves@redhat.com>
5594
5595 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5596 instead of literal 1.
5597
f8904751
PA
55982015-08-21 Pedro Alves <palves@redhat.com>
5599
5600 * tdesc.c (default_description): Explicitly zero-initialize.
5601
465a859e
PA
56022015-08-21 Pedro Alves <palves@redhat.com>
5603
5604 PR gdb/18749
5605 * inferiors.c (remove_thread): Discard any pending stop reply for
5606 this thread.
5607 * server.c (remove_all_on_match_pid): Rename to ...
5608 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5609 instead of a pid.
5610 (discard_queued_stop_replies): Change parameter to a ptid. Now
5611 extern.
5612 (handle_v_kill, kill_inferior_callback, captured_main)
5613 (process_serial_event): Adjust.
5614 * server.h (discard_queued_stop_replies): Declare.
5615
f0db101d
PA
56162015-08-21 Pedro Alves <palves@redhat.com>
5617
5618 * linux-low.c (wait_for_sigstop): Always switch to no thread
5619 selected if the previously current thread dies.
5620 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5621 process instead of the current thread's.
5622 * remote-utils.c (input_interrupt): Don't check if there's no
5623 current thread.
5624 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5625 current thread to the general thread fails, error out.
5626 (handle_qxfer_auxv, handle_qxfer_libraries)
5627 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5628 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5629 (handle_query): Check if there's a thread selected instead of
5630 checking whether there's any thread in the thread list.
5631 (handle_qxfer_threads, handle_qxfer_btrace)
5632 (handle_qxfer_btrace_conf): Don't error out early if there's no
5633 thread in the thread list.
5634 (handle_v_cont, myresume): Don't set the current thread to the
5635 continue thread.
5636 (process_serial_event) <Hg handling>: Also set thread_id if the
5637 previous general thread is still alive.
5638 (process_serial_event) <g/G handling>: If setting the current
5639 thread to the general thread fails, error out.
5640 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5641 thread's lwp instead of the current thread's.
5642 * target.c (set_desired_thread): If the desired thread was not
5643 found, leave the current thread pointing to NULL. Return an int
5644 (boolean) indicating success.
5645 * target.h (set_desired_thread): Change return type to int.
5646
40045d91
MF
56472015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5648
5649 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5650 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5651 #includes.
5652 (ps_get_thread_area): New function.
5653
45face3b
GB
56542015-08-19 Gary Benson <gbenson@redhat.com>
5655
5656 * hostio.c (handle_pread): Do not attempt to read more data
5657 than hostio_reply_with_data can fit in a packet.
5658
16d5f642
JB
56592015-08-18 Joel Brobecker <brobecker@adacore.com>
5660
5661 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5662
a738da3a
MF
56632015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5664
5665 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5666
33ebda9d
PA
56672015-08-06 Pedro Alves <palves@redhat.com>
5668
5669 * tracepoint.c (expr_eval_result): Now an int.
5670
a44892be
PA
56712015-08-06 Pedro Alves <palves@redhat.com>
5672
5673 * gdbthread.h (struct regcache): Forward declare.
5674 (struct thread_info) <regcache_data>: Now a struct regcache
5675 pointer.
5676 * inferiors.c (inferior_regcache_data)
5677 (set_inferior_regcache_data): Now work with struct regcache
5678 pointers.
5679 * inferiors.h (struct regcache): Forward declare.
5680 (inferior_regcache_data, set_inferior_regcache_data): Now work
5681 with struct regcache pointers.
5682 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5683 (free_register_cache_thread): Remove struct regcache pointer
5684 casts.
5685
608a1e46
PA
56862015-08-06 Pedro Alves <palves@redhat.com>
5687
5688 * server.c (captured_main): On error, print the exception message
5689 to stderr, and if run_once is set, throw a quit.
5690
f0ce0d3a
PA
56912015-08-06 Pedro Alves <palves@redhat.com>
5692
5693 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5694 the current thread.
5695
bf47e248
PA
56962015-08-06 Pedro Alves <palves@redhat.com>
5697
5698 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5699 reading beyond the passed in buffer length.
5700
b6b9ffcc
PL
57012015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5702
5703 * tracepoint.c (symbol_list) <required>: Remove.
5704
863d01bd
PA
57052015-08-06 Pedro Alves <palves@redhat.com>
5706
5707 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5708 count if stopping and suspending threads.
5709 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5710 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5711 (linux_detach): Complete an ongoing step-over.
5712 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5713 throughout.
5714 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5715 (linux_wait_1): If passing a signal to the inferior after
5716 finishing a step-over, unsuspend and re-resume all lwps. If we
5717 see a single-step event but the thread should be continuing, don't
5718 pass the trap to gdb.
5719 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5720 internal_error instead of gdb_assert.
5721 (enqueue_pending_signal): New function.
5722 (check_ptrace_stopped_lwp_gone): Add debug output.
5723 (start_step_over): Use internal_error instead of gdb_assert.
5724 (complete_ongoing_step_over): New function.
5725 (linux_resume_one_thread): Don't resume a suspended thread.
5726 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5727 it stepping.
5728
00db26fa
PA
57292015-08-06 Pedro Alves <palves@redhat.com>
5730
5731 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5732 (linux_thread_alive): Use lwp_is_marked_dead.
5733 (extended_event_reported): Delete.
5734 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5735 instead of extended_event_reported.
5736 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5737 as well.
5738 (lwp_is_marked_dead): New function.
5739 (lwp_running): Use lwp_is_marked_dead.
5740 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5741 comment.
5742
ad071a30
PA
57432015-08-06 Pedro Alves <palves@redhat.com>
5744
5745 * linux-low.c (linux_wait_1): Move fork event output out of the
5746 !report_to_gdb check. Pass event_child->waitstatus to
5747 target_waitstatus_to_string instead of ourstatus.
5748
524b57e6
YQ
57492015-08-04 Yao Qi <yao.qi@linaro.org>
5750
5751 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5752 if current_thread is 32 bit.
5753
6085d6f6
YQ
57542015-08-04 Yao Qi <yao.qi@linaro.org>
5755
5756 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5757 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5758 * server.c (extended_protocol): Remove "static".
5759 * server.h (extended_protocol): Declare it.
5760
8a7e4587
YQ
57612015-08-04 Yao Qi <yao.qi@linaro.org>
5762
5763 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5764 both aarch64 and aarch32.
5765 (aarch64_set_pc): Likewise.
5766
3b53ae99
YQ
57672015-08-04 Yao Qi <yao.qi@linaro.org>
5768
5769 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5770 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5771 arm-with-neon.xml to srv_xmlfiles.
5772 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5773 (is_64bit_tdesc): New function.
5774 (aarch64_linux_read_description): New function.
5775 (aarch64_arch_setup): Call aarch64_linux_read_description.
5776 (regs_info): Rename to regs_info_aarch64.
5777 (aarch64_regs_info): Return right regs_info.
5778 (initialize_low_arch): Call initialize_low_arch_aarch32.
5779
bd9e6534
YQ
57802015-08-04 Yao Qi <yao.qi@linaro.org>
5781
5782 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5783 * linux-aarch32-low.c: New file.
5784 * linux-aarch32-low.h: New file.
5785 * linux-arm-low.c (arm_fill_gregset): Move it to
5786 linux-aarch32-low.c.
5787 (arm_store_gregset): Likewise.
5788 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5789 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5790 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5791 (regs_info): Rename to regs_info_arm.
5792 (arm_regs_info): Return regs_info_aarch32 if
5793 have_ptrace_getregset is 1 and target description is
5794 arm_with_neon or arm_with_vfpv3.
5795 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5796 Call initialize_low_arch_aarch32 instead.
5797
ded48a5e
YQ
57982015-08-04 Yao Qi <yao.qi@linaro.org>
5799
5800 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5801 * linux-low.c: ... here.
5802 * linux-low.h (have_ptrace_getregset): Declare it.
5803
96e9210f
PA
58042015-08-04 Pedro Alves <palves@redhat.com>
5805
5806 * thread-db.c (struct thread_db): Use new typedefs.
5807 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5808 CHK calls.
5809 (disable_thread_event_reporting): Cast result of dlsym to
5810 destination function pointer type.
5811 (thread_db_mourn): Use td_ta_delete_ftype.
5812
af60a1ef
SL
58132015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5814
5815 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5816 arch variant.
5817 (CDX_BREAKPOINT): Define for R2.
5818 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5819 (the_low_target): Add comments.
5820
e8b41681
YQ
58212015-07-30 Yao Qi <yao.qi@linaro.org>
5822
5823 * linux-arm-low.c (arm_hwcap): Remove it.
5824 (arm_read_description): New local variable arm_hwcap. Don't
5825 set arm_hwcap to zero.
5826
89abb039
YQ
58272015-07-30 Yao Qi <yao.qi@linaro.org>
5828
5829 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5830 Use regcache->tdesc instead.
5831 (arm_store_wmmxregset): Likewise.
5832 (arm_fill_vfpregset): Likewise.
5833 (arm_store_vfpregset): Likewise.
5834
deca266c
YQ
58352015-07-30 Yao Qi <yao.qi@linaro.org>
5836
5837 * linux-arm-low.c: Include arch/arm.h.
5838 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5839 (arm_store_gregset): Likewise.
5840
aa58a496
SM
58412015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5842
5843 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5844 ptrace's 4th parameter.
5845
50904b25
YQ
58462015-07-27 Yao Qi <yao.qi@linaro.org>
5847
5848 * configure.srv (case aarch64*-*-linux*): Don't set
5849 srv_linux_usrregs.
5850
5826e159
PA
58512015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5852
5853 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5854 sys/ptrace.h.
5855 * linux-arm-low.c: Likewise.
5856 * linux-cris-low.c: Likewise.
5857 * linux-crisv32-low.c: Likewise.
5858 * linux-low.c: Likewise.
5859 * linux-m68k-low.c: Likewise.
5860 * linux-mips-low.c: Likewise.
5861 * linux-nios2-low.c: Likewise.
5862 * linux-s390-low.c: Likewise.
5863 * linux-sparc-low.c: Likewise.
5864 * linux-tic6x-low.c: Likewise.
5865 * linux-tile-low.c: Likewise.
5866 * linux-x86-low.c: Likewise.
5867
54019719
PA
58682015-07-24 Pedro Alves <palves@redhat.com>
5869
5870 * config.in: Regenerate.
5871 * configure: Regenerate.
5872
eb7aa561
PA
58732015-07-24 Pedro Alves <palves@redhat.com>
5874
5875 * acinclude.m4: Include ../ptrace.m4.
5876 * configure.ac: Call GDB_AC_PTRACE.
5877 * config.in, configure: Regenerate.
5878
55d7b841
YQ
58792015-07-24 Yao Qi <yao.qi@linaro.org>
5880
5881 * linux-low.c (linux_create_inferior): Remove setting to
5882 proc->priv->new_inferior.
5883 (linux_attach): Likewise.
5884 (linux_low_filter_event): Likewise.
5885 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5886
c06cbd92
YQ
58872015-07-24 Yao Qi <yao.qi@linaro.org>
5888
5889 * linux-low.c (linux_arch_setup): New function.
5890 (linux_low_filter_event): If proc->tdesc is NULL and
5891 proc->attached is true, call the_low_target.arch_setup.
5892 Otherwise, keep status pending, and return.
5893 (linux_resume_one_lwp_throw): Don't call get_pc if
5894 thread->while_stepping isn't NULL. Don't call
5895 get_thread_regcache if proc->tdesc is NULL.
5896 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5897 (linux_target_ops): Install arch_setup.
5898 * server.c (start_inferior): Call the_target->arch_setup.
5899 * target.h (struct target_ops) <arch_setup>: New field.
5900 (target_arch_setup): New marco.
5901 * lynx-low.c (lynx_target_ops): Update.
5902 * nto-low.c (nto_target_ops): Update.
5903 * spu-low.c (spu_target_ops): Update.
5904 * win32-low.c (win32_target_ops): Update.
5905
5ae3ebba
YQ
59062015-07-24 Yao Qi <yao.qi@linaro.org>
5907
5908 * linux-low.c (linux_add_process): Don't set
5909 proc->priv->new_inferior.
5910 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5911 (linux_attach): Likewise.
5912
eb97750b
YQ
59132015-07-24 Yao Qi <yao.qi@linaro.org>
5914
5915 * server.c (start_inferior): Code refactor.
5916
51aee833
YQ
59172015-07-24 Yao Qi <yao.qi@linaro.org>
5918
5919 * server.c (process_serial_event): Set general_thread.
5920
af1b22f3
YQ
59212015-07-21 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5924 aarch64_linux_get_debug_reg_capacity.
5925
554717a3
YQ
59262015-07-17 Yao Qi <yao.qi@linaro.org>
5927
5928 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5929 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5930 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5931 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5932 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5933 (AARCH64_HWP_ALIGNMENT): Likewise.
5934 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5935 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5936 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5937 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5938 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5939 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5940 (struct aarch64_debug_reg_state): Likewise.
5941 (struct arch_lwp_info): Likewise.
5942 (aarch64_align_watchpoint): Likewise.
5943 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5944 (aarch64_watchpoint_length): Likewise.
5945 (aarch64_point_encode_ctrl_reg): Likewise
5946 (aarch64_point_is_aligned): Likewise.
5947 (aarch64_align_watchpoint): Likewise.
5948 (aarch64_linux_set_debug_regs):
5949 (aarch64_dr_state_insert_one_point): Likewise.
5950 (aarch64_dr_state_remove_one_point): Likewise.
5951 (aarch64_handle_breakpoint): Likewise.
5952 (aarch64_handle_aligned_watchpoint): Likewise.
5953 (aarch64_handle_unaligned_watchpoint): Likewise.
5954 (aarch64_handle_watchpoint): Likewise.
5955
c67ca4de
YQ
59562015-07-17 Yao Qi <yao.qi@linaro.org>
5957
5958 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5959 and don't aarch64_get_debug_reg_state. All callers update.
5960 (aarch64_handle_aligned_watchpoint): Likewise.
5961 (aarch64_handle_unaligned_watchpoint): Likewise.
5962 (aarch64_handle_watchpoint): Likewise.
5963 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5964 (aarch64_remove_point): Likewise.
5965
25abf979
YQ
59662015-07-17 Yao Qi <yao.qi@linaro.org>
5967
5968 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5969 debug_printf.
5970 (aarch64_handle_unaligned_watchpoint): Likewise.
5971
db1ff28b
JK
59722015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5973
5974 Revert the previous 3 commits:
5975 Move gdb_regex* to common/
5976 Move linux_find_memory_regions_full & co.
5977 gdbserver build-id attribute generator
5978
700ca40f
JK
59792015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5980 Jan Kratochvil <jan.kratochvil@redhat.com>
5981
5982 gdbserver build-id attribute generator.
5983 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5984 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5985 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5986 (find_phdr): New.
5987 (get_dynamic): Use find_pdhr to traverse program headers.
5988 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5989 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5990 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5991 (get_hex_build_id): New.
5992 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5993 to reply XML document.
5994
9904185c
JK
59952015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5996 Jan Kratochvil <jan.kratochvil@redhat.com>
5997
5998 * target.c: Include target/target-utils.h and fcntl.h.
5999 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6000 (target_fileio_read_stralloc): New functions.
6001
6e5b4429
JK
60022015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6003
6004 * Makefile.in (OBS): Add gdb_regex.o.
6005 (gdb_regex.o): New.
6006 * config.in: Rebuilt.
6007 * configure: Rebuilt.
6008
ddc98fbf
JK
60092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6010 Jan Kratochvil <jan.kratochvil@redhat.com>
6011
6012 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6013 * Makefile.in (OBS): Add target-utils.o.
6014 (linux-maps.o, target-utils.o): New.
6015 * configure.srv (srv_linux_obj): Add linux-maps.o.
6016
e57bb7a0
PL
60172015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6018
6019 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6020 function, return 1.
6021 (the_low_target): Install it.
6022
586b02a9
PA
60232015-07-14 Pedro Alves <palves@redhat.com>
6024
6025 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6026 Instead, ignore ECHILD, and throw an error for other errnos.
6027
58c1b36c
PA
60282015-07-10 Pedro Alves <palves@redhat.com>
6029
6030 * event-loop.c (struct callback_event) <data>: Change type to
6031 gdb_client_data instance instead of gdb_client_data pointer.
6032 (append_callback_event): Adjust.
6033
421530db
PL
60342015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6035
6036 * linux-aarch64-low.c: Add comments for each linux_target_ops
6037 method. Remove comments already covered in target_ops and
6038 linux_target_ops definitions.
6039 (the_low_target): Add comments for each unimplemented method.
6040
c2d65f38
YQ
60412015-07-09 Yao Qi <yao.qi@linaro.org>
6042
6043 * linux-aarch64-low.c (aarch64_regmap): Remove.
6044 (aarch64_usrregs_info): Remove.
6045 (regs_info): Set field usrregs to NULL.
6046
b20a6524
MM
60472015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6048
6049 * linux-low.c: Include "rsp-low.h"
6050 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6051 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6052 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6053 (handle_btrace_enable_pt): New.
6054 (handle_btrace_general_set): Support "pt".
6055 (handle_btrace_conf_general_set): Support "pt:size".
6056
96c97461
PL
60572015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6058
6059 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6060 Z_PACKET_SW_BP.
6061
37d66942
PL
60622015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6063
6064 * linux-aarch64-low.c: Remove comment about endianness.
6065 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6066 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6067 memcmp.
6068
dc06243f
GB
60692015-06-24 Gary Benson <gbenson@redhat.com>
6070
6071 * linux-i386-ipa.c (stdint.h): Do not include.
6072 * lynx-i386-low.c (stdint.h): Likewise.
6073 * lynx-ppc-low.c (stdint.h): Likewise.
6074 * mem-break.c (stdint.h): Likewise.
6075 * thread-db.c (stdint.h): Likewise.
6076 * tracepoint.c (stdint.h): Likewise.
6077 * win32-low.c (stdint.h): Likewise.
6078
124e13d9
SM
60792015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6080
6081 * server.c (write_qxfer_response): Update call to
6082 remote_escape_output.
6083
909c2cda
JK
60842015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6085 Jan Kratochvil <jan.kratochvil@redhat.com>
6086
6087 Merge multiple hex conversions.
6088 * gdbreplay.c (tohex): Rename to 'fromhex'.
6089 (logchar): Use fromhex.
6090
24c05f46
JK
60912015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6092
6093 * server.c (handle_qxfer_libraries): Set `version' attribute for
6094 <library-list>.
6095
14d2069a
GB
60962015-06-10 Gary Benson <gbenson@redhat.com>
6097
6098 * target.h (struct target_ops) <multifs_open>: New field.
6099 <multifs_unlink>: Likewise.
6100 <multifs_readlink>: Likewise.
6101 * linux-low.c (nat/linux-namespaces.h): New include.
6102 (linux_target_ops): Initialize the_target->multifs_open,
6103 the_target->multifs_unlink and the_target->multifs_readlink.
6104 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6105 * hostio.c (hostio_fs_pid): New static variable.
6106 (hostio_handle_new_gdb_connection): New function.
6107 (handle_setfs): Likewise.
6108 (handle_open): Use the_target->multifs_open as appropriate.
6109 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6110 (handle_readlink): Use the_target->multifs_readlink as
6111 appropriate.
6112 (handle_vFile): Handle vFile:setfs packets.
6113 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6114 after target_handle_new_gdb_connection.
6115
4b8b5e72
GB
61162015-06-10 Gary Benson <gbenson@redhat.com>
6117
6118 * configure.ac (AC_CHECK_FUNCS): Add setns.
6119 * config.in: Regenerate.
6120 * configure: Likewise.
6121 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6122 (linux-namespaces.o): New rule.
6123 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6124
3ac2e371
GB
61252015-06-09 Gary Benson <gbenson@redhat.com>
6126
6127 * hostio.c (handle_open): Process mode argument with
6128 fileio_to_host_mode.
6129
ca9b78ce
YQ
61302015-06-01 Yao Qi <yao.qi@linaro.org>
6131
6132 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6133 * linux-x86-low.c: Likewise.
6134
bfacd19d
DB
61352015-05-28 Don Breazeal <donb@codesourcery.com>
6136
6137 * linux-low.c (handle_extended_wait): Initialize
6138 thread_info.last_resume_kind for new fork children.
6139
452003ef
PA
61402015-05-15 Pedro Alves <palves@redhat.com>
6141
6142 * target.h (target_handle_new_gdb_connection): Rewrite using if
6143 wrapped in do/while.
6144
1041a03c
JB
61452015-05-14 Joel Brobecker <brobecker@adacore.com>
6146
6147 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6148 * configure, config.in: Regenerate.
6149 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6150 Declare typedef.
6151
c269dbdb
DB
61522015-05-12 Don Breazeal <donb@codesourcery.com>
6153
6154 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6155 PTRACE_EVENT_VFORK_DONE.
6156 (linux_low_ptrace_options, extended_event_reported): Add vfork
6157 events.
6158 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6159 and "vforkdone" for RSP 'T' Stop Reply Packet.
6160 * server.h (report_vfork_events): Declare
6161 global variable.
6162
3a8a0396
DB
61632015-05-12 Don Breazeal <donb@codesourcery.com>
6164
6165 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6166 (the_low_target) <new_fork>: Initialize new member.
6167 * linux-arm-low.c (arm_new_fork): New function.
6168 (the_low_target) <new_fork>: Initialize new member.
6169 * linux-low.c (handle_extended_wait): Call new target function
6170 new_fork.
6171 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6172 * linux-mips-low.c (mips_add_watchpoint): New function
6173 extracted from mips_insert_point.
6174 (the_low_target) <new_fork>: Initialize new member.
6175 (mips_linux_new_fork): New function.
6176 (mips_insert_point): Call mips_add_watchpoint.
6177 * linux-x86-low.c (x86_linux_new_fork): New function.
6178 (the_low_target) <new_fork>: Initialize new member.
6179
de0d863e
DB
61802015-05-12 Don Breazeal <donb@codesourcery.com>
6181
6182 * linux-low.c (handle_extended_wait): Implement return value,
6183 rename argument 'event_child' to 'event_lwp', handle
6184 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6185 (linux_low_ptrace_options): New function.
6186 (linux_low_filter_event): Call linux_low_ptrace_options,
6187 use different argument fo linux_enable_event_reporting,
6188 use return value from handle_extended_wait.
6189 (extended_event_reported): New function.
6190 (linux_wait_1): Call extended_event_reported and set
6191 status to report fork events.
6192 (linux_write_memory): Add pid to debug message.
6193 (reset_lwp_ptrace_options_callback): New function.
6194 (linux_handle_new_gdb_connection): New function.
6195 (linux_target_ops): Initialize new structure member.
6196 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6197 * lynx-low.c: Initialize new structure member.
6198 * remote-utils.c (prepare_resume_reply): Implement stop reason
6199 "fork" for "T" stop message.
6200 * server.c (handle_query): Call handle_new_gdb_connection.
6201 * server.h (report_fork_events): Declare global flag.
6202 * target.h (struct target_ops) <handle_new_gdb_connection>:
6203 New member.
6204 (target_handle_new_gdb_connection): New macro.
6205 * win32-low.c: Initialize new structure member.
6206
ddcbc397
DB
62072015-05-12 Don Breazeal <donb@codesourcery.com>
6208
6209 * mem-break.c (APPEND_TO_LIST): Define macro.
6210 (clone_agent_expr): New function.
6211 (clone_one_breakpoint): New function.
6212 (clone_all_breakpoints): New function.
6213 * mem-break.h: Declare new functions.
6214
89245bc0
DB
62152015-05-12 Don Breazeal <donb@codesourcery.com>
6216
6217 * linux-low.c (linux_supports_fork_events): New function.
6218 (linux_supports_vfork_events): New function.
6219 (linux_target_ops): Initialize new structure members.
6220 (initialize_low): Call linux_check_ptrace_features.
6221 * lynx-low.c (lynx_target_ops): Initialize new structure
6222 members.
6223 * server.c (report_fork_events, report_vfork_events):
6224 New global flags.
6225 (handle_query): Add new features to qSupported packet and
6226 response.
6227 (captured_main): Initialize new global variables.
6228 * target.h (struct target_ops) <supports_fork_events>:
6229 New member.
6230 <supports_vfork_events>: New member.
6231 (target_supports_fork_events): New macro.
6232 (target_supports_vfork_events): New macro.
6233 * win32-low.c (win32_target_ops): Initialize new structure
6234 members.
6235
835205d0
GB
62362015-05-12 Gary Benson <gbenson@redhat.com>
6237
6238 * server.c (handle_qxfer_exec_file): Use current process
6239 if annex is empty.
6240
21e94bd9
SL
62412015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6242
6243 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6244 Remove HAVE_PTRACE_GETREGS conditionals.
6245 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6246 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6247
45614f15
YQ
62482015-05-08 Yao Qi <yao.qi@linaro.org>
6249
6250 * linux-low.c (linux_supports_conditional_breakpoints): New
6251 function.
6252 (linux_target_ops): Install new target method.
6253 * lynx-low.c (lynx_target_ops): Install NULL hook for
6254 supports_conditional_breakpoints.
6255 * nto-low.c (nto_target_ops): Likewise.
6256 * spu-low.c (spu_target_ops): Likewise.
6257 * win32-low.c (win32_target_ops): Likewise.
6258 * server.c (handle_query): Check
6259 target_supports_conditional_breakpoints.
6260 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6261 New field.
6262 (target_supports_conditional_breakpoints): New macro.
6263
80ad801e
PA
62642015-05-06 Pedro Alves <palves@redhat.com>
6265
6266 PR server/18081
6267 * server.c (start_inferior): If the process exits, mourn it.
6268
819843c7
GB
62692015-04-21 Gary Benson <gbenson@redhat.com>
6270
6271 * hostio.c (fileio_open_flags_to_host): Factored out to
6272 fileio_to_host_openflags in common/fileio.c. Single use
6273 updated.
6274
a2d5a9d7
MF
62752015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6276
6277 * linux-xtensa-low.c (xtensa_fill_gregset)
6278 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6279 XCHAL_HAVE_LOOP.
6280
deb44829
MF
62812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6282
6283 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6284 (regs_info): Replace usrregs pointer with NULL.
6285
e57f1de3
GB
62862015-04-17 Gary Benson <gbenson@redhat.com>
6287
6288 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6289 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6290 * server.c (handle_qxfer_exec_file): New function.
6291 (qxfer_packets): Add exec-file entry.
6292 (handle_query): Report qXfer:exec-file:read as supported packet.
6293
62828379
RN
62942015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6295
6296 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6297
b88bb450
GB
62982015-04-09 Gary Benson <gbenson@redhat.com>
6299
6300 * hostio-errno.c (errno_to_fileio_error): Remove function.
6301 Update caller to use remote_fileio_to_fio_error.
6302
c8f4bfdd
YQ
63032015-04-09 Yao Qi <yao.qi@linaro.org>
6304
6305 * linux-low.c (linux_insert_point): Call
6306 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6307 (linux_remove_point): Call remove_memory_breakpoint if type is
6308 raw_bkpt_type_sw.
6309 * linux-x86-low.c (x86_insert_point): Don't call
6310 insert_memory_breakpoint.
6311 (x86_remove_point): Don't call remove_memory_breakpoint.
6312
41f98f02
PA
63132015-04-01 Pedro Alves <palves@redhat.com>
6314 Cleber Rosa <crosa@redhat.com>
6315
6316 * server.c (gdbserver_usage): Reorganize and extend the usage
6317 message.
6318
2bf6fb9d
PA
63192015-03-24 Pedro Alves <palves@redhat.com>
6320
6321 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6322 output. Also dump TRAP_TRACE.
6323 (linux_low_filter_event): In debug output, distinguish a
6324 resume_stop SIGSTOP from a delayed SIGSTOP.
6325
369f6daa
GB
63262015-03-24 Gary Benson <gbenson@redhat.com>
6327
6328 * linux-x86-low.c (x86_linux_new_thread): Moved to
6329 nat/x86-linux.c.
6330 (x86_linux_prepare_to_resume): Likewise.
6331
8e5d4070
GB
63322015-03-24 Gary Benson <gbenson@redhat.com>
6333
6334 * Makefile.in (x86-linux-dregs.o): New rule.
6335 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6336 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6337 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6338 (x86_linux_dr_get): Likewise.
6339 (x86_linux_dr_set): Likewise.
6340 (update_debug_registers_callback): Likewise.
6341 (x86_linux_dr_set_addr): Likewise.
6342 (x86_linux_dr_get_addr): Likewise.
6343 (x86_linux_dr_set_control): Likewise.
6344 (x86_linux_dr_get_control): Likewise.
6345 (x86_linux_dr_get_status): Likewise.
6346 (x86_linux_update_debug_registers): Likewise.
6347
2b95d440
GB
63482015-03-24 Gary Benson <gbenson@redhat.com>
6349
6350 * linux-x86-low.c (x86_linux_update_debug_registers):
6351 New function, factored out from...
6352 (x86_linux_prepare_to_resume): ...this.
6353
14b0bc68
GB
63542015-03-24 Gary Benson <gbenson@redhat.com>
6355
6356 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6357 (x86_linux_dr_set): Likewise.
6358 (update_debug_registers_callback): Likewise.
6359 (x86_linux_dr_set_addr): Likewise.
6360 (x86_linux_dr_get_addr): Likewise.
6361 (x86_linux_dr_set_control): Likewise.
6362 (x86_linux_dr_get_control): Likewise.
6363 (x86_linux_dr_get_status): Likewise.
6364 (x86_linux_prepare_to_resume): Likewise.
6365
5dfe6ca8
GB
63662015-03-24 Gary Benson <gbenson@redhat.com>
6367
6368 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6369 Use perror_with_name. Pass string through gettext.
6370 (x86_linux_dr_set): Likewise.
6371
d33472ad
GB
63722015-03-24 Gary Benson <gbenson@redhat.com>
6373
6374 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6375 (x86_linux_dr_set_addr): ...this.
6376 (x86_dr_low_get_addr): Rename to...
6377 (x86_linux_dr_get_addr): ...this.
6378 (x86_dr_low_set_control): Rename to...
6379 (x86_linux_dr_set_control): ...this.
6380 (x86_dr_low_get_control): Rename to...
6381 (x86_linux_dr_get_control): ...this.
6382 (x86_dr_low_get_status): Rename to...
6383 (x86_linux_dr_get_status): ...this.
6384 (x86_dr_low): Update with new function names.
6385
4b134ca1
GB
63862015-03-24 Gary Benson <gbenson@redhat.com>
6387
6388 * Makefile.in (x86-linux.o): New rule.
6389 * configure.srv: Add x86-linux.o to relevant targets.
6390 * linux-low.c (lwp_set_arch_private_info): New function.
6391 (lwp_arch_private_info): Likewise.
6392 * linux-x86-low.c: Include nat/x86-linux.h.
6393 (arch_lwp_info): Removed structure.
6394 (update_debug_registers_callback):
6395 Use lwp_set_debug_registers_changed.
6396 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6397 and lwp_set_debug_registers_changed.
6398 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6399
34c703da
GB
64002015-03-24 Gary Benson <gbenson@redhat.com>
6401
6402 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6403 * linux-arm-low.c (arm_new_thread): Likewise.
6404 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6405 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6406 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6407 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6408
cff068da
GB
64092015-03-24 Gary Benson <gbenson@redhat.com>
6410
6411 * linux-low.c (ptid_of_lwp): New function.
6412 (lwp_is_stopped): Likewise.
6413 (lwp_stop_reason): Likewise.
6414 * linux-x86-low.c (update_debug_registers_callback):
6415 Use lwp_is_stopped.
6416 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6417 lwp_stop_reason.
6418
b2f7c7e8
GB
64192015-03-24 Gary Benson <gbenson@redhat.com>
6420
6421 * linux-low.h (linux_stop_lwp): Remove declaration.
6422
6d4ee8c6
GB
64232015-03-24 Gary Benson <gbenson@redhat.com>
6424
6425 * linux-low.h: Include nat/linux-nat.h.
6426 * linux-low.c (iterate_over_lwps_args): New structure.
6427 (iterate_over_lwps_filter): New function.
6428 (iterate_over_lwps): Likewise.
6429 * linux-x86-low.c (update_debug_registers_callback):
6430 Update signature to what iterate_over_lwps expects.
6431 Remove PID check that iterate_over_lwps now performs.
6432 (x86_dr_low_set_addr): Use iterate_over_lwps.
6433 (x86_dr_low_set_control): Likewise.
6434
70a0bb6b
GB
64352015-03-24 Gary Benson <gbenson@redhat.com>
6436
6437 * linux-x86-low.c (x86_debug_reg_state): New function.
6438 (x86_linux_prepare_to_resume): Use the above.
6439
7b669087
GB
64402015-03-24 Gary Benson <gbenson@redhat.com>
6441
6442 * linux-low.c (current_lwp_ptid): New function.
6443 * linux-x86-low.c: Include nat/linux-nat.h.
6444 (x86_dr_low_get_addr): Use current_lwp_ptid.
6445 (x86_dr_low_get_control): Likewise.
6446 (x86_dr_low_get_status): Likewise.
6447
eef49a3d
PA
64482015-03-20 Pedro Alves <palves@redhat.com>
6449
6450 * tracepoint.c (cmd_qtstatus): Make "str" const.
6451
b2333d22
PA
64522015-03-20 Pedro Alves <palves@redhat.com>
6453
6454 * server.c (handle_general_set): Make "req_str" const.
6455
23f238d3
PA
64562015-03-19 Pedro Alves <palves@redhat.com>
6457
6458 * linux-low.c (linux_resume_one_lwp): Rename to ...
6459 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6460 instead call perror_with_name.
6461 (check_ptrace_stopped_lwp_gone): New function.
6462 (linux_resume_one_lwp): Reimplement as wrapper around
6463 linux_resume_one_lwp_throw that swallows errors if the LWP is
6464 gone.
6465
91baf43f
PA
64662015-03-19 Pedro Alves <palves@redhat.com>
6467
6468 * linux-low.c (count_events_callback, select_event_lwp_callback):
6469 No longer check whether the thread has resume_stop as last resume
6470 kind.
6471
8bf3b159
PA
64722015-03-19 Pedro Alves <palves@redhat.com>
6473
6474 * linux-low.c (count_events_callback, select_event_lwp_callback):
6475 Use the lwp's status_pending_p field, not the thread's.
6476
b90fc188
PA
64772015-03-19 Pedro Alves <palves@redhat.com>
6478
6479 * linux-low.c (select_event_lwp_callback): Update comments to
6480 no longer mention SIGTRAP.
6481
464b0089
GB
64822015-03-18 Gary Benson <gbenson@redhat.com>
6483
6484 * server.c (handle_query): Do not report vFile:fstat as supported.
6485
aa9e327f
GB
64862015-03-11 Gary Benson <gbenson@redhat.com>
6487
6488 * hostio.c (sys/types.h): New include.
6489 (sys/stat.h): Likewise.
6490 (common-remote-fileio.h): Likewise.
6491 (handle_fstat): New function.
6492 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6493
791c0056
GB
64942015-03-11 Gary Benson <gbenson@redhat.com>
6495
6496 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6497 struct stat.st_blocks and struct stat.st_blksize.
6498 * configure: Regenerate.
6499 * config.in: Likewise.
6500 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6501 (OBS): Add common-remote-fileio.o.
6502 (common-remote-fileio.o): New rule.
6503
9a9df970
PA
65042015-03-09 Pedro Alves <palves@redhat.com>
6505
6506 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6507 'struct sockaddr' pointer in 'accept' call.
6508
9eb1356e
PA
65092015-03-09 Pedro Alves <palves@redhat.com>
6510
6511 Revert:
6512 2015-03-07 Pedro Alves <palves@redhat.com>
6513 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6514 or <winsock2.h> here. Instead include "gdb_socket.h".
6515 (remote_open): Use union gdb_sockaddr_u.
6516 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6517 or <winsock2.h> here. Instead include "gdb_socket.h".
6518 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6519 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6520 or <sys/un.h>.
6521 (init_named_socket, gdb_agent_helper_thread): Use union
6522 gdb_sockaddr_u.
6523
aac331e4
PA
65242015-03-07 Pedro Alves <palves@redhat.com>
6525
6526 * configure.ac (build_warnings): Move
6527 -Wdeclaration-after-statement to the C-specific set.
6528 * configure: Regenerate.
6529
366c75fc
PA
65302015-03-07 Pedro Alves <palves@redhat.com>
6531
6532 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6533 or <winsock2.h> here. Instead include "gdb_socket.h".
6534 (remote_open): Use union gdb_sockaddr_u.
6535 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6536 or <winsock2.h> here. Instead include "gdb_socket.h".
6537 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6538 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6539 or <sys/un.h>.
6540 (init_named_socket, gdb_agent_helper_thread): Use union
6541 gdb_sockaddr_u.
6542
492d29ea
PA
65432015-03-07 Pedro Alves <palves@redhat.com>
6544
6545 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6546 instead.
6547
60a191ed
YQ
65482015-03-06 Yao Qi <yao.qi@linaro.org>
6549
6550 * linux-aarch64-low.c (aarch64_insert_point): Use
6551 show_debug_regs as a boolean.
6552 (aarch64_remove_point): Likewise.
6553
f5771b1d
PA
65542015-03-05 Pedro Alves <palves@redhat.com>
6555
6556 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6557 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6558 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6559 * nto-low.c (nto_target_ops): Likewise.
6560 * spu-low.c (spu_target_ops): Likewise.
6561 * win32-low.c (win32_target_ops): Likewise.
6562
3e572f71
PA
65632015-03-04 Pedro Alves <palves@redhat.com>
6564
72f4393d 6565 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6566 Decide whether a breakpoint triggered based on the SIGTRAP's
6567 siginfo.si_code.
72f4393d
L
6568 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6569 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6570 (linux_low_filter_event): Check for breakpoints before checking
6571 watchpoints.
6572 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6573 siginfo.si_code.
72f4393d
L
6574 (linux_stopped_by_sw_breakpoint)
6575 (linux_supports_stopped_by_sw_breakpoint)
6576 (linux_stopped_by_hw_breakpoint)
6577 (linux_supports_stopped_by_hw_breakpoint): New functions.
6578 (linux_target_ops): Install new target methods.
3e572f71 6579
1ec68e26
PA
65802015-03-04 Pedro Alves <palves@redhat.com>
6581
6582 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6583 * server.c (swbreak_feature, hwbreak_feature): New globals.
6584 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6585 (captured_main): Clear swbreak_feature and hwbreak_feature.
6586 * server.h (swbreak_feature, hwbreak_feature): Declare.
6587 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6588 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6589 supports_stopped_by_hw_breakpoint>: New fields.
6590 (target_supports_stopped_by_sw_breakpoint)
6591 (target_stopped_by_sw_breakpoint)
6592 (target_supports_stopped_by_hw_breakpoint)
6593 (target_stopped_by_hw_breakpoint): Declare.
6594
15c66dd6
PA
65952015-03-04 Pedro Alves <palves@redhat.com>
6596
6597 enum lwp_stop_reason -> enum target_stop_reason
6598 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6599 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6600 (linux_wait_1, stuck_in_jump_pad_callback)
6601 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6602 (linux_stopped_by_watchpoint):
6603 * linux-low.h (enum lwp_stop_reason): Delete.
6604 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6605 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6606
98fc70d6
YQ
66072015-03-04 Yao Qi <yao.qi@linaro.org>
6608
6609 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6610
dd2ac174
GB
66112015-03-03 Gary Benson <gbenson@redhat.com>
6612
6613 * hostio.c (handle_vFile): Fix prefix lengths.
6614
d68e53f4
MM
66152015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6616
6617 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6618 ptr_bits.
6619
bf2d68ab
AA
66202015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6621
6622 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6623 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6624 (clean): Add "rm -f" for above C files.
6625 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6626 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6627 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6628 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6629 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6630 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6631 (init_registers_s390x_vx_linux64)
6632 (init_registers_s390x_tevx_linux64)
6633 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6634 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6635 declarations.
6636 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6637 (s390_store_vxrs_high): New functions.
6638 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6639 NT_S390_VXRS_HIGH.
6640 (s390_arch_setup): Add logic for selecting one of the new target
6641 descriptions. Activate the new vector regsets if applicable.
6642 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6643 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6644 and init_registers_s390x_tevx_linux64.
6645
c966a859
PA
66462015-03-01 Pedro Alves <palves@redhat.com>
6647
6648 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6649 parameter.
6650
4180215b
PA
66512015-02-27 Pedro Alves <palves@redhat.com>
6652
6653 * linux-x86-low.c (u_debugreg_offset): New function.
6654 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6655
749bab01
PA
66562015-02-27 Pedro Alves <palves@redhat.com>
6657
6658 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6659 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6660 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6661 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6662 (ps_lsetfpregs, ps_getpid)
6663 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6664 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6665 (ps_lsetxregs, ps_plog): Declare.
6666
3c14e5a3
PA
66672015-02-27 Pedro Alves <palves@redhat.com>
6668
6669 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6670 IP_AGENT_EXPORT_FUNC.
6671 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6672 IP_AGENT_EXPORT_FUNC.
6673 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6674 (IP_AGENT_EXPORT): Delete.
6675 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6676 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6677 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6678 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6679 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6680 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6681 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6682 (traceframe_read_count, traceframe_write_count)
6683 (traceframes_created, trace_state_variables, get_raw_reg)
6684 (get_trace_state_variable_value, set_trace_state_variable_value)
6685 (ust_loaded, helper_thread_id, cmd_buf): Use
6686 IPA_SYM_EXPORTED_NAME.
6687 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6688 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6689 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6690 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6691 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6692 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6693 EXTERN_C_PUSH/EXTERN_C_POP.
6694 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6695 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6696 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6697 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6698 (traceframe_write_count, traceframe_read_count)
6699 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6700 (about_to_request_buffer_space, get_trace_state_variable_value)
6701 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6702 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6703 EXTERN_C_PUSH/EXTERN_C_POP.
6704 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6705 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6706 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6707 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6708 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6709 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6710 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6711 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6712 Define.
6713 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6714 (IP_AGENT_EXPORT_VAR_DECL): Define.
6715 (tracing): Declare.
6716 (gdb_agent_get_raw_reg): Declare.
6717
fe978cb0
PA
67182015-02-27 Tom Tromey <tromey@redhat.com>
6719 Pedro Alves <palves@redhat.com>
6720
6721 Rename symbols whose names are reserved C++ keywords throughout.
6722
3bc3d82a
PA
67232015-02-27 Pedro Alves <palves@redhat.com>
6724
6725 * Makefile.in (COMPILER): New, get it from autoconf.
6726 (CXX): Get from autoconf instead.
6727 (COMPILE.pre): Use COMPILER.
6728 (CC-LD): Rename to ...
6729 (CC_LD): ... this. Use COMPILER.
6730 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6731 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6732 * acinclude.m4: Include build-with-cxx.m4.
6733 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6734 Disable -Werror by default if building in C++ mode.
6735 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6736 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6737 the C++ compiler. Save/restore CXXFLAGS too.
6738 * configure: Regenerate.
6739
07697489
PA
67402015-02-27 Pedro Alves <palves@redhat.com>
6741
6742 * acinclude.m4: Include libiberty.m4.
6743 * configure.ac: Call libiberty_INIT.
6744 * config.in, configure: Regenerate.
6745
9beb7c4e
PA
67462015-02-26 Pedro Alves <palves@redhat.com>
6747
6748 * linux-low.c (linux_wait_1): When incrementing the PC past a
6749 program breakpoint always use the_low_target.breakpoint_len as
6750 increment, rather than the maximum between that and
6751 the_low_target.decr_pc_after_break.
6752
8090aef2
PA
67532015-02-23 Pedro Alves <palves@redhat.com>
6754
6755 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6756 thread was doing a step-over; always adjust the PC if
6757 we stepped over a permanent breakpoint.
6758 (linux_wait_1): If we stepped over breakpoint that was on top of a
6759 permanent breakpoint, manually advance the PC past it.
6760
bc9540e8
PA
67612015-02-23 Pedro Alves <palves@redhat.com>
6762
6763 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6764 modes.
6765 (x86_fill_gregset, x86_store_gregset): Use it when handling
6766 $orig_eax.
6767
2db9a427
PA
67682015-02-20 Pedro Alves <palves@redhat.com>
6769
6770 * thread-db.c: Include "nat/linux-procfs.h".
6771 (thread_db_init): Skip listing new threads if the kernel supports
6772 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6773
afa8d396
PA
67742015-02-20 Pedro Alves <palves@redhat.com>
6775
6776 * linux-low.c (status_pending_p_callback): Use ptid_match.
6777
c9587f88
AT
67782015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6779
6780 PR breakpoints/16812
6781 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6782 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6783 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6784
b05ec7a5
AT
67852015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6786
6787 PR breakpoints/15956
6788 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6789
d33501a5
MM
67902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6791
6792 * linux-low.c (linux_low_btrace_conf): Print size.
6793 * server.c (handle_btrace_conf_general_set): New.
6794 (hanle_general_set): Call handle_btrace_conf_general_set.
6795 (handle_query): Report Qbtrace-conf:bts:size as supported.
6796
f4abbc16
MM
67972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6798
6799 * linux-low.c (linux_low_enable_btrace): Update parameters.
6800 (linux_low_btrace_conf): New.
6801 (linux_target_ops)<to_btrace_conf>: Initialize.
6802 * server.c (current_btrace_conf): New.
6803 (handle_btrace_enable): Rename to ...
6804 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6805 to target_enable_btrace. Update comment. Update users.
6806 (handle_qxfer_btrace_conf): New.
6807 (qxfer_packets): Add btrace-conf entry.
6808 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6809 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6810 (target_ops)<read_btrace_conf>: New.
6811 (target_enable_btrace): Update parameters.
6812 (target_read_btrace_conf): New.
6813
043c3577
MM
68142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6815
6816 * server.c (handle_btrace_general_set): Remove call to
6817 target_supports_btrace.
6818 (supported_btrace_packets): New.
6819 (handle_query): Call supported_btrace_packets.
6820 * target.h: include btrace-common.h.
6821 (btrace_target_info): Removed.
6822 (supports_btrace, target_supports_btrace): Update parameters.
6823
734b0e4b
MM
68242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6825
6826 * Makefile.in (SFILES): Add common/btrace-common.c.
6827 (OBS): Add common/btrace-common.o.
6828 (btrace-common.o): Add build rules.
6829 * linux-low: Include btrace-common.h.
6830 (linux_low_read_btrace): Use struct btrace_data. Call
6831 btrace_data_init and btrace_data_fini.
6832
d6c146e9
PA
68332015-02-06 Pedro Alves <palves@redhat.com>
6834
6835 * thread-db.c (find_new_threads_callback): Add debug output.
6836
20ba1ce6
PA
68372015-02-04 Pedro Alves <palves@redhat.com>
6838
6839 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6840 (resume_stopped_resumed_lwps): New function.
6841 (linux_wait_for_event_filtered): Use it.
6842
8cc73a39
SDJ
68432015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6844
6845 * Makefile.in (SFILES): Add linux-personality.c.
6846 (linux-personality.o): New rule.
6847 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6848 list of objects to be built.
6849 * linux-low.c: Include nat/linux-personality.h.
6850 (linux_create_inferior): Remove code to disable address space
6851 randomization (moved to ../nat/linux-personality.c). Create
6852 cleanup to disable address space randomization.
6853
fb23d554
SDJ
68542015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6855
6856 * Makefile.in (posix-strerror.o): New rule.
6857 (mingw-strerror.o): Likewise.
6858 * configure: Regenerated.
6859 * configure.ac: Source file ../common/common.host. Initialize new
6860 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6861
cdf43629
YQ
68622015-01-14 Yao Qi <yao@codesourcery.com>
6863
6864 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6865 (ppc-linux.o): New rule.
6866 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6867 * configure.ac: AC_CHECK_FUNCS(getauxval).
6868 * config.in: Re-generated.
6869 * configure: Re-generated.
6870 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6871 ppc64_64bit_inferior_p
6872
514c5338
YQ
68732015-01-14 Yao Qi <yao@codesourcery.com>
6874
6875 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6876 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6877 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6878 (PT_ORIG_R3, PT_TRAP): Likewise.
6879 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6880 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6881 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6882
3368c1e5
JB
68832015-01-10 Joel Brobecker <brobecker@adacore.com>
6884
6885 * i387-fp.c (i387_cache_to_xsave): In look over
6886 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6887 zmmh_low_space field by use of zmmh_high_space.
6888
582511be
PA
68892015-01-09 Pedro Alves <palves@redhat.com>
6890
6891 * linux-low.c (step_over_bkpt): Move higher up in the file.
6892 (handle_extended_wait): Don't store the stop_pc here.
6893 (get_stop_pc): Adjust comments and rename to ...
6894 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6895 stopped for a software breakpoint or hardware breakpoint.
6896 (thread_still_has_status_pending_p): New function.
6897 (status_pending_p_callback): Use
6898 thread_still_has_status_pending_p. If the event is no longer
6899 interesting, resume the LWP.
6900 (handle_tracepoints): Add assert.
6901 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6902 (wstatus_maybe_breakpoint): New function.
6903 (cancel_breakpoint): Delete function.
6904 (check_stopped_by_watchpoint): New function, factored out from
6905 linux_low_filter_event.
6906 (lp_status_maybe_breakpoint): Delete function.
6907 (linux_low_filter_event): Remove filter_ptid argument.
6908 Leave thread group exits pending here. Store the LWP's stop PC.
6909 Always leave events pending.
6910 (linux_wait_for_event_filtered): Pull all events out of the
6911 kernel, and leave them all pending.
6912 (count_events_callback, select_event_lwp_callback): Consider all
6913 events.
6914 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6915 (select_event_lwp): Only give preference to the stepping LWP in
6916 all-stop mode. Adjust comments.
6917 (ignore_event): New function.
6918 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6919 references to cancel_breakpoints. Adjust to renames. Also give
6920 equal priority to all LWPs that have had events in non-stop mode.
6921 If reporting a software breakpoint event, unadjust the LWP's PC.
6922 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6923 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6924 Adjust.
6925 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6926 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6927 (linux_stopped_by_watchpoint): Adjust.
6928 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6929 * linux-low.h (enum lwp_stop_reason): New.
6930 (struct lwp_info) <stop_pc>: Adjust comment.
6931 <stopped_by_watchpoint>: Delete field.
6932 <stop_reason>: New field.
6933 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6934 * mem-break.c (software_breakpoint_inserted_here)
6935 (hardware_breakpoint_inserted_here): New function.
6936 * mem-break.h (software_breakpoint_inserted_here)
6937 (hardware_breakpoint_inserted_here): Declare.
6938 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6939 (cancel_breakpoints): Delete.
6940 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6941 (upload_fast_traceframes): Remove references to
6942 cancel_breakpoints.
6943
a33e3959
PA
69442015-01-09 Pedro Alves <palves@redhat.com>
6945
6946 * thread-db.c (find_new_threads_callback): Ignore thread if the
6947 kernel thread ID is -1.
6948
8784d563
PA
69492015-01-09 Pedro Alves <palves@redhat.com>
6950
6951 * linux-low.c (linux_attach_fail_reason_string): Move to
6952 nat/linux-ptrace.c, and rename.
6953 (linux_attach_lwp): Update comment.
6954 (attach_proc_task_lwp_callback): New function.
6955 (linux_attach): Adjust to rename and use
6956 linux_proc_attach_tgid_threads.
6957 (linux_attach_fail_reason_string): Delete declaration.
6958
76f2b779
JB
69592015-01-01 Joel Brobecker <brobecker@adacore.com>
6960
6961 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6962 * server.c (gdbserver_version): Likewise.
6963
fafcc06a
SDJ
69642014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6965
6966 * remote-utils.c: Include ctype.h.
6967 (input_interrupt): Explicitly handle the case when the char
6968 received is the NUL byte. Improve the printing of non-ASCII
6969 characters.
6970
beed38b8
JB
69712014-12-16 Joel Brobecker <brobecker@adacore.com>
6972
6973 * linux-low.c (linux_low_filter_event): Update call to
6974 linux_enable_event_reporting following the addition of
6975 a new parameter to that function.
6976
bf330350
CU
69772014-12-16 Catalin Udma <catalin.udma@freescale.com>
6978
6979 PR server/17457
6980 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6981 (AARCH64_FPCR_REGNO): Likewise.
6982 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6983 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6984 (aarch64_store_fpregset): Likewise.
6985
5227d625
JB
69862014-12-15 Joel Brobecker <brobecker@adacore.com>
6987
6988 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6989 Remove FIXME comment about assumption about N.
6990
f93b65a0
JB
69912014-12-13 Joel Brobecker <brobecker@adacore.com>
6992
6993 * configure.ac: If large-file support is disabled in GDBserver,
6994 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6995 * configure: Regenerate.
6996
e5a9158d
AA
69972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6998
6999 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7000 warning upon ENODATA from ptrace.
7001 * linux-s390-low.c (s390_store_tdb): New.
7002 (s390_regsets): Add regset for NT_S390_TDB.
7003
feea5f36
AA
70042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7005
7006 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7007 without a fill_function.
7008 * linux-s390-low.c (s390_fill_last_break): Remove.
7009 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7010 (s390_arch_setup): Use regset's size instead of fill_function for
7011 loop end condition.
7012
098dbe61
AA
70132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7014
7015 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7016 the regset's store function when ptrace returned an error.
7017 * regcache.c (get_thread_regcache): Invalidate register cache
7018 before fetching inferior's registers.
7019
28eef672
AA
70202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7021
7022 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7023 while-loop as for-loop.
7024 (regsets_store_inferior_registers): Likewise.
7025
bdca27a2
YQ
70262014-11-28 Yao Qi <yao@codesourcery.com>
7027
7028 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7029 * config.in, configure: Re-generate.
7030 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7031 is defined.
7032
9c232dda
YQ
70332014-11-21 Yao Qi <yao@codesourcery.com>
7034
7035 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7036 (AC_CHECK_HEADERS): Remove malloc.h.
7037 * configure: Re-generated.
7038 * config.in: Re-generated.
7039 * server.h: Don't include alloca.h and malloc.h.
7040 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7041 Don't include malloc.h.
7042
43968415
JB
70432014-11-17 Joel Brobecker <brobecker@adacore.com>
7044
7045 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7046 corresponding ERRNO check in same block.
7047
40e91bc7
PA
70482014-11-12 Pedro Alves <palves@redhat.com>
7049
7050 * server.c (cont_thread): Update comment.
7051 (start_inferior, attach_inferior): No longer clear cont_thread.
7052 (handle_v_cont): No longer set cont_thread.
7053 (captured_main): Clear cont_thread each time a GDB connects.
7054
c2c118cf
PA
70552014-11-12 Pedro Alves <palves@redhat.com>
7056
7057 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7058 thread, and don't resume all threads if the Hc thread has exited.
7059
78708b7c
PA
70602014-11-12 Pedro Alves <palves@redhat.com>
7061
7062 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7063 the process group instead of to a specific LWP.
7064
a2abc7de
PA
70652014-10-15 Pedro Alves <palves@redhat.com>
7066
7067 PR server/17487
7068 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7069 parameter.
7070 (arm_set_thread_context): Delete.
7071 (the_low_target): Adjust.
7072 * win32-i386-low.c (debug_registers_changed)
7073 (debug_registers_used): Delete.
7074 (update_debug_registers_callback): New function.
7075 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7076 needing to update their debug registers.
7077 (win32_get_current_dr): New function.
7078 (x86_dr_low_get_addr, x86_dr_low_get_control)
7079 (x86_dr_low_get_status): Fetch the debug register from the thread
7080 record's context.
7081 (i386_initial_stuff): Adjust.
7082 (i386_get_thread_context): Remove current_event parameter. Don't
7083 clear debug_registers_changed nor copy DR values to
7084 debug_reg_state.
7085 (i386_set_thread_context): Delete.
7086 (i386_prepare_to_resume): New function.
7087 (i386_thread_added): Mark the thread as needing to update irs
7088 debug registers.
7089 (the_low_target): Remove i386_set_thread_context and install
7090 i386_prepare_to_resume.
7091 * win32-low.c (win32_get_thread_context): Adjust.
7092 (win32_set_thread_context): Use SetThreadContext
7093 directly.
7094 (win32_prepare_to_resume): New function.
7095 (win32_require_context): New function, factored out from ...
7096 (thread_rec): ... this.
7097 (continue_one_thread): Call win32_prepare_to_resume on each thread
7098 we're about to continue.
7099 (win32_resume): Call win32_prepare_to_resume on the event thread.
7100 * win32-low.h (struct win32_thread_info)
7101 <debug_registers_changed>: New field.
7102 (struct win32_target_ops): Change prototype of set_thread_context,
7103 delete set_thread_context and add prepare_to_resume.
7104 (win32_require_context): New declaration.
7105
a442d071
GB
71062014-10-08 Gary Benson <gbenson@redhat.com>
7107
7108 * server.h: Do not include common-exceptions.h.
7109
6f1947e8
GB
71102014-10-08 Gary Benson <gbenson@redhat.com>
7111
7112 * server.h: Do not include cleanups.h.
7113
63b434a4
JH
71142014-09-30 James Hogan <james.hogan@imgtec.com>
7115
7116 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7117 mips64-dsp-linux.c.
7118
c4d9ceb6
YQ
71192014-09-23 Yao Qi <yao@codesourcery.com>
7120
7121 * linux-low.c (lp_status_maybe_breakpoint): New function.
7122 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7123 (count_events_callback): Likewise.
7124 (select_event_lwp_callback): Likewise.
7125 (cancel_breakpoints_callback): Likewise.
7126
89a5711c
DB
71272014-09-19 Don Breazeal <donb@codesourcery.com>
7128
7129 * linux-low.c (handle_extended_wait): Call
7130 linux_ptrace_get_extended_event.
7131 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7132 linux_is_extended_waitstatus.
7133
bffc0964
JB
71342014-09-16 Joel Brobecker <brobecker@adacore.com>
7135
7136 * Makefile.in (CPPFLAGS): Define.
7137 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7138 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7139
0bfdf32f
GB
71402014-09-16 Gary Benson <gbenson@redhat.com>
7141
7142 * inferiors.h (current_inferior): Renamed as...
7143 (current_thread): New variable. All uses updated.
7144 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7145 (maybe_move_out_of_jump_pad): Likewise.
7146 (cancel_breakpoint): Likewise.
7147 (linux_low_filter_event): Likewise.
7148 (wait_for_sigstop): Likewise.
7149 (linux_resume_one_lwp): Likewise.
7150 (need_step_over_p): Likewise.
7151 (start_step_over): Likewise.
7152 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7153 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7154 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7155 and save_inferior as saved_thread.
7156 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7157 saved_thread.
7158 (regcache_invalidate_thread): Likewise.
7159 * remote-utils.c (prepare_resume_reply): Likewise.
7160 * thread-db.c (thread_db_get_tls_address): Likewise.
7161 (disable_thread_event_reporting): Likewise.
7162 (remove_thread_event_breakpoints): Likewise.
7163 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7164 as saved_thread.
7165 * target.h (set_desired_inferior): Renamed as...
7166 (set_desired_thread): New declaration. All uses updated.
7167 * server.c (myresume): Updated comment to reference thread instead
7168 of inferior.
7169 (handle_serial_event): Likewise.
7170 (handle_target_event): Likewise.
7171
361c8ade
GB
71722014-09-12 Tom Tromey <tromey@redhat.com>
7173 Gary Benson <gbenson@redhat.com>
7174
7175 * regcache.h: Include common-regcache.h.
7176 (regcache_read_pc): Don't declare.
7177 * regcache.c (get_thread_regcache_for_ptid): New function.
7178
bd9269f7
GB
71792014-09-11 Tom Tromey <tromey@redhat.com>
7180 Gary Benson <gbenson@redhat.com>
7181
7182 * symbol.c: New file.
7183 * Makefile.in (SFILES): Add symbol.c.
7184 (OBS): Add symbol.o.
7185
f8c1d06b
GB
71862014-09-11 Gary Benson <gbenson@redhat.com>
7187
7188 * target.c (target_stop_ptid, target_continue_ptid): New
7189 functions.
7190
721ec300
GB
71912014-09-11 Tom Tromey <tromey@redhat.com>
7192 Gary Benson <gbenson@redhat.com>
7193
7194 * target.h: Include target/target.h.
7195 * target.c (target_read_memory, target_read_uint32)
7196 (target_write_memory): New functions.
7197
c5e92cca
GB
71982014-09-11 Gary Benson <gbenson@redhat.com>
7199
7200 * server.h (debug_hw_points): Don't declare.
7201 * server.c (debug_hw_points): Don't define. Replace all uses
7202 with show_debug_regs.
7203 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7204 all uses with show_debug_regs.
7205
2e4bb98a
EBM
72062014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7207
7208 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7209 endianness into account.
7210 (ppc_supply_ptrace_register): Likewise.
7211
ac740bc7
JH
72122014-09-03 James Hogan <james.hogan@imgtec.com>
7213
7214 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7215 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7216
97ea6506
GB
72172014-09-03 Gary Benson <gbenson@redhat.com>
7218
7219 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7220 ALL_DEBUG_ADDRESS_REGISTERS.
7221
df7e5265
GB
72222014-09-02 Gary Benson <gbenson@redhat.com>
7223
7224 * i386-low.h: Renamed as...
7225 * x86-low.h: New file. All type, function and variable name
7226 prefixes changed from "i386_" to "x86_". All references updated.
7227 * i386-low.c: Renamed as...
7228 * x86-low.c: New file. All type, function and variable name
7229 prefixes changed from "i386_" to "x86_". All references updated.
7230
ed859da7
GB
72312014-09-02 Gary Benson <gbenson@redhat.com>
7232
7233 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7234 (x86_linux_new_thread): Likewise.
7235
860789c7
GB
72362014-08-29 Gary Benson <gbenson@redhat.com>
7237
7238 * server.h (setjmp.h): Do not include.
7239 (toplevel): Do not declare.
7240 (common-exceptions.h): Include.
7241 (cleanups.h): Likewise.
7242 * server.c (toplevel): Do not define.
7243 (exit_code): New static global.
7244 (detach_or_kill_for_exit_cleanup): New function.
7245 (main): New function. Original main renamed to...
7246 (captured_main): New function.
7247 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7248
ff55e1b5
GB
72492014-08-29 Gary Benson <gbenson@redhat.com>
7250
7251 * Makefile.in (SFILES): Add common/common-exceptions.c.
7252 (OBS): Add common-exceptions.o.
7253 (common-exceptions.o): New rule.
7254 * utils.c (prepare_to_throw_exception): New function.
7255
e9bcb658
GB
72562014-08-29 Gary Benson <gbenson@redhat.com>
7257
7258 * config.in: Regenerate.
7259 * configure: Likewise.
7260
e3180625
GB
72612014-08-29 Gary Benson <gbenson@redhat.com>
7262
7263 * Makefile.in (SFILES): Add common/cleanups.c.
7264 (OBS): cleanups.o.
7265 (cleanups.o): New rule.
7266
e3d6ba5d
GB
72672014-08-29 Gary Benson <gbenson@redhat.com>
7268
7269 * utils.c (internal_vwarning): New function.
7270
7096e886
GB
72712014-08-28 Gary Benson <gbenson@redhat.com>
7272
7273 * utils.h (fatal): Remove declaration.
7274 * utils.c (fatal): Remove function.
7275
14ce3192
GB
72762014-08-28 Gary Benson <gbenson@redhat.com>
7277
7278 * tracepoint.c (gdb_agent_init): Replace fatal with
7279 perror_with_name.
7280 (initialize_tracepoint): Likewise.
7281
50278d59
GB
72822014-08-28 Gary Benson <gbenson@redhat.com>
7283
7284 * remote-utils.c (remote_prepare): Replace fatal with error.
7285
aa96c426
GB
72862014-08-28 Gary Benson <gbenson@redhat.com>
7287
7288 * linux-low.c (linux_async): Replace fatal with warning.
7289 Tidy up and return.
7290 (linux_start_non_stop): Return -1 if linux_async failed.
7291
f7160e97
GB
72922014-08-28 Gary Benson <gbenson@redhat.com>
7293
7294 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7295 gdb_assert.
7296 (i386_dr_low_get_addr): Remove vague comment.
7297 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7298 gdb_assert.
7299
38e08fca
GB
73002014-08-28 Gary Benson <gbenson@redhat.com>
7301
7302 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7303 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7304 internal_error.
7305 (linux_resume_one_lwp): Likewise.
7306 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7307 gdb_assert.
7308 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7309 with internal_error.
7310 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7311 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7312 (find_register_by_name): Replace fatal with internal_error.
7313 (find_regno): Likewise.
7314 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7315 * thread-db.c (thread_db_create_event): Likewise.
7316 (thread_db_load_search): Likewise.
7317 (try_thread_db_load_1): Likewise.
7318 * tracepoint.c (get_jump_space_head): Replace fatal with
7319 internal_error.
7320 (claim_trampoline_space): Likewise.
7321 (have_fast_tracepoint_trampoline_buffer): Likewise.
7322 (cmd_qtstart): Likewise.
7323 (stop_tracing): Likewise.
7324 (fast_tracepoint_collecting): Likewise.
7325 (target_malloc): Likewise.
7326 (download_tracepoint): Likewise.
7327 (download_trace_state_variables): Replace check with gdb_assert.
7328 (upload_fast_traceframes): Replace fatal with internal_error.
7329
34abf635
GB
73302014-08-19 Tom Tromey <tromey@redhat.com>
7331 Gary Benson <gbenson@redhat.com>
7332
7333 * Makefile.in (SFILES): Add common/common-debug.c.
7334 (OBS): Add common-debug.o.
7335 (common-debug.o): New rule.
7336 * debug.h (debug_printf): Don't declare.
7337 * debug.c (debug_printf): Renamed and rewritten as...
7338 (debug_vprintf): New function.
7339
f6e94d78
GB
73402014-08-19 Gary Benson <gbenson@redhat.com>
7341
7342 * utils.h: Do not include print-utils.h.
7343
9239eeab
GB
73442014-08-19 Tom Tromey <tromey@redhat.com>
7345 Gary Benson <gbenson@redhat.com>
7346
7347 * server.h: Add static assertion.
7348 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7349
ef87c8bb
GB
73502014-08-19 Tom Tromey <tromey@redhat.com>
7351 Gary Benson <gbenson@redhat.com>
7352
7353 * Makefile.in (SFILES): Add common/errors.c.
7354 (OBS): Add errors.o.
7355 (IPA_OBS): Add errors-ipa.o.
7356 (errors.o): New rule.
7357 (errors-ipa.o): Likewise.
7358 * utils.h (perror_with_name, error, warning): Don't declare.
7359 * utils.c (warning): Renamed and rewritten as...
7360 (vwarning): New function.
7361 (error): Renamed and rewritten as...
7362 (verror): New function.
7363 (internal_error): Renamed and rewritten as...
7364 (internal_verror): New function.
7365
bb974a24
GB
73662014-08-07 Gary Benson <gbenson@redhat.com>
7367
7368 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7369 * configure: Regenerate.
7370 * config.in: Likewise.
7371 * server.h: Do not include errno.h.
7372 * event-loop.c: Likewise.
7373 * hostio-errno.c: Likewise.
7374 * linux-low.c: Likewise.
7375 * remote-utils.c: Likewise.
7376 * spu-low.c: Likewise.
7377 * utils.c: Likewise.
7378 * gdbreplay.c: Unconditionally include errno.h.
7379
6d3d12eb
GB
73802014-08-07 Gary Benson <gbenson@redhat.com>
7381
7382 * server.h: Do not include string.h.
7383 * event-loop.c: Likewise.
7384 * linux-low.c: Likewise.
7385 * regcache.c: Likewise.
7386 * remote-utils.c: Likewise.
7387 * spu-low.c: Likewise.
7388 * utils.c: Likewise.
7389
dccbb609
GB
73902014-08-07 Gary Benson <gbenson@redhat.com>
7391
7392 * server.h: Do not include gdb_assert.h.
7393
e76df0d0
GB
73942014-08-07 Gary Benson <gbenson@redhat.com>
7395
7396 * server.h: Do not include common-utils.h.
7397
4cb9c816
GB
73982014-08-07 Gary Benson <gbenson@redhat.com>
7399
7400 * server.h: Do not include ptid.h.
7401 * notif.h: Likewise.
7402
3995eeee
GB
74032014-08-07 Gary Benson <gbenson@redhat.com>
7404
7405 * server.h: Do not include gdb_locale.h.
7406
cb9f1a9b
GB
74072014-08-07 Gary Benson <gbenson@redhat.com>
7408
7409 * server.h: Do not include gdb/signals.h.
7410 * win32-low.c: Likewise.
7411
a5fceff8
GB
74122014-08-07 Gary Benson <gbenson@redhat.com>
7413
7414 * server.h: Do not include pathmax.h.
7415
b9391142
GB
74162014-08-07 Gary Benson <gbenson@redhat.com>
7417
7418 * server.h: Do not include libiberty.h.
7419 * linux-bfin-low.c: Likewise.
7420
0e443c87
GB
74212014-08-07 Gary Benson <gbenson@redhat.com>
7422
7423 * server.h: Do not include ansidecl.h.
7424
8ebb3f56
GB
74252014-08-07 Gary Benson <gbenson@redhat.com>
7426
7427 * linux-x86-low.c: Do not include stddef.h.
7428 * lynx-ppc-low.c: Likewise.
7429 * tracepoint.c: Likewise.
7430
8980bdf6
GB
74312014-08-07 Gary Benson <gbenson@redhat.com>
7432
7433 * server.h: Do not include stdarg.h.
7434 * nto-low.c: Likewise.
7435
d7096f71
GB
74362014-08-07 Gary Benson <gbenson@redhat.com>
7437
7438 * server.h: Do not include stdlib.h.
7439 * inferiors.c: Likewise.
7440 * linux-low.c: Likewise.
7441 * regcache.c: Likewise.
7442 * spu-low.c: Likewise.
7443 * tracepoint.c: Likewise.
7444 * utils.c: Likewise.
7445
d02f550d
GB
74462014-08-07 Gary Benson <gbenson@redhat.com>
7447
7448 * server.h: Do not include stdio.h.
7449 * linux-low.c: Likewise.
7450 * remote-utils.c: Likewise.
7451 * spu-low.c: Likewise.
7452 * utils.c: Likewise.
7453 * wincecompat.c: Likewise.
7454
87f6c4e3
GB
74552014-08-06 Gary Benson <gbenson@redhat.com>
7456
7457 * regcache.c (init_register_cache): Move conditionals inside if.
7458
7089dca4
GB
74592014-08-06 Gary Benson <gbenson@redhat.com>
7460
7461 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7462
462f517e
GB
74632014-07-31 Gary Benson <gbenson@redhat.com>
7464
7465 * ax.h: Do not include server.h.
7466 * gdbthread.h: Likewise.
7467 * lynx-low.h: Likewise.
7468 * notif.h: Likewise.
7469
976411d6
GB
74702014-07-30 Gary Benson <gbenson@redhat.com>
7471
7472 * server.h: Include common-defs.h.
7473 Do not include config.h or build-gnulib-gdbserver/config.h.
7474
d41f6d8e
GB
74752014-07-30 Gary Benson <gbenson@redhat.com>
7476
7477 * hostio-errno.c: Move server.h to top of includes list.
7478 * inferiors.c: Likewise.
7479 * linux-x86-low.c: Likewise.
7480 * notif.c: Include server.h.
7481
314c6a35
TT
74822014-07-24 Tom Tromey <tromey@redhat.com>
7483 Gary Benson <gbenson@redhat.com>
7484
7485 * server.h (CORE_ADDR): Now unsigned.
7486
69ff6be5
PA
74872014-07-16 Pedro Alves <palves@redhat.com>
7488
7489 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7490
ce9e3fe7
PA
74912014-07-15 Pedro Alves <palves@redhat.com>
7492
7493 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7494 copy.
7495
e76126e8
PA
74962014-07-11 Pedro Alves <palves@redhat.com>
7497
7498 * linux-low.c (kill_wait_lwp): New function, based on
7499 kill_one_lwp_callback, but use my_waitpid directly.
7500 (kill_one_lwp_callback, linux_kill): Use it.
7501
8e9db26e
PA
75022014-06-23 Pedro Alves <palves@redhat.com>
7503
7504 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7505 before setting DR0..DR3.
7506
698b3e08
GB
75072014-06-20 Gary Benson <gbenson@redhat.com>
7508
7509 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7510 * configure: Regenerated.
7511 * config.in: Likewise.
7512
125f8a3d
GB
75132014-06-20 Gary Benson <gbenson@redhat.com>
7514
7515 * Makefile.in (SFILES): Update locations for files moved
7516 from common to nat.
7517 (object file files): Reordered.
7518
42995dbd
GB
75192014-06-20 Gary Benson <gbenson@redhat.com>
7520
7521 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7522 (i386_dr_low_set_addr): Likewise.
7523 (i386_dr_low_get_addr): Likewise.
7524 (i386_dr_low_can_set_control): Likewise.
7525 (i386_dr_low_set_control): Likewise.
7526 (i386_dr_low_get_control): Likewise.
7527 (i386_dr_low_get_status): Likewise.
7528 (i386_get_debug_register_length): Likewise.
7529 * linux-x86-low.c (i386_dr_low_set_addr):
7530 Changed signature. Made static.
7531 (i386_dr_low_get_addr): Likewise.
7532 (i386_dr_low_set_control): Likewise.
7533 (i386_dr_low_get_control): Likewise.
7534 (i386_dr_low_get_status): Likewise.
7535 (i386_dr_low): New global variable.
7536 * win32-i386-low.c (i386_dr_low_set_addr):
7537 Changed signature. Made static.
7538 (i386_dr_low_get_addr): Likewise.
7539 (i386_dr_low_set_control): Likewise.
7540 (i386_dr_low_get_control): Likewise.
7541 (i386_dr_low_get_status): Likewise.
7542 (i386_dr_low): New global variable.
7543
e1d2394b
MS
75442014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7545
7546 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7547 * Makefile.in (AR, AR_FLAGS): Define.
7548 * configure: Regenerate.
7549
3a8ee006
GB
75502014-06-19 Gary Benson <gbenson@redhat.com>
7551
7552 * Makefile.in (i386-dregs.o): New rule.
7553 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7554 * i386-low.c (target.h): Remove include.
7555 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7556 (DR_CONTROL_SHIFT): Likewise.
7557 (DR_CONTROL_SIZE): Likewise.
7558 (DR_RW_EXECUTE): Likewise.
7559 (DR_RW_WRITE): Likewise.
7560 (DR_RW_READ): Likewise.
7561 (DR_RW_IORW): Likewise.
7562 (DR_LEN_1): Likewise.
7563 (DR_LEN_2): Likewise.
7564 (DR_LEN_4): Likewise.
7565 (DR_LEN_8): Likewise.
7566 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7567 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7568 (DR_ENABLE_SIZE): Likewise.
7569 (DR_LOCAL_SLOWDOWN): Likewise.
7570 (DR_GLOBAL_SLOWDOWN): Likewise.
7571 (DR_CONTROL_RESERVED): Likewise.
7572 (I386_DR_CONTROL_MASK): Likewise.
7573 (I386_DR_VACANT): Likewise.
7574 (I386_DR_LOCAL_ENABLE): Likewise.
7575 (I386_DR_GLOBAL_ENABLE): Likewise.
7576 (I386_DR_DISABLE): Likewise.
7577 (I386_DR_SET_RW_LEN): Likewise.
7578 (I386_DR_GET_RW_LEN): Likewise.
7579 (I386_DR_WATCH_HIT): Likewise.
7580 (i386_wp_op_t): Likewise.
7581 (i386_show_dr): Likewise.
7582 (i386_length_and_rw_bits): Likewise.
7583 (i386_insert_aligned_watchpoint): Likewise.
7584 (i386_remove_aligned_watchpoint): Likewise.
7585 (i386_handle_nonaligned_watchpoint): Likewise.
7586 i386_update_inferior_debug_regs(): Likewise.
7587 (i386_dr_insert_watchpoint): Likewise.
7588 (i386_dr_remove_watchpoint): Likewise.
7589 (i386_dr_region_ok_for_watchpoint): Likewise.
7590 (i386_dr_stopped_data_address): Likewise.
7591 (i386_dr_stopped_by_watchpoint): Likewise.
7592
8f26655c
GB
75932014-06-19 Gary Benson <gbenson@redhat.com>
7594
7595 * i386-low.c (i386_dr_show): Renamed to
7596 i386_show_dr and made static. All uses updated.
7597 (i386_dr_length_and_rw_bits): Renamed to
7598 i386_length_and_rw_bits and made static.
7599 All uses updated.
7600 (i386_dr_insert_aligned_watchpoint): Renamed to
7601 i386_insert_aligned_watchpoint and made static.
7602 All uses updated.
7603 (i386_dr_remove_aligned_watchpoint): Renamed to
7604 i386_remove_aligned_watchpoint and made static.
7605 All uses updated.
7606 (i386_dr_update_inferior_debug_regs): Renamed to
7607 i386_update_inferior_debug_regs and made static.
7608 All uses updated.
7609
b9228891
GB
76102014-06-18 Gary Benson <gbenson@redhat.com>
7611
5171def3
GB
7612 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7613 (i386_dr_low_can_set_control): Likewise.
7614 (i386_get_debug_register_length): Likewise.
7615 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7616 (i386_dr_low_can_set_control): Likewise.
7617 (i386_get_debug_register_length): Likewise.
7618
76192014-06-17 Gary Benson <gbenson@redhat.com>
7620
b9228891
GB
7621 * i386-low.h (i386-dregs.h): New include.
7622 (DR_FIRSTADDR): Now in i386-dregs.h.
7623 (DR_LASTADDR): Likewise.
7624 (DR_NADDR): Likewise.
7625 (DR_STATUS): Likewise.
7626 (DR_CONTROL): Likewise.
7627 (i386_debug_reg_state): Likewise.
7628 (i386_dr_insert_watchpoint): Likewise.
7629 (i386_dr_remove_watchpoint): Likewise.
7630 (i386_dr_region_ok_for_watchpoint): Likewise.
7631 (i386_dr_stopped_data_address): Likewise.
7632 (i386_dr_stopped_by_watchpoint): Likewise.
7633 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7634
4be83cc2
GB
76352014-06-18 Gary Benson <gbenson@redhat.com>
7636
7637 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7638 i386_dr_insert_watchpoint.
7639 (i386_low_remove_watchpoint): Renamed to
7640 i386_dr_remove_watchpoint.
7641 (i386_low_region_ok_for_watchpoint): Renamed to
7642 i386_dr_region_ok_for_watchpoint.
7643 (i386_low_stopped_data_address): Renamed to
7644 i386_dr_stopped_data_address.
7645 (i386_low_stopped_by_watchpoint): Renamed to
7646 i386_dr_stopped_by_watchpoint.
7647 * i386-low.c (i386_show_dr): Renamed to
7648 i386_dr_show and made nonstatic. All uses updated.
7649 (i386_length_and_rw_bits): Renamed to
7650 i386_dr_length_and_rw_bits and made nonstatic.
7651 All uses updated.
7652 (i386_insert_aligned_watchpoint): Renamed to
7653 i386_dr_insert_aligned_watchpoint and made nonstatic.
7654 All uses updated.
7655 (i386_remove_aligned_watchpoint): Renamed to
7656 i386_dr_remove_aligned_watchpoint and made nonstatic.
7657 All uses updated.
7658 (i386_update_inferior_debug_regs): Renamed to
7659 i386_dr_update_inferior_debug_regs and made nonstatic.
7660 All uses updated.
7661 (i386_low_insert_watchpoint): Renamed to
7662 i386_dr_insert_watchpoint. All uses updated.
7663 (i386_low_remove_watchpoint): Renamed to
7664 i386_dr_remove_watchpoint. All uses updated.
7665 (i386_low_region_ok_for_watchpoint): Renamed to
7666 i386_dr_region_ok_for_watchpoint. All uses updated.
7667 (i386_low_stopped_data_address): Renamed to
7668 i386_dr_stopped_data_address. All uses updated.
7669 (i386_low_stopped_by_watchpoint): Renamed to
7670 i386_dr_stopped_by_watchpoint. All uses updated.
7671
131aa0d4
GB
76722014-06-18 Gary Benson <gbenson@redhat.com>
7673
7674 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7675 (i386_dr_low_can_set_control): Likewise.
7676 (i386_insert_aligned_watchpoint): New check.
7677
d9305f7f
GB
76782014-06-18 Gary Benson <gbenson@redhat.com>
7679
7680 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7681 Renamed to state.
7682
e927c9fc
GB
76832014-06-18 Gary Benson <gbenson@redhat.com>
7684
7685 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7686 instead of fatal and error.
7687 (i386_handle_nonaligned_watchpoint): Likewise.
7688
1b6d4134
GB
76892014-06-18 Gary Benson <gbenson@redhat.com>
7690
7691 * i386-low.c (i386_get_debug_register_length): New macro.
7692 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7693 (i386_show_dr): Use debug_printf instead of fprintf. Use
7694 phex to format values.
7695
6e62758f
GB
76962014-06-18 Gary Benson <gbenson@redhat.com>
7697
7698 * i386-low.h: Comment changes.
7699 * i386-low.c: Likewise.
7700
fc6e2f03
GB
77012014-06-18 Gary Benson <gbenson@redhat.com>
7702
7703 * i386-low.c: Whitespace changes.
7704
f9d1eeed
TT
77052014-06-12 Tom Tromey <tromey@redhat.com>
7706
7707 * utils.c (freeargv): Remove.
7708
0b04e523
TT
77092014-06-12 Tom Tromey <tromey@redhat.com>
7710
7711 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7712 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7713 (parse_debug_format_options): Likewise.
7714 (gdbserver_usage): Likewise.
7715 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7716 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7717 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7718 against libiberty.
7719 ($(LIBGNU)): Depend on libiberty.
7720 (all-lib): Recurse into all subdirs.
7721 (install-only): Invoke "install" target in subdirs.
7722 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7723 targets.
7724 * configure: Rebuild.
7725 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7726 for vasprintf, vsnprintf, or gettimeofday.
7727 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7728 srv_tgtobj.
7729
270c9937
JB
77302014-06-05 Joel Brobecker <brobecker@adacore.com>
7731
7732 * development.sh: Delete.
7733 * Makefile.in (config.status): Adjust dependency on development.sh.
7734 * configure.ac: Adjust development.sh source call.
7735 * configure: Regenerate.
7736
0a261ed8
PA
77372014-06-02 Pedro Alves <palves@redhat.com>
7738
7739 * ax.c (gdb_free_agent_expr): New function.
7740 * ax.h (gdb_free_agent_expr): New declaration.
7741 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7742 list.
7743 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7744 static.
7745 (clear_breakpoint_conditions_and_commands): New function.
7746 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7747 (clear_breakpoint_conditions_and_commands): New declaration.
7748
e9dae05e
RR
77492014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7750
7751 * linux-aarch64-low.c (asm/ptrace.h): Include.
7752
5876f503
JK
77532014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7754
7755 Fix TLS access for -static -pthread.
7756 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7757 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7758 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7759
802e8e6d
PA
77602014-05-20 Pedro Alves <palves@redhat.com>
7761
7762 * linux-aarch64-low.c (aarch64_insert_point)
7763 (aarch64_remove_point): No longer check whether the type is
7764 supported here. Adjust to new interface.
7765 (the_low_target): Install aarch64_supports_z_point_type as
7766 supports_z_point_type method.
7767 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7768 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7769 instead of a Z packet char. Adjust.
7770 (arm_supports_z_point_type): New function.
7771 (arm_insert_point, arm_remove_point): Adjust to new interface.
7772 (the_low_target): Install arm_supports_z_point_type.
7773 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7774 (cris_insert_point, cris_remove_point): Adjust to new interface.
7775 Don't check whether the type is supported here.
7776 (the_low_target): Install cris_supports_z_point_type.
7777 * linux-low.c (linux_supports_z_point_type): New function.
7778 (linux_insert_point, linux_remove_point): Adjust to new interface.
7779 * linux-low.h (struct linux_target_ops) <insert_point,
7780 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7781 raw_breakpoint pointer parameter.
7782 <supports_z_point_type>: New method.
7783 * linux-mips-low.c (mips_supports_z_point_type): New function.
7784 (mips_insert_point, mips_remove_point): Adjust to new interface.
7785 Use mips_supports_z_point_type.
7786 (the_low_target): Install mips_supports_z_point_type.
7787 * linux-ppc-low.c (the_low_target): Install NULL as
7788 supports_z_point_type method.
7789 * linux-s390-low.c (the_low_target): Install NULL as
7790 supports_z_point_type method.
7791 * linux-sparc-low.c (the_low_target): Install NULL as
7792 supports_z_point_type method.
7793 * linux-x86-low.c (x86_supports_z_point_type): New function.
7794 (x86_insert_point): Adjust to new insert_point interface. Use
7795 insert_memory_breakpoint. Adjust to new
7796 i386_low_insert_watchpoint interface.
7797 (x86_remove_point): Adjust to remove_point interface. Use
7798 remove_memory_breakpoint. Adjust to new
7799 i386_low_remove_watchpoint interface.
7800 (the_low_target): Install x86_supports_z_point_type.
7801 * lynx-low.c (lynx_target_ops): Install NULL as
7802 supports_z_point_type callback.
7803 * nto-low.c (nto_supports_z_point_type): New.
7804 (nto_insert_point, nto_remove_point): Adjust to new interface.
7805 (nto_target_ops): Install nto_supports_z_point_type.
7806 * mem-break.c: Adjust intro comment.
7807 (struct raw_breakpoint) <raw_type, size>: New fields.
7808 <inserted>: Update comment.
7809 <shlib_disabled>: Delete field.
7810 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7811 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7812 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7813 (raw_bkpt_type_to_target_hw_bp_type): New function.
7814 (find_enabled_raw_code_breakpoint_at): New function.
7815 (find_raw_breakpoint_at): New type and size parameters. Use them.
7816 (insert_memory_breakpoint): New function, based off
7817 set_raw_breakpoint_at.
7818 (remove_memory_breakpoint): New function.
7819 (set_raw_breakpoint_at): Reimplement.
7820 (set_breakpoint): New, based on set_breakpoint_at.
7821 (set_breakpoint_at): Reimplement.
7822 (delete_raw_breakpoint): Go through the_target->remove_point
7823 instead of assuming memory breakpoints.
7824 (find_gdb_breakpoint_at): Delete.
7825 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7826 (find_gdb_breakpoint): New function.
7827 (set_gdb_breakpoint_at): Delete.
7828 (z_type_supported): New function.
7829 (set_gdb_breakpoint_1): New function, loosely based off
7830 set_gdb_breakpoint_at.
7831 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7832 (delete_gdb_breakpoint_at): Delete.
7833 (delete_gdb_breakpoint_1): New function, loosely based off
7834 delete_gdb_breakpoint_at.
7835 (delete_gdb_breakpoint): New function.
7836 (clear_gdb_breakpoint_conditions): Rename to ...
7837 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7838 breakpoint.
7839 (add_condition_to_breakpoint): Make static.
7840 (add_breakpoint_condition): Take a struct breakpoint pointer
7841 instead of an address. Adjust.
7842 (gdb_condition_true_at_breakpoint): Rename to ...
7843 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7844 z_type parameter.
7845 (gdb_condition_true_at_breakpoint): Reimplement.
7846 (add_breakpoint_commands): Take a struct breakpoint pointer
7847 instead of an address. Adjust.
7848 (gdb_no_commands_at_breakpoint): Rename to ...
7849 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7850 parameter. Return true if no breakpoint was found. Change debug
7851 output.
7852 (gdb_no_commands_at_breakpoint): Reimplement.
7853 (run_breakpoint_commands): Rename to ...
7854 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7855 and change return type to boolean.
7856 (run_breakpoint_commands): New function.
7857 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7858 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7859 breakpoint. Go through the_target->remove_point instead of
7860 assuming memory breakpoint.
7861 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7862 software and hardware breakpoints.
7863 (reinsert_raw_breakpoint): Go through the_target->insert_point
7864 instead of assuming memory breakpoint.
7865 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7866 software and hardware breakpoints.
7867 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7868 Check both software and hardware breakpoints.
7869 (validate_inserted_breakpoint): Assert the breakpoint is a
7870 software breakpoint. Set the inserted flag to -1 instead of
7871 setting shlib_disabled.
7872 (delete_disabled_breakpoints): Adjust.
7873 (validate_breakpoints): Only validate software breakpoints.
7874 Adjust to inserted flag change.
7875 (check_mem_read, check_mem_write): Skip breakpoint types other
7876 than software breakpoints. Adjust to inserted flag change.
7877 * mem-break.h (enum raw_bkpt_type): New enum.
7878 (raw_breakpoint, struct process_info): Forward declare.
7879 (Z_packet_to_target_hw_bp_type): Delete declaration.
7880 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7881 (set_gdb_breakpoint, delete_gdb_breakpoint)
7882 (clear_breakpoint_conditions): New declarations.
7883 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7884 (breakpoint_inserted_here): Update comment.
7885 (add_breakpoint_condition, add_breakpoint_commands): Replace
7886 address parameter with a breakpoint pointer parameter.
7887 (gdb_breakpoint_here): Update comment.
7888 (delete_gdb_breakpoint_at): Delete.
7889 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7890 * server.c (process_point_options): Take a struct breakpoint
7891 pointer instead of an address. Adjust.
7892 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7893 delete_gdb_breakpoint.
7894 * spu-low.c (spu_target_ops): Install NULL as
7895 supports_z_point_type method.
7896 * target.h: Include mem-break.h.
7897 (struct target_ops) <prepare_to_access_memory>: Update comment.
7898 <supports_z_point_type>: New field.
7899 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7900 instead of a char. Also take a raw breakpoint pointer.
7901 * win32-arm-low.c (the_low_target): Install NULL as
7902 supports_z_point_type.
7903 * win32-i386-low.c (i386_supports_z_point_type): New function.
7904 (i386_insert_point, i386_remove_point): Adjust to new interface.
7905 (the_low_target): Install i386_supports_z_point_type.
7906 * win32-low.c (win32_supports_z_point_type): New function.
7907 (win32_insert_point, win32_remove_point): Adjust to new interface.
7908 (win32_target_ops): Install win32_supports_z_point_type.
7909 * win32-low.h (struct win32_target_ops):
7910 <supports_z_point_type>: New method.
7911 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7912 instead of a char. Also take a raw breakpoint pointer.
7913
932539e3
PA
79142014-05-20 Pedro Alves <palves@redhat.com>
7915
7916 * mem-break.h: Include break-common.h.
7917 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7918 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7919 (Z_packet_to_target_hw_bp_type): New declaration.
7920 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7921 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7922 (Z_PACKET_ACCESS_WP): Delete macros.
7923 (Z_packet_to_hw_type): Delete function.
7924 * i386-low.h: Don't include break-common.h here.
7925 (Z_packet_to_hw_type): Delete declaration.
7926 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7927 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7928 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7929 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7930 * linux-aarch64-low.c: Don't include break-common.h here.
7931 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7932 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7933 (Z_packet_to_target_hw_bp_type): Delete function.
7934 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7935 function.
7936 (mips_insert_point, mips_remove_point): Use
7937 Z_packet_to_target_hw_bp_type.
7938
4ff0d3d8
PA
79392014-05-20 Pedro Alves <palves@redhat.com>
7940
7941 * linux-aarch64-low.c: Include break-common.h.
7942 (enum target_point_type): Delete.
7943 (Z_packet_to_point_type): Rename to ...
7944 (Z_packet_to_target_hw_bp_type): ... this, and return a
7945 target_hw_bp_type instead.
7946 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7947 instead of an enum target_point_type.
7948 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7949 breakpoint type.
7950 (aarch64_dr_state_insert_one_point)
7951 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7952 (aarch64_handle_aligned_watchpoint)
7953 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7954 Take an enum target_hw_bp_type instead of an enum
7955 target_point_type.
7956 (aarch64_supports_z_point_type): New function.
7957 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7958 use Z_packet_to_target_hw_bp_type.
7959
786dc519
JB
79602014-05-20 Joel Brobecker <brobecker@adacore.com>
7961
7962 * configure.ac: Only use -Werror by default when DEVELOPMENT
7963 is true.
7964 * configure: Regenerate.
7965
9e0aa64f
JK
79662014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7967
7968 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7969 * linux-x86-low.c (X86_64_USER_REGS): New.
7970 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7971
2b577b92
YQ
79722014-04-28 Yao Qi <yao@codesourcery.com>
7973
7974 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7975 name.
7976
94611da2
PA
79772014-04-25 Pedro Alves <palves@redhat.com>
7978
7979 PR server/16255
7980 * linux-low.c (linux_attach_fail_reason_string): New function.
7981 (linux_attach_lwp): Delete.
7982 (linux_attach_lwp_1): Rename to ...
7983 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7984 argument. Remove "initial" parameter. Return int instead of
7985 void. Don't error or warn here.
7986 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7987 failure to attach to the tgid. Call warning when failing to
7988 attach to an lwp.
7989 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7990 argument. Remove "initial" parameter. Return int instead of
7991 void. Don't error or warn here.
7992 (linux_attach_fail_reason_string): New declaration.
7993 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7994 interface change. Use linux_attach_fail_reason_string.
7995
01f9f808
MS
79962014-04-24 Michael Sturm <michael.sturm@mintel.com>
7997 Walfred Tedeschi <walfred.tedeschi@intel.com>
7998
7999 * Makefile.in: Added rules to handle new files
8000 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8001 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8002 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8003 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8004 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8005 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8006 x32-avx512-linux.o.
8007 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8008 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8009 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8010 i386/x32-avx512.xml.
8011 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8012 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8013 i386/x32-avx512-linux.xml.
8014 * i387-fp.c (num_avx512_k_registers): New constant for number
8015 of K registers.
8016 (num_avx512_zmmh_low_registers): New constant for number of
8017 lower ZMM registers (0-15).
8018 (num_avx512_zmmh_high_registers): New constant for number of
8019 higher ZMM registers (16-31).
8020 (num_avx512_ymmh_registers): New contant for number of higher
8021 YMM registers (ymm16-31 added by avx521 on x86_64).
8022 (num_avx512_xmm_registers): New constant for number of higher
8023 XMM registers (xmm16-31 added by AVX512 on x86_64).
8024 (struct i387_xsave): Add space for AVX512 registers.
8025 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8026 Add code to handle AVX512 registers.
8027 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8028 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8029 prototypei from generated file.
8030 (tdesc_amd64_avx512_linux): Likewise.
8031 (init_registers_x32_avx512_linux): Likewise.
8032 (tdesc_x32_avx512_linux): Likewise.
8033 (init_registers_i386_avx512_linux): Likewise.
8034 (tdesc_i386_avx512_linux): Likewise.
8035 (x86_64_regmap): Add AVX512 registers.
8036 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8037 mask.
8038 (initialize_low_arch): Add code to initialize AVX512 registers.
8039
51aa91f9
PA
80402014-04-23 Pedro Alves <palves@redhat.com>
8041
8042 * mem-break.c (find_gdb_breakpoint_at): Make static.
8043 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8044
a4165e94
PA
80452014-04-23 Pedro Alves <palves@redhat.com>
8046
8047 * i386-low.c: Don't include break-common.h here.
8048 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8049 prototype to take target_hw_bp_type as argument instead of a Z
8050 packet char.
8051 * i386-low.h: Include break-common.h here.
8052 (Z_packet_to_hw_type): Declare.
8053 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8054 prototypes.
8055 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8056 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8057 (x86_remove_point): Convert the packet number to a
8058 target_hw_bp_type before calling i386_low_remove_watchpoint.
8059 * win32-i386-low.c (i386_insert_point): Convert the packet number
8060 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8061 (i386_remove_point): Convert the packet number to a
8062 target_hw_bp_type before calling i386_low_remove_watchpoint.
8063
b8acf843
PA
80642014-04-23 Pedro Alves <palves@redhat.com>
8065
8066 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8067
d708bcd1
PA
80682014-04-10 Pedro Alves <palves@redhat.com>
8069
8070 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8071 Check if the condition or command is NULL before checking if the
8072 breakpoint is known. On success, return true.
8073 * mem-break.h (add_breakpoint_condition): Document return.
8074 (add_breakpoint_commands): Add describing comment.
8075 * server.c (skip_to_semicolon): New function.
8076 (process_point_options): Use it.
8077
2eec7d5b
PA
80782014-04-09 Pedro Alves <palves@redhat.com>
8079
8080 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8081 to lwpid_of.
8082
fa96cb38
PA
80832014-02-27 Pedro Alves <palves@redhat.com>
8084
8085 PR 12702
8086 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8087 macros.
8088 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8089 output.
8090 (last_thread_of_process_p): Take a PID argument instead of a
8091 thread pointer.
8092 (linux_wait_for_lwp): Delete.
8093 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8094 functions.
8095 (linux_low_filter_event): New function, party factored out from
8096 linux_wait_for_event.
8097 (linux_wait_for_event): Rename to ...
8098 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8099 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8100 sigsuspend. Check for zombie leaders.
8101 (linux_wait_for_event): Reimplement as wrapper around
8102 linux_wait_for_event_filtered.
8103 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8104 a normal or signal exit is seen, it's the whole process exiting.
8105 (wait_for_sigstop): No longer a for_each_inferior callback.
8106 Rewrite on top of linux_wait_for_event_filtered.
8107 (stop_all_lwps): Call wait_for_sigstop directly.
8108 * server.c (resume, handle_target_event): Handle
8109 TARGET_WAITKIND_NO_RESUMED.
8110
d763de10
JB
81112014-02-26 Joel Brobecker <brobecker@adacore.com>
8112
8113 * win32-low.c (psapi_get_dll_name,
8114 * win32_CreateToolhelp32Snapshot): Delete.
8115 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8116 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8117 Delete.
8118 (handle_load_dll): Add function description.
8119 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8120
850a0f76
JB
81212014-02-26 Joel Brobecker <brobecker@adacore.com>
8122
8123 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8124 Add comment.
8125 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8126 base address when calling win32_add_one_solib.
8127 (handle_load_dll): Delete local variable load_addr.
8128 Remove 0x1000 offset applied to DLL base address when calling
8129 win32_add_one_solib.
8130 (handle_unload_dll): Add comment.
8131
f25b3fc3
JB
81322014-02-26 Joel Brobecker <brobecker@adacore.com>
8133
8134 * win32-low.c (win32_add_all_dlls): Renames
8135 win32_ensure_ntdll_loaded. Rewrite function documentation.
8136 Adjust implementation to always load all DLLs.
8137 Add 0x1000 offset to DLL base address when calling
8138 win32_add_one_solib.
8139 (child_initialization_done): New static global.
8140 (do_initial_child_stuff): Set child_initialization_done to
8141 zero during child initialization, and 1 after. Replace call
8142 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8143 Add comment.
8144 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8145 (handle_unload_dll): Add function documentation.
8146 (get_child_debug_event): Ignore load and unload DLL events
8147 during child initialization.
8148
d86d4aaf
DE
81492014-02-20 Doug Evans <dje@google.com>
8150
3bc32da3 8151 Remove global all_lwps.
d86d4aaf
DE
8152 * inferiors.h (ptid_of): Move here from linux-low.h.
8153 (pid_of, lwpid_of): Ditto.
8154 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8155 parameter is a struct thread_info * now.
8156 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8157 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8158 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8159 directly.
8160 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8161 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8162 * linux-arm-low.c (update_registers_callback): Update, "entry"
8163 parameter is a struct thread_info * now.
8164 Fetch lwpid from current_inferior directly.
8165 (arm_insert_point): Pass &all_threads to find_inferior instead of
8166 &all_lwps.
8167 (arm_remove_point): Ditto.
8168 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8169 (arm_prepare_to_resume): Fetch pid from thread.
8170 (arm_read_description): Fetch lwpid from current_inferior directly.
8171 * linux-low.c (all_lwps): Delete.
8172 (delete_lwp): Delete call to remove_inferior.
8173 (handle_extended_wait): Fetch lwpid from thread.
8174 (add_lwp): Don't set lwp->entry.id. Remove call to
8175 add_inferior_to_list.
8176 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8177 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8178 (kill_one_lwp_callback): Ditto.
8179 (linux_kill): Don't dereference NULL pointer.
8180 Fetch ptid,lwpid from thread.
8181 (get_detach_signal): Fetch ptid from thread.
8182 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8183 Simplify call to regcache_invalidate_thread.
8184 (delete_lwp_callback): Update, "entry" parameter is a
8185 struct thread_info * now. Fetch pid from thread.
8186 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8187 (status_pending_p_callback): Update, "entry" parameter is a
8188 struct thread_info * now. Fetch ptid from thread.
8189 (find_lwp_pid): Update, "entry" parameter is a
8190 struct thread_info * now.
8191 (linux_wait_for_lwp): Fetch pid from thread.
8192 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8193 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8194 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8195 (dequeue_one_deferred_signal): Ditto.
8196 (cancel_breakpoint): Fetch ptid from current_inferior.
8197 (linux_wait_for_event): Pass &all_threads to find_inferior,
8198 not &all_lwps. Fetch ptid, lwpid from thread.
8199 (count_events_callback): Update, "entry" parameter is a
8200 struct thread_info * now.
8201 (select_singlestep_lwp_callback): Ditto.
8202 (select_event_lwp_callback): Ditto.
8203 (cancel_breakpoints_callback): Ditto.
8204 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8205 not &all_lwps.
8206 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8207 (unsuspend_one_lwp): Update, "entry" parameter is a
8208 struct thread_info * now.
8209 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8210 not &all_lwps.
8211 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8212 Fetch lwpid from thread, not lwp.
8213 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8214 Pass &all_threads to find_inferior, not &all_lwps.
8215 (send_sigstop): Fetch lwpid from thread, not lwp.
8216 (send_sigstop_callback): Update, "entry" parameter is a
8217 struct thread_info * now.
8218 (suspend_and_send_sigstop_callback): Ditto.
8219 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8220 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8221 struct thread_info * now.
8222 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8223 from thread, lwp.
8224 (lwp_running): Update, "entry" parameter is a
8225 struct thread_info * now.
8226 (stop_all_lwps): Fetch ptid from thread.
8227 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8228 (linux_resume_one_lwp): Fetch lwpid from thread.
8229 (linux_set_resume_request): Update, "entry" parameter is a
8230 struct thread_info * now. Fetch pid, lwpid from thread.
8231 (resume_status_pending_p): Update, "entry" parameter is a
8232 struct thread_info * now.
8233 (need_step_over_p): Ditto. Fetch lwpid from thread.
8234 (start_step_over): Fetch lwpid from thread.
8235 (linux_resume_one_thread): Update, "entry" parameter is a
8236 struct thread_info * now. Fetch lwpid from thread.
8237 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8238 (proceed_one_lwp): Update, "entry" parameter is a
8239 struct thread_info * now. Fetch lwpid from thread.
8240 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8241 struct thread_info * now.
8242 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8243 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8244 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8245 directly.
8246 (regsets_store_inferior_registers): Ditto.
8247 (fetch_register, store_register): Ditto.
8248 (linux_read_memory, linux_write_memory): Ditto.
8249 (linux_request_interrupt): Ditto.
8250 (linux_read_auxv): Ditto.
8251 (linux_xfer_siginfo): Ditto.
8252 (linux_qxfer_spu): Ditto.
8253 (linux_qxfer_libraries_svr4): Ditto.
8254 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8255 moved to inferiors.h.
8256 (get_lwp): Delete.
8257 (get_thread_lwp): Update.
8258 (struct lwp_info): Delete member "entry". Simplify comment for
8259 member "thread".
8260 (all_lwps): Delete.
8261 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8262 current_inferior directly.
8263 (update_watch_registers_callback): Update, "entry" parameter is a
8264 struct thread_info * now. Fetch pid from thread.
8265 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8266 (mips_insert_point): Fetch lwpid from current_inferior.
8267 Pass &all_threads to find_inferior, not &all_lwps.
8268 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8269 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8270 directly.
8271 (mips_stopped_data_address): Ditto.
8272 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8273 directly.
8274 * linux-tile-low.c (tile_arch_setup): Ditto.
8275 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8276 (update_debug_registers_callback): Update, "entry" parameter is a
8277 struct thread_info * now. Fetch pid from thread.
8278 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8279 Pass &all_threads to find_inferior, not &all_lwps.
8280 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8281 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8282 Pass &all_threads to find_inferior, not &all_lwps.
8283 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8284 (i386_dr_low_get_status): Ditto.
8285 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8286 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8287 (x86_linux_read_description): Ditto.
8288 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8289
3b8361aa
DE
82902014-02-20 Doug Evans <dje@google.com>
8291
8292 * inferiors.c (get_first_inferior): Fix buglet.
8293
f7667f0d
DE
82942014-02-19 Doug Evans <dje@google.com>
8295
8296 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8297 * inferiors.c (add_thread): Change result type to struct thread_info *.
8298 All callers updated.
8299 (add_lwp): Call add_thread here instead of in callers.
8300 All callers updated.
8301 * linux-low.h (get_lwp_thread): Rewrite.
8302 (struct lwp_info): New member "thread".
8303
b3312d80
DE
83042014-02-19 Doug Evans <dje@google.com>
8305
8306 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8307 All callers updated.
8308
ecc6f45c
DE
83092014-02-19 Doug Evans <dje@google.com>
8310
8311 * inferiors.c (add_thread): Fix whitespace.
8312
649ebbca
DE
83132014-02-19 Doug Evans <dje@google.com>
8314
8315 * dll.c (clear_dlls): Replace accessing list implemention details
8316 with API function.
8317 * gdbthread.h (get_first_thread): Declare.
8318 * inferiors.c (for_each_inferior_with_data): New function.
8319 (get_first_thread): New function.
8320 (find_thread_ptid): Simplify.
8321 (get_first_inferior): New function.
8322 (clear_list): Delete.
8323 (one_inferior_p): New function.
8324 (clear_inferior_list): New function.
8325 (clear_inferiors): Update.
8326 * inferiors.h (for_each_inferior_with_data): Declare.
8327 (clear_inferior_list): Declare.
8328 (one_inferior_p): Declare.
8329 (get_first_inferior): Declare.
8330 * linux-low.c (linux_wait_for_event): Replace accessing list
8331 implemention details with API function.
8332 * server.c (target_running): Ditto.
8333 (accumulate_file_name_length): New function.
8334 (emit_dll_description): New function.
8335 (handle_qxfer_libraries): Replace accessing list implemention
8336 details with API function.
8337 (handle_qxfer_threads_worker): New function.
8338 (handle_qxfer_threads_proper): Replace accessing list implemention
8339 details with API function.
8340 (handle_query): Ditto.
8341 (visit_actioned_threads_callback_ftype): New typedef.
8342 (visit_actioned_threads_data): New struct.
8343 (visit_actioned_threads): Rewrite to be find_inferior callback.
8344 (resume): Call find_inferior.
8345 (handle_status): Replace accessing list implemention
8346 details with API function.
8347 (process_serial_event): Replace accessing list implemention details
8348 with API function.
8349 * target.c (set_desired_inferior): Replace accessing list implemention
8350 details with API function.
8351 * tracepoint.c (same_process_p): New function.
8352 (gdb_agent_about_to_close): Replace accessing list implemention
8353 details with API function.
8354 * win32-low.c (child_delete_thread): Replace accessing list
8355 implemention details with API function.
8356 (match_dll_by_basename): New function.
8357 (dll_is_loaded_by_basename): New function.
8358 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8359 details call to dll_is_loaded_by_basename.
8360
80894984
DE
83612014-02-19 Doug Evans <dje@google.com>
8362
8363 * dll.h (struct dll_info): Add comment.
8364 * gdbthread.h (struct thread_info): Add comment.
8365 (current_ptid): Simplify.
8366 * inferiors.c (add_process): Update.
8367 (remove_process): Update.
8368 * inferiors.h (struct process_info): Rename member "head" to "entry".
8369 * linux-low.c (delete_lwp): Update.
8370 (add_lwp): Update.
8371 (last_thread_of_process_p): Update.
8372 (kill_one_lwp_callback, linux_kill): Update.
8373 (status_pending_p_callback): Update.
8374 (wait_for_sigstop): Update. Simplify read of ptid.
8375 (start_step_over): Update.
8376 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8377 (get_lwp_thread): Update.
8378 (struct lwp_info): Rename member "head" to "entry".
8379 * regcache.h (inferior_list_entry): Delete.
8380 * server.c (kill_inferior_callback): Update.
8381 (detach_or_kill_inferior_callback): Update.
8382 (print_started_pid): Update.
8383 (print_attached_pid): Update.
8384 (process_serial_event): Simplify read of ptid.
8385 * thread-db.c (thread_db_create_event): Update.
8386 (thread_db_get_tls_address): Update.
8387 * win32-low.c (current_inferior_ptid): Simplify.
8388
46917d26
TT
83892014-02-19 Tom Tromey <tromey@redhat.com>
8390
8391 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8392 argument.
8393 (target_supports_btrace): Update.
8394
0759a81e
YQ
83952014-02-14 Yao Qi <yao@codesourcery.com>
8396
8397 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8398 (rsp-low-ipa.o): New target.
8399
a7191e8b
TT
84002014-02-12 Tom Tromey <tromey@redhat.com>
8401
8402 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8403 convert_ascii_to_int.
8404 * regcache.c (registers_to_string): Likewise.
8405 * remote-utils.c (decode_M_packet): Likewise.
8406 * server.c (process_serial_event): Likewise.
8407
ff0e980e
TT
84082014-02-12 Tom Tromey <tromey@redhat.com>
8409
8410 * server.c (handle_query, handle_v_run): Use hex2bin, not
8411 unhexify.
8412 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8413
e9371aff
TT
84142014-02-12 Tom Tromey <tromey@redhat.com>
8415
8416 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8417 convert_int_to_ascii.
8418 * regcache.c (registers_to_string, collect_register_as_string):
8419 Likewise.
8420 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8421 Likewise.
8422 * server.c (process_serial_event): Likewise.
8423 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8424 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8425
971dc0b8
TT
84262014-02-12 Tom Tromey <tromey@redhat.com>
8427
8428 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8429 bin2hex, not hexify.
8430 * tracepoint.c (cmd_qtstatus): Likewise.
8431
0a822afb
TT
84322014-02-12 Tom Tromey <tromey@redhat.com>
8433
8434 * remote-utils.c (monitor_output): Pass explicit length to
8435 hexify.
8436
9c3d6531
TT
84372014-02-12 Tom Tromey <tromey@redhat.com>
8438
8439 * tracepoint.c: Include rsp-low.h.
8440 * server.c: Include rsp-low.h.
8441 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8442 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8443 declare.
8444 * remote-utils.c: Include rsp-low.h.
8445 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8446 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8447 (convert_int_to_ascii, convert_ascii_to_int): Move to
8448 common/rsp-low.c.
8449 * regcache.c: Include rsp-low.h.
8450 * ax.c: Include rsp-low.h.
8451 * Makefile.in (SFILES): Add common/rsp-low.c.
8452 (OBS): Add rsp-low.o.
8453 (rsp-low.o): New target.
8454
01fd3ea5
TT
84552014-02-12 Tom Tromey <tromey@redhat.com>
8456
8457 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8458 Include print-utils.h.
8459 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8460 (plongest, thirty_two, phex_nz): Remove.
8461 * Makefile.in (SFILES): Add common/print-utils.c.
8462 (OBS): Add print-utils.o.
8463 (print-utils-ipa.o): New target.
8464 (print-utils.o): New target.
8465 (IPA_OBJS): Add print-utils-ipa.o.
8466
e99dc820
TT
84672014-02-06 Tom Tromey <tromey@redhat.com>
8468
8469 * Makefile.in (SFILES): Fix indentation.
8470
ee1e2d4f
DE
84712014-02-05 Doug Evans <dje@google.com>
8472
8473 * linux-low.c (linux_wait_for_event): Improve comment.
8474 (linux_wait_1): Keep current_inferior in sync with event_child.
8475
f5a02773
DE
84762014-01-22 Doug Evans <dje@google.com>
8477
8478 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8479
87ce2a04
DE
84802014-01-22 Doug Evans <dje@google.com>
8481
8482 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8483 * configure: Regenerate.
8484 * config.in: Regenerate.
8485 * Makefile.in (SFILES): Add debug.c.
8486 (OBS): Add debug.o.
8487 * debug.c: New file.
8488 * debug.h: New file.
8489 * linux-aarch64-low.c (*): Update all debugging printfs to use
8490 debug_printf instead of fprintf.
8491 * linux-arm-low.c (*): Ditto.
8492 * linux-cris-low.c (*): Ditto.
8493 * linux-crisv32-low.c (*): Ditto.
8494 * linux-m32r-low.c (*): Ditto.
8495 * linux-sparc-low.c (*): Ditto.
8496 * linux-x86.c (*): Ditto.
8497 * linux-low.c (*): Ditto.
8498 (linux_wait_1): Add calls to debug_enter, debug_exit.
8499 (linux_wait): Remove redundant debugging printf.
8500 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8501 (linux_resume, unstop_all_lwps): Ditto.
8502 * mem-break.c (*): Update all debugging printfs to use
8503 debug_printf instead of fprintf.
8504 * remote-utils.c (*): Ditto.
8505 * thread-db.c (*): Ditto.
8506 * server.c #include <ctype.h>, "gdb_vecs.h".
8507 (debug_threads): Moved to debug.c.
8508 (*): Update all debugging printfs to use debug_printf instead of
8509 fprintf.
8510 (start_inferior): Replace call to fflush with call to debug_flush.
8511 (monitor_show_help): Mention set debug-format.
8512 (parse_debug_format_options): New function.
8513 (handle_monitor_command): Handle "monitor set debug-format".
8514 (gdbserver_usage): Mention --debug-format.
8515 (main): Parse --debug-format.
8516 * server.h (debug_threads): Declaration moved to debug.h.
8517 #include "debug.h".
8518 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8519 trace_debug_1 that uses debug_printf.
8520 (tracepoint_look_up_symbols): Update all debugging printfs to use
8521 debug_printf instead of fprintf.
8522
e671835b
BS
85232014-01-20 Baruch Siach <baruch@tkos.co.il>
8524
8525 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8526 sys/ptrace.h.
8527
b5737fa9
PA
85282014-01-17 Pedro Alves <palves@redhat.com>
8529
ea38d2a9 8530 PR build/16445
c7faa97a
PA
8531 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8532 defined after including gdb_proc_service.h.
b5737fa9 8533
40ed484e
DE
85342014-01-16 Doug Evans <dje@google.com>
8535
8536 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8537 (match_dll): Use it.
8538
969c39fb
MM
85392014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8540
8541 * target.h (target_ops) <read_btrace>: Change parameters and
8542 return type to allow error reporting.
8543 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8544 trace reading errors on.
8545 * linux-low.c (linux_low_read_btrace): Pass trace reading
8546 errors on.
8547 (linux_low_disable_btrace): New.
8548
ab7f45ba
DE
85492014-01-15 Doug Evans <dje@google.com>
8550
8551 * inferiors.c (thread_id_to_gdb_id): Delete.
8552 * inferiors.h (thread_id_to_gdb_id): Delete.
8553
66af0f44
EZ
85542014-01-13 Eli Zaretskii <eliz@gnu.org>
8555
8556 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8557 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8558 versions.
8559
9939e131
PA
85602014-01-08 Pedro Alves <palves@redhat.com>
8561
8562 * server.c (handle_status): Don't discard previous queued stop
8563 replies or thread's pending status here.
8564 (main) <disconnection>: Do it here instead.
8565
b7ea362b
PA
85662014-01-08 Pedro Alves <palves@redhat.com>
8567
8568 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8569 * server.c (visit_actioned_threads, handle_pending_status): New
8570 function.
8571 (handle_v_cont): Factor out parts to ...
8572 (resume): ... this new function. If in all-stop, and a thread
8573 being resumed has a pending status, report it without actually
8574 resuming.
8575 (myresume): Adjust to use the new 'resume' function.
8576 (clear_pending_status_callback, set_pending_status_callback)
8577 (find_status_pending_thread_callback): New functions.
8578 (handle_status): Handle the case of multiple threads having
8579 interesting statuses to report. Report threads' real last signal
8580 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8581 with an interesting thread to report the status for, instead of
8582 always reporting the status of the first thread.
8583
28498c42
JB
85842014-01-01 Joel Brobecker <brobecker@adacore.com>
8585
8586 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8587 * gdbreplay.c (gdbreplay_version): Likewise.
8588
f45c82da
YZ
85892013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8590
8591 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8592 iov.iov_len with the real length in use.
8593
379a5e2d
JB
85942013-12-13 Joel Brobecker <brobecker@adacore.com>
8595
8596 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8597 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8598 for all targets that use win32-low.c.
8599 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8600 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8601
4210d83e
PA
86022013-12-13 Pedro Alves <palves@redhat.com>
8603
8604 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8605 if equal to TARGET_WAITKIND_LOADED.
8606 * win32-low.c (cached_status): New static global.
8607 (win32_wait): Add declaration.
8608 (do_initial_child_stuff): Flush all initial pending debug events
8609 up to the initial breakpoint.
8610 (win32_wait): If CACHED_STATUS was set, return that instead
8611 of doing a real wait. Remove the code resuming the execution
8612 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8613 during the initial phase. Also remove the code changing
8614 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8615 TARGET_WAITKIND_STOPPED.
8616
e7f0d979
YQ
86172013-12-11 Yao Qi <yao@codesourcery.com>
8618
8619 * notif.c (handle_notif_ack): Return 0 if no notification
8620 matches.
8621
ebcf782c
DE
86222013-11-20 Doug Evans <dje@google.com>
8623
8624 * linux-low.c (linux_set_resume_request): Fix comment.
8625
20ad9378
DE
86262013-11-20 Doug Evans <dje@google.com>
8627
8628 * linux-low.c (resume_status_pending_p): Tweak comment.
8629
a196ebeb
WT
86302013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8631
8632 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8633 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8634 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8635 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8636 (srv_amd64_regobj): Add amd64-mpx.o.
8637 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8638 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8639 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8640 * i387-fp.c (num_pl_bnd_register) Added constant.
8641 (num_pl_bnd_cfg_registers) Added constant.
8642 (struct i387_xsave) Added reserved area and MPX fields.
8643 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8644 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8645 function.
8646 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8647 (init_registers_amd64_mpx_linux): Declare new function.
8648 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8649 (x86_64_regmap): Add MPX registers.
8650 (x86_linux_read_description): Add MPX case.
8651 (initialize_low_arch): Initialize MPX targets.
8652
0080a2f6
TT
86532013-11-18 Tom Tromey <tromey@redhat.com>
8654
8655 * configure: Rebuild.
8656 * configure.ac: Don't check for stdlib.h.
8657 * gdbreplay.c: Unconditionally include stdlib.h.
8658
2978b111
TT
86592013-11-18 Tom Tromey <tromey@redhat.com>
8660
8661 * config.in: Rebuild.
8662 * configure: Rebuild.
8663 * configure.ac: Don't use AC_HEADER_DIRENT.
8664
a3d08894
TT
86652013-11-18 Tom Tromey <tromey@redhat.com>
8666
8667 * server.h: Don't check HAVE_STRING_H.
8668 * gdbreplay.c: Don't check HAVE_STRING_H.
8669 * configure: Rebuild.
8670
0a5dd17d
TT
86712013-11-18 Tom Tromey <tromey@redhat.com>
8672
8673 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8674 LIBGNU.
8675
1bd2f0ba
TT
86762013-11-08 Tom Tromey <tromey@redhat.com>
8677
8678 * configure, config.in: Rebuild.
8679 * configure.ac: Remove unused configury.
8680
3266f10b
TT
86812013-11-08 Tom Tromey <tromey@redhat.com>
8682
8683 * acinclude.m4: Include common.m4, codeset.m4.
8684 * configure, config.in: Rebuild.
8685 * configure.ac: Use GDB_AC_COMMON.
8686
6682d959
AA
86872013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8688
8689 * linux-s390-low.c (HWCAP_S390_TE): New define.
8690 (s390_arch_setup): Consider the TE field in the HWCAP for
8691 determining 'have_regset_tdb'.
8692
fd0a4d76
SDJ
86932013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8694
8695 PR gdb/16014
8696 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8697 call to sizeof.
8698
1a3d890b
PA
86992013-10-02 Pedro Alves <palves@redhat.com>
8700
8701 * server.c (process_serial_event): Don't output "GDBserver
8702 exiting" if GDB is connected through stdio.
8703 * target.c (mywait): Likewise, be silent if GDB is connected
8704 through stdio.
8705
97ad4581
JB
87062013-10-01 Joel Brobecker <brobecker@adacore.com>
8707
8708 * lynx-low.c (lynx_add_threads_after_attach): New function.
8709 (lynx_attach): Remove call to add_thread. Add call to
8710 lynx_add_threads_after_attach instead.
8711
5b4e221c
MF
87122013-09-28 Mike Frysinger <vapier@gentoo.org>
8713
8714 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8715 * config.in, configure: Regenerated.
8716
ee47b2f8
YQ
87172013-09-18 Yao Qi <yao@codesourcery.com>
8718
8719 PR server/15959
8720 * server.c (start_inferior): Clear 'resume_info'.
8721
d6707650 87222013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8723
d6707650
JW
8724 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8725 for each register.
8726
9243dd0e 87272013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8728
9243dd0e
JW
8729 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8730 linux-tile-low.o to srv_tgtobj.
8731
c623a6ef
WN
87322013-09-16 Will Newton <will.newton@linaro.org>
8733
8734 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8735 out regs.
8736
fb71d39e
PA
87372013-09-06 Pedro Alves <palves@redhat.com>
8738
8739 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8740 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8741 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8742 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8743 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8744 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8745
8e7e9910
PA
87462013-09-06 Pedro Alves <palves@redhat.com>
8747
8748 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8749 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8750
7c3a12ca
PA
87512013-09-06 Pedro Alves <palves@redhat.com>
8752
8753 * linux-amd64-ipa.c: Include tracepoint.h.
8754 * linux-i386-ipa.c: Include tracepoint.h.
8755
8eb3d7b6
RW
87562013-09-06 Ricard Wanderlof <ricardw@axis.com>
8757
8758 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8759 (ps_get_thread_area): New function.
8760
eddddb9d
RW
87612013-09-06 Ricard Wanderlof <ricardw@axis.com>
8762
8763 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8764 (initialize_low_arch): Call init_registers_crisv32 rather than
8765 init_register_crisv32.
8766
533b0600
PA
87672013-09-05 Pedro Alves <palves@redhat.com>
8768
8769 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8770 to ...
8771 * hostio.h: ... this new file.
8772 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8773 win32-low.c: Include hostio.h.
8774
0ce3d3b5
PA
87752013-09-05 Pedro Alves <palves@redhat.com>
8776
8777 * server.h (gdb_client_data, handler_func, callback_handler_func)
8778 (delete_file_handler, add_file_handler, append_callback_event)
8779 (delete_callback_event, start_event_loop, initialize_event_loop):
8780 Move to event-loop.h and include it.
8781 * event-loop.h: New file.
8782
799cdc37
PA
87832013-09-05 Pedro Alves <palves@redhat.com>
8784
8785 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8786 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8787 (loaded_dll, unloaded_dll): Move to ...
8788 * dll.h: ... this new file.
8789 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8790
6a6bbd9d
PA
87912013-09-05 Pedro Alves <palves@redhat.com>
8792
8793 * server.h (current_process, get_thread_process, all_processes)
8794 (add_inferior_to_list, for_each_inferior, current_inferior)
8795 (remove_inferior, add_process, remove_process, find_process_pid)
8796 (have_started_inferiors_p, have_attached_inferiors_p)
8797 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8798 (clear_inferiors, find_inferior, find_inferior_id)
8799 (inferior_target_data, set_inferior_target_data)
8800 (inferior_regcache_data, set_inferior_regcache_data): Move to
8801 inferiors.h, and include it.
8802 * inferiors.h: New file.
8803
f699aaba
PA
88042013-09-05 Pedro Alves <palves@redhat.com>
8805
8806 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8807 Move ...
72f4393d 8808 * ax.h: ... here.
f699aaba 8809
c144c7a0
PA
88102013-09-05 Pedro Alves <palves@redhat.com>
8811
8812 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8813 tracepoint.h.
8814 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8815 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8816 (handle_tracepoint_general_set, handle_tracepoint_query)
8817 (tracepoint_finished_step, tracepoint_was_hit)
8818 (release_while_stepping_state_list, current_traceframe)
8819 (in_readonly_region, traceframe_read_mem)
8820 (fetch_traceframe_registers, traceframe_read_sdata)
8821 (traceframe_read_info, struct fast_tpoint_collect_status)
8822 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8823 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8824 (supply_fast_tracepoint_registers)
8825 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8826 (ipa_tdesc, claim_trampoline_space)
8827 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8828 (agent_mem_read, agent_get_trace_state_variable_value)
8829 (agent_set_trace_state_variable_value, agent_tsv_read)
8830 (agent_mem_read_string, get_raw_reg_func_addr)
8831 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8832 * tracepoint.h: ... this new file.
8833
ff42e6ab
PA
88342013-09-05 Pedro Alves <palves@redhat.com>
8835
8836 * server.h (perror_with_name, error, fatal, warning, paddress)
8837 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8838 include it.
8839 * utils.h: New file.
8840
541af0f4
PA
88412013-09-05 Pedro Alves <palves@redhat.com>
8842
8843 * server.h (remote_debug, noack_mode, transport_is_reliable)
8844 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8845 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8846 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8847 (write_enn, initialize_async_io, enable_async_io)
8848 (disable_async_io, check_remote_input_interrupt_request)
8849 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8850 (dead_thread_notify, prepare_resume_reply)
8851 (decode_address_to_semicolon, decode_address, decode_m_packet)
8852 (decode_M_packet, decode_X_packet, decode_xfer_write)
8853 (decode_search_memory_packet, unhexify, hexify)
8854 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8855 (look_up_one_symbol, relocate_instruction)
8856 (monitor_output): Move to remote-utils.h, and include it.
8857 * remote-utils.h: New file.
8858
eebdf26b
PA
88592013-09-05 Pedro Alves <palves@redhat.com>
8860
8861 * server.h (_): Delete.
8862
3aafd2ff
PA
88632013-09-02 Pedro Alves <palves@redhat.com>
8864
8865 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8866 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8867 allocated.
8868 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8869
cee83bcb
PM
88702013-09-02 Pierre Muller <muller@sourceware.org>
8871
8872 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8873 or WriteProcessMemory complete successfully and handle
8874 ERROR_PARTIAL_COPY error.
8875
9a13b2fa
PA
88762013-09-02 Pedro Alves <palves@redhat.com>
8877
8878 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8879 error instead of EIO.
8880
602e3198
JK
88812013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8882
8883 PR server/15604
8884 * linux-low.c: Include filestuff.h.
8885 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8886 * lynx-low.c: Include filestuff.h.
8887 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8888 * server.c: Include filestuff.h.
8889 (main): Call notice_open_fds.
8890 * spu-low.c: Include filestuff.h.
8891 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8892
96d7229d
LM
88932013-08-22 Luis Machado <lgustavo@codesourcery.com>
8894
8895 * Makefile.in: Explain why ../target and ../nat are not
8896 listed as include file search paths.
8897 (linux-waitpid.o): New object file rule.
8898 * configure.srv (srv_native_linux_obj): New variable.
8899 Replace all occurrences of linux native object files with
8900 $srv_native_linux_obj.
8901 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8902 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8903 (linux_enable_event_reporting): Remove declaration.
8904 (my_waitpid): Moved to common/linux-waitpid.c.
8905 (linux_wait_for_event): Pass ptid when calling
8906 linux_enable_event_reporting.
8907 (linux_supports_tracefork_flag): Remove.
8908 (linux_enable_event_reporting): Likewise.
8909 (linux_tracefork_grandchild): Remove.
8910 (STACK_SIZE): Moved to common/linux-ptrace.c.
8911 (linux_tracefork_child): Remove.
8912 (linux_test_for_tracefork): Remove.
8913 (linux_look_up_symbols): Call linux_supports_traceclone.
8914 (initialize_low): Remove call to linux_test_for_tracefork.
8915 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8916 common/linux-ptrace.h.
8917 (PTRACE_TYPE_ARG4): Likewise.
8918 Include linux-ptrace.h.
8919
32940073
PA
89202013-08-21 Pedro Alves <palves@redhat.com>
8921
8922 * config.in: Renegerate.
8923
33b60d58 89242013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8925
33b60d58
LM
8926 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8927 (SFILES): Remove $(srcdir)/common/target-common.c and
8928 add $(srcdir)/target/waitstatus.c.
8929 (OBS): Remove target-common.o and add waitstatus.o.
8930 (server_h): Remove $(srcdir)/../common/target-common.h and
8931 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8932 and $(srcdir)/../target/waitstatus.h.
8933 (target-common.o): Remove.
8934 (waitstatus.o): New target object file.
8935 * target.h: Do not include target-common.h and
8936 include target/resume.h, target/wait.h and
8937 target/waitstatus.h.
8938
b8e1b30e
LM
89392013-08-13 Luis Machado <lgustavo@codesourcery.com>
8940
8941 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8942 to PTRACE_TYPE_ARG3.
8943 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8944 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8945 PTRACE_TYPE_ARG4.
8946 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8947 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8948
7a60ad40
YQ
89492013-07-27 Jie Zhang <jie@codesourcery.com>
8950 Daniel Jacobowitz <dan@codesourcery.com>
8951 Yao Qi <yao@codesourcery.com>
8952
8953 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8954 (mips-linux-watch.o): New rule.
8955 (mips_linux_watch_h): New variable.
8956 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8957 srv_tgtobj.
8958 * linux-mips-low.c: Include mips-linux-watch.h.
8959 (struct arch_process_info, struct arch_lwp_info): New.
8960 (update_watch_registers_callback): New function.
8961 (mips_linux_new_process, mips_linux_new_thread) New functions.
8962 (mips_linux_prepare_to_resume, mips_insert_point): New
8963 functions.
8964 (mips_remove_point, mips_stopped_by_watchpoint): New
8965 functions.
8966 (rsp_bp_type_to_target_hw_bp_type): New function.
8967 (mips_stopped_data_address): New function.
8968 (the_low_target): Add watchpoint support functions.
8969
de6f69ad
YQ
89702013-07-27 Yao Qi <yao@codesourcery.com>
8971
8972 * i386-low.c: Include break-common.h.
8973 (enum target_hw_bp_type): Remove.
8974
3360c0bf
LM
89752013-07-24 Luis Machado <lgustavo@codesourcery.com>
8976
8977 * Makefile.in (SFILES): /common/target-common.c.
8978 (OBS): Add target-common.o.
8979 (server_h): Add $(srcdir)/../common/target-common.h.
8980 (target-common.o): New target.
8981 * server.c (queue_stop_reply_callback): Free
8982 status string after use.
8983 * target.c (target_waitstatus_to_string): Remove.
8984 * target.h: Include target-common.h.
8985 (resume_kind): Likewise.
8986 (target_waitkind): Likewise.
8987 (target_waitstatus): Likewise.
8988 (TARGET_WNOHANG): Likewise.
8989
bd885420
YQ
89902013-07-04 Yao Qi <yao@codesourcery.com>
8991
8992 * Makefile.in (host_alias): Use @host_noncanonical@.
8993 (target_alias): Use @target_noncanonical@.
8994 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8995 ACX_NONCANONICAL_HOST.
8996 * configure: Regenerated.
8997
8998 Revert:
8999 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9000
9001 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9002 * configure: Rebuild.
9003 * Makefile.in (version_host, version_target): Get from configure.
9004 (version.c): Use $(version_host) and $(version_target).
9005
17ef446e
PA
90062013-07-03 Pedro Alves <palves@redhat.com>
9007
9008 * Makefile.in (config.status): Depend on development.sh.
9009 * acinclude.m4: Include libmcheck.m4.
9010 * configure: Regenerate.
9011
7a9a7487
MG
90122013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9013
9014 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9015 attribute inside the parentheses.
9016 (winapi_DebugSetProcessKillOnExit): Ditto.
9017 (winapi_DebugBreakProcess): Ditto.
9018 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9019
49b64de6
MG
90202013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9021
9022 * notif.h (notif_event): Add a dummy member to avoid compiler
9023 errors.
9024
d5749ee7
PA
90252013-07-01 Pedro Alves <palves@redhat.com>
9026
9027 * hostio.c (HOSTIO_PATH_MAX): Define.
9028 (require_filename, handle_open, handle_unlink, handle_readlink):
9029 Use it.
9030
d8d2a3ee
PA
90312013-07-01 Pedro Alves <palves@redhat.com>
9032
9033 * server.h: Include "pathmax.h".
9034 * linux-low.c: Don't include sys/param.h.
9035 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9036 MAXPATHLEN.
9037 * win32-low.c: Don't include sys/param.h.
9038 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9039
bc7dea8d
PA
90402013-07-01 Pedro Alves <palves@redhat.com>
9041
9042 * event-loop.c: Don't check HAVE_UNISTD_H before including
9043 <unistd.h>.
9044 * gdbreplay.c: Likewise.
9045 * remote-utils.c: Likewise.
9046 * server.c: Likewise.
9047 * configure.ac: Don't check for unistd.h.
9048 * configure: Regenerate.
9049
d6c2da54
TT
90502013-06-28 Tom Tromey <tromey@redhat.com>
9051
9052 * Makefile.in (version.c): Use version.in, not
9053 common/version.in.
9054
257b6bec
MG
90552013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9056
9057 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9058 * configure: Rebuild.
9059 * Makefile.in (version_host, version_target): Get from configure.
9060 (version.c): Use $(version_host) and $(version_target).
9061
86ebe149
DK
90622013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9063
9064 Fix trace-status to output user name without trailing colon.
9065 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9066
f30aa5af
DK
90672013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9068
9069 Fix trace-status to output proper start-time and stop-time.
9070 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9071 output start time and stop time in hex as gdb expects.
9072
28a93511
YQ
90732013-06-26 Pedro Alves <pedro@codesourcery.com>
9074
9075 * tracepoint.c (build_traceframe_info_xml): Output trace state
9076 variables present in the trace buffer.
9077
01208463
TT
90782013-06-24 Tom Tromey <tromey@redhat.com>
9079
9080 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9081 create-version.sh.
9082 (version.o): Remove.
9083 * gdbreplay.c: Include version.h.
9084 (version, host_name): Don't declare.
9085 * server.h: Include version.h.
9086 (version, host_name): Don't declare.
9087
760256f9
PA
90882013-06-12 Pedro Alves <palves@redhat.com>
9089
9090 * linux-x86-low.c (linux_is_elf64): Delete global.
9091 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9092 with local linux_pid_exe_is_elf_64_file use.
9093
030031ee
PA
90942013-06-11 Pedro Alves <palves@redhat.com>
9095
9096 * linux-low.c (regset_disabled, disable_regset): New functions.
9097 (regsets_fetch_inferior_registers)
9098 (regsets_store_inferior_registers): Use them.
9099 (initialize_regsets_info); Don't allocate the disabled_regsets
9100 array here.
9101 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9102 comment.
9103
5da6eb0a
PA
91042013-06-11 Pedro Alves <palves@redhat.com>
9105
9106 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9107 xmalloc.
9108
7e5aaa09
PA
91092013-06-11 Pedro Alves <palves@redhat.com>
9110
9111 * linux-x86-low.c (initialize_low_arch): Call
9112 init_registers_x32_avx_linux.
9113
d878444c
JK
91142013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 Fix compatibility with Android Bionic.
9117 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9118 it is not empty.
9119
3aee8918
PA
91202013-06-07 Pedro Alves <palves@redhat.com>
9121
5f2b57b5 9122 PR server/14823
3aee8918
PA
9123 * Makefile.in (OBS): Add tdesc.o.
9124 (IPA_OBJS): Add tdesc-ipa.o.
9125 (tdesc-ipa.o): New rule.
9126 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9127 interface.
9128 * linux-low.c (new_inferior): Delete.
9129 (disabled_regsets, num_regsets): Delete.
9130 (linux_add_process): Adjust to set the new per-process
9131 new_inferior flag.
9132 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9133 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9134 was a stop. When calling arch_setup, switch the current inferior
9135 to the thread that got an event.
9136 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9137 (regsets_fetch_inferior_registers)
9138 (regsets_store_inferior_registers): New regsets_info parameter.
9139 Adjust to use it.
9140 (linux_register_in_regsets): New regs_info parameter. Adjust to
9141 use it.
9142 (register_addr, fetch_register, store_register): New usrregs_info
9143 parameter. Adjust to use it.
9144 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9145 parameter regs_info. Adjust to use it.
9146 (linux_fetch_registers): Get the current inferior's regs_info, and
9147 adjust to use it.
9148 (linux_store_registers): Ditto.
9149 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9150 (initialize_low): Don't initialize the target_regsets here. Call
9151 initialize_low_arch.
9152 * linux-low.h (target_regsets): Delete declaration.
9153 (struct regsets_info): New.
9154 (struct usrregs_info): New.
9155 (struct regs_info): New.
9156 (struct process_info_private) <new_inferior>: New field.
9157 (struct linux_target_ops): Delete the num_regs, regmap, and
9158 regset_bitmap fields. New field regs_info.
9159 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9160 * i387-fp.c (num_xmm_registers): Delete.
9161 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9162 calls to new interface.
9163 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9164 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9165 Infer the number of xmm registers from the regcache's target
9166 description.
9167 * i387-fp.h (num_xmm_registers): Delete.
9168 * inferiors.c (add_thread): Don't install the thread's regcache
9169 here.
9170 * proc-service.c (gregset_info): Fetch the current inferior's
9171 regs_info. Adjust to use it.
9172 * regcache.c: Include tdesc.h.
9173 (register_bytes, reg_defs, num_registers)
9174 (gdbserver_expedite_regs): Delete.
9175 (get_thread_regcache): If the thread doesn't have a regcache yet,
9176 create one, instead of aborting gdbserver.
9177 (regcache_invalidate_one): Rename to ...
9178 (regcache_invalidate_thread): ... this.
9179 (regcache_invalidate_one): New.
9180 (regcache_invalidate): Only invalidate registers of the current
9181 process.
9182 (init_register_cache): Add target_desc parameter, and use it.
9183 (new_register_cache): Ditto. Assert the target description has a
9184 non zero registers_size.
9185 (regcache_cpy): Add assertions. Adjust.
9186 (realloc_register_cache, set_register_cache): Delete.
9187 (registers_to_string, registers_from_string): Adjust.
9188 (find_register_by_name, find_regno, find_register_by_number)
9189 (register_cache_size): Add target_desc parameter, and use it.
9190 (free_register_cache_thread, free_register_cache_thread_one)
9191 (regcache_release, register_cache_size): New.
9192 (register_size): Add target_desc parameter, and use it.
9193 (register_data, supply_register, supply_register_zeroed)
9194 (supply_regblock, supply_register_by_name, collect_register)
9195 (collect_register_as_string, collect_register_by_name): Adjust.
9196 * regcache.h (struct target_desc): Forward declare.
9197 (struct regcache) <tdesc>: New field.
9198 (init_register_cache, new_register_cache): Add target_desc
9199 parameter.
9200 (regcache_invalidate_thread): Declare.
9201 (regcache_invalidate_one): Delete declaration.
9202 (regcache_release): Declare.
9203 (find_register_by_number, register_cache_size, register_size)
9204 (find_regno): Add target_desc parameter.
9205 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9206 declarations.
9207 * remote-utils.c: Include tdesc.h.
9208 (outreg, prepare_resume_reply): Adjust.
9209 * server.c: Include tdesc.h.
9210 (gdbserver_xmltarget): Delete declaration.
9211 (get_features_xml, process_serial_event): Adjust.
9212 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9213 declare.
9214 (struct process_info) <tdesc>: New field.
9215 (ipa_tdesc): Declare.
9216 * tdesc.c: New file.
9217 * tdesc.h: New file.
9218 * tracepoint.c: Include tdesc.h.
9219 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9220 (get_context_regcache): Adjust to pass ipa_tdesc down.
9221 (do_action_at_tracepoint): Adjust to get the register cache size
9222 from the context regcache's description.
9223 (traceframe_walk_blocks): Adjust to get the register cache size
9224 from the current trace frame's description.
9225 (traceframe_get_pc): Adjust to get current trace frame's
9226 description and pass it down.
9227 (gdb_collect): Adjust to get the register cache size from the
9228 IPA's description.
9229 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9230 (gdbserver_xmltarget): Delete.
9231 (initialize_low_tracepoint): Set the ipa's target description.
9232 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9233 (initialize_low_tracepoint): Set the ipa's target description.
9234 * linux-x86-low.c: Include tdesc.h.
9235 [__x86_64__] (is_64bit_tdesc): New.
9236 (ps_get_thread_area, x86_get_thread_area): Use it.
9237 (i386_cannot_store_register): Rename to ...
9238 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9239 (i386_cannot_fetch_register): Rename to ...
9240 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9241 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9242 to new interface.
9243 (target_regsets): Rename to ...
9244 (x86_regsets): ... this.
9245 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9246 interface.
9247 (x86_siginfo_fixup): Use is_64bit_tdesc.
9248 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9249 (tdesc_x32_avx_linux, tdesc_x32_linux)
9250 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9251 Declare.
9252 (x86_linux_update_xmltarget): Delete.
9253 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9254 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9255 (AMD64_LINUX_USER64_CS): New.
9256 (x86_linux_read_description): New, based on
9257 x86_linux_update_xmltarget.
9258 (same_process_callback): New.
9259 (x86_arch_setup_process_callback): New.
9260 (x86_linux_update_xmltarget): New.
9261 (x86_regsets_info): New.
9262 (amd64_linux_regs_info): New.
9263 (i386_linux_usrregs_info): New.
9264 (i386_linux_regs_info): New.
9265 (x86_linux_regs_info): New.
9266 (x86_arch_setup): Reimplement.
9267 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9268 (x86_emit_ops): Ditto.
9269 (the_low_target): Adjust. Install x86_linux_regs_info,
9270 x86_cannot_fetch_register, and x86_cannot_store_register.
9271 (initialize_low_arch): New.
9272 * linux-ia64-low.c (tdesc_ia64): Declare.
9273 (ia64_fetch_register): Adjust.
9274 (ia64_usrregs_info, regs_info): New globals.
9275 (ia64_regs_info): New function.
9276 (the_low_target): Adjust.
9277 (initialize_low_arch): New function.
9278 * linux-sparc-low.c (tdesc_sparc64): Declare.
9279 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9280 Adjust.
9281 (sparc_arch_setup): New function.
9282 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9283 (the_low_target): Adjust.
9284 (initialize_low_arch): New function.
9285 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9286 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9287 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9288 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9289 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9290 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9291 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9292 (tdesc_powerpc_isa205_vsx64l): Declare.
9293 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9294 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9295 (ppc_set_pc, ppc_get_hwcap): Adjust.
9296 (ppc_usrregs_info): Forward declare.
9297 (!__powerpc64__) ppc_regmap_adjusted: New global.
9298 (ppc_arch_setup): Adjust to the current process'es target
9299 description.
9300 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9301 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9302 (ppc_store_evrregset): Adjust.
9303 (target_regsets): Rename to ...
9304 (ppc_regsets): ... this, and make static.
9305 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9306 (ppc_regs_info): New function.
9307 (the_low_target): Adjust.
9308 (initialize_low_arch): New function.
9309 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9310 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9311 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9312 (tdesc_s390x_linux64v2): Declare.
9313 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9314 (s390_fill_gregset, s390_store_last_break): Adjust.
9315 (target_regsets): Rename to ...
9316 (s390_regsets): ... this, and make static.
9317 (s390_get_pc, s390_set_pc): Adjust.
9318 (s390_get_hwcap): New target_desc parameter, and use it.
9319 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9320 (s390_arch_setup): Adjust to set the current process'es target
9321 description. Don't adjust the regmap.
9322 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9323 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9324 (regs_info_3264): New globals.
9325 (s390_regs_info): New function.
9326 (the_low_target): Adjust.
9327 (initialize_low_arch): New function.
9328 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9329 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9330 [__mips64] (init_registers_mips_linux)
9331 (init_registers_mips_dsp_linux): Delete defines.
9332 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9333 (have_dsp): New global.
9334 (mips_read_description): New, based on mips_arch_setup.
9335 (mips_arch_setup): Reimplement.
9336 (get_usrregs_info): New function.
9337 (mips_cannot_fetch_register, mips_cannot_store_register)
9338 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9339 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9340 (target_regsets): Rename to ...
9341 (mips_regsets): ... this, and make static.
9342 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9343 (dsp_regs_info, regs_info): New globals.
9344 (mips_regs_info): New function.
9345 (the_low_target): Adjust.
9346 (initialize_low_arch): New function.
9347 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9348 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9349 Declare.
9350 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9351 (arm_read_description): New, with bits factored from
9352 arm_arch_setup.
9353 (arm_arch_setup): Reimplement.
9354 (target_regsets): Rename to ...
9355 (arm_regsets): ... this, and make static.
9356 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9357 (arm_regs_info): New function.
9358 (the_low_target): Adjust.
9359 (initialize_low_arch): New function.
9360 * linux-m68k-low.c (tdesc_m68k): Declare.
9361 (target_regsets): Rename to ...
9362 (m68k_regsets): ... this, and make static.
9363 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9364 (m68k_regs_info): New function.
9365 (m68k_arch_setup): New function.
9366 (the_low_target): Adjust.
9367 (initialize_low_arch): New function.
9368 * linux-sh-low.c (tdesc_sharch): Declare.
9369 (target_regsets): Rename to ...
9370 (sh_regsets): ... this, and make static.
9371 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9372 (sh_regs_info, sh_arch_setup): New functions.
9373 (the_low_target): Adjust.
9374 (initialize_low_arch): New function.
9375 * linux-bfin-low.c (tdesc_bfin): Declare.
9376 (bfin_arch_setup): New function.
9377 (bfin_usrregs_info, regs_info): New globals.
9378 (bfin_regs_info): New function.
9379 (the_low_target): Adjust.
9380 (initialize_low_arch): New function.
9381 * linux-cris-low.c (tdesc_cris): Declare.
9382 (cris_arch_setup): New function.
9383 (cris_usrregs_info, regs_info): New globals.
9384 (cris_regs_info): New function.
9385 (the_low_target): Adjust.
9386 (initialize_low_arch): New function.
9387 * linux-cris-low.c (tdesc_crisv32): Declare.
9388 (cris_arch_setup): New function.
9389 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9390 (cris_regs_info): New function.
9391 (the_low_target): Adjust.
9392 (initialize_low_arch): New function.
9393 * linux-m32r-low.c (tdesc_m32r): Declare.
9394 (m32r_arch_setup): New function.
9395 (m32r_usrregs_info, regs_info): New globals.
9396 (m32r_regs_info): Adjust.
9397 (initialize_low_arch): New function.
9398 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9399 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9400 (tic6x_usrregs_info): Forward declare.
9401 (tic6x_read_description): New function, based on ...
9402 (tic6x_arch_setup): ... this. Reimplement.
9403 (target_regsets): Rename to ...
9404 (tic6x_regsets): ... this, and make static.
9405 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9406 (tic6x_regs_info): New function.
9407 (the_low_target): Adjust.
9408 (initialize_low_arch): New function.
9409 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9410 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9411 (target_regsets): Rename to ...
9412 (xtensa_regsets): ... this, and make static.
9413 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9414 globals.
9415 (xtensa_arch_setup, xtensa_regs_info): New functions.
9416 (the_low_target): Adjust.
9417 (initialize_low_arch): New function.
9418 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9419 (nios2_arch_setup): Set the current process'es tdesc.
9420 (target_regsets): Rename to ...
9421 (nios2_regsets): ... this.
9422 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9423 (nios2_regs_info): New function.
9424 (the_low_target): Adjust.
9425 (initialize_low_arch): New function.
a261b8f5
PA
9426 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9427 (aarch64_arch_setup): Set the current process'es tdesc.
9428 (target_regsets): Rename to ...
9429 (aarch64_regsets): ... this.
9430 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9431 (aarch64_regs_info): New function.
9432 (the_low_target): Adjust.
9433 (initialize_low_arch): New function.
3aee8918
PA
9434 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9435 globals.
9436 (target_regsets): Rename to ...
9437 (tile_regsets): ... this.
9438 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9439 (tile_regs_info): New function.
9440 (tile_arch_setup): Set the current process'es tdesc.
9441 (the_low_target): Adjust.
9442 (initialize_low_arch): New function.
9443 * spu-low.c (tdesc_spu): Declare.
9444 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9445 * win32-arm-low.c (tdesc_arm): Declare.
9446 (arm_arch_setup): New function.
9447 (the_low_target): Install arm_arch_setup instead of
9448 init_registers_arm.
9449 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9450 (init_windows_x86): Rename to ...
9451 (i386_arch_setup): ... this. Set `win32_tdesc'.
9452 (the_low_target): Adjust.
9453 * win32-low.c (win32_tdesc): New global.
9454 (child_add_thread): Don't create the thread cache here.
9455 (do_initial_child_stuff): Set the new process'es tdesc.
9456 * win32-low.h (struct target_desc): Forward declare.
9457 (win32_tdesc): Declare.
9458 * lynx-i386-low.c (tdesc_i386): Declare global.
9459 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9460 * lynx-low.c (lynx_tdesc): New global.
9461 (lynx_add_process): Set the new process'es tdesc.
9462 * lynx-low.h (struct target_desc): Forward declare.
9463 (lynx_tdesc): Declare global.
9464 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9465 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9466 * nto-low.c (nto_tdesc): New global.
9467 (do_attach): Set the new process'es tdesc.
9468 * nto-low.h (struct target_desc): Forward declare.
9469 (nto_tdesc): Declare.
9470 * nto-x86-low.c (tdesc_i386): Declare.
9471 (nto_x86_arch_setup): Set `nto_tdesc'.
9472
b1fbec62
GB
94732013-06-04 Gary Benson <gbenson@redhat.com>
9474
9475 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9476 to qSupported response when appropriate.
9477 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9478 with nonzero-length annex.
9479 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9480 arguments supplied in annex.
9481
d1ec4ce7
DE
94822013-05-31 Doug Evans <dje@google.com>
9483
ac44adcb 9484 PR server/15594
d1ec4ce7
DE
9485 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9486 64 bits in 64-cross-32 environment.
9487
9b25f2d3
PA
94882013-05-28 Pedro Alves <palves@redhat.com>
9489
9490 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9491 (aarch64-without-fpu.c): Delete rule.
9492 * configure.srv (aarch64*-*-linux*): Remove references to
9493 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9494 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9495 declaration.
9496
6740dc9c
PA
94972013-05-24 Pedro Alves <palves@redhat.com>
9498
9499 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9500 instead of strchr/decode_address. Error if the range isn't split
9501 with a ','. Don't assume there's be a ':' in the action.
9502
c2d6af84
PA
95032013-05-23 Yao Qi <yao@codesourcery.com>
9504 Pedro Alves <palves@redhat.com>
9505
9506 * linux-low.c (lwp_in_step_range): New function.
9507 (linux_wait_1): If the thread was range stepping and stopped
9508 outside the stepping range, report the stop to GDB. Otherwise,
9509 continue stepping. Add range stepping debug output.
9510 (linux_set_resume_request): Copy the step range from the resume
9511 request to the lwp.
9512 (linux_supports_range_stepping): New.
9513 (linux_target_ops) <supports_range_stepping>: Set to
9514 linux_supports_range_stepping.
9515 * linux-low.h (struct linux_target_ops)
9516 <supports_range_stepping>: New field.
9517 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9518 * linux-x86-low.c (x86_supports_range_stepping): New.
9519 (the_low_target) <supports_range_stepping>: Set to
9520 x86_supports_range_stepping.
9521 * server.c (handle_v_cont): Handle 'r' action.
9522 (handle_v_requests): Append ";r" if the target supports range
9523 stepping.
9524 * target.h (struct thread_resume) <step_range_start,
9525 step_range_end>: New fields.
9526 (struct target_ops) <supports_range_stepping>:
9527 New field.
9528 (target_supports_range_stepping): New macro.
9529
58794e1a
JB
95302013-05-17 Joel Brobecker <brobecker@adacore.com>
9531
9532 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9533 confusion in comment.
9534
d631c5a7
JB
95352013-05-17 Joel Brobecker <brobecker@adacore.com>
9536
9537 * lynx-low.c (struct process_info_private): New type.
9538 (lynx_add_process): New function.
9539 (lynx_create_inferior, lynx_attach): Replace calls to
9540 add_process by calls to lynx_add_process.
9541 (lynx_resume): If PTID is null, then try using
9542 current_process()->private->last_wait_event_ptid.
9543 Add comments.
9544 (lynx_clear_inferiors): Delete. The contents of that function
9545 has been inlined in lynx_mourn;
9546 (lynx_wait_1): Save the ptid in the process's private data.
9547 (lynx_mourn): Free the process' private data. Replace call
9548 to lynx_clear_inferiors by call to clear_inferiors.
9549
96f7a20f
YQ
95502013-05-17 Yao Qi <yao@codesourcery.com>
9551
9552 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9553 the right place.
9554
db0dfaa0
LM
95552013-05-16 Luis Machado <lgustavo@codesourcery.com>
9556
9557 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9558 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9559 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9560 PT_TEXT_END_ADDR guards. Update comments.
9561 (linux_target_op) <read_offsets>: Conditionally define to
9562 linux_read_offsets if the target is UCLIBC and if it defines
9563 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9564
68f5f838
SL
95652013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9566 Andrew Jenner <andrew@codesourcery.com>
9567
9568 * Makefile.in (SFILES): Add linux-nios2-low.c.
9569 (clean): Add action to delete nios2-linux.c.
9570 (nios2-linux.c): New rule.
9571 * configure.srv: Add nios2*-*-linux*.
9572 * linux-nios2-low.c: New.
9573
1ebff1fd
HAQ
95742013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9575
9576 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9577
f6150862
HZ
95782013-04-25 Hui Zhu <hui@codesourcery.com>
9579
9580 PR gdb/15186
f6150862
HZ
9581 * ax.c (ax_printf): Add fflush.
9582
614c279d
TT
95832013-04-22 Tom Tromey <tromey@redhat.com>
9584
9585 * Makefile.in (SFILES): Add filestuff.c.
9586 (OBS): Add filestuff.o.
9587 (filestuff.o): New target.
9588 * config.in, configure: Rebuild.
9589 * configure.ac: Check for fdwalk, pipe2.
9590
7d4e5717
PA
95912013-04-17 Pedro Alves <palves@redhat.com>
9592
9593 * configure.ac (USE_THREAD_DB): Delete variable.
9594 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9595 Don't AC_SUBST USE_THREAD_DB.
9596 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9597 * config.in, configure: Regenerate.
9598
d5c93e41
PA
95992013-04-16 Pedro Alves <palves@redhat.com>
9600
9601 * linux-low.h (struct lwp_info) <thread_known>: Move under
9602 the USE_THREAD_DB #ifdef.
9603
04f5fe89
PA
96042013-04-16 Pedro Alves <palves@redhat.com>
9605
9606 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9607 (linux-low.o): Delete rule.
9608 * linux-low.h: Always include "gdb_thread_db.h" instead of
9609 conditionally including thread_db.h.
9610 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9611 HAVE_THREAD_DB_H.
9612
480b27bf
JK
96132013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9614
9615 * Makefile.in (install-only): Fix make install regression.
9616
43662968
JK
96172013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9618
9619 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9620 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9621 installation.
9622 * gdbserver.1: Remove.
9623
3e74e146
PA
96242013-03-22 Pedro Alves <palves@redhat.com>
9625
9626 * linux-low.c (handle_extended_wait): Don't call
9627 linux_enable_event_reporting.
9628
a8347a2a
TT
96292013-03-15 Tony Theodore <tonyt@logyst.com>
9630
9631 PR build/9098:
9632 * Makefile.in (SHELL): Use @SHELL@.
9633
eeb56fa7
SDJ
96342013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9635
9636 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9637 compiler warning.
9638
4fa7e2ff
JB
96392013-03-13 Joel Brobecker <brobecker@adacore.com>
9640
9641 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9642 Remove extraneous NULL element.
9643
8ddb1965
YQ
96442013-03-13 Yao Qi <yao@codesourcery.com>
9645
9646 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9647 'V' block in trace frame.
9648
9accd112
MM
96492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9650
9651 * target.h (struct target_ops): Add btrace ops.
9652 (target_supports_btrace): New macro.
9653 (target_enable_btrace): New macro.
9654 (target_disable_btrace): New macro.
9655 (target_read_btrace): New macro.
9656 * gdbthread.h (struct thread_info): Add btrace field.
9657 * server.c: Include btrace-common.h.
9658 (handle_btrace_general_set): New function.
9659 (handle_btrace_enable): New function.
9660 (handle_btrace_disable): New function.
9661 (handle_general_set): Call handle_btrace_general_set.
9662 (handle_qxfer_btrace): New function.
9663 (struct qxfer qxfer_packets[]): Add btrace entry.
9664 * inferiors.c (remove_thread): Disable btrace.
9665 * linux-low: Include linux-btrace.h.
9666 (linux_low_enable_btrace): New function.
9667 (linux_low_read_btrace): New function.
9668 (linux_target_ops): Add btrace ops.
9669 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9670 Add srv_linux_btrace=yes.
9671 (x86_64-*-linux*): Add linux-btrace.o.
9672 Add srv_linux_btrace=yes.
9673 * configure.ac: Define HAVE_LINUX_BTRACE.
9674 * config.in: Regenerated.
9675 * configure: Regenerated.
9676
5cc22e4c
MM
96772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9678
9679 * server.c (handle_qxfer): Preserve error message if -3 is
9680 returned.
9681 (qxfer): Document the -3 return value.
9682
7c97f91e
MM
96832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9684
9685 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9686 (linux_btrace_h): New variable.
9687 (linux-btrace.o): New rule.
9688
be9a119c 96892013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9690 Hafiz Abid Qadeer <abidh@codesourcery.com>
9691
9692 * tracepoint.c (trace_buffer_size): New global.
9693 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9694 (init_trace_buffer): Change to one-argument function. Allocate
9695 trace buffer memory.
9696 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9697 handle QTBuffer:size packet.
9698 (cmd_bigqtbuffer_size): New function.
9699 (initialize_tracepoint): Call init_trace_buffer with
9700 DEFAULT_TRACE_BUFFER_SIZE.
9701 * server.c (handle_query): Add QTBuffer:size in the
9702 supported packets.
9703
e64f7499
YQ
97042013-03-07 Yao Qi <yao@codesourcery.com>
9705
9706 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9707 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9708 of -1.
9709 (cmd_qtsp): Adjust condition. Do post increment.
9710 Set cur_action and cur_step_action back to 0.
9711
f0ae6fc3
PA
97122013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9713
9714 PR server/15236
9715 * linux-low.c (linux_write_memory): Return early success if LEN is
9716 zero.
9717
b5b0b0af
CV
97182013-03-05 Corinna Vinschen <vinschen@redhat.de>
9719
334ad4a8 9720 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9721
589bc927
TT
97222013-02-28 Tom Tromey <tromey@redhat.com>
9723
9724 * configure.ac: Invoke AC_SYS_LARGEFILE.
9725 * configure, config.in: Rebuild.
9726
dfe07582
CV
97272013-02-28 Corinna Vinschen <vinschen@redhat.com>
9728
9729 * win32-low.c: Throughout, fix format strings and casts of
9730 printf-like functions to avoid type related warnings on all
9731 platforms.
9732 (get_child_debug_event): Print dwDebugEventCode as hex since
9733 that's how it's usually documented.
9734
736cd585
YQ
97352013-02-28 Yao Qi <yao@codesourcery.com>
9736
9737 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9738 pulongest.
9739
e1f58301
JW
97402013-02-27 Jiong Wang <jiwang@tilera.com>
9741
9742 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9743 (reg-tilegx32.c): New rule.
9744 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9745 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9746 different register info initializer according to elf class.
9747 (init_registers_tilgx32): New function. The tilegx32 register info
9748 initializer.
9749 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9750 (tile_store_gregset): Likewise.
9751
d171ca78
YQ
97522013-02-27 Yao Qi <yao@codesourcery.com>
9753
9754 * server.c (process_point_options): Print debug message when
9755 debug_threads is true.
9756
282bbdf3
YQ
97572013-02-26 Yao Qi <yao@codesourcery.com>
9758
9759 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9760
aca22551
PA
97612013-02-19 Pedro Alves <palves@redhat.com>
9762 Kai Tietz <ktietz@redhat.com>
9763
9764 PR gdb/15161
9765
9766 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9767 instead of strtoul to extract address from packet.
9768 (process_serial_event) <'z'>: Likewise.
9769
4f3cee1c
YQ
97702013-02-18 Yao Qi <yao@codesourcery.com>
9771
9772 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9773
8e1d55a3
PA
97742013-02-14 Pedro Alves <palves@redhat.com>
9775
9776 Plug memory leak.
9777
9778 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9779 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9780
458820da
PA
97812013-02-14 Pedro Alves <palves@redhat.com>
9782
9783 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9784
baea0dae
PA
97852013-02-14 Pedro Alves <palves@redhat.com>
9786
9787 * tracepoint.c (save_string): Delete.
9788 (add_tracepoint_action): Use savestring instead of save_string.
9789
0b1afbb3
PA
97902013-02-12 Pedro Alves <palves@redhat.com>
9791
9792 * linux-xtensa-low.c: Ditto.
9793 * xtensa-xtregs.c: Ditto.
9794
8a4ac37e
PA
97952013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9796
9797 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9798 thread_db.
9799
148de6bb
MS
98002013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9801
9802 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9803 aarch64_num_wp_regs and aarch64_num_bp_regs to
9804 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9805
55fac6e0
MS
98062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9807
9808 * linux-aarch64-low.c (ps_get_thread_area): Replace
9809 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9810
176eb98c
MS
98112013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9812 Marcus Shawcroft <marcus.shawcroft@arm.com>
9813 Nigel Stephens <nigel.stephens@arm.com>
9814 Yufeng Zhang <yufeng.zhang@arm.com>
9815
9816 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9817 (aarch64.c, aarch64-without-fpu.c): New targets.
9818 * configure.srv (aarch64*-*-linux*): New.
9819 * linux-aarch64-low.c: New file.
9820
56f7af9c
MS
98212013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9822
43aaf8b6 9823 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9824 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9825 (dequeue_one_deferred_signal, linux_resume_one_thread)
9826 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9827 (linux_tracefork_grandchild, linux_test_for_tracefork)
9828 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9829 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9830 where the argument is 0.
9831
60f662b0
YQ
98322013-01-25 Yao Qi <yao@codesourcery.com>
9833
9834 * event-loop.c: Include "queue.h".
9835 (gdb_event_p): New typedef.
9836 (struct gdb_event) <next_event>: Remove.
9837 (event_queue): Change to QUEUE(gdb_event_p).
9838 (async_queue_event): Remove.
9839 (gdb_event_xfree): New.
9840 (initialize_event_loop): New.
9841 (process_event): Use API from QUEUE.
9842 (wait_for_event): Likewise.
9843 * server.c (main): Call initialize_event_loop.
9844 * server.h (initialize_event_loop): Declare.
9845
5ae4861a
YQ
98462013-01-18 Yao Qi <yao@codesourcery.com>
9847
9848 * ax.h (struct eval_agent_expr_context): New.
9849 (gdb_eval_agent_expr): Update declaration.
9850 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9851 TFRAME. Add new argument CTX.
9852 * server.h (struct eval_agent_expr_context): Declare.
9853 (agent_mem_read, agent_tsv_read): Update declaration.
9854 (agent_mem_read_string): Likewise.
9855 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9856 (add_traceframe_block): Add new argument TPOINT.
9857 Increase TPOINT->traceframe_usage.
9858 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9859 eval_tracepoint_agent_expr.
9860 (condition_true_at_tracepoint): Likewise.
9861 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9862 (agent_mem_read_string, agent_tsv_read): Likewise.
9863
85e00e85
YQ
98642013-01-16 Yao Qi <yao@codesourcery.com>
9865
9866 * linux-low.c (linux_resume_one_lwp): Don't check
9867 'lwp->bp_reinsert != 0'.
9868
4039cf45
JB
98692013-01-07 Joel Brobecker <brobecker@adacore.com>
9870 Pedro Alves <palves@redhat.com>
9871
9872 * lynx-low.c (ptrace_request_to_str): Define a temporary
9873 macro and use it to simplify this function's implementation.
9874
9044dee2
JB
98752013-01-07 Joel Brobecker <brobecker@adacore.com>
9876
9877 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9878 sets errno.
9879
e6352c8f
JB
98802013-01-07 Joel Brobecker <brobecker@adacore.com>
9881
9882 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9883
50681a27
JB
98842013-01-07 Joel Brobecker <brobecker@adacore.com>
9885
9886 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9887
3f6e77ef
JB
98882013-01-07 Joel Brobecker <brobecker@adacore.com>
9889
9890 * lynx-low.c (lynx_resume): Use the resume_info parameter
9891 to determine the ptid for the lynx_ptrace call, unless
9892 it is equal to minus_one_ptid, in which case we use the
9893 ptid of the current_inferior.
9894 (lynx_wait_1): After having received a thread create/exit
9895 event, resume the inferior's execution using the signaling
9896 thread's ptid, rather than the old ptid.
9897
7fda33ae
JB
98982013-01-07 Joel Brobecker <brobecker@adacore.com>
9899
9900 * lynx-low.c (lynx_resume): Delete variable ret.
9901
b9786c74
JB
99022013-01-01 Joel Brobecker <brobecker@adacore.com>
9903
9904 * gdbreplay.c (gdbreplay_version): Update copyright year.
9905 * server.c (gdbserver_version): Likewise.
9906
8b93d60f
JB
99072012-12-17 Joel Brobecker <brobecker@adacore.com>
9908
9909 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9910 new thread.
9911
037335a7
JB
99122012-12-17 Joel Brobecker <brobecker@adacore.com>
9913
9914 * lynx-low.c (ptrace_request_to_str): Add handling for
9915 PTRACE_GETTRACESIG.
9916
52d4cbd8
JB
99172012-12-17 Joel Brobecker <brobecker@adacore.com>
9918
9919 * lynx-low.c (lynx_attach): Delete variable new_process.
9920
ab8f6ca9
JB
99212012-12-17 Joel Brobecker <brobecker@adacore.com>
9922
9923 * lynx-low.c (lynx_create_inferior): Delete variable
9924 new_process.
9925
78cbc024
JB
99262012-12-17 Joel Brobecker <brobecker@adacore.com>
9927
9928 * lynx-low.c (ptrace_request_to_str): Do not handle
9929 PTRACE_GETTHREADLIST if this macro does not exist.
9930
14a00470
YQ
99312012-12-15 Yao Qi <yao@codesourcery.com>
9932
9933 * Makefile.in (OBS): Add notif.o.
9934 * notif.c, notif.h: New.
9935 * server.c: Include "notif.h".
9936 (struct vstop_notif) <next>: Remove.
9937 <base>: New field.
9938 (queue_stop_reply): Update.
9939 (push_event, send_next_stop_reply): Remove.
9940 (discard_queued_stop_replies): Update.
9941 (notif_stop): New variable.
9942 (handle_v_stopped): Remove.
9943 (handle_v_requests): Don't call handle_v_stopped. Call
9944 handle_ack_notif instead.
9945 (queue_stop_reply_callback): Call notif_event_enque instead
9946 of queue_stop_reply.
9947 (handle_status): Don't call send_next_stop_reply, call
9948 notif_write_event instead.
9949 (kill_inferior_callback): Likewise.
9950 (detach_or_kill_inferior_callback): Likewise.
9951 (main): Call initialize_notif.
9952 (process_serial_event): Call QUEUE_is_empty.
9953 (handle_target_event): Call notif_push instead of push event.
9954 * server.h (push_event): Remove declaration.
9955
61c125b9
TT
99562012-12-10 Tom Tromey <tromey@redhat.com>
9957
9958 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9959 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9960 macros.
9961 (.c.o): Rewrite.
9962 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9963 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9964 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9965 (amd64-linux-ipa.o, ax.o): Rewrite.
9966 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9967 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9968 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9969 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9970 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9971 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9972 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9973 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9974 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9975 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9976 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9977 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9978 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9979 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9980 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9981 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9982 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9983 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9984 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9985 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9986 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9987 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9988 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9989 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9990 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9991 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9992 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9993 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9994 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9995 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9996 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9997 (reg-tilegx.o): Remove.
9998 (all_object_files): New macro.
9999 Include .deps files.
10000 * aclocal.m4, configure: Rebuild.
10001 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10002 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10003 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10004
e90e9ad9
TT
100052012-12-05 Tom Tromey <tromey@redhat.com>
10006
10007 PR gdb/14917:
10008 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10009
02d403bf 100102012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10011
10012 * configure.ac: Check for linux/perf_event.h.
10013 * config.in: Regenerated.
10014 * configure: Regenerated.
10015
0270a750
PA
100162012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10017
10018 * hostio.c (handle_readlink): Decrease buffer size
10019 parameter passed to readlink by one byte.
10020
8c29b58e
YQ
100212012-11-26 Yao Qi <yao@codesourcery.com>
10022
10023 * configure.ac (build_warnings): Append '-Wempty-body'.
10024 * configure: Regenerated.
10025 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10026 body.
10027
8bdce1ff
PM
100282012-11-15 Pierre Muller <muller@sourceware.org>
10029
10030 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10031 * config.in: Regenerate.
10032 * configure: Regenerate.
10033 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10034 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10035 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10036 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10037 header.
10038 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10039 instead of <sys/wait.h> header.
10040 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10041
02d403bf 100422012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10043
10044 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10045 (various make rules): Remove -DGDBSERVER
10046
fbd5db48
YQ
100472012-11-09 Yao Qi <yao@codesourcery.com>
10048
10049 * spu-low.c (current_ptid): Move it to ..
10050 * gdbthread.h: ... here. New.
10051 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10052 * server.c (myresume, process_serial_event): Likewise.
10053 * thread-db.c (thread_db_find_new_threads): Likewise.
10054 * tracepoint.c (run_inferior_command): Likewise.
10055
b3dc46ff
AB
100562012-10-01 Andrew Burgess <aburgess@broadcom.com>
10057
10058 * server.c (handle_search_memory_1): Include access length in
10059 warning message.
10060
07c04788
HPN
100612012-09-05 Michael Brandt <michael.brandt@axis.com>
10062
10063 * linux-crisv32-low.c: Fix compile errors.
10064
918d227b
YQ
100652012-09-04 Yao Qi <yao@codesourcery.com>
10066
10067 * tracepoint.c (cmd_qtsv): Adjust debug message.
10068 Don't check CUR_TPOINT.
10069
18c1b81a
YQ
100702012-08-28 Yao Qi <yao@codesourcery.com>
10071
10072 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10073 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10074 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10075 Remove declarations of xmalloc, xreallloc, xstrdup and
10076 freeargv.
10077 * Makefile.in (libiberty_h): New.
10078 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10079 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10080
dc82f37b
YQ
100812012-08-23 Yao Qi <yao@codesourcery.com>
10082
10083 * server.h: Remove declaration of 'xsnprintf'.
10084
406b1477
KS
100852012-08-22 Keith Seitz <keiths@redhat.com>
10086
10087 * server.h: Include build-gnulib-gbserver/config.h.
10088 * gdbreplay.c: Likewise.
10089
e6712ff1
DE
100902012-08-08 Doug Evans <dje@google.com>
10091
10092 * Makefile.in (SFILES): Add gdb_vecs.c.
10093 (OBS): Add gdb_vecs.o.
10094 (gdb_vecs_h, host_defs_h): New variables.
10095 (thread-db.o): Add $(gdb_vecs_h) dependency.
10096 (gdb_vecs.o): New rule.
10097 * thread-db.c: #include "gdb_vecs.h".
10098 (thread_db_load_search): Use a vector to iterate over path elements.
10099 Handle text appearing after "$pdir".
10100
10101 * configure.ac: Add check for strstr.
10102 * config.in: Regenerate.
10103 * configure: Regenerate.
10104
7c3270ae
UW
101052012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10106
10107 * hostio.c (handle_pread): If pread fails, fall back to attempting
10108 lseek/read.
10109 (handle_pwrite): Likewise for pwrite.
10110
b62e2b27
UW
101112012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10112
10113 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10114 between unsupported TYPE and unimplementable ADDR/LEN combination.
10115 (arm_insert_point): Act on new return value.
10116
78a99e91
PA
101172012-07-31 Pedro Alves <palves@redhat.com>
10118
10119 * server.c (process_point_options): Only skip tokens if we find
10120 one that is unrecognized. Don't treat 'X' specially while
10121 skipping unrecognized tokens.
10122
fcf303ab
UW
101232012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10124
10125 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10126 to 4-byte-align HW breakpoint addresses for Thumb.
10127
7255706c
YQ
101282012-07-27 Yao Qi <yao@codesourcery.com>
10129
10130 PR remote/14161.
10131
10132 * server.h: Declare gdb_agent_about_to_close.
10133 * target.c (kill_inferior): Include "agent.h".
10134 New. Send command 'kill'.
10135 * target.h (kill_inferior): Removed macro.
10136 * tracepoint.c (gdb_agent_about_to_close): New.
10137 (gdb_agent_helper_thread): Handle command 'close'.
10138 Wait endlessly until the inferior stops.
10139 Install gdb_agent_remove_socket to atexit hook.
10140 (agent_socket_name): New static variable.
10141 (gdb_agent_socket_init): Replace local variable 'name' with
10142 'agent_socket_name'.
10143 (gdb_agent_remove_socket): New.
10144
5a3f286f
YQ
101452012-07-27 Yao Qi <yao@codesourcery.com>
10146
10147 * server.c (process_point_options): Stop at 'X' when parsing.
10148
961bd387
ME
101492012-07-19 Michael Eager <eager@eagercon.com>
10150
a261b8f5 10151 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10152 to hw_execute.
10153 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10154 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10155 hardware breakpoint.
10156
aa7c7447
JK
101572012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10158
10159 * gdbserver/linux-low.c (initialize_low): Call
10160 linux_ptrace_init_warnings.
10161
7f216e7c
DE
101622012-07-02 Doug Evans <dje@google.com>
10163
10164 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10165 pointer to int.
10166
d3ce09f5
SS
101672012-07-02 Stan Shebs <stan@codesourcery.com>
10168
10169 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10170 (ax.o): Add it to build rule.
10171 (ax-ipa.o): Ditto.
10172 (OBS): Add format.o.
10173 (IPA_OBS): Add format.o.
10174 * server.c (handle_query): Claim support for breakpoint commands.
10175 (process_point_options): Add command case.
10176 (process_serial_event): Leave running if there are printfs in
10177 effect.
10178 * mem-break.h (any_persistent_commands): Declare.
10179 (add_breakpoint_commands): Declare.
10180 (gdb_no_commands_at_breakpoint): Declare.
10181 (run_breakpoint_commands): Declare.
10182 * mem-break.c (struct point_command_list): New struct.
10183 (struct breakpoint): New field command_list.
10184 (any_persistent_commands): New function.
10185 (add_commands_to_breakpoint): New function.
10186 (add_breakpoint_commands): New function.
10187 (gdb_no_commands_at_breakpoint): New function.
10188 (run_breakpoint_commands): New function.
10189 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10190 locally.
10191 * ax.c: Include format.h.
10192 (ax_printf): New function.
10193 (gdb_eval_agent_expr): Add printf opcode.
10194
2f8f6aed
YQ
101952012-06-13 Yao Qi <yao@codesourcery.com>
10196
10197 * server.c (start_inferior): Remove duplicated writes to fields
10198 'last_resume_kind' and 'last_status' of 'current_inferior'.
10199
0c9070b3
YQ
102002012-06-12 Yao Qi <yao@codesourcery.com>
10201 Pedro Alves <palves@redhat.com>
10202
10203 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10204 comment.
10205 * server.c (handle_v_cont): Extend comment.
10206
c52daf70
YQ
102072012-06-11 Yao Qi <yao@codesourcery.com>
10208
10209 * linux-low.c (linux_attach): Add 'static'.
10210
d38bbb0a
YQ
102112012-06-06 Yao Qi <yao@codesourcery.com>
10212
10213 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10214
89dc0afd
JK
102152012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10216
10217 Fix gcc -flto compilation warning.
10218 * server.c (main): Make variable multi_mode and attach volatile.
10219
75f62ce7
TJB
102202012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10221
10222 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10223 if the platform doesn't know about it.
10224
65f479b6
PA
102252012-05-30 Jeff Kenton <jkenton@tilera.com>
10226
10227 * Makefile.in (SFILES): Add linux-tile-low.c.
10228 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10229 * configure.srv: Handle tilegx-*-linux*.
10230 * linux-tile-low.c: New file.
10231
0c5bf5a9
JK
102322012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10233
10234 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10235
a493e3e2
PA
102362012-05-24 Pedro Alves <palves@redhat.com>
10237
10238 PR gdb/7205
10239
43aaf8b6 10240 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10241
2ea28649
PA
102422012-05-24 Pedro Alves <palves@redhat.com>
10243
10244 PR gdb/7205
10245
10246 Replace target_signal with gdb_signal throughout.
10247
8d409d16
MR
102482012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10249
10250 * linux-low.c (linux_store_registers): Avoid the copying sequence
10251 when no data has been retrieved by ptrace.
10252
23512c01
MGD
102532012-05-22 Will Deacon <will.deacon@arm.com>
10254
10255 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10256 Include asm/ptrace.h.
10257 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10258 already defined.
10259
4934b29e
MR
102602012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10261
10262 * linux-low.c (linux_store_registers): Don't re-retrieve data
10263 with ptrace that has already been obtained from /proc. Always
10264 copy any data retrieved with ptrace to the buffer supplied.
10265
bde24c0a
PA
102662012-05-11 Yao Qi <yao@codesourcery.com>
10267 Pedro Alves <palves@redhat.com>
10268
10269 * linux-low.c (enum stopping_threads_kind): New.
10270 (stopping_threads): Change type to `enum stopping_threads_kind'.
10271 (handle_extended_wait): If stopping and suspending threads, leave
10272 the new_lwp suspended too.
10273 (linux_wait_for_event): Adjust.
10274 (stop_all_lwps): Set `stopping_threads' to
10275 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10276 whether we're suspending threads or just stopping them. Assert no
10277 recursion happens.
10278
623b6bdf
YQ
102792012-04-29 Yao Qi <yao@codesourcery.com>
10280
10281 * server.h: Move some code to ...
10282 * gdbthread.h: ... here. New.
10283 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10284 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10285 (nto-low.o, win32-low.o): Likewise.
10286 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10287 * regcache.c, remote-utils.c, server.c: Likewise.
10288 * target.c, tracepoint.c, win32-low.c: Likewise.
10289
f15f9948
TJB
102902012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10291
10292 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10293 (PTRACE_ARG4_TYPE): Likewise.
10294 (PTRACE_XFER_TYPE): Likewise.
10295 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10296 ptrace to PTRACE_ARG3_TYPE.
10297 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10298 (PTRACE_ARG4_TYPE): Likewise.
10299 (PTRACE_XFER_TYPE): Likewise.
10300 (linux_detach_one_lwp): Cast fourth argument of
10301 ptrace to long then PTRACE_ARG4_TYPE.
10302 (regsets_fetch_inferior_registers): Cast third argument of
10303 ptrace to long then PTRACE_ARG3_TYPE.
10304 (regsets_store_inferior_registers): Likewise.
10305
38ea300a
PA
103062012-04-20 Pedro Alves <palves@redhat.com>
10307
10308 * configure: Regenerate.
10309
c971b7fa
PA
103102012-04-19 Pedro Alves <palves@redhat.com>
10311
43aaf8b6 10312 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10313 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10314 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10315 (all, install-only, uninstall, clean-info, all-lib, clean): No
10316 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10317 (maintainer-clean realclean distclean): Use subdir_do.
10318 (subdir_do): New.
10319 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10320 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10321 * acinclude.m4: Include acx_configure_dir.m4.
10322 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10323 calls. Call AC_PROG_RANLIB. Configure gnulib using
10324 ACX_CONFIGURE_DIR.
10325 (GNULIB): New.
10326 (GNULIB_STDINT_H): Adjust.
10327 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10328 * gdbreplay.c: Include build-gnulib/config.h.
10329 * server.h: Likewise.
10330 * aclocal.m4: Regenerate.
10331 * config.in: Regenerate.
10332 * configure: Regenerate.
c971b7fa 10333
809277f8
PA
103342012-04-19 Pedro Alves <palves@redhat.com>
10335
10336 * Makefile.in (LIBGNU, INCGNU): Adjust.
10337 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10338 (all, install-only, uninstall, clean-info, all-lib, clean)
10339 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10340 * configure.ac: Adjust AC_OUTPUT output.
10341 * aclocal.m4: Regenerate.
10342 * configure: Regenerate.
10343
fd9bb8b8
PA
103442012-04-19 Pedro Alves <palves@redhat.com>
10345
10346 * Makefile.in (generated_files): New.
10347 (server_h): Remove the explicit dependency on config.h, and depend
10348 on $generated_files.
10349
1c298c66
PA
103502012-04-19 Pedro Alves <palves@redhat.com>
10351
10352 * Makefile.in (INCGNU): Add -Ignulib.
10353
57c4b50b
PA
103542012-04-19 Pedro Alves <palves@redhat.com>
10355
10356 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10357 (INCGNU): ... this, and spell out -I here.
10358 (GNULIB_LIB): Rename to ...
10359 (LIBGNU): ... this.
10360 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10361
1030e047
PA
103622012-04-19 Pedro Alves <palves@redhat.com>
10363
10364 * config.in: Regenerate.
10365
447d4319
PA
103662012-04-19 Pedro Alves <palves@redhat.com>
10367
10368 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10369 * server.h (memmem): Remove declaration.
10370 * config.in: Regenerate.
10371 * configure: Regenerate.
10372
aad9eab9
YQ
103732012-04-19 Yao Qi <yao@codesourcery.com>
10374
10375 * Makefile.in (SFILES): Add common/vec.c.
10376 (OBS): Add vec.o.
10377 (vec.o): New rule.
10378
3e10640f
YQ
103792012-04-19 Yao Qi <yao@codesourcery.com>
10380
10381 * remote-utils.c (prepare_resume_reply): Replace with macro
10382 target_core_of_thread.
10383 * server.c (handle_qxfer_threads_proper): Likewise.
10384 * target.h (traget_core_of_thread): New macro.
10385
71622373
PA
103862012-04-18 Pedro Alves <palves@redhat.com>
10387
10388 * aclocal.m4: Regenerate.
10389 * configure: Regenerate.
10390
80d26939
YQ
103912012-04-16 Yao Qi <yao@codesourcery.com>
10392
10393 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10394 duplicated on address.
10395
42476b70
YQ
103962012-04-16 Yao Qi <yao@codesourcery.com>
10397
10398 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10399 (struct tracepoint_action_ops) <send>: New field.
10400 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10401 (agent_expr_send, x_tracepoint_action_send): New.
10402 (l_tracepoint_action_send): New.
10403 (cmd_qtdp): Download and install tracepoint
10404 according to `use_agent'.
10405 (run_inferior_command): Add one more parameter `len'.
10406 Update callers.
10407 (tracepoint_send_agent): New.
10408 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10409
7bc83639
YQ
104102012-04-16 Yao Qi <yao@codesourcery.com>
10411
10412 * tracepoint.c (download_tracepoints): Moved to ...
10413 (cmd_qtstart): ... here.
10414
5f18041e
YQ
104152012-04-14 Yao Qi <yao@codesourcery.com>
10416
10417 * tracepoint.c: Include inttypes.h.
10418 (struct collect_memory_action): Use sized types.
10419 (struct tracepoint): Likewise.
10420 (cmd_qtdp, stop_tracing): Update print specifiers.
10421 (cmd_qtp, response_tracepoint): Likewise.
10422 (collect_data_at_tracepoint): Likewise.
10423 (collect_data_at_step): Likewise.
10424
55a8c076
YQ
104252012-04-14 Yao Qi <yao@codesourcery.com>
10426
10427 Import gnulib module inttypes.
10428 * aclocal.m4, config.in, configure: Regenerated.
10429
dc750257
YQ
104302012-04-14 Yao Qi <yao@codesourcery.com>
10431
10432 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10433 Makefile and config.status at last.
10434
0ab5faf9
YQ
104352012-04-13 Yao Qi <yao@codesourcery.com>
10436
10437 * tracepoint.c: Include stdint.h unconditionally.
10438
18f5fd81
TJB
104392012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10440
10441 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10442 on BFD_HAVE_SYS_PROCFS_TYPE.
10443 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10444 * configure: Regenerate.
10445 * config.in: Likewise.
10446
4d47af5c
L
104472012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10448
10449 * Makefile.in (clean): Also remove x32.c x32-linux.c
10450 x32-avx.c x32-avx-linux.c.
10451 (x32.o): New target.
10452 (x32.c): Likewise.
10453 (x32-linux.o): Likewise.
10454 (x32-linux.c): Likewise.
10455 (x32-avx.o): Likewise.
10456 (x32-avx.c): Likewise.
10457 (x32-avx-linux.o): Likewise.
10458 (x32-avx-linux.c): Likewise.
10459
10460 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10461 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10462 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10463 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10464 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10465 i386/x32-avx-linux.xml.
10466
10467 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10468 (init_registers_x32_avx_linux): Likwise.
10469 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10470 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10471
ecedbe58
PA
104722012-04-13 Pedro Alves <palves@redhat.com>
10473
10474 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10475 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10476 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10477 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10478 the sub-make.
10479
c92b5177
L
104802012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10481
10482 * linux-x86-low.c (compat_x32_clock_t): New.
10483 (compat_x32_siginfo_t): Likewise.
10484 (compat_x32_siginfo_from_siginfo): Likewise.
10485 (siginfo_from_compat_x32_siginfo): Likewise.
10486 (linux_is_elf64): Likewise.
10487 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10488 and siginfo_from_compat_x32_siginfo for x32.
10489 (x86_arch_setup): Set linux_is_elf64.
10490
214d508e
L
104912012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10492
10493 PR gdb/13969
10494 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10495 e_machine field.
10496 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10497 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10498 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10499 compatible with process.
10500
c9a1864a
YQ
105012012-04-12 Yao Qi <yao@codesourcery.com>
10502
10503 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10504 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10505 (install-only, install-info, clean): Handle sub dir gnulib.
10506 (all-lib, am--refresh): New targets.
10507 (memmem.o): Remove target.
10508 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10509 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10510 (AC_REPLACE_FUNCS): Remove memmem.
10511 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10512 (AC_OUTPUT): Generate Makefile in gnulib/.
10513 * aclocal.m4, config.in, configure: Regenerated.
10514
367ba2c2
MR
105152012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10516
10517 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10518
9d236627
PA
105192012-04-05 Pedro Alves <palves@redhat.com>
10520
10521 -Werror=strict-aliasing
10522
10523 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10524 pointer.
10525
111217b3
PA
105262012-04-04 Pedro Alves <palves@redhat.com>
10527
10528 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10529 (sparc_store_gregset_from_stack, sparc_store_gregset)
10530 (sparc_breakpoint_at): Fix formatting.
10531
8365dcf5
TJB
105322012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10533
10534 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10535 are available.
10536 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10537 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10538 * config.in: Regenerate.
10539 * configure: Likewise.
10540
689cc2ae
PA
105412012-03-29 Pedro Alves <palves@redhat.com>
10542
10543 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10544 Correct ptrace arguments.
10545
c14dfd32
PA
105462012-03-28 Pedro Alves <palves@redhat.com>
10547
10548 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10549 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10550 (IA64_FR1_REGNUM): New defines.
10551 (ia64_fetch_register): New.
10552 (the_low_target): Install it.
10553 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10554 field.
10555 * linux-low.c (linux_fetch_registers): Try the
10556 the_low_target.fetch_register hook first.
10557
10558 * linux-arm-low.c (the_low_target): Adjust.
10559 * linux-bfin-low.c (the_low_target): Adjust.
10560 * linux-cris-low.c (the_low_target): Adjust.
10561 * linux-crisv32-low.c (the_low_target): Adjust.
10562 * linux-m32r-low.c (the_low_target): Adjust.
10563 * linux-m68k-low.c (the_low_target): Adjust.
10564 * linux-mips-low.c (the_low_target): Adjust.
10565 * linux-ppc-low.c (the_low_target): Adjust.
10566 * linux-s390-low.c (the_low_target): Adjust.
10567 * linux-sh-low.c (the_low_target): Adjust.
10568 * linux-sparc-low.c (the_low_target): Adjust.
10569 * linux-tic6x-low.c (the_low_target): Adjust.
10570 * linux-x86-low.c (the_low_target): Adjust.
10571 * linux-xtensa-low.c (the_low_target): Adjust.
10572
63c88e13
PA
105732012-03-26 Pedro Alves <palves@redhat.com>
10574
10575 * server.c (handle_qxfer_libraries): Don't bail early if
10576 the_target->qxfer_libraries_svr4 is not NULL.
10577
fb723180
PA
105782012-03-26 Pedro Alves <palves@redhat.com>
10579
10580 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10581
0afae3cf
PA
105822012-03-23 Pedro Alves <palves@redhat.com>
10583
10584 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10585 "library-list-svr4" element's start tag when the the DSO list is
10586 empty.
10587
485f1ee4
PA
105882012-03-23 Pedro Alves <palves@redhat.com>
10589
10590 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10591 a variable whose type size is the same as the inferior's pointer
10592 size.
10593
a5362b9a
TS
105942012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10595
10596 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10597 struct siginfo.
10598 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10599 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10600 * linux-low.h: Include <signal.h>.
10601 (struct siginfo): Remove forward declaration.
10602 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10603 struct siginfo.
10604
d226c142
MF
106052012-03-21 Mike Frysinger <vapier@gentoo.org>
10606
10607 * .gitignore: Ignore more files.
10608
122f36ef
PA
106092012-03-19 Pedro Alves <palves@redhat.com>
10610 Jan Kratochvil <jan.kratochvil@redhat.com>
10611
10612 * server.c (cont_thread, general_thread): Add describing comments.
10613 (start_inferior): Clear `cont_thread'.
10614 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10615 of a process.
10616
fc3e5175
YQ
106172012-03-15 Yao Qi <yao@codesourcery.com>
10618
10619 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10620 handling to ...
10621 (cmd_qtdp): ... here.
10622
8d0d92cd
YQ
106232012-03-15 Yao Qi <yao@codesourcery.com>
10624
10625 * tracepoint.c (struct tracepoint_action_ops): New.
10626 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10627 (m_tracepoint_action_download): New.
10628 (r_tracepoint_action_download): New.
10629 (x_tracepoint_action_download): New.
10630 (l_tracepoint_action_download): New.
10631 (add_tracepoint_action): Install `action->ops' according type.
10632 (download_tracepoint_1): Move code `download' function pointer
10633 of various tracepoint_action_ops.
10634
87b0bb13
JK
106352012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10636
10637 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10638 linux_ptrace_attach_warnings.
10639
5f572dec
JK
106402012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10641
10642 * Makefile.in (linux-ptrace.o): New.
10643 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10644 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10645 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10646 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10647 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10648 of these targets.
10649 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10650
f4647387
YQ
106512012-03-08 Yao Qi <yao@codesourcery.com>
10652 Pedro Alves <palves@redhat.com>
10653
10654 Fix PR server/13392.
10655 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10656 offset of JMP insn.
10657 * tracepoint.c (remove_tracepoint): New.
10658 (cmd_qtdp): Call remove_tracepoint when failed to install.
10659
9b224c5e
PA
106602012-03-07 Pedro Alves <palves@redhat.com>
10661
10662 * linux-low.c (get_detach_signal): New.
10663 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10664 Pass on pending signals to PTRACE_DETACH. Check the result of the
10665 ptrace call.
10666 * server.c (program_signals, program_signals_p): New.
10667 (handle_general_set): Handle QProgramSignals.
10668 * server.h (program_signals, program_signals_p): Declare.
10669
e237a7e2
JK
106702012-03-05 Pedro Alves <palves@redhat.com>
10671 Jan Kratochvil <jan.kratochvil@redhat.com>
10672
10673 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10674 New comment why.
10675
5808517f
YQ
106762012-03-03 Yao Qi <yao@codesourcery.com>
10677
10678 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10679 agent_look_up_symbols.
10680
58b4daa5
YQ
106812012-03-03 Yao Qi <yao@codesourcery.com>
10682
10683 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10684 (linux-x86-low.o): Likewise.
10685 * server.h: Remove in_process_agent_loaded.
10686 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10687 common/agent.c.
10688 Update callers.
10689
8ffcbaaf
YQ
106902012-03-03 Yao Qi <yao@codesourcery.com>
10691
10692 * tracepoint.c (gdb_agent_capability): New global.
10693 (in_process_agent_loaded_ust): Renamed to
10694 `in_process_agent_supports_ust'.
10695 Update callers.
10696 (in_process_agent_supports_ust): Call agent_capability_check.
10697 (clear_installed_tracepoints): Assert that agent supports
10698 agent.
10699
d1feda86
YQ
107002012-03-03 Yao Qi <yao@codesourcery.com>
10701
10702 * linux-low.c (linux_supports_agent): New.
10703 (linux_target_ops): Initialize field `supports_agent' with
10704 linux_supports_agent.
10705 * target.h (struct target_ops) <supports_agent>: New.
10706 (target_supports_agent): New macro.
10707 * server.c (handle_general_set): Handle packet 'QAgent'.
10708 (handle_query): Send `QAgent+'.
10709 * Makefile.in (server.o): Depends on agent.h.
10710
2fa291ac
YQ
107112012-03-03 Yao Qi <yao@codesourcery.com>
10712
10713 * Makefile.in (OBS): Add agent.o.
10714 Add new rule for agent.o.
10715 Track dependence of tracepoint.c on agent.h.
10716 * tracepoint.c (run_inferior_command_1):
10717 (run_inferior_command): Call agent_run_command.
10718 (gdb_ust_connect_sync_socket): Deleted. Move it to
10719 common/agent.c.
10720 (resume_thread, stop_thread): Likewise.
10721 (gdb_ust_socket_init): Renamed to ...
10722 (gdb_agent_socket_init): ... New.
10723 (gdb_ust_thread): Renamed to ...
10724 (gdb_agent_helper_thread): ... New.
10725 (gdb_ust_init): Move some code to ...
10726 (gdb_agent_init): ... here. New.
10727 [HAVE_UST]: Call gdb_ust_init.
10728 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10729 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10730 * config.in, configure: Regenerated.
10731
05044653
PA
107322012-03-02 Pedro Alves <palves@redhat.com>
10733
10734 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10735 * linux-low.c (struct simple_pid_list): New.
10736 (stopped_pids): New a struct simple_pid_list pointer.
10737 (add_to_pid_list, pull_pid_from_list): New.
10738 (handle_extended_wait): Don't assume the first signal new children
10739 report is SIGSTOP. Adjust call to pull_pid_from_list.
10740 (linux_wait_for_lwp): Adjust.
10741
8d00225b
YQ
107422012-03-02 Yao Qi <yao@codesourcery.com>
10743
10744 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10745 debug log.
10746
19560ba5
YQ
107472012-03-02 Yao Qi <yao@codesourcery.com>
10748
10749 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10750 `stop_pc' and `tpoint'. Update caller.
10751
1faeff08
MR
107522012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10753
10754 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10755 * linux-low.c (use_linux_regsets): New macro.
10756 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10757 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10758 (linux_register_in_regsets): New function.
10759 (usr_fetch_inferior_registers): Skip registers covered by
10760 regsets.
10761 (usr_store_inferior_registers): Likewise.
10762 (usr_fetch_inferior_registers): New macro.
10763 (usr_store_inferior_registers): Likewise.
10764 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10765 (linux_store_registers): Likewise.
10766 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10767 prototype.
10768 (init_registers_mips64_dsp_linux): Likewise.
10769 (init_registers_mips_linux): New macro.
10770 (init_registers_mips_dsp_linux): Likewise.
10771 (mips_dsp_num_regs): Likewise.
10772 (DSP_BASE, DSP_CONTROL): New fallback macros.
10773 (mips_base_regs): New macro.
10774 (mips_regmap): Use it. Fix the size.
10775 (mips_dsp_regmap): New variable.
10776 (mips_dsp_regset_bitmap): Likewise.
10777 (mips_arch_setup): New function.
10778 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10779 than mips_regmap.
10780 (mips_cannot_store_register): Likewise.
10781 (the_low_target): Update .arch_setup, .num_regs and .regmap
10782 initializers. Add .regset_bitmap initializer.
10783 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10784 initializer.
10785 * linux-bfin-low.c (the_low_target): Likewise.
10786 * linux-cris-low.c (the_low_target): Likewise.
10787 * linux-crisv32-low.c (the_low_target): Likewise.
10788 * linux-ia64-low.c (the_low_target): Likewise.
10789 * linux-m32r-low.c (the_low_target): Likewise.
10790 * linux-m68k-low.c (the_low_target): Likewise.
10791 * linux-ppc-low.c (the_low_target): Likewise.
10792 * linux-s390-low.c (the_low_target): Likewise.
10793 * linux-sh-low.c (the_low_target): Likewise.
10794 * linux-sparc-low.c (the_low_target): Likewise.
10795 * linux-tic6x-low.c (the_low_target): Likewise.
10796 * linux-x86-low.c (the_low_target): Likewise.
10797 * linux-xtensa-low.c (the_low_target): Likewise.
10798 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10799 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10800 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10801 srv_xmlfiles.
10802 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10803 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10804
c03e6ccc
YQ
108052012-02-29 Yao Qi <yao@codesourcery.com>
10806 Pedro Alves <palves@redhat.com>
10807
10808 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10809 `step_over_finished' is true.
10810
644cebc9
PA
108112012-02-27 Pedro Alves <palves@redhat.com>
10812
10813 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10814 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10815
c14d7ab2
PA
108162012-02-27 Pedro Alves <palves@redhat.com>
10817
10818 PR server/9684
10819 * linux-low.c (pid_is_stopped): New.
10820 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10821
412c89dd
LM
108222012-02-25 Luis Machado <lgustavo@codesourcery.com>
10823
10824 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10825 of conditions.
10826
b745defe
MR
108272012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10828
10829 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10830
9f3a5c85
LM
108312012-02-24 Luis Machado <lgustavo@codesourcery>
10832
10833 * server.c (handle_query): Advertise support for target-side
10834 breakpoint condition evaluation.
10835 (process_point_options): New function.
10836 (process_serial_event): When inserting a breakpoint, check for
10837 a target-side condition that should be evaluated.
10838
10839 * mem-break.c: Include regcache.h and ax.h.
10840 (point_cond_list_t): New data structure.
10841 (breakpoint) <cond_list>: New field.
10842 (find_gdb_breakpoint_at): Make non-static.
10843 (delete_gdb_breakpoint_at): Clear any target-side
10844 conditions.
10845 (clear_gdb_breakpoint_conditions): New function.
10846 (add_condition_to_breakpoint): Likewise.
10847 (add_breakpoint_condition): Likewise.
10848 (gdb_condition_true_at_breakpoint): Likewise.
10849 (gdb_breakpoint_here): Return result directly instead
10850 of going through a local variable.
10851
10852 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10853 (clear_gdb_breakpoint_conditions): Likewise.
10854 (add_breakpoint_condition): Likewise.
10855 (gdb_condition_true_at_breakpoint): Likewise.
10856
10857 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10858 (need_step_over_p): Take target-side breakpoint condition into
10859 consideration.
10860
5e1dc496
LM
108612012-02-24 Luis Machado <lgustavo@codesourcery>
10862
10863 * server.h: Include tracepoint.h.
10864 (agent_mem_read, agent_get_trace_state_variable_value,
10865 agent_set_trace_state_variable_value,
10866 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10867 get_set_tsv_func_addr): New prototypes.
10868
10869 * ax.h: New include file.
10870 * ax.c: New source file.
10871
10872 * tracepoint.c: Include ax.h.
10873 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10874 agent_expr, eval_result_type): Move to ax.h.
10875 (parse_agent_expr): Rename to ...
10876 (gdb_parse_agent_expr): ... this, make it non-static and move
10877 to ax.h.
10878 (unparse_agent_expr) Rename to ...
10879 (gdb_unparse_agent_expr): ... this, make it non-static and move
10880 to ax.h.
10881 (eval_agent_expr): Rename to ...
10882 (eval_tracepoint_agent_expr): ... this.
10883 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10884 forward declarations.
10885 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10886 (agent_get_trace_state_variable_value): New function.
10887 (agent_set_trace_state_variable_value): New function.
10888 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10889 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10890 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10891 (condition_true_at_tracepoint): Likewise.
10892 (parse_agent_expr): Rename to ...
10893 (gdb_parse_agent_expr): ... this and move to ax.c.
10894 (unparse_agent_expr): Rename to ...
10895 (gdb_unparse_agent_expr): ... this and move to ax.c.
10896 (gdb_agent_op_name): Move to ax.c.
10897 (eval_agent_expr): Rename to ...
10898 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10899 and move to ax.c.
10900 (eval_tracepoint_agent_expr): New function.
10901 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10902 non-static.
5e1dc496
LM
10903 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10904 ax.c.
10905 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10906 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10907 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10908 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10909 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10910 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10911 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10912 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10913 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10914 (compile_bytecodes): Remove forward declaration.
10915 (is_goto_target): Move to ax.c.
10916 (compile_bytecodes): Move to ax.c and call
10917 agent_get_trace_state_variable_value (...) and
10918 agent_set_trace_state_variable_value (...).
10919
10920 * Makefile.in: Update ax.c and IPA dependencies.
10921
277e4e52
PA
109222012-02-24 Pedro Alves <palves@redhat.com>
10923
10924 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10925 (cmd_bigqtbuffer_circular): ... this. Only handle
10926 'QTBuffer:circular:'.
10927 (handle_tracepoint_general_set): Adjust.
10928
bf4c19f7
YQ
109292012-02-16 Yao Qi <yao@codesourcery.com>
10930
10931 * inferiors.c: Move code to ...
10932 * dll.c: .... here. New.
10933 * server.h: Declare clear_dlls.
10934 * Makefile.in (SFILES): Add dll.c.
10935 (OBS): Add dll.o
10936 (dll.o): New rule.
10937
d73f2619
YQ
109382012-02-11 Yao Qi <yao@codesourcery.com>
10939
10940 * server.c: (handle_monitor_command): Add a new parameter
10941 `own_buf'.
10942 (handle_query): Update caller.
10943
f8255c2a
JB
109442012-02-09 Joel Brobecker <brobecker@adacore.com>
10945
10946 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10947 * configure, config.in: Regenerate.
10948 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10949 is not defined.
10950
da84f473
PA
109512012-02-02 Pedro Alves <palves@redhat.com>
10952
10953 Try SIGKILL first, then PTRACE_KILL.
10954 * linux-low.c (linux_kill_one_lwp): New.
10955 (linux_kill_one_lwp): Rename to ...
10956 (kill_one_lwp_callback): ... this. Use the new
10957 linux_kill_one_lwp.
10958
e886a173
PA
109592012-02-02 Pedro Alves <palves@redhat.com>
10960
10961 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10962 inferior.
10963
be07f1a2
PA
109642012-01-27 Pedro Alves <palves@redhat.com>
10965
10966 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10967 (elf_64_file_p): Make static.
10968 (linux_pid_exe_is_elf_64_file): New.
10969 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10970 Delete declarations.
10971 (linux_pid_exe_is_elf_64_file): Declare.
10972 * linux-x86-low.c (x86_arch_setup): Use
10973 linux_pid_exe_is_elf_64_file.
10974
d8301ad1
JK
109752012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10976
10977 * linux-low.c (linux_wait_for_event_1): Rename to ...
10978 (linux_wait_for_event): ... here and merge it with former
10979 linux_wait_for_event - new variable wait_ptid, use it.
10980 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10981
01b17894
PA
109822012-01-23 Pedro Alves <palves@redhat.com>
10983
10984 * server.c (main): Avoid yet another case of infinite loop while
10985 detaching/killing after a longjmp.
10986
e825046f
JK
109872012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10988
10989 Code cleanup.
10990 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10991
b9e7b9c3
UW
109922012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10993
10994 * hostio.c (handle_readlink): New function.
10995 (handle_vFile): Call it to handle "vFile:readlink" packets.
10996
901f9912
UW
109972012-01-20 Pedro Alves <palves@redhat.com>
10998 Ulrich Weigand <ulrich.weigand@linaro.org>
10999
11000 * server.c (handle_v_requests): Only support vAttach and vRun to
11001 start multiple processes when in extended protocol mode.
11002
fc1ab1a0
PA
110032012-01-17 Pedro Alves <palves@redhat.com>
11004
11005 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11006 memalign plus mprotect to allocate the scratch buffer.
11007
7d5d4e98
PA
110082012-01-13 Pedro Alves <palves@redhat.com>
11009
11010 * server.c (attach_inferior): Clear `cont_thread'.
11011
f128d5e9
PA
110122012-01-13 Pedro Alves <palves@redhat.com>
11013
11014 * server.c (main): Avoid infinite loop while detaching/killing
11015 after a longjmp.
11016
06db92f0
DE
110172012-01-09 Doug Evans <dje@google.com>
11018
11019 * server.c (start_inferior): Set last_ptid in --wrapper case.
11020
32d92999
YQ
110212012-01-06 Yao Qi <yao@codesourcery.com>
11022
11023 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11024 defined.
11025 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11026
5e0a92a9
YQ
110272012-01-04 Yao Qi <yao@codesourcery.com>
11028
11029 * tracepoint.c (cmd_qtdp): Print debug message
11030 for static tracepoint.
11031
ae639e8c
YQ
110322012-01-04 Yao Qi <yao@codesourcery.com>
11033
11034 * tracepoint.c (trace_vdebug): Differentiate debug message
11035 between gdbserver and IPA.
11036
f72429c5
YQ
110372012-01-03 Yao Qi <yao@codesourcery.com>
11038
11039 * tracepoint.c (tracepoint_was_hit): Don't collect for
11040 static tracepoint.
11041
12c3e59c
JB
110422012-01-02 Joel Brobecker <brobecker@adacore.com>
11043
11044 * terminal.h: Reformat copyright header.
11045
67827812
JB
110462012-01-02 Joel Brobecker <brobecker@adacore.com>
11047
11048 * server.c (gdbserver_version): Update copyright year.
11049 * gdbreplay.c (gdbreplay_version): Likewise.
11050
3e52c33d
JK
110512011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11052
11053 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11054
11055 Revert:
11056 2011-12-18 Hui Zhu <teawater@gmail.com>
11057 * linux-low.c (linux_create_inferior): Save return value to ret.
11058
66f1260e
HZ
110592011-12-18 Hui Zhu <teawater@gmail.com>
11060
11061 * linux-low.c (linux_create_inferior): Save return value to ret.
11062
e77616d7
DE
110632011-12-16 Doug Evans <dje@google.com>
11064
e7b06c57
DE
11065 * linux-low.c (linux_create_inferior): If stdio connection,
11066 redirect stdin from /dev/null, stdout to stderr.
11067 * remote-utils.c (remote_is_stdio): New static global.
11068 (remote_connection_is_stdio): New function.
11069 (remote_prepare): Handle stdio connection.
11070 (remote_open): Ditto.
11071 (remote_close): Don't close stdin for stdio connections.
11072 (read_prim,write_prim): New functions. Replace all calls to
11073 read/write to these.
11074 * server.c (main): Watch for "-" argument. Move call to
11075 remote_prepare before start_inferior.
11076 * server.h (STDIO_CONNECTION_NAME): New macro.
11077 (remote_connection_is_stdio): Declare.
11078
e77616d7
DE
11079 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11080 in debugging output.
11081
82067193
YQ
110822011-12-15 Yao Qi <yao@codesourcery.com>
11083
11084 * tracepoint.c: Include sys/syscall.h.
11085 (gdb_ust_thread): Remove preprocessor conditional.
11086
82bfbe7e
PA
110872011-12-14 Pedro Alves <pedro@codesourcery.com>
11088
11089 * linux-low.c (linux_detach_one_lwp): Call
11090 the_low_target.prepare_to_resume before detaching.
11091
712c6575
YQ
110922011-12-14 Yao Qi <yao@codesourcery.com>
11093
11094 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11095 of write.
11096
d54d1edf
YQ
110972011-12-14 Yao Qi <yao@codesourcery.com>
11098
11099 * i386-low.c (i386_low_stopped_data_address): Initialize local
11100 variable `control'.
11101
6210a125
PA
111022011-12-13 Pedro Alves <pedro@codesourcery.com>
11103
11104 PR remote/13492
11105
11106 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11107 DR_CONTROL unless necessary. Extend comments.
11108 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11109 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11110
2ece8244
YQ
111112011-12-13 Yao Qi <yao@codesourcery.com>
11112
11113 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11114 macros.
11115 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11116
784867a5
JK
111172011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11118
11119 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11120 Print new debug message for such case.
11121
6bf36717
JK
111222011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11123
11124 Fix overlapping memcpy.
11125 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11126 the read_inferior_memory transfer.
11127 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11128 write_inferior_memory transfer.
11129 (set_fast_tracepoint_jump): New variable buf. Use it for the
11130 read_inferior_memory and write_inferior_memory transfers.
11131 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11132 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11133 Use it for the write_inferior_memory transfer.
11134 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11135 buffers.
11136
50275556
MR
111372011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11138
11139 * linux-low.c (fetch_register, store_register): Make code
11140 consistent, fix formatting.
11141
7325beb4
MR
111422011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11143
11144 * linux-low.c (usr_store_inferior_registers): Factor out code
11145 to handle individual registers into...
11146 (store_register): ... this new function.
11147
c642a434
UW
111482011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11149
11150 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11151 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11152 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11153 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11154 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11155 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11156 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11157 (srv_xmlfiles): Add new XML files.
11158
11159 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11160 and <sys/uio.h>.
11161 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11162 (init_registers_s390_linux32v1): Add prototype.
11163 (init_registers_s390_linux32v2): Likewise.
11164 (init_registers_s390_linux64v1): Likewise.
11165 (init_registers_s390_linux64v2): Likewise.
11166 (init_registers_s390x_linux64v1): Likewise.
11167 (init_registers_s390x_linux64v2): Likewise.
11168 (s390_num_regs): Increment to 52.
11169 (s390_regmap): Add orig_r2 register.
11170 (s390_num_regs_3264): Increment to 68.
11171 (s390_regmap_3264): Add orig_r2 register.
11172 (s390_collect_ptrace_register): Handle orig_r2 register.
11173 (s390_supply_ptrace_register): Likewise.
11174 (s390_fill_last_break): New function.
11175 (s390_store_last_break): Likewise.
11176 (s390_fill_system_call): New function.
11177 (s390_store_system_call): Likewise.
11178 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11179 register sets.
11180 (s390_check_regset): New function.
11181 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11182 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11183 Update target_regsets for available register sets.
11184
2268b414
JK
111852011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11186 Jan Kratochvil <jan.kratochvil@redhat.com>
11187
11188 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11189 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11190 New.
11191 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11192 * linux-low.h (struct process_info_private): New member r_debug.
11193 * server.c (handle_qxfer_libraries): Call
11194 the_target->qxfer_libraries_svr4.
11195 (handle_qxfer_libraries_svr4): New function.
11196 (qxfer_packets): New entry "libraries-svr4".
11197 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11198 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11199 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11200 PACKET_qXfer_libraries_svr4.
11201
d6db1fab
UW
112022011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11203
11204 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11205 PSW address/mask between 8-byte and 16-byte formats.
11206 (s390_supply_ptrace_register): Likewise.
11207 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11208 basic addressing mode bit.
11209
242f5f1c
SS
112102011-11-24 Stan Shebs <stan@codesourcery.com>
11211
11212 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11213
f196051f
SS
112142011-11-17 Stan Shebs <stan@codesourcery.com>
11215
11216 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11217 (tracing_start_time): New global.
11218 (tracing_stop_time): New global.
11219 (tracing_user_name): New global.
11220 (tracing_notes): New global.
11221 (tracing_stop_note): New global.
11222 (cmd_qtstart): Set traceframe_usage, start_time.
11223 (stop_tracing): Set stop_time.
11224 (cmd_qtstatus): Report additional status.
11225 (cmd_qtp): New function.
11226 (handle_tracepoint_query): Call it.
11227 (cmd_qtnotes): New function.
11228 (handle_tracepoint_general_set): Call it.
11229 (get_timestamp): Rename from tsv_get_timestamp.
11230
405f8e94
SS
112312011-11-14 Stan Shebs <stan@codesourcery.com>
11232 Kwok Cheung Yeung <kcy@codesourcery.com>
11233
11234 * linux-x86-low.c (small_jump_insn): New.
11235 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11236 trampoline and error message, build a trampoline and issue a small
11237 jump instruction to it.
11238 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11239 trampoline and error message.
11240 (x86_get_min_fast_tracepoint_insn_len): New.
11241 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11242 * linux-low.h (struct linux_target_ops): Add arguments to
11243 install_fast_tracepoint_jump_pad operation, add new operation.
11244 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11245 arguments.
11246 (linux_get_min_fast_tracepoint_insn_len): New function.
11247 (linux_target_op): Add new operation.
11248 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11249 (gdb_trampoline_buffer_end): Ditto.
11250 (gdb_trampoline_buffer_error): Ditto.
11251 (struct ipa_sym_addresses): Add fields for new IPA variables.
11252 (symbol_list): Add entries for new IPA variables.
11253 (struct tracepoint): Add fields to hold the address range of the
11254 trampoline used by the tracepoint.
11255 (trampoline_buffer_head): New static variable.
11256 (trampoline_buffer_tail): Ditto.
11257 (claim_trampoline_space): New function.
11258 (have_fast_tracepoint_trampoline_buffer): New function.
11259 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11260 structure.
11261 (install_fast_tracepoint): Ditto, also add error buffer argument.
11262 (cmd_qtminftpilen): New function.
11263 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11264 (fast_tracepoint_from_trampoline_address): New function.
11265 (fast_tracepoint_collecting): Handle trampoline as part of jump
11266 pad space.
11267 (set_trampoline_buffer_space): New function.
11268 (initialize_tracepoint): Initialize new IPA variables.
11269 * target.h (struct target_ops): Add arguments to
11270 install_fast_tracepoint_jump_pad operation, add new
11271 get_min_fast_tracepoint_insn_len operation.
11272 (target_get_min_fast_tracepoint_insn_len): New.
11273 (install_fast_tracepoint_jump_pad): Add arguments.
11274 * server.h (IPA_BUFSIZ): Define.
11275 * linux-i386-ipa.c: Include extra header files.
11276 (initialize_fast_tracepoint_trampoline_buffer): New function.
11277 (initialize_low_tracepoint): Call it.
11278 * server.h (set_trampoline_buffer_space): Declare.
11279 (claim_trampoline_space): Ditto.
11280 (have_fast_tracepoint_trampoline_buffer): Ditto.
11281
1e4d1764
YQ
112822011-11-14 Yao Qi <yao@codesourcery.com>
11283
11284 * server.c (handle_query): Handle InstallInTrace for qSupported.
11285 * tracepoint.c (add_tracepoint): Sort list.
11286 (install_tracepoint, download_tracepoint): New.
11287 (cmd_qtdp): Call them to install and download tracepoints.
11288 (sort_tracepoints): Removed.
11289 (cmd_qtstart): Update.
11290
5c73ff4e
YQ
112912011-11-14 Yao Qi <yao@codesourcery.com>
11292
11293 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11294 * mem-break.h: Declare.
11295 * tracepoint.c (cmd_qtstart): Move some code to ...
11296 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11297 New.
11298 (download_tracepoints): Move some code to ...
11299 (download_tracepoint_1): ... here. New.
11300
86a30030
YQ
113012011-11-08 Yao Qi <yao@codesourcery.com>
11302
11303 * remote-utils.c (relocate_instruction): A comment fix.
11304
8d26e50c
JB
113052011-11-07 Joel Brobecker <brobecker@adacore.com>
11306
11307 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11308 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11309 dr_status_mirror and dr_control_mirror from debug_reg_state.
11310 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11311 (i386_initial_stuff): Remove use of deleted globals.
11312 (i386_get_thread_context, i386_set_thread_context,
11313 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11314 from debug_reg_state.
11315
a59306a3
YQ
113162011-11-05 Yao Qi <yao@codesourcery.com>
11317
11318 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11319 address as TPOINT's.
11320
3065dfb6
SS
113212011-11-02 Stan Shebs <stan@codesourcery.com>
11322
11323 * tracepoint.c (agent_mem_read_string): New function.
11324 (eval_agent_expr): Call it for tracenz.
11325 * server.c (handle_query): Report support for tracenz.
11326
fd0d8c7c
YQ
113272011-11-02 Yao Qi <yao@codesourcery.com>
11328
11329 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11330
609086b1
YQ
113312011-11-02 Yao Qi <yao@codesourcery.com>
11332
11333 * target.h: Fix a typo in comment.
11334
b9fd1791
PA
113352011-10-31 Pedro Alves <pedro@codesourcery.com>
11336
11337 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11338 clobber the breakpoints' shadows with fast tracepoint jumps.
11339 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11340 * target.c (write_inferior_memory): Also pass MYADDR down to
11341 check_mem_write.
11342
03583c20
UW
113432011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11344
11345 * configure.ac: Check support for personality routine.
11346 * configure: Regenerate.
11347 * config.in: Likewise.
11348 * linux-low.c: Include <sys/personality.h>.
11349 Define ADDR_NO_RANDOMIZE if necessary.
11350 (linux_create_inferior): Disable address space randomization when
11351 forking inferior, if requested.
11352 (linux_supports_disable_randomization): New function.
11353 (linux_target_ops): Install it.
11354 * server.h (disable_randomization): Declare.
11355 * server.c (disable_randomization): New global variable.
11356 (handle_general_set): Handle QDisableRandomization.
11357 (handle_query): Likewise for qSupported.
11358 (main): Support --disable-randomization and --no-disable-randomization
11359 command line arguments.
11360 * target.h (struct target_ops): Add supports_disable_randomization.
11361 (target_supports_disable_randomization): New macro.
11362
723b724b
MF
113632011-09-29 Mike Frysinger <vapier@gentoo.org>
11364
11365 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11366 ifdef check.
11367 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11368 [!PT_GETDSBT] (target_loadmap): New definition.
11369 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11370 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11371 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11372 and PT_GETDSBT to LINUX_LOADMAP.
11373 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11374 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11375
55329a5c 113762011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11377
11378 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11379 (arm_linux_hwbp_cap): New static variable.
11380 (arm_linux_get_hwbp_cap): Replace by ...
11381 (arm_linux_init_hwbp_cap): ... this new function.
11382 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11383 (arm_linux_get_hw_watchpoint_count): Likewise.
11384 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11385 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11386 (arm_prepare_to_resume): Use perror_with_name instead of error.
11387
55329a5c 113882011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11389
11390 * linux-arm-low.c: Include <signal.h>.
11391 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11392 (struct arm_linux_hwbp_cap): New data type.
11393 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11394 (struct arm_linux_hw_breakpoint): New data type.
11395 (MAX_BPTS, MAX_WPTS): Define.
11396 (struct arch_process_info, struct arch_lwp_info): New data types.
11397 (arm_linux_get_hwbp_cap): New function.
11398 (arm_linux_get_hw_breakpoint_count): Likewise.
11399 (arm_linux_get_hw_watchpoint_count): Likewise.
11400 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11401 (arm_hwbp_control_initialize): Likewise.
11402 (arm_hwbp_control_is_enabled): Likewise.
11403 (arm_hwbp_control_is_initialized): Likewise.
11404 (arm_hwbp_control_disable): Likewise.
11405 (arm_linux_hw_breakpoint_equal): Likewise.
11406 (arm_linux_hw_point_initialize): Likewise.
11407 (struct update_registers_data): New data structure.
11408 (update_registers_callback: New function.
11409 (arm_insert_point): Likewise.
11410 (arm_remove_point): Likewise.
11411 (arm_stopped_by_watchpoint): Likewise.
11412 (arm_stopped_data_address): Likewise.
11413 (arm_new_process): Likewise.
11414 (arm_new_thread): Likewise.
11415 (arm_prepare_to_resume): Likewise.
11416 (the_low_target): Register arm_insert_point, arm_remove_point,
11417 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11418 arm_new_thread, and arm_prepare_to_resume.
11419
6b9801d4
SS
114202011-09-15 Stan Shebs <stan@codesourcery.com>
11421
11422 * server.h (struct emit_ops): Add compare-goto fields.
11423 * tracepoint.c (gdb_agent_op_sizes): New table.
11424 (emit_eq_goto): New function.
11425 (emit_ne_goto): New function.
11426 (emit_lt_goto): New function.
11427 (emit_le_goto): New function.
11428 (emit_gt_goto): New function.
11429 (emit_ge_goto): New function.
11430 (is_goto_target): New function.
11431 (compile_bytecodes): Recognize special cases of compare-goto
11432 combinations and call specialized emitters for them.
11433 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11434 (amd64_emit_ne_goto): New function.
11435 (amd64_emit_lt_goto): New function.
11436 (amd64_emit_le_goto): New function.
11437 (amd64_emit_gt_goto): New function.
11438 (amd64_emit_ge_goto): New function.
11439 (amd64_emit_ops): Add the new functions.
11440 (i386_emit_eq_goto): New function.
11441 (i386_emit_ne_goto): New function.
11442 (i386_emit_lt_goto): New function.
11443 (i386_emit_le_goto): New function.
11444 (i386_emit_gt_goto): New function.
11445 (i386_emit_ge_goto): New function.
11446 (i386_emit_ops): Add the new functions.
11447
bf15cbda
SS
114482011-09-08 Stan Shebs <stan@codesourcery.com>
11449
11450 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11451 (i386_emit_epilogue): Restore %ebx.
11452
943ca1dd
JZ
114532011-08-31 Jie Zhang <jzhang918@gmail.com>
11454
11455 * server.c (step_thread): Remove definition.
11456 (process_serial_event): Don't handle Hs.
11457 * server.h (step_thread): Remove declaration.
11458 * target.c (set_desired_inferior): Remove use of step_thread.
11459
e3deef73
LM
114602011-08-24 Luis Machado <lgustavo@codesourcery.com>
11461
11462 * linux-low.c: Include linux-procfs.h.
11463 (linux_attach_lwp_1): Update comments.
11464 (linux_attach): Scan for existing threads when attaching to a
11465 process that is the tgid.
11466 * Makefile.in: Update dependencies.
11467
13da1c97
LM
114682011-08-24 Luis Machado <lgustavo@codesourcery.com>
11469
11470 * configure.srv: Add linux-procfs.o dependencies.
11471
881127c9
YQ
114722011-08-14 Yao Qi <yao@codesourcery.com>
11473
11474 * target.h (struct target_ops): Fix indent.
11475 * win32-low.c (win32_target_ops): Fix comment.
11476
58dbd541
YQ
114772011-08-14 Andrew Jenner <andrew@codesourcery.com>
11478 Yao Qi <yao@codesourcery.com>
11479
11480 * Makefile.in (clean): Remove tic6x-*.c files.
11481 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11482 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11483 (tic6x-c64xp-linux.c): Likewise.
11484 * configure.srv: Add support for tic6x-*-uclinux.
11485 * linux-tic6x-low.c: New.
11486 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11487
78d85199
YQ
114882011-08-14 Andrew Stubbs <ams@codesourcery.com>
11489 Yao Qi <yao@codesourcery.com>
11490
11491 * target.h (struct target_ops): Add read_loadmap.
11492 * linux-low.c (struct target_loadseg): New type.
11493 (struct target_loadmap): New type.
11494 (linux_read_loadmap): New function.
11495 (linux_target_ops): Add linux_read_loadmap.
11496 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11497 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11498 to NULL.
78d85199 11499
a959a88d
EZ
115002011-08-05 Eli Zaretskii <eliz@gnu.org>
11501
11502 * win32-low.c: Include <stdint.h>.
11503
1ced966e
PA
115042011-07-22 Pedro Alves <pedro@codesourcery.com>
11505
11506 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11507 to the inferior here.
11508 (i386_remove_aligned_watchpoint): Ditto.
11509 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11510 fit part of the watchpoint in the debug registers.
11511 (i386_update_inferior_debug_regs): New.
11512 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11513 registers, and only update the inferior on success.
11514 (i386_low_remove_watchpoint): Ditto.
11515
d26e3629
KY
115162011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11517
11518 * linux-low.c (compare_ints, unique, list_threads, show_process,
11519 linux_core_of_thread): Delete.
11520 (linux_target_ops): Change linux_core_of_thread to
11521 linux_common_core_of_thread.
11522 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11523 * utils.c (malloc_failure): Change type of argument.
11524 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11525 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11526 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11527 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11528 (IPA_OBJS): Add common-utils-ipa.o.
11529 (ptid_h, linux_osdata_h): New macros.
11530 (server_h): Add common/common-utils.h, common/xml-utils.h,
11531 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11532 common/ptid.h.
11533 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11534 ptid.o, buffer.o): New rules.
11535 (linux-low.o): Add common/linux-osdata.h as a dependency.
11536 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11537 * configure.ac: Add AC_HEADER_DIRENT check.
11538 * config.in: Regenerate.
11539 * configure: Regenerate.
11540 * remote-utils.c (xml_escape_text): Delete.
11541 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11542 buffer_xml_printf): Move to common/buffer.c.
11543 * server.c (main): Remove call to initialize_inferiors.
11544 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11545 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11546 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11547 internal_error, gdb_assert, gdb_assert_fail): Delete.
11548 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11549 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11550 common/buffer.h.
11551 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11552 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11553 initialize_inferiors): Delete.
11554
2275a1a7
PA
115552011-07-20 Pedro Alves <pedro@codesourcery.com>
11556
11557 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11558 symbol error.
11559
0a5b1e09
PA
115602011-05-31 Pedro Alves <pedro@codesourcery.com>
11561
11562 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11563 assertion.
11564 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11565
6938fd34
YQ
115662011-05-26 Yao Qi <yao@codesourcery.com>
11567
11568 * Makefile.in (thread-db.o): Track dependence to
11569 common/gdb_thread_db.h.
11570 * thread-db.c: include gdb_thread_db.h from right place.
11571
b481f9e0
TT
115722011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11573
11574 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11575 __FILE__ and __LINE__ to internal_error.
11576
98a5dd13
DE
115772011-05-13 Doug Evans <dje@google.com>
11578
11579 * thread-db.c (try_thread_db_load_from_sdir): New function.
11580 (try_thread_db_load_from_dir): New function.
11581 (thread_db_load_search): Handle $sdir, ignore $pdir.
11582 Remove trying of system directories if search of
11583 libthread-db-search-path fails, that is now done via $sdir.
11584
d248b706
KY
115852011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11586
11587 * server.c (handle_query): Add EnableDisableTracepoints to the list
11588 of supported features.
43aaf8b6 11589 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11590 tracepoints.
43aaf8b6
PA
11591 (cmd_qtenable_disable): New.
11592 (cmd_qtstart): Install tracepoints even if disabled.
11593 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11594 receiving a QTEnable or QTDisable packet.
11595 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11596 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11597 tracepoints.
11598 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11599
84e578fb
DE
116002011-05-10 Doug Evans <dje@google.com>
11601
11602 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11603
71f55dd8
DE
116042011-05-04 Doug Evans <dje@google.com>
11605
11606 * linux-low.c (linux_join): Skip process lookup.
11607 * spu-low.c (spu_join): Ditto.
11608 * server.c (join_inferiors_callback): Delete.
11609 (process_serial_event): For 'D' packet (detach) call join_inferior
11610 directly.
11611
4d393d60
JM
116122011-05-04 Joseph Myers <joseph@codesourcery.com>
11613
11614 * README: Don't mention xscale*-*-linux*.
11615 * configure.srv (xscale*-*-linux*): Don't handle target.
11616
b00ad6ff
NF
116172011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11618
11619 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11620 casting pointers.
11621 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11622 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11623 (i386_emit_void_call_2): Likewise.
11624
af96c192
YQ
116252011-04-26 Yao Qi <yao@codesourcery.com>
11626
43aaf8b6
PA
11627 * linux-low.c: Move common macros to linux-ptrace.h.
11628 Include linux-ptrace.h.
af96c192
YQ
11629 * Makefile.in (linux_ptrace_h): New.
11630 (linux-low.o): Depends on linux-ptrace.h.
11631
03f2bd59
JK
116322011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11633
11634 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11635 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11636 (remote_prepare): New function with most of the TCP code from ...
11637 (remote_open): ... here. Detect PORT here unconditionally. Move also
11638 setting transport_is_reliable.
11639 * server.c (run_once): New variable.
11640 (gdbserver_usage): Document it.
11641 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11642 the first run if RUN_ONCE.
11643 * server.h (run_once, remote_prepare): New declarations.
11644
7a9dd1b2
TT
116452011-04-19 Tom Tromey <tromey@redhat.com>
11646
11647 * win32-low.c (handle_load_dll): Remove duplicate "the".
11648
81239425
PM
116492011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11650
11651 Remove support for old Cygwin 1.5 versions.
11652 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11653 function to avoid warning.
11654 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11655 warning.
11656
9e0627f1
PM
116572011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11658
11659 * gdbserver/server.h (Macro _): Define it if not available.
11660
588eebee
MS
116612011-03-14 Michael Snyder <msnyder@vmware.com>
11662
348af9f7 11663 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11664
43f70d4c
JB
116652011-03-10 Joel Brobecker <brobecker@adacore.com>
11666
11667 * Makefile.in (maintainer-clean realclean distclean): Remove
11668 "make ... subdir_do" command.
11669
348af9f7
MS
116702011-03-10 Michael Snyder <msnyder@vmware.com>
11671
11672 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11673
11674 * server.c (handle_v_run): Free alloced buffer on early return.
11675
e637a4f5
YQ
116762011-03-09 Yao Qi <yao@codesourcery.com>
11677
11678 Revert:
11679 2011-03-04 Yao Qi <yao@codesourcery.com>
11680
11681 * Makefile.in: Remove GNU make feature --directory.
11682
11683 2011-03-05 Yao Qi <yao@codesourcery.com>
11684
11685 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11686 (subdir_do): New make target. Copied from gdb/Makefile.
11687 (maintainer-clean, realclean, distclean, clean): Call corresponding
11688 make targets in common/Makefile.
11689
11690 2011-02-11 Yao Qi <yao@codesourcery.com>
11691
11692 * configure.ac: Call AC_PROG_RANLIB.
11693 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11694 * configure: Regenerate.
11695
e6edda56
JK
116962011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11697
11698 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11699
e5141119
JB
117002011-03-06 Yao Qi <yao@codesourcery.com>
11701
11702 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11703
64794aa4
JB
117042011-03-05 Yao Qi <yao@codesourcery.com>
11705
11706 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11707 (subdir_do): New make target. Copied from gdb/Makefile.
11708 (maintainer-clean, realclean, distclean, clean): Call corresponding
11709 make targets in common/Makefile.
11710
7a762829
YQ
117112011-03-04 Yao Qi <yao@codesourcery.com>
11712
11713 * Makefile.in: Remove GNU make feature --directory.
11714
348af9f7
MS
117152011-03-04 Michael Snyder <msnyder@vmware.com>
11716
11717 * server.c (queue_stop_reply): Call xmalloc not malloc.
11718
117192011-03-02 Michael Snyder <msnyder@vmware.com>
11720
11721 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11722
9f72fee2
MS
117232011-02-28 Michael Snyder <msnyder@vmware.com>
11724
588eebee
MS
11725 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11726 (cmd_qtframe): Ditto.
11727 (cmd_qtbuffer): Ditto.
11728 (cmd_bigqtbuffer): Ditto.
11729
9f72fee2
MS
11730 * utils.c (decimal2str): Initialize 'width' to nine, then
11731 don't mess with it.
11732
8040bd49
UW
117332011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11734
11735 * hostio.c (require_data): Free *data, not data.
11736
7e52cbd0
JK
117372011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11738
11739 * hostio.c (require_data): Use free, not xfree.
11740
9130f83e
MS
117412011-02-27 Michael Snyder <msnyder@vmware.com>
11742
4b812f4e
MS
11743 * server.c (handle_query): Discard unused value.
11744
9130f83e
MS
11745 * hostio.c (require_data): Free malloc memory before returning
11746 error.
11747
69d37113
MS
117482011-02-26 Michael Snyder <msnyder@vmware.com>
11749
11750 * linux-low.c (list_threads): Call closedir for dirent.
11751
35f5825a
MS
117522011-02-27 Michael Snyder <msnyder@vmware.com>
11753
2a589cef
MS
11754 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11755 a case statement falls through.
11756
0adea5f7
MS
11757 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11758
35f5825a
MS
11759 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11760 in comparison.
11761
238f1c74
MS
117622011-02-26 Michael Snyder <msnyder@vmware.com>
11763
11764 * utils.c (decimal2str): Eliminate dead code and dead param.
11765 (pulongest): Drop dead param from call to decimal2str.
11766 (plongest): Ditto.
11767
633ff500
JB
117682011-02-24 Joel Brobecker <brobecker@adacore.com>
11769
11770 Revert the following patch (not approved yet):
11771 2011-02-21 Hui Zhu <teawater@gmail.com>
11772 * tracepoint.c (tp_printf): New function.
11773 (eval_agent_expr): Handle gdb_agent_op_printf.
11774
f9c6ff72
HZ
117752011-02-21 Hui Zhu <teawater@gmail.com>
11776
11777 * tracepoint.c (tp_printf): New function.
11778 (eval_agent_expr): Handle gdb_agent_op_printf.
11779
94d5e490
TT
117802011-02-18 Tom Tromey <tromey@redhat.com>
11781
11782 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11783 (tracepoint.o): Likewise.
11784 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11785 (gdb_agent_op_names): Likewise.
11786
c7f96d2b
TT
117872011-02-18 Tom Tromey <tromey@redhat.com>
11788
11789 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11790 gdb_agent_op_rot>: New constants.
11791 (gdb_agent_op_names): Add pick and roll.
11792 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11793 cases.
11794
0feedb2c
JK
117952011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11796
11797 * aclocal.m4: Regenerated with aclocal-1.11.1.
11798
b3b9301e
PA
117992011-02-14 Pedro Alves <pedro@codesourcery.com>
11800
11801 * server.c (handle_qxfer_traceframe_info): New.
11802 (qxfer_packets): Register "traceframe-info".
11803 (handle_query): Report support for qXfer:traceframe-info:read+.
11804 * tracepoint.c (match_blocktype): New.
11805 (traceframe_find_block_type): Rename to ...
11806 (traceframe_walk_blocks): ... this. Add callback filter argument,
11807 and use it.
11808 (traceframe_find_block_type): New, reimplemented on top of
11809 traceframe_walk_blocks.
11810 (build_traceframe_info_xml): New.
11811 (traceframe_read_info): New.
11812 * server.h (traceframe_read_info): Declare.
11813
4f3e6fb7
YQ
118142011-02-11 Yao Qi <yao@codesourcery.com>
11815
11816 * configure.ac: Call AC_PROG_RANLIB.
11817 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11818 * configure: Regenerate.
11819
764880b7
PA
118202011-02-07 Pedro Alves <pedro@codesourcery.com>
11821
11822 * server.c (gdb_read_memory): Change return semantics to allow
11823 partial transfers.
11824 (handle_search_memory_1): Adjust.
11825 (process_serial_event) <'m' packet>: Handle partial transfers.
11826 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11827
1c79eb8a
PA
118282011-01-28 Pedro Alves <pedro@codesourcery.com>
11829
11830 * regcache.c (init_register_cache): Initialize
11831 regcache->register_status.
11832 (free_register_cache): Release regcache->register_status.
11833 (regcache_cpy): Copy register_status.
11834 (registers_to_string): Print 'x's for unavailable registers.
11835 (supply_register): Mark the register's status valid or
11836 unavailable, depending on whether a buffer was passed in or not.
11837 (supply_register_zeroed): New.
11838 (supply_regblock): Mark the registers' status valid or
11839 unavailable, depending on whether a buffer was passed in or not.
11840 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11841 (struct regcache): New `register_status' field.
11842 (supply_register_zeroed): Declare.
11843 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11844 supply_register_zeroed, rather than passing a NULL buffer to
11845 supply_register.
11846 * tracepoint.c (fetch_traceframe_registers): Update comment.
11847
85724a0e
PA
118482011-01-28 Pedro Alves <pedro@codesourcery.com>
11849
11850 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11851 buffer explicit.
11852
d08aafef
PA
118532011-01-25 Pedro Alves <pedro@codesourcery.com>
11854
11855 * server.h (decode_xfer_write): Change prototype.
11856 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11857 and don't extract the annex here.
11858 * server.c (decode_xfer_read): Remove `annex' parameter,
11859 and don't extract the annex here.
11860 (decode_xfer): New.
11861 (struct qxfer): New.
11862 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11863 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11864 (handle_qxfer_statictrace): New functions, abstracted out from
11865 handle_query, and made to use the struct qxfer interface.
11866 (handle_threads_qxfer_proper): Rename to ...
11867 (handle_qxfer_threads_proper): ... this.
11868 (handle_threads_qxfer): Rename to ...
11869 (handle_qxfer_threads): ... this. Adjust.
11870 (qxfer_packets): New array.
11871 (handle_qxfer): New function.
11872 (handle_query): Use handle_qxfer.
11873
493e2a69
MS
118742011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11875
11876 * gdbreplay.c: Shorten lines of >= 80 columns.
11877 * linux-low.c: Ditto.
11878 * linux-ppc-low.c: Ditto.
11879 * linux-s390-low.c: Ditto.
11880 * linux-sparc-low.c: Ditto.
11881 * linux-x86-low.c: Ditto.
11882 * linux-xtensa-low.c: Ditto.
11883 * mem-break.c: Ditto.
11884 * nto-low.c: Ditto.
11885 * regcache.h: Ditto.
11886 * remote-utils.c: Ditto.
11887 * server.c: Ditto.
11888 * server.h: Ditto.
11889 * thread-db.c: Ditto.
11890 * tracepoint.c: Ditto.
11891 * utils.c: Ditto.
11892 * win32-low.h: Ditto.
11893
44944448
JB
118942011-01-05 Joel Brobecker <brobecker@adacore.com>
11895
11896 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11897 update.
11898
71ce852c
JB
118992011-01-01 Joel Brobecker <brobecker@adacore.com>
11900
11901 * server.c (gdbserver_version): Update copyright year in version
11902 output.
11903 * gdbreplay.c (gdbreplay_version): Ditto.
11904
eb826dc6
MF
119052010-12-29 Jie Zhang <jie.zhang@analog.com>
11906
11907 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11908 * linux-bfin-low.c: New file.
11909 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11910 PT_DATA_ADDR for BFIN targets.
11911 * Makefile.in (SFILES): Add linux-bfin-low.c.
11912 (clean): Remove reg-bfin.c.
11913 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11914 * README: Mention supported Blackfin targets.
11915
39ab222a
MF
119162010-12-23 Mike Frysinger <vapier@gentoo.org>
11917
11918 * .gitignore: New file.
11919
a1f2ce7d
MF
119202010-11-16 Mike Frysinger <vapier@gentoo.org>
11921
11922 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11923
f474844c
JZ
119242010-10-22 Jie Zhang <jie@codesourcery.com>
11925
11926 * Makefile.in: Add FLAGS_TO_PASS variable.
11927 (install): Remove dependency of install-only and recursively
11928 invoke make for install-only.
11929
f1048712
DE
119302010-10-04 Doug Evans <dje@google.com>
11931
11932 * Makefile.in (uninstall): Use $(DESTDIR).
11933
b53a1623
PA
119342010-09-24 Pedro Alves <pedro@codesourcery.com>
11935
e6ee044d
PA
11936 PR gdb/11842
11937
b53a1623
PA
11938 * linux-x86-low.c (compat_siginfo_from_siginfo)
11939 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11940 si_code is < 0. Check for si_code == SI_TIMER before checking for
11941 si_code < 0.
11942
fa1bd1e4
JB
119432010-09-13 Joel Brobecker <brobecker@adacore.com>
11944
11945 * lynx-i386-low.c: New file.
11946 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11947
47fac8f8
JB
119482010-09-13 Joel Brobecker <brobecker@adacore.com>
11949
11950 * lynx-low.c (ptrace_request_to_str): Remove handling for
11951 request values that have been removed in LynxOS 5.x.
11952
1adfc54d
JB
119532010-09-13 Joel Brobecker <brobecker@adacore.com>
11954
11955 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11956 <ptrace.h>
11957
c2a66c29
NS
119582010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11959
11960 * configure.ac: Add --enable-inprocess-agent option.
11961 * configure: Rebuilt.
11962
32fcada3
YQ
119632010-09-06 Yao Qi <yao@codesourcery.com>
11964
11965 * linux-low.c (linux_kill): Remove unused variable.
11966 (linux_stabilize_threads): Likewise.
11967 * server.c (start_inferior): Likewise.
11968 (queue_stop_reply_callback): Likewise.
11969 * tracepoint.c (do_action_at_tracepoint): Likewise.
11970
0cccb683
YQ
119712010-09-06 Yao Qi <yao@codesourcery.com>
11972
11973 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11974 on return.
11975
423ec54c
JK
119762010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11977
11978 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11979
12ac6819
PA
119802010-09-06 Pedro Alves <pedro@codesourcery.com>
11981
11982 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11983 "$(IPA_DEPFILES)".
11984
8ed54b31
JB
119852010-09-01 Joel Brobecker <brobecker@adacore.com>
11986
11987 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11988 gdbserver/lynx-ppc-low.c: New files.
11989 * Makefile.in (lynx_low_h): New variable.
11990 (lynx-low.o, lynx-ppc-low.o): New rules.
11991 * configure.ac: On LynxOS, link with -lnetinet.
11992 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11993 * configure: regenerate.
11994
bb0116a4
JB
119952010-09-01 Joel Brobecker <brobecker@adacore.com>
11996
11997 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11998 * configure.ac: Add check for vasprintf and vsnprintf.
11999 * configure, config.in: Regenerate.
12000 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12001
a778ab81 120022010-09-01 Joel Brobecker <brobecker@adacore.com>
12003
12004 * gdbreplay.c: Move include of alloca.h up, next to include of
12005 malloc.h.
12006 * server.h: Add include of malloc.h.
12007 * mem-break.c: Remove include of malloc.h.
12008 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12009
8b034a19 120102010-09-01 Joel Brobecker <brobecker@adacore.com>
12011
12012 * Makefile.in (memmem.o): Build with -Wno-error.
12013
120142010-09-01 Joel Brobecker <brobecker@adacore.com>
12015
12016 * utils.c (xsnprintf): Make non-static.
12017 * server.h: Add xsnprintf declaration.
12018 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12019 replace calls to snprintf by calls to xsnprintf throughout.
12020
120212010-09-01 Joel Brobecker <brobecker@adacore.com>
12022
12023 * configure.ac: Add configure check for alloca.
12024 * configure, config.in: Regenerate.
12025 * server.h: Include alloca.h if it exists.
12026 * gdbreplay.c: Include alloca.h if it exists.
12027
1a981360
PA
120282010-08-28 Pedro Alves <pedro@codesourcery.com>
12029
12030 * linux-low.c (__SIGRTMIN): Define if not already defined.
12031 (linux_create_inferior): Check for __ANDROID__ rather than
12032 __SIGRTMIN.
12033 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12034 are already deferred.
12035 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12036 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12037 stopped and already has a pending signal to report.
12038 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12039 a pending signal to report or is moving out of a jump pad.
12040 (linux_init_signals): Check for __ANDROID__ rather than
12041 __SIGRTMIN.
12042
b4d51a55
PA
120432010-08-28 Pedro Alves <pedro@codesourcery.com>
12044
12045 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12046 debug_threads check. Avoid a linear search when not doing debug
12047 output.
12048
ec48365d
PA
120492010-08-27 Pedro Alves <pedro@codesourcery.com>
12050
12051 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12052 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12053 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12054 (process_event): Change local fd's type to gdb_fildes_t.
12055 (create_file_handler): Adjust prototype.
12056 (delete_file_handler): Adjust prototype.
12057 (handle_file_event): Adjust prototype. Use pfildes.
12058 (create_file_event): Adjsut prototype.
12059 * remote-utils.c (remote_desc, listen_desc): Change type to
12060 gdb_fildes_t.
12061 * server.h: New gdb_fildes_t typedef.
12062 [USE_WIN32API]: Include winsock2.h.
12063 (delete_file_handler, add_file_handler): Adjust prototypes.
12064 (pfildes): Declare.
12065 * utils.c (pfildes): New.
12066
854d88f0
PA
120672010-08-27 Pedro Alves <pedro@codesourcery.com>
12068
12069 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12070 * configure: Regenerate.
12071
0146f85b
PA
120722010-08-27 Pedro Alves <pedro@codesourcery.com>
12073
12074 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12075 (linux_done_accessing_memory): ... this.
12076 (linux_target_ops): Adjust.
12077 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12078 * nto-low.c (nto_target_ops): Adjust comment.
12079 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12080 * spu-low.c (spu_target_ops): Adjust comment.
12081 * target.h (target_ops): Rename unprepare_to_access_memory field
12082 to done_accessing_memory.
12083 (unprepare_to_access_memory): Rename to ...
12084 (done_accessing_memory): ... this.
12085
90d74c30
PA
120862010-08-26 Pedro Alves <pedro@codesourcery.com>
12087
12088 * linux-low.c (linux_prepare_to_access_memory): New.
12089 (linux_unprepare_to_access_memory): New.
12090 (linux_target_ops): Install them.
12091 * server.c (read_memory): Rename to ...
12092 (gdb_read_memory): ... this. Use
12093 prepare_to_access_memory/prepare_to_access_memory.
12094 (write_memory): Rename to ...
12095 (gdb_write_memory): ... this. Use
12096 prepare_to_access_memory/prepare_to_access_memory.
12097 (handle_search_memory_1): Adjust.
12098 (process_serial_event): Adjust.
12099 * target.h (struct target_ops): New fields
12100 prepare_to_access_memory and unprepare_to_access_memory.
12101 (prepare_to_access_memory, unprepare_to_access_memory): New.
12102 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12103 prepare_to_access_memory/prepare_to_access_memory.
12104 * nto-low.c (nto_target_ops): Adjust.
12105 * spu-low.c (spu_target_ops): Adjust.
12106 * win32-low.c (win32_target_ops): Adjust.
12107
fd467969
PA
121082010-08-26 Pedro Alves <pedro@codesourcery.com>
12109
12110 * Makefile.in (WARN_CFLAGS): Get it from configure.
12111 (WERROR_CFLAGS): New.
12112 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12113 * configure.ac: Introduce --enable-werror, which adds -Werror to
12114 the compiler command line. Enabled by default. Disable with
12115 --disable-werror. Add -Wdeclaration-after-statement
12116 Wpointer-arith and -Wformat-nonliteral to warning flags.
12117 * configure: Regenerate.
12118
331e2f5f
PA
121192010-08-26 Pedro Alves <pedro@codesourcery.com>
12120
12121 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12122
e581f2b4
PA
121232010-08-26 Pedro Alves <pedro@codesourcery.com>
12124
12125 * gdbreplay.c (remote_error): New.
12126 (gdbchar): New.
12127 (expect): Use gdbchar. Check for error reading from GDB.
12128 Clarify sync error output.
12129 (play): Check for errors writing to GDB.
12130 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12131 * remote-utils.c (getpkt): Check for errors writing to the remote
12132 descriptor.
12133
3c11dd79
PA
121342010-08-25 Pedro Alves <pedro@codesourcery.com>
12135
12136 * linux-low.c (linux_wait_1): Move non-debugging code out of
12137 `debug_threads' control.
12138
d20a8ad9
PA
121392010-08-25 Pedro Alves <pedro@codesourcery.com>
12140
12141 * linux-low.c (linux_wait_1): Don't set last_status here.
12142 * server.c (push_event, queue_stop_reply_callback): Assert we're
12143 not pushing a TARGET_WAITKIND_IGNORE event.
12144 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12145 (myresume, handle_target_event): Set the thread's last_resume_kind
12146 and last_status from the target returned status.
12147
964e4306
PA
121482010-08-25 Pedro Alves <pedro@codesourcery.com>
12149
12150 PR threads/10729
12151
12152 * linux-x86-low.c (update_debug_registers_callback): New.
12153 (i386_dr_low_set_addr): Use it.
12154 (i386_dr_low_get_addr): New.
12155 (i386_dr_low_set_control): Use update_debug_registers_callback.
12156 (i386_dr_low_get_control): New.
12157 (i386_dr_low_get_status): Adjust.
12158 * linux-low.c (linux_stop_lwp): New.
12159 * linux-low.h (linux_stop_lwp): Declare.
12160
12161 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12162 argument instead of a i386_debug_reg_state.
12163 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12164 a i386_debug_reg_state.
12165 (i386_insert_aligned_watchpoint): Adjust.
12166 (i386_remove_aligned_watchpoint): Adjust.
12167 (i386_low_stopped_data_address): Read the debug registers from the
12168 inferior instead of from the mirrors.
12169 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12170 (i386_dr_low_get_addr): Declare.
12171 (i386_dr_low_get_control): Declare.
12172 (i386_dr_low_get_status): Change prototype.
12173
12174 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12175 (i386_dr_low_get_addr): New.
12176 (i386_dr_low_get_control): New.
12177 (i386_dr_low_get_status): Adjust prototype. Return
12178 dr_status_mirror.
12179 (i386_initial_stuff): Clear dr_status_mirror and
12180 dr_control_mirror.
12181 (i386_get_thread_context): Adjust.
12182 (i386_set_thread_context): Adjust.
12183 (i386_thread_added): Adjust.
12184
5f21a75b
PA
121852010-08-24 Pedro Alves <pedro@codesourcery.com>
12186
12187 * linux-low.h (linux_thread_area): Delete declaration.
12188
3e4c1235
TS
121892010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12190
12191 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12192 after its termination.
12193
1971b033
PA
121942010-08-09 Pedro Alves <pedro@codesourcery.com>
12195
12196 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12197 (gdb_wants_all_stopped): Delete.
12198 (linux_wait_1): Don't call them.
12199 * server.c (handle_v_cont): Tag all threads as want-stopped.
12200 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12201 stopped as "client-wants-stopped".
12202
310444ac
PA
122032010-07-31 Pedro Alves <pedro@codesourcery.com>
12204
12205 * Makefile.in (signals_h): New.
12206 (server_h): Depend on it.
12207 (server.o): Don't depend on $(signals_def).
12208 (signals.o): Depend on $(signals_def).
12209
a19cae16
JK
122102010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12211
12212 * Makefile.in (signals_def): New.
12213 (server_h): Append include/gdb/signals.h and signals_def.
12214 (server.o): Append signals_def.
12215
30d50328
JK
122162010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12217
12218 * server.c (handle_target_event): Use target_signal_to_host for
12219 resume_info.sig initialization.
12220 * target.h (struct thread_resume) <sig>: New comment.
12221
5c3216e2
OS
122222010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12223
c6f46ca0
OS
12224 * server.c (handle_query): strcpy() the returned string from paddress()
12225 instead of sprintf().
5c3216e2
OS
12226 * utils.c (paddress): Return phex_nz().
12227
6bd31874
JB
122282010-07-07 Joel Brobecker <brobecker@adacore.com>
12229
12230 * server.c (handle_v_cont): Call mourn_inferior if process
12231 just exited.
12232 (myresume): Likewise.
12233
0fb4aa4b
PA
122342010-07-01 Pedro Alves <pedro@codesourcery.com>
12235
12236 Static tracepoints, and integration with UST.
12237
12238 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12239 * mem-break.c (uninsert_all_breakpoints)
12240 (reinsert_all_breakpoints): New.
12241 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12242 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12243 (gdb_agent_ust_loaded, helper_thread_id)
12244 (gdb_agent_helper_thread_id): New macros.
12245 (struct ipa_sym_addresses): Add addr_ust_loaded,
12246 addr_helper_thread_id, addr_cmd_buf.
12247 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12248 (in_process_agent_loaded_ust): New.
12249 (write_e_ust_not_loaded): New.
12250 (maybe_write_ipa_ust_not_loaded): New.
12251 (struct collect_static_trace_data_action): New.
12252 (enum tracepoint_type) <static_tracepoint>: New.
12253 (struct tracepoint) <handle>: Mention static tracepoints.
12254 (struct static_tracepoint_ctx): New.
12255 (CMD_BUF_SIZE): New.
12256 (add_tracepoint_action): Handle static tracepoint actions.
12257 (unprobe_marker_at): New.
12258 (clear_installed_tracepoints): Handle static tracepoints.
12259 (cmd_qtdp): Handle static tracepoints.
12260 (probe_marker_at): New.
12261 (cmd_qtstart): Handle static tracepoints.
12262 (response_tracepoint): Handle static tracepoints.
12263 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12264 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12265 (get_context_regcache): Handle static tracepoints.
12266 (do_action_at_tracepoint): Handle static tracepoint actions.
12267 (traceframe_find_block_type): Handle static trace data blocks.
12268 (traceframe_read_sdata): New.
12269 (download_tracepoints): Download static tracepoint actions.
12270 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12271 (GDB_PROBE_NAME): New.
12272 (ust_ops): New.
12273 (GET_UST_SYM): New.
12274 (USTF): New.
12275 (dlsym_ust): New.
12276 (ust_marker_to_static_tracepoint): New.
12277 (gdb_probe): New.
12278 (collect_ust_data_at_tracepoint): New.
12279 (gdb_ust_probe): New.
12280 (UNIX_PATH_MAX, SOCK_DIR): New.
12281 (gdb_ust_connect_sync_socket): New.
12282 (resume_thread, stop_thread): New.
12283 (run_inferior_command): New.
12284 (init_named_socket): New.
12285 (gdb_ust_socket_init): New.
12286 (cstr_to_hexstr): New.
12287 (next_st): New.
12288 (first_marker, next_marker): New.
12289 (response_ust_marker): New.
12290 (cmd_qtfstm, cmd_qtsstm): New.
12291 (unprobe_marker_at, probe_marker_at): New.
12292 (cmd_qtstmat, gdb_ust_thread): New.
12293 (gdb_ust_init): New.
12294 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12295 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12296 (ST_REGENTRY): New.
12297 (x86_64_st_collect_regmap): New.
12298 (X86_64_NUM_ST_COLLECT_GREGS): New.
12299 (AMD64_RIP_REGNUM): New.
12300 (supply_static_tracepoint_registers): New.
12301 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12302 (ST_REGENTRY): New.
12303 (i386_st_collect_regmap): New.
12304 (i386_NUM_ST_COLLECT_GREGS): New.
12305 (supply_static_tracepoint_registers): New.
12306 * server.c (handle_query): Handle qXfer:statictrace:read.
12307 <qSupported>: Report support for StaticTracepoints, and
12308 qXfer:statictrace:read features.
12309 * server.h (traceframe_read_sdata)
12310 (supply_static_tracepoint_registers): Declare.
12311 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12312 (unpack_varlen_hex): Include in IPA build.
12313 * Makefile.in (ustlibs, ustinc): New.
12314 (IPA_OBJS): Add remote-utils-ipa.o.
12315 ($(IPA_LIB)): Link -ldl and -lpthread.
12316 (UST_CFLAGS): New.
12317 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12318 * config.in, configure: Regenerate.
12319
9e4344e5
PA
123202010-06-20 Ian Lance Taylor <iant@google.com>
12321 Pedro Alves <pedro@codesourcery.com>
12322
12323 * linux-x86-low.c (always_true): Delete.
12324 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12325 trying to fool the compiler with always_true.
12326
c6beb2cb
PA
123272010-06-20 Pedro Alves <pedro@codesourcery.com>
12328
12329 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12330 conditions in gdbserver.
12331
d2ed6730
UW
123322010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12333
12334 * spu-low.c (spu_read_memory): Wrap around local store limit.
12335 (spu_write_memory): Likewise.
12336
4e29fb54
PA
123372010-06-15 Pedro Alves <pedro@codesourcery.com>
12338
12339 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12340 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12341 LONGEST uses.
12342 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12343 uses.
12344 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12345 uses with LONGEST uses.
12346
6a271cae
PA
123472010-06-14 Stan Shebs <stan@codesourcery.com>
12348 Pedro Alves <pedro@codesourcery.com>
12349
12350 Bytecode compiler.
12351
12352 * linux-x86-low.c: Include limits.h.
12353 (add_insns): New.
12354 (always_true): New.
12355 (EMIT_ASM): New.
12356 (EMIT_ASM32): New.
12357 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12358 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12359 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12360 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12361 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12362 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12363 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12364 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12365 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12366 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12367 (amd64_emit_void_call_2): New.
12368 (amd64_emit_ops): New.
12369 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12370 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12371 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12372 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12373 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12374 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12375 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12376 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12377 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12378 (i386_emit_stack_adjust, i386_emit_int_call_1)
12379 (i386_emit_void_call_2): New.
12380 (i386_emit_ops): New.
12381 (x86_emit_ops): New.
12382 (the_low_target): Install x86_emit_ops.
12383 * server.h (struct emit_ops): New.
12384 (get_raw_reg_func_addr): Declare.
12385 (current_insn_ptr, emit_error): Declare.
12386 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12387 (set_trace_state_variable_value): New defines.
12388 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12389 addr_get_trace_state_variable_value and
12390 addr_set_trace_state_variable_value.
12391 (symbol_list): New fields for get_raw_reg,
12392 get_trace_state_variable_value and set_trace_state_variable_value.
12393 (condfn): New typedef.
12394 (struct tracepoint): New field `compiled_cond'.
12395 (do_action_at_tracepoint): Clear compiled_cond.
12396 (get_trace_state_variable_value, set_trace_state_variable_value):
12397 Export in the IPA.
12398 (condition_true_at_tracepoint): If there's a compiled condition,
12399 run that.
12400 (current_insn_ptr, emit_error): New globals.
12401 (struct bytecode_address): New.
12402 (get_raw_reg_func_addr): New.
12403 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12404 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12405 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12406 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12407 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12408 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12409 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12410 (compile_tracepoint_condition, compile_bytecodes): New.
12411 * target.h (emit_ops): Forward declare.
12412 (struct target_ops): New field emit_ops.
12413 (target_emit_ops): New.
12414 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12415 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12416 * linux-low.c (linux_emit_ops): New.
12417 (linux_target_ops): Install it.
12418 * linux-low.h (struct linux_target_ops): New field emit_ops.
12419
92b72907
UW
124202010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12421
12422 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12423 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12424
fa593d66
PA
124252010-06-01 Pedro Alves <pedro@codesourcery.com>
12426 Stan Shebs <stan@codesourcery.com>
12427
12428 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12429 (all): Depend on $(extra_libraries).
12430 (install-only): Install the IPA.
12431 (IPA_OBJS, IPA_LIB): New.
12432 (clean): Remove the IPA lib.
12433 (IPAGENT_CFLAGS): New.
12434 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12435 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12436 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12437 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12438 * configure.ac: Check for atomic builtins support in the compiler.
12439 (IPA_DEPFILES, extra_libraries): Define.
12440 * configure.srv (ipa_obj): Add description.
12441 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12442 (i[34567]86-*-linux*): Set ipa_obj.
12443 (x86_64-*-linux*): Set ipa_obj.
12444 * linux-low.c (stabilizing_threads): New.
12445 (supports_fast_tracepoints): New.
12446 (linux_detach): Stabilize threads before detaching.
12447 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12448 the lwp is either not stabilizing, or is moving out of a jump pad.
12449 (linux_fast_tracepoint_collecting): New.
12450 (maybe_move_out_of_jump_pad): New.
12451 (enqueue_one_deferred_signal): New.
12452 (dequeue_one_deferred_signal): New.
12453 (linux_wait_for_event_1): If moving out of a jump pad, defer
12454 pending signals to later.
12455 (linux_stabilize_threads): New.
12456 (linux_wait_1): Check if threads need moving out of jump pads, and
12457 do it if so.
12458 (stuck_in_jump_pad_callback): New.
12459 (move_out_of_jump_pad_callback): New.
12460 (lwp_running): New.
12461 (linux_resume_one_lwp): Handle moving out of jump pads.
12462 (linux_set_resume_request): Dequeue deferred signals.
12463 (need_step_over_p): Also step over fast tracepoint jumps.
12464 (start_step_over): Also uninsert fast tracepoint jumps.
12465 (finish_step_over): Also reinsert fast tracepoint jumps.
12466 (linux_install_fast_tracepoint_jump): New.
12467 (linux_target_ops): Install linux_stabilize_threads and
12468 linux_install_fast_tracepoint_jump_pad.
12469 * linux-low.h (linux_target_ops) <get_thread_area,
12470 install_fast_tracepoint_jump_pad>: New fields.
12471 (struct lwp_info) <collecting_fast_tracepoint,
12472 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12473 (linux_get_thread_area): Declare.
12474 * linux-x86-low.c (jump_insn): New.
12475 (x86_get_thread_area): New.
12476 (append_insns): New.
12477 (push_opcode): New.
12478 (amd64_install_fast_tracepoint_jump_pad): New.
12479 (i386_install_fast_tracepoint_jump_pad): New.
12480 (x86_install_fast_tracepoint_jump_pad): New.
12481 (the_low_target): Install x86_get_thread_area and
12482 x86_install_fast_tracepoint_jump_pad.
12483 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12484 (struct fast_tracepoint_jump): New.
12485 (fast_tracepoint_jump_insn): New.
12486 (fast_tracepoint_jump_shadow): New.
12487 (find_fast_tracepoint_jump_at): New.
12488 (fast_tracepoint_jump_here): New.
12489 (delete_fast_tracepoint_jump): New.
12490 (set_fast_tracepoint_jump): New.
12491 (uninsert_fast_tracepoint_jumps_at): New.
12492 (reinsert_fast_tracepoint_jumps_at): New.
12493 (set_breakpoint_at): Use write_inferior_memory.
12494 (uninsert_raw_breakpoint): Use write_inferior_memory.
12495 (check_mem_read): Mask out fast tracepoint jumps.
12496 (check_mem_write): Mask out fast tracepoint jumps.
12497 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12498 (set_fast_tracepoint_jump): Declare.
12499 (delete_fast_tracepoint_jump)
12500 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12501 (reinsert_fast_tracepoint_jumps_at): Declare.
12502 * regcache.c: Don't compile many functions when building the
12503 in-process agent library.
12504 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12505 the register buffer in the heap.
12506 (free_register_cache): If the register buffer isn't owned by the
12507 regcache, don't free it.
12508 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12509 pre-existing register caches.
12510 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12511 type.
12512 (convert_ascii_to_int): : Constify `from' parameter type.
12513 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12514 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12515 the needed buffer in-place.
12516 (relocate_instruction): New.
12517 * server.c (handle_query) <qSymbols>: If the target supports
12518 tracepoints, give it a chance of looking up symbols. Report
12519 support for fast tracepoints.
12520 (handle_status): Stabilize threads.
12521 (process_serial_event): Adjust.
12522 * server.h (struct fast_tracepoint_jump): Forward declare.
12523 (struct process_info) <fast_tracepoint_jumps>: New field.
12524 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12525 (decode_X_packet, decode_M_packet): Adjust.
12526 (relocate_instruction): Declare.
12527 (in_process_agent_loaded): Declare.
12528 (tracepoint_look_up_symbols): Declare.
12529 (struct fast_tpoint_collect_status): Declare.
12530 (fast_tracepoint_collecting): Declare.
12531 (force_unlock_trace_buffer): Declare.
12532 (handle_tracepoint_bkpts): Declare.
12533 (initialize_low_tracepoint)
12534 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12535 * target.h (struct target_ops) <stabilize_threads,
12536 install_fast_tracepoint_jump_pad>: New fields.
12537 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12538 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12539 [HAVE_STDINT_H]: Include stdint.h.
12540 (trace_debug_1): Rename to ...
12541 (trace_vdebug): ... this.
12542 (trace_debug): Rename to ...
12543 (trace_debug_1): ... this. Add `level' parameter.
12544 (trace_debug): New.
12545 (ATTR_USED, ATTR_NOINLINE): New.
12546 (IP_AGENT_EXPORT): New.
12547 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12548 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12549 (about_to_request_buffer_space, trace_buffer_is_full)
12550 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12551 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12552 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12553 (traceframe_write_count, traceframes_created)
12554 (trace_state_variables)
12555 New renaming defines.
12556 (struct ipa_sym_addresses): New.
12557 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12558 (symbol_list): New.
12559 (ipa_sym_addrs): New.
12560 (all_tracepoint_symbols_looked_up): New.
12561 (in_process_agent_loaded): New.
12562 (write_e_ipa_not_loaded): New.
12563 (maybe_write_ipa_not_loaded): New.
12564 (tracepoint_look_up_symbols): New.
12565 (debug_threads) [IN_PROCESS_AGENT]: New.
12566 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12567 (UNKNOWN_SIDE_EFFECTS): New.
12568 (stop_tracing): New.
12569 (flush_trace_buffer): New.
12570 (stop_tracing_bkpt): New.
12571 (flush_trace_buffer_bkpt): New.
12572 (read_inferior_integer): New.
12573 (read_inferior_uinteger): New.
12574 (read_inferior_data_pointer): New.
12575 (write_inferior_data_pointer): New.
12576 (write_inferior_integer): New.
12577 (write_inferior_uinteger): New.
12578 (struct collect_static_trace_data_action): Delete.
12579 (enum tracepoint_type): New.
12580 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12581 <actions_str, step_actions, step_actions_str>: Only include in
12582 GDBserver.
fa593d66
PA
12583 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12584 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12585 (tracepoints): Use IP_AGENT_EXPORT.
12586 (last_tracepoint): Don't include in the IPA.
12587 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12588 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12589 (alloced_trace_state_variables): New.
12590 (trace_state_variables): Use IP_AGENT_EXPORT.
12591 (traceframe_t): Delete unused variable.
12592 (circular_trace_buffer): Don't include in the IPA.
12593 (trace_buffer_start): Delete.
12594 (struct trace_buffer_control): New.
12595 (trace_buffer_free): Delete.
12596 (struct ipa_trace_buffer_control): New.
12597 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12598 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12599 New.
12600 (trace_buffer_ctrl): New.
12601 (TRACE_BUFFER_CTRL_CURR): New.
12602 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12603 Reimplement as macros.
12604 (trace_buffer_wrap): Delete.
12605 (traceframe_write_count, traceframe_read_count)
12606 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12607 (struct tracepoint_hit_ctx) <type>: New field.
12608 (struct fast_tracepoint_ctx): New.
12609 (memory_barrier): New.
12610 (cmpxchg): New.
12611 (record_tracepoint_error): Update atomically in the IPA.
12612 (clear_inferior_trace_buffer): New.
12613 (about_to_request_buffer_space): New.
12614 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12615 updating the same buffer.
12616 (add_tracepoint): Default the tracepoint's type to trap
12617 tracepoint, and orig_size to -1.
12618 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12619 internal variables.
12620 (create_trace_state_variable): New parameter `gdb'. Handle it.
12621 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12622 (cmd_qtdp): Handle fast tracepoints.
12623 (cmd_qtdv): Adjust.
12624 (max_jump_pad_size): New.
12625 (gdb_jump_pad_head): New.
12626 (get_jump_space_head): New.
12627 (claim_jump_space): New.
12628 (sort_tracepoints): New.
12629 (MAX_JUMP_SIZE): New.
12630 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12631 IPA.
12632 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12633 support. Upload fast traceframes, and delete internal IPA
12634 breakpoints.
12635 (stop_tracing_handler): New.
12636 (flush_trace_buffer_handler): New.
12637 (cmd_qtstop): Upload fast tracepoints.
12638 (response_tracepoint): Handle fast tracepoints.
12639 (tracepoint_finished_step): Upload fast traceframes. Set the
12640 tracepoint hit context's tracepoint type.
12641 (handle_tracepoint_bkpts): New.
12642 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12643 type. Add comment about fast tracepoints.
12644 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12645 non-existing action_str field.
12646 (get_context_regcache): Handle fast tracepoints.
12647 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12648 to the regcache.
12649 (fast_tracepoint_from_jump_pad_address): New.
12650 (fast_tracepoint_from_ipa_tpoint_address): New.
12651 (collecting_t): New.
12652 (force_unlock_trace_buffer): New.
12653 (fast_tracepoint_collecting): New.
12654 (collecting): New.
12655 (gdb_collect): New.
12656 (write_inferior_data_ptr): New.
12657 (target_tp_heap): New.
12658 (target_malloc): New.
12659 (download_agent_expr): New.
12660 (UALIGN): New.
12661 (download_tracepoints): New.
12662 (download_trace_state_variables): New.
12663 (upload_fast_traceframes): New.
12664 (IPA_FIRST_TRACEFRAME): New.
12665 (IPA_NEXT_TRACEFRAME_1): New.
12666 (IPA_NEXT_TRACEFRAME): New.
12667 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12668 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12669 (gdb_jump_pad_buffer_end): New.
12670 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12671 (initialize_tracepoint): Adjust.
12672 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12673 buffer. Initialize the low module.
12674 * utils.c (PREFIX, TOOLNAME): New.
12675 (malloc_failure): Use PREFIX.
12676 (error): In the IPA, an error causes an exit.
12677 (fatal, warning): Use PREFIX.
12678 (internal_error): Use TOOLNAME.
12679 (NUMCELLS): Increase to 10.
12680 * configure, config.in: Regenerate.
12681
d149dd1d
PA
126822010-06-01 Pedro Alves <pedro@codesourcery.com>
12683
12684 * server.c (handle_query) <qSupported>: Do two passes over the
12685 qSupported string to avoid nesting strtok.
12686
f6528abd
JK
126872010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12688
12689 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12690 (CDEPS): New.
12691 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12692 -Wl,--dynamic-list.
12693 * configure: Regenerate.
12694 * proc-service.list: New.
12695
ca2a87a0
JK
126962010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12697
12698 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12699 New comment.
12700
363a6e9f
OS
127012010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12702
12703 * gdbreplay.c (remote_open): Check error return from socket() call by
12704 its equality to -1 not by it being negative.
12705 * remote-utils.c (remote_open): Likewise.
12706
d23b6cb1
PA
127072010-05-23 Pedro Alves <pedro@codesourcery.com>
12708
12709 * config.h: Regenerate.
12710
28d3cf85
MK
127112010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12712
12713 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12714 doesn't provide PTRACE_GET_THREAD_AREA.
12715
fea36a59
MK
127162010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12717
12718 * linux-m68k-low.c: Include <asm/ptrace.h>
12719 (ps_get_thread_area): Implement.
12720
24b066ba
DE
127212010-05-03 Doug Evans <dje@google.com>
12722
12723 * event-loop.c (struct callback_event): New struct.
12724 (callback_list): New global.
12725 (append_callback_event, delete_callback_event): New functions.
12726 (process_callback): New function.
12727 (start_event_loop): Call it.
12728 * remote-utils.c (NOT_SCHEDULED): Define.
12729 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12730 moved out of readchar.
12731 (readchar): Rewrite. Call reschedule before returning.
12732 (reset_readchar): New function.
12733 (remote_close): Call it.
12734 (process_remaining, reschedule): New functions.
12735 * server.h (callback_handler_func): New typedef.
12736 (append_callback_event, delete_callback_event): Declare.
12737
9836d6ea
PA
127382010-05-03 Pedro Alves <pedro@codesourcery.com>
12739
12740 * proc-service.c (ps_pglobal_lookup): Use
12741 thread_db_look_up_one_symbol.
12742 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12743 parameter. Use it instead of all_symbols_looked_up.
12744 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12745 field.
12746 (all_symbols_looked_up): Don't declare.
12747 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12748 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12749 field.
12750 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12751 Set all_symbols_looked_up here.
12752 (thread_db_look_up_one_symbol): New.
12753 (thread_db_get_tls_address): Adjust.
12754 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12755 thread_db object on the heap, and tentatively set it in the
12756 process structure.
12757 (thread_db_init): Don't set all_symbols_looked_up here.
12758 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12759
7984d532
PA
127602010-05-03 Pedro Alves <pedro@codesourcery.com>
12761
12762 * linux-low.c (linux_kill, linux_detach): Adjust.
12763 (status_pending_p_callback): Remove redundant statement. Check
12764 for !TARGET_WAITIKIND_IGNORE, instead of
12765 TARGET_WAITKIND_STOPPED.
12766 (handle_tracepoints): Make sure LWP is locked. Adjust.
12767 (linux_wait_for_event_1): Adjust.
12768 (linux_cancel_breakpoints): New.
12769 (unsuspend_one_lwp): New.
12770 (unsuspend_all_lwps): New.
12771 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12772 (send_sigstop_callback): Change return type to int, add new
12773 `except' parameter and handle it.
12774 (suspend_and_send_sigstop_callback): New.
12775 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12776 pass them down. If SUSPEND, also increment the lwp's suspend
12777 count.
12778 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12779 (need_step_over_p): Don't consider suspended LWPs.
12780 (start_step_over): Adjust.
12781 (proceed_one_lwp): Change return type to int, add new `except'
12782 parameter and handle it.
12783 (unsuspend_and_proceed_one_lwp): New.
12784 (proceed_all_lwps): Use find_inferior instead of
12785 for_each_inferior.
12786 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12787 also decrement the suspend count of LWPs. Pass `except' down,
12788 instead of hacking its suspend count.
12789 (linux_pause_all): Add `freeze' parameter. Adjust.
12790 (linux_unpause_all): New.
12791 (linux_target_ops): Install linux_unpause_all.
12792 * server.c (handle_status): Adjust.
12793 * target.h (struct target_ops): New fields `unpause_all' and
12794 `cancel_breakpoints'. Add new parameter to `pause_all'.
12795 (pause_all): Add new `freeze' parameter.
12796 (unpause_all): New.
12797 (cancel_breakpoints): New.
12798 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12799 cancel breakpoints.
12800 (cmd_qtstart): Pause threads.
12801 (stop_tracing): Pause threads, and cancel breakpoints.
12802 * win32-low.c (win32_target_ops): Adjust.
12803
e471f25b
PA
128042010-05-03 Pedro Alves <pedro@codesourcery.com>
12805
12806 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12807 the inferior right away from here...
12808 (linux_wait_1): ... to here, and adjust to check the thread's
12809 last_resume_kind instead of the lwp's step or stop_expected flags.
12810
1915ef4f
PA
128112010-05-02 Pedro Alves <pedro@codesourcery.com>
12812
12813 * README: Use consistent `GDB' and `GDBserver' spellings.
12814
f9e39928
PA
128152010-05-02 Pedro Alves <pedro@codesourcery.com>
12816
12817 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12818 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12819 (linux_detach_one_lwp): Assume the lwp is stopped.
12820 (any_thread_of): Delete.
12821 (linux_detach): Stop all lwps here. Don't blindly delete all
12822 breakpoints.
12823 (delete_lwp_callback): New.
12824 (linux_mourn): Delete all lwps of the process that is gone.
12825 (linux_wait_1): Don't delete the last lwp of the process here.
12826 * mem-break.h (mark_breakpoints_out): Declare.
12827 * mem-break.c (mark_breakpoints_out): New.
12828 (free_all_breakpoints): Use it.
12829 * server.c (handle_target_event): If the process is gone, mark
12830 breakpoints out.
12831 * thread-db.c (struct thread_db) <create_bp>: New field.
12832 (thread_db_enable_reporting): Fix prototype. Store a thread event
12833 breakpoint reference in the thread_db struct.
12834 (thread_db_load_search): Clear the thread_db object.
12835 (try_thread_db_load_1): Ditto.
12836 (switch_to_process): New.
12837 (disable_thread_event_reporting): Use it.
12838 (remove_thread_event_breakpoints): New.
12839 (thread_db_detach, thread_db_mourn): Use it.
12840
1e7fc18c
PA
128412010-05-01 Pedro Alves <pedro@codesourcery.com>
12842
12843 * linux-low.c (linux_enable_event_reporting): New.
12844 (linux_wait_for_event_1, handle_extended_wait): Use it.
12845
02fc4de7
PA
128462010-04-30 Pedro Alves <pedro@codesourcery.com>
12847
12848 * linux-low.c (linux_kill_one_lwp, linux_kill)
12849 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12850 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12851 SIGSTOP even if the LWP is stopped.
12852 (send_sigstop_callback): New.
12853 (stop_all_lwps): Use send_sigstop_callback instead.
12854 (linux_resume_one_thread): Adjust.
12855 (proceed_one_lwp): Still proceed an LWP that the client has
12856 requested to stop, if we haven't reported it as stopped yet. Make
12857 sure that LWPs the client want stopped, have a pending SIGSTOP.
12858
bc3b5632
DE
128592010-04-26 Doug Evans <dje@google.com>
12860
ae1ada35
DE
12861 * server.c (handle_general_set): Make static.
12862
bc3b5632
DE
12863 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12864 Print received char after testing for error/eof instead of before.
12865 (input_interrupt): Tweak comment.
12866
65730243
DE
128672010-04-23 Doug Evans <dje@google.com>
12868
12869 * server.c (start_inferior): Print inferior argv if --debug.
12870
a8ae7dc0
AR
128712010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12872
12873 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12874 * nto-x86-low.c: Include server.h
12875
1c07cc19
PM
128762010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12877
12878 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12879 be consistent with other sources of this directory.
12880 (init_registers_amd64): Correct name of source file of this function
12881 in the comment.
12882
e0a61e09
PM
128832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12884
12885 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12886 64-bit executables.
12887
54709339
PM
128882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12889
12890 * win32-i386-low.c: Add 64-bit support.
12891 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12892 (init_registers_amd64): Declare.
12893 (mappings): Add 64-bit version of array.
12894 (init_windows_x86): New function.
12895 (the_low_target): Change init_arch field to init_windows_x86.
12896
e8f0053d
PM
128972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12898
12899 * win32-low.c: Adapt to support also 64-bit architecture.
12900 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12901 (get_image_name): Use SIZE_T type for local variable `done'.
12902 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12903 (toolhelp_get_dll_name): Idem.
12904 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12905 Use uintptr_t typecast to avoid warning.
12906 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12907 (handle_exception): Use phex_nz to avoid warning.
12908 (win32_wait): Remove unused local variable `process'.
12909
c481e77e
PM
129102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12911
12912 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12913 `amd64-avx.o'.
12914
12ea4b69
PM
129152010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12916
12917 * configure.ac: Use `ws2_32' library for srv_mingw.
12918 * configure: Regenerate.
12919 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12920 * remote-utils.c: Likewise.
12921
f6d1620c
L
129222010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12923
12924 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12925 if __x86_64__ is defined.
12926
8e642873
PM
129272010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12928
12929 * configure: Regenerate.
12930
711e434b
PM
129312010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12932
12933 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12934 * target.h (target_ops): New get_tib_address field.
12935 * win32-low.h (win32_thread_info): Add thread_local_base field.
12936 * win32-low.c (child_add_thread): Add tlb argument.
12937 Set thread_local_base field to TLB.
12938 (get_child_debug_event): Adapt to child_add_thread change.
12939 (win32_get_tib_address): New function.
12940 (win32_target_ops): Set get_tib_address field to
12941 win32_get_tib_address.
12942 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12943
505106cd
PA
129442010-04-12 Pedro Alves <pedro@codesourcery.com>
12945
505106cd
PA
12946 * linux-low.c (linux_mourn): Also remove the process.
12947 * server.c (handle_target_event): Don't remove the process here.
12948 * nto-low.c (nto_mourn): New.
12949 (nto_target_ops): Install it.
12950 * spu-low.c (spu_mourn): New.
12951 (spu_target_ops): Install it.
12952 * win32-low.c (win32_mourn): New.
12953 (win32_target_ops): Install it.
12954
e8470a06
PA
129552010-04-12 Pedro Alves <pedro@codesourcery.com>
12956
12957 * server.h (buffer_xml_printf): Remove redundant `;'.
12958
45ba0d02
PA
129592010-04-12 Pedro Alves <pedro@codesourcery.com>
12960
12961 * regcache.c (set_register_cache): Invalidate regcaches before
12962 changing the register cache layout.
12963 (regcache_invalidate_one): Allow a NULL regcache.
12964 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12965 regcaches before changing the register cache layout or the target
12966 regsets.
12967
59e04013
L
129682010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12969
12970 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12971 variable warning on Linux/x86-64.
12972
8336d594
PA
129732010-04-11 Pedro Alves <pedro@codesourcery.com>
12974
12975 GDBserver disconnected tracing support.
12976
12977 * linux-low.c (linux_remove_process): Delete.
12978 (add_lwp): Don't set last_resume_kind here.
12979 (linux_kill): Use `mourn'.
12980 (linux_detach): Use `thread_db_detach', and `mourn'.
12981 (linux_mourn): New.
12982 (linux_attach_lwp_1): Adjust comment.
12983 (linux_attach): last_resume_kind moved the thread_info; adjust.
12984 (status_pending_p_callback): Adjust.
12985 (linux_wait_for_event_1): Adjust.
12986 (count_events_callback, select_singlestep_lwp_callback)
12987 (select_event_lwp_callback, cancel_breakpoints_callback)
12988 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12989 (proceed_one_lwp): Adjust.
12990 (linux_async): Add debug output.
12991 (linux_thread_stopped): New.
12992 (linux_pause_all): New.
12993 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12994 linux_pause_all.
12995 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12996 (thread_db_free): Delete declaration.
12997 (thread_db_detach, thread_db_mourn): Declare.
12998 * thread-db.c (thread_db_init): Use thread_db_mourn.
12999 (thread_db_free): Delete, split in two.
13000 (disable_thread_event_reporting): New.
13001 (thread_db_detach): New.
13002 (thread_db_mourn): New.
13003
13004 * server.h (struct thread_info) <last_resume_kind>: New field.
13005 <attached>: Add comment.
13006 <gdb_detached>: New field.
13007 (handler_func): Change return type to int.
13008 (handle_serial_event, handle_target_event): Ditto.
13009 (gdb_connected): Declare.
13010 (tracing): Delete.
13011 (disconnected_tracing): Declare.
13012 (stop_tracing): Declare.
13013
13014 * server.c (handle_query) <qSupported>: Report support for
13015 disconnected tracing.
13016 (queue_stop_reply_callback): Account for running threads.
13017 (gdb_wants_thread_stopped): New.
13018 (gdb_wants_all_threads_stopped): New.
13019 (gdb_reattached_process): New.
13020 (handle_status): Clear the `gdb_detached' flag of all processes.
13021 In all-stop, stop all threads.
13022 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13023 (process_serial_event): If the remote connection breaks, or if an
13024 exit was forced with "monitor exit", force an event loop exit.
13025 Handle disconnected tracing on detach.
13026 (handle_serial_event): Adjust.
13027 (handle_target_event): If GDB isn't connected, forward events back
13028 to the inferior, unless the last process exited, in which case,
13029 exit gdbserver. Adjust interface.
13030
13031 * remote-utils.c (remote_open): Don't block in accept. Instead
13032 register an event loop source on the listen socket file
13033 descriptor. Refactor bits into ...
13034 (listen_desc): ... this new global.
13035 (gdb_connected): ... this new function.
13036 (enable_async_notification): ... this new function.
13037 (handle_accept_event): ... this new function.
13038 (remote_close): Clear remote_desc.
13039
13040 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13041
13042 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13043 New fields.
13044 (mourn_inferior): Define.
13045 (target_process_qsupported): Avoid the dangling else problem.
13046 (thread_stopped): Define.
13047 (pause_all): Define.
13048 (target_waitstatus_to_string): Declare.
13049 * target.c (target_waitstatus_to_string): New.
13050
13051 * tracepoint.c (tracing): Make extern.
13052 (disconnected_tracing): New.
13053 (stop_tracing): Make extern. Handle tracing stops due to GDB
13054 disconnecting.
13055 (cmd_qtdisconnected): New.
13056 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13057 (handle_tracepoint_general_set): Handle QTDisconnected.
13058
13059 * event-loop.c (event_handler_func): Change return type to int.
13060 (process_event): Bail out if the event handler wants the event
13061 loop to stop.
13062 (handle_file_event): Ditto.
13063 (start_event_loop): Bail out if the event handler wants the event
13064 loop to stop.
13065
13066 * nto-low.c (nto_target_ops): Adjust.
13067 * spu-low.c (spu_wait): Don't remove the process here.
13068 (spu_target_ops): Adjust.
13069 * win32-low.c (win32_wait): Don't remove the process here.
13070 (win32_target_ops): Adjust.
13071
5d267c4c
PA
130722010-04-11 Pedro Alves <pedro@codesourcery.com>
13073
13074 * regcache.c (realloc_register_cache): Invalidate inferior's
13075 regcache before recreating it.
13076
623ccd72
PA
130772010-04-09 Pedro Alves <pedro@codesourcery.com>
13078
13079 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13080
219f2f23
PA
130812010-04-09 Stan Shebs <stan@codesourcery.com>
13082 Pedro Alves <pedro@codesourcery.com>
13083
13084 * server.h (LONGEST): New.
13085 (struct thread_info) <while_stepping>: New field.
13086 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13087 Declare.
13088 (initialize_tracepoint, handle_tracepoint_general_set)
13089 (handle_tracepoint_query, tracepoint_finished_step)
13090 (tracepoint_was_hit, release_while_stepping_state_list):
13091 (current_traceframe): Declare.
13092 * server.c (handle_general_set): Handle tracepoint packets.
13093 (read_memory): New.
13094 (write_memory): New.
13095 (handle_search_memory_1): Use read_memory.
13096 (handle_query): Report support for conditional tracepoints, trace
13097 state variables, and tracepoint sources. Handle tracepoint
13098 queries.
13099 (main): Initialize the tracepoints module.
13100 (process_serial_event): Handle traceframe reads/writes.
13101
13102 * linux-low.c (handle_tracepoints): New.
13103 (linux_wait_1): Call it.
13104 (linux_resume_one_lwp): Handle while-stepping.
13105 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13106 (linux_target_ops): Install them.
13107 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13108 New field.
13109 * linux-x86-low.c (x86_supports_tracepoints): New.
13110 (the_low_target). Install it.
13111
13112 * mem-break.h (delete_breakpoint): Declare.
13113 * mem-break.c (delete_breakpoint): Make external.
13114
13115 * target.h (struct target_ops): Add `supports_tracepoints',
13116 `read_pc', and `write_pc' fields.
13117 (target_supports_tracepoints): Define.
13118 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13119 (phex_nz): New.
13120
13121 * regcache.h (struct regcache) <registers_owned>: New field.
13122 (init_register_cache, regcache_cpy): Declare.
13123 (regcache_read_pc, regcache_write_pc): Declare.
13124 (register_cache_size): Declare.
13125 (supply_regblock): Declare.
13126 * regcache.c (init_register_cache): New.
13127 (new_register_cache): Use it.
13128 (regcache_cpy): New.
13129 (register_cache_size): New.
13130 (supply_regblock): New.
13131 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13132
219f2f23
PA
13133 * tracepoint.c: New.
13134
13135 * Makefile.in (OBS): Add tracepoint.o.
13136 (tracepoint.o): New rule.
13137
3a13a53b
L
131382010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13139
13140 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13141 (i386-mmx.o): New.
13142 (i386-mmx.c): Likewise.
13143 (i386-mmx-linux.o): Likewise.
13144 (i386-mmx-linux.c): Likewise.
13145
13146 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13147 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13148 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13149 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13150
13151 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13152 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13153 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13154
1570b33e
L
131552010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13156
13157 * Makefile.in (clean): Updated.
13158 (i386-avx.o): New.
13159 (i386-avx.c): Likewise.
13160 (i386-avx-linux.o): Likewise.
13161 (i386-avx-linux.c): Likewise.
13162 (amd64-avx.o): Likewise.
13163 (amd64-avx.c): Likewise.
13164 (amd64-avx-linux.o): Likewise.
13165 (amd64-avx-linux.c): Likewise.
13166
13167 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13168 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13169 (srv_amd64_regobj): Add amd64-avx.o.
13170 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13171 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13172 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13173 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13174 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13175 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13176 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13177
13178 * i387-fp.c: Include "i386-xstate.h".
13179 (i387_xsave): New.
13180 (i387_cache_to_xsave): Likewise.
13181 (i387_xsave_to_cache): Likewise.
13182 (x86_xcr0): Likewise.
13183
13184 * i387-fp.h (i387_cache_to_xsave): Likewise.
13185 (i387_xsave_to_cache): Likewise.
13186 (x86_xcr0): Likewise.
13187
13188 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13189 * linux-crisv32-low.c (target_regsets): Likewise.
13190 * linux-m68k-low.c (target_regsets): Likewise.
13191 * linux-mips-low.c (target_regsets): Likewise.
13192 * linux-ppc-low.c (target_regsets): Likewise.
13193 * linux-s390-low.c (target_regsets): Likewise.
13194 * linux-sh-low.c (target_regsets): Likewise.
13195 * linux-sparc-low.c (target_regsets): Likewise.
13196 * linux-xtensa-low.c (target_regsets): Likewise.
13197
13198 * linux-low.c: Include <sys/uio.h>.
13199 (regsets_fetch_inferior_registers): Support nt_type.
13200 (regsets_store_inferior_registers): Likewise.
13201 (linux_process_qsupported): New.
13202 (linux_target_ops): Add linux_process_qsupported.
13203
13204 * linux-low.h (regset_info): Add nt_type.
13205 (linux_target_ops): Add process_qsupported.
13206
13207 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13208 and <sys/uio.h>.
13209 (init_registers_i386_avx_linux): New.
13210 (init_registers_amd64_avx_linux): Likewise.
13211 (xmltarget_i386_linux_no_xml): Likewise.
13212 (xmltarget_amd64_linux_no_xml): Likewise.
13213 (PTRACE_GETREGSET): Likewise.
13214 (PTRACE_SETREGSET): Likewise.
13215 (x86_fill_xstateregset): Likewise.
13216 (x86_store_xstateregset): Likewise.
13217 (use_xml): Likewise.
13218 (x86_linux_update_xmltarget): Likewise.
13219 (x86_linux_process_qsupported): Likewise.
13220 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13221 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13222 init_registers_i386_linux here. Call
13223 x86_linux_update_xmltarget.
13224 (the_low_target): Add x86_linux_process_qsupported.
13225
13226 * server.c (handle_query): Call target_process_qsupported.
13227
13228 * target.h (target_ops): Add process_qsupported.
13229 (target_process_qsupported): New.
13230
fc7238bb
PA
132312010-04-03 Pedro Alves <pedro@codesourcery.com>
13232
13233 * inferiors.c (add_thread): Set last_status kind to
13234 TARGET_WAITKIND_IGNORE.
13235 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13236 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13237 (linux_wait_1): Move `thread' local definition to block that uses
13238 it. Don't NULL initialize `event_child'.
13239 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13240 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13241 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13242
bdabb078
PA
132432010-04-01 Pedro Alves <pedro@codesourcery.com>
13244
13245 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13246 an extended waitstatus, or by a watchpoint.
13247 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13248 thread was stepping or has been stopped by a watchpoint.
13249
d3bbe7a0
PA
132502010-04-01 Pedro Alves <pedro@codesourcery.com>
13251
13252 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13253 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13254 of another, then delete the previous, and validate all
13255 breakpoints.
13256 (validate_inserted_breakpoint): New.
13257 (delete_disabled_breakpoints): New.
13258 (validate_breakpoints): New.
13259 (check_mem_read): Validate breakpoints before trusting their
13260 shadow. Delete disabled breakpoints.
13261 (check_mem_write): Validate breakpoints before trusting they
13262 should be inserted. Delete disabled breakpoints.
13263 * mem-break.h (validate_breakpoints):
13264 * server.c (handle_query): Validate breakpoints when we see a
13265 qSymbol query.
13266
8b07ae33
PA
132672010-04-01 Pedro Alves <pedro@codesourcery.com>
13268
13269 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13270 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13271 if we could tell there's a GDB breakpoint at stop_pc.
13272 (need_step_over_p): Don't do a step over if we find a GDB
13273 breakpoint at the resume PC.
13274
13275 * mem-break.c (struct raw_breakpoint): New.
13276 (enum bkpt_type): New type `gdb_breakpoint'.
13277 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13278 fields. New field `raw'.
13279 (find_raw_breakpoint_at): New.
13280 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13281 breakpoint instead.
13282 (set_breakpoint_at): Adjust.
13283 (delete_raw_breakpoint): New.
13284 (release_breakpoint): New.
13285 (delete_breakpoint): Rename to...
13286 (delete_breakpoint_1): ... this. Add proc parameter. Use
13287 release_breakpoint. Return ENOENT.
13288 (delete_breakpoint): Reimplement.
13289 (find_breakpoint_at): Delete.
13290 (find_gdb_breakpoint_at): New.
13291 (delete_breakpoint_at): Delete.
13292 (set_gdb_breakpoint_at): New.
13293 (delete_gdb_breakpoint_at): New.
13294 (gdb_breakpoint_here): New.
13295 (set_reinsert_breakpoint): Use release_breakpoint.
13296 (uninsert_breakpoint): Rename to ...
13297 (uninsert_raw_breakpoint): ... this.
13298 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13299 (reinsert_raw_breakpoint): Change parameter type to
13300 raw_breakpoint.
13301 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13302 instead.
13303 (check_breakpoints): Adjust. Use release_breakpoint.
13304 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13305 (breakpoint_inserted_here): Ditto.
13306 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13307 Don't trust the breakpoint's shadow if it is not inserted.
13308 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13309 (delete_all_breakpoints): Adjust.
13310 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13311 use delete_breakpoint_1.
13312
13313 * mem-break.h (breakpoints_supported): Delete declaration.
13314 (set_gdb_breakpoint_at): Declare.
13315 (gdb_breakpoint_here): Declare.
13316 (delete_breakpoint_at): Delete.
13317 (delete_gdb_breakpoint_at): Declare.
13318
13319 * server.h (struct raw_breakpoint): Forward declare.
13320 (struct process_info): New field `raw_breakpoints'.
13321
13322 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13323 breakpoints.
13324
6bf5e0ba
PA
133252010-03-24 Pedro Alves <pedro@codesourcery.com>
13326
13327 * linux-low.c (status_pending_p_callback): Fix comment.
13328 (linux_wait_for_event_1): Move most of the internal breakpoint
13329 handling from here...
13330 (linux_wait_1): ... to here.
13331 (count_events_callback): New.
13332 (select_singlestep_lwp_callback): New.
13333 (select_event_lwp_callback): New.
13334 (cancel_breakpoints_callback): New.
13335 (select_event_lwp): New.
13336 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13337 priority to all LWPs that have had events that should be reported
13338 to the client. Cancel breakpoints when about to reporting the
13339 event to the client, not while stopping lwps. No longer cancel
13340 finished single-steps here.
13341 (cancel_finished_single_step): Delete.
13342 (cancel_finished_single_steps): Delete.
13343
414a389f
PA
133442010-03-24 Pedro Alves <pedro@codesourcery.com>
13345
13346 * mem-break.c (enum bkpt_type): New.
13347 (struct breakpoint): New field `type'.
13348 (set_breakpoint_at): Change return type to struct breakpoint
13349 pointer. Set type to `other_breakpoint' by default.
13350 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13351 in the breakpoint list.
13352 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13353 (reinsert_breakpoint): Rename to ...
13354 (reinsert_raw_breakpoint): ... this.
13355 (reinsert_breakpoints_at): Adjust.
13356 * mem-break.h (struct breakpoint): Declare.
13357 (set_breakpoint_at): Change return type to struct breakpoint
13358 pointer.
13359
2280c721
PA
133602010-03-24 Pedro Alves <pedro@codesourcery.com>
13361
13362 * server.c (handle_query): Assign, not compare.
13363
d50171e4
PA
133642010-03-24 Pedro Alves <pedro@codesourcery.com>
13365
13366 Teach linux gdbserver to step-over-breakpoints.
13367
13368 * linux-low.c (can_hardware_single_step): New.
13369 (supports_breakpoints): New.
13370 (handle_extended_wait): If stopping threads, read the stop pc of
13371 the new cloned LWP.
13372 (get_pc): New.
13373 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13374 low target doesn't support retrieving the PC.
13375 (add_lwp): Set last_resume_kind to resume_continue.
13376 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13377 (linux_attach): Don't clear stop_expected. Set the lwp's
13378 last_resume_kind to resume_stop.
13379 (linux_detach_one_lwp): Don't check for removed breakpoints.
13380 (check_removed_breakpoint): Delete.
13381 (status_pending_p): Rename to ...
13382 (status_pending_p_callback): ... this. Don't check for removed
13383 breakpoints. Don't consider threads that are stopped from GDB's
13384 perspective.
13385 (linux_wait_for_lwp): Always read the stop_pc here.
13386 (cancel_breakpoint): New.
13387 (step_over_bkpt): New global.
13388 (linux_wait_for_event_1): Implement stepping over breakpoints.
13389 (gdb_wants_lwp_stopped): New.
13390 (gdb_wants_all_stopped): New.
13391 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13392 single-step traps here. Store the thread's last reported target
13393 wait status.
13394 (send_sigstop): Don't clear stop_expected. Always set it,
13395 instead.
13396 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13397 (cancel_finished_single_step): New.
13398 (cancel_finished_single_steps): New.
13399 (wait_for_sigstop): Don't cancel finished single-step traps here.
13400 (linux_resume_one_lwp): Don't check for removed breakpoints.
13401 Don't set `step' on non-hardware step archs.
13402 (linux_set_resume_request): Ignore resume_stop requests if already
13403 stopping or stopped. Set the lwp's last_resume_kind.
13404 (resume_status_pending_p): Don't check for removed breakpoints.
13405 (need_step_over_p): New.
13406 (start_step_over): New.
13407 (finish_step_over): New.
13408 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13409 requests. Clear the thread's last reported target waitstatus.
13410 Don't use the `suspended' flag. Don't consider pending breakpoints.
13411 (linux_resume): Start a step-over if necessary.
13412 (proceed_one_lwp): New.
13413 (proceed_all_lwps): New.
13414 (unstop_all_lwps): New.
13415 * linux-low.h (struct lwp_info): Rewrite comment for the
13416 `suspended' flag. Add the `stop_pc' field. Delete the
13417 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13418 Add `'last_resume_kind' and `need_step_over' fields.
13419 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13420 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13421 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13422 (set_raw_breakpoint_at): New.
13423 (set_breakpoint_at): Rewrite to use it.
13424 (reinsert_breakpoint_handler): Delete.
13425 (set_reinsert_breakpoint): New.
13426 (reinsert_breakpoint_by_bp): Delete.
13427 (delete_reinsert_breakpoints): New.
13428 (uninsert_breakpoint): Rewrite.
13429 (uninsert_breakpoints_at): New.
13430 (reinsert_breakpoint): Rewrite.
13431 (reinsert_breakpoints_at): New.
13432 (check_breakpoints): Rewrite.
13433 (breakpoint_here): New.
13434 (breakpoint_inserted_here): New.
13435 (check_mem_read): Adjust.
13436 * mem-break.h (breakpoints_supported, breakpoint_here)
13437 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13438 (reinsert_breakpoint_by_bp): Delete declaration.
13439 (delete_reinsert_breakpoints): Declare.
13440 (reinsert_breakpoint): Delete declaration.
13441 (reinsert_breakpoints_at): Declare.
13442 (uninsert_breakpoint): Delete declaration.
13443 (uninsert_breakpoints_at): Declare.
13444 (check_breakpoints): Adjust prototype.
13445 * server.h: Adjust include order.
13446 (struct thread_info): Declare here. Add a `last_status' field.
13447
30ba68cb
MS
134482010-03-23 Michael Snyder <msnyder@vmware.com>
13449
13450 * server.c (crc32): New function.
13451 (handle_query): Add handling for 'qCRC:' request.
13452
b9a881c2
PA
134532010-03-23 Pedro Alves <pedro@codesourcery.com>
13454
13455 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13456 lwp had been stopped by a watchpoint.
13457
e92d13d5
PA
134582010-03-16 Pedro Alves <pedro@codesourcery.com>
13459
13460 * server.h (internal_error): Declare.
13461 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13462 * utils.c (internal_error): New function.
13463
64daa791
AS
134642010-03-15 Andreas Schwab <schwab@redhat.com>
13465
13466 * configure.srv: Fix typo setting srv_regobj.
13467
f52cd8cd
PA
134682010-03-15 Pedro Alves <pedro@codesourcery.com>
13469
13470 * linux-low.c (fetch_register): Avoid passing a non string literal
13471 format to `error'.
13472 (usr_store_inferior_registers): Ditto.
13473
93ae6fdc
PA
134742010-03-14 Pedro Alves <pedro@codesourcery.com>
13475
13476 * linux-low.c (linux_write_memory): Bail out early if peeking
13477 memory failed.
13478
c3adc08c
PA
134792010-03-14 Pedro Alves <pedro@codesourcery.com>
13480
13481 * linux-low.h (struct lwp_info): New fields
13482 `stopped_by_watchpoint' and `stopped_data_address'.
13483 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13484 here, and cache them in the lwp object.
13485 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13486 directly.
13487 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13488 field.
13489 (linux_stopped_by_watchpoint): Rewrite.
13490 (linux_stopped_data_address): Rewrite.
13491
bce522a2
PA
134922010-03-06 Simo Melenius <simo.melenius@iki.fi>
13493
13494 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13495 switching the current inferior, not before.
13496
90884b2b
L
134972010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13498
13499 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13500 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13501 i386-linux.c and amd64-linux.c.
13502 (reg-i386.o): Removed.
13503 (reg-i386.c): Likewise.
13504 (reg-i386-linux.o): Likewise.
13505 (reg-i386-linux.c): Likewise.
13506 (reg-x86-64.o): Likewise.
13507 (reg-x86-64.c): Likewise.
13508 (reg-x86-64-linux.o): Likewise.
13509 (reg-x86-64-linux.c): Likewise.
13510 (i386.o): New.
13511 (i386.c): Likewise.
13512 (i386-linux.o): Likewise.
13513 (i386-linux.c): Likewise.
13514 (amd64.o): Likewise.
13515 (amd64.c): Likewise.
13516 (amd64-linux.o): Likewise.
13517 (amd64-linux.c): Likewise.
13518
13519 * configure.srv (srv_i386_regobj): New.
13520 (srv_i386_linux_regobj): Likewise.
13521 (srv_amd64_regobj): Likewise.
13522 (srv_amd64_linux_regobj): Likewise.
13523 (srv_i386_32bit_xmlfiles): Likewise.
13524 (srv_i386_64bit_xmlfiles): Likewise.
13525 (srv_i386_xmlfiles): Likewise.
13526 (srv_amd64_xmlfiles): Likewise.
13527 (srv_i386_linux_xmlfiles): Likewise.
13528 (srv_amd64_linux_xmlfiles): Likewise.
13529 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13530 srv_xmlfiles to $srv_i386_xmlfiles.
13531 (i[34567]86-*-mingw32ce*): Likewise.
13532 (i[34567]86-*-mingw*): Likewise.
13533 (i[34567]86-*-nto*): Likewise.
13534 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13535 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13536 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13537 (x86_64-*-linux*): Likewise.
13538
13539 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13540 (init_registers_amd64_linux): New.
13541 (x86_arch_setup): Replace init_registers_x86_64_linux with
13542 init_registers_amd64_linux.
13543
193f13e6
MK
135442010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13545
13546 * configure.ac: Check for libdl. If it is not available link against
13547 static libthread_db.
13548 * configure: Regenerate.
13549
85d721b8
PA
135502010-02-22 Pedro Alves <pedro@codesourcery.com>
13551
13552 PR9605
13553
13554 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13555 handing a read watchpoint.
13556 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13557
6076632b
DE
135582010-02-12 Doug Evans <dje@google.com>
13559
13560 * linux-low.c (linux_supports_tracefork_flag): Document.
13561 (linux_look_up_symbols): Add comment.
13562
3327ccf7
L
135632010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13564
13565 * regcache.c (supply_register): Clear regcache if buf is NULL.
13566
0718675c 135672010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13568 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13569
13570 * inferiors.c (find_inferior): Add function documentation.
13571 (unloaded_dll): Handle the case where the unloaded dll has not
13572 been previously registered in the dll list.
13573
177321bd
DJ
135742010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13577 (thumb2_breakpoint): New.
13578 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13579
2b009048
DJ
135802010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13581
13582 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13583 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13584 breakpoints.
13585
3be029c7
PA
135862010-01-21 Pedro Alves <pedro@codesourcery.com>
13587
13588 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13589
18f5de3b
JK
135902010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13591
13592 * linux-s390-low.c (s390_collect_ptrace_register)
13593 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13594
3743bb4f
DE
135952010-01-21 Doug Evans <dje@google.com>
13596
14ce3065
DE
13597 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13598 (PTRACE_ARG4_TYPE): New macro.
13599 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13600 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13601 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13602 (usr_store_inferior_registers): Ditto.
13603 (linux_read_memory, linux_write_memory): Ditto.
13604 (linux_test_for_tracefork): Ditto.
13605
3743bb4f
DE
13606 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13607 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13608
8b315be5
PA
136092010-01-21 Pedro Alves <pedro@codesourcery.com>
13610
13611 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13612 target.
13613
85492558
PA
136142010-01-21 Pedro Alves <pedro@codesourcery.com>
13615
13616 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13617 prototype to take a regcache. Adjust.
13618
442ea881
PA
136192010-01-20 Pedro Alves <pedro@codesourcery.com>
13620
13621 * regcache.h (struct thread_info): Forward declare.
13622 (struct regcache): New.
13623 (new_register_cache): Adjust prototype.
13624 (get_thread_regcache): Declare.
13625 (free_register_cache): Adjust prototype.
13626 (registers_to_string, registers_from_string): Ditto.
13627 (supply_register, supply_register_by_name, collect_register)
13628 (collect_register_as_string, collect_register_by_name): Ditto.
13629 * regcache.c (struct inferior_regcache_data): Delete.
13630 (get_regcache): Rename to ...
13631 (get_thread_regcache): ... this. Adjust. Switch inferior before
13632 fetching registers.
13633 (regcache_invalidate_one): Adjust.
13634 (regcache_invalidate): Fix prototype.
13635 (new_register_cache): Return the new register cache.
13636 (free_register_cache): Change prototype.
13637 (realloc_register_cache): Adjust.
13638 (registers_to_string): Change prototype to take a regcache. Adjust.
13639 (registers_from_string): Ditto.
13640 (register_data): Ditto.
13641 (supply_register): Ditto.
13642 (supply_register_by_name): Ditto.
13643 (collect_register): Ditto.
13644 (collect_register_as_string): Ditto.
13645 (collect_register_by_name): Ditto.
13646 * server.c (process_serial_event): Adjust.
13647 * linux-low.h (regset_fill_func, regset_store_func): Change
13648 prototype.
13649 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13650 Change prototype.
13651 * linux-low.c (get_stop_pc): Adjust.
13652 (check_removed_breakpoint): Adjust.
13653 (linux_wait_for_event): Adjust.
13654 (linux_resume_one_lwp): Adjust.
13655 (fetch_register): Add regcache parameter. Adjust.
13656 (usr_store_inferior_registers): Ditto.
13657 (regsets_fetch_inferior_registers): Ditto.
13658 (regsets_store_inferior_registers): Ditto.
13659 (linux_fetch_registers, linux_store_registers): Ditto.
13660 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13661 regcache. Adjust.
43aaf8b6
PA
13662 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13663 Ditto.
442ea881
PA
13664 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13665 prototype to take a regcache.
13666 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13667 * remote-utils.c (convert_ascii_to_int, outreg)
13668 (prepare_resume_reply): Change prototype to take a regcache.
13669 Adjust.
13670 * target.h (struct target_ops) <fetch_registers, store_registers>:
13671 Change prototype to take a regcache.
13672 (fetch_inferior_registers, store_inferior_registers): Change
13673 prototype to take a regcache. Adjust.
13674 * proc-service.c (ps_lgetregs): Adjust.
13675 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13676 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13677 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13678 take a regcache. Adjust.
13679 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13680 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13681 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13682 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13683 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13684 (cris_cannot_fetch_register):
13685 (cris_breakpoint_at): Change prototype to take a regcache.
13686 Adjust.
13687 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13688 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13689 to take a regcache. Adjust.
13690 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13691 Adjust.
13692 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13693 take a regcache. Adjust.
13694 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13695 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13696 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13697 * linux-mips-low.c (mips_get_pc):
13698 (mips_set_pc): Change prototype to take a regcache. Adjust.
13699 (mips_reinsert_addr): Adjust.
13700 (mips_collect_register): Change prototype to take a regcache.
13701 Adjust.
13702 (mips_supply_register):
13703 (mips_collect_register_32bit, mips_supply_register_32bit)
13704 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13705 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13706 * linux-ppc-low.c (ppc_supply_ptrace_register)
13707 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13708 (parse_spufs_run): Adjust.
13709 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13710 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13711 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13712 take a regcache. Adjust.
13713 * linux-s390-low.c (s390_collect_ptrace_register)
13714 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13715 (s390_set_pc): Change prototype to take a regcache. Adjust.
13716 (s390_arch_setup): Adjust.
13717 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13718 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13719 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13720 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13721 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13722 regcache. Adjust.
13723 (sparc_breakpoint_at): Adjust.
13724 * linux-xtensa-low.c (xtensa_fill_gregset):
13725 (xtensa_store_gregset):
13726 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13727 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13728 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13729 prototype to take a regcache. Adjust.
13730 * win32-arm-low.c (arm_fetch_inferior_register)
13731 (arm_store_inferior_register): Change prototype to take a
13732 regcache. Adjust.
13733 * win32-i386-low.c (i386_fetch_inferior_register)
13734 (i386_store_inferior_register): Change prototype to take a
13735 regcache. Adjust.
13736 * win32-low.c (child_fetch_inferior_registers)
13737 (child_store_inferior_registers): Change prototype to take a
13738 regcache. Adjust.
13739 (win32_wait): Adjust.
13740 (win32_fetch_inferior_registers): Change prototype to take a
13741 regcache. Adjust.
13742 (win32_store_inferior_registers): Adjust.
13743 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13744 store_inferior_register>: Change prototype to take a regcache.
13745
60c3d7b0
DE
137462010-01-20 Doug Evans <dje@google.com>
13747
13748 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13749 #ifdef.
13750 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13751 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13752
dc146f7c
VP
137532010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13754
13755 * linux-low.c (linux_core_of_thread): New.
13756 (compare_ints, show_process, list_threads): New.
13757 (linux_qxfer_osdata): Report threads and cores.
13758 (linux_target_op): Register linux_core_of_thread.
13759 * remote-utils.c (prepare_resume_reply): Report the core.
13760 (buffer_xml_printf): Support %d specifier.
13761 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13762 New.
13763 (handle_query): Handle qXfer:threads. Announce availability
13764 thereof.
13765 * target.h (struct target_ops): New field core_of_thread.
13766
7803799a
UW
137672010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13768
13769 * Makefile.in (clean): Remove new generated files.
13770 (reg-s390.o, reg-s390.c): Remove rules.
13771 (reg-s390x.o, reg-s390x.c): Likewise.
13772 (s390-linux32.o, s390-linux32.c): Add rules.
13773 (s390-linux64.o, s390-linux64.c): Likewise.
13774 (s390x-linux64.o, s390x-linux64.c): Likewise.
13775 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13776 * linux-s390-low.c: Include <elf.h>.
13777 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13778 (init_registers_s390): Remove prototype.
13779 (init_registers_s390x): Likewise.
13780 (init_registers_s390_linux32): Add prototype.
13781 (init_registers_s390_linux64): Likewise.
13782 (init_registers_s390x_linux64): Likewise.
13783 (s390_num_regs_3264): New define.
13784 (s390_regmap_3264): New global variable.
13785 (s390_cannot_fetch_register): Remove obsolete check.
13786 (s390_cannot_store_register): Likewise.
13787 (s390_collect_ptrace_register): Handle upper/lower register halves.
13788 (s390_supply_ptrace_register): Likewise.
13789 (s390_fill_gregset): Update to register number changes.
13790 (s390_get_hwcap): New routine.
13791 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13792 Install appropriate regmap and register set.
13793
6e7ffa39
JB
137942010-01-01 Joel Brobecker <brobecker@adacore.com>
13795
13796 * server.c (gdbserver_version): Update copyright year to 2010.
13797 * gdbreplay.c (gdbreplay_version): Likewise.
13798
957f3f49
DE
137992009-12-28 Doug Evans <dje@google.com>
13800
13801 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13802 elf/external.h. Include <elf.h> instead but only if necessary.
13803
ca5c370d
PA
138042009-12-28 Pedro Alves <pedro@codesourcery.com>
13805
13806 * linux-low.c (linux_remove_process): Remove `detaching'
13807 parameter. Don't release/detach from thread_db here.
13808 (linux_kill): Release/detach from thread_db here, ...
13809 (linux_detach): ... and here, before actually detaching.
13810 (linux_wait_1): ... and here, when a process exits.
13811 * thread-db.c (any_thread_of): New.
13812 (thread_db_free): Switch the current inferior to a thread of the
13813 passed in process.
13814
4ee62156
DE
138152009-12-21 Doug Evans <dje@google.com>
13816
d90e6a88
DE
13817 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13818
c5f62d5f
DE
13819 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13820 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13821 warning ifndef __NR_tkill. Move setting of errno there too.
13822 Delete unnecessary resetting of errno after syscall.
13823 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13824
10e86dd7
DE
13825 * configure.ac: Check for dladdr.
13826 * config.in: Regenerate.
13827 * configure: Regenerate.
13828 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13829 (try_thread_db_load): Update.
13830
4ee62156
DE
13831 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13832
00f515da
DE
138332009-12-18 Doug Evans <dje@google.com>
13834
e9464885
DE
13835 * event-loop.c: Include unistd.h if it exists.
13836
07d4f67e
DE
13837 * linux-low.c (my_waitpid): Move definition away from being in
13838 between linux_tracefork_child/linux_test_for_tracefork.
13839
00f515da
DE
13840 * gdb_proc_service.h (psaddr_t): Fix type.
13841 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13842 signature to match glibc.
13843
1de1badb
DE
138442009-12-16 Doug Evans <dje@google.com>
13845
13846 * linux-low.c (linux_read_memory): Fix argument to read.
13847
aeeb81d1
PA
138482009-11-26 Pedro Alves <pedro@codesourcery.com>
13849
13850 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13851 events, don't leave current_inferior pointing at null.
13852
10357975
PA
138532009-11-26 Pedro Alves <pedro@codesourcery.com>
13854
13855 * win32-low.c (LOG): Delete.
13856 (OUTMSG): Output to stderr.
13857 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13858 on compile time LOG macro.
13859 (win32_wait): Fix debug output.
13860
cf6e3471
PA
138612009-11-26 Pedro Alves <pedro@codesourcery.com>
13862
13863 * win32-low.c (win32_add_one_solib): If the dll name is
13864 "ntdll.dll", prepend the system directory to the dll path.
13865
0c85e18e
MK
138662009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13869
9ac544ce 138702009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13871 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13872
13873 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13874 * configure.ac: Check for __mcoldfire__ and set
13875 gdb_cv_m68k_is_coldfire.
13876 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13877 reg-cf.o and reg-m68k.o.
13878 * configure: Regenerated.
13879
fd7dd3e6
PA
138802009-11-16 Pedro Alves <pedro@codesourcery.com>
13881
13882 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13883 Pass it to thread_db_free.
13884 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13885 proper `detaching' argument to linux_remove_process.
13886 * linux-low.h (thread_db_free): Add `detaching' parameter.
13887 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13888 to thread_db_free.
13889 (thread_db_free): Add `detaching' parameter. Only
13890 call td_ta_clear_event if detaching from process.
13891
75aa492e
MK
138922009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13893
13894 * thread-db.c (thread_db_free): Fix typo.
13895
21e1bee4
PP
138962009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13897
13898 PR gdb/10838
13899 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13900
8838b45e
NS
139012009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13902
13903 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13904 with an i686 compiler.
13905 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13906 needed.
13907 * configure: Rebuilt.
13908
8a35fb51
SL
139092009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13910
13911 PR gdb/10783
13912
13913 * server.c (handle_search_memory_1): Correct read_addr initialization
13914 in loop for searching subsequent chunks.
13915
96f15937
PP
139162009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13917
13918 * configure.ac: New --with-libthread-db option.
13919 * thread-db.c: Allow direct dependence on libthread_db.
13920 (thread_db_free): Adjust.
13921 * config.in: Regenerate.
13922 * configure: Likewise.
889bf7c5 13923
5f7d1694
PP
139242009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13925
13926 PR gdb/10757
13927 * thread-db.c (attach_thread): New function.
13928 (maybe_attach_thread): Return success/failure.
13929 (find_new_threads_callback): Adjust.
889bf7c5
PA
13930 (thread_db_find_new_threads): Loop until no new threads.
13931
88e3b899
PA
139322009-10-13 Pedro Alves <pedro@codesourcery.com>
13933
13934 * proc-service.c (ps_lgetregs): Formatting.
13935
cdbfd419
PP
139362009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13937
13938 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13939 * configure.ac: Adjust.
13940 * linux-low.h (struct process_info_private): Move members to struct
13941 thread_db.
13942 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13943 * linux-low.c (linux_remove_process): Adjust.
13944 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13945 * server.c (handle_query): Move code ...
13946 (handle_monitor_command): ... here. New function.
13947 * target.h (struct target_ops): New member.
13948 * thread-db.c (struct thread_db): New.
13949 (libthread_db_search_path): New variable.
13950 (thread_db_create_event, thread_db_enable_reporting)
13951 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13952 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13953 (try_thread_db_load_1, dladdr_to_soname): New functions.
13954 (try_thread_db_load, thread_db_load_search): New functions.
13955 (thread_db_init): Search for libthread_db.
13956 (thread_db_free): New function.
13957 (thread_db_handle_monitor_command): Likewise.
13958 * config.in: Regenerate.
13959 * configure: Regenerate.
889bf7c5 13960
4168d2d6
UW
139612009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13962
13963 * spu-low.c (spu_kill): Wait for inferior to terminate.
13964 Call clear_inferiors.
13965 (spu_detach): Call clear_inferiors.
13966
81ecdfbb
RW
139672009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13968
13969 * aclocal.m4: Regenerate.
13970 * config.in: Likewise.
13971 * configure: Likewise.
13972
0b9ff2c0
UW
139732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13974
13975 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13976 (parse_spufs_run): New function.
13977 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13978 (ppc_breakpoint_at): Handle SPU breakpoints.
13979
efcbbd14
UW
139802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13981
13982 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13983 (SPUFS_MAGIC): Define.
13984 (spu_enumerate_spu_ids): New function.
13985 (linux_qxfer_spu): New function.
13986 (linux_target_ops): Install linux_qxfer_spu.
13987
f4d9bade
UW
139882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13989
13990 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13991 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13992 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13993 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13994 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13995 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13996 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13997 (init_registers_powerpc_cell32l): Add prototype.
13998 (init_registers_powerpc_cell64l): Likewise.
13999 (ppc_arch_setup): Detect Cell/B.E. architecture.
14000
96e946ca
RW
140012009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14002
14003 * Makefile.in (datarootdir): New variable.
14004
58d6951d
DJ
140052009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14006
14007 * linux-low.c (linux_write_memory): Update debugging output.
14008 * Makefile.in (clean): Add new descriptions.
14009 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14010 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14011 * configure.srv: Add new files for arm*-*-linux*.
14012 * linux-arm-low.c: Add new declarations.
14013 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14014 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14015 (HWCAP_VFPv3D16): New.
14016 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14017 instead of __IWMMXT__.
14018 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14019 (arm_arch_setup): New.
14020 (target_regsets): Remove #ifdef. Add VFP regset.
14021 (the_low_target): Use arm_arch_setup.
14022
12b42a12
DJ
140232009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14024
14025 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14026 the main thread again.
14027
ac8c974e
AR
140282009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14029
14030 Adding Neutrino gdbserver.
14031 * configure: Regenerated.
14032 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14033 * configure.srv (i[34567]86-*-nto*): New target.
14034 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14035 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14036 (nto_comctrl) [__QNX__]: New function.
14037 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14038
4424e0c3 140392009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14040
14041 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14042 srv_tgtobj.
14043
912cf4ba
PA
140442009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14045 Pedro Alves <pedro@codesourcery.com>
14046
14047 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14048 don't support CONTEXT_EXTENDED_REGISTERS.
14049 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14050 (the_low_target): Install them.
14051 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14052 failing with ERROR_PIPE_NOT_CONNECTED.
14053
aa5ca48f
DE
140542009-06-30 Doug Evans <dje@google.com>
14055 Pierre Muller <muller@ics.u-strasbg.fr>
14056
14057 Add h/w watchpoint support to x86-linux, win32-i386.
14058 * Makefile.in (SFILES): Add i386-low.c
14059 (i386_low_h): Define.
14060 (i386-low.o): Add dependencies.
14061 (linux-x86-low.o): Add i386-low.h dependency.
14062 (win32-i386-low.o): Ditto.
14063 * i386-low.c: New file.
14064 * i386-low.h: New file.
14065 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14066 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14067 * linux-low.c (linux_add_process): Initialize arch_private.
14068 (linux_remove_process): Free arch_private.
14069 (add_lwp): Initialize arch_private.
14070 (delete_lwp): Free arch_private.
14071 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14072 provided.
14073 * linux-low.h (process_info_private): New member arch_private.
14074 (lwp_info): New member arch_private.
14075 (linux_target_ops): New members new_process, new_thread,
14076 prepare_to_resume.
14077 (ptid_of): New macro.
14078 * linux-x86-low.c: Include stddef.h, i386-low.h.
14079 (arch_process_info): New struct.
14080 (arch_lwp_info): New struct.
14081 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14082 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14083 (i386_dr_low_get_status): New function.
14084 (x86_insert_point, x86_remove_point): New functions.
14085 (x86_stopped_by_watchpoint): New function.
14086 (x86_stopped_data_address): New function.
14087 (x86_linux_new_process, x86_linux_new_thread): New functions.
14088 (x86_linux_prepare_to_resume): New function.
14089 (the_low_target): Add entries for insert_point, remove_point,
14090 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14091 prepare_to_resume.
14092 * server.c (debug_hw_points): New global.
14093 (monitor_show_help): Document set debug-hw-points.
14094 (handle_query): Process "set debug-hw-points".
14095 * server.h (debug_hw_points): Declare.
14096 (paddress): Declare.
14097 * utils.c (NUMCELLS, CELLSIZE): New macros.
14098 (get_sell, xsnprintf, paddress): New functions.
14099 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14100 remove_point, stopped_by_watchpoint, stopped_data_address.
14101 * win32-i386-low.c: Include i386-low.h.
14102 (debug_reg_state): Replaces dr.
14103 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14104 (i386_dr_low_get_status): New function.
14105 (i386_insert_point, i386_remove_point): New functions.
14106 (i386_stopped_by_watchpoint): New function.
14107 (i386_stopped_data_address): New function.
14108 (i386_initial_stuff): Update.
14109 (get_thread_context,set_thread_context,i386_thread_added): Update.
14110 (the_low_target): Add entries for insert_point,
14111 remove_point, stopped_by_watchpoint, stopped_data_address.
14112 * win32-low.c (win32_insert_watchpoint): New function.
14113 (win32_remove_watchpoint): New function.
14114 (win32_stopped_by_watchpoint): New function.
14115 (win32_stopped_data_address): New function.
14116 (win32_target_ops): Add entries for insert_watchpoint,
14117 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14118 * win32-low.h (win32_target_ops): New members insert_point,
14119 remove_point, stopped_by_watchpoint, stopped_data_address.
14120
d993e290
PA
141212009-06-25 Pedro Alves <pedro@codesourcery.com>
14122
14123 * server.c (process_serial_event): Re-return unsupported, not
14124 error, if the type isn't recognized. Re-allow supporting only
14125 insert or remove packets. Also call require_running for
14126 breakpoints. Add missing break statement to default case. Tidy.
14127 * target.h (struct target_ops): Rename insert_watchpoint to
14128 insert_point, and remove_watchpoint to remove_point.
14129
14130 * linux-low.h (struct linux_target_ops): Likewise.
14131 * linux-low.c (linux_insert_watchpoint): Rename to ...
14132 (linux_insert_point): ... this. Adjust.
14133 (linux_remove_watchpoint): Rename to ...
14134 (linux_remove_point): ... this. Adjust.
14135 (linux_target_ops): Adjust.
14136 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14137 (cris_insert_point): ... this.
14138 (cris_remove_watchpoint): Rename to ...
14139 (cris_remove_point): ... this.
14140 (the_low_target): Adjust.
14141
0f54c268
PM
141422009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14143
14144 * server.c (handle_v_kill): Pass signal_pid to
14145 kill_inferior if multi_process is zero.
14146
c6314022
AR
141472009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14148
14149 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14150 * target.h (target_ops): Comment for *_watchpoint to make it clear
14151 the functions can get types '0' and '1'.
14152
4463ce24
AR
141532009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14154
14155 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14156 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14157 * regcache.c (get_regcache): Likewise.
14158 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14159 * win32-low.c (child_fetch_inferior_registers): Remove check for
14160 regno 0.
14161
cf8fd78b
PA
141622009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14163 Pedro Alves <pedro@codesourcery.com>
14164
14165 * target.h (struct target_ops) <supports_multi_process>: New
14166 callback.
14167 (target_supports_multi_process): New.
14168 * server.c (handle_query): Even if GDB reports support, only
14169 enable multi-process if the target also supports it. Report
14170 multi-process support only if the target backend supports it.
14171 * linux-low.c (linux_supports_multi_process): New function.
14172 (linux_target_ops): Install it as target_supports_multi_process
14173 callback.
14174
47c0c975
DE
141752009-05-24 Doug Evans <dje@google.com>
14176
e09875d4
DE
14177 Global renaming of find_thread_pid to find_thread_ptid.
14178 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14179 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14180 All callers updated.
14181
e27d73f6
DE
14182 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14183 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14184 directly.
14185
47c0c975
DE
14186 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14187 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14188 (linux_resume_one_lwp): Ditto.
14189
2acc282a
DE
141902009-05-23 Doug Evans <dje@google.com>
14191
14192 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14193 from struct inferior_list_entry * to struct lwp_info *.
14194 All callers updated.
14195
9f1036c1
DE
141962009-05-13 Doug Evans <dje@google.com>
14197
14198 * linux-x86-low.c: Don't include assert.h.
14199 (x86_siginfo_fixup): Use fatal, not assert.
14200 (x86_arch_setup): Fix comment.
14201
d0722149
DE
142022009-05-12 Doug Evans <dje@google.com>
14203
14204 Biarch support for i386/amd64 gdbserver.
14205 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14206 Add linux-x86-low.c.
14207 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14208 (linux-x86-low.o): Add.
14209 * linux-x86-64-low.c: Delete.
14210 * linux-i386-low.c: Delete.
14211 * linux-x86-low.c: New file.
14212 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14213 linux-x86-low.o.
14214 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14215 linux-x86-low.o.
14216 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14217 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14218 (linux_child_pid_to_exec_file): New function.
14219 (elf_64_header_p, elf_64_file_p): New functions.
14220 (siginfo_fixup): New function.
14221 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14222 give target a chance to convert layout.
14223 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14224 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14225
fdeb2a12
DE
142262009-05-07 Doug Evans <dje@google.com>
14227
14228 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14229 (regsets_store_inferior_registers): Ditto.
14230
a6dbe5df
PA
142312009-05-06 Pedro Alves <pedro@codesourcery.com>
14232
14233 PR server/10048
14234
14235 * linux-low.c (must_set_ptrace_flags): Delete.
14236 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14237 of the global.
14238 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14239 `lwp->must_set_ptrace_flags' instead.
ba42693b 14240 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14241 (linux_wait_1): ... not here.
14242
5091eb23
DE
142432009-04-30 Doug Evans <dje@google.com>
14244
9f767825
DE
14245 * inferiors.c (started_inferior_callback): New function.
14246 (attached_inferior_callback): New function.
14247 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14248 * server.c (print_started_pid, print_attached_pid): New functions.
14249 (detach_or_kill_for_exit): New function.
14250 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14251 * server.h (have_started_inferiors_p): Declare.
14252 (have_attached_inferiors_p): Declare.
14253
5091eb23
DE
14254 * inferiors.c (remove_process): Fix memory leak, free process.
14255 * linux-low.c (linux_remove_process): New function.
14256 (linux_kill): Call it instead of remove_process.
14257 (linux_detach, linux_wait_1): Ditto.
14258
155c8968
PA
142592009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14260
14261 * configure.srv: Add x86 Windows CE target.
14262
7fe519cb
UW
142632009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14264
14265 * inferiors.c (get_thread_process): Make global.
14266 * server.h (get_thread_process): Add prototype.
14267 * thread-db.c (find_one_thread): Use get_thread_process
14268 instead of current_process.
14269 (thread_db_get_tls_address): Do not crash if called when
14270 thread layer is not yet initialized.
14271
5472f405
UW
142722009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14273
14274 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14275 * spu-low.c (current_tid): Rename to ...
14276 (current_ptid): ... this.
14277 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14278 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14279 ptid_get_lwp (current_ptid) instead of current_tid.
14280 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14281 instead of current_tid. Use find_process_pid to verify pid
14282 argument is valid. Pass proper argument to remove_process.
14283 (spu_thread_alive): Compare current_ptid instead of current_tid.
14284 (spu_resume): Likewise.
14285
55ac2b99
PA
142862009-04-02 Pedro Alves <pedro@codesourcery.com>
14287
14288 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14289 variable.
14290
95954743
PA
142912009-04-01 Pedro Alves <pedro@codesourcery.com>
14292
14293 Implement the multiprocess extensions, and add linux multiprocess
14294 support.
14295
14296 * server.h (ULONGEST): Declare.
14297 (struct ptid, ptid_t): New.
14298 (minus_one_ptid, null_ptid): Declare.
14299 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14300 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14301 (struct inferior_list_entry): Change `id' type from unsigned from
14302 to ptid_t.
14303 (struct sym_cache, struct breakpoint, struct
14304 process_info_private): Forward declare.
14305 (struct process_info): Declare.
14306 (current_process): Declare.
14307 (all_processes): Declare.
14308 (initialize_inferiors): Declare.
14309 (add_thread): Adjust to use ptid_t.
14310 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14311 (add_process, remove_process, find_thread_pid): Declare.
14312 (find_inferior_id): Adjust to use ptid_t.
14313 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14314 (multi_process): Declare.
14315 (push_event): Adjust to use ptid_t.
14316 (read_ptid, write_ptid): Declare.
14317 (prepare_resume_reply): Adjust to use ptid_t.
14318 (clear_symbol_cache): Declare.
14319 * inferiors.c (all_processes): New.
14320 (null_ptid, minus_one_ptid): New.
14321 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14322 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14323 (add_thread): Change unsigned long to ptid. Remove gdb_id
14324 parameter. Adjust.
14325 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14326 (gdb_id_to_thread): Rename to ...
14327 (find_thread_pid): ... this. Change unsigned long to ptid.
14328 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14329 (loaded_dll, pull_pid_from_list): Adjust.
14330 (add_process, remove_process, find_process_pid)
14331 (get_thread_process, current_process, initialize_inferiors): New.
14332 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14333 (struct target_waitstatus) <related_pid>: Ditto.
14334 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14335 return type to int.
14336 (struct target_ops) <join>: Add `pid' argument.
14337 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14338 (struct target_ops) <wait>: Add `ptid' field. Change return type
14339 to ptid.
14340 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14341 (mywait): Add `ptid' argument. Change return type to ptid_t.
14342 (target_pid_to_str): Declare.
14343 * target.c (set_desired_inferior): Adjust to use ptids.
14344 (mywait): Add new `ptid' argument. Adjust.
14345 (target_pid_to_str): New.
14346 * mem-break.h (free_all_breakpoints): Declare.
14347 * mem-break.c (breakpoints): Delelete.
14348 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14349 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14350 to use per-process breakpoint list.
14351 (free_all_breakpoints): New.
14352 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14353 (symbol_cache, all_symbols_looked_up): Delete.
14354 (hexchars): New.
14355 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14356 read_ptid): New.
14357 (prepare_resume_reply): Change ptid argument's type from unsigned
14358 long to ptid_t. Adjust. Implement W;process and X;process.
14359 (free_sym_cache, clear_symbol_cache): New.
14360 (look_up_one_symbol): Adjust to per-process symbol cache. *
14361 * server.c (cont_thread, general_thread, step_thread): Change type
14362 to ptid_t.
14363 (attached): Delete.
14364 (multi_process): New.
14365 (last_ptid): Change type to ptid_t.
14366 (struct vstop_notif) <ptid>: Change type to ptid_t.
14367 (queue_stop_reply, push_event): Change `ptid' argument's type to
14368 ptid_t.
14369 (discard_queued_stop_replies): Add `pid' argument.
14370 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14371 changes. Don't reference the `attached' global.
14372 (attach_inferior): Adjust to mywait interface changes.
14373 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14374 features. Handle and report "multiprocess+". Handle
14375 "qAttached:PID".
14376 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14377 changes.
14378 (handle_v_kill): New.
14379 (handle_v_stopped): Adjust to use target_pid_to_str.
14380 (handle_v_requests): Allow multiple attaches and runs when
14381 multiprocess extensions are in effect. Handle "vKill".
14382 (myresume): Adjust to use ptids.
14383 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14384 (handle_status): Adjust to discard_queued_stop_replies interface
14385 change.
14386 (first_thread_of, kill_inferior_callback)
14387 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14388 (main): Call initialize_inferiors. Adjust to use ptids, killing
14389 and detaching from all inferiors. Handle multiprocess packet
14390 variants.
14391 * linux-low.h: Include gdb_proc_service.h.
14392 (struct process_info_private): New.
14393 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14394 <lwpid_of>: Use ptid_get_lwp.
14395 (get_lwp_thread): Adjust.
14396 (struct lwp_info): Add `dead' member.
14397 (find_lwp_pid): Declare.
14398 * linux-low.c (thread_db_active): Delete.
14399 (new_inferior): Adjust comment.
14400 (inferior_pid): Delete.
14401 (linux_add_process): New.
14402 (handle_extended_wait): Adjust.
14403 (add_lwp): Change unsigned long to ptid.
14404 (linux_create_inferior): Add process to processes table. Adjust
14405 to use ptids. Don't set new_inferior here.
14406 (linux_attach_lwp): Rename to ...
14407 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14408 it. Adjust to use ptids.
14409 (linux_attach_lwp): New.
14410 (linux_attach): Add process to processes table. Don't set
14411 new_inferior here.
14412 (struct counter): New.
14413 (second_thread_of_pid_p, last_thread_of_process_p): New.
14414 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14415 multiple processes.
14416 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14417 processes. Remove process from process table.
14418 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14419 to multiple processes.
14420 (any_thread_of): New.
14421 (linux_detach): Add `pid' argument, and handle it. Remove process
14422 from processes table.
14423 (linux_join): Add `pid' argument. Handle it.
14424 (linux_thread_alive): Change unsighed long argument to ptid_t.
14425 Consider dead lwps as not being alive.
14426 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14427 threads we're not interested in.
14428 (same_lwp, find_lwp_pid): New.
14429 (linux_wait_for_lwp): Change `pid' argument's type from int to
14430 ptid_t. Adjust.
14431 (linux_wait_for_event): Rename to ...
14432 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14433 from int to ptid_t. Adjust.
14434 (linux_wait_for_event): New.
14435 (linux_wait_1): Add `ptid' argument. Change return type to
14436 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14437 that exit from the process table.
14438 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14439 Adjust.
14440 (mark_lwp_dead): New.
14441 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14442 stopping all threads, mark its main lwp as dead.
14443 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14444 ptids.
14445 (fetch_register, usr_store_inferior_registers)
14446 (regsets_fetch_inferior_registers)
14447 (regsets_store_inferior_registers, linux_read_memory)
14448 (linux_write_memory): Inline `inferior_pid'.
14449 (linux_look_up_symbols): Adjust to use per-process
14450 `thread_db_active'.
14451 (linux_request_interrupt): Adjust to use ptids.
14452 (linux_read_auxv): Inline `inferior_pid'.
14453 (initialize_low): Don't reference thread_db_active.
14454 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14455 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14456 (ps_getpid): Return the pid of the current inferior.
14457 * thread-db.c (proc_handle, thread_agent): Delete.
14458 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14459 per-process data.
14460 (find_one_thread): Change argument type to ptid_t. Adjust to
14461 per-process data.
14462 (maybe_attach_thread): Adjust to per-process data and ptids.
14463 (thread_db_find_new_threads): Ditto.
14464 (thread_db_init): Ditto.
14465 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14466 processes table. Adjust to use ptids.
14467 (spu_kill, spu_detach): Adjust interface. Remove process from
14468 processes table.
14469 (spu_join, spu_thread_alive): Adjust interface.
14470 (spu_wait): Adjust interface. Remove process from processes
14471 table. Adjust to use ptids.
14472 * win32-low.c (current_inferior_tid): Delete.
14473 (current_inferior_ptid): New.
14474 (debug_event_ptid): New.
14475 (thread_rec): Take a ptid. Adjust.
14476 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14477 (child_delete_thread): Ditto.
14478 (do_initial_child_stuff): Add `attached' argument. Add process to
14479 processes table.
14480 (child_fetch_inferior_registers, child_store_inferior_registers):
14481 Adjust.
14482 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14483 (win32_attach): Pass 1 to do_initial_child_stuff.
14484 (win32_kill): Adjust interface. Remove process from processes
14485 table.
14486 (win32_detach): Ditto.
14487 (win32_join): Adjust interface.
14488 (win32_thread_alive): Take a ptid.
14489 (win32_resume): Adjust to use ptids.
14490 (get_child_debug_event): Ditto.
14491 (win32_wait): Adjust interface. Remove exiting process from
14492 processes table.
14493
bd99dc85
PA
144942009-04-01 Pedro Alves <pedro@codesourcery.com>
14495
14496 Non-stop mode support.
14497
14498 * server.h (non_stop): Declare.
14499 (gdb_client_data, handler_func): Declare.
14500 (delete_file_handler, add_file_handler, start_event_loop):
14501 Declare.
14502 (handle_serial_event, handle_target_event, push_event)
14503 (putpkt_notif): Declare.
14504 * target.h (enum resume_kind): New.
14505 (struct thread_resume): Replace `step' field by `kind' field.
14506 (TARGET_WNOHANG): Define.
14507 (struct target_ops) <wait>: Add `options' argument.
14508 <supports_non_stop, async, start_non_stop>: New fields.
14509 (target_supports_non_stop, target_async): New.
14510 (start_non_stop): Declare.
14511 (mywait): Add `options' argument.
14512 * target.c (mywait): Add `options' argument. Print child exit
14513 notifications here.
14514 (start_non_stop): New.
14515 * server.c (non_stop, own_buf, mem_buf): New globals.
14516 (struct vstop_notif): New.
14517 (notif_queue): New global.
14518 (queue_stop_reply, push_event, discard_queued_stop_replies)
14519 (send_next_stop_reply): New.
14520 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14521 interface changes.
14522 (attach_inferior): In non-stop mode, don't wait for the target
14523 here.
14524 (handle_general_set): Handle QNonStop.
14525 (handle_query): When handling qC, return the current general
14526 thread, instead of the first thread of the list.
14527 (handle_query): If the backend supports non-stop mode, include
14528 QNonStop+ in the qSupported query response.
14529 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14530 and non-stop mode.
14531 (handle_v_attach, handle_v_run): Handle non-stop mode.
14532 (handle_v_stopped): New.
14533 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14534 (myresume): Adjust to use resume_kind. Handle non-stop.
14535 (queue_stop_reply_callback): New.
14536 (handle_status): Handle non-stop mode.
14537 (main): Clear non_stop flag on reconnection. Use the event-loop.
14538 Refactor serial protocol handling from here ...
14539 (process_serial_event): ... to this new function. When GDB
14540 selects any thread, select one here. In non-stop mode, wait until
14541 GDB acks all pending events before exiting.
14542 (handle_serial_event, handle_target_event): New.
14543 * remote-utils.c (remote_open): Install remote_desc in the event
14544 loop.
14545 (remote_close): Remove remote_desc from the event loop.
14546 (putpkt_binary): Rename to...
14547 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14548 (putpkt_binary): New as wrapper around putpkt_binary_1.
14549 (putpkt_notif): New.
14550 (prepare_resume_reply): In non-stop mode, don't change the
14551 general_thread.
14552 * event-loop.c: New.
14553 * Makefile.in (OBJ): Add event-loop.o.
14554 (event-loop.o): New rule.
14555
14556 * linux-low.h (pid_of): Moved here.
14557 (lwpid_of): New.
14558 (get_lwp_thread): Use lwpid_of.
14559 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14560 * linux-low.c (pid_of): Delete.
14561 (inferior_pid): Use lwpid_of.
14562 (linux_event_pipe): New.
14563 (target_is_async_p): New.
14564 (delete_lwp): New.
14565 (handle_extended_wait): Use lwpid_of.
14566 (add_lwp): Don't set lwpid field.
14567 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14568 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14569 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14570 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14571 first. Adjust to linux_wait_for_event interface changes. Use
14572 lwpid_of.
14573 (linux_detach): Don't delete the main lwp here.
14574 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14575 (status_pending_p): Don't consider explicitly suspended lwps.
14576 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14577 pointer. Add OPTIONS argument. Change return type to int. Use
14578 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14579 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14580 pointer. Add status pointer argument. Return a pid instead of a
14581 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14582 changes. In non-stop mode, don't switch to a random thread.
14583 (linux_wait): Rename to...
14584 (linux_wait_1): ... this. Add target_options argument, and handle
14585 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14586 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14587 clean exit and signal exit code. Don't stop all threads in
14588 non-stop mode. In all-stop mode, only stop all threads when
14589 reporting a stop to GDB. Handle explicit thread stop requests.
14590 (async_file_flush, async_file_mark): New.
14591 (linux_wait): New.
14592 (send_sigstop): Use lwpid_of.
14593 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14594 interface changes. In non-stop mode, don't switch to a random
14595 thread.
14596 (linux_resume_one_lwp): Use lwpid_of.
14597 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14598 (linux_resume_one_thread): ... this. Handle resume_stop. In
14599 non-stop mode, don't look for pending flag in all threads.
14600 (resume_status_pending_p): Don't consider explicitly suspended
14601 threads.
14602 (my_waitpid): Reimplement. Emulate __WALL.
14603 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14604 Use lwpid_of.
14605 (sigchld_handler, linux_supports_non_stop, linux_async)
14606 (linux_start_non_stop): New.
14607 (linux_target_ops): Register linux_supports_non_stop, linux_async
14608 and linux_start_non_stop.
14609 (initialize_low): Install SIGCHLD handler.
14610 * thread-db.c (thread_db_create_event, find_one_thread)
14611 (thread_db_get_tls_address): Use lwpid_of.
14612 * win32-low.c (win32_detach): Adjust to use resume_kind.
14613 (win32_wait): Add `options' argument.
14614 * spu-low.c (spu_resume): Adjust to use resume_kind.
14615 (spu_wait): Add `options' argument.
14616
5b1c542e
PA
146172009-04-01 Pedro Alves <pedro@codesourcery.com>
14618
14619 Decouple target code from remote protocol.
14620
14621 * target.h (enum target_waitkind): New.
14622 (struct target_waitstatus): New.
14623 (struct target_ops) <wait>: Return an unsigned long. Take a
14624 target_waitstatus pointer instead of a char pointer.
14625 (mywait): Likewise.
14626 * target.c (mywait): Change prototype to return an unsigned long.
14627 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14628 * server.h (thread_from_wait, old_thread_from_wait): Delete
14629 declarations.
14630 (prepare_resume_reply): Change prototype to take a
14631 target_waitstatus.
14632 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14633 (last_status, last_ptid): New.
14634 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14635 pid instead of a signal.
14636 (attach_inferior): Remove "status" and "signal" parameters.
14637 Adjust.
14638 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14639 not as an address.
14640 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14641 (handle_v_requests, myresume): Remove "status" and "signal"
14642 parameters. Adjust.
14643 (handle_status): New.
14644 (main): Delete local `status'. Adjust.
14645 * remote-utils.c: Include target.h.
14646 (prepare_resume_reply): Change prototype to take a
14647 target_waitstatus. Adjust.
14648
14649 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14650 interface.
14651 * spu-low.c (spu_wait): Adjust.
14652 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14653 Delete.
14654 (win32_wait): Adjust.
14655
2bd7c093
PA
146562009-04-01 Pedro Alves <pedro@codesourcery.com>
14657
14658 * target.h (struct thread_resume): Delete leave_stopped member.
14659 (struct target_ops): Add a `n' argument to the `resume' callback.
14660 * server.c (start_inferior): Adjust.
14661 (handle_v_cont, myresume): Adjust.
14662 * linux-low.c (check_removed_breakpoint): Adjust to resume
14663 interface change, and to removed leave_stopped field.
14664 (resume_ptr): Delete.
14665 (struct thread_resume_array): New.
14666 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14667 resume interface change.
14668 (linux_continue_one_thread, linux_queue_one_thread)
14669 (resume_status_pending_p): Check if the resume field is NULL
14670 instead of checking the leave_stopped member.
14671 (linux_resume): Adjust to the target resume interface change.
14672 * spu-low.c (spu_resume): Adjust to the target resume interface
14673 change.
14674 * win32-low.c (win32_detach, win32_resume): Ditto.
14675
c35fafde
PA
146762009-04-01 Pedro Alves <pedro@codesourcery.com>
14677
14678 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14679 flag.
14680 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14681 pending.
14682 (linux_continue_one_thread): Only preserve the stepping flag if
14683 there's a pending breakpoint.
14684
0a59d50b
PA
146852009-03-31 Pedro Alves <pedro@codesourcery.com>
14686
14687 * server.c (main): After the inferior having exited, call
14688 remote_close before exiting gdbserver.
14689
f04c6d38
TJB
146902009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14691
14692 Fix size of FPSCR in Power 7 processors.
14693 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14694 (PPC_FEATURE_HAS_DFP): New #define.
14695 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14696 size of the FPSCR.
14697
78e5cee6
PA
146982009-03-23 Pedro Alves <pedro@codesourcery.com>
14699
14700 * server.c (handle_query) Whitespace and formatting.
14701
1b3f6016
PA
147022009-03-22 Pedro Alves <pedro@codesourcery.com>
14703
14704 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14705 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14706 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14707 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14708 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14709 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14710 Makefile.in, configure.ac: Fix whitespace throughout.
14711 * configure: Regenerate.
14712
a07b2135
PA
147132009-03-22 Pedro Alves <pedro@codesourcery.com>
14714
14715 * inferiors.c (find_inferior): Make it safe for the callback
14716 function to delete the currently iterated inferior.
14717
67cc2626
PA
147182009-03-22 Pedro Alves <pedro@codesourcery.com>
14719
14720 * Makefile.in (linuw_low_h): Move higher.
14721 (thread-db.o): Depend on $(linux_low_h).
14722
54a0b537
PA
147232009-03-17 Pedro Alves <pedro@codesourcery.com>
14724
14725 Rename "process" to "lwp" throughout.
14726
14727 * linux-low.c (all_processes): Rename to...
14728 (all_lwps): ... this.
14729 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14730 (add_process): Rename to ...
14731 (add_lwp): ... this. Adjust.
14732 (linux_create_inferior): Adjust.
14733 (linux_attach_lwp): Adjust.
14734 (linux_attach): Adjust.
14735 (linux_kill_one_process): Rename to ...
14736 (linux_kill_one_lwp): ... this. Adjust.
14737 (linux_kill): Adjust.
14738 (linux_detach_one_process): Rename to ...
14739 (linux_detach_one_lwp): ... this. Adjust.
14740 (linux_detach): Adjust.
14741 (check_removed_breakpoint): Adjust.
14742 (status_pending_p): Adjust.
14743 (linux_wait_for_process): Rename to ...
14744 (linux_wait_for_lwp): ... this. Adjust.
14745 (linux_wait_for_event): Adjust.
14746 (send_sigstop): Adjust.
14747 (wait_for_sigstop): Adjust.
14748 (stop_all_processes): Rename to ...
14749 (stop_all_lwps): ... this.
14750 (linux_resume_one_process): Rename to ...
14751 (linux_resume_one_lwp): ... this. Adjust.
14752 (linux_set_resume_request, linux_continue_one_thread)
14753 (linux_queue_one_thread, resume_status_pending_p)
14754 (usr_store_inferior_registers, regsets_store_inferior_registers)
14755 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14756 Adjust.
14757 * linux-low.h (get_process): Rename to ...
14758 (get_lwp): ... this. Adjust.
14759 (get_thread_process): Rename to ...
14760 (get_thread_lwp): ... this. Adjust.
14761 (get_process_thread): Rename to ...
14762 (get_lwp_thread): ... this. Adjust.
14763 (struct process_info): Rename to ...
14764 (struct lwp_info): ... this.
14765 (all_processes): Rename to ...
14766 (all_lwps): ... this.
14767 * proc-service.c (ps_lgetregs): Adjust.
14768 * thread-db.c (thread_db_create_event, find_one_thread)
14769 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14770
0b16c5cf
PA
147712009-03-14 Pedro Alves <pedro@codesourcery.com>
14772
14773 * server.c (handle_query): Handle "qAttached".
14774
32de4b9d
NS
147752009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14776
14777 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14778 GPLv3, update license URL.
14779
2aecd87f
DE
147802009-03-01 Doug Evans <dje@google.com>
14781
93efd302 14782 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14783 (server_h): Add gdb_signals.h.
14784 (signals.o): Update.
14785 * server.h (target_signal_from_host,target_signal_to_host_p)
14786 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14787
86b1f9c5
PM
147882009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14789
14790 * remote-utils.c (getpkt): Also generate remote-debug
14791 information if noack_mode is set.
14792
4aa995e1
PA
147932009-02-06 Pedro Alves <pedro@codesourcery.com>
14794
14795 * server.c (handle_query): Report qXfer:siginfo:read and
14796 qXfer:siginfo:write as supported and handle them.
14797 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14798 * linux-low.c (linux_xfer_siginfo): New.
14799 (linux_target_ops): Set it.
14800
62709adf
PA
148012009-01-26 Pedro Alves <pedro@codesourcery.com>
14802
14803 * server.c (gdbserver_usage): Mention --remote-debug.
14804 (main): Accept '--remote-debug' switch.
14805
aef93bd7
DE
148062009-01-18 Doug Evans <dje@google.com>
14807
14808 * regcache.c (new_register_cache): No need to check result of xcalloc.
14809 * server.c (handle_search_memory): Back out calls to xmalloc,
14810 result is checked and error is returned to user upon failure.
14811 (handle_query): Ditto. Add more checks for result of malloc.
14812 (handle_v_cont): Check result of malloc, report error back to
14813 user upon failure.
14814 (handle_v_run): Ditto. Call freeargv.
14815 * server.h (freeargv): Declare.
14816 * utils.c (freeargv): New fn.
14817
54363045
DE
148182009-01-15 Doug Evans <dje@google.com>
14819
f626972c
DE
14820 * gdbreplay.c (perror_with_name): Make arg const char *.
14821 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14822 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14823 * utils.c (perror_with_name): Make arg const char *.
54363045 14824
18aae699
PA
148252009-01-14 Pedro Alves <pedro@codesourcery.com>
14826
14827 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14828 when handling a EXIT_PROCESS_DEBUG_EVENT.
14829
ff703abe
JB
148302009-01-06 Joel Brobecker <brobecker@adacore.com>
14831
14832 * gdbreplay.c (gdbreplay_version): Update copyright year.
14833 * server.c (gdbserver_version): Likewise.
14834
f21cc1a2 148352009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14836
14837 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14838 (handle_extended_wait): Improve comment.
0e21c1ec 14839
bca929d3
DE
148402008-12-13 Doug Evans <dje@google.com>
14841
14842 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14843 * server.h (ATTR_MALLOC): New macro.
14844 (xmalloc,xcalloc,xstrdup): Declare.
14845 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14846 * inferiors.c: Ditto.
14847 * linux-low.c: Ditto.
14848 * mem-break.c: Ditto.
14849 * regcache.c: Ditto.
14850 * remote-utils.c: Ditto.
14851 * server.c: Ditto.
14852 * target.c: Ditto.
14853 * win32-low.c: Ditto.
14854
97438e3f
DE
148552008-12-12 Doug Evans <dje@google.com>
14856
896c7fbb
DE
14857 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14858 in debugging printf.
14859
97438e3f
DE
14860 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14861
e3b886f8
DE
148622008-12-09 Doug Evans <dje@google.com>
14863
14864 * linux-low.h (struct process_info): Delete member tid, unused.
14865 * thread-db.c (find_one_thread): Update.
14866 (maybe_attach_thread): Update.
14867
07e059b5
VP
148682008-12-02 Pedro Alves <pedro@codesourcery.com>
14869
889bf7c5
PA
14870 * target.h (struct target_ops): Add qxfer_osdata member.
14871 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14872 and dirent.h.
14873 (linux_qxfer_osdata): New functions.
14874 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14875 callback.
14876 * server.c (handle_query): Handle "qXfer:osdata:read:".
14877 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14878 (buffer_xml_printf): New functions.
14879 * server.h (struct buffer): New.
14880 (buffer_grow_str, buffer_grow_str0): New macros.
14881 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14882 (buffer_xml_printf): Declare.
07e059b5 14883
4cab47ab
DE
148842008-11-24 Doug Evans <dje@google.com>
14885
14886 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14887
f142445f
DJ
148882008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14889
14890 * server.c (handle_v_run): Always use the supplied argument list.
14891
d0107bb6 148922008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14893
d0107bb6
BW
14894 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14895 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14896
2c4ad781
TJB
148972008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14898
14899 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14900 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14901 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14902 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14903 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14904 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14905 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14906 XML target descriptions.
14907 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14908 when inferior is running on an ISA 2.05 or later processor. Add
14909 special case to return offset for full 64-bit slot of FPSCR when
14910 in 32-bits.
14911
dfb64f85
DJ
149122008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14913
14914 * Makefile.in (SFILES, clean): Added sparc64 files.
14915 (reg-sparc64.o, reg-sparc64.c): New.
14916 * configure.srv (sparc*-*-linux*): New configuration.
14917 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14918 syscall arguments for SPARC.
14919 (regsets_store_inferior_registers): Likewise.
14920 * linux-sparc-low.c: New file.
14921
66b6e1dd
DE
149222008-10-21 Doug Evans <dje@google.com>
14923
14924 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14925 (READLINE_DIR,READLINE_DEP): Delete.
14926 (INTERNAL_CFLAGS): Update.
14927 (LINTFLAGS): Update.
14928
9b710a42
PA
149292008-10-10 Pedro Alves <pedro@codesourcery.com>
14930
14931 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14932 whole argv from the last run, not just argv[0].
14933
5822d809
PA
149342008-09-08 Pedro Alves <pedro@codesourcery.com>
14935
14936 * regcache.c (new_register_cache): Return NULL if the register
14937 cache size isn't known yet.
14938 (free_register_cache): Avoid dereferencing a NULL regcache.
14939
74aac56f
DJ
149402008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * configure.srv: Merge MIPS and MIPS64.
14943
400b20f5
MR
149442008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14945
14946 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14947
677c5bb1
LM
149482008-08-18 Luis Machado <luisgpm@br.ibm.com>
14949
14950 * Makefile.in: Add required vsx dependencies.
14951
14952 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14953 Declare init_registers_powerpc_vsx32l.
14954 Declare init_registers_powerpc_vsx64l.
14955 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14956 (ppc_arch_setup): Check for VSX in hwcap.
14957 (ppc_fill_vsxregset): New function.
14958 (ppc_store_vsxregset): New function.
14959 Add new VSX entry in regset_info target_regsets.
14960
14961 * configure.srv: Add new VSX dependencies.
14962
a6f3e723
SL
149632008-08-12 Pedro Alves <pedro@codesourcery.com>
14964
14965 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14966 (remote_open): Set or clear transport_is_reliable.
14967 (putpkt_binary): Don't expect acks in noack mode.
14968 (getpkt): Don't send ack/nac in noack mode.
14969 * server.c (handle_general_set): Handle QStartNoAckMode.
14970 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14971 qSupported.
14972 (main): Reset noack_mode on every connection.
14973 * server.h (noack_mode): Declare.
14974
a417dc56
RW
149752008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14976
14977 * Makefile.in (GDBREPLAY_OBS): New variable.
14978 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14979
3221518c
UW
149802008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14981 Daniel Jacobowitz <dan@codesourcery.com>
14982
14983 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14984 (usr_store_inferior_registers): Likewise.
14985 (regsets_store_inferior_registers): Likewise.
14986
ec56be1b
PA
149872008-07-31 Rolf Jansen <rj@surtec.com>
14988 Pedro Alves <pedro@codesourcery.com>
14989
14990 * configure.ac: Check for memmem declaration.
14991 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14992 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14993 (disable_packet_qfThreadInfo): Unconditionally compile.
14994 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14995 * configure, config.in: Regenerate.
14996
2fe5e3ff
DE
149972008-07-28 Doug Kwan <dougkwan@google.com>
14998
14999 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15000 (linux_write_memory): Remove declaration of errno.
15001
836acd6d
UW
150022008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15003
15004 * linux-low.c (handle_extended_wait): Do not use "status"
15005 variable uninitialized.
15006
aeba519e
PA
150072008-07-07 Pedro Alves <pedro@codesourcery.com>
15008
15009 * server.c (handle_v_attach): Inhibit reporting dll changes.
15010
db42f210
PA
150112008-06-27 Pedro Alves <pedro@codesourcery.com>
15012
15013 * remote-utils.c (prepare_resume_reply): If requested, don't
15014 output "thread:TID" in the T stop reply.
15015
15016 * server.c (disable_packet_vCont, disable_packet_Tthread)
15017 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15018 (handle_query): If requested, disable support for qC, qfThreadInfo
15019 and qsThreadInfo.
15020 (handle_v_requests): If requested, disable support for vCont.
15021 (gdbserver_show_disableable): New.
15022 (main): Handle --disable-packet and --disable-packet=LIST.
15023
15024 * server.h (disable_packet_vCont, disable_packet_Tthread)
15025 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15026
8e4c5421
CD
150272008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15028
15029 * server.c (gdbserver_usage): Mention --version.
15030
6e23a804
DJ
150312008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15032
15033 * Makefile.in (gdbreplay.o): New rule.
15034
90aa6a40
JM
150352008-06-06 Joseph Myers <joseph@codesourcery.com>
15036
15037 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15038 message, not gdbserver.
15039
c16158bc 150402008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15041 Nathan Sidwell <nathan@codesourcery.com>
15042 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15043
15044 * acinclude.m4: Include ../../config/acx.m4.
15045 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15046 * configure, config.in: Regenerate.
15047 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15048 * server.c (gdbserver_version): Print PKGVERSION.
15049 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15050 (main): Adjust gdbserver_usage calls.
15051 * gdbreplay.c (version, host_name): Add declarations.
15052 (gdbreplay_version, gdbreplay_usage): New.
15053 (main): Accept --version and --help options.
15054
aeb75bf5
DJ
150552008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15056
15057 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15058 (arm_breakpoint_at): Handle Thumb.
15059 (the_low_target): Add comment.
15060
76b233dd
UW
150612008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15062
15063 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15064
08388c79
DE
150652008-05-09 Doug Evans <dje@google.com>
15066
a3c83fae
DE
15067 * server.h (decode_search_memory_packet): Declare.
15068 * remote-utils.c (decode_search_memory_packet): New fn.
15069 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15070 (handle_search_memory): New fn.
15071 (handle_query): Process qSearch:memory packets.
15072
bb9c3d36
UW
150732008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15074
15075 * regcache.c (registers_length): Remove.
15076 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15077 full register packet.
15078 * regcache.h (registers_length): Remove prototype.
15079 * server.h (PBUFSIZ): Define to 16384.
15080
7284e1be
UW
150812008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15082
15083 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15084 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15085 powerpc-64l.o, and powerpc-altivec64l.o.
15086 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15087 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15088 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15089 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15090 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15091 to srv_xmlfiles.
15092
15093 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15094 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15095 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15096 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15097 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15098 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15099 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15100 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15101 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15102 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15103 (clean): Update.
15104
15105 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15106 (init_registers_powerpc_32l): ... this new prototype.
15107 (init_registers_powerpc_32): Remove, replace by ...
15108 (init_registers_powerpc_altivec32l): ... this new prototype.
15109 (init_registers_powerpc_e500): Remove, replace by ...
15110 (init_registers_powerpc_e500l): ... this new prototype.
15111 (init_registers_ppc64): Remove, replace by ...
15112 (init_registers_powerpc_64l): ... this new prototype.
15113 (init_registers_powerpc_64): Remove, replace by ...
15114 (init_registers_powerpc_altivec64l): ... this new prototype.
15115 (ppc_num_regs): Set to 73.
15116 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15117 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15118 (ppc_cannot_store_register): Handle orig_r3 and trap.
15119 (ppc_arch_setup): Update init_registers_... calls.
15120 (ppc_fill_gregset): Handle orig_r3 and trap.
15121
15122 * inferiors.c (clear_inferiors): Reset current_inferior.
15123
fdc59709
PB
151242008-04-23 Paolo Bonzini <bonzini@gnu.org>
15125
889bf7c5
PA
15126 * acinclude.m4: Add override.m4.
15127 * configure: Regenerate.
fdc59709 15128
c9b2f845
UW
151292008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15130
15131 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15132 initial call to init_register_ppc64.
15133
550512b8
UW
151342008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15135
43aaf8b6
PA
15136 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15137 single powerpc*-*-linux* case.
550512b8
UW
15138 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15139
b6430ec3
UW
151402008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15141
15142 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15143 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15144 from reg_xmlfiles.
15145 * linux-ppc-low.c: Include <elf.h>.
15146 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15147 (ppc_hwcap): New global variable.
15148 (ppc_regmap): Remove __SPE__ #ifdef sections.
15149 (ppc_regmap_e500): New global variable.
15150 (ppc_cannot_store_register): Update __SPE__ special case.
15151 (ppc_get_hwcap): New function.
15152 (ppc_arch_setup): Use it to determine whether inferior supports
15153 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15154 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15155 Do not access registers if target does not support AltiVec.
15156 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15157 Do not access registers if target does not support SPE.
15158 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15159
52fa2412
UW
151602008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15161
15162 * linux-low.c (disabled_regsets, num_regsets): New.
15163 (use_regsets_p): Delete.
15164 (linux_wait_for_process): Clear disabled_regsets.
15165 (regsets_fetch_inferior_registers): Check and set it.
15166 (regsets_store_inferior_registers): Likewise.
15167 (linux_fetch_registers, linux_store_registers): Do not use
15168 use_regsets_p.
15169 (initialize_low): Allocate disabled_regsets.
15170
e28b3332
DJ
151712008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15172
15173 * Makefile.in (LIBOBJS): New.
15174 (OBS): Use LIBOBJS.
15175 (memmem.o): New rule.
15176 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15177 * configure: Regenerated.
15178
4536995d
UW
151792008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15180
15181 * server.c (handle_query): Never return "unsupported" for
15182 qXfer:features:read queries.
15183
221c031f
UW
151842008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15185
15186 * server.c (get_features_xml): Fix inverted condition.
15187 (handle_query): Always support qXfer:feature:read.
15188
ccd213ac
DJ
151892008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15190
15191 * server.c (wrapper_argv): New.
15192 (start_inferior): Handle wrapper_argv. If set, expect an extra
15193 trap.
15194 (gdbserver_usage): Document --wrapper.
15195 (main): Parse --wrapper.
15196
6fe305f7
UW
151972008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15198
15199 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15200 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15201 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15202 (ppc_set_pc): Likewise.
15203 (ppc_arch_setup): New function.
15204 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15205 of collect_register.
889bf7c5 15206 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15207
5b0a002e
UW
152082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15209
15210 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15211 instead of linux-ppc64-low.o.
15212 * linux-ppc64-low.c: Remove file.
15213 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15214 (linux-ppc64-low.o): Remove rule.
15215
15216 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15217 (init_registers_powerpc_64): Likewise.
15218 (ppc_regmap): Conditionally define depending on __powerpc64__.
15219 (ppc_cannot_store_register): Do not special-case "fpscr" when
15220 compiled on __powerpc64__.
15221 (ppc_collect_ptrace_register): New function.
15222 (ppc_supply_ptrace_register): New function.
15223 (ppc_breakpoint): Change type to "unsigned int".
15224 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15225 (the_low_target): Conditionally provide initializers for the
889bf7c5 15226 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15227 collect_ptrace_register and supply_ptrace_register members.
15228
9b4b61c8
UW
152292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15230
15231 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15232 * server.c (gdbserver_xmltarget): Define.
15233 (get_features_xml): Use it to replace "target.xml" and arch_string.
15234
15235 * configure.srv: Remove srv_xmltarget. Add XML files that were
15236 mentioned there to srv_xmlfiles instead. Remove conditional tests
15237 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15238 srv_xmlfiles and srv_regobj to include all possible choices.
15239 * configure.ac (srv_xmltarget): Remove.
15240 (srv_xmlfiles): Do not add "target.xml".
15241 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15242 checks for supplementary target information.
15243 * configure: Regenerate.
15244 * Makefile.in (XML_TARGET): Remove.
15245 (target.xml): Remove rule.
15246 (clean): Do not clean up target.xml.
15247 (.PRECIOUS): Do not mention target.xml.
15248
15249 * target.h (struct target_ops): Remove arch_string member.
15250 * linux-low.c (linux_arch_string): Remove.
15251 (linux_target_ops): Remove arch_string initializer.
15252 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15253 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15254 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15255 * spu-low.c (spu_arch_string): Remove.
15256 (spu_target_ops): Remove arch_string initializer.
15257 * win32-low.c (win32_arch_string): Remove.
15258 (win32_target_ops): Remove arch_string initializer.
15259 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15260 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15261 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15262
ee1a7ae4
UW
152632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15264
15265 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15266 by collect_ptrace_register and supply_ptrace_register hooks.
15267 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15268 instead of checking for the_low_target.left_pad_xfer.
15269 (usr_store_inferior_registers): Use collect_ptrace_register callback
15270 instead of checking for the_low_target.left_pad_xfer.
15271
15272 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15273 (s390_supply_ptrace_register): Likewise.
15274 (s390_fill_gregset): Call s390_collect_ptrace_register.
15275 (the_low_target): Update.
15276
15277 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15278 (ppc_supply_ptrace_register): Likewise.
15279 (the_low_target): Update.
15280
15281 * linux-i386-low.c (the_low_target): Update.
15282 * linux-x86-64-low.c (the_low_target): Update.
15283
d61ddec4
UW
152842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15285
15286 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15287 reg-s390.o and reg-s390x.o.
15288
15289 * linux-low.c (new_inferior): New global variable.
15290 (linux_create_inferior, linux_attach): Set it.
15291 (linux_wait_for_process): Call the_low_target.arch_setup after the
15292 target has stopped for the first time.
15293 (initialize_low): Do not call the_low_target.arch_setup.
15294
15295 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15296 (s390_set_pc): Likewise.
15297 (s390_arch_setup): New function.
15298 (the_low_target): Use s390_arch_setup as arch_setup routine.
15299
15300 * regcache.c (realloc_register_cache): New function.
15301 (set_register_cache): Call it for each existing regcache.
15302
d05b4ac3
UW
153032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15304
15305 * server.h (init_registers): Remove prototype.
15306
15307 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15308 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15309 instead of init_registers ().
15310 * linux-arm-low.c (init_registers_arm): Add prototype.
15311 (init_registers_arm_with_iwmmxt): Likewise.
15312 (the_low_target): Add initializer for arch_setup field.
15313 * linux-cris-low.c (init_registers_cris): Add prototype.
15314 (the_low_target): Add initializer for arch_setup field.
15315 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15316 (the_low_target): Add initializer for arch_setup field.
15317 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15318 (the_low_target): Add initializer for arch_setup field.
15319 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15320 (the_low_target): Add initializer for arch_setup field.
15321 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15322 (the_low_target): Add initializer for arch_setup field.
15323 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15324 (the_low_target): Add initializer for arch_setup field.
15325 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15326 (init_registers_mips64_linux): Likewise.
15327 (the_low_target): Add initializer for arch_setup field.
15328 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15329 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15330 (the_low_target): Add initializer for arch_setup field.
15331 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15332 (init_registers_powerpc_64): Likewise.
15333 (the_low_target): Add initializer for arch_setup field.
15334 * linux-s390-low.c (init_registers_s390): Add prototype.
15335 (init_registers_s390x): Likewise.
15336 (the_low_target): Add initializer for arch_setup field.
15337 * linux-sh-low.c (init_registers_sh): Add prototype.
15338 (the_low_target): Add initializer for arch_setup field.
15339 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15340 (the_low_target): Add initializer for arch_setup field.
15341 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15342 (the_low_target): Add initializer for arch_setup field.
15343
15344 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15345 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15346 instead of init_registers ().
15347 * win32-arm-low.c (init_registers_arm): Add prototype.
15348 (the_low_target): Add initializer for arch_setup field.
15349 * win32-i386-low.c (init_registers_i386): Add prototype.
15350 (the_low_target): Add initializer for arch_setup field.
15351
15352 * spu-low.c (init_registers_spu): Add prototype.
15353 (initialize_low): Call initialie_registers_spu () instead of
15354 initialize_registers ().
15355
fd96d250
PA
153562008-02-19 Pedro Alves <pedro@codesourcery.com>
15357
15358 * server.c (handle_v_requests): When handling the vRun and vAttach
15359 packets, if already debugging a process, don't kill it. Return an
15360 error instead.
15361
d41b6bb4
DJ
153622008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * server.c (handle_query): Correct length check.
15365
5ac588cf
PA
153662008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15367
15368 * win32-low.c (do_initial_child_stuff): Add process handle
15369 parameter. Set current_process_handle and current_process_id from the
15370 parameters. Clear globals.
15371 (win32_create_inferior): Don't set current_process_handle and
15372 current_process_id here. Instead pass them on the call to
15373 do_initial_child_stuff.
15374 (win32_attach): Likewise.
15375 (win32_clear_inferiors): New.
15376 (win32_kill): Don't close the current process handle or the
15377 current thread handle here. Instead call win32_clear_inferiors.
15378 (win32_detach): Don't open a new handle to the process. Call
15379 win32_clear_inferiors.
15380 (win32_join): Don't rely on current_process_handle; open a new
15381 handle using the process id.
15382 (win32_wait): Call win32_clear_inferiors when the inferior process
15383 has exited.
15384
ecd7ecbc
DJ
153852008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15386
15387 * server.c (monitor_show_help): Add "exit".
15388
1525d545
MG
153892008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15390
ecd7ecbc 15391 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15392 (clean): Add reg-xtensa.c.
15393 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15394 * configure.srv (xtensa*-*-linux*) New target.
15395 * linux-xtensa-low.c: New.
15396 * xtensa-xtregs.c: New.
1525d545 15397
59a016f0
PA
153982008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15399
15400 * hostio.c: Don't include errno.h.
15401 (errno_to_fileio_errno): Move to hostio-errno.
15402 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15403 error number outputting to the target->hostio_last_error callback.
15404 (hostio_packet_error): Use FILEIO_EINVAL directly.
15405 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15406 calls to hostio_error.
15407 * hostio-errno.c: New.
15408 * server.h (hostio_last_error_from_errno): Declare.
15409 * target.h (target_ops): Add hostio_last_error member.
15410 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15411 as hostio_last_error handler.
889bf7c5 15412 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15413 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15414 (wince_hostio_last_error): New functions.
15415 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15416 as hostio_last_error handler.
15417 (win32_target_ops) [!_WIN32_WCE]: Register
15418 hostio_last_error_from_errno as hostio_last_error handler.
15419 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15420 (hostio-errno.o): New rule.
15421 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15422 * configure.srv (srv_hostio_err_objs): New variable. Default to
15423 hostio-errno.o.
15424 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15425 * configure: Regenerate.
15426
2d717e4f
DJ
154272008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15430 (linux_kill, linux_detach): Clean up the process list.
15431 * remote-utils.c (remote_open): Improve port number parsing.
15432 (putpkt_binary, input_interrupt): Only send interrupts if the target
15433 is running.
15434 * server.c (extended_protocol): Make static.
15435 (attached): Define earlier.
15436 (exit_requested, response_needed, program_argv): New variables.
15437 (target_running): New.
15438 (start_inferior): Clear attached here.
15439 (attach_inferior): Set attached here.
15440 (require_running): Define.
15441 (handle_query): Use require_running and target_running. Implement
15442 "monitor exit".
15443 (handle_v_attach, handle_v_run): New.
15444 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15445 (gdbserver_usage): Update.
15446 (main): Redo argument parsing. Handle --debug and --multi. Handle
15447 --attach along with other options or after the port. Save
15448 program_argv. Support no initial program. Resynchronize
15449 communication with GDB after an error. Handle "monitor exit".
15450 Use require_running and target_running. Always allow the extended
15451 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15452 restart in extended mode.
15453 * README: Refer to the GDB manual. Update --attach usage.
15454
7407e2de
AS
154552007-12-20 Andreas Schwab <schwab@suse.de>
15456
15457 * linux-low.c (STACK_SIZE): Define.
15458 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15459 (linux_test_for_tracefork): Likewise.
15460
b65d95c5
DJ
154612007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15462
15463 * linux-low.c (linux_wait_for_event): Update messages. Do not
15464 reinsert auto-delete breakpoints.
15465 * mem-break.c (struct breakpoint): Change return type of handler to
15466 int.
15467 (set_breakpoint_at): Update handler type.
15468 (reinsert_breakpoint_handler): Return 1 instead of calling
15469 delete_breakpoint.
15470 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15471 setting a new one.
15472 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15473 * mem-break.h (set_breakpoint_at): Update handler type.
15474 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15475 * win32-low.c (auto_delete_breakpoint): New.
15476 (get_child_debug_event): Use it.
15477
4e799345
DJ
154782007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15479
15480 * configure.ac: Check for pread and pwrite.
15481 * hostio.c (handle_pread): Fall back to lseek and read.
15482 (handle_pwrite): Fall back to lseek and write.
15483 * config.in, configure: Regenerated.
15484
27524b67
DJ
154852007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15486
15487 * server.c (myresume): Add own_buf argument.
15488 (main): Update calls.
15489
a20d5e98
DJ
154902007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15491
15492 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15493 * remote-utils.c (remote_open): Do not call disable_async_io.
15494 (block_async_io): Delete.
15495 (unblock_async_io): Make static.
15496 (initialize_async_io): New.
15497 * server.c (handle_v_cont): Handle async I/O here.
15498 (myresume): Likewise. Move other common resume tasks here...
15499 (main): ... from here. Call initialize_async_io. Disable async
15500 I/O before the main loop.
15501 * server.h (initialize_async_io): Declare.
15502 (block_async_io, unblock_async_io): Delete prototypes.
15503 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15504
b79d787e
DJ
155052007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15506
15507 * remote-utils.c (readchar): Allow binary data in received messages.
15508
d97903b2
PA
155092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15510
15511 * win32-low.c (attaching): New global.
15512 (win32_create_inferior): Clear the `attaching' global.
15513 (win32_attach): Set the `attaching' global.
15514 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15515 attaching. Only set a breakpoint at the entry point if not
15516 attaching.
15517
311de423
PA
155182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15519
15520 * server.c (main): Don't report dll events on the initial
15521 connection on attaches.
15522
6c2d16d2
PA
155232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15524
15525 * server.c (main): Relax numerical bases supported for the pid of
15526 the --attach command line argument.
15527
5ca906e6
PA
155282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15529
15530 * win32-low.c (win32_attach): Call OpenProcess before
15531 DebugActiveProcess, not after. Add last error output to error
15532 call.
15533
9c6c8194
PA
155342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15535
15536 * win32-low.c (win32_get_thread_context)
15537 (win32_set_thread_context): New functions.
15538 (thread_rec): Use win32_get_thread_context.
15539 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15540 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15541 field.
15542
4d5d1aaa
PA
155432007-12-03 Leo Zayas
15544 Pedro Alves <pedro_alves@portugalmail.pt>
15545
15546 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15547 global variables.
15548 (child_add_thread): Minor cleanup.
15549 (child_continue): Resume artificially suspended threads before
15550 calling ContinueDebugEvent.
15551 (suspend_one_thread): New.
15552 (fake_breakpoint_event): New.
15553 (get_child_debug_event): Change return type to int. Check here if
15554 gdb sent an interrupt request. If a soft interrupt was requested,
15555 fake a breakpoint event. Return 0 if there is no event to handle,
15556 and 1 otherwise.
15557 (win32_wait): Don't check here if gdb sent an interrupt request.
15558 Ensure there is a valid event to handle.
15559 (win32_request_interrupt): Add soft interruption method as last
15560 resort.
15561
c436e841
PA
155622007-12-03 Leo Zayas
15563 Pedro Alves <pedro_alves@portugalmail.pt>
15564
15565 * win32-low.h (win32_thread_info): Add descriptions to the
15566 structure members. Replace `suspend_count' counter by a
15567 `suspended' flag.
15568 * win32-low.c (thread_rec): Update condition of when to get the
15569 context from the inferior. Rely on ContextFlags being set if it
15570 has already been retrieved. Only suspend the inferior thread if
15571 we haven't already. Warn if that fails.
15572 (continue_one_thread): s/suspend_count/suspended/. Only call
15573 ResumeThread once. Warn if that fails.
15574
e7b5fa67
PA
155752007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15576
15577 * win32-low.c (win32_wait): Don't read from the inferior when it
15578 has already exited.
15579
a385171d
PA
155802007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15581
15582 * Makefile.in (win32_low_h): New variable.
15583 (win32-low.o): Add dependency on $(win32_low_h).
15584 (win32-arm-low.o, win32-i386-low.o): New rules.
15585
f80c84b3
DJ
155862007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15587
15588 * hostio.c: Correct copyright year.
15589
a6b151f1
DJ
155902007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15591
15592 * Makefile.in (OBS): Add hostio.o.
15593 (hostio.o): New rule.
15594 * server.h (handle_vFile): Declare.
15595 * hostio.c: New file.
15596 * server.c (handle_v_requests): Take packet_len and new_packet_len
15597 for binary packets. Call handle_vFile.
15598 (main): Update call to handle_v_requests.
15599
f9387fc3
DJ
156002007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15601
15602 * linux-low.c: Include <sched.h>.
15603
51c2684e
DJ
156042007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15605
15606 * linux-low.c (linux_tracefork_grandchild): New.
15607 (linux_tracefork_child): Use clone.
15608 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15609
75f83163
JB
156102007-10-31 Joel Brobecker <brobecker@adacore.com>
15611
15612 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15613
da5898ce
DJ
156142007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15615
15616 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15617
24a09b5f
DJ
156182007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15619
15620 * inferiors.c (change_inferior_id): Delete.
15621 (add_pid_to_list, pull_pid_from_list): New.
15622 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15623 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15624 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15625 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15626 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15627 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15628 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15629 (using_threads): Always set to 1.
15630 (handle_extended_wait): New.
15631 (add_process): Do not set TID.
15632 (linux_create_inferior): Set must_set_ptrace_flags.
15633 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15634 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15635 (linux_thread_alive): Rename TID argument to LWPID.
15636 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15637 (linux_wait_for_event): Do not use TID or check using_threads. Update
15638 call to dead_thread_notify. Call handle_extended_wait.
15639 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15640 (send_sigstop): Delete sigstop_sent.
15641 (wait_for_sigstop): Avoid TID.
15642 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15643 (linux_test_for_tracefork): New.
15644 (linux_lookup_signals): Use thread_db_active and
15645 linux_supports_tracefork_flag.
15646 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15647 * linux-low.h (get_process_thread): Avoid TID.
15648 (struct process_ifo): Move thread_known and tid to the end. Remove
15649 sigstop_sent.
15650 (linux_attach_lwp, thread_db_init): Update prototypes.
15651 * server.h (change_inferior_id): Delete prototype.
15652 (add_pid_to_list, pull_pid_from_list): New prototypes.
15653 * thread-db.c (thread_db_use_events): New.
15654 (find_first_thread): Rename to...
15655 (find_one_thread): ...this. Update callers and messages. Do not
15656 call fatal. Check thread_db_use_events. Do not call
15657 change_inferior_id or new_thread_notify.
15658 (maybe_attach_thread): Update. Do not call new_thread_notify.
15659 (thread_db_init): Set thread_db_use_events. Check use_events.
15660 * utils.c (fatal, warning): Correct message prefix.
15661
30ed0a8f
DJ
156622007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15663
15664 * Makefile.in (clean): Remove new files.
15665 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15666 (powerpc-64.o, powerpc-64.c): New rules.
15667 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15668 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15669 with SPE.
15670 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15671 SPE targets.
15672 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15673 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15674 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15675 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15676 (target_regsets): Add AltiVec and SPE register sets.
15677 * configure.ac: Check for AltiVec and SPE.
15678 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15679 (ppc_fill_vrregset, ppc_store_vrregset): New.
15680 (target_regsets): Add AltiVec register set.
15681 * configure: Regenerated.
15682
fd462a61
DJ
156832007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * linux-low.c (O_LARGEFILE): Define.
15686 (linux_read_memory): Use /proc/PID/mem.
15687 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15688 * configure, config.in: Regenerated.
15689
69f223ed
DJ
156902007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * linux-low.c (linux_wait_for_event): Do not pass signals while
15693 single-stepping.
15694
aec18585
PA
156952007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15696
15697 * win32-low.c (create_process): New.
15698 (win32_create_inferior): Use create_process instead of
15699 CreateProcess. If create_process failed retry appending an ".exe"
15700 suffix. Store the GetLastError result immediatelly after
15701 create_process calls and use it on the call to error.
15702
34d86ddd
PA
157032007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15704
15705 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15706
5a0e3bd0
JB
157072007-08-23 Joel Brobecker <brobecker@adacore.com>
15708
15709 * configure.ac: Switch license to GPLv3.
15710
f88c79e6
MS
157112007-08-01 Michael Snyder <msnyder@access-company.com>
15712
15713 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15714
6b3d9b83
PA
157152007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15716
15717 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15718 typedef.
15719 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15720 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15721 CloseToolhelp32Snapshot.
15722 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15723 CloseToolhelp32Snapshot.
15724
c588c53c
MS
157252007-07-27 Michael Snyder <michael.snyder@access-company.com>
15726
15727 * server.c (main): Check for inferior exit before main loop.
15728
aa0403d9
PA
157292007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15730
15731 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15732 instead of on tmp_desc.
15733
255e7678
DJ
157342007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15735 Daniel Jacobowitz <dan@codesourcery.com>
15736
15737 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15738 (add_thread): Minor cleanups.
15739 (clear_inferiors): Move lower in the file. Clear the DLL
15740 list.
15741 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15742 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15743 (xml_escape_text): New.
15744 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15745 for qSupported.
15746 (handle_v_cont): Report errors.
15747 (gdbserver_version): Update.
15748 (main): Correct size of own_buf. Do not report initial DLL events.
15749 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15750 (unloaded_dll, xml_escape_text): New.
15751 * win32-low.c (enum target_waitkind): Update comments.
15752 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15753 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15754 (win32_EnumProcessModules, win32_GetModuleInformation)
15755 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15756 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15757 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15758 (win32_Module32First, win32_Module32Next, load_toolhelp)
15759 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15760 (get_child_debug_event): Handle DLL events.
15761 (win32_wait): Likewise.
15762
0d37add9
DJ
157632007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15764
15765 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15766 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15767
45e2715e
PA
157682007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15769
15770 * win32-low.c (handle_output_debug_string): Ignore event if not
15771 waiting.
15772
c5674cf1
PA
157732007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15774
15775 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15776
2bbe3cc1
DJ
157772007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15778
15779 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15780
ae13219e
DJ
157812007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15782
15783 * inferiors.c (change_inferior_id): Add comment.
15784 * linux-low.c (check_removed_breakpoint): Add an early
15785 prototype. Improve debug output.
15786 (linux_attach): Doc update.
15787 (linux_detach_one_process, linux_detach): Clean up before releasing
15788 each process.
15789 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15790 * linux-low.h (struct process_info): Doc improvement.
15791 * mem-break.c (delete_all_breakpoints): New.
15792 * mem-break.h (delete_all_breakpoints): New prototype.
15793 * thread-db.c (find_first_thread): New.
15794 (thread_db_create_event): Call it instead of
15795 thread_db_find_new_threads. Clean up unused variables.
15796 (maybe_attach_thread): Remove first thread handling.
15797 (thread_db_find_new_threads): Use find_first_thread.
15798 (thread_db_get_tls_address): Likewise.
15799
4105de34
DJ
158002007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15801
15802 * thread-db.c (thread_db_find_new_threads): Add prototype.
15803 (thread_db_create_event): Check for the main thread before adding
15804 a new thread.
15805 (maybe_attach_thread): Only enable event reporting if TID == 0.
15806 (thread_db_get_tls_address): Check for new threads.
15807
2b876972
DJ
158082007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * linux-low.c (linux_create_inferior): Try execv before execvp.
15811 * spu-low.c (spu_create_inferior): Likewise.
15812
7a245884
DJ
158132007-06-13 Mike Frysinger <vapier@gentoo.org>
15814
15815 * linux-low.c (linux_create_inferior): Change execv to execvp.
15816 * spu-low.c (spu_create_inferior): Likewies.
15817
117ce543
DJ
158182007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * Makefile.in (clean): Clean new files instead of deleted ones.
15821 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15822 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15823 rules.
15824 * configure.srv: Specify XML files and new regformats for MIPS and
15825 MIPS64 GNU/Linux.
15826 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15827 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15828 an entry for the restart register.
15829 (mips_cannot_fetch_register, mips_cannot_store_register)
15830 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15831 register names to match the XML descriptions.
15832 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15833 restart register instead of $0.
15834
0e7f50da
UW
158352007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15836 Markus Deuling <deuling@de.ibm.com>
15837
15838 * remote-utils.c (decode_xfer_write): New function.
15839 * server.h (decode_xfer_write): Add prototype.
15840 * server.c (handle_query): Add PACKET_LEN argument. Support
15841 qXfer:spu:read and qXfer:spu:write packets.
15842 (main): Pass packet_len to handle_query.
15843 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15844 * target.h (target_ops): Add qxfer_spu.
15845
374c1d38
UW
158462007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15847
15848 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15849 accessing non-seekable spufs files.
15850
bb63802a
UW
158512007-05-16 Markus Deuling <deuling@de.ibm.com>
15852
889bf7c5 15853 * server.c (handle_query): Add reply for qC packet.
bb63802a 15854
7390519e
PA
158552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15856 Leo Zayas <lerele@champenstudios@com>
15857
15858 * server.h (check_remote_input_interrupt_request): New function.
15859 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15860 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15861 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15862 (check_remote_input_interrupt_request): New function.
15863 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15864 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15865 winapi_GenerateConsoleCtrlEvent): New typedefs.
15866 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15867 to 250 ms.
15868 (win32_wait): Check for remote interrupt request
15869 with check_remote_input_interrupt_request.
15870 (win32_request_interrupt): New function.
15871 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15872
34b34921
PA
158732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15874
15875 * win32-low.c (debug_registers_changed,
15876 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15877 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15878 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15879 (thread_rec): Get context using the low target.
15880 (child_add_thread): Call thread_added on the low target,
15881 which does the same thing.
15882 (regptr): Delete.
15883 (do_initial_child_stuff): Remove debug registers references.
15884 Set context using the low target. Resume threads after
15885 setting the contexts.
15886 (child_continue): Remove dead variable. Remove debug
15887 registers references.
15888 (child_fetch_inferior_registers): Go through the low target.
15889 (do_child_store_inferior_registers): Remove.
15890 (child_store_inferior_registers): Go through the low target.
15891 (win32_resume): Remove debug registers references.
15892 Set context using the low target.
15893 (handle_exception): Change return type to void. Don't record
15894 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15895 first chance exception.
889bf7c5 15896 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15897 goto loop. Always return after waiting for debug event.
15898 (win32_wait): Convert to switch statement. Handle spurious
15899 events.
15900
15901 * win32-i386-low.c (debug_registers_changed,
15902 debug_registers_used): New.
15903 (initial_stuff): Rename to ...
15904 (i386_initial_stuff): ... this. Clear debug registers
15905 state variables.
15906 (store_debug_registers): Delete.
15907 (i386_get_thread_context): New.
15908 (load_debug_registers): Delete.
15909 (i386_set_thread_context): New.
15910 (i386_thread_added): New.
15911 (single_step): Rename to ...
15912 (i386_single_step): ... this.
15913 (do_fetch_inferior_registers): Rename to ...
15914 (i386_fetch_inferior_register): ... this.
15915 (i386_store_inferior_register): New.
15916 (the_low_target): Adapt to new interface.
15917
15918 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15919 (arm_get_thread_context): New.
15920 (arm_set_thread_context): New.
15921 (regptr): New.
15922 (do_fetch_inferior_registers): Rename to ...
15923 (arm_fetch_inferior_register): ... this.
15924 (arm_store_inferior_register): New.
15925 (arm_wince_breakpoint): Reimplement as unsigned long.
15926 (arm_wince_breakpoint_len): Define.
15927 (the_low_target): Adapt to new interface.
15928
15929 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15930 load_debug_registers. Add get_thread_context, set_thread_context,
15931 thread_added and store_inferior_register. Rename
15932 fetch_inferior_registers to fetch_inferior_register.
15933 (regptr): Remove declaration.
15934
dd6953e1
PA
159352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15936
15937 * linux-low.c (linux_detach): Change return type to int. Return 0.
15938 * spu-low.c (spu_detach): Likewise.
15939
444d6139
PA
159402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15941
15942 * target.h (target_ops): Change return type of detach to int.
15943 Add join.
15944 (join_inferior): New.
15945 * server.c (main): Don't skip detach support on mingw32.
15946 If the inferior doesn't support detaching return error.
15947 Call join_inferior instead of using waitpid.
15948 * linux-low.c (linux_join): New.
15949 (linux_target_op): Add linux_join.
15950 * spu-low.c (spu_join): New.
15951 (spu_target_ops): Add spu_join.
15952 * win32-low.c (win32_detach): Adapt to new interface.
15953 Reopen current_process_handle before detaching. Issue a child
15954 resume before detaching.
15955 (win32_join): New.
15956 (win32_target_op): Add win32_join.
15957
1d5315fe
PA
159582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15959
15960 * win32-low.c (win32-attach): Fix return value.
15961 * target.h (target_ops): Describe ATTACH return values.
15962
bf914831
PA
159632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15964
15965 * win32-low.c (GETPROCADDRESS): Define.
15966 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15967 (winapi_DebugSetProcessKillOnExit): Likewise.
15968 (win32_create_inferior): Force usage of ansi CreateProcessA.
15969 (win32_attach): Use GETPROCADDRESS.
15970 (win32_detach): Likewise.
15971
f72f3e60
PA
159722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15973
15974 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15975
ed50f18f
PA
159762007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15977
15978 * win32-low.c: Commit leftover changes from 2007-03-29.
15979
0c2ead7e
DJ
159802007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15981
15982 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15983 fields short instead of int. Add explicit padding.
15984 (i387_cache_to_fsave): Remove unnecessary casts.
15985 (i387_fsave_to_cache): Doc fix.
15986 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15987
73725ff3
DJ
159882007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15989
15990 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15991 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15992
d99f33d8
PA
159932007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15994
15995 * configure.srv (arm*-*-mingw32ce*): Move near the other
15996 arm targets.
15997
68070c10
PA
159982007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15999
2482afc6 16000 * configure.ac: Add errno checking.
68070c10
PA
16001 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16002 sys/file.h and malloc.h.
16003 (AC_CHECK_DECLS): Add perror.
16004 (srv_mingwce): Handle.
2482afc6 16005 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16006 win32-i386-low.o to srv_tgtobj.
16007 (i[34567]86-*-mingw*): Likewise.
16008 (arm*-*-mingw32ce*): Add case.
16009 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16010 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16011 [__MINGW32CE__] (strerror): New function.
16012 [__MINGW32CE__] (errno): Define to GetLastError.
16013 [__MINGW32CE__] (COUNTOF): New macro.
16014 (remote_open): Remove extra close call.
16015 * mem-break.c (delete_breakpoint_at): New function.
16016 * mem-break.h (delete_breakpoint_at): Declare.
16017 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16018 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16019 [USE_WIN32API] (read, write): Add char* casts.
16020 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16021 * server.h: Include wincecompat.h on Windows CE.
16022 [HAVE_ERRNO_H]: Check.
16023 (perror): Declare if not declared.
16024 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16025 (perror_with_name): Remove errno declaration.
16026 * wincecompat.h: New.
16027 * wincecompat.c: New.
16028 * win32-low.h: New.
16029 * win32-arm-low.c: New.
16030 * win32-i386-low.c: New.
16031 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16032 (OUTMSG2): Make it safe.
16033 (_T): New macro.
16034 (COUNTOF): New macro.
16035 (NUM_REGS): Get it from the low target.
16036 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16037 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16038 (thread_rec): Let low target handle debug registers.
16039 (child_add_thread): Likewise.
16040 (child_init_thread_list): Likewise.
16041 (continue_one_thread): Likewise.
16042 (regptr): New.
16043 (do_child_fetch_inferior_registers): Move to ...
16044 * win32-i386-low.c: ... here, and rename to ...
16045 (do_fetch_inferior_registers): ... this.
889bf7c5 16046 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16047 Go through the low target.
16048 (do_child_store_inferior_registers): Use regptr.
16049 (strwinerror): New function.
16050 (win32_create_inferior): Handle Windows CE.
16051 Use strwinerror instead of strerror on Windows error
16052 codes. Add program to the error output.
16053 Don't close the main thread handle on Windows CE.
16054 (win32_attach): Use coredll.dll on Windows CE.
16055 (win32_kill): Close current process and current
16056 thread handles.
16057 (win32_detach): Use coredll.dll on Windows CE.
16058 (win32_resume): Let low target handle debug registers, and
16059 step request.
16060 (handle_exception): Add/Remove initial breakpoint. Avoid
16061 non-existant WSTOPSIG on Windows CE.
16062 (win32_read_inferior_memory): Cast to remove warning.
16063 (win32_arch_string): Go through the low target.
16064 (initialize_low): Call set_breakpoint_data with the low
16065 target's breakpoint.
16066 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16067 FOP_REGNUM, mappings): Move to ...
16068 * win32-i386-low.c: ... here.
16069 * win32-low.c (win32_thread_info): Move to ...
16070 * win32-low.h: ... here.
16071 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16072 win32-arm-low.c and wincecompat.c.
16073 (all:): Add $EXEEXT.
16074 (install-only:): Likewise.
16075 (gdbserver:): Likewise.
16076 (gdbreplay:): Likewise.
16077 * config.in: Regenerate.
16078 * configure: Regenerate.
16079
41093d81
PA
160802007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16081
16082 * win32-low.c: Rename typedef thread_info to
16083 win32_thread_info throughout.
16084
544afa54
PA
160852007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16086
16087 * win32-i386-low.c: Rename to ...
16088 * win32-low.c: ... this.
16089 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16090 * Makefile.in: Likewise.
16091
bce7165d
PA
160922007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16093
16094 * remote-utils.c (monitor_output): Constify msg parameter.
16095 * server.h (monitor_output): Likewise.
16096 * win32-i386-low.c (handle_output_debug_string): New.
16097 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16098 handle_output_debug_string.
16099 (get_child_debug_event): Likewise.
16100
506c7aa0
DJ
161012007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16102
16103 * server.c (main): Correct strtoul check.
16104
42c81e2a
DJ
161052007-03-27 Jon Ringle <jon@ringle.org>
16106
16107 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16108
9453113a
DJ
161092007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16110
16111 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16112
64a69107
DJ
161132007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16114
16115 * terminal.h: Check HAVE_SGTTY_H.
16116
161172007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16118
16119 * remote-utils.c (remote_open): Print out the assigned port number.
16120
c74d0ad8
DJ
161212007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16122
16123 * remote-utils.c (monitor_output): New function.
16124 * server.c (debug_threads): Define here.
16125 (monitor_show_help): New function.
16126 (handle_query): Handle qRcmd.
16127 (main): Do not handle 'd' packet.
16128 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16129 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16130 of debug_threads.
16131
de7c3b4a
PA
161322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16133
16134 * Makefile.in (EXEEXT): New.
16135 (clean): Use $(EXEEXT).
16136
ef57601b
PA
161372007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16138
16139 * target.h (target_ops): Rename send_signal to request_interrupt,
16140 and remove enum target_signal parameter.
16141 * linux-low.c (linux_request_interrupt): Rename from
16142 linux_send_signal, and always send SIGINT.
16143 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16144 and always send SIGINT.
16145 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16146 of send_signal.
16147 (input_interrupt): Likewise.
16148
820f2bda
PA
161492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16150
16151 * server.c (get_features_xml): Check if target implemented
16152 arch_string.
16153 * win32-i386-low.c (win32_arch_string): New.
16154 (win32_target_ops): Add win32_arch_string as arch_string member.
16155
ab39bf24
UW
161562007-02-22 Markus Deuling <deuling@de.ibm.com>
16157
16158 * spu-low.c (spu_arch_string): New.
16159 (spu_target_ops): Add spu_arch_string.
16160
61ff6e04
DJ
161612007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16162
16163 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16164 * configure.ac: Do not check for terminal.h.
16165 * configure, config.in: Regenerated.
16166
fb1e4ffc
DJ
161672007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16168
16169 * Makefile.in (OBS): Add $(XML_BUILTIN).
16170 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16171 (clean): Update.
16172 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16173 (arm-with-iwmmxt.c): New.
16174 * config.in, configure: Regenerate.
16175 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16176 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16177 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16178 (arm*-*-linux*): Add iWMMXt and regset support.
16179 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16180 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16181 (arm_store_wmmxregset, target_regsets): New.
16182 * server.c (get_features_xml): Take annex argument. Check builtin
16183 XML documents.
16184 (handle_query): Handle multiple annexes.
16185
0f48aa01
DJ
161862007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16187
16188 * remote-utils.c [USE_WIN32API] (read, write): Define.
16189 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16190 write.
16191
23181151
DJ
161922007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16193
16194 * linux-i386-low.c (the_low_target): Set arch_string.
16195 * linux-x86-64-low.c (the_low_target): Likewise.
16196 * linux-low.c (linux_arch_string): New.
16197 (linux_target_ops): Add it.
16198 * linux-low.h (struct linux_target_ops): Add arch_string.
16199 * server.c (write_qxfer_response): Use const void * for DATA.
16200 (get_features_xml): New.
16201 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16202 * target.h (struct target_ops): Add arch_string method.
16203
9d606399
DJ
162042007-01-03 Denis Pilat <denis.pilat@st.com>
16205 Daniel Jacobowitz <dan@codesourcery.com>
16206
16207 * linux-low.c (linux_kill): Handle being called with no threads.
16208 * win32-i386-low.c (win32_kill): Likewise.
16209 (get_child_debug_event): Clear current_process_handle.
16210
162112006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16212 Daniel Jacobowitz <dan@codesourcery.com>
16213
16214 * remote-utils.c (remote_open): Check the type of specified
16215 serial port devices before opening them.
16216 * server.c (main): Kill the inferior if an error occurs during
16217 the first remote_open.
16218
a5e13d24
DJ
162192006-12-05 Markus Deuling <deuling@de.ibm.com>
16220
16221 * README: Update supported targets.
16222
186947f7
DJ
162232006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * Makefile.in (clean): Remove reg-mips64.c.
16226 (reg-mips64.c, reg-mips64.o): New rules.
16227 * configure.srv: Handle mips64. Include regset support for mips.
16228 * linux-mips-low.c (union mips_register): New.
16229 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16230 (mips_breakpoint, mips_breakpoint_at): Use int.
16231 (mips_collect_register, mips_supply_register)
16232 (mips_collect_register_32bit, mips_supply_register_32bit)
16233 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16234 (mips_store_fpregset, target_regsets): New.
16235 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16236
a13e2c95
UW
162372006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16238
16239 * configure.srv: Add target "spu*-*-*".
16240 * Makefile.in (clean): Remove reg-spu.c.
16241 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16242 * spu-low.c: New file.
16243
cb7283db
DJ
162442006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16245
16246 * configure.ac: Correct td_thr_tls_get_addr test.
16247 * configure: Regenerated.
16248
89be2091
DJ
162492006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16250
16251 * linux-low.c (linux_wait_for_event): Reformat. Use the
16252 pass_signals array.
16253 * remote-utils.c (decode_address_to_semicolon): New.
16254 * server.c (pass_signals, handle_general_set): New.
16255 (handle_query): Mention QPassSignals for qSupported.
16256 (main): Call handle_general_set.
16257 * server.h (pass_signals, decode_address_to_semicolon): New.
16258
000ef4f0
DJ
162592006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16260
16261 * server.c (handle_query): Correct error handling for read_auxv.
16262
b7149293
UW
162632005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16264
16265 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16266 and srv_linux_thread_db to yes.
16267 * linux-s390-low.c (s390_fill_gregset): New function.
16268 (target_regsets): Define data structure.
16269
dae5f5cf
DJ
162702006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16273 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16274 * config.in, configure: Regenerated.
16275 * inferiors.c (gdb_id_to_thread): New function.
16276 (gdb_id_to_thread_id): Use it.
16277 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16278 * linux-low.h (struct process_info): Add th member.
16279 (thread_db_get_tls_address): New prototype.
16280 * remote-utils.c (decode_address): Make non-static.
16281 * server.c (handle_query): Handle qGetTLSAddr.
16282 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16283 * target.h (struct target_ops): Add get_tls_address.
16284 * thread-db.c (maybe_attach_thread): Save the thread handle.
16285 (thread_db_get_tls_address): New.
16286
32ca6d61
DJ
162872006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16288
16289 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16290 (linux_resume_one_process): Take a siginfo_t *. Update all
16291 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16292 (struct pending_signals): Add a siginfo_t.
16293 (linux_wait_for_process): Always set last_status.
16294 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16295 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16296 * linux-low.h (struct process_info): Add last_status.
16297
5ffff7c1
DJ
162982006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16299
16300 * remote-utils.c (try_rle): New function.
16301 (putpkt_binary): Use it.
16302
8695c747
DJ
163032006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16304
16305 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16306 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16307 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16308 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16309 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16310 point registers.
16311
290fadea
RS
163122006-08-08 Richard Sandiford <richard@codesourcery.com>
16313
16314 * server.c (terminal_fd): New variable.
16315 (old_foreground_pgrp): Likewise.
16316 (restore_old_foreground_pgrp): New function.
16317 (start_inferior): Record the terminal file descriptor in terminal_fd
16318 and its original foreground group in old_foreground_pgrp. Register
16319 restore_old_foreground_pgrp with atexit().
16320
9f2e1e63
DJ
163212006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16322
16323 * server.c (handle_query): Correct qPart to qXfer.
16324
b80864fb
DJ
163252006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16326
16327 * configure.ac: Check for more headers which are missing on
16328 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16329 * configure.srv: Add Cygwin and mingw32.
16330 * remote-utils.c: Don't include headers unconditionally which
16331 are missing on mingw32. Include <winsock.h> for mingw32.
16332 (remote_open): Adjust for mingw32 support. Flush
16333 standard error after writing to it.
16334 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16335 (unblock_async_io, enable_async_io, disable_async_io)
16336 (readchar, getpkt): Update for Winsock support.
16337 (prepare_resume_reply): Expect a protocol signal number.
16338 * server.c: Disable <sys/wait.h> on mingw32.
16339 (start_inferior): Adjust for mingw32 support. Flush
16340 standard error after writing to it.
16341 (attach_inferior): Likewise. Use protocol signal
16342 numbers.
16343 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16344 and names.
16345 * win32-i386-low.c: New file.
16346 * Makefile.in (XM_CLIBS): Set.
16347 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16348 (win32-i386-low.o): New dependency rule.
16349 * linux-low.c (linux_wait): Use target signal numbers.
16350 * target.h (struct target_ops): Doc fix.
16351 * server.h (target_signal_to_name): New prototype.
16352 * gdbreplay.c: Don't include headers unconditionally which
16353 are missing on mingw32. Include <winsock.h> for mingw32.
16354 (remote_close, remote_open): Adjust for Winsock support.
16355 * configure, config.in: Regenerated.
16356
0876f84a
DJ
163572006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16358
16359 * server.c (decode_xfer_read, write_qxfer_response): New.
16360 (handle_query): Take a packet length argument. Handle
16361 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16362 the qSupported response.
16363 (main): Update call to handle_query.
16364
01f9e8fa
DJ
163652006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16366
16367 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16368 (putpkt_binary): Renamed from putpkt and adjusted for binary
16369 data.
16370 (putpkt): New wrapper for putpkt_binary.
16371 (readchar): Don't mask off the high bit.
16372 (decode_X_packet): New function.
16373 * server.c (main): Call putpkt_binary if a handler sets the packet
16374 length. Save the length of the incoming packet. Handle 'X'.
16375 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16376
be2a5f71
DJ
163772006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16378
16379 * server.c (handle_query): Handle qSupported.
16380
ea025f5f
DJ
163812006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16382
16383 * remote-utils.c (all_symbols_looked_up): New variable.
16384 (look_up_one_symbol): Check it.
16385 * server.h (look_up_one_symbol): New declaration.
16386 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16387
9308fc88
DJ
163882006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16389
16390 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16391 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16392 (PTRACE_GET_THREAD_AREA): Define.
16393 (ps_get_thread_area): New function.
16394
52fb6437
NS
163952006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16396
16397 * configure.srv (m68k*-*-uclinux*): New target.
16398 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16399 (linux_resume_one_process): Remove extraneous cast.
16400 (linux_read_offsets): New.
16401 (linux_target_op): Add linux_read_offsets on mmuless systems.
16402 * server.c (handle_query): Add qOffsets logic.
16403 * target.h (struct target_ops): Add read_offsets.
16404
21b0f40c
DJ
164052006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16406
16407 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16408 (PTRACE_GET_THREAD_AREA): Define.
16409 (ps_get_thread_area): New function.
16410 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16411 (linux-x86-64-low.o): Update.
16412
0050a760
DJ
164132006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16414
16415 * configure.ac: Remove checks for prfpregset_t.
16416 * gdb_proc_service.h: New file.
16417 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16418 new "gdb_proc_service.h".
16419 * proc-service.c: Likewise.
16420 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16421 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16422 * Makefile.in (gdb_proc_service_h): Updated.
16423 * configure, config.in: Regenerated.
16424
b92a518e
DJ
164252006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16426
16427 * remote-utils.c (prepare_resume_reply): Move declaration
16428 of gdb_id_from_wait to the top of the block.
16429
545587ee
DJ
164302006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16431
16432 * linux-low.c (regsets_store_inferior_registers): Read the regset
16433 from the target before filling it.
16434
9db87ebd
DJ
164352006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16436
16437 * server.c (attach_inferior): Return SIGTRAP for a successful
16438 attach.
16439
dd24457d
DJ
164402006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16441
16442 * Makefile.in (OBS): Add version.o.
16443 (STAGESTUFF): Delete.
16444 (version.o): Add dependencies.
16445 (version.c): Replace rule.
16446 (clean): Remove version.c.
16447 * server.c (gdbserver_version): New.
16448 (gdbserver_usage): Use printf.
16449 (main): Handle --version and --help.
16450 * server.h (version, host_name): Add declarations.
16451
6f0f660e
EZ
164522005-12-23 Eli Zaretskii <eliz@gnu.org>
16453
889bf7c5
PA
16454 * linux-arm-low.c:
16455 * linux-arm-low.c:
16456 * inferiors.c:
16457 * i387-fp.h:
16458 * i387-fp.c:
16459 * gdbreplay.c:
16460 * regcache.c:
16461 * proc-service.c:
16462 * mem-break.h:
16463 * mem-break.c:
16464 * linux-x86-64-low.c:
16465 * linux-sh-low.c:
16466 * linux-s390-low.c:
16467 * linux-ppc64-low.c:
16468 * linux-ppc-low.c:
16469 * linux-mips-low.c:
16470 * linux-m68k-low.c:
16471 * linux-m32r-low.c:
16472 * linux-low.h:
16473 * linux-low.c:
16474 * linux-ia64-low.c:
16475 * linux-i386-low.c:
16476 * linux-crisv32-low.c:
16477 * thread-db.c:
16478 * terminal.h:
16479 * target.h:
16480 * target.c:
16481 * server.h:
16482 * server.c:
16483 * remote-utils.c:
16484 * regcache.h:
16485 * utils.c:
16486 * Makefile.in:
16487 * configure.ac:
6f0f660e
EZ
16488 * gdbserver.1: Add (C) after Copyright. Update the FSF
16489 address.
16490
9d1fb177
DJ
164912005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16492
16493 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16494 (arm_breakpoint_at): Recognize both breakpoints.
16495 (the_low_target): Use the correct breakpoint instruction.
16496
011a70c2
DJ
164972005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16498
16499 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16500 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16501 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16502 (the_low_target): Update.
16503
7fb85e41
AS
165042005-10-25 Andreas Schwab <schwab@suse.de>
16505
16506 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16507
16508 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16509 (ia64_num_regs): Reduce to 462.
16510
3db0444b
DJ
165112005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16512
16513 * acinclude.m4: Correct quoting.
16514 * aclocal.m4: Regenerated.
16515
16516 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16517 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16518 (thread_db_init): Call thread_db_err_str.
16519 * configure.ac: Check for TD_VERSION.
16520 * config.in, configure: Regenerated.
16521
bee0189a
DJ
165222005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16523
16524 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16525
e9d25b98
DJ
165262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16527
16528 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16529 is not available. Define HAVE_PTRACE_GETREGS if it is.
16530 * config.in, configure: Regenerated.
16531 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16532 * linux-i386-low.c, linux-m68k-low.c: Update to use
16533 HAVE_PTRACE_GETREGS.
16534 * linux-low.c (regsets_fetch_inferior_registers)
16535 (regsets_store_inferior_registers): Only return 0 if we processed
16536 GENERAL_REGS.
16537 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16538 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16539
a06660f7
DJ
165402005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16541
16542 * inferiors.c (struct thread_info): Add gdb_id.
16543 (add_thread): Add gdb_id argument.
16544 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16545 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16546 calls to add_thread.
16547 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16548 * server.c (handle_query): Use thread_to_gdb_id.
16549 (handle_v_cont, main): Use gdb_id_to_thread_id.
16550 * server.h (add_thread): Update prototype.
16551 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16552 prototypes.
16553
5a1f5858
DJ
165542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16555
16556 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16557 left-padded registers.
16558 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16559 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16560
e122f1f5
SE
165612005-07-01 Steve Ellcey <sje@cup.hp.com>
16562
16563 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16564 * configure: Regenerate.
16565 * config.in: Regenerate.
16566 * server.h (NEED_DECLARATION_STRERROR):
16567 Replace with !HAVE_DECL_STRERROR.
16568
d592fa2f
DJ
165692005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * linux-low.c (linux_wait, linux_send_signal): Don't test
16572 an unsigned long variable for > 0 if it could be MAX_ULONG.
16573 * server.c (myresume): Likewise.
16574 * target.c (set_desired_inferior): Likewise.
16575
ccbd4912
MK
165762005-06-13 Mark Kettenis <kettenis@gnu.org>
16577
16578 * configure.ac: Simplify and improve check for socklen_t.
16579 * configure, config.in: Regenerate.
16580
f450004a
DJ
165812005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16582
16583 * acconfig.h: Remove.
16584 * configure.ac: Add a test for socklen_t. Use three-argument
16585 AC_DEFINE throughout.
16586 * config.in: Regenerated using autoheader 2.59.
16587 * configure: Regenerated.
16588
16589 * gdbreplay.c (socklen_t): Provide a default.
16590 (remote_open): Use socklen_t.
16591 * remote-utils.c (socklen_t): Provide a default.
16592 (remote_open): Use socklen_t.
16593 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16594 unsigned char.
16595
16596 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16597 char for buffers.
16598 * linux-low.c (linux_read_memory, linux_write_memory)
16599 (linux_read_auxv): Likewise.
16600 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16601 (check_mem_write): Likewise.
16602 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16603 Likewise.
16604 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16605 (registers_from_string, register_data): Likewise.
16606 * server.c (handle_query, main): Likewise.
16607 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16608 (decode_M_packet): Likewise.
16609 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16610 * target.h (struct target_ops): Update read_memory, write_memory,
16611 and read_auxv.
16612 (read_inferior_memory, write_inferior_memory): Update.
16613 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16614 to unsigned char *.
16615 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16616 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16617 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16618 linux-s390-low.c, linux-sh-low.c: Update for changes in
16619 read_inferior_memory and the_low_target->breakpoint.
16620
eee84df1
DJ
166212005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16622
16623 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16624 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16625 * configure.srv: Add powerpc64-*-linux*.
16626 * linux-ppc64-low.c: New file.
16627
45b134e5
OF
166282005-05-23 Orjan Friberg <orjanf@axis.com>
16629
16630 * linux-cris-low.c: New file with support for CRIS.
16631 * linux-crisv32-low.c: Ditto for CRISv32.
16632 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16633 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16634 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16635 reg-crisv32.o, and reg-crisv32.c to make rules.
16636 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16637 recognized targets.
16638
48d93c75
UW
166392005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16640
16641 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16642 of sizeof (PTRACE_XFER_TYPE).
16643 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16644
e013ee27
OF
166452005-05-12 Orjan Friberg <orjanf@axis.com>
16646
889bf7c5 16647 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16648 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16649 pointers for hardware watchpoint support.
16650 * linux-low.h (struct linux_target_ops): Ditto.
16651 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16652 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16653 to linux_target_ops.
16654 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16655 reply packet.
16656 * server.c (main): Recognize 'Z' and 'z' packets.
16657
b0ded00b
UW
166582005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16659
16660 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16661 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16662 (the_low_target): Add new members.
16663
8643e2ad
DJ
166642005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16665
16666 * proc-service.c (ps_lgetregs): Search all_processes instead of
16667 all_threads.
16668
fc620387
DJ
166692005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * server.c (start_inferior): Change return type to int.
16672 (attach_inferior): Change sigptr to int *.
16673 (handle_v_cont, handle_v_requests): Change signal to int *.
16674 (main): Change signal to int.
16675
166762005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16677
16678 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16679 * configure.srv: Add m32r*-*-linux*.
16680 * linux-m32r-low.c: New file.
16681
e0e76420
DJ
166822005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16683
16684 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16685
a1928bad
DJ
166862005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16687
16688 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16689 Take unsigned long arguments for PIDs.
16690 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16691 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16692 (wait_for_sigstop, linux_resume_one_process)
16693 (regsets_fetch_inferior_registers, linux_send_signal)
16694 (linux_read_auxv): Likewise. Update the types of variables holding
16695 PIDs. Update format string specifiers.
16696 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16697 * remote-utils.c (prepare_resume_reply): Likewise.
16698 * server.c (cont_thread, general_thread, step_thread)
16699 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16700 unsigned long.
16701 (handle_query): Update format specifiers.
16702 (handle_v_cont, main): Use strtoul for thread IDs.
16703 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16704 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16705 (general_thread, step_thread, thread_from_wait)
16706 (old_thread_from_wait): Update.
16707 * target.h (struct thread_resume): Use unsigned long for THREAD.
16708 (struct target_ops): Use unsigned long for arguments to attach and
16709 thread_alive.
16710
dcdb98d2
DJ
167112005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16712
16713 * acinclude.m4: Include bfd/bfd.m4 directly.
16714 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16715 <agriffis@toolchain.org>.
16716 * aclocal.m4, configure: Regenerated.
16717
bec39cab
AC
167182005-01-07 Andrew Cagney <cagney@gnu.org>
16719
16720 * configure.ac: Rename configure.in, require autoconf 2.59.
16721 * configure: Re-generate.
16722
434c4c77
DJ
167232004-12-08 Daniel Jacobowitz <dan@debian.org>
16724
16725 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16726 LIBS when finished.
16727 * aclocal.m4: Regenerated.
16728 * configure: Regenerated.
16729
db1d3e1b
AS
167302004-11-21 Andreas Schwab <schwab@suse.de>
16731
16732 * linux-m68k-low.c (m68k_num_gregs): Define.
16733 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16734 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16735 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16736 (m68k_breakpoint_at): New. Add to the_low_target.
16737
16738 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16739 srv_linux_thread_db to yes.
16740
43360365
JB
167412004-10-20 Joel Brobecker <brobecker@gnat.com>
16742
16743 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16744 (ARCH_SET_FS): Likewise.
16745 (ARCH_GET_FS): Likewise.
16746 (ARCH_GET_GS): Likewise.
16747
fd500816
DJ
167482004-10-16 Daniel Jacobowitz <dan@debian.org>
16749
16750 * linux-i386-low.c (ps_get_thread_area): New.
16751 * linux-x86-64-low.c (ps_get_thread_area): New.
16752 * linux-low.c: Include <sys/syscall.h>.
16753 (linux_kill_one_process): Don't kill the first thread here.
16754 (linux_kill): Kill the first thread here.
16755 (kill_lwp): New function.
16756 (send_sigstop, linux_send_signal): Use it.
16757 * proc-service.c: Clean up #ifdefs.
16758 (fpregset_info): Delete.
16759 (ps_lgetregs): Update and enable implementation.
16760 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16761 implementations.
16762 * remote-utils.c (struct sym_cache, symbol_cache): New.
16763 (input_interrupt): Print a clearer message.
16764 (async_io_enabled): New variable.
16765 (enable_async_io, disable_async_io): Use it. Update comments.
16766 (look_up_one_symbol): Use the symbol cache.
16767 * thread-db.c (thread_db_look_up_symbols): New function.
16768 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16769
f6de3c42
DJ
167702004-10-16 Daniel Jacobowitz <dan@debian.org>
16771
16772 * configure.in: Test for -rdynamic.
16773 * configure: Regenerated.
16774 * Makefile (INTERNAL_LDFLAGS): New.
16775 (gdbserver, gdbreplay): Use it.
16776
2c0fc042
AC
167772004-09-02 Andrew Cagney <cagney@gnu.org>
16778
16779 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16780
075b3282
DJ
167812004-03-23 Daniel Jacobowitz <drow@mvista.com>
16782
16783 * linux-low.c (linux_wait): Clear all_processes list also.
16784
fa6a77dc
DJ
167852004-03-12 Daniel Jacobowitz <drow@mvista.com>
16786
16787 * linux-low.c: Include <errno.h>. Remove extern declaration of
16788 errno.
16789
6d782a97
DJ
167902004-03-12 Daniel Jacobowitz <drow@mvista.com>
16791
16792 * gdbreplay.c, server.h, utils.c: Update copyright years.
16793
3a7fb99b
DJ
167942004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16795
16796 * server.c (main): Print child status or termination signal from
16797 variable 'signal', not 'sig'.
16798
c3e735a6
DJ
167992004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16800
16801 * linux-low.c (linux_read_memory): Change return type to
16802 int. Check for and return error from ptrace().
16803 * target.c (read_inferior_memory): Change return type to int. Pass
16804 back return status from the_target->read_memory().
16805 * target.h (struct target_ops): Adapt *read_memory() prototype.
16806 Update comment.
16807 (read_inferior_memory): Adapt prototype.
16808 * server.c (main): Return an error packet if
16809 read_inferior_memory() returns an error.
16810
a59d1c82
DJ
168112004-03-04 Daniel Jacobowitz <drow@mvista.com>
16812
16813 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16814 Unify with other clean targets.
16815
dc3f8883
DJ
168162004-02-29 Daniel Jacobowitz <drow@mvista.com>
16817
16818 * server.c (handle_v_cont): Call set_desired_inferior.
16819
89a208da
DJ
168202004-02-29 Daniel Jacobowitz <drow@mvista.com>
16821
16822 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16823
62ea82f5
DJ
168242004-02-29 Daniel Jacobowitz <drow@mvista.com>
16825
16826 * linux-low.c (linux_wait): Unblock async I/O.
16827 (linux_resume): Block and enable async I/O.
16828 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16829 * server.h (block_async_io, unblock_async_io): Add prototypes.
16830
6910d122
DJ
168312004-02-29 Daniel Jacobowitz <drow@mvista.com>
16832
16833 * remote-utils.c (remote_open): Print a status notice after
16834 opening a TCP port.
16835 * server.c (attach_inferior): Print a status notice after
16836 attaching.
16837
168382004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16839
16840 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16841
c89dc5d4
DJ
168422004-02-26 Daniel Jacobowitz <drow@mvista.com>
16843
16844 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16845 error packet.
16846 * server.c, target.h: Update copyright years.
16847
4b8dad4a
RM
168482004-02-25 Roland McGrath <roland@redhat.com>
16849
16850 * target.h (struct target_ops): New member `read_auxv'.
16851 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16852 * linux-low.c (linux_read_auxv): New function.
16853 (linux_target_ops): Initialize `read_auxv' member to that.
16854
d7446758
JB
168552004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16856
16857 Committed by Jim Blandy <jimb@redhat.com>.
16858
16859 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16860 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16861 instead of GPR_SIZE to distiguish s390 and s390x targets.
16862
5544ad89
DJ
168632004-01-31 Daniel Jacobowitz <drow@mvista.com>
16864
16865 * linux-low.c: Update copyright year.
16866 (check_removed_breakpoint): Clear pending_is_breakpoint.
16867 (linux_set_resume_request, linux_queue_one_thread)
16868 (resume_status_pending_p): New functions.
16869 (linux_continue_one_thread): Use process->resume.
16870 (linux_resume): Only resume threads if there are no pending events.
16871 * linux-low.h (struct process_info): Add resume request
16872 pointer.
16873
2a68b70e
DJ
168742004-01-30 Daniel Jacobowitz <drow@mvista.com>
16875
16876 * regcache.c (new_register_cache): Clear the allocated register
16877 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16878
64386c31
DJ
168792003-10-13 Daniel Jacobowitz <drow@mvista.com>
16880
16881 * linux-low.c (linux_resume): Take a struct thread_resume *
16882 argument.
16883 (linux_wait): Update call.
16884 (resume_ptr): New static variable.
16885 (linux_continue_one_thread): Renamed from
16886 linux_continue_one_process. Use resume_ptr.
16887 (linux_resume): Use linux_continue_one_thread.
16888 * server.c (handle_v_cont, handle_v_requests): New functions.
16889 (myresume): New function.
16890 (main): Handle 'v' case.
16891 * target.h (struct thread_resume): New type.
16892 (struct target_ops): Change argument of "resume" to struct
16893 thread_resume *.
16894 (myresume): Delete macro.
16895
c938e9b0
L
168962003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16897
16898 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16899 (uninstall): Support DESTDIR.
16900
7f313d07
BC
16901Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16902
16903 * configure.srv: Add xscale*linux copy of arm*linux entry.
16904
3b2fc2ea
DJ
169052003-07-24 Daniel Jacobowitz <drow@mvista.com>
16906
16907 * linux-arm-low.c (arm_reinsert_addr): New function.
16908 (the_low_target): Add arm_reinsert_addr.
16909
1c0a559e
MK
169102003-07-08 Mark Kettenis <kettenis@gnu.org>
16911
16912 * mem-break.c: Remove whitespace at end of file.
16913
43d5792c
DJ
169142003-06-28 Daniel Jacobowitz <drow@mvista.com>
16915
16916 * configure.in: Check whether we need to prototype strerror.
16917 * server.h: Optionally prototype strerror.
16918 * gdbreplay.c (perror_with_name): Use strerror.
16919 * linux-low.c (linux_attach_lwp): Use strerror.
16920 * utils.c (perror_with_name): Use strerror.
16921 * config.in, configure: Regenerated.
16922
c8a86edf
DJ
169232003-06-28 Daniel Jacobowitz <drow@mvista.com>
16924
16925 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16926 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16927
73d37363
DJ
169282003-06-20 Daniel Jacobowitz <drow@mvista.com>
16929
16930 * Makefile.in (SFILES): Update.
16931 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16932 low-sun3.c: Remove files.
16933
6ad8ae5c
DJ
169342003-06-17 Daniel Jacobowitz <drow@mvista.com>
16935
16936 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16937 (linux_detach_one_process, linux_detach): New functions.
16938 (linux_target_ops): Add linux_detach.
16939 * server.c (main): Handle 'D' packet.
16940 * target.h (struct target_ops): Add "detach" member.
16941 (detach_inferior): Define.
16942
1581182a
MK
169432003-06-13 Mark Kettenis <kettenis@gnu.org>
16944
16945 From Kelley Cook <kelleycook@wideopenwest.com>:
16946 * configure.srv: Accept i[34567]86 variants.
16947
e5379b03
DJ
169482003-06-05 Daniel Jacobowitz <drow@mvista.com>
16949
16950 * linux-low.c (linux_wait_for_event): Correct comment typos.
16951 (linux_resume_one_process): Call check_removed_breakpoint.
16952 (linux_send_signal): New function.
16953 (linux_target_ops): Add linux_send_signal.
16954 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16955 of kill.
16956 * target.h (struct target_ops): Add send_signal.
16957
2ff29de4
JB
169582003-05-29 Jim Blandy <jimb@redhat.com>
16959
16960 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16961 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16962 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16963 away part of the register's value.
16964
254787d4
DJ
169652003-03-26 Daniel Jacobowitz <drow@mvista.com>
16966
16967 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16968 (linux_wait_for_event, linux_init_signals): Likewise.
16969
94e10508
DJ
169702003-03-17 Daniel Jacobowitz <drow@mvista.com>
16971
16972 * configure.in: Check for stdlib.h.
16973 * configure: Regenerated.
16974 * config.in: Regenerated.
16975
4c0711e0
DJ
169762003-01-04 Andreas Schwab <schwab@suse.de>
16977
16978 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16979
ef66e766
AC
169802003-01-02 Andrew Cagney <ac131313@redhat.com>
16981
16982 * Makefile.in: Remove obsolete code.
16983
a1358604
DJ
169842002-11-20 Daniel Jacobowitz <drow@mvista.com>
16985
16986 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16987 defined(PT_FPR0_HI).
16988
23ce3b1c
DJ
169892002-11-17 Stuart Hughes <seh@zee2.com>
16990
16991 * linux-arm-low.c (arm_num_regs): Increase.
16992 (arm_regmap): Include status register.
16993
169942002-11-17 Daniel Jacobowitz <drow@mvista.com>
16995
16996 * linux-low.c (register_addr): Remove incorrect -1 check.
16997
a9fa9f7d
DJ
169982002-08-29 Daniel Jacobowitz <drow@mvista.com>
16999
17000 * linux-low.c (linux_create_inferior): Call setpgid. Return
17001 the new PID.
17002 (unstopped_p, linux_signal_pid): Remove.
17003 (linux_target_ops): Remove linux_signal_pid.
17004 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17005 global instead of target method.
17006 * target.h (struct target_ops): Remove signal_pid. Update comment
17007 for create_inferior.
17008 * server.c (signal_pid): New variable.
17009 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17010 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17011 (attach_inferior): Set signal_pid.
17012
17574093
DJ
170132002-08-23 Daniel Jacobowitz <drow@mvista.com>
17014
17015 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17016
170172002-08-20 Jim Blandy <jimb@redhat.com>
17018
17019 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17020 default for this.
17021
170222002-08-01 Andrew Cagney <cagney@redhat.com>
17023
17024 * Makefile.in: Make chill references obsolete.
17025
170262002-07-24 Kevin Buettner <kevinb@redhat.com>
17027
17028 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17029 * configure: Regenerate.
17030 * config.in: Regenerate.
17031
170322002-07-09 David O'Brien <obrien@FreeBSD.org>
17033
17034 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17035 (perror_with_name, remote_close, remote_open, expect, play): Static.
17036
170372002-07-04 Michal Ludvig <mludvig@suse.cz>
17038
4b8dad4a 17039 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17040 byte offsets instead of an array of indexes.
17041 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17042
170432002-06-13 Daniel Jacobowitz <drow@mvista.com>
17044
17045 * regcache.c: Add comment.
17046
170472002-06-11 Daniel Jacobowitz <drow@mvista.com>
17048
17049 * thread-db.c: New file.
17050 * proc-service.c: New file.
17051 * acinclude.m4: New file.
17052 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17053 proc-service.o, and thread-db.o.
17054 (linux-low.o): Add USE_THREAD_DB.
17055 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17056 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17057 * aclocal.m4: Regenerated.
17058 * config.in: Regenerated.
17059 * configure: Regenerated.
17060 * configure.in: Check for proc_service.h, sys/procfs.h,
17061 thread_db.h, and linux/elf.h headrs.
17062 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17063 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17064 Check for -lthread_db and thread support.
17065 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17066 PowerPC, and SuperH.
17067 * i387-fp.c: Constify arguments.
17068 * i387-fp.h: Likewise.
17069 * inferiors.c: (struct thread_info): Renamed from
17070 `struct inferior_info'. Remove PID member. Use generic inferior
17071 list header. All uses updated.
17072 (inferiors, signal_pid): Removed.
17073 (all_threads): New variable.
17074 (get_thread): Define.
17075 (add_inferior_to_list): New function.
17076 (for_each_inferior): New function.
17077 (change_inferior_id): New function.
17078 (add_inferior): Removed.
17079 (remove_inferior): New function.
17080 (add_thread): New function.
17081 (free_one_thread): New function.
17082 (remove_thread): New function.
17083 (clear_inferiors): Use for_each_inferior and free_one_thread.
17084 (find_inferior): New function.
17085 (find_inferior_id): New function.
17086 (inferior_target_data): Update argument type.
17087 (set_inferior_target_data): Likewise.
17088 (inferior_regcache_data): Likewise.
17089 (set_inferior_regcache_data): Likewise.
17090 * linux-low.c (linux_bp_reinsert): Remove.
17091 (all_processes, stopping_threads, using_thrads)
17092 (struct pending_signals, debug_threads, pid_of): New.
17093 (inferior_pid): Replace with macro.
17094 (struct inferior_linux_data): Remove.
17095 (get_stop_pc, add_process): New functions.
17096 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17097 Use add_process and add_thread.
17098 (linux_attach_lwp): New function, based on old linux_attach. Use
17099 add_process and add_thread. Set stop_expected for new threads.
17100 (linux_attach): New function.
17101 (linux_kill_one_process): New function.
17102 (linux_kill): Kill all LWPs.
17103 (linux_thread_alive): Use find_inferior_id.
17104 (check_removed_breakpoints, status_pending_p): New functions.
17105 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17106 Update. Use WNOHANG. Wait for cloned processes also. Update process
17107 struct for the found process.
17108 (linux_wait_for_event): New function.
17109 (linux_wait): Use it. Support LWPs.
17110 (send_sigstop, wait_for_sigstop, stop_all_processes)
17111 (linux_resume_one_process, linux_continue_one_process): New functions.
17112 (linux_resume): Support LWPs.
17113 (REGISTER_RAW_SIZE): Remove.
17114 (fetch_register): Use register_size instead. Call supply_register.
17115 (usr_store_inferior_registers): Likewise. Call collect_register.
17116 Fix recursive case.
17117 (regsets_fetch_inferior_registers): Improve error message.
17118 (regsets_store_inferior_registers): Add debugging.
17119 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17120 (unstopped_p, linux_signal_pid): New functions.
17121 (linux_target_ops): Add linux_signal_pid.
17122 (linux_init_signals): New function.
17123 (initialize_low): Call it. Initialize using_threads.
17124 * regcache.c (inferior_regcache_data): Add valid
17125 flag.
17126 (get_regcache): Fetch registers lazily. Add fetch argument
17127 and update all callers.
17128 (regcache_invalidate_one, regcache_invalidate): New
17129 functions.
17130 (new_register_cache): Renamed from create_register_cache.
17131 Return the new regcache.
17132 (free_register_cache): Change argument to a void *.
17133 (registers_to_string, registers_from_string): Call get_regcache
17134 with fetch flag set.
17135 (register_data): Make static. Pass fetch flag to get_regcache.
17136 (supply_register): Call get_regcache with fetch flag clear.
17137 (collect_register): Call get_regcache with fetch flag set.
17138 (collect_register_as_string): New function.
17139 * regcache.h: Update.
17140 * remote-utils.c (putpkt): Flush after debug output and use
17141 stderr.
17142 Handle input interrupts while waiting for an ACK.
17143 (input_interrupt): Use signal_pid method.
17144 (getpkt): Flush after debug output and use stderr.
17145 (outreg): Use collect_register_as_string.
17146 (new_thread_notify, dead_thread_notify): New functions.
17147 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17148 and general_thread.
17149 (look_up_one_symbol): Flush after debug output.
17150 * server.c (step_thread, server_waiting): New variables.
17151 (start_inferior): Don't use signal_pid. Update call to mywait.
17152 (attach_inferior): Update call to mywait.
17153 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17154 (main): Don't fetch/store registers explicitly. Use
17155 set_desired_inferior. Support proposed ``Hs'' packet. Update
17156 calls to mywait.
17157 * server.h: Update.
17158 (struct inferior_list, struct_inferior_list_entry): New.
17159 * target.c (set_desired_inferior): New.
17160 (write_inferior_memory): Constify.
17161 (mywait): New function.
17162 * target.h: Update.
17163 (struct target_ops): New signal_pid method.
17164 (mywait): Removed macro, added prototype.
17165
17166 * linux-low.h (regset_func): Removed.
17167 (regset_fill_func, regset_store_func): New.
17168 (enum regset_type): New.
17169 (struct regset_info): Add type field. Use new operation types.
17170 (struct linux_target_ops): stop_pc renamed to get_pc.
17171 Add decr_pc_after_break and breakpoint_at.
17172 (get_process, get_thread_proess, get_process_thread)
17173 (strut process_info, all_processes, linux_attach_lwp)
17174 (thread_db_init): New.
17175
17176 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17177 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17178 (the_low_target): Add new members.
17179 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17180 (i386_store_fpxregset): Constify.
17181 (target_regsets): Add new kind identifier.
17182 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17183 (i386_set_pc): Add debugging.
17184 (i386_breakpoint_at): New function.
17185 (the_low_target): Add new members.
17186 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17187 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17188 (mips_breakpoint_at): New.
17189 (the_low_target): Add new members.
17190 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17191 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17192 (the_low_target): Add new members.
17193 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17194 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17195 (the_low_target): Add new members.
17196 * linux-x86-64-low.c (target_regsets): Add new kind
17197 identifier.
17198
171992002-05-15 Daniel Jacobowitz <drow@mvista.com>
17200
17201 From Martin Pool <mbp@samba.org>:
17202 * server.c (gdbserver_usage): New function.
17203 (main): Call it.
17204
172052002-05-14 Daniel Jacobowitz <drow@mvista.com>
17206
17207 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17208 stop_at -> stop_pc.
17209
172102002-05-04 Andrew Cagney <ac131313@redhat.com>
17211
17212 * Makefile.in: Remove obsolete code.
17213
172142002-04-24 Michal Ludvig <mludvig@suse.cz>
17215
17216 * linux-low.c (regsets_fetch_inferior_registers),
17217 (regsets_store_inferior_registers): Removed cast to int from
17218 ptrace() calls.
17219 * regcache.h: Added declaration of struct inferior_info.
17220
172212002-04-20 Daniel Jacobowitz <drow@mvista.com>
17222
17223 * inferiors.c (struct inferior_info): Add regcache_data.
17224 (add_inferior): Call create_register_cache.
17225 (clear_inferiors): Call free_register_cache.
17226 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17227 * regcache.c (struct inferior_regcache_data): New.
17228 (registers): Remove.
17229 (get_regcache): New function.
17230 (create_register_cache, free_register_cache): New functions.
17231 (set_register_cache): Don't initialize the register cache here.
17232 (registers_to_string, registers_from_string, register_data): Call
17233 get_regcache.
17234 * regcache.h: Add prototypes.
17235 * server.h: Likewise.
17236
172372002-04-20 Daniel Jacobowitz <drow@mvista.com>
17238
17239 * mem-break.c: New file.
17240 * mem-break.h: New file.
17241 * Makefile.in: Add mem-break.o rule; update server.h
17242 dependencies.
17243 * inferiors.c (struct inferior_info): Add target_data
17244 member.
17245 (clear_inferiors): Free target_data member if set.
17246 (inferior_target_data, set_inferior_target_data): New functions.
17247 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17248 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17249 * linux-low.c (linux_bp_reinsert): New variable.
17250 (struct inferior_linux_data): New.
17251 (linux_create_inferior): Use set_inferior_target_data.
17252 (linux_attach): Likewise. Call add_inferior.
17253 (linux_wait_for_one_inferior): New function.
17254 (linux_wait): Call it.
17255 (linux_write_memory): Add const.
17256 (initialize_low): Call set_breakpoint_data.
17257 * linux-low.h (struct linux_target_ops): Add breakpoint
17258 handling members.
17259 * server.c (attach_inferior): Remove extra add_inferior
17260 call.
17261 * server.h: Include mem-break.h. Update inferior.c
17262 prototypes.
17263 * target.c (read_inferior_memory)
17264 (write_inferior_memory): New functions.
17265 * target.h (read_inferior_memory)
17266 (write_inferior_memory): Change macros to prototypes.
17267 (struct target_ops): Update comments. Add const to write_memory
17268 definition.
17269
172702002-04-11 Daniel Jacobowitz <drow@mvista.com>
17271
17272 * linux-low.c (usr_store_inferior_registers): Support
17273 registers which are allowed to fail to store.
17274 * linux-low.h (linux_target_ops): Likewise.
17275 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17276 (ppc_cannot_store_register): FPSCR may not be storable.
17277
172782002-04-09 Daniel Jacobowitz <drow@mvista.com>
17279
17280 * server.h: Include <string.h> if HAVE_STRING_H.
17281 * ChangeLog: Correct paths in last ChangeLog entry.
17282
172832002-04-09 Daniel Jacobowitz <drow@mvista.com>
17284
17285 * linux-low.h: Remove obsolete prototypes.
17286 (struct linux_target_ops): New.
17287 (extern the_low_target): New.
17288 * linux-low.c (num_regs, regmap): Remove declarations.
17289 (register_addr): Use the_low_target explicitly.
17290 (fetch_register): Likewise.
17291 (usr_fetch_inferior_registers): Likewise.
17292 (usr_store_inferior_registers): Likewise.
17293 * linux-arm-low.c (num_regs): Remove.
17294 (arm_num_regs): Define.
17295 (arm_regmap): Renamed from regmap, made static.
17296 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17297 made static.
17298 (arm_cannot_store_register): Renamed from cannot_store_register,
17299 made static.
17300 (the_low_target): New.
17301 * linux-i386-low.c (num_regs): Remove.
17302 (i386_num_regs): Define.
17303 (i386_regmap): Renamed from regmap, made static.
17304 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17305 made static.
17306 (i386_cannot_store_register): Renamed from cannot_store_register,
17307 made static.
17308 (the_low_target): New.
17309 * linux-ia64-low.c (num_regs): Remove.
17310 (ia64_num_regs): Define.
17311 (ia64_regmap): Renamed from regmap, made static.
17312 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17313 made static.
17314 (ia64_cannot_store_register): Renamed from cannot_store_register,
17315 made static.
17316 (the_low_target): New.
17317 * linux-m68k-low.c (num_regs): Remove.
17318 (m68k_num_regs): Define.
17319 (m68k_regmap): Renamed from regmap, made static.
17320 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17321 made static.
17322 (m68k_cannot_store_register): Renamed from cannot_store_register,
17323 made static.
17324 (the_low_target): New.
17325 * linux-mips-low.c (num_regs): Remove.
17326 (mips_num_regs): Define.
17327 (mips_regmap): Renamed from regmap, made static.
17328 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17329 made static.
17330 (mips_cannot_store_register): Renamed from cannot_store_register,
17331 made static.
17332 (the_low_target): New.
17333 * linux-ppc-low.c (num_regs): Remove.
17334 (ppc_num_regs): Define.
17335 (ppc_regmap): Renamed from regmap, made static.
17336 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17337 made static.
17338 (ppc_cannot_store_register): Renamed from cannot_store_register,
17339 made static.
17340 (the_low_target): New.
17341 * linux-s390-low.c (num_regs): Remove.
17342 (s390_num_regs): Define.
17343 (s390_regmap): Renamed from regmap, made static.
17344 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17345 made static.
17346 (s390_cannot_store_register): Renamed from cannot_store_register,
17347 made static.
17348 (the_low_target): New.
17349 * linux-sh-low.c (num_regs): Remove.
17350 (sh_num_regs): Define.
17351 (sh_regmap): Renamed from regmap, made static.
17352 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17353 made static.
17354 (sh_cannot_store_register): Renamed from cannot_store_register,
17355 made static.
17356 (the_low_target): New.
17357 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17358 (the_low_target): New.
17359
173602002-04-09 Daniel Jacobowitz <drow@mvista.com>
17361
17362 * Makefile.in: Add stamp-h target.
17363 * configure.in: Create stamp-h.
17364 * configure: Regenerated.
17365
173662002-04-09 Daniel Jacobowitz <drow@mvista.com>
17367
17368 * inferiors.c: New file.
17369 * target.c: New file.
17370 * target.h: New file.
17371 * Makefile.in: Add target.o and inferiors.o. Update
17372 dependencies.
17373 * linux-low.c (inferior_pid): New static variable,
17374 moved from server.c.
17375 (linux_create_inferior): Renamed from create_inferior.
17376 Call add_inferior. Return 0 on success instead of a PID.
17377 (linux_attach): Renamed from myattach.
17378 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17379 (linux_thread_alive): Renamed from mythread_alive.
17380 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17381 child dies.
17382 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17383 (regsets_store_inferior_registers): Correct error message.
17384 Add missing ``return 0''.
17385 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17386 (linux_store_registers): Renamed from store_inferior_registers.
17387 (linux_read_memory): Renamed from read_inferior_memory.
17388 (linux_write_memory): Renamed from write_inferior_memory.
17389 (linux_target_ops): New structure.
17390 (initialize_low): Call set_target_ops ().
17391 * remote-utils.c (unhexify): New function.
17392 (hexify): New function.
17393 (input_interrupt): Send signals to ``signal_pid''.
17394 * server.c (inferior_pid): Remove.
17395 (start_inferior): Update create_inferior call.
17396 (attach_inferior): Call add_inferior.
17397 (handle_query): New function.
17398 (main): Call handle_query for `q' packets.
17399 * server.h: Include "target.h". Remove obsolete prototypes.
17400 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17401
174022002-04-09 Daniel Jacobowitz <drow@mvista.com>
17403
17404 * Makefile.in: Add WARN_CFLAGS. Update configury
17405 dependencies.
17406 * configure.in: Check for <string.h>
17407 * configure: Regenerate.
17408 * config.in: Regenerate.
17409 * gdbreplay.c: Include needed system headers.
17410 (remote_open): Remove strchr prototype.
17411 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17412 * regcache.c (supply_register): Change buf argument to const void *.
17413 (supply_register_by_name): Likewise.
17414 (collect_register): Change buf argument to void *.
17415 (collect_register_by_name): Likewise.
17416 * regcache.h: Add missing prototypes.
17417 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17418 * server.c (handle_query): New function.
17419 (attached): New static variable, moved out of main.
17420 (main): Quiet longjmp clobber warnings.
17421 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17422 * utils.c (error): Remove NORETURN.
17423 (fatal): Likewise.
This page took 3.071256 seconds and 4 git commands to generate.