gdb: Support printf 'z' size modifier
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e06f3d6e
AB
12019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * ax.c (ax_printf): Handle size_t_arg.
4
ca3a04f6
CB
52019-11-06 Christian Biesinger <cbiesinger@google.com>
6
7 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
8 * mi/mi-main.c (output_cores): Likewise.
9 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
10 (linux_xfer_osdata_modules): Likewise.
11 * remote.c (register_remote_support_xml): Likewise.
12 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
13 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
14
e48f6033
CB
152019-11-01 Christian Biesinger <cbiesinger@google.com>
16
17 * configure: Regenerate.
18 * configure.ac: Remove check for strerror_r.
19
e7e97a2e
CB
202019-10-31 Christian Biesinger <cbiesinger@google.com>
21
22 * config.in: Regenerate.
23 * configure: Regenerate.
24 * configure.ac: Also check for strerror_r.
25
75cafaa6
CB
262019-10-31 Christian Biesinger <cbiesinger@google.com>
27
28 * ax.h (debug_agent): Remove duplicate declaration.
29
30baf67b
TV
302019-10-26 Tom de Vries <tdevries@suse.de>
31
32 * linux-aarch64-low.c: Fix typos in comments.
33 * linux-arm-low.c: Same.
34 * linux-low.c: Same.
35 * linux-ppc-low.c: Same.
36 * proc-service.c: Same.
37 * regcache.h: Same.
38 * server.c: Same.
39 * tracepoint.c: Same.
40 * win32-low.c: Same.
41
52c64cf7
TT
422019-10-25 Tom Tromey <tromey@adacore.com>
43
44 * utils.c (xstrdup): Remove.
45
c12d372d
TT
462019-10-23 Tom Tromey <tom@tromey.com>
47
48 * configure, config.in: Rebuild.
49
4d0b984b
TT
502019-10-23 Tom Tromey <tom@tromey.com>
51
52 * configure: Rebuild.
53 * acinclude.m4: Use m4_include, not sinclude.
54
c5adaa19
TT
552019-10-17 Tom Tromey <tromey@adacore.com>
56
57 * configure: Rebuild.
58 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
59 in AC_CONFIG_FILES invocation.
60 * Makefile.in (stamp-h, Makefile): Use new-style config.status
61 invocation.
62
fec4e896
CB
632019-10-16 Christian Biesinger <cbiesinger@google.com>
64
65 * server.c: Include xml-builtin.h.
66 (get_xml_features): Don't declare xml_builtins here.
67
00975ff6
AB
682019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
69
70 * Makefile.in: Remove references to vec-ipa.o.
71
0dc32745
AB
722019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
73
74 * Makefile.in: Remove references to vec.c.
75
3e6ec53a
CB
762019-10-02 Christian Biesinger <cbiesinger@google.com>
77
78 * server.c (server_waiting): Change to bool.
79 (extended_protocol): Likewise.
80 (response_needed): Likewise.
81 (exit_requested): Likewise.
82 (run_once): Likewise.
83 (report_no_resumed): Likewise.
84 (non_stop): Likewise.
85 (disable_packet_vCont): Likewise.
86 (disable_packet_Tthread): Likewise.
87 (disable_packet_qC): Likewise.
88 (disable_packet_qfThreadInfo): Likewise.
89 (handle_general_set): Update.
90 (handle_detach): Update.
91 (handle_monitor_command): Update.
92 (handle_query): Update.
93 (captured_main): Update.
94 (process_serial_event): Update.
95 * server.h (server_waiting): Change to bool.
96 (disable_packet_vCont): Likewise.
97 (disable_packet_Tthread): Likewise.
98 (disable_packet_qC): Likewise.
99 (disable_packet_qfThreadInfo): Likewise.
100 (run_once): Likewise.
101 (non_stop): Likewise.
102 * target.c (target_stop_and_wait): Update.
103
80fd2826
TT
1042019-10-02 Tom Tromey <tromey@adacore.com>
105
106 * Makefile.in (SFILES): Add common-inferior.c.
107 (OBS): Add common-inferior.o.
108 * server.c (startup_with_shell): Don't define.
109
46f29a9a
AB
1102019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
111
112 * linux-low.c (linux_low_read_btrace): Update for change to
113 std::vector.
114
f9d949fb
CB
1152019-09-20 Christian Biesinger <cbiesinger@google.com>
116
117 * debug.c (debug_threads): Remove comment in favor of the header.
118 * debug.h (using_threads): Add declaration.
119 (debug_threads): Add comment.
120 * linux-aarch64-low.c: Include debug.h and remove declaration of
121 debug_threads.
122 * nto-low.c: Likewise.
123 * remote-utils.c: Likewise.
124 * thread-db.c: Likewise.
125
abf516c6
UW
1262019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
127
128 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
129 and powerpc-cell64l-ipa.o.
130 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
131 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
132 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
133 (spu*-*-*): Remove.
134
135 * spu-low.c: Remove file.
136
137 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
138 (parse_spufs_run): Remove.
139 (ppc_get_pc): Remove Cell/B.E. support.
140 (ppc_set_pc): Likewise.
141 (ppc_breakpoint_at): Likewise.
142 (ppc_arch_setup): Likewise.
143 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
144 tdesc_powerpc_cell32l.
145 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
146 or init_registers_powerpc_cell32l.
147 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
148 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
149 or init_registers_powerpc_cell32l.
150 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
151 (init_registers_powerpc_cell32l): Remove prototype.
152 (init_registers_powerpc_cell64l): Likewise.
153
154 * target.h (struct target_ops): Remove qxfer_spu member.
155 * server.c (handle_qxfer_spu): Remove.
156 (qxfer_packets): Remove entry for "spu".
157 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
158 * linux-low.c (SPUFS_MAGIC): Remove.
159 (spu_enumerate_spu_ids): Remove.
160 (linux_qxfer_spu): Remove.
161 (linux_target_ops): Remove qxfer_spu member.
162 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
163 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
164 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
165
2d41fa11
SDJ
1662019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
167
168 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
169 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
170 * config.in: Regenerate.
171 * configure: Regenerate.
172
d59b55f0
TT
1732019-08-15 Tom Tromey <tromey@adacore.com>
174
175 * target.c (target_write_memory): Use gdb::byte_vector.
176
4196ab2a
TT
1772019-08-15 Tom Tromey <tromey@adacore.com>
178
179 * tracepoint.c (write_inferior_data_pointer)
180 (write_inferior_integer, write_inferior_int8)
181 (write_inferior_uinteger, m_tracepoint_action_download)
182 (r_tracepoint_action_download, x_tracepoint_action_download)
183 (l_tracepoint_action_download, clear_inferior_trace_buffer)
184 (download_agent_expr, download_tracepoint_1)
185 (download_trace_state_variables, upload_fast_traceframes): Update.
186 * server.c (gdb_write_memory): Update.
187 * remote-utils.c (relocate_instruction): Update.
188 * proc-service.c (ps_pdwrite): Update.
189 * mem-break.c (remove_memory_breakpoint)
190 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
191 (uninsert_fast_tracepoint_jumps_at)
192 (reinsert_fast_tracepoint_jumps_at): Update.
193 * linux-x86-low.c (append_insns)
194 (i386_install_fast_tracepoint_jump_pad)
195 (amd64_write_goto_address, i386_write_goto_address): Update.
196 * linux-s390-low.c (append_insns, s390_write_goto_address):
197 Update.
198 * linux-ppc-low.c (ppc_relocate_instruction)
199 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
200 (ppc_write_goto_address): Update.
201 * linux-aarch64-low.c (append_insns): Update.
202 * target.h (struct target_ops): Update.
203 (write_inferior_memory): Don't declare.
204 * target.c (target_write_memory): Rename from
205 write_inferior_memory. Remove old target_write_memory.
206
c6778d00
TT
2072019-08-15 Tom Tromey <tromey@adacore.com>
208
209 * target.c (write_inferior_memory): Use std::vector.
210
404f2902
FCE
2112019-08-06 Frank Ch. Eigler <fche@redhat.com>
212
213 PR build/24886
214 * configure.ac: Drop enable-libmcheck support.
215 * configure, config.in: Rebuild.
216 * acinclude.m4: Don't include it.
217
4c5aa8e0
AH
2182019-07-19 Alan Hayward <alan.hayward@arm.com>
219
220 * configure.srv: Remove Arm xml files.
221
7cc17433
AH
2222019-07-19 Alan Hayward <alan.hayward@arm.com>
223
224 * configure.srv: Add new files. Remove xml generated files.
225 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
226 registers.
227 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
228 * linux-aarch32-tdesc.c: New file.
229 * linux-aarch32-tdesc.h: New file.
230 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
231 * linux-arm-low.c (init_registers_arm, tdesc_arm)
232 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
233 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
234 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
235 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
236 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
237 (arm_read_description): Call arm_linux_read_description.
238 (initialize_low_arch): Don't init registers.
239 * linux-arm-tdesc.c: New file.
240 * linux-arm-tdesc.h: New file.
241
166a82be
AH
2422019-07-10 Alan Hayward <alan.hayward@arm.com>
243
244 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
245 Move counter inside for.
246 (arm_read_description): Check ptrace earlier.
247 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
248
268a13a5
TT
2492019-07-09 Tom Tromey <tom@tromey.com>
250
251 * configure: Rebuild.
252 * configure.ac: Change common to gdbsupport.
253 * acinclude.m4: Change common to gdbsupport.
254 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
255 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
256 common to gdbsupport.
257 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
258 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
259 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
260 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
261 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
262 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
263 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
264 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
265 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
266 common to gdbsupport.
267
350fab54
AH
2682019-07-04 Alan Hayward <alan.hayward@arm.com>
269
270 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
271 defines.
272 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
273
2b40fda7
AH
2742019-07-04 Alan Hayward <alan.hayward@arm.com>
275
276 * configure.srv: Remove legacy xml.
277 * linux-aarch64-low.c (initialize_low_arch): Remove
278 initialize_low_tdesc call.
279 * linux-aarch64-tdesc-selftest.c: Remove file.
280 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
281 * linux-x86-low.c (initialize_low_arch): Remove
282 initialize_low_tdesc call.
283 * linux-x86-tdesc-selftest.c: Remove file.
284 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
285
7d10623d
TV
2862019-06-20 Tom de Vries <tdevries@suse.de>
287
288 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
289 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
290
8d6a48df
TV
2912019-06-19 Tom de Vries <tdevries@suse.de>
292
293 * debug.h (debug_write): Change return type to ssize_t.
294 * debug.c (debug_write): Same.
295
73cc7272
TT
2962019-06-14 Tom Tromey <tom@tromey.com>
297
298 * configure.ac: Use new path to gnulib.
299 * configure: Rebuild.
300 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
301 to gnulib.
302
08f10e02
TT
3032019-06-11 Tom Tromey <tom@tromey.com>
304
305 * Makefile.in (SFILES): Add alloc.c.
306 (OBS): Add alloc.o.
307 (IPA_OBJS): Add alloc-ipa.o.
308 (alloc-ipa.o): New target.
309 (%.o: ../%.c): New pattern rule.
310
422186a9
TT
3112019-06-10 Tom Tromey <tromey@adacore.com>
312
313 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
314 end warning with a newline.
315 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
316 newline.
317 * thread-db.c (attach_thread): Don't end warning with a newline.
318 (thread_db_notice_clone): Likewise.
319 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
320 newline.
321 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
322 end warning with a newline.
323
b02f78f9
PA
3242019-06-04 Pedro Alves <palves@redhat.com>
325
326 * server.c (captured_main): Use make_unique_xstrdup.
327
88ed7edb
TT
3282019-06-02 Tom Tromey <tom@tromey.com>
329
330 * gdbreplay.c (fromhex): Remove.
331 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
332
33a6bc35
TT
3332019-05-29 Tom Tromey <tromey@adacore.com>
334
335 * configure: Rebuild.
336
e90a813d
KB
3372019-05-06 Kevin Buettner <kevinb@redhat.com>
338
339 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
340 sign extension code on 32-bit builds.
341
353ea2d1
EZ
3422019-05-03 Eli Zaretskii <eliz@gnu.org>
343
344 * remote-utils.c:
345 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
346
b494cdff
TT
3472019-04-19 Tom Tromey <tom@tromey.com>
348
349 * server.c (struct vstop_notif): Derive from notif_event.
350 <base>: Remove.
351 (queue_stop_reply): Update.
352 (remove_all_on_match_ptid): Change type. Rewrite.
353 (discard_queued_stop_replies): Rewrite.
354 (in_queued_stop_replies_ptid): Change type.
355 (in_queued_stop_replies): Rewrite.
356 (notif_stop): Update.
357 (queue_stop_reply_callback): Update.
358 (captured_main): Don't call initialize_notif.
359 (push_stop_notification): Update.
360 * notif.c (notif_write_event, handle_notif_ack)
361 (notif_event_enque, notif_push): Update.
362 (notif_event_xfree, initialize_notif): Remove.
363 * notif.h (struct notif_event): Include <list>, not
364 "common/queue.h".
365 (struct notif_server) <queue>: Now a std::list.
366 (notif_event_p): Remove typedef.
367 (initialize_notif): Don't declare.
368 (struct notif_event): Add virtual destructor.
369
a7e559cc
AH
3702019-04-17 Alan Hayward <alan.hayward@arm.com>
371
372 * ax.c (ax_vdebug): Call debug_printf.
373 * debug.c (debug_write): New function.
374 * debug.h (debug_write): New declaration.
375 * linux-low.c (sigchld_handler): Call debug_write.
376
aeb2e706
AH
3772019-04-17 Alan Hayward <alan.hayward@arm.com>
378
379 * debug.c (debug_set_output): New function.
380 (debug_vprintf): Send output to debug_file.
381 (debug_flush): Likewise.
382 * debug.h (debug_set_output): New declaration.
383 * server.c (handle_monitor_command): Add debug-file option.
384 (captured_main): Likewise.
385
c1bc0935
AH
3862019-04-17 Alan Hayward <alan.hayward@arm.com>
387
388 * debug.c (remote_debug): Add definition.
389 * debug.h (remote_debug): Add declaration.
390 * hostio.c (remote_debug): Remove declaration.
391 * remote-utils.c (struct ui_file): Likewise.
392 (remote_debug): Likewise.
393 * remote-utils.h (remote_debug): Likewise,
394 * server.c (remote_debug): Remove definition.
395
3f52fdbc
KB
3962019-04-10 Kevin Buettner <kevinb@redhat.com>
397
398 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
399 when using a 64-bit gdbserver.
400
b0319eaa
TT
4012019-04-09 Tom Tromey <tromey@adacore.com>
402
403 * linux-low.c (select_event_lwp): Use find_thread_in_random.
404
eedc3f4f
TT
4052019-04-08 Tom Tromey <tom@tromey.com>
406
407 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
408 throw.
409 (linux_resume_one_lwp): Likewise.
410
230d2906
TT
4112019-04-08 Tom Tromey <tom@tromey.com>
412
413 * gdbreplay.c: Update.
414 * linux-low.c: Update.
415 * server.c: Update.
416
a70b8144
TT
4172019-04-08 Tom Tromey <tom@tromey.com>
418
419 * server.c: Use C++ exception handling.
420 * linux-low.c: Use C++ exception handling.
421 * gdbreplay.c: Use C++ exception handling.
422
3d6e9d23
TT
4232019-04-08 Tom Tromey <tom@tromey.com>
424
425 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
426 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
427 (captured_main, main): Update.
428 * gdbreplay.c (main): Update.
429
0570503d
PFC
4302019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
431
432 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
433 value in argument pointer, return 1 if the entry is found and 0
434 otherwise. Move comment.
435 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
436 * linux-low.h (linux_get_auxv): Declare.
437 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
438
227a9e65
TT
4392019-04-05 Tom Tromey <tromey@adacore.com>
440
441 * server.c (gdbserver_usage): Use upper-case for metasyntactic
442 variables.
443
69f4c9cc
AH
4442019-03-28 Alan Hayward <alan.hayward@arm.com>
445
446 * linux-low.c (AT_HWCAP2): Add define if not already included.
447
974c89e0
AH
4482019-03-26 Alan Hayward <alan.hayward@arm.com>
449
450 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
451 (aarch64_arch_setup): Call linux_get_hwcap.
452 * linux-arm-low.c (arm_get_hwcap): Remove function.
453 (arm_read_description): Call linux_get_hwcap.
454 * linux-low.c (linux_get_auxv): New function.
455 (linux_get_hwcap): Likewise.
456 (linux_get_hwcap2): Likewise.
457 * linux-low.h (linux_get_hwcap): New declaration.
458 (linux_get_hwcap2): Likewise.
459 * linux-ppc-low.c (ppc_get_auxv): Remove function.
460 (ppc_arch_setup): Call linux_get_hwcap.
461 * linux-s390-low.c (s390_get_hwcap): Remove function.
462 (s390_arch_setup): Call linux_get_hwcap.
463
1ef53e6b
AH
4642019-03-22 Alan Hayward <alan.hayward@arm.com>
465 Jiong Wang <jiong.wang@arm.com>
466
467 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
468 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
469 to fail.
470 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
471
ee4fbcfa
AH
4722019-03-22 Alan Hayward <alan.hayward@arm.com>
473 Jiong Wang <jiong.wang@arm.com>
474
475 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
476 (aarch64_get_hwcap): New function.
477 (aarch64_arch_setup): Read APIA hwcap.
478
6dc0ebde
AH
4792019-03-22 Alan Hayward <alan.hayward@arm.com>
480 Jiong Wang <jiong.wang@arm.com>
481
482 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
483 (initialize_low_tracepoint): Likewise.
484 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
485 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
486 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
487 (aarch64_linux_read_description): Likewise.
488 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
489
1163a4b7
JB
4902019-03-12 John Baldwin <jhb@FreeBSD.org>
491
492 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
493 i386_create_target_description for 'segments' parameter.
494 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
495 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
496 * win32-i386-low.c (i386_arch_setup): Likewise.
497
d3a70e03
TT
4982019-03-12 Tom Tromey <tromey@adacore.com>
499
500 * linux-low.c (iterate_over_lwps): Update.
501
37991b4f
TT
5022019-03-06 Tom Tromey <tom@tromey.com>
503
504 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
505 (captured_main): Use SCOPE_EXIT.
506
45950eb6
SDJ
5072019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
508
509 * configure.srv: Use '$enable_unittest' instead of '$development'
510 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
511 case.
512
43ac54fc
TT
5132019-02-27 Tom Tromey <tromey@adacore.com>
514
515 * gdbreplay.c (logchar): Handle \r\n.
516
df0da8a2
AH
5172019-02-07 Alan Hayward <alan.hayward@arm.com>
518
519 * linux-low.c (linux_attach): Add process before lwp.
520 * server.c (attach_inferior): Check if already attached.
521
1a5c2598
TT
5222019-02-07 Tom Tromey <tom@tromey.com>
523
524 * x86-tdesc.h: Rename include guard.
525 * x86-low.h: Add include guard.
526 * wincecompat.h: Rename include guard.
527 * win32-low.h: Add include guard.
528 * utils.h: Rename include guard.
529 * tracepoint.h: Rename include guard.
530 * tdesc.h: Rename include guard.
531 * target.h: Rename include guard.
532 * server.h: Rename include guard.
533 * remote-utils.h: Rename include guard.
534 * regcache.h: Rename include guard.
535 * nto-low.h: Rename include guard.
536 * notif.h: Add include guard.
537 * mem-break.h: Rename include guard.
538 * lynx-low.h: Add include guard.
539 * linux-x86-tdesc.h: Add include guard.
540 * linux-s390-tdesc.h: Add include guard.
541 * linux-ppc-tdesc-init.h: Add include guard.
542 * linux-low.h: Add include guard.
543 * linux-aarch64-tdesc.h: Add include guard.
544 * linux-aarch32-low.h: Add include guard.
545 * inferiors.h: Rename include guard.
546 * i387-fp.h: Rename include guard.
547 * hostio.h: Rename include guard.
548 * gdbthread.h: Rename include guard.
549 * gdb_proc_service.h: Rename include guard.
550 * event-loop.h: Rename include guard.
551 * dll.h: Rename include guard.
552 * debug.h: Rename include guard.
553 * ax.h: Rename include guard.
554
956cc47c
SN
5552018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
556
557 PR gdb/23985
558 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
559 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
560
a0707f3c
TT
5612019-01-25 Tom Tromey <tom@tromey.com>
562
563 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
564
0747795c
TT
5652019-01-25 Tom Tromey <tom@tromey.com>
566
567 * win32-low.c: Fix common/ includes.
568 * win32-i386-low.c: Fix common/ includes.
569 * tracepoint.c: Fix common/ includes.
570 * thread-db.c: Fix common/ includes.
571 * target.h: Fix common/ includes.
572 * symbol.c: Fix common/ includes.
573 * spu-low.c: Fix common/ includes.
574 * server.h: Fix common/ includes.
575 * server.c: Fix common/ includes.
576 * remote-utils.c: Fix common/ includes.
577 * regcache.h: Fix common/ includes.
578 * regcache.c: Fix common/ includes.
579 * nto-x86-low.c: Fix common/ includes.
580 * notif.h: Fix common/ includes.
581 * mem-break.h: Fix common/ includes.
582 * lynx-low.c: Fix common/ includes.
583 * lynx-i386-low.c: Fix common/ includes.
584 * linux-x86-tdesc-selftest.c: Fix common/ includes.
585 * linux-x86-low.c: Fix common/ includes.
586 * linux-low.c: Fix common/ includes.
587 * inferiors.h: Fix common/ includes.
588 * i387-fp.c: Fix common/ includes.
589 * hostio.c: Fix common/ includes.
590 * hostio-errno.c: Fix common/ includes.
591 * gdbthread.h: Fix common/ includes.
592 * gdbreplay.c: Fix common/ includes.
593 * fork-child.c: Fix common/ includes.
594 * event-loop.c: Fix common/ includes.
595 * ax.c:
596 (enum gdb_agent_op): Fix common/ includes.
597
be6d4f74
TT
5982019-01-21 Tom Tromey <tom@tromey.com>
599
600 * tracepoint.c: Fix includes.
601 * remote-utils.c: Fix includes.
602 * linux-x86-low.c: Fix includes.
603
66d91b39
JB
6042019-01-01 Joel Brobecker <brobecker@adacore.com>
605
606 * gdbreplay.c (gdbreplay_version): Update copyright year in
607 version message.
608 * server.c (gdbserver_version): Likewise.
609
754e3168
AH
6102018-12-05 Alan Hayward <alan.hayward@arm.com>
611
612 * linux-low.c (add_lwp): Switch ordering.
613
d105de22
TT
6142018-11-29 Tom Tromey <tom@tromey.com>
615
616 * win32-low.c (win32_join): Take pid, not process.
617 * target.h (struct target_ops) <join>: Change argument type.
618 (join_inferior): Change argument name.
619 * spu-low.c (spu_join): Take pid, not process.
620 * server.c (handle_detach): Preserve pid before destroying
621 process.
622 * lynx-low.c (lynx_join): Take pid, not process.
623 * linux-low.c (linux_join): Take pid, not process.
624
50138245
AH
6252018-11-23 Alan Hayward <alan.hayward@arm.com>
626
627 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
628 (aarch64_cannot_fetch_register): Likewise.
629 (struct linux_target_ops): Update references.
630
64f57f3d
PFC
6312018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
632
633 * linux-ppc-low.c: Include nat/linux-ptrace.h.
634
8d619c01
EBM
6352018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
636
637 * configure.srv (ipa_ppc_linux_regobj): Add
638 powerpc-isa207-htm-vsx32l-ipa.o and
639 powerpc-isa207-htm-vsx64l-ipa.o.
640 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
641 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
642 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
643 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
644 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
645 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
646 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
647 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
648 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
649 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
650 (init_registers_powerpc_isa207_htm_vsx32l)
651 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
652 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
653 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
654 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
655 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
656 (ppc_store_tm_ctarregset): New functions.
657 (ppc_regsets): Add entries for HTM regsets.
658 (ppc_arch_setup): Set htm in features struct when needed. Set
659 sizes for the HTM regsets.
660 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
661 (initialize_low_arch): Call
662 init_registers_powerpc_isa207_htm_vsx32l and
663 init_registers_powerpc_isa207_htm_vsx64l.
664 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
665 PPC_TDESC_ISA207_HTM_VSX.
666 (initialize_low_tracepoint): Call
667 init_registers_powerpc_isa207_htm_vsx32l and
668 init_registers_powerpc_isa207_htm_vsx64l.
669
232bfb86
EBM
6702018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
671
672 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
673 rs6000/power-linux-pmu.xml to srv_xmlfiles.
674 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
675 (ppc_store_pmuregset): New functions.
676 (ppc_regsets): Add entries for ebb and pmu regsets.
677 (ppc_arch_setup): Set isa207 in features struct if the ebb and
678 pmu regsets are available. Set sizes for these regsets.
679
f2cf6173
EBM
6802018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
681
682 * configure.srv (ipa_ppc_linux_regobj): Add
683 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
684 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
685 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
686 rs6000/powerpc-isa207-vsx32l.xml, and
687 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
688 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
689 <PPC_TDESC_ISA207_VSX>: New enum value.
690 (init_registers_powerpc_isa207_vsx32l): Declare.
691 (init_registers_powerpc_isa207_vsx64l): Declare.
692 * linux-ppc-low.c (ppc_fill_tarregset): New function.
693 (ppc_store_tarregset): New function.
694 (ppc_regsets): Add entry for the TAR regset.
695 (ppc_arch_setup): Set isa207 in features struct when needed. Set
696 size for the TAR regsets.
697 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
698 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
699 and init_registers_powerpc_isa207_vsx64l.
700 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
701 (initialize_low_tracepoint): Call
702 init_registers_powerpc_isa207_vsx32l and
703 init_registers_powerpc_isa207_vsx64l.
704
7ca18ed6
EBM
7052018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
706 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
707
708 * configure.srv (ipa_ppc_linux_regobj): Add
709 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
710 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
711 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
712 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
713 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
714 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
715 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
716 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
717 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
718 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
719 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
720 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
721 (ppc_hwcap): Add comment.
722 (ppc_hwcap2): New global.
723 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
724 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
725 (ppc_regsets): Add entries for the DSCR and PPR regsets.
726 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
727 when needed. Set sizes for the the DSCR and PPR regsets.
728 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
729 (initialize_low_arch): Call
730 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
731 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
732 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
733 PPC_TDESC_ISA205_PPR_DSCR_VSX.
734 (initialize_low_tracepoint): Call
735 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
736 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
737
5c849b22
PFC
7382018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
739
740 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
741
8ecfd7bd
SDJ
7422018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
743 Simon Marchi <simark@simark.ca>
744
745 * acinclude.m4: Include "../selftest.m4".
746 * configure: Regenerate.
747 * configure.ac: Use "GDB_AC_SELFTEST".
748 * configure.srv: Use "$enable_unittests" instead of
749 "$development" when checking whether unit tests have been
750 enabled.
751 * server.c (captured_main): Update message informing that
752 selftests have been disabled.
753
96643e35
TT
7542018-10-04 Tom Tromey <tom@tromey.com>
755
756 * configure: Rebuild.
757
da4ae14a
TT
7582018-10-04 Tom Tromey <tom@tromey.com>
759
760 * server.c (handle_status): Rename inner "thread".
761 (process_serial_event): Declare "res" in 'm' case.
762 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
763 (iterate_over_lwps): Rename inner "thread".
764 (linux_qxfer_libraries_svr4): Rename inner "len".
765 * gdbthread.h (find_thread_in_random): Rename inner "thread".
766
7c619dbd
GB
7672018-10-01 Gary Benson <gbenson@redhat.com>
768
769 * gdb_proc_service.h: Moved common code to
770 common/gdb_proc_service.h.
771
3795e814
GB
7722018-10-01 Gary Benson <gbenson@redhat.com>
773
774 * gdb_proc_service.h: Synchronize comments and whitespace with
775 GDB's version of this file.
776
49b036f1
TT
7772018-09-25 Tom Tromey <tom@tromey.com>
778
779 * configure: Rebuild.
780 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
781
8ff03f0b
SM
7822018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
783
784 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
785 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
786 ($(IPA_LIB)): Sort IPA_OBJS.
787
a1cd91dc
SM
7882018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
789
790 * Makefile.in: Remove references to $(ADD_DEPS).
791
752312ba
TT
7922018-09-16 Tom Tromey <tom@tromey.com>
793
794 * remote-utils.c (remote_open): Use GNU style for metasyntactic
795 variables.
796 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
797 variables.
798
f1628857
TT
7992018-09-05 Tom Tromey <tom@tromey.com>
800
801 * configure: Rebuild.
802
ad202fcc
SM
8032018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
804
805 PR build/23399
806 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
807
d3d8724a
TT
8082018-08-27 Tom Tromey <tom@tromey.com>
809
810 PR build/23087:
811 * configure: Rebuild.
812
b4f183d2
TT
8132018-08-27 Tom Tromey <tom@tromey.com>
814
815 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
816 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
817 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
818 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
819 (s390x_emit_stack_adjust): Add casts to unsigned char.
820
4e2aa472
SM
8212018-08-22 Simon Marchi <simon.marchi@ericsson.com>
822
823 PR gdb/23374
824 PR gdb/23375
825 * server.h (struct client_state) <disable_randomization>:
826 Initialize to 1.
827
cf4088a9
SM
8282018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
829
830 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
831 variable.
832 (mips_supply_ptrace_register): Likewise.
833
a0de763e
TT
8342018-07-22 Tom Tromey <tom@tromey.com>
835
836 * configure: Rebuild.
837
b0a7723d
TT
8382018-07-22 Tom Tromey <tom@tromey.com>
839
840 * win32-low.c (win32_create_inferior): Remove unused variables.
841 * gdbreplay.c (remote_open): Remove unused variable.
842 * remote-utils.c (remote_prepare): Remove unused variable.
843 * x86-tdesc.h (X86_TDESC_H): Define.
844 (amd64_expedite_regs): Define conditionally.
845 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
846 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
847 * remote-utils.c (readchar): Remove unused variable.
848
a780ef4f
PA
8492018-07-13 Pedro Alves <palves@redhat.com>
850
851 * linux-low.c (linux_kill): Change parameter to process_info
852 pointer instead of pid. Adjust.
853 * lynx-low.c (lynx_kill): Likewise.
854 * nto-low.c (nto_kill): Likewise.
855 * spu-low.c (spu_kill): Likewise.
856 * win32-low.c (win32_kill): Likewise.
857 * server.c (handle_v_kill, kill_inferior_callback)
858 (detach_or_kill_for_exit): Adjust.
859 * target.c (kill_inferior): Change parameter to process_info
860 pointer instead of pid. Adjust.
861 * target.h (struct target_ops) <kill>: Change parameter to
862 process_info pointer instead of pid. Adjust all implementations
863 and callers.
864 (kill_inferior): Likewise.
865
ef2ddb33
PA
8662018-07-13 Pedro Alves <palves@redhat.com>
867
868 * linux-low.c (linux_detach, linux_join): Change parameter to
869 process_info pointer instead of pid. Adjust.
870 * lynx-low.c (lynx_detach, lynx_join): Likewise.
871 * nto-low.c (nto_detach): Likewise.
872 * spu-low.c (spu_detach, spu_join): Likewise.
873 * win32-low.c (win32_detach, win32_join): Likewise.
874 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
875 * target.h (struct target_ops) <detach, join>: Change parameter to
876 process_info pointer instead of pid. Adjust all implementations
877 and callers.
878 (detach_inferior, join_inferior): Rename 'pid' parameter to
879 'proc'.
880
c7ab0aef
SDJ
8812018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
882 Jan Kratochvil <jan.kratochvil@redhat.com>
883 Paul Fertser <fercerpav@gmail.com>
884 Tsutomu Seki <sekiriki@gmail.com>
885
886 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
887 (OBS): Add 'common/netstuff.o'.
888 (GDBREPLAY_OBS): Likewise.
889 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
890 (remote_open): Implement support for IPv6
891 connections.
892 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
893 and 'wspiapi.h'.
894 (handle_accept_event): Accept connections from IPv6 sources.
895 (remote_prepare): Handle IPv6-style hostnames; implement
896 support for IPv6 connections.
897 (remote_open): Implement support for printing connections from
898 IPv6 sources.
899
31445d10
PA
9002018-07-11 Pedro Alves <palves@redhat.com>
901
902 PR gdb/23377
903 * mem-break.c (any_persistent_commands): Add process_info
904 parameter and use it instead of relying on the current process.
905 Change return type to bool.
906 * mem-break.h (any_persistent_commands): Add process_info
907 parameter and change return type to bool.
908 * server.c (handle_detach): Remove require_running_or_return call.
909 Look up the process_info for the process we're about to detach.
910 If not found, return back error to GDB. Adjust
911 any_persistent_commands call to pass down a process pointer.
912
cb197132
PA
9132018-07-11 Pedro Alves <palves@redhat.com>
914
915 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
916 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
917 instead of collect_register_by_name.
918 * regcache.c (regcache_raw_get_unsigned_by_name): New.
919 * regcache.h (regcache_raw_get_unsigned_by_name): New.
920
1b919490
VB
9212018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
922 Pedro Alves <palves@redhat.com>
923
924 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
925
d7e15655
TT
9262018-07-03 Tom Tromey <tom@tromey.com>
927
928 * linux-low.c: Update.
929 * lynx-low.c: Update.
930 * mem-break.c: Update.
931 * nto-low.c: Update.
932 * remote-utils.c: Update.
933 * server.c: Update.
934 * spu-low.c: Update.
935 * target.c: Update.
936 * win32-low.c: Update.
937
26a57c92
TT
9382018-07-03 Tom Tromey <tom@tromey.com>
939
940 * server.c: Update.
941
0e998d96
TT
9422018-07-03 Tom Tromey <tom@tromey.com>
943
944 * linux-low.c: Update.
945
cc6bcb54
TT
9462018-07-03 Tom Tromey <tom@tromey.com>
947
948 * target.c: Update.
949
e38504b3
TT
9502018-07-03 Tom Tromey <tom@tromey.com>
951
952 * linux-low.c: Update.
953 * linux-mips-low.c: Update.
954 * lynx-low.c: Update.
955 * nto-low.c: Update.
956 * remote-utils.c: Update.
957 * server.c: Update.
958 * spu-low.c: Update.
959 * target.c: Update.
960 * thread-db.c: Update.
961
e99b03dc
TT
9622018-07-03 Tom Tromey <tom@tromey.com>
963
964 * linux-low.c: Update.
965 * linux-mips-low.c: Update.
966 * lynx-low.c: Update.
967 * mem-break.c: Update.
968 * nto-low.c: Update.
969 * remote-utils.c: Update.
970 * server.c: Update.
971 * spu-low.c: Update.
972 * target.c: Update.
973 * tracepoint.c: Update.
974
f2907e49
TT
9752018-07-03 Tom Tromey <tom@tromey.com>
976
977 * linux-low.c: Update.
978 * linux-ppc-low.c: Update.
979 * linux-x86-low.c: Update.
980 * proc-service.c: Update.
981 * server.c: Update.
982 * spu-low.c: Update.
983 * thread-db.c: Update.
984 * win32-low.c: Update.
985
fd79271b
TT
9862018-07-03 Tom Tromey <tom@tromey.com>
987
988 * linux-low.c: Update.
989 * lynx-low.c: Update.
990 * nto-low.c: Update.
991 * remote-utils.c: Update.
992 * spu-low.c: Update.
993 * thread-db.c: Update.
994 * win32-low.c: Update.
995
c0867626
SDJ
9962018-06-29 Joel Brobecker <brobecker@adacore.com>
997
998 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
999 parameter in call to 'amd64_create_target_description'.
1000
2512d7ef
JK
10012018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1002
1003 * x86-tdesc.h: Remove executable permission flag.
1004
d0ac1c44
SM
10052018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1006
1007 * configure.ac: Remove AC_PREREQ, add missing quoting.
1008 * configure: Re-generate.
1009 * config.in: Re-generate.
1010 * aclocal.m4: Re-generate.
1011
c4eb05ff
SM
10122018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1013
1014 * tracepoint.h (current_traceframe): Remove declaration.
1015
02895270
AH
10162018-06-18 Alan Hayward <alan.hayward@arm.com>
1017
1018 * linux-aarch64-low.c (is_sve_tdesc): New function.
1019 (aarch64_sve_regs_copy_to_regcache): Likewise.
1020 (aarch64_sve_regs_copy_from_regcache): Likewise.
1021 (aarch64_regs_info): Add SVE checks.
1022 (initialize_low_arch): Initialize SVE.
1023
e9902bfc
AH
10242018-06-18 Alan Hayward <alan.hayward@arm.com>
1025
1026 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1027
fefa175e
AH
10282018-06-11 Alan Hayward <alan.hayward@arm.com>
1029
1030 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1031 (initialize_low_tracepoint): Likewise
1032 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1033 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1034 param.
1035 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1036 checks.
1037 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1038
b91ad3ff
AH
10392018-06-11 Alan Hayward <alan.hayward@arm.com>
1040
1041 * server.h (PBUFSIZ): Increase size
1042
f868386e
AH
10432018-06-11 Alan Hayward <alan.hayward@arm.com>
1044
1045 * regcache.c (regcache::raw_compare): New function.
1046 * regcache.h (regcache::raw_compare): New declaration.
1047
9c861883
AH
10482018-06-11 Alan Hayward <alan.hayward@arm.com>
1049
1050 * regcache.c (new_register_cache): Use new.
1051 (free_register_cache): Use delete.
1052 (register_data): Use const.
1053 (supply_register): Move body inside regcache.
1054 (regcache::raw_supply): New override function.
1055 (collect_register): Move body inside regcache.
1056 (regcache::raw_collect): New override function.
1057 (regcache::get_register_status): New override function.
1058 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1059
40591844
TT
10602018-06-09 Tom Tromey <tom@tromey.com>
1061
1062 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1063 declare queue.
1064 (event_queue): Use std::queue.
1065 (gdb_event_xfree): Remove.
1066 (initialize_event_loop, process_event, wait_for_event): Update.
1067
6341380d
SC
10682018-06-08 Stan Cox <scox@redhat.com>
1069
1070 * win32-low.c (win32_create_inferior): last_ptid and last_status
1071 moved to client_state.
1072
03349c93
PA
10732018-06-08 Pedro Alves <palves@redhat.com>
1074
1075 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1076 common/common-exceptions.o, common/common-utils.o,
1077 common/errors.o, common/print-utils.o and utils.o.
1078 * gdbreplay.c: Include "common-defs.h" instead of the two
1079 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1080 string.h or alloca.h.
1081 (perror_with_name): Delete.
1082 (remote_open): Use xstrdup instead of strdup.
1083 (main): Rename to ...
1084 (captured_main): ... this.
1085 (main): New.
1086
8dcc53b3
TT
10872018-06-08 Tom Tromey <tom@tromey.com>
1088
1089 * linux-low.c (linux_low_read_btrace): Update.
1090
c12a5089
SC
10912018-06-04 Stan Cox <scox@redhat.com>
1092
1093 * server.h (struct client_state): New.
1094 * server.c (cont_thread, general_thread, multi_process)
1095 (report_fork_events, report_vfork_events, report_exec_events)
1096 (report_thread_events, swbreak_feature, hwbreak_feature)
1097 (vCont_supported, disable_randomization, pass_signals)
1098 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1099 Moved to client_state.
1100 * remote-utils.c (remote_debug, noack_mode)
1101 (transport_is_reliable): Moved to client_state.
1102 * tracepoint.c (current_traceframe): Moved to client_state.
1103
1104 Update all callers.
1105 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1106 linux-low.c, remote-utils.h, target.c: Use client_state.
1107
122394f1
AH
11082018-05-31 Alan Hayward <alan.hayward@arm.com>
1109
1110 * configure.srv: Add new c/h file.
1111
95228a0d
AH
11122018-05-31 Alan Hayward <alan.hayward@arm.com>
1113
1114 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1115 null VQ.
1116
d8dab6c3
MR
11172018-05-25 Maciej W. Rozycki <macro@mips.com>
1118
1119 * gdb.arch/mips-fpregset-core.exp: New test.
1120 * gdb.arch/mips-fpregset-core.c: New test source.
1121
81e25b7c
EK
11222018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1123
1124 PR server/23198
1125 * hostio.c (require_int): Do not report overflow for integers
1126 between 0xfffffff and 0x7fffffff.
1127
7e947ad3
MR
11282018-05-22 Maciej W. Rozycki <macro@mips.com>
1129
1130 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1131 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1132 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1133 functions.
1134 (the_low_target): Wire them.
1135
1d75a658
PFC
11362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1137
1138 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1139 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1140 mode. Call collect_register_by_name with vscr using
1141 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1142 (ppc_store_vrregset): Add and set vscr_offset variable as in
1143 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1144 vscr_offset.
1145
d078308a
PFC
11462018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1147
1148 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1149 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1150 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1151
7273b5fc
PFC
11522018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1153
1154 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1155 (ppc_store_vsxregset): Likewise.
1156 (ppc_fill_vrregset): Likewise.
1157 (ppc_store_vrregset): Likewise.
1158 (ppc_fill_evrregset): Likewise.
1159 (ppc_store_evrregset): Likewise.
1160 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1161 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1162 needed.
1163
2e077f5e
PFC
11642018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1165
1166 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1167 wordsize of the inferior. Call ppc_linux_target_wordsize.
1168
bd64614e
PFC
11692018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1170
1171 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1172 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1173 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1174 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1175 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1176 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1177 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1178 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1179 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1180 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1181 (tdesc_powerpc_e500l): Remove.
1182 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1183 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1184 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1185 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1186 linux-ppc-tdesc.h.
1187 (ppc_arch_setup): Remove target description matching code. Fill a
1188 ppc_linux_features struct and call ppc_linux_match_description
1189 with it.
1190
75d74cca
MR
11912018-05-22 Maciej W. Rozycki <macro@mips.com>
1192
1193 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1194 width of the requested register exceeds the width of the
1195 `ptrace' data type.
1196 (mips_cannot_store_register): Likewise.
1197
e4439e43
MR
11982018-05-21 Maciej W. Rozycki <macro@mips.com>
1199
1200 * linux-mips-low.c (mips_fetch_register): New function. Update
1201 preceding comment.
1202 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1203 (the_low_target): Wire `mips_fetch_register'.
1204
55271bf9
JB
12052018-05-10 Joel Brobecker <brobecker@adacore.com>
1206
1207 * lynx-i386-low.c (LYNXOS_178): New macro.
1208 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1209 the layout on LynxOS-178.
1210 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1211 handle floating point registers that are not supported by
1212 LynxOS-178.
1213
1a34f210
TT
12142018-05-10 Tom Tromey <tom@tromey.com>
1215
1216 * configure: Rebuild.
1217
190852c8
JB
12182018-05-10 Joel Brobecker <brobecker@adacore.com>
1219
1220 PR server/23158:
1221 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1222 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1223 Use it to set the expedite_regs field in the given tdesc.
1224 * x86-tdesc.h: New file.
1225 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1226 Adjust following the addition of the new expedite_regs parameter
1227 to init_target_desc.
1228 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1229 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1230 (i386_linux_read_description, amd64_linux_read_description):
1231 Adjust following the addition of the new expedite_regs parameter
1232 to init_target_desc.
1233 * lynx-i386-low.c: #include "x86-tdesc.h".
1234 (lynx_i386_arch_setup): Adjust following the addition of the new
1235 expedite_regs parameter to init_target_desc.
1236 * nto-x86-low.c: #include "x86-tdesc.h".
1237 (nto_x86_arch_setup): Adjust following the addition of the new
1238 expedite_regs parameter to init_target_desc.
1239 * win32-i386-low.c: #include "x86-tdesc.h".
1240 (i386_arch_setup): Adjust following the addition of the new
1241 expedite_regs parameter to init_target_desc.
1242
7dbac825
JB
12432018-05-10 Joel Brobecker <brobecker@adacore.com>
1244
1245 PR server/23158:
1246 * win32-low.c (win32_create_inferior): Add call to my_wait
1247 setting last_status global.
1248
906994d9
JB
12492018-05-10 Joel Brobecker <brobecker@adacore.com>
1250
1251 PR server/23158:
1252 * win32-low.c (create_process): Only call gdb_tilde_expand if
1253 inferior_cwd is not NULL.
1254
8ee22052
AB
12552018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1256
1257 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1258 registers to the cache if their values have changed.
1259 (i387_xsave_to_cache): Provide default values for x87 control
1260 registers when these features are available, but disabled.
1261 * regcache.c (supply_register_by_name_zeroed): New function.
1262 * regcache.h (supply_register_by_name_zeroed): Declare new
1263 function.
1264
aff689d3
TT
12652018-05-07 Tom Tromey <tom@tromey.com>
1266
1267 * configure: Rebuild.
1268
85e26832
TT
12692018-05-04 Tom Tromey <tom@tromey.com>
1270
1271 * configure: Rebuild.
1272
a3b60e45
JK
12732018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1274 Pedro Alves <palves@redhat.com>
1275
1276 * linux-aarch64-low.c (aarch64_stopped_data_address):
1277 Likewise.
1278
632e107b
TT
12792018-04-27 Tom Tromey <tom@tromey.com>
1280
1281 * configure: Rebuild.
1282
458412c3
TT
12832018-04-23 Tom Tromey <tom@tromey.com>
1284
1285 * configure: Rebuild.
1286
f31c089e
SM
12872018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * Makefile.in (depcomp): Add "..".
1290 (all_deps_files): New and use it.
1291
b319b098
AH
12922018-04-18 Alan Hayward <alan.hayward@arm.com>
1293
1294 * configure.srv (aarch64*-*-linux*): Don't include xml.
1295 (i[34567]86-*-cygwin*): Likewise.
1296 (i[34567]86-*-linux*): Likewise.
1297 (i[34567]86-*-lynxos*): Likewise.
1298 (i[34567]86-*-mingw32ce*): Likewise.
1299 (i[34567]86-*-mingw*): Likewise.
1300 (i[34567]86-*-nto*): Likewise.
1301 (tic6x-*-uclinux): Likewise.
1302 (x86_64-*-linux*): Likewise.
1303 (x86_64-*-mingw*): Likewise.
1304 (x86_64-*-cygwin*): Likewise.
1305
3b74854b
AH
13062018-04-18 Alan Hayward <alan.hayward@arm.com>
1307
1308 * tdesc.c: Remove xml parameter.
1309
e98577a9
AH
13102018-04-18 Alan Hayward <alan.hayward@arm.com>
1311
1312 * server.c (get_features_xml): Remove cast.
1313 * tdesc.c (void target_desc::accept): Fill in function.
1314 (tdesc_get_features_xml): Remove old xml creation.
1315 (print_xml_feature::visit_pre): Add xml vistor.
1316 * tdesc.h (struct target_desc): Make xmltarget mutable.
1317 (tdesc_get_features_xml): Remove declaration.
1318
d278f585
AH
13192018-04-18 Alan Hayward <alan.hayward@arm.com>
1320
1321 * tdesc.c (tdesc_architecture_name): Add new function.
1322 (tdesc_osabi_name): Likewise.
1323 (tdesc_get_features_xml): Use new functions.
1324
eee8a18d
AH
13252018-04-18 Alan Hayward <alan.hayward@arm.com>
1326
1327 * tdesc.c (tdesc_create_flags): Remove.
1328 (tdesc_add_flag): Likewise.
1329 (tdesc_named_type): Likewise.
1330 (tdesc_create_union): Likewise.
1331 (tdesc_create_struct): Likewise.
1332 (tdesc_create_vector): Likewise.
1333 (tdesc_add_bitfield): Likewise.
1334 (tdesc_add_field): Likewise.
1335 (tdesc_set_struct_size): Likewise.
1336
82ec9bc7
AH
13372018-04-18 Alan Hayward <alan.hayward@arm.com>
1338
1339 * tdesc.c (~target_desc): Remove implictly deleted items.
1340 (init_target_desc): Iterate all features.
1341 (tdesc_get_features_xml): Use vector.
1342 (tdesc_create_feature): Create feature.
1343 * tdesc.h (tdesc_feature) Remove
1344 (target_desc): Add features.
1345
ea3e7d71
AH
13462018-04-18 Alan Hayward <alan.hayward@arm.com>
1347
1348 * Makefile.in: Add common/tdesc.c
1349 * tdesc.c (init_target_desc): init all reg_defs from register
1350 vector.
1351 (tdesc_create_reg): Create tdesc_reg.
1352 * tdesc.h (tdesc_feature): Add register vector.
1353
17d08cd4
SM
13542018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1355
1356 * tdesc.h (struct target_desc) <features>: Change type to
1357 std::vector<std::string>.
1358 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1359 changes.
1360 (tdesc_get_features_xml): Likewise.
1361 (tdesc_create_feature): Likewise.
1362
5cd3e386
AH
13632018-03-26 Alan Hayward <alan.hayward@arm.com>
1364
1365 * regcache.c (find_register_by_number): Return a ref.
1366 (find_regno): Use references.
1367 (register_size): Likewise.
1368 (register_data): Likewise.
1369 * tdesc.c (target_desc::~target_desc): Remove free calls.
1370 (target_desc::operator==): Use std::vector compare.
1371 (init_target_desc): Use reference.
1372 (tdesc_create_reg): Use reg constructors.
1373 * tdesc.h (struct target_desc): Replace pointer with object.
1374
dff7492c
AH
13752018-03-23 Alan Hayward <alan.hayward@arm.com>
1376
1377 * regcache.c (find_register_by_number): Make static.
1378 (find_regno): Use find_register_by_number
1379 * regcache.h (struct reg): Remove declaration.
1380
d80e5242
AH
13812018-03-23 Alan Hayward <alan.hayward@arm.com>
1382
1383 * tdesc.c (target_desc::~target_desc): Move to here.
1384 (target_desc::operator==): Likewise.
1385 * tdesc.h (target_desc::~target_desc): Move from here.
1386 (target_desc::operator==): Likewise.
1387
f69c5afb
AA
13882018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1389
1390 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1391
ce29f843
AA
13922018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1393
1394 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1395 S390_TDESC_GS.
1396 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1397 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1398 and init_registers_s390_gs_linux64.
1399
c49bd90b
AA
14002018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1401
1402 * linux-s390-low.c (s390_fill_gs): Remove function.
1403 (s390_fill_gsbc): Remove function.
1404 (s390_regsets): Set fill functions for the guarded storage regsets
1405 to NULL.
1406
7edb9bd3
AA
14072018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1408
1409 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1410 the word size. Add comment.
1411 (s390_get_wordsize): New function.
1412 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1413 pswm with it. Instead, use s390_get_wordsize to determine the
1414 word size first and derive the correct tdesc from that directly.
1415
39be3c7e
SM
14162018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1417
1418 * Makefile.in: Include silent-rules.mk.
1419 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1420 (COMPILE): Add ECHO_CXX.
1421 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1422 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1423 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1424 (version-generated.c): Add ECHO_GEN.
1425 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1426 (IPAGENT_COMPILE): Add ECHO_CXX.
1427 (%-generated.c): Add ECHO_REGDAT.
1428
3ae9ce5d
TT
14292018-03-14 Tom Tromey <tom@tromey.com>
1430
1431 PR cli/14977:
1432 * ax.c (ax_printf): Special case for NULL.
1433
e6a58aa8
SM
14342018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * linux-low.c (linux_qxfer_libraries_svr4): Use
1437 xml_escape_text_append.
1438
f6e8a41e
SM
14392018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1440
1441 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1442
b9671caf
SM
14432018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1444
1445 * server.c (handle_general_set): Remove unnecessary xstrdup.
1446
e80aaf61
SM
14472018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * server.c (parse_debug_format_options): Adjust to
1450 delim_string_to_char_ptr_vec changes.
1451 * thread-db.c (thread_db_load_search): Adjust to
1452 dirnames_to_char_ptr_vec changes.
1453
b1223e78
MM
14542018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1455
1456 * target.h (target_enable_btrace, target_disable_btrace)
1457 (target_read_btrace, target_read_btrace_conf): Turn macro into
1458 inline function. Throw error if target method is not defined.
1459 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1460 check for btrace target method. Be prepared to handle exceptions
1461 from btrace target methods.
1462
81561546
SDJ
14632018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1464
1465 * server.c (captured_main): Change order of error message printed
1466 when the current working directory cannot be found.
1467
25e3c82c
SDJ
14682018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1469
1470 * server.c: Include "filenames.h" and "pathstuff.h".
1471 (program_name): Delete variable.
1472 (program_path): New anonymous class.
1473 (get_exec_wrapper): Use "program_path" instead of
1474 "program_name".
1475 (handle_v_run): Likewise.
1476 (captured_main): Likewise.
1477 (process_serial_event): Likewise.
1478
b4987c95
SDJ
14792018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1480
1481 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1482 (OBJS): Add "pathstuff.o".
1483 * server.c (current_directory): New global variable.
1484 (captured_main): Initialize "current_directory".
1485
f46cd62a
AH
14862018-02-26 Alan Hayward <alan.hayward@arm.com>
1487
1488 * tdesc.c: Use common/tdesc.h.
1489 * tdesc.h: Likewise.
1490
a543c5ca
AH
14912018-02-20 Alan Hayward <alan.hayward@arm.com>
1492 Simon Marchi <simon.marchi@ericsson.com>
1493
1494 * Makefile.in: Switch order of make rules.
1495
b5884fa7
AH
14962018-02-19 Alan Hayward <alan.hayward@arm.com>
1497
1498 * Makefile.in: Add common directory in build.
1499 * configure.ac: Add common reference.
1500 * configure: Regenerate.
1501
de6242d3
MM
15022018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1503
1504 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1505 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1506 * spu-low.c (spu_target_ops): Likewise.
1507 * win32-low.c (win32_target_ops): Likewise.
1508 * server.c (supported_btrace_packets): Report packets unconditionally.
1509 * target.h (target_ops) <supports_btrace>: Remove.
1510 (target_supports_btrace): Remove.
1511
9ee23a85
MM
15122018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1513
1514 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1515 (handle_btrace_disable): Change return type to void. Use exceptions
1516 to report errors.
1517 (handle_btrace_general_set): Catch exception and copy message to
1518 return message.
1519
8ce47547
TT
15202018-02-08 Tom Tromey <tom@tromey.com>
1521
1522 * linux-low.c (install_software_single_step_breakpoints): Use
1523 make_scoped_restore.
1524 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1525 (do_restore_current_thread_cleanup): Remove.
1526 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1527 declare.
1528
45dd3607
TT
15292018-02-08 Tom Tromey <tom@tromey.com>
1530
1531 * mem-break.c (set_raw_breakpoint_at): Use
1532 gdb::unique_xmalloc_ptr.
1533
e671cd59
PA
15342018-01-30 Pedro Alves <palves@redhat.com>
1535
1536 PR gdb/13211
1537 * target.c (target_terminal::terminal_state): Rename to ...
1538 (target_terminal::m_terminal_state): ... this.
1539
a0aad537
JC
15402018-01-19 James Clarke <jrtc27@jrtc27.com>
1541
1542 * linux-low.c (handle_extended_wait): Surround call to
1543 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1544
4d9b86e1
SM
15452018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1548 linux_ptrace_attach_fail_reason_string now returning an
1549 std::string.
1550 (linux_attach): Likewise.
1551 * thread-db.c (attach_thread): Likewise.
1552
f517c180
EA
15532018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1554
1555 PR gdb/21559
1556 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1557 checking for fs_base/gs_base fields in struct user_regs_struct.
1558 * configure: Regenerate.
1559
9a70f35c
YQ
15602018-01-16 Yao Qi <yao.qi@linaro.org>
1561
1562 PR gdb/18749
1563 * linux-low.c (fetch_register): Call supply_register instead of
1564 error.
1565
605fd3c6
YQ
15662018-01-08 Yao Qi <yao.qi@linaro.org>
1567 Simon Marchi <simon.marchi@ericsson.com>
1568
1569 * Makefile.in (OBS): Remove selftest.o.
1570 * configure.ac: Set srv_selftest_objs if $development is true.
1571 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1572 * configure: Re-generated.
1573 * server.c (captured_main): Wrap variable selftest_filter with
1574 GDB_SELF_TEST.
1575
2cc05030
SM
15762018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1577
1578 * server.c (parse_debug_format_options): Return std::string.
1579 (handle_monitor_command, captured_main): Adjust.
1580
e379cee6
PA
15812018-01-05 Pedro Alves <palves@redhat.com>
1582
1583 PR gdb/18653
1584 * server.c (captured_main): Pass quiet=false to
1585 save_original_signals_state.
1586
82e1e79a
JB
15872018-01-01 Joel Brobecker <brobecker@adacore.com>
1588
1589 * gdbreplay.c (gdbreplay_version): Update copyright year in
1590 version message.
1591 * server.c (gdbserver_version): Likewise.
1592
8e481c3b
TT
15932017-12-08 Tom Tromey <tom@tromey.com>
1594
1595 * ax.c (ax_printf): Update.
1596
a8806230
YQ
15972017-12-07 Yao Qi <yao.qi@linaro.org>
1598
1599 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1600 aarch64_linux_read_description.
1601 * linux-amd64-ipa.c (idx2mask): New array.
1602 (get_ipa_tdesc): Move idx2mask out.
1603 (initialize_low_tracepoint): Initialize target descriptions.
1604 * linux-i386-ipa.c (idx2mask): New array.
1605 (get_ipa_tdesc): Move idx2mask out.
1606 (initialize_low_tracepoint): Initialize target descriptions.
1607
d4a0e8b5
SM
16082017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1609
1610 * tdesc.c (struct tdesc_type): Change return type.
1611 (tdesc_add_flag): Change parameter type.
1612 (tdesc_add_bitfield): Likewise.
1613 (tdesc_add_field): Likewise.
1614 (tdesc_set_struct_size): Likewise.
1615
798a7429
SM
16162017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1617
1618 * regcache.c (registers_to_string): Remove unused variable.
1619
c0e15c9b
SM
16202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1621
1622 * inferiors.c (for_each_inferior_with_data): Remove.
1623 * inferiors.h (for_each_inferior_with_data): Remove.
1624 * server.c (handle_qxfer_threads_worker): Change parameter type.
1625 (handle_qxfer_threads_proper): Use for_each_thread.
1626
f0045347
SM
16272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1628
1629 * inferiors.c (for_each_inferior): Remove.
1630 (clear_inferiors): Use for_each_thread.
1631 * inferiors.h (for_each_inferior): Remove.
1632 * linux-low.c (linux_wait_for_event_filtered): Use
1633 for_each_thread.
1634 (linux_stabilize_threads): Likewise.
1635 * regcache.c (regcache_release): Likewise.
1636 * server.c (gdb_wants_all_threads_stopped): Likewise.
1637 (clear_pending_status_callback): Remove.
1638 (handle_status): Use for_each_thread.
1639 (captured_main): Likewise.
1640 * win32-low.c (child_init_thread_list): Likewise.
1641 (win32_clear_inferiors): Likewise.
1642 (fake_breakpoint_event): Likewise.
1643
9521758b
SM
16442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1645
1646 * inferiors.h (find_inferior): Remove.
1647 * inferiors.c (find_inferior): Remove.
1648
8f86d7aa
SM
16492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 * linux-low.c (resume_status_pending_p): Update comment.
1652 (need_step_over_p): Update comment.
1653
e2b44075
SM
16542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1655
1656 * linux-low.c (proceed_one_lwp): Return void, change parameter
1657 type.
1658 (unsuspend_and_proceed_one_lwp): Likewise.
1659 (proceed_all_lwps): Use for_each_thread.
1660 (unstop_all_lwps): Likewise.
1661
c80825ff
SM
16622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * linux-low.c (linux_resume_one_thread): Return void, take
1665 parameter directly.
1666 (linux_resume): Use for_each_thread.
1667
df3e4dbe
SM
16682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1669
1670 * linux-low.c (send_sigstop_callback): Return void, change
1671 parameter type. Rename to...
1672 (send_sigstop): ... this.
1673 (suspend_and_send_sigstop_callback): Return void, change parameter
1674 type. Rename to...
1675 (suspend_and_send_sigstop): ... this.
1676 (stop_all_lwps): Use for_each_thread.
1677
5a6b0a41
SM
16782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1679
1680 * linux-low.c (lwp_running): Return bool, remove unused
1681 argument.
1682 (linux_stabilize_threads): Use find_thread.
1683
39a64da5
SM
16842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1685
1686 * linux-low.c (select_singlestep_lwp_callback): Remove.
1687 (count_events_callback): Remove.
1688 (select_event_lwp_callback): Remove.
1689 (select_event_lwp): Use find_thread/for_each_thread.
1690
a1385b7b
SM
16912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * linux-low.c (not_stopped_callback): Return bool, take filter
1694 argument directly.
1695 (linux_wait_for_event_filtered): Use find_thread.
1696 (linux_wait_1): Likewise.
1697
454296a2
SM
16982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * linux-low.c (same_lwp): Remove.
1701 (find_lwp_pid): Use find_thread.
1702
6b2a85da
SM
17032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1704
1705 * linux-low.c (delete_lwp_callback): Remove.
1706 (linux_mourn): Use for_each_thread.
1707
798a38e8
SM
17082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1709
1710 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1711 args parameter, don't check for pid.
1712 (linux_detach): Use for_each_thread.
1713
e4eb0dec
SM
17142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1715
1716 * linux-low.c (struct counter): Remove.
1717 (second_thread_of_pid_p): Remove.
1718 (last_thread_of_process_p): Use find_thread.
1719
83e1b6c1
SM
17202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1721
1722 * inferiors.c (find_inferior_in_random): Remove.
1723 * inferiors.h (find_inferior_in_random): Remove.
1724 * linux-low.c (status_pending_p_callback): Return bool, accept
1725 parameter ptid directly.
1726 (linux_wait_for_event_filtered): Use find_thread_in_random.
1727 (linux_wait_1): Likewise.
1728
8dc7b443
SM
17292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1730
1731 * inferiors.c (find_inferior_id): Remove.
1732 (find_thread_ptid): Move implemention from find_inferior_id to
1733 here.
1734 * inferiors.h (find_inferior_id): Remove.
1735 * server.c (handle_status): Use find_thread_ptid.
1736 (process_serial_event): Likewise.
1737 * thread-db.c (find_one_thread): Likewise.
1738 (thread_db_thread_handle): Likewise.
1739 * win32-low.c (thread_rec): Likewise.
1740 (child_delete_thread): Likewise.
1741 (win32_thread_alive): Likewise.
1742 (get_child_debug_event): Likewise.
1743
da25033c
SM
17442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1745
1746 * linux-mips-low.c (update_watch_registers_callback): Return
1747 void, remove pid_p parameter, don't check for pid.
1748 (mips_insert_point, mips_remove_point): Use for_each_thread.
1749
c91bb56b
SM
17502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1751
1752 * lynx.low (lynx_delete_thread_callback): Remove.
1753 (lynx_mourn): Use for_each_thread.
1754
634a3254
SM
17552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1756
1757 * regcache.c (regcache_invalidate_one): Remove.
1758 (regcache_invalidate_pid): use for_each_thread.
1759
41272101
TT
17602017-11-26 Tom Tromey <tom@tromey.com>
1761
1762 * linux-low.c (linux_create_inferior): Update.
1763
f5291a6f
UW
17642017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1765
1766 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1767
6654d750
AH
17682017-11-24 Alan Hayward <alan.hayward@arm.com>
1769
1770 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1771 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1772 * linux-aarch64-tdesc-selftest.c: New file.
1773 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1774
17752017-11-24 Alan Hayward <alan.hayward@arm.com>
1776
1777 * configure.srv: Add new file.
1778 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1779 * linux-aarch64-tdesc-selftest.c: New file.
1780 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1781
49bdb7ee
AH
17822017-11-24 Alan Hayward <alan.hayward@arm.com>
1783
1784 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1785 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1786 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1787
d6d7ce56
AH
17882017-11-24 Alan Hayward <alan.hayward@arm.com>
1789
1790 * configure.srv: Add new files.
1791 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1792 aarch64_linux_read_description.
1793 * linux-aarch64-low.c (aarch64_linux_read_description):
1794 Merge with aarch64_arch_setup.
1795 (aarch64_arch_setup): Call aarch64_linux_read_description.
1796 * linux-aarch64-tdesc.c: New file.
1797 * linux-aarch64-tdesc.h: New file.
1798
506fe5f4
YQ
17992017-11-24 Yao Qi <yao.qi@linaro.org>
1800
1801 * configure.srv: Set $srv_regobj for tic6x-linux.
1802 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1803 (tic6x_read_description): Move some code to tic6x_arch_setup.
1804 (tic6x_tdesc_test): New function.
1805 (initialize_low_arch): Call selftests::register_test.
1806
29f9a567
YQ
18072017-11-22 Yao Qi <yao.qi@linaro.org>
1808
1809 * remote-utils.c (prepare_resume_reply): Use memcpy.
1810
578290ec
SM
18112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1812
1813 * linux-low.c (kill_one_lwp_callback): Return void, take
1814 argument directly, don't filter on pid.
1815 (linux_kill): Use for_each_thread.
1816
eca55aec
SM
18172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * linux-low.c (need_step_over_p): Return bool, remove dummy
1820 argument.
1821 (linux_resume, proceed_all_lwps): Use find_thread.
1822
25c28b4d
SM
18232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * linux-low.c (resume_status_pending_p): Return bool, remove
1826 flag_p argument.
1827 (linux_resume): Use find_thread.
1828
5fdda392
SM
18292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1830
1831 * linux-low.c (struct thread_resume_array): Remove.
1832 (linux_set_resume_request): Return void, take arguments
1833 directly.
1834 (linux_resume): Use for_each_thread.
1835
fcb056a5
SM
18362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1837
1838 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1839 return bool, remove data argument.
1840 (linux_stabilize_threads): Use find_thread.
1841
139720c5
SM
18422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1843
1844 * linux-low.c (unsuspend_one_lwp): Remove.
1845 (unsuspend_all_lwps): Use for_each_thread, inline code from
1846 unsuspend_one_lwp.
1847
6d1e5673
SM
18482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1849
1850 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1851 * linux-low.c (struct iterate_over_lwps_args): Remove.
1852 (iterate_over_lwps_filter): Remove.
1853 (iterate_over_lwps): Use find_thread.
1854
bbf550d5
SM
18552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1856
1857 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1858 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1859 code from reset_lwp_ptrace_options_callback.
1860
00192f77
SM
18612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1862
1863 * linux-arm-low.c (struct update_registers_data): Remove.
1864 (update_registers_callback): Return void, take arguments
1865 directly, don't check thread's pid.
1866 (arm_insert_point, arm_remove_point): Use for_each_thread.
1867
2bee2b6c
SM
18682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1869
1870 * win32-low.c (continue_one_thread): Return void, take argument
1871 directly.
1872 (child_continue): Use for_each_thread.
1873
0b360f19
SM
18742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1875
1876 * win32-i386-low.c (update_debug_registers_callback): Rename
1877 to ...
1878 (update_debug_registers): ... this, return void, remove pid_p arg.
1879 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1880
f27866ba
SM
18812017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1882
1883 * inferiors.h (struct process_info): Add constructor, initialize
1884 fields..
1885 <syscalls_to_catch>: Change type to std::vector<int>.
1886 * inferiors.c (add_process): Allocate process_info with new.
1887 (remove_process): Free process_info with delete.
1888 * linux-low.c (handle_extended_wait): Adjust.
1889 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1890 * server.c (handle_general_set): Adjust.
1891
e849ea89
PA
18922017-11-16 Pedro Alves <palves@redhat.com>
1893
1894 * remote-utils.c (remote_close): Block SIGIO signals instead of
1895 uninstalling the SIGIO handler.
1896
1d0aa65c
AH
18972017-11-16 Alan Hayward <alan.hayward@arm.com>
1898
1899 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1900
3491a34c
YQ
19012017-11-16 Yao Qi <yao.qi@linaro.org>
1902
1903 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1904 (tic6x_store_gregset): Likewise.
1905 (tic6x_usrregs_info): Move it up.
1906
a602f924
AH
19072017-11-15 Alan Hayward <alan.hayward@arm.com>
1908
1909 * Makefile.in: Update arch rules.
1910 * configure.srv: Explicitly mark arch/ files.
1911
5616b6c3
AS
19122017-11-13 Andreas Schwab <schwab@suse.de>
1913
1914 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1915 function.
1916 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1917
d1928160
PA
19182017-11-06 Pedro Alves <palves@redhat.com>
1919
1920 * config.in, configure: Regenerate.
1921
bac608e7
SM
19222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1923
1924 * target.c (struct thread_search): Remove.
1925 (thread_search_callback): Remove.
1926 (prepare_to_access_memory): Use for_each_thread instead of
1927 find_inferior. Inline code from thread_search_callback.
1928
eaddb425
SM
19292017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * server.c (struct visit_actioned_threads_data): Remove.
1932 (visit_actioned_threads): Change prototype to take arguments
1933 directly.
1934 (resume): Use find_thread instead of find_inferior.
1935
99078d34
SM
19362017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1937
1938 * server.c (queue_stop_reply_callback): Change prototype, return
1939 void.
1940 (find_status_pending_thread_callback): Remove.
1941 (handle_status): Replace find_inferior with find_thread and
1942 for_each_thread.
1943
cc628f3d
AH
19442017-10-25 Alan Hayward <alan.hayward@arm.com>
1945
1946 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1947 with REGNO.
1948 (aarch64_store_gregset): Likewise.
1949 (aarch64_fill_fpregset): Likewise.
1950 (aarch64_store_fpregset): Likewise.
1951
4d3bb80e
SM
19522017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1953
1954 * gdbthread.h (find_thread, for_each_thread): New functions.
1955 * inferiors.c (thread_of_pid): Remove.
1956 (find_any_thread_of_pid): Use find_thread.
1957 * linux-low.c (num_lwps): Use for_each_thread.
1958
7a7cdfa0
YQ
19592017-10-17 Yao Qi <yao.qi@linaro.org>
1960
1961 * Makefile.in: Remove one rule.
1962 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1963
e675d170
YQ
19642017-10-17 Yao Qi <yao.qi@linaro.org>
1965
1966 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1967 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1968
7eb4e0f9
YQ
19692017-10-17 Yao Qi <yao.qi@linaro.org>
1970
1971 * configure.srv: Rename arm.o with arch/arm.o.
1972
60d6cfc9
YQ
19732017-10-17 Yao Qi <yao.qi@linaro.org>
1974
1975 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1976 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1977 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1978 (arch-i386.o, arch-amd64.o): Remove rules.
1979 (arch/%.o): New rule.
1980 Update POSTCOMPILE and COMPILE.pre.
1981 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1982 * configure: Re-generated.
1983 * configure.srv: Replace arch-i386.o with arch/i386.o.
1984 Replace arch-amd64.o with arch/amd64.o.
1985
5bfda255
YQ
19862017-10-16 Yao Qi <yao.qi@linaro.org>
1987
1988 * configure: Regenerated.
1989
9c80ecd6
SM
19902017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1991
1992 * inferiors.h: (struct inferior_list): Remove.
1993 (struct inferior_list_entry); Remove.
1994 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1995 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1996 get_first_inferior): Remove.
1997 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1998 find_inferior_id, find_inferior_in_random): Change signature.
1999 * inferiors.c (all_threads): Change type to
2000 std::list<thread_info *>.
2001 (get_thread): Remove macro.
2002 (find_inferior, find_inferior_id): Change signature, implement
2003 using find_thread.
2004 (find_inferior_in_random): Change signature, implement using
2005 find_thread_in_random.
2006 (for_each_inferior, for_each_inferior_with_data): Change
2007 signature, implement using for_each_thread.
2008 (add_inferior_to_list, remove_inferior): Remove.
2009 (add_thread, get_first_thread, thread_of_pid,
2010 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2011 (get_first_inferior, one_inferior_p, clear_inferior_list):
2012 Remove.
2013 (clear_inferiors, get_thread_process): Update.
2014 * gdbthread.h: Include <list>.
2015 (struct thread_info) <entry>: Remove field.
2016 <id>: New field.
2017 (all_threads): Change type to std::list<thread_info *>.
2018 (get_first_inferior): Add doc.
2019 (find_thread, for_each_thread, find_thread_in_random): New
2020 functions.
2021 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2022 * linux-arm-low.c (update_registers_callback): Update.
2023 * linux-low.c (second_thread_of_pid_p): Update.
2024 (kill_one_lwp_callback, linux_detach_lwp_callback,
2025 delete_lwp_callback, status_pending_p_callback, same_lwp,
2026 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2027 iterate_over_lwps, not_stopped_callback,
2028 resume_stopped_resumed_lwps, count_events_callback,
2029 select_singlestep_lwp_callback, select_event_lwp_callback,
2030 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2031 suspend_and_send_sigstop_callback, wait_for_sigstop,
2032 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2033 lwp_running, linux_set_resume_request, resume_status_pending_p,
2034 need_step_over_p, start_step_over, linux_resume_one_thread,
2035 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2036 reset_lwp_ptrace_options_callback): Update.
2037 * linux-mips-low.c (update_watch_registers_callback): Update.
2038 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2039 Update.
2040 (free_register_cache_thread_one): Remove.
2041 (regcache_release): Update.
2042 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2043 handle_qxfer_threads_worker): Update.
2044 (handle_query): Update, use list iterator.
2045 (visit_actioned_threads, handle_pending_status,
2046 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2047 clear_pending_status_callback, set_pending_status_callback,
2048 find_status_pending_thread_callback, handle_status,
2049 process_serial_event): Update.
2050 * target.c (thread_search_callback): Update.
2051 * thread-db.c (thread_db_get_tls_address): Update.
2052 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2053 Update.
2054 * win32-i386-low.c (update_debug_registers_callback): Update.
2055 * win32-low.c (delete_thread_info, child_delete_thread,
2056 continue_one_thread, suspend_one_thread,
2057 get_child_debug_event): Adjust.
2058
9179355e
SM
20592017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2060
2061 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2062 * inferiors.h: Include <list>.
2063 (struct process_info) <entry>: Remove field.
2064 <pid>: New field.
2065 (pid_of): Change macro to function.
2066 (ptid_of, lwpid_of): Remove macro.
2067 (all_processes): Change type to std::list<process_info *>.
2068 (ALL_PROCESSES): Remove macro.
2069 (for_each_process, find_process): New function.
2070 * inferiors.c (all_processes): Change type to
2071 std::list<process_info *>.
2072 (find_thread_process): Adjust.
2073 (add_process): Likewise.
2074 (remove_process): Likewise.
2075 (find_process_pid): Likewise.
2076 (get_first_process): Likewise.
2077 (started_inferior_callback): Remove.
2078 (have_started_inferiors_p): Adjust.
2079 (attached_inferior_callback): Remove.
2080 (have_attached_inferiors_p): Adjust.
2081 * linux-low.c (check_zombie_leaders): Likewise.
2082 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2083 (x86_linux_update_xmltarget): Adjust.
2084 * server.c (handle_query): Likewise.
2085 (gdb_reattached_process): Remove.
2086 (handle_status): Adjust.
2087 (kill_inferior_callback): Likewise.
2088 (detach_or_kill_inferior): Remove.
2089 (print_started_pid): Likewise.
2090 (print_attached_pid): Likewise.
2091 (detach_or_kill_for_exit): Update.
2092 (process_serial_event): Likewise.
2093 * linux-arm-low.c (arm_new_fork): Likewise.
2094
c9cb8905
SM
20952017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2096
2097 * dll.h: Include <list>.
2098 (struct dll_info): Add constructor.
2099 <entry>: Remove field.
2100 (all_dlls): Change type to std::list<dll_info>.
2101 * dll.c: Include <algorithm>.
2102 (get_dll): Remove macro.
2103 (all_dlls): Change type to std::list<dll_info *>.
2104 (free_one_dll): Remove.
2105 (match_dll): Likewise.
2106 (loaded_dll): Adjust.
2107 (unloaded_dll): Adjust to all_dlls type change, use
2108 std::find_if. Inline code from match_dll.
2109 (clear_dlls): Adjust to all_dlls type change.
2110 * server.c (emit_dll_description): Remove.
2111 (handle_qxfer_libraries): Adjust to all_dlls type change,
2112 integrate emit_dll_description's functionality.
2113
04ec7890
SM
21142017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2115
2116 * linux-low.h (struct linux_target_ops) <delete_process>: New
2117 field.
2118 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2119 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2120 (struct linux_target_ops): Add delete_process callback.
2121 * linux-arm-low.c (arm_delete_process): New.
2122 (struct linux_target_ops): Add delete_process callback.
2123 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2124 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2125 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2126 * linux-mips-low.c (mips_linux_delete_process): New.
2127 (struct linux_target_ops): Add delete_process callback.
2128 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2129 * linux-s390-low.c (struct linux_target_ops): Likewise.
2130 * linux-sh-low.c (struct linux_target_ops): Likewise.
2131 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2132 * linux-tile-low.c (struct linux_target_ops): Likewise.
2133 * linux-x86-low.c (x86_linux_delete_process): New.
2134 (struct linux_target_ops): Add delete_process callback.
2135 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2136
466eecee
SM
21372017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * linux-aarch64-low.c (the_low_target): Add thread delete
2140 callback.
2141 * linux-arm-low.c (arm_delete_thread): New function.
2142 (the_low_target): Add thread delete callback.
2143 * linux-bfin-low.c (the_low_target): Likewise.
2144 * linux-crisv32-low.c (the_low_target): Likewise.
2145 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2146 set.
2147 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2148 field.
2149 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2150 * linux-mips-low.c (mips_linux_delete_thread): New function.
2151 (the_low_target): Add thread delete callback.
2152 * linux-ppc-low.c (the_low_target): Likewise.
2153 * linux-s390-low.c (the_low_target): Likewise.
2154 * linux-sh-low.c (the_low_target): Likewise.
2155 * linux-tic6x-low.c (the_low_target): Likewise.
2156 * linux-tile-low.c (the_low_target): Likewise.
2157 * linux-x86-low.c (the_low_target): Likewise.
2158 * linux-xtensa-low.c (the_low_target): Likewise.
2159
b79f7801
YZ
21602017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2161
2162 * win32-low.c: Include "common-inferior.h".
2163
bc3b087d
SDJ
21642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2165
2166 * inferiors.c (set_inferior_cwd): New function.
2167 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2168 (handle_query): Inform that QSetWorkingDir is supported.
2169 * win32-low.c (create_process): Pass the inferior's cwd to
2170 CreateProcess.
2171
d092c5a2
SDJ
21722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2173
2174 * inferiors.c (current_inferior_cwd): New global variable.
2175 (get_inferior_cwd): New function.
2176 * inferiors.h (struct process_info) <cwd>: New field.
2177
7da0a886
SDJ
21782017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2179
2180 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2181 (OBS): Add gdb_tilde_expand.o.
2182
289a6840
SM
21832017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2184
2185 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2186 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2187
256642e8
PA
21882017-09-29 Pedro Alves <palves@redhat.com>
2189
2190 * ax.c (gdb_parse_agent_expr): Constify.
2191 * ax.h (gdb_parse_agent_expr): Constify.
2192 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2193 Constify.
2194 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2195 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2196 * remote-utils.h (read_ptid): Constify.
2197 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2198 (process_point_options, process_serial_event): Constify.
2199 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2200 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2201 (cmd_qtbuffer): Constify.
2202
5b9ca4d4
PA
22032017-09-29 Pedro Alves <palves@redhat.com>
2204
2205 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2206 fails.
2207
94c207e0
PA
22082017-09-29 Pedro Alves <palves@redhat.com>
2209
2210 * linux-low.c (handle_extended_wait): Pass parent thread instead
2211 of process to thread_db_notice_clone.
2212 * linux-low.h (thread_db_notice_clone): Replace parent process
2213 parameter with parent thread parameter.
2214 * thread-db.c (find_one_thread): Add comment.
2215 (thread_db_notice_clone): Replace parent process parameter with
2216 parent thread parameter. Temporarily switch to the parent thread.
2217
75352e28
SDJ
22182017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2219
2220 * gdbthread.h: Include "common-gdbthread.h".
2221 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2222 "if" when validating the ptid.
2223 * remote-utils.c: Include "gdbthread.h".
2224 (prepare_resume_reply): Use "switch_to_thread".
2225 * target.c (done_accessing_memory): Likewise.
2226
ad339634
AA
22272017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2228
2229 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2230 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2231 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2232 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2233 s390x-gs-linux64-ipa.o to ipa_obj.
2234 * linux-s390-low.c (HWCAP_S390_GS): New define.
2235 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2236 New functions.
2237 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2238 (s390_arch_setup): Check for guarded-storage support and choose
2239 appropriate tdesc.
2240 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2241 init_registers_s390x_gs_linux64.
2242 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2243 enum value.
2244 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2245 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2246
cc4d742f
SM
22472017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2248
2249 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2250
f6327dcb
KB
22512017-09-21 Kevin Buettner <kevinb@redhat.com>
2252
2253 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2254 (thread_db_thread_handle): Declare.
2255 * linux-low.c (linux_target_ops): Initialize thread_handle.
2256 * server.c (handle_qxfer_threads_worker): Add support for
2257 "handle" attribute.
2258 * target.h (struct target_ops): Add new function pointer,
2259 thread_handle.
2260 (target_thread_handle): Define.
2261 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2262 field in lwp.
2263 (thread_db_thread_handle): New function.
2264
86299109
KB
22652017-09-21 Kevin Buettner <kevinb@redhat.com>
2266
2267 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2268 * linux-low.h (thread_db_notice_clone): Declare.
2269 * thread-db.c (thread_db_notice_clone): New function.
2270
f557a88a
PA
22712017-09-21 Pedro Alves <palves@redhat.com>
2272
2273 * server.c (gdb_read_memory, handle_status, process_serial_event)
2274 (handle_serial_event, handle_target_event): Adjust to
2275 set_desired_thread prototype change.
2276 * target.c (set_desired_thread): Remove 'use_general' parameter
2277 and adjust.
2278 * target.h (set_desired_thread): Remove 'use_general' parameter.
2279
223ffa71
TT
22802017-09-20 Tom Tromey <tom@tromey.com>
2281
2282 * target.c (target_terminal::terminal_state): Define.
2283 (target_terminal::init): Rename from target_terminal_init.
2284 (target_terminal::inferior): Rename from
2285 target_terminal_inferior.
2286 (target_terminal::ours): Rename from target_terminal_ours.
2287 (target_terminal::ours_for_output, target_terminal::info): New.
2288
04fd3ba9
SM
22892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2290
2291 * server.c (accumulate_file_name_length): Remove.
2292 (emit_dll_description): Adjust to std::string change.
2293 (handle_qxfer_libraries): Use std::string to hold document.
2294
5e187554
SM
22952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2296
2297 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2298 return type of xml_escape_text.
2299 * server.c (emit_dll_description): Likewise.
2300
1526853e
SM
23012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2302
2303 * server.c (captured_main): Accept argument for --selftest.
2304 Update run_tests call.
2305 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2306 when registering selftests.
2307
c4dfafab
SDJ
23082017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2311 instead of "VEC" for "target_desc.reg_defs".
2312 (regcache_cpy): Likewise.
2313 (registers_to_string): Likewise.
2314 (registers_from_string): Likewise.
2315 (find_regno): Likewise.
2316 (supply_regblock): Likewise.
2317 (regcache_raw_read_unsigned): Likewise.
2318 * tdesc.c (init_target_desc): Likewise.
2319 (tdesc_create_reg): Likewise.
2320 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2321 (struct target_desc) <reg_defs>: Convert to "std::vector".
2322 (target_desc): Do not initialize "reg_defs".
2323 (~target_desc): Update code to use "std::vector" instead of "VEC"
2324 for "target_desc.reg_defs".
2325 (operator==): Likewise.
2326
124aceb4
SM
23272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2328
2329 * inferiors.h (thread_to_gdb_id): Remove.
2330 * inferiors.c (thread_to_gdb_id): Remove.
2331 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2332 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2333 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2334 Likewise.
2335 * nto-low.c (nto_fetch_registers, nto_store_registers,
2336 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2337
96cde54f
SM
23382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2339
2340 * inferiors.h (gdb_id_to_thread_id): Remove.
2341 * inferiors.c (gdb_id_to_thread_id): Remove.
2342 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2343 removal. Move pid declaration closer to where it's used.
2344
e8ca139e
SM
23452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2346
2347 * server.c (handle_detach): New function.
2348 (process_serial_event): Move code out, call handle_detach.
2349
f8a4e119
SM
23502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * server.c (require_running): Rename to ...
2353 (require_running_or_return): ... this ...
2354 (require_running_or_break): ... and this.
2355 (handle_query, process_serial_event): Adjust.
2356
0eb0a407
SM
23572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2358
2359 * linux-low.c (linux_set_resume_request): Remove unused
2360 variables.
2361
785922a5
SM
23622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2363
2364 * server.c (first_thread_of): Remove.
2365 (process_serial_event): Replace usage of first_thread_of with
2366 find_any_thread_of_pid.
2367 * tracepoint.c (same_process_p): Remove.
2368 (gdb_agent_about_to_close): Replace usage of same_process_p with
2369 find_any_thread_of_pid.
2370 * linux-x86-low.c (same_process_callback): Remove.
2371 (x86_arch_setup_process_callback): Replace usage of
2372 same_process_callback with find_any_thread_of_pid.
2373 * thread-db.c (any_thread_of): Remove.
2374 (switch_to_process): Replace usage of any_thread_of with
2375 find_any_thread_of_pid.
2376 * inferiors.c (thread_pid_matches_callback): Remove.
2377 (find_thread_process): Adjust to use find_any_thread_of_pid.
2378
a059f00c
SDJ
23792017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2380
2381 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2382 with "!VEC_empty".
a059f00c 2383
cc397f3a
SDJ
23842017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2385
2386 * linux-low.c (handle_extended_wait): Use
2387 "allocate_target_description" instead of "XNEW".
2388 * linux-x86-low.c (initialize_low_arch): Likewise.
2389
22916b07
YQ
23902017-09-05 Yao Qi <yao.qi@linaro.org>
2391
2392 * configure.srv (srv_i386_regobj): Remove.
2393 (srv_amd64_regobj): Remove.
2394 (srv_regobj): Set it to "" for x86 non-linux targets.
2395 * linux-x86-tdesc.c (i386_linux_read_description):
2396 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2397 (init_registers_i386): Remove the declaration.
2398 (tdesc_i386): Remove the declaration.
2399 (lynx_i386_arch_setup): Call i386_create_target_description.
2400 * nto-x86-low.c: Likewise.
2401 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2402 [!__x86_64__]: include arch/i386.h.
2403 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2404
38602d55
YQ
24052017-09-05 Yao Qi <yao.qi@linaro.org>
2406
2407 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2408 i386/amd64-XXX-linux from it.
2409
44b886ff
YQ
24102017-09-05 Yao Qi <yao.qi@linaro.org>
2411
2412 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2413 false.
2414 (ipa_amd64_linux_regobj): Remove.
2415 (ipa_x32_linux_regobj): Remove.
2416
b4570e4b
YQ
24172017-09-05 Yao Qi <yao.qi@linaro.org>
2418
2419 * Makefile.in (arch-amd64.o): New rule.
2420 * configure.srv: Append arch-amd64.o.
2421 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2422 (get_ipa_tdesc): Call amd64_linux_read_description.
2423 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2424 and init_registers_amd64_XXX.
2425 * linux-x86-low.c (x86_linux_read_description): Call
2426 amd64_linux_read_description.
2427 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2428 (initialize_low_arch): Don't call init_registers_x32_XXX and
2429 init_registers_amd64_XXX.
2430 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2431 and tdesc_amd64_XXX.
2432 [__x86_64__] (amd64_tdesc_test): New function.
2433 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2434 and init_registers_amd64_XXX.
2435 * linux-x86-tdesc.c: Include arch/amd64.h.
2436 (xcr0_to_tdesc_idx): New function.
2437 (i386_linux_read_description): New function.
2438 (amd64_get_ipa_tdesc_idx): New function.
2439 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2440 (amd64_get_ipa_tdesc): Declare.
2441
d1f28ea2
YQ
24422017-09-05 Yao Qi <yao.qi@linaro.org>
2443
2444 * configure.srv (srv_i386_linux_xmlfiles): Remove
2445 i386/i386-XXX-linux.xml from it.
2446
25a93583
YQ
24472017-09-05 Yao Qi <yao.qi@linaro.org>
2448
2449 * configure.srv: Set srv_i386_linux_regobj empty if $development
2450 is false.
2451 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2452 initialize_low_tdesc.
2453 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2454 with #if initialize_low_tdesc.
2455 * linux-x86-tdesc-selftest.c: New file.
2456 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2457
5f035c07
YQ
24582017-09-05 Yao Qi <yao.qi@linaro.org>
2459
2460 * Makefile.in (arch-i386.o): New rule.
2461 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2462 (x86_64-*-linux*): Likewise.
2463 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2464 include arch/i386.h.
2465 (i386_linux_read_description): Remove code and call
2466 i386_create_target_description.
2467 * tdesc.c (allocate_target_description): New function.
2468 * tdesc.h (set_tdesc_architecture): Remove declaration.
2469 (set_tdesc_osabi): Likewise.
2470
0abe8a89
YQ
24712017-09-05 Yao Qi <yao.qi@linaro.org>
2472
2473 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2474 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2475 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2476 .xmltarget.
2477 * server.c (get_features_xml): Call tdesc_get_features_xml.
2478 * tdesc.c (set_tdesc_architecture): New function.
2479 (set_tdesc_osabi): New function.
2480 (tdesc_get_features_xml): New function.
2481 (tdesc_create_feature): Add an argument.
2482 * tdesc.h (struct target_desc) <features>: New field.
2483 <arch, osabi>: New field.
2484 (~target_desc): xfree features, arch, and osabi.
2485 (target_desc::oerator==): Don't compare .xmltarget.
2486 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2487 (set_tdesc_osabi): Likewise.
2488 (tdesc_get_features_xml): Likewise.
2489
0a188386
YQ
24902017-09-05 Yao Qi <yao.qi@linaro.org>
2491
2492 * linux-x86-tdesc.c: Include selftest.h.
2493 (i386_tdesc_test): New function.
2494 (initialize_low_tdesc): Call selftests::register_test.
2495 * tdesc.h: Include regdef.h.
2496 (target_desc): Override operator == and !=.
2497
f49ff000
YQ
24982017-09-05 Yao Qi <yao.qi@linaro.org>
2499
2500 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2501 (ipa_obj): Likewise.
2502 * linux-i386-ipa.c: Include common/x86-xstate.h
2503 (get_ipa_tdesc): Call i386_linux_read_description.
2504 (initialize_low_tracepoint): Don't call init_registers_XXX
2505 functions, call initialize_low_tdesc instead.
2506 * linux-x86-low.c (x86_linux_read_description): Call
2507 i386_linux_read_description.
2508 (initialize_low_arch): Don't call init_registers_i386_XXX
2509 functions, call initialize_low_tdesc.
2510 * linux-x86-tdesc.c: New file.
2511 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2512 (i386_get_ipa_tdesc_idx): Declare.
2513 (i386_get_ipa_tdesc): Declare.
2514 (initialize_low_tdesc): Declare.
2515
2b68ef2f
YQ
25162017-09-05 Yao Qi <yao.qi@linaro.org>
2517
2518 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2519 instead of 0.
2520
f7000548
YQ
25212017-09-05 Yao Qi <yao.qi@linaro.org>
2522
2523 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2524 * regcache.c (get_thread_regcache): Use VEC_length.
2525 (init_register_cache): Likewise.
2526 (regcache_cpy): Likewise.
2527 (registers_to_string): Iterate reg_defs via VEC_iterate.
2528 (find_regno): Likewise.
2529 (find_register_by_number): Use VEC_index.
2530 (register_size): Call find_register_by_number.
2531 (register_data): Call find_register_by_number.
2532 (supply_regblock): Use VEC_length.
2533 (regcache_raw_read_unsigned): Likewise.
2534 * tdesc.c (init_target_desc): Iterate reg_defs via
2535 VEC_iterate.
2536 (default_description): Update initializer.
2537 (copy_target_description): Don't update field num_registers.
2538 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2539 <num_registers>: Remove.
2540
50a421ac
SM
25412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 * Makefile.in (.SECONDARY): Define target.
2544
23fdd69e
SM
25452017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * linux-low.c (linux_wait_1): Adjust.
2548 * server.c (queue_stop_reply_callback): Adjust.
2549
0a2dde4a
SDJ
25502017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2551
2552 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2553 QEnvironmentUnset and QEnvironmentReset packets.
2554 (handle_query): Inform remote that QEnvironmentHexEncoded,
2555 QEnvironmentUnset and QEnvironmentReset are supported.
2556
6afd337d
SM
25572017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2558
2559 * inferiors.h (inferior_target_data): Rename to ...
2560 (thread_target_data): ... this.
2561 (inferior_regcache_data): Rename to ...
2562 (thread_regcache_data): ... this.
2563 (set_inferior_regcache_data): Rename to ...
2564 (set_thread_regcache_data): ... this.
2565 * inferiors.c (inferior_target_data): Rename to ...
2566 (thread_target_data): ... this.
2567 (inferior_regcache_data): Rename to ...
2568 (thread_regcache_data): ... this.
2569 (set_inferior_regcache_data): Rename to ...
2570 (set_thread_regcache_data): ... this.
2571 (free_one_thread): Update.
2572 * linux-low.h (get_thread_lwp): Update.
2573 * regcache.c (get_thread_regcache): Update.
2574 (regcache_invalidate_thread): Update.
2575 (free_register_cache_thread): Update.
2576 * win32-i386-low.c (update_debug_registers_callback): Update.
2577 (win32_get_current_dr): Update.
2578 * win32-low.c (thread_rec): Update.
2579 (delete_thread_info): Update.
2580 (continue_one_thread): Update.
2581 (suspend_one_thread): Update.
2582
a160cc46
SM
25832017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * inferiors.c (set_inferior_target_data): Remove.
2586 * inferiors.h (set_inferior_target_data): Remove.
2587
6d580b63
YQ
25882017-08-18 Yao Qi <yao.qi@linaro.org>
2589
2590 * Makefile.in (OBS): Add selftest.o.
2591 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2592 * configure, config.in: Re-generated.
2593 * server.c: Include common/sefltest.h.
2594 (captured_main): Handle option --selftest.
2595
f5a29eb0
YQ
25962017-08-09 Yao Qi <yao.qi@linaro.org>
2597
2598 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2599 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2600 i386-avx-mpx.o and i386-mmx.o.
2601 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2602 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2603 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2604 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2605 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2606 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2607 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2608 i386/amd64-avx-mpx.xml.
2609
57757c2f
YQ
26102017-08-09 Yao Qi <yao.qi@linaro.org>
2611
2612 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2613 and x32-avx-avx512.o.
2614 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2615 i386/x32-avx-avx512.xml.
2616
229d26fc
SM
26172017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2618
2619 * tracepoint.h (enum class fast_tpoint_collect_result): New
2620 enumeration.
2621 (fast_tracepoint_collecting): Change return type to
2622 fast_tpoint_collect_result.
2623 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2624 * linux-low.h: Include tracepoint.h.
2625 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2626 fast_tpoint_collect_result.
2627 * linux-low.c (handle_tracepoints): Adjust.
2628 (linux_fast_tracepoint_collecting): Change return type to
2629 fast_tpoint_collect_result.
2630 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2631 linux_wait_1, stuck_in_jump_pad_callback,
2632 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2633 proceed_one_lwp): Adjust to type change.
2634
2e1e43e1
YQ
26352017-07-10 Yao Qi <yao.qi@linaro.org>
2636
2637 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2638
adc764e7
YQ
26392017-06-29 Yao Qi <yao.qi@linaro.org>
2640
2641 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2642 Remove.
2643 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2644
a206891a
SM
26452017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2646
2647 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2648
9a6c7d9c
SDJ
26492017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2650
2651 * linux-low.c (linux_create_inferior): Adjust code to access the
2652 environment information via 'gdb_environ' class.
2653 * lynx-low.c (lynx_create_inferior): Likewise.
2654 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2655 (get_environ): Return a pointer to 'our_environ'.
2656 (captured_main): Initialize 'our_environ'.
2657 * server.h (get_environ): Adjust prototype.
2658 * spu-low.c (spu_create_inferior): Adjust code to access the
2659 environment information via 'gdb_environ' class.
2660
ae3e2ccf
SM
26612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2662
2663 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2664 usage of "register" keyword.
2665
3e019bdc
SM
26662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2667
2668 * configure: Re-generate.
2669
8465943a
SM
26702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2671
2672 * configure: Re-generate.
2673
cf0dd6f0
SM
26742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2675
2676 * Makefile.in (COMPILE.pre): Add "-x c++".
2677
9845682b
SDJ
26782017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2679
2680 * fork-child.c: Conditionally include <signal.h>.
2681
aefd8b33
SDJ
26822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2683
2684 * server.c (handle_general_set): Handle new packet
2685 "QStartupWithShell".
2686 (handle_query): Add "QStartupWithShell" to the list of supported
2687 packets.
2688 (gdbserver_usage): Add help text explaining the
2689 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2690 options.
2691 (captured_main): Recognize and act upon the presence of the new
2692 CLI options.
2693
2090129c
SDJ
26942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2695 Pedro Alves <palves@redhat.com>
2696
2697 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2698 * configure: Regenerate.
2699 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2700 "fork-inferior.o".
2701 (i[34567]86-*-lynxos*): Likewise.
2702 (spu*-*-*): Likewise.
2703 * fork-child.c: New file.
2704 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2705 and "environ.h".
2706 (linux_ptrace_fun): New function.
2707 (linux_create_inferior): Adjust function prototype to reflect
2708 change on "target.h". Adjust function code to use
2709 "fork_inferior".
2710 (linux_request_interrupt): Delete "signal_pid".
2711 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2712 (lynx_ptrace_fun): New function.
2713 (lynx_create_inferior): Adjust function prototype to reflect
2714 change on "target.h". Adjust function code to use
2715 "fork_inferior".
2716 * nto-low.c (nto_create_inferior): Adjust function prototype and
2717 code to reflect change on "target.h". Update comments.
2718 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2719 "common-terminal.h" and "environ.h".
2720 (terminal_fd): Moved to fork-child.c.
2721 (old_foreground_pgrp): Likewise.
2722 (restore_old_foreground_pgrp): Likewise.
2723 (last_status): Make it global.
2724 (last_ptid): Likewise.
2725 (our_environ): New variable.
2726 (startup_with_shell): Likewise.
2727 (program_name): Likewise.
2728 (program_argv): Rename to...
2729 (program_args): ...this.
2730 (wrapper_argv): New variable.
2731 (start_inferior): Delete function.
2732 (get_exec_wrapper): New function.
2733 (get_exec_file): Likewise.
2734 (get_environ): Likewise.
2735 (prefork_hook): Likewise.
2736 (post_fork_inferior): Likewise.
2737 (postfork_hook): Likewise.
2738 (postfork_child_hook): Likewise.
2739 (handle_v_run): Update code to deal with arguments coming from the
2740 remote host. Update calls from "start_inferior" to
2741 "create_inferior".
2742 (captured_main): Likewise. Initialize environment variable. Call
2743 "have_job_control".
2744 * server.h (post_fork_inferior): New prototype.
2745 (get_environ): Likewise.
2746 (last_status): Declare.
2747 (last_ptid): Likewise.
2748 (signal_pid): Likewise.
2749 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2750 (spu_ptrace_fun): New function.
2751 (spu_create_inferior): Adjust function prototype to reflect change
2752 on "target.h". Adjust function code to use "fork_inferior".
2753 * target.c (target_terminal_init): New function.
2754 (target_terminal_inferior): Likewise.
2755 (target_terminal_ours): Likewise.
2756 * target.h: Include <vector>.
2757 (struct target_ops) <create_inferior>: Update prototype.
2758 (create_inferior): Update macro.
2759 * utils.c (gdb_flush_out_err): New function.
2760 * win32-low.c (win32_create_inferior): Adjust function prototype
2761 and code to reflect change on "target.h".
2762
043a4934
SDJ
27632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2764
2765 * inferiors.c (switch_to_thread): New function.
2766
15652511
SDJ
27672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2768
2769 * Makefile.in (SFILE): Add "common/job-control.c".
2770 (OBS): Add "job-control.o".
2771
21ea5acd
SDJ
27722017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2773
2774 * Makefile: Remove "@host_makefile_frag@".
2775
e13cb306
PA
27762017-05-05 Pedro Alves <palves@redhat.com>
2777
2778 * configure: Regenerate.
2779
c94fee56
SDJ
27802017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2781
2782 * configure: Regenerate.
2783
a0ff9e1a
SM
27842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2785
2786 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2787 software_single_step change of return type to
2788 std::vector<CORE_ADDR>.
2789 * linux-low.c (install_software_single_step_breakpoints):
2790 Likewise.
2791 * linux-low.h (install_software_single_step_breakpoints):
2792 Likewise.
2793
be628ab8
SDJ
27942017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2795
2796 * remote-utils.c: Include "gdb_termios.h" instead of
2797 "terminal.h".
2798 * terminal.h: Delete file.
2799
7c5ded6a
SDJ
28002017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2801
2802 * server.c: Include <vector>.
2803 <program_argv, wrapper_argv>: Convert to std::vector.
2804 (start_inferior): Rewrite function to use C++.
2805 (handle_v_run): Likewise. Update code that calculates the argv
2806 based on the vRun packet; use C++.
2807 (captured_main): Likewise.
2808
436252de
SM
28092017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2810
2811 * server.c (handle_v_cont): Initialize thread_resume::thread
2812 with null_ptid.
2813
9bf2a700
PA
28142017-04-05 Pedro Alves <palves@redhat.com>
2815
2816 * configure: Regenerate.
2817
a121b7c1
PA
28182017-04-05 Pedro Alves <palves@redhat.com>
2819
2820 * gdbreplay.c (sync_error): Constify.
2821 * linux-x86-low.c (push_opcode): Constify.
2822
21c8a587
PA
28232017-04-05 Pedro Alves <palves@redhat.com>
2824
2825 * win32-low.c (get_child_debug_event)
2826 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2827 Report TARGET_WAITKIND_SPURIOUS instead.
2828
fb32b4f7
PA
28292017-04-05 Pedro Alves <palves@redhat.com>
2830
e79be6e5
SM
2831 * remote-utils.c (remote_prepare, remote_open): Constify.
2832 * remote-utils.h (remote_prepare, remote_open): Constify.
2833 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2834
65dd1e59
SM
28352017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2836
2837 * Makefile.in (clean): Clear .deps.
2838
8fa5b777
SM
28392017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2840
2841 * .gitignore: Remove generated files, replace with wildcard.
2842 * (clean): Replace removal of generated files with wildcard.
2843 (version.c): Replace with...
2844 (version-generated.c): ...this.
2845 (xml-builtin.c): Replace with...
2846 (xml-builtin-generated.c): ...this.
2847 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2848 (%.c: *regformats*): Replace with...
2849 (%-generated.c: *regformats*): ...this.
2850
a12e714b
MF
28512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2852
2853 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2854 (xtensa_fill_gregset): Call collect_register_by_name for
2855 threadptr register.
2856 (xtensa_store_gregset): Call supply_register_by_name for
2857 threadptr register.
2858
1a09b50a
MF
28592017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2860
2861 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2862 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2863 (xtensa_store_gregset): Call supply_register for all registers in
2864 a0_regnum..a0_regnum + C0_NREGS range.
2865
1a01e7c6
SM
28662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2867
2868 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2869 (ax-ipa.o: ax.c): Remove.
2870 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2871 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2872 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2873 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2874 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2875
36bc18a8
SM
28762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2877
2878 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2879 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2880 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2881 (errors-ipa.o: ../common/errors.c): Remove.
2882 (format-ipa.o: ../common/format.c): Remove.
2883 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2884
a8ebe3d5
SM
28852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2886
2887 * Makefile.in (%-ipa.o: %.c): New rule.
2888 (tracepoint-ipa.o: tracepoint.c): Remove.
2889 (utils-ipa.o: utils.c): Remove.
2890 (remote-utils-ipa.o: remote-utils.c): Remove.
2891 (regcache-ipa.o: regcache.c): Remove.
2892 (i386-linux-ipa.o: i386-linux.c): Remove.
2893 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2894 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2895 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2896 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2897 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2898 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2899 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2900 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2901 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2902 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2903 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2904 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2905 (aarch64-ipa.o: aarch64.c): Remove.
2906 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2907 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2908 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2909 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2910 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2911 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2912 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2913 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2914 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2915 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2916 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2917 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2918 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2919 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2920 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2921 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2922 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2923 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2924 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2925 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2926 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2927 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2928 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2929 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2930 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2931 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2932 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2933 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2934 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2935 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2936 (tdesc-ipa.o: tdesc.c): Remove.
2937 (x32-linux-ipa.o: x32-linux.c): Remove.
2938 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2939 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2940
50cfacb7
SM
29412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * Makefile.in (%.o: ../arch/%.c): New rule.
2944 (arm.o: ../arch/arm.c): Remove.
2945 (arm-linux.o: ../arch/arm-linux.c): Remove.
2946 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2947 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2948
c5a22423
SM
29492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2950
2951 * Makefile.in (%.o: ../nat/%.c): New rule.
2952 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2953 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2954 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2955 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2956 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2957 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2958 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2959 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2960 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2961 (linux-personality.o: ../nat/linux-personality.c): Remove.
2962 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2963 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2964 (x86-linux.o: ../nat/x86-linux.c): Remove.
2965 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2966 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2967
6bda016b
SM
29682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2969
2970 * Makefile.in (%.o: ../common/%.c): New rule.
2971 (signals.o: ../common/signals.c): Remove.
2972 (print-utils.o: ../common/print-utils.c): Remove.
2973 (rsp-low.o: ../common/rsp-low.c): Remove.
2974 (common-utils.o: ../common/common-utils.c): Remove.
2975 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2976 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2977 (vec.o: ../common/vec.c): Remove.
2978 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2979 (xml-utils.o: ../common/xml-utils.c): Remove.
2980 (ptid.o: ../common/ptid.c): Remove.
2981 (buffer.o: ../common/buffer.c): Remove.
2982 (format.o: ../common/format.c): Remove.
2983 (filestuff.o: ../common/filestuff.c): Remove.
2984 (agent.o: ../common/agent.c): Remove.
2985 (errors.o: ../common/errors.c): Remove.
2986 (environ.o: ../common/environ.c): Remove.
2987 (common-debug.o: ../common/common-debug.c): Remove.
2988 (cleanups.o: ../common/cleanups.c): Remove.
2989 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2990 (fileio.o: ../common/fileio.c): Remove.
2991 (common-regcache.o: ../common/common-regcache.c): Remove.
2992 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2993 (new-op.o: ../common/new-op.c): Remove.
2994 (btrace-common.o: ../common/btrace-common.c): Remove.
2995
21122961
SM
29962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2997
2998 * Makefile.in (%.o: ../target/%.c): New rule.
2999 (waitstatus.o: ../target/waitstatus.c): Remove.
3000
c362e621
SM
30012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3002
3003 * Makefile.in
3004 (%.c: ../regformats/%.dat,
3005 (%.c: ../regformats/arm/%.dat,
3006 (%.c: ../regformats/i386/%.dat,
3007 (%.c: ../regformats/rs6000/%.dat): New rules.
3008 (aarch64.c): Remove.
3009 (reg-arm.c): Remove.
3010 (arm-with-iwmmxt.c): Remove.
3011 (arm-with-vfpv2.c): Remove.
3012 (arm-with-vfpv3.c): Remove.
3013 (arm-with-neon.c): Remove.
3014 (reg-bfin.c): Remove.
3015 (reg-cris.c): Remove.
3016 (reg-crisv32.c): Remove.
3017 (i386.c): Remove.
3018 (i386-linux.c): Remove.
3019 (i386-avx.c): Remove.
3020 (i386-avx-linux.c): Remove.
3021 (i386-avx-avx512.c): Remove.
3022 (i386-avx-avx512-linux.c): Remove.
3023 (i386-mpx.c): Remove.
3024 (i386-mpx-linux.c): Remove.
3025 (i386-avx-mpx-avx512-pku.c): Remove.
3026 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3027 (i386-avx-mpx.c): Remove.
3028 (i386-avx-mpx-linux.c): Remove.
3029 (i386-mmx.c): Remove.
3030 (i386-mmx-linux.c): Remove.
3031 (reg-ia64.c): Remove.
3032 (reg-m32r.c): Remove.
3033 (reg-m68k.c): Remove.
3034 (reg-cf.c): Remove.
3035 (mips-linux.c): Remove.
3036 (mips-dsp-linux.c): Remove.
3037 (mips64-linux.c): Remove.
3038 (mips64-dsp-linux.c): Remove.
3039 (nios2-linux.c): Remove.
3040 (powerpc-32.c): Remove.
3041 (powerpc-32l.c): Remove.
3042 (powerpc-altivec32l.c): Remove.
3043 (powerpc-cell32l.c): Remove.
3044 (powerpc-vsx32l.c): Remove.
3045 (powerpc-isa205-32l.c): Remove.
3046 (powerpc-isa205-altivec32l.c): Remove.
3047 (powerpc-isa205-vsx32l.c): Remove.
3048 (powerpc-e500l.c): Remove.
3049 (powerpc-64l.c): Remove.
3050 (powerpc-altivec64l.c): Remove.
3051 (powerpc-cell64l.c): Remove.
3052 (powerpc-vsx64l.c): Remove.
3053 (powerpc-isa205-64l.c): Remove.
3054 (powerpc-isa205-altivec64l.c): Remove.
3055 (powerpc-isa205-vsx64l.c): Remove.
3056 (s390-linux32.c): Remove.
3057 (s390-linux32v1.c): Remove.
3058 (s390-linux32v2.c): Remove.
3059 (s390-linux64.c): Remove.
3060 (s390-linux64v1.c): Remove.
3061 (s390-linux64v2.c): Remove.
3062 (s390-te-linux64.c): Remove.
3063 (s390-vx-linux64.c): Remove.
3064 (s390-tevx-linux64.c): Remove.
3065 (s390x-linux64.c): Remove.
3066 (s390x-linux64v1.c): Remove.
3067 (s390x-linux64v2.c): Remove.
3068 (s390x-te-linux64.c): Remove.
3069 (s390x-vx-linux64.c): Remove.
3070 (s390x-tevx-linux64.c): Remove.
3071 (tic6x-c64xp-linux.c): Remove.
3072 (tic6x-c64x-linux.c): Remove.
3073 (tic6x-c62x-linux.c): Remove.
3074 (reg-sh.c): Remove.
3075 (reg-sparc64.c): Remove.
3076 (reg-spu.c): Remove.
3077 (amd64.c): Remove.
3078 (amd64-linux.c): Remove.
3079 (amd64-avx.c): Remove.
3080 (amd64-avx-linux.c): Remove.
3081 (amd64-avx-avx512.c): Remove.
3082 (amd64-avx-avx512-linux.c): Remove.
3083 (amd64-mpx.c): Remove.
3084 (amd64-mpx-linux.c): Remove.
3085 (amd64-avx-mpx-avx512-pku.c): Remove.
3086 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3087 (amd64-avx-mpx.c): Remove.
3088 (amd64-avx-mpx-linux.c): Remove.
3089 (x32.c): Remove.
3090 (x32-linux.c): Remove.
3091 (x32-avx.c): Remove.
3092 (x32-avx-linux.c): Remove.
3093 (x32-avx-avx512.c): Remove.
3094 (x32-avx-avx512-linux.c): Remove.
3095 (reg-xtensa.c): Remove.
3096 (reg-tilegx.c): Remove.
3097 (reg-tilegx32.c): Remove.
3098
1672e0d9
SDJ
30992017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3100
3101 * Makefile.in (SFILES): Add "common/environ.c".
3102 (OBJS): Add "common/environ.h".
3103
239b6d10
WT
31042017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3105
3106 * configure.ac: Check if the fs_base and gs_base members of
3107 `struct user_regs_struct' exist.
3108 * config.in: Regenerated.
3109 * configure: Likewise.
3110
694b382c
AT
31112017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3112
3113 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3114 target_read_memory.
3115 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3116 (get_next_pcs_syscall_next_pc): Likewise.
3117
7dc53023
LM
31182016-12-23 Luis Machado <lgustavo@codesourcery.com>
3119
3120 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3121 * nto-x86-low.c: Likewise.
3122
ad02e4fe
SM
31232016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3124
3125 * Makefile.in: Include disable-implicit-rules.mk.
3126
dcb07cfa
PA
31272016-11-23 Pedro Alves <palves@redhat.com>
3128
3129 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3130 (debug_vprintf): Use std::chrono::steady_clock instead of
3131 gettimeofday. Use '.' instead of ':'.
3132 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3133 (get_timestamp): Use std::chrono::steady_clock instead of
3134 gettimeofday.
3135
8629c02c
SM
31362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 * Makefile.in: Fix whitespace formatting.
3139
b593ecca
SM
31402016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3141
3142 * Makefile.in (SFILES, OBS): Flatten list and order
3143 alphabetically.
3144
9986ba08
PA
31452016-11-23 Pedro Alves <palves@redhat.com>
3146
3147 * event-loop.c (handle_file_event): Use warning.
3148 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3149 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3150 Use warning.
3151
4eefa7bc
PA
31522016-11-23 Pedro Alves <palves@redhat.com>
3153
3154 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3155 output.
3156 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3157 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3158 debug_printf and debug_flush for debug output.
3159 * server.c (handle_general_set): Likewise.
3160 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3161 output.
3162
5443506e
SM
31632016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3164
3165 * Makefile.in (.c.o): Replace rule with ...
3166 (%.o: %.c): ... this one.
3167
3b165252
SM
31682016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3169
3170 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3171 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3172 make.
3173 * configure.ac: Remove checks for the make program.
3174 * configure: Re-generate.
3175
0bcda685
PA
31762016-10-28 Pedro Alves <palves@redhat.com>
3177
3178 * Makefile.in (CXX_DIALECT): Get from configure.
3179 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3180 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3181 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3182 * config.in: Regenerate.
3183 * configure: Regenerate.
3184
c3805894
YQ
31852016-10-27 Yao Qi <yao.qi@linaro.org>
3186
3187 * linux-low.c (linux_supports_range_stepping): Return true if
3188 can_software_single_step return true.
3189
89342618
YQ
31902016-10-27 Yao Qi <yao.qi@linaro.org>
3191
3192 * inferiors.c (find_inferior_in_random): New function.
3193 * inferiors.h (find_inferior_in_random): Declare.
3194 * linux-low.c (linux_wait_for_event_filtered): Call
3195 find_inferior_in_random instead of find_inferior.
3196
e3652c84
YQ
31972016-10-27 Yao Qi <yao.qi@linaro.org>
3198
3199 * linux-low.c (linux_wait_1): If single-step breakpoints are
3200 inserted, remove them.
3201
5a04c4cf
PA
32022016-10-26 Pedro Alves <palves@redhat.com>
3203
3204 * linux-low.c (handle_extended_wait): Link parent/child fork
3205 threads.
3206 (linux_wait_1): Unlink them.
3207 (linux_set_resume_request): Ignore resume requests for
3208 already-resumed and unhandled fork child threads.
3209 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3210 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3211 New functions.
3212 (handle_v_requests) <vCont>: Don't call require_running.
3213 * server.h (in_queued_stop_replies): New declaration.
3214
cb93dc7f
YQ
32152016-10-24 Yao Qi <yao.qi@linaro.org>
3216
3217 PR server/20733
3218 * linux-aarch64-low.c (append_insns): Cast the return value to
3219 'uint32_t *'.
3220
a1078bea
YQ
32212016-10-10 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3224
1fb77080
SDJ
32252016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3226
3227 * target.c (target_supports_multi_process): New function, moved
3228 from...
3229 * target.h (target_supports_multi_process): ... here. Remove
3230 macro.
3231
39b5a3b9
TT
32322016-10-05 Tom Tromey <tom@tromey.com>
3233
3234 PR remote/20655:
3235 * tracepoint.c (handle_tracepoint_bkpts): Check
3236 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3237
c1d0b70a
YQ
32382016-10-05 Yao Qi <yao.qi@linaro.org>
3239
3240 * configure.srv: Update the path of arm-*.xml files.
3241
0a69eedb
YQ
32422016-10-05 Terry Guo <terry.guo@arm.com>
3243 Yao Qi <yao.qi@linaro.org>
3244
3245 * Makefile.in: Adjust the path of rules.
3246 * configure.srv: Update the path of xml files.
3247 * regformats/arm-with-iwmmxt.dat: Regenerated.
3248 * regformats/arm-with-neon.dat: Likewise.
3249 * regformats/arm-with-vfpv2.dat: Likewise.
3250 * regformats/arm-with-vfpv3.dat Likewise.
3251
17e16485
YQ
32522016-09-30 Yao Qi <yao.qi@linaro.org>
3253
3254 PR gdbserver/20627
3255 * target.c (target_stop_and_wait): Don't call
3256 target_continue_no_signal, use resume_stop instead.
3257
edeeb602
YQ
32582016-09-26 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-low.c (linux_wait_1): Call debug_exit.
3261
503b1c39
PA
32622016-09-23 Pedro Alves <palves@redhat.com>
3263
3264 * Makefile.in (SFILES): Add common/new-op.c.
3265 (OBS): Add common/new-op.o.
3266 (new-op.o): New rule.
3267
74172ecf
SM
32682016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3269
3270 * .gitinore: Ignore more files.
3271
fc6cda2e
YQ
32722016-09-21 Yao Qi <yao.qi@linaro.org>
3273
3274 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3275 23.
3276
bc1e6c81
SDJ
32772016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3278
3279 * server.c (start_inferior): Call target_mourn_inferior instead of
3280 mourn_inferior; pass ptid_t argument to it.
3281 (resume): Likewise.
3282 (handle_target_event): Likewise.
3283 * target.c (target_mourn_inferior): New function.
3284 * target.h (mourn_inferior): Delete macro.
3285
0e00e962
AA
32862016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3287
3288 * linux-low.c (lwp_is_stepping): New function.
3289
1d8cb77d
CL
32902016-09-06 Carl Love <cel@us.ibm.com>
3291
3292 * server.c (start_inferior): Fixed comment, requested comment change
3293 didn't get updated correctly. Removed reference to ptrace () call as
3294 it is only true on Linux systems.
3295
7313bced
CL
32962016-09-06 Carl Love <cel@us.ibm.com>
3297
3298 * server.c (start_inferior): Do not call
3299 function target_post_create_inferior () if the
3300 inferior process has already exited.
3301
cf6de44d
PA
33022016-09-05 Pedro Alves <palves@redhat.com>
3303
3304 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3305 (COMPILE.pre, CC_LD): Use CXX directly.
3306 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3307 * acinclude.m4: Don't include build-with-cxx.m4.
3308 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3309 * configure: Regenerate.
3310
c1da6748
AT
33112016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3312
3313 PR gdb/19495
3314 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3315 call writing data to own_buf.
3316
f2b9e3df
SDJ
33172016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3318
3319 * target.c (mywait): Call target_wait instead of
3320 the_target->wait.
3321 (target_wait): New function.
3322
049a8570
SDJ
33232016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3324
3325 * server.c (start_inferior): New variable 'ptid'. Replace calls
3326 to the_target->resume by target_continue{,_no_signal}, depending
3327 on the case.
3328 * target.c (target_stop_and_wait): Call target_continue_no_signal
3329 instead of the_target->resume.
3330 (target_continue): New function.
3331
3aa5cfa0
AT
33322016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3333
3334 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3335
754653a7
AZ
33362016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3337
3338 PR server/20491
3339 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3340 ps_prochandle.
3341 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3342 * linux-arm-low.c (ps_get_thread_area): Likewise.
3343 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3344 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3345 * linux-mips-low.c (ps_get_thread_area): Likewise.
3346 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3347 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3348 * linux-x86-low.c (ps_get_thread_area): Likewise.
3349 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3350
ed036b40
PA
33512016-08-19 Pedro Alves <palves@redhat.com>
3352
3353 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3354
c8ef42ee
PA
33552016-08-19 Pedro Alves <palves@redhat.com>
3356
3357 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3358 comment. Use memcpy instead of casting through unsigned long.
3359
9c235a72
PA
33602016-08-19 Pedro Alves <palves@redhat.com>
3361
3362 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3363 allocating around 0x80000000.
3364
201506da
PA
33652016-08-19 Pedro Alves <palves@redhat.com>
3366
3367 PR gdb/20415
3368 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3369 (x32-avx512-linux-ipa.o): New rules.
3370 * configure.ac (x86_64-*-linux*): New x32 check.
3371 * configure.srv (ipa_x32_linux_regobj): New.
3372 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3373 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3374 descriptions.
3375 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3376 descriptions.
3377 * configure: Regenerate.
3378
f348d89a
PA
33792016-08-09 Pedro Alves <palves@redhat.com>
3380
3381 PR gdb/18653
3382 * Makefile.in (OBS): Add signals-state-save-restore.o.
3383 (signals-state-save-restore.o): New rule.
3384 * config.in: Regenerate.
3385 * configure: Regenerate.
3386 * linux-low.c: Include "signals-state-save-restore.h".
3387 (linux_create_inferior): Call
3388 restore_original_signals_state.
3389 * server.c: Include "dispositions-save-restore.h".
3390 (captured_main): Call save_original_signals_state.
3391
1baf5149
PA
33922016-08-05 Pedro Alves <palves@redhat.com>
3393
3394 * configure: Regenerate.
3395
fcd4a73d
YQ
33962016-08-04 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-low.c (regsets_fetch_inferior_registers): Check
3399 errno is ESRCH or not.
3400
979659d0
YQ
34012016-08-02 Yao Qi <yao.qi@linaro.org>
3402
3403 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3404 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3405 (thread_db_load_search): Update.
3406 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3407 td_ta_set_event and td_ta_event_getmsg.
3408
6598661d
PA
34092016-07-26 Pedro Alves <palves@redhat.com>
3410
3411 PR server/20414
3412 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3413 of unsigned long for 64-bit registers and use uint32_t instead of
3414 unsigned int for 32-bit registers.
3415
9cf12d57
PA
34162016-07-26 Pedro Alves <palves@redhat.com>
3417
3418 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3419 to 'ptrace'.
3420
305450ed
TT
34212016-07-21 Tom Tromey <tom@tromey.com>
3422
3423 * configure: Rebuild.
3424
2583da7c
YQ
34252016-07-21 Yao Qi <yao.qi@linaro.org>
3426
3427 * mem-break.c (find_gdb_breakpoint): Cast bp to
3428 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3429
21536b36
YQ
34302016-07-21 Yao Qi <yao.qi@linaro.org>
3431
3432 * server.c (handle_v_requests): Support s and S actions
3433 if target_supports_software_single_step return true.
3434
8901d193
YQ
34352016-07-21 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3438 is resume_step, call maybe_hw_step.
3439 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3440 and unstop them.
3441 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3442 breakpoints or not.
3443 (proceed_one_lwp): If resume request is resume_step, install
3444 reinsert breakpoints and call maybe_hw_step.
3445
0e9a339e
YQ
34462016-07-21 Yao Qi <yao.qi@linaro.org>
3447
3448 * linux-low.c (proceed_one_lwp): Declare.
3449 (linux_resume_one_thread): Remove local variable 'step'.
3450 Lift code enqueue signal. Call proceed_one_lwp instead of
3451 linux_resume_one_lwp.
3452
4281b351
YQ
34532016-07-21 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-low.c (linux_resume_one_thread): Call
3456 enqueue_pending_signal.
3457
984a2c04
YQ
34582016-07-21 Yao Qi <yao.qi@linaro.org>
3459
3460 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3461 * inferiors.c (do_restore_current_thread_cleanup): New function.
3462 (make_cleanup_restore_current_thread): Likewise.
3463 * linux-low.c (install_software_single_step_breakpoints): Call
3464 make_cleanup_restore_current_thread. Switch current_thread to
3465 thread.
3466
bec903c9
YQ
34672016-07-21 Yao Qi <yao.qi@linaro.org>
3468
3469 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3470 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3471 (clone_one_breakpoint): Likewise.
3472 (delete_reinsert_breakpoints): Change parameter to thread.
3473 Callers updated.
3474 (has_reinsert_breakpoints): Likewise.
3475 (uninsert_reinsert_breakpoints): Likewise.
3476 (reinsert_reinsert_breakpoints): Likewise.
3477 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3478 (delete_reinsert_breakpoints): Likewise.
3479 (reinsert_reinsert_breakpoints): Likewise.
3480 (uninsert_reinsert_breakpoints): Likewise.
3481 (has_reinsert_breakpoints): Likewise.
3482
63c40ec7
YQ
34832016-07-21 Yao Qi <yao.qi@linaro.org>
3484
3485 * inferiors.c (get_thread_process): Make parameter const.
3486 * inferiors.h (get_thread_process): Update declaration.
3487 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3488 Add new parameters child_thread and parent_thread. Callers
3489 updated.
3490 * mem-break.h (clone_all_breakpoints): Update declaration.
3491
9aa76cd0
YQ
34922016-07-21 Yao Qi <yao.qi@linaro.org>
3493
3494 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3495 <command_list, handler>: Remove.
3496 (struct gdb_breakpoint): New.
3497 (struct other_breakpoint): New.
3498 (struct reinsert_breakpoint): New.
3499 (is_gdb_breakpoint): New function.
3500 (any_persistent_commands): Update command_list if
3501 is_gdb_breakpoint returns true.
3502 (set_breakpoint): Create breakpoints according to their types.
3503 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3504 (set_gdb_breakpoint_1): Likewise.
3505 (set_gdb_breakpoint): Likewise.
3506 (clear_breakpoint_conditions): Change parameter type to
3507 'struct gdb_breakpoint *'.
3508 (clear_breakpoint_commands): Likewise.
3509 (clear_breakpoint_conditions_and_commands): Likewise.
3510 (add_condition_to_breakpoint): Likewise.
3511 (add_breakpoint_condition): Likewise.
3512 (add_commands_to_breakpoint): Likewise.
3513 (check_breakpoints): Check other_breakpoint.
3514 (clone_one_breakpoint): Clone breakpopint according to its type.
3515 * mem-break.h (struct gdb_breakpoint): Declare.
3516 (set_gdb_breakpoint): Update declaration.
3517 (clear_breakpoint_conditions_and_commands): Likewise.
3518 (add_breakpoint_condition): Likewise.
3519 (add_breakpoint_commands): Likewise.
3520 * server.c (process_point_options): Change parameter type to
3521 'struct gdb_breakpoint *'.
3522
811f8301
YQ
35232016-07-21 Yao Qi <yao.qi@linaro.org>
3524
3525 * mem-break.c (set_breakpoint_at): Rename it to ...
3526 (set_breakpoint_type_at): ... it.
3527 (set_breakpoint_at): Call set_breakpoint_type_at.
3528 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3529 * mem-break.h (set_breakpoint_at): Update comments.
3530
b1c51e36
CLT
35312016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3532
3533 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3534 to buf parameter.
3535 (nios2_store_gregset): Likewise.
3536
ced2dffb
PA
35372016-07-01 Pedro Alves <palves@redhat.com>
3538 Antoine Tremblay <antoine.tremblay@ericsson.com>
3539
3540 * linux-low.c: Change interface to take the target lwp_info
3541 pointer directly and return void. Handle detaching from a zombie
3542 thread.
3543 (linux_detach_lwp_callback): New function.
3544 (linux_detach): Detach from the leader thread after detaching from
3545 the clone threads.
3546
2ac09a5b
YQ
35472016-06-28 Yao Qi <yao.qi@linaro.org>
3548
3549 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3550 for variable new_offset.
3551 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3552 (aarch64_ftrace_insn_reloc_cb): Likewise.
3553 (aarch64_ftrace_insn_reloc_tb): Likewise.
3554 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3555 PRIx64 instead of PRIx32.
3556
79e7fd4f
YQ
35572016-06-28 Yao Qi <yao.qi@linaro.org>
3558
3559 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3560 (the_low_target): Install arm_get_syscall_trapinfo.
3561
061fc021
YQ
35622016-06-28 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3565 function.
3566 (the_low_target): Install aarch64_get_syscall_trapinfo.
3567
4cc32bec
YQ
35682016-06-28 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3571 Callers updated.
3572 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3573 Remove parameter sysno.
3574 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3575 sysret.
3576
782c1122
AA
35772016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3578
3579 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3580 (s390_emit_ne_goto): Likewise.
3581 (s390_emit_lt_goto): Likewise.
3582 (s390_emit_le_goto): Likewise.
3583 (s390_emit_gt_goto): Likewise.
3584 (s390_emit_ge_goto): Likewise.
3585 (s390x_emit_eq_goto): Likewise.
3586 (s390x_emit_ne_goto): Likewise.
3587 (s390x_emit_lt_goto): Likewise.
3588 (s390x_emit_le_goto): Likewise.
3589 (s390x_emit_gt_goto): Likewise.
3590 (s390x_emit_ge_goto): Likewise.
3591 (s390_emit_ops_impl): Mark variable static.
3592 (s390x_emit_ops): Likewise.
3593
2e7b624b
YQ
35942016-06-17 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-low.c (handle_extended_wait): Call
3597 uninsert_reinsert_breakpoints for the parent process. Remove
3598 reinsert breakpoints from the child process. Reinsert them to
3599 the parent process when vfork is done.
3600 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3601 (reinsert_reinsert_breakpoints): New function.
3602 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3603 (reinsert_reinsert_breakpoints): Declare.
3604
8a81c5d7
YQ
36052016-06-17 Yao Qi <yao.qi@linaro.org>
3606
3607 * linux-low.c (handle_extended_wait): If the parent is doing
3608 step-over, remove the reinsert breakpoints from the forked child.
3609
f50bf8e5
YQ
36102016-06-17 Yao Qi <yao.qi@linaro.org>
3611
3612 * linux-low.c (unsuspend_all_lwps): Declare.
3613 (linux_low_filter_event): If thread exited, call finish_step_over.
3614 If step-over is finished, unsuspend other threads.
3615
8376a3cb
YQ
36162016-06-17 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-low.c (linux_resume_one_lwp_throw): Assert
3619 has_reinsert_breakpoints returns false.
3620 * mem-break.c (delete_disabled_breakpoints): Assert
3621 bp type isn't reinsert_breakpoint.
3622
f79b145d
YQ
36232016-06-17 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-low.c (maybe_hw_step): New function.
3626 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3627 (finish_step_over): Switch current_thread to lwp temporarily,
3628 and assert has_reinsert_breakpoints returns true.
3629 (proceed_one_lwp): Call maybe_hw_step.
3630 * mem-break.c (has_reinsert_breakpoints): New function.
3631 * mem-break.h (has_reinsert_breakpoints): Declare.
3632
0ae534d2
JT
36332016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3634
3635 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3636
fcdad592
YQ
36372016-05-17 Yao Qi <yao.qi@linaro.org>
3638
3639 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3640 instead of find_inferior.
3641
9e784964
YQ
36422016-05-05 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3645 Initialize res to zero.
3646
cf2ebb6e
YQ
36472016-05-05 Yao Qi <yao.qi@linaro.org>
3648
3649 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3650 to uint32_t.
3651
c1aebf87
UW
36522016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3653
3654 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3655 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3656 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3657
35fd2deb 36582016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3659 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3660
3661 * tracepoint.c (write_inferior_int8): New function.
3662 (cmd_qtenable_disable): Write enable flag using
3663 write_inferior_int8.
3664
484b3c32
YQ
36652016-04-25 Yao Qi <yao.qi@linaro.org>
3666
3667 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3668 (need_step_over_p): Return zero if the LWP has pending signals
3669 can be delivered on software single step target.
3670
85ba7d86
YQ
36712016-04-25 Yao Qi <yao.qi@linaro.org>
3672
3673 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3674 return instead of error.
3675
3539aa13
YQ
36762016-04-22 Yao Qi <yao.qi@linaro.org>
3677
3678 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3679 to 23.
3680
5b061e98
YQ
36812016-04-22 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3684 signal when stepping over breakpoint with software single
3685 step.
3686
3451269c
PA
36872016-04-21 Pedro Alves <palves@redhat.com>
3688
3689 * linux-s390-low.c (s390_collect_ptrace_register)
3690 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3691 add casts.
3692 (s390_check_regset): Use void * instead of gdb_byte *.
3693
a2358508
PA
36942016-04-20 Pedro Alves <palves@redhat.com>
3695
3696 * configure: Renegerate.
3697
6885166d
YQ
36982016-04-20 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3701 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3702 number 16.
3703 (arm_store_gregset): Likewise.
3704
2b863f51
WT
37052016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3706
3707 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3708 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3709 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3710 (amd64-avx-mpx-linux.c): New rules.
3711 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3712 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3713 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3714 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3715 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3716 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3717 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3718 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3719 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3720 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3721 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3722 * linux-x86-low.c (x86_linux_read_description): Add case for
3723 X86_XSTATE_AVX_MPX_MASK.
3724 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3725 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3726 init_registers_i386_avx_mpx_linux.
3727 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3728 (initialize_low_tracepoint): Call
3729 init_registers_i386_avx_mpx_linux.
3730 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3731 (initialize_low_tracepoint): Call
3732 init_registers_amd64_avx_mpx_linux.
3733 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3734 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3735 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3736 declarations.
3737
9b30624b
PA
37382016-04-18 Pedro Alves <palves@redhat.com>
3739
3740 * configure: Regenerate.
3741
45e3745e
AT
37422016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3743
3744 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3745 (aarch64_emit_sub): Likewise.
3746
2afc13ff
PA
37472016-04-12 Pedro Alves <palves@redhat.com>
3748
3749 * utils.c (prepare_to_throw_exception): Delete.
3750
6e774b13
SM
37512016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3752
3753 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3754
4dca19f8
MK
37552016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3756
3757 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3758
d0a9981f
MK
37592016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3760
3761 * linux-aarch64-ipa.c: Add <elf.h> include.
3762 * linux-ppc-ipa.c: Add <elf.h> include.
3763 * linux-s390-ipa.c: Add <elf.h> include.
3764
252db07e
MK
37652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3766
3767 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3768 (get_raw_reg_ptr): Likewise.
3769 (get_trace_state_variable_value_ptr): Likewise.
3770 (set_trace_state_variable_value_ptr): Likewise.
3771 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3772 char *.
3773
14e2b6d9
MK
37742016-03-31 Wei-cheng Wang <cole945@gmail.com>
3775 Marcin Kościelnicki <koriakin@0x04.net>
3776
3777 PR/17221
3778 * linux-ppc-low.c (emit_insns): New function.
3779 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3780 (ppc_emit_prologue): New function.
3781 (ppc_emit_epilogue): New function.
3782 (ppc_emit_add): New function.
3783 (ppc_emit_sub): New function.
3784 (ppc_emit_mul): New function.
3785 (ppc_emit_lsh): New function.
3786 (ppc_emit_rsh_signed): New function.
3787 (ppc_emit_rsh_unsigned): New function.
3788 (ppc_emit_ext): New function.
3789 (ppc_emit_zero_ext): New function.
3790 (ppc_emit_log_not): New function.
3791 (ppc_emit_bit_and): New function.
3792 (ppc_emit_bit_or): New function.
3793 (ppc_emit_bit_xor): New function.
3794 (ppc_emit_bit_not): New function.
3795 (ppc_emit_equal): New function.
3796 (ppc_emit_less_signed): New function.
3797 (ppc_emit_less_unsigned): New function.
3798 (ppc_emit_ref): New function.
3799 (ppc_emit_const): New function.
3800 (ppc_emit_reg): New function.
3801 (ppc_emit_pop): New function.
3802 (ppc_emit_stack_flush): New function.
3803 (ppc_emit_swap): New function.
3804 (ppc_emit_stack_adjust): New function.
3805 (ppc_emit_call): New function.
3806 (ppc_emit_int_call_1): New function.
3807 (ppc_emit_void_call_2): New function.
3808 (ppc_emit_if_goto): New function.
3809 (ppc_emit_goto): New function.
3810 (ppc_emit_eq_goto): New function.
3811 (ppc_emit_ne_goto): New function.
3812 (ppc_emit_lt_goto): New function.
3813 (ppc_emit_le_goto): New function.
3814 (ppc_emit_gt_goto): New function.
3815 (ppc_emit_ge_goto): New function.
3816 (ppc_write_goto_address): New function.
3817 (ppc_emit_ops_impl): New static variable.
3818 (ppc64v1_emit_prologue): New function.
3819 (ppc64v2_emit_prologue): New function.
3820 (ppc64_emit_epilogue): New function.
3821 (ppc64_emit_add): New function.
3822 (ppc64_emit_sub): New function.
3823 (ppc64_emit_mul): New function.
3824 (ppc64_emit_lsh): New function.
3825 (ppc64_emit_rsh_signed): New function.
3826 (ppc64_emit_rsh_unsigned): New function.
3827 (ppc64_emit_ext): New function.
3828 (ppc64_emit_zero_ext): New function.
3829 (ppc64_emit_log_not): New function.
3830 (ppc64_emit_bit_and): New function.
3831 (ppc64_emit_bit_or): New function.
3832 (ppc64_emit_bit_xor): New function.
3833 (ppc64_emit_bit_not): New function.
3834 (ppc64_emit_equal): New function.
3835 (ppc64_emit_less_signed): New function.
3836 (ppc64_emit_less_unsigned): New function.
3837 (ppc64_emit_ref): New function.
3838 (ppc64_emit_const): New function.
3839 (ppc64v1_emit_reg): New function.
3840 (ppc64v2_emit_reg): New function.
3841 (ppc64_emit_pop): New function.
3842 (ppc64_emit_stack_flush): New function.
3843 (ppc64_emit_swap): New function.
3844 (ppc64v1_emit_call): New function.
3845 (ppc64v2_emit_call): New function.
3846 (ppc64v1_emit_int_call_1): New function.
3847 (ppc64v2_emit_int_call_1): New function.
3848 (ppc64v1_emit_void_call_2): New function.
3849 (ppc64v2_emit_void_call_2): New function.
3850 (ppc64_emit_if_goto): New function.
3851 (ppc64_emit_eq_goto): New function.
3852 (ppc64_emit_ne_goto): New function.
3853 (ppc64_emit_lt_goto): New function.
3854 (ppc64_emit_le_goto): New function.
3855 (ppc64_emit_gt_goto): New function.
3856 (ppc64_emit_ge_goto): New function.
3857 (ppc64v1_emit_ops_impl): New static variable.
3858 (ppc64v2_emit_ops_impl): New static variable.
3859 (ppc_emit_ops): New function.
3860 (linux_low_target): Wire in ppc_emit_ops.
3861
a2174ba4
MK
38622016-03-31 Wei-cheng Wang <cole945@gmail.com>
3863 Marcin Kościelnicki <koriakin@0x04.net>
3864
3865 PR/17221
3866 * Makefile.in: Add powerpc-*-ipa.o
3867 * configure.srv: Add ipa_obj for powerpc*-linux.
3868 * linux-ppc-ipa.c: New file.
3869 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3870 includes.
3871 (PPC_FIELD): New macro.
3872 (PPC_SEXT): New macro.
3873 (PPC_OP6): New macro.
3874 (PPC_BO): New macro.
3875 (PPC_LI): New macro.
3876 (PPC_BD): New macro.
3877 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3878 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3879 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3880 (ppc_get_thread_area): New function.
3881 (is_elfv2_inferior): New function.
3882 (gen_ds_form): New function.
3883 (GEN_STD): New macro.
3884 (GEN_STDU): New macro.
3885 (GEN_LD): New macro.
3886 (GEN_LDU): New macro.
3887 (gen_d_form): New function.
3888 (GEN_ADDI): New macro.
3889 (GEN_ADDIS): New macro.
3890 (GEN_LI): New macro.
3891 (GEN_LIS): New macro.
3892 (GEN_ORI): New macro.
3893 (GEN_ORIS): New macro.
3894 (GEN_LWZ): New macro.
3895 (GEN_STW): New macro.
3896 (GEN_STWU): New macro.
3897 (gen_xfx_form): New function.
3898 (GEN_MFSPR): New macro.
3899 (GEN_MTSPR): New macro.
3900 (GEN_MFCR): New macro.
3901 (GEN_MTCR): New macro.
3902 (GEN_SYNC): New macro.
3903 (GEN_LWSYNC): New macro.
3904 (gen_x_form): New function.
3905 (GEN_OR): New macro.
3906 (GEN_MR): New macro.
3907 (GEN_LWARX): New macro.
3908 (GEN_STWCX): New macro.
3909 (GEN_CMPW): New macro.
3910 (gen_md_form): New function.
3911 (GEN_RLDICL): New macro.
3912 (GEN_RLDICR): New macro.
3913 (gen_i_form): New function.
3914 (GEN_B): New macro.
3915 (GEN_BL): New macro.
3916 (gen_b_form): New function.
3917 (GEN_BNE): New macro.
3918 (GEN_LOAD): New macro.
3919 (GEN_STORE): New macro.
3920 (gen_limm): New function.
3921 (gen_atomic_xchg): New function.
3922 (gen_call): New function.
3923 (ppc_relocate_instruction): New function.
3924 (ppc_install_fast_tracepoint_jump_pad): New function.
3925 (ppc_get_min_fast_tracepoint_insn_len): New function.
3926 (ppc_get_ipa_tdesc_idx): New function.
3927 (the_low_target): Wire in the new functions.
3928 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3929 tdescs.
3930 * linux-ppc-tdesc.h: New file.
3931
a13c4696
MK
39322016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3933
3934 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3935 (alloc_jump_pad_buffer): New function.
3936 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3937 (alloc_jump_pad_buffer): New function.
3938 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3939 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3940 (alloc_jump_pad_buffer): New function.
3941 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3942 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3943 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3944 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3945
1cda1512
MK
39462016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3947
3948 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3949 * linux-amd64-ipa.c: Likewise.
3950 * linux-i386-ipa.c: Likewise.
3951 * linux-s390-ipa.c: Likewise.
3952 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3953 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3954 set_trace_state_variable_value_ptr.
3955 (struct ipa_sym_addresses): Likewise.
3956 (symbol_list): Likewise.
3957 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3958 accessing gdb_collect directly.
3959 (gdb_collect_ptr_type): New typedef.
3960 (get_raw_reg_ptr_type): New typedef.
3961 (get_trace_state_variable_value_ptr_type): New typedef.
3962 (set_trace_state_variable_value_ptr_type): New typedef.
3963 (gdb_collect_ptr): New global.
3964 (get_raw_reg_ptr): New global.
3965 (get_trace_state_variable_value_ptr): New global.
3966 (set_trace_state_variable_value_ptr): New global.
3967 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3968 accessing get_raw_reg directly.
3969 (get_get_tsv_func_addr): Likewise for
3970 get_trace_state_variable_value_ptr.
3971 (get_set_tsv_func_addr): Likewise for
3972 set_trace_state_variable_value_ptr.
3973 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3974
72fb5488
SM
39752016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3978
28170b88
MK
39792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3980
3981 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3982 packets.
3983 (relocate_instruction): Remove own_buf.
3984 * server.c (own_buf): Make global.
3985 (handle_v_requests): Make global.
3986 * server.h (own_buf): New declaration.
3987 (handle_v_requests): New prototype.
3988
f39e8743
MK
39892016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3990
3991 PR 18377
3992 * linux-s390-low.c (add_insns): New function.
3993 (s390_emit_prologue): New function.
3994 (s390_emit_epilogue): New function.
3995 (s390_emit_add): New function.
3996 (s390_emit_sub): New function.
3997 (s390_emit_mul): New function.
3998 (s390_emit_lsh): New function.
3999 (s390_emit_rsh_signed): New function.
4000 (s390_emit_rsh_unsigned): New function.
4001 (s390_emit_ext): New function.
4002 (s390_emit_log_not): New function.
4003 (s390_emit_bit_and): New function.
4004 (s390_emit_bit_or): New function.
4005 (s390_emit_bit_xor): New function.
4006 (s390_emit_bit_not): New function.
4007 (s390_emit_equal): New function.
4008 (s390_emit_less_signed): New function.
4009 (s390_emit_less_unsigned): New function.
4010 (s390_emit_ref): New function.
4011 (s390_emit_if_goto): New function.
4012 (s390_emit_goto): New function.
4013 (s390_write_goto_address): New function.
4014 (s390_emit_litpool): New function.
4015 (s390_emit_const): New function.
4016 (s390_emit_call): New function.
4017 (s390_emit_reg): New function.
4018 (s390_emit_pop): New function.
4019 (s390_emit_stack_flush): New function.
4020 (s390_emit_zero_ext): New function.
4021 (s390_emit_swap): New function.
4022 (s390_emit_stack_adjust): New function.
4023 (s390_emit_set_r2): New function.
4024 (s390_emit_int_call_1): New function.
4025 (s390_emit_void_call_2): New function.
4026 (s390_emit_eq_goto): New function.
4027 (s390_emit_ne_goto): New function.
4028 (s390_emit_lt_goto): New function.
4029 (s390_emit_le_goto): New function.
4030 (s390_emit_gt_goto): New function.
4031 (s390_emit_ge_goto): New function.
4032 (s390x_emit_prologue): New function.
4033 (s390x_emit_epilogue): New function.
4034 (s390x_emit_add): New function.
4035 (s390x_emit_sub): New function.
4036 (s390x_emit_mul): New function.
4037 (s390x_emit_lsh): New function.
4038 (s390x_emit_rsh_signed): New function.
4039 (s390x_emit_rsh_unsigned): New function.
4040 (s390x_emit_ext): New function.
4041 (s390x_emit_log_not): New function.
4042 (s390x_emit_bit_and): New function.
4043 (s390x_emit_bit_or): New function.
4044 (s390x_emit_bit_xor): New function.
4045 (s390x_emit_bit_not): New function.
4046 (s390x_emit_equal): New function.
4047 (s390x_emit_less_signed): New function.
4048 (s390x_emit_less_unsigned): New function.
4049 (s390x_emit_ref): New function.
4050 (s390x_emit_if_goto): New function.
4051 (s390x_emit_const): New function.
4052 (s390x_emit_call): New function.
4053 (s390x_emit_reg): New function.
4054 (s390x_emit_pop): New function.
4055 (s390x_emit_stack_flush): New function.
4056 (s390x_emit_zero_ext): New function.
4057 (s390x_emit_swap): New function.
4058 (s390x_emit_stack_adjust): New function.
4059 (s390x_emit_int_call_1): New function.
4060 (s390x_emit_void_call_2): New function.
4061 (s390x_emit_eq_goto): New function.
4062 (s390x_emit_ne_goto): New function.
4063 (s390x_emit_lt_goto): New function.
4064 (s390x_emit_le_goto): New function.
4065 (s390x_emit_gt_goto): New function.
4066 (s390x_emit_ge_goto): New function.
4067 (s390_emit_ops): New function.
4068 (struct linux_target_ops): Fill in emit_ops hook.
4069
abd9baf9
MK
40702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4071
4072 PR 18377
4073 * Makefile.in: Add s390 IPA files.
4074 * configure.srv: Build IPA for s390.
4075 * linux-s390-ipa.c: New file.
4076 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4077 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4078 (tdesc_s390_linux32): Likewise.
4079 (init_registers_s390_linux32v1): Likewise.
4080 (tdesc_s390_linux32v1): Likewise.
4081 (init_registers_s390_linux32v2): Likewise.
4082 (tdesc_s390_linux32v2): Likewise.
4083 (init_registers_s390_linux64): Likewise.
4084 (tdesc_s390_linux64): Likewise.
4085 (init_registers_s390_linux64v1): Likewise.
4086 (tdesc_s390_linux64v1): Likewise.
4087 (init_registers_s390_linux64v2): Likewise.
4088 (tdesc_s390_linux64v2): Likewise.
4089 (init_registers_s390_te_linux64): Likewise.
4090 (tdesc_s390_te_linux64): Likewise.
4091 (init_registers_s390_vx_linux64): Likewise.
4092 (tdesc_s390_vx_linux64): Likewise.
4093 (init_registers_s390_tevx_linux64): Likewise.
4094 (tdesc_s390_tevx_linux64): Likewise.
4095 (init_registers_s390x_linux64): Likewise.
4096 (tdesc_s390x_linux64): Likewise.
4097 (init_registers_s390x_linux64v1): Likewise.
4098 (tdesc_s390x_linux64v1): Likewise.
4099 (init_registers_s390x_linux64v2): Likewise.
4100 (tdesc_s390x_linux64v2): Likewise.
4101 (init_registers_s390x_te_linux64): Likewise.
4102 (tdesc_s390x_te_linux64): Likewise.
4103 (init_registers_s390x_vx_linux64): Likewise.
4104 (tdesc_s390x_vx_linux64): Likewise.
4105 (init_registers_s390x_tevx_linux64): Likewise.
4106 (tdesc_s390x_tevx_linux64): Likewise.
4107 (have_hwcap_s390_vx): New static variable.
4108 (s390_arch_setup): Fill have_hwcap_s390_vx.
4109 (s390_get_thread_area): New function.
4110 (s390_ft_entry_gpr_esa): New const.
4111 (s390_ft_entry_gpr_zarch): New const.
4112 (s390_ft_entry_misc): New const.
4113 (s390_ft_entry_fr): New const.
4114 (s390_ft_entry_vr): New const.
4115 (s390_ft_main_31): New const.
4116 (s390_ft_main_64): New const.
4117 (s390_ft_exit_fr): New const.
4118 (s390_ft_exit_vr): New const.
4119 (s390_ft_exit_misc): New const.
4120 (s390_ft_exit_gpr_esa): New const.
4121 (s390_ft_exit_gpr_zarch): New const.
4122 (append_insns): New function.
4123 (s390_relocate_instruction): New function.
4124 (s390_install_fast_tracepoint_jump_pad): New function.
4125 (s390_get_min_fast_tracepoint_insn_len): New function.
4126 (s390_get_ipa_tdesc_idx): New function.
4127 (struct linux_target_ops): Wire in the above functions.
4128 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4129 * linux-s390-tdesc.h: New file.
4130
a4105d04
MK
41312016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4132
4133 * linux-s390-low.c (s390_supports_tracepoints): New function.
4134 (struct linux_target_ops): Fill supports_tracepoints hook.
4135
35ac8b3e
YQ
41362016-03-18 Yao Qi <yao.qi@linaro.org>
4137
4138 * linux-low.c (lwp_signal_can_be_delivered): New function.
4139 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4140
94610ec4
YQ
41412016-03-18 Yao Qi <yao.qi@linaro.org>
4142
4143 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4144 0 if signal is enqueued. Remove 'signal' from one debugging
4145 message. Move one debugging message to some lines below.
4146 Remove code setting 'signal' to 0.
4147
80aea927
YQ
41482016-03-18 Yao Qi <yao.qi@linaro.org>
4149
4150 * linux-low.c (linux_low_filter_event): Remove redundant
4151 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4152
b04fd3be
MK
41532016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4154
4155 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4156 (struct linux_target_ops): Wire in the above.
4157
c40c8d4b
YQ
41582016-03-03 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-low.c: Update comments to start_step_over.
4161
0f8288ae
YQ
41622016-03-03 Yao Qi <yao.qi@linaro.org>
4163
4164 PR server/19736
4165 * linux-low.c (handle_extended_wait): Set child suspended
4166 if event_lwp->bp_reinsert isn't zero.
4167
fdbd04a8
YQ
41682016-03-02 Yao Qi <yao.qi@linaro.org>
4169
4170 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4171 enqueue_pending_signal.
4172
6896a8fa
MK
41732016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4174
4175 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4176 is actually loaded.
4177
ab503087
MK
41782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4179
4180 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4181 (s390_regmap_3264) [!__s390x__]: New global.
4182 (s390_collect_ptrace_register): Skip map entries containing -1.
4183 (s390_supply_ptrace_register): Ditto.
4184 (s390_fill_gprs_high): New function.
4185 (s390_store_gprs_high): New function.
4186 (s390_regsets): Add NT_S390_HIGH_GPRS.
4187 (s390_get_hwcap): Enable on 31-bit.
4188 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4189 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4190 Detect NT_S390_HIGH_GPRS.
4191 (s390_usrregs_info_3264): Enable on 31-bit.
4192 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4193 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4194
ae91f625
MK
41952016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4196
4197 PR gdb/13808
4198 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4199 * configure.srv: Ditto.
4200 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4201 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4202 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4203 (init_registers_amd64_linux): Remove prototype.
4204 (tdesc_amd64_linux): Remove declaration.
4205 (get_ipa_tdesc): New function.
4206 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4207 initialize remaining tdescs.
4208 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4209 (init_registers_i386_linux): Remove prototype.
4210 (tdesc_i386_linux): Remove declaration.
4211 (get_ipa_tdesc): New function.
4212 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4213 initialize remaining tdescs.
4214 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4215 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4216 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4217 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4218 (x86_get_ipa_tdesc_idx): New function.
4219 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4220 * linux-x86-tdesc.h: New file.
4221 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4222 (target_get_ipa_tdesc_idx): New macro.
4223 * tracepoint.c (ipa_tdesc_idx): New macro.
4224 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4225 (symbol_list): Add ipa_tdesc_idx.
4226 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4227 (ipa_tdesc): Remove.
4228 (ipa_tdesc_idx): New variable.
4229 (get_context_regcache): Use get_ipa_tdesc.
4230 (gdb_collect): Ditto.
4231 (gdb_probe): Ditto.
4232 * tracepoint.h (get_ipa_tdesc): New prototype.
4233 (ipa_tdesc): Remove.
4234
e7ad2f14
PA
42352016-02-24 Pedro Alves <palves@redhat.com>
4236
4237 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4238 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4239 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4240 Factor out common code between the USE_SIGTRAP_SIGINFO and
4241 !USE_SIGTRAP_SIGINFO blocks.
4242 (linux_low_filter_event): Call save_stop_reason instead of
4243 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4244 Update comments.
4245 (linux_wait_1): Update comments.
4246
657f9cde
WW
42472016-02-24 Wei-cheng Wang <cole945@gmail.com>
4248
4249 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4250 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4251 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4252 ppc_insert_point, ppc_remove_point.
4253
b00b61e1
MK
42542016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4255
4256 * linux-s390-low.c (s390_supports_z_point_type): New function.
4257 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4258
553cb527
YQ
42592016-02-16 Yao Qi <yao.qi@linaro.org>
4260
4261 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4262 PC. Get pc from regcache_read_pc.
4263
a5652c21
YQ
42642016-02-12 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4267 or linux_get_pc_32bit.
4268 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4269
ed443b61
YQ
42702016-02-12 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4273 arm_linux_get_next_pcs_fixup.
4274
020ecd38
MK
42752016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4276
4277 * tracepoint.c (x_tracepoint_action_download): Change
4278 write_inferior_data_ptr to write_inferior_data_pointer.
4279 (cmd_qtstart): Likewise.
4280 (write_inferior_data_ptr): Remove.
4281 (download_agent_expr): Change write_inferior_data_ptr to
4282 write_inferior_data_pointer.
4283 (download_tracepoint_1): Likewise.
4284 (download_tracepoint): Likewise.
4285 (download_trace_state_variables): Likewise.
4286
7cae9051
WW
42872016-02-11 Wei-cheng Wang <cole945@gmail.com>
4288 Marcin Kościelnicki <koriakin@0x04.net>
4289
4290 * tracepoint.c (struct tracepoint_action_ops): Remove.
4291 (struct tracepoint_action): Remove ops.
4292 (m_tracepoint_action_download, r_tracepoint_action_download)
4293 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4294 size and offset accordingly.
4295 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4296 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4297 (tracepoint_action_send, tracepoint_action_download): New functions.
4298 Helpers for trace action handlers.
4299 (add_tracepoint_action): Remove setup actions ops.
4300 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4301
9f6a71b4
YQ
43022016-02-10 Yao Qi <yao.qi@linaro.org>
4303
4304 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4305
1e94266c
SM
43062016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4307
4308 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4309 to AC_OUTPUT.
4310 * configure: Regenerate.
4311
8adce034
SM
43122016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4313
4314 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4315 void * to gdb_byte *.
4316 * linux-low.c (siginfo_fixup): Likewise.
4317 (linux_xfer_siginfo): Likewise.
4318 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4319 Likewise.
4320 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4321
93813b37
WT
43222016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4323
4324 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4325 to srv_tgtobj.
4326 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4327 to srv_tgtobj.
4328 * linux-x86-low.c [__x86_64__]: Include
4329 "nat/amd64-linux-siginfo.h".
4330 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4331 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4332 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4333 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4334 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4335 (cpt_si_fd, si_timerid, si_overrun): Move from
4336 nat/amd64-linux-siginfo.c.
4337 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4338
8424cc97
SM
43392016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4340
4341 * server.c (skip_to_semicolon): Remove.
4342 (process_point_options): Use strchrnul instead of
4343 skip_to_semicolon.
4344
4d18591b
YQ
43452016-01-26 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4348 * linux-low.c (install_software_single_step_breakpoints): Don't
4349 call regcache_read_pc.
4350 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4351 argument pc.
4352
d8020970
YQ
43532016-01-26 Yao Qi <yao.qi@linaro.org>
4354
4355 * linux-low.c (install_software_single_step_breakpoints): Call
4356 regcache_read_pc instead of get_pc.
4357
8b207339
YQ
43582016-01-26 Yao Qi <yao.qi@linaro.org>
4359
4360 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4361 (unblock_async_io): Rename to ...
4362 (block_unblock_async_io): ... it. New function.
4363 (enable_async_io): Don't install SIGIO handler. Unblock it
4364 instead.
4365 (disable_async_io): Don't ignore SIGIO. Block it instead.
4366 (initialize_async_io): Install SIGIO handler. Don't call
4367 unblock_async_io.
4368
18879fef
YQ
43692016-01-26 Yao Qi <yao.qi@linaro.org>
4370
4371 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4372 first character is '\003', call *the_target->request_interrupt.
4373
a0f8e08a
YQ
43742016-01-25 Yao Qi <yao.qi@linaro.org>
4375
4376 * remote-utils.c (new_thread_notify): Remove.
4377 (dead_thread_notify): Likewise.
4378 * remote-utils.h (new_thread_notify): Remove declaration.
4379 (dead_thread_notify): Likewise.
4380
cc5fd9ab
MK
43812016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4382
4383 * gdb.trace/pending.exp: Fix expected message on continue.
4384
99e8eb11
MK
43852016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4386
4387 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4388 it works properly on big-endian machines where sizeof (CORE_ADDR)
4389 != sizeof (void *).
4390
a994041d
PA
43912016-01-21 Pedro Alves <palves@redhat.com>
4392
4393 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4394 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4395 * configure: Regenerate.
4396
f7a6a40d
YQ
43972016-01-21 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4400 is_thumb and set it according to CPSR saved on the stack.
4401 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4402 arm_sigreturn_next_pc.
4403
6f69e520
YQ
44042016-01-18 Yao Qi <yao.qi@linaro.org>
4405
4406 * linux-low.c (linux_set_pc_64bit): New function.
4407 (linux_get_pc_64bit): New function.
4408 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4409 Declare.
4410 * linux-sparc-low.c (debug_threads): Remove declaration.
4411 (sparc_get_pc): Remove.
4412 (the_low_target): Use linux_get_pc_64bit instead of
4413 sparc_get_pc.
4414 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4415 (the_low_target): Use linux_get_pc_64bit and
4416 linux_set_pc_64bit.
4417
276d4552
YQ
44182016-01-18 Yao Qi <yao.qi@linaro.org>
4419
4420 * linux-arm-low.c (debug_threads): Remove declaration.
4421 (arm_get_pc, arm_set_pc): Remove.
4422 (the_low_target): Use linux_get_pc_32bit and
4423 linux_set_pc_32bit.
4424 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4425 (the_low_target): Use linux_get_pc_32bit and
4426 linux_set_pc_32bit.
4427 * linux-cris-low.c (debug_threads): Remove declaration.
4428 (cris_get_pc, cris_set_pc,): Remove.
4429 (the_low_target): Use linux_get_pc_32bit and
4430 linux_set_pc_32bit.
4431 * linux-crisv32-low.c (debug_threads): Remove declaration.
4432 (cris_get_pc, cris_set_pc): Remove.
4433 (the_low_target): Use linux_get_pc_32bit and
4434 linux_set_pc_32bit.
4435 * linux-low.c: Include inttypes.h.
4436 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4437 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4438 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4439 (the_low_target): Use linux_get_pc_32bit and
4440 linux_set_pc_32bit.
4441 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4442 (the_low_target): Use linux_get_pc_32bit and
4443 linux_set_pc_32bit.
4444 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4445 (the_low_target): Use linux_get_pc_32bit and
4446 linux_set_pc_32bit.
4447 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4448 (the_low_target): Use linux_get_pc_32bit and
4449 linux_set_pc_32bit.
4450 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4451 (the_low_target): Use linux_get_pc_32bit and
4452 linux_set_pc_32bit.
4453
eb0edac8
GB
44542016-01-18 Gary Benson <gbenson@redhat.com>
4455
4456 * configure.ac (AC_FUNC_FORK): New check.
4457 * config.in: Regenerate.
4458 * configure: Likewise.
4459
1b451dda
YQ
44602016-01-14 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4463 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4464 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4465 arm_get_next_pcs_ctor.
4466
82075af2
JS
44672016-01-12 Josh Stone <jistone@redhat.com>
4468 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4469
4470 * inferiors.h: Include "gdb_vecs.h".
4471 (struct process_info): Add syscalls_to_catch.
4472 * inferiors.c (remove_process): Free syscalls_to_catch.
4473 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4474 syscall_return stops.
4475 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4476 * server.c (handle_general_set): Handle QCatchSyscalls.
4477 (handle_query): Report support for QCatchSyscalls.
4478 * target.h (struct target_ops): Add supports_catch_syscall.
4479 (target_supports_catch_syscall): New macro.
4480 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4481 (struct lwp_info): Add syscall_state.
4482 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4483 Maintain syscall_state and syscalls_to_catch across exec.
4484 (get_syscall_trapinfo): New function, proxy to the_low_target.
4485 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4486 (linux_low_filter_event): Toggle syscall_state entry/return for
4487 syscall traps, and set it ignored for all others.
4488 (gdb_catching_syscalls_p): New function.
4489 (gdb_catch_this_syscall_p): New function.
4490 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4491 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4492 (linux_supports_catch_syscall): New function.
4493 (linux_target_ops): Install it.
4494 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4495 (the_low_target): Install it.
4496
8f13a3ce
MF
44972016-01-12 Mike Frysinger <vapier@gentoo.org>
4498
4499 * acinclude.m4: Include new ../warning.m4 file.
4500 * configure: Regenerated.
4501 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4502
5b3da067
MF
45032016-01-12 Mike Frysinger <vapier@gentoo.org>
4504
4505 * ax.c (is_goto_target): Mark static.
4506 * linux-low.c (register_addr): Likewise.
4507 (linux_fetch_registers, linux_store_registers): Likewise.
4508 * mem-break.c (any_persistent_commands): Fix old prototype.
4509 (add_commands_to_breakpoint): Mark static.
4510 * regcache.c (find_register_by_name): Delete unused func.
4511 * remote-utils.c (hex_or_minus_one): Mark static.
4512 * server.c (monitor_show_help): Mark static.
4513 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4514 handle_v_requests): Likewise.
4515
bc504a31
PA
45162016-01-12 Pedro Alves <palves@redhat.com>
4517
4518 Remove use of the registered trademark symbol throughout.
4519
5a0dd67a
YQ
45202016-01-08 Yao Qi <yao.qi@linaro.org>
4521
4522 * remote-utils.c (getpkt): If c is '\003', call target hook
4523 request_interrupt.
4524
b2ca446f
YQ
45252016-01-06 Yao Qi <yao.qi@linaro.org>
4526
4527 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4528 linux-aarch32-low.c.
4529 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4530 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4531 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4532 (thumb2_breakpoint): Declare.
4533 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4534 linux-aarch32-low.h.
4535 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4536 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4537 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4538
edd88788
JB
45392016-01-01 Joel Brobecker <brobecker@adacore.com>
4540
4541 * gdbreplay.c (gdbreplay_version): Change copyright year in
4542 version message.
4543 * server.c (gdbserver_version): Likewise.
4544
65da7f14
PP
45452015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4546
4547 * server.c (crc32_table): Delete.
4548 (crc32): Use libiberty's xcrc32 function.
4549
4abd5ed2
JB
45502015-12-22 Joel Brobecker <brobecker@adacore.com>
4551
4552 * lynx-low.c (lynx_delete_thread_callback): New function.
4553 (lynx_mourn): Properly delete our process and all of its
4554 threads. Remove call to clear_inferiors.
4555
0e50fe5c
JB
45562015-12-22 Joel Brobecker <brobecker@adacore.com>
4557
4558 * target.c (thread_search_callback): Add check that
4559 the thread_stopped target callback is not NULL before
4560 calling it.
4561
35adc03f
YQ
45622015-12-21 Yao Qi <yao.qi@linaro.org>
4563
4564 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4565 arm breakpoint.
4566
bd2b2909
AT
45672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4568
4569 * server.c (handle_query): Call target_supports_software_single_step.
4570
7fe5e27e
AT
45712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4572
4573 * linux-low.c (single_step): New function.
4574 (linux_resume_one_lwp_throw): Call single_step.
4575 (start_step_over): Likewise.
4576
d9311bfa
AT
45772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4578
4579 * Makefile.in (SFILES): Append arch/arm-linux.c,
4580 arch/arm-get-next-pcs.c.
4581 (arm-linux.o): New rule.
4582 (arm-get-next-pcs.o): New rule.
4583 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4584 arm-linux.o.
4585 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4586 to linux-aarch32-low.c.
4587 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4588 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4589 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4590 (thumb2_breakpoint_len): Likewise.
4591 (arm_is_thumb_mode): Make non-static.
4592 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4593 from linux-aarch32-low.c.
4594 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4595 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4596 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4597 (thumb2_breakpoint_len): Likewise.
4598 (arm_is_thumb_mode): New declaration.
4599 * linux-arm-low.c: Include arch/arm-linux.h
4600 aarch/arm-get-next-pcs.h, sys/syscall.h.
4601 (get_next_pcs_ops): New struct.
4602 (get_next_pcs_addr_bits_remove): New function.
4603 (get_next_pcs_is_thumb): New function.
4604 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4605 (arm_sigreturn_next_pc): Likewise.
4606 (get_next_pcs_syscall_next_pc): Likewise.
4607 (arm_gdbserver_get_next_pcs): Likewise.
4608 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4609 Initialize.
4610 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4611 * server.h: Include gdb_vecs.h.
4612
68ce2059
AT
46132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4614
4615 * Makefile.in (SFILES): Append common/common-regcache.c.
4616 (OBS): Append common-regcache.o.
4617 (common-regcache.o): New rule.
4618 * regcache.c (init_register_cache): Initialize cache to
4619 REG_UNAVAILABLE.
4620 (regcache_raw_read_unsigned): New function.
4621 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4622 register_status enum.
4623
fa5308bd
AT
46242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4625
4626 * linux-aarch64-low.c (the_low_targets): Rename
4627 breakpoint_reinsert_addr to get_next_pcs.
4628 * linux-arm-low.c (the_low_targets): Likewise.
4629 * linux-bfin-low.c (the_low_targets): Likewise.
4630 * linux-cris-low.c (the_low_targets): Likewise.
4631 * linux-crisv32-low.c (the_low_targets): Likewise.
4632 * linux-low.c (can_software_single_step): Likewise.
4633 (install_software_single_step_breakpoints): New function.
4634 (start_step_over): Use install_software_single_step_breakpoints.
4635 * linux-low.h: New CORE_ADDR vector.
4636 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4637 get_next_pcs.
4638 * linux-mips-low.c (the_low_targets): Likewise.
4639 * linux-nios2-low.c (the_low_targets): Likewise.
4640 * linux-sparc-low.c (the_low_targets): Likewise.
4641
4a6ed09b
PA
46422015-12-17 Pedro Alves <palves@redhat.com>
4643
4644 * linux-low.c (linux_kill_one_lwp): Remove references to
4645 LinuxThreads.
4646 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4647 to 'kill'.
4648 (linux_init_signals): Delete.
4649 (initialize_low): Adjust.
4650 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4651
7544db95
PA
46522015-12-16 Pedro Alves <palves@redhat.com>
4653
4654 * configure.ac (compiler warning flags): When testing a
4655 -Wno-foo option, check whether -Wfoo works instead.
4656 * configure: Regenerate.
4657
8020350c
DB
46582015-12-11 Don Breazeal <donb@codesourcery.com>
4659
4660 * server.c (process_serial_event): Don't exit from gdbserver
4661 in remote mode if there are still active inferiors.
4662
db91f502
YQ
46632015-12-11 Yao Qi <yao.qi@linaro.org>
4664
4665 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4666 arm_breakpoint_at if the process is 32-bit.
4667
b37a6290
YQ
46682015-12-11 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4671 arm breakpoint.
4672
17b1509a
YQ
46732015-12-07 Yao Qi <yao.qi@linaro.org>
4674
4675 * configure.srv: Append arm.o to srv_tgtobj for
4676 aarch64*-*-linux* target.
4677 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4678 from linux-arm-low.c.
4679 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4680 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4681 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4682 (thumb2_breakpoint_len): Likewise.
4683 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4684 (arm_breakpoint_kinds): Likewise.
4685 (arm_breakpoint_kind_from_pc): Likewise.
4686 (arm_sw_breakpoint_from_kind): Likewise.
4687 (arm_breakpoint_kind_from_current_state): Likewise.
4688 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4689 (arm_sw_breakpoint_from_kind): Declare.
4690 (arm_breakpoint_kind_from_current_state): Declare.
4691 (arm_breakpoint_at): Declare.
4692 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4693 arm_sw_breakpoint_from_kind if process is 32-bit.
4694 (aarch64_breakpoint_kind_from_pc): New function.
4695 (aarch64_breakpoint_kind_from_current_state): New function.
4696 (the_low_target): Initialize fields breakpoint_kind_from_pc
4697 and breakpoint_kind_from_current_state.
4698 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4699 linux-aarch32-low.c.
4700 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4701 (arm_breakpoint, arm_breakpoint_len): Likewise.
4702 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4704 (arm_is_thumb_mode): Likewise.
4705 (arm_breakpoint_at): Likewise.
4706 (arm_breakpoint_kind_from_pc): Likewise.
4707 (arm_sw_breakpoint_from_kind): Likewise.
4708 (arm_breakpoint_kind_from_current_state): Likewise.
4709
4710 Revert:
4711 2015-08-04 Yao Qi <yao.qi@linaro.org>
4712
4713 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4714 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4715 * server.c (extended_protocol): Remove "static".
4716 * server.h (extended_protocol): Declare it.
4717
ece66d65
JS
47182015-12-04 Josh Stone <jistone@redhat.com>
4719
4720 * target.h (struct target_ops) <arch_setup>: Rename to ...
4721 (struct target_ops) <post_create_inferior>: ... this.
4722 (target_arch_setup): Rename to ...
4723 (target_post_create_inferior): ... this, calling post_create_inferior.
4724 * server.c (start_inferior): Update target_arch_setup calls to
4725 target_post_create_inferior.
4726 * linux-low.c (linux_low_ptrace_options): Forward declare.
4727 (linux_arch_setup): Update its comment for general use.
4728 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4729 (struct linux_target_ops): Use linux_post_create_inferior.
4730 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4731 to post_create_inferior.
4732 * nto-low.c (struct nto_target_ops): Likewise.
4733 * spu-low.c (struct spu_target_ops): Likewise.
4734 * win32-low.c (struct win32_target_ops): Likewise.
4735
e58c48b4
AT
47362015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4737
4738 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4739
fbec8956
AT
47402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4741
4742 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4743 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4744 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4745 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4746 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4747 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4748 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4749 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4750 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4751 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4752 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4753 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4754
9b4c5f87
AT
47552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4756
4757 * linux-low.c (linux_look_up_symbols): Don't call
4758 linux_supports_traceclone.
4759 * linux-low.h (thread_db_init): Remove use_events argument.
4760 * thread-db.c (thread_db_use_event): Remove global variable.
4761 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4762 (struct thread_db) <td_create_bp>: Remove field.
4763 (thread_db_create_event): Remove function.
4764 (thread_db_enable_reporting): Likewise.
4765 (find_one_thread): Don't check for thread_db_use_events.
4766 (attach_thread): Likewise.
4767 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4768 (try_thread_db_load_1): Don't check for thread_db_use_events.
4769 (thread_db_init): Remove use_events argument and thread events
4770 handling.
4771 (remove_thread_event_breakpoints): Remove function.
4772 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4773
7d00775e
AT
47742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4775
4776 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4777 New function.
4778 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4779 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4780 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4781 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4782 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4783 Initialize.
4784 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4785 New function.
4786 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4787 * linux-low.c (can_hardware_single_step): Use
4788 supports_hardware_single_step.
4789 (can_software_single_step): New function.
4790 (start_step_over): Call can_software_single_step.
4791 (linux_supports_hardware_single_step): New function.
4792 (struct target_ops) <supports_software_single_step>: Initialize.
4793 * linux-low.h (struct linux_target_ops)
4794 <supports_hardware_single_step>: Initialize.
4795 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4796 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4797 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4798 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4799 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4800 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4801 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4802 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4803 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4804 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4805 Initialize.
4806 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4807 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4808 Initialize.
4809 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4810 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4811 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4812 New function.
4813 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4814 * target.h (struct target_ops): <supports_software_single_step>:
4815 New field.
4816 (target_supports_software_single_step): New macro.
4817
2d97cd35
AT
48182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4819
4820 * linux-low.c (linux_wait_1): Fix pc advance condition.
4821 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4822 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4823
769ef81f
AT
48242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4825
4826 * linux-arm-low.c (arm_is_thumb_mode): New function.
4827 (arm_breakpoint_at): Use arm_is_thumb_mode.
4828 (arm_breakpoint_kind_from_current_state): New function.
4829 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4830 Initialize.
4831 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4832 (linux_breakpoint_kind_from_current_state): New function.
4833 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4834 * linux-low.h (struct linux_target_ops)
4835 <breakpoint_kind_from_current_state>: New field.
4836 * target.h (struct target_ops): Likewise.
4837 (target_breakpoint_kind_from_current_state): New macro.
4838
1bebeeca
PA
48392015-11-30 Pedro Alves <palves@redhat.com>
4840
4841 * linux-low.c (linux_resume): Wake up the event loop before
4842 returning.
4843
a67a9fae
PA
48442015-11-30 Pedro Alves <palves@redhat.com>
4845
4846 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4847 check.
4848 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4849 to -1.
4850 * target.c (struct thread_search): New structure.
4851 (thread_search_callback): New function.
4852 (prev_general_thread): New global.
4853 (prepare_to_access_memory, done_accessing_memory): New functions.
4854 * target.h (prepare_to_access_memory, done_accessing_memory):
4855 Replace macros with function declarations.
4856
f2faf941
PA
48572015-11-30 Pedro Alves <palves@redhat.com>
4858
4859 PR 14618
4860 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4861 report TARGET_WAITKIND_NO_RESUMED.
4862 * remote-utils.c (prepare_resume_reply): Handle
4863 TARGET_WAITKIND_NO_RESUMED.
4864 * server.c (report_no_resumed): New global.
4865 (handle_query) <qSupported>: Handle "no-resumed+". Report
4866 "no-resumed+" support.
4867 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4868 return error if the client doesn't support no-resumed events.
4869 (push_stop_notification): New function.
4870 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4871 events if the client supports them.
4872
a681f9c9
PA
48732015-11-30 Pedro Alves <palves@redhat.com>
4874
4875 * linux-low.c (thread_still_has_status_pending_p): Don't check
4876 vCont;t here.
4877 (lwp_resumed): New function.
4878 (status_pending_p_callback): Return early if the LWP is not
4879 supposed to be resumed.
4880
65706a29
PA
48812015-11-30 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c (handle_extended_wait): Assert that the LWP's
4884 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4885 thread create events, leave the new child's status pending.
4886 (linux_low_filter_event): If GDB wants to hear about thread exit
4887 events, leave the LWP marked dead and don't delete it.
4888 (linux_wait_for_event_filtered): Don't check for thread exit.
4889 (filter_exit_event): New function.
4890 (linux_wait_1): Use it, when returning an exit event.
4891 (linux_resume_one_lwp_throw): Assert that the LWP's
4892 waitstatus is TARGET_WAITKIND_IGNORE.
4893 * remote-utils.c (prepare_resume_reply): Handle
4894 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4895 * server.c (report_thread_events): New global.
4896 (handle_general_set): Handle QThreadEvents.
4897 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4898 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4899 TARGET_WAITKIND_THREAD_EXITED.
4900 * server.h (report_thread_events): Declare.
4901
56cf4bed
PA
49022015-11-30 Pedro Alves <palves@redhat.com>
4903
4904 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4905 the thread's last_resume_kind was resume_stop.
4906
500c1d85
PA
49072015-11-30 Pedro Alves <palves@redhat.com>
4908
4909 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4910 before returning.
4911
de979965
PA
49122015-11-30 Pedro Alves <palves@redhat.com>
4913
4914 * server.c (handle_v_requests): Handle vCtrlC.
4915
34c65914
PA
49162015-11-30 Pedro Alves <palves@redhat.com>
4917
4918 * gdbthread.h (find_any_thread_of_pid): Declare.
4919 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4920 functions.
4921 * server.c (handle_query): If current_thread is NULL, look for
4922 another thread of the selected process.
4923
79efa585 49242015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4925 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4926
4927 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4928 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4929 name in reply.
4930 * target.h (struct target_ops) <thread_name>: New field.
4931 (target_thread_name): New macro.
4932
80d82c19
JB
49332015-11-23 Joel Brobecker <brobecker@adacore.com>
4934
4935 * regcache.h (regcache_invalidate_pid): Add declaration.
4936 * regcache.c (regcache_invalidate_pid): New function, extracted
4937 from regcache_invalidate.
4938 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4939 Add trivial documentation comment.
4940 * lynx-low.c: Use regcache_invalidate_pid instead of
4941 regcache_invalidate.
4942
64da5dd5
JB
49432015-11-23 Joel Brobecker <brobecker@adacore.com>
4944
4945 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4946 and Elf64_auxv_t if the target is Android.
4947
37ce4055
DE
49482015-11-22 Doug Evans <xdje42@gmail.com>
4949
4950 * target.h: #include <sys/types.h>.
4951
06e03fff
PA
49522015-11-19 Pedro Alves <palves@redhat.com>
4953
4954 * linux-low.c (linux_process_qsupported): Change prototype.
4955 Adjust.
4956 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4957 Change prototype.
4958 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4959 and adjust to loop over all features.
4960 * server.c (handle_query) <qSupported>: Adjust to call
4961 target_process_qsupported once, passing it a vector of unprocessed
4962 features.
4963 * target.h (struct target_ops) <process_qsupported>: Change
4964 prototype.
4965 (target_process_qsupported): Adjust.
4966
9a084706
PA
49672015-11-19 Pedro Alves <palves@redhat.com>
4968
4969 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4970 mode.
4971 * configure: Regenerate.
4972
dad44a1f
PA
49732015-11-19 Pedro Alves <palves@redhat.com>
4974
4975 * configure: Regenerate.
4976
231c0592
YQ
49772015-11-19 Yao Qi <yao.qi@linaro.org>
4978
4979 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4980 type to uint32_t.
4981
6c1c9a8b
YQ
49822015-11-19 Yao Qi <yao.qi@linaro.org>
4983
4984 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4985 (struct aarch64_operand): Move enum out.
4986
9caa3311
YQ
49872015-11-19 Yao Qi <yao.qi@linaro.org>
4988
4989 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4990 struct user_fpsimd_state *.
4991 (aarch64_store_fpregset): Likewise.
4992
6a69a054
YQ
49932015-11-19 Yao Qi <yao.qi@linaro.org>
4994
4995 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4996 struct user_pt_regs *.
4997 (aarch64_store_gregset): Likewise.
4998
1798301e
PA
49992015-11-18 Pedro Alves <palves@redhat.com>
5000
5001 * Makefile.in (all_object_files): Add $IPA_OBJS.
5002
ce7715e2
PA
50032015-11-17 Pedro Alves <palves@redhat.com>
5004
5005 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5006 GDB_SIGNAL_0 and gdb_signal_to_string.
5007
c0879059
PA
50082015-11-17 Pedro Alves <palves@redhat.com>
5009
5010 * win32-low.c (handle_output_debug_string): Remove parameter.
5011 (win32_kill): Remove our_status local and adjust call to
5012 handle_output_debug_string.
5013 (get_child_debug_event): Adjust call to
5014 handle_output_debug_string.
5015
1996e237
SM
50162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5017
5018 * linux-mips-low.c (mips_fill_gregset): Add cast.
5019 (mips_store_gregset): Likewise.
5020 (mips_fill_fpregset): Likewise.
5021 (mips_store_fpregset): Likewise.
5022
cbec665b
SM
50232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5024
5025 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5026 priv.
5027
eb3e3c67
SM
50282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5029
5030 * linux-mips-low.c (mips_linux_new_thread): Change type of
5031 watch_type to enum target_hw_bp_type.
5032
171de4b8
SM
50332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5034
5035 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5036 Change return type to arm_hwbp_type.
5037
04248ead
SM
50382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5039
5040 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5041 (arm_store_gregset): Likewise.
5042 * linux-arm-low.c (arm_get_hwcap): Likewise.
5043 (arm_read_description): Likewise.
5044
04b3479c
SM
50452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5046
5047 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5048
2bc84e8a
SM
50492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5050
5051 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5052 (ppc_fill_vsxregset): Likewise.
5053 (ppc_store_vsxregset): Likewise.
5054 (ppc_fill_vrregset): Likewise.
5055 (ppc_store_vrregset): Likewise.
5056 (ppc_fill_evrregset): Likewise.
5057 (ppc_store_evrregset): Likewise.
5058
e6c5bb05
SM
50592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5060
5061 * linux-ppc-low.c (ppc_usrregs_info): Remove
5062 forward-declaration.
5063 (ppc_arch_setup): Move lower in file.
5064
7ea45d72
SM
50652015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5066
5067 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5068 (ps_pdwrite): Likewise.
5069
69291610
HW
50702015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5071
5072 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5073 to after assert checks.
5074
b42945fd
SM
50752015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5076
5077 * proc-service.c (ps_pdread): Add/adjust casts.
5078 (ps_pdwrite): Add/adjust casts.
5079
d6f85c84
SM
50802015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5081
5082 * server.c (handle_search_memory_1): Cast return value of
5083 memmem.
5084
f98cd059
SM
50852015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5086
5087 * server.c (write_qxfer_response): Change type of data to
5088 gdb_byte *.
5089
d2412fa5
PA
50902015-10-29 Pedro Alves <palves@redhat.com>
5091
5092 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5093
c17414a2
PA
50942015-10-29 Pedro Alves <palves@redhat.com>
5095
5096 * tracepoint.c (clear_installed_tracepoints): Add casts.
5097
e053fbc4
PA
50982015-10-29 Pedro Alves <palves@redhat.com>
5099
5100 * server.c (handle_v_cont, process_serial_event): Add enum
5101 gdb_signal casts to signal parsing code.
5102
add67df8
PA
51032015-10-29 Pedro Alves <palves@redhat.com>
5104
5105 * linux-low.h (NULL_REGSET): Define.
5106 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5107 * linux-arm-low.c (arm_regsets): Likewise.
5108 * linux-crisv32-low.c (cris_regsets): Likewise.
5109 * linux-m68k-low.c (m68k_regsets): Likewise.
5110 * linux-mips-low.c (mips_regsets): Likewise.
5111 * linux-nios2-low.c (nios2_regsets): Likewise.
5112 * linux-ppc-low.c (ppc_regsets): Likewise.
5113 * linux-s390-low.c (s390_regsets): Likewise.
5114 * linux-sh-low.c (sh_regsets): Likewise.
5115 * linux-sparc-low.c (sparc_regsets): Likewise.
5116 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5117 * linux-tile-low.c (tile_regsets): Likewise.
5118 * linux-x86-low.c (x86_regsets): Likewise.
5119 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5120
50bc912a
PA
51212015-10-29 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.h (NULL_REGSET): Define.
5124 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5125 * linux-arm-low.c (arm_regsets): Likewise.
5126 * linux-crisv32-low.c (cris_regsets): Likewise.
5127 * linux-m68k-low.c (m68k_regsets): Likewise.
5128 * linux-mips-low.c (mips_regsets): Likewise.
5129 * linux-nios2-low.c (nios2_regsets): Likewise.
5130 * linux-ppc-low.c (ppc_regsets): Likewise.
5131 * linux-s390-low.c (s390_regsets): Likewise.
5132 * linux-sh-low.c (sh_regsets): Likewise.
5133 * linux-sparc-low.c (sparc_regsets): Likewise.
5134 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5135 * linux-tile-low.c (tile_regsets): Likewise.
5136 * linux-x86-low.c (x86_regsets): Likewise.
5137 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5138
682b2546
DE
51392015-10-26 Doug Evans <dje@google.com>
5140
5141 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5142
963843d4
DE
51432015-10-26 Doug Evans <dje@google.com>
5144
5145 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5146
d41401ac
DE
51472015-10-26 Doug Evans <dje@google.com>
5148
5149 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5150 for debug_printf.
5151 (attach_thread, find_new_threads_callback): Ditto.
5152
3db28855
AT
51532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5154
5155 * mem-break.h (set_breakpoint_data): Remove.
5156
fb78e89c
AT
51572015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5158
5159 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5160 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5161 (initialize_low): Remove set_breakpoint_data call.
5162 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5163 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5164 (initialize_low): Remove set_breakpoint_data call.
5165 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5166 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5167 (initialize_low): Remove set_breakpoint_data call.
5168
2e6ee069
AT
51692015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5170
5171 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5172 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5173 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5174 * target.h (target_breakpoint_kind_from_pc): New macro.
5175
1652a986
AT
51762015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5177
5178 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5179 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5180 the default breakpoint kind.
5181
abeead09
AT
51822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5183
5184 * linux-arm-low.c (arm_supports_z_point_type): Add software
5185 breakpoint support.
5186
b0b4b501
AT
51872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5188
5189 * linux-arm-low.c: Refactor breakpoint definitions.
5190 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5191 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5192
8689682c
AT
51932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5194
5195 * Makefile.in: Add arm.c/o.
5196 * configure.srv: Likewise.
5197 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5198 (arm_breakpoint_kind_from_pc): New function.
5199 (arm_sw_breakpoint_from_kind): Return proper kind.
5200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5201
27165294
AT
52022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5203
5204 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5205 removal.
5206 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5207 (struct raw_breakpoint) <size>: Remove.
5208 (struct raw_breakpoint) <kind>: Add.
5209 (bp_size): New function.
5210 (bp_opcode): Likewise.
5211 (find_raw_breakpoint_at): Adjust for kind.
5212 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5213 (remove_memory_breakpoint): Adjust for kind call bp_size.
5214 (set_raw_breakpoint_at): Adjust for kind.
5215 (set_breakpoint): Likewise.
5216 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5217 (delete_raw_breakpoint): Adjust for kind.
5218 (delete_breakpoint): Likewise.
5219 (find_gdb_breakpoint): Likewise.
5220 (set_gdb_breakpoint_1): Likewise.
5221 (set_gdb_breakpoint): Likewise.
5222 (delete_gdb_breakpoint_1): Likewise.
5223 (delete_gdb_breakpoint): Likewise.
5224 (uninsert_raw_breakpoint): Likewise.
5225 (reinsert_raw_breakpoint): Likewise.
5226 (set_breakpoint_data): Remove.
5227 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5228 (check_mem_read): Adjust for kind call bp_size.
5229 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5230 (clone_one_breakpoint): Adjust for kind.
5231 * mem-break.h (set_gdb_breakpoint): Likewise.
5232 (delete_gdb_breakpoint): Likewise.
5233 * server.c (process_serial_event): Likewise.
5234
dd373349
AT
52352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5236
5237 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5238 (struct linux_target_ops) <breakpoint>: Remove.
5239 (struct linux_target_ops) <breakpoint_len>: Remove.
5240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5242 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5243 (arm_sw_breakpoint_from_kind): New function.
5244 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5245 (struct linux_target_ops) <breakpoint>: Remove.
5246 (struct linux_target_ops) <breakpoint_len>: Remove.
5247 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5248 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5249 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5250 (struct linux_target_ops) <breakpoint>: Remove.
5251 (struct linux_target_ops) <breakpoint_len>: Remove.
5252 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5254 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5255 (struct linux_target_ops) <breakpoint>: Remove.
5256 (struct linux_target_ops) <breakpoint_len>: Remove.
5257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5259 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5260 and sw_breakpoint_from_kind to increment the pc.
5261 (linux_breakpoint_kind_from_pc): New function.
5262 (linux_sw_breakpoint_from_kind): New function.
5263 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5264 (initialize_low): Call breakpoint_kind_from_pc and
5265 sw_breakpoint_from_kind to replace breakpoint_data/len.
5266 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5267 New field.
5268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5269 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5270 (struct linux_target_ops) <breakpoint>: Remove.
5271 (struct linux_target_ops) <breakpoint_len>: Remove.
5272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5274 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5275 (struct linux_target_ops) <breakpoint>: Remove.
5276 (struct linux_target_ops) <breakpoint_len>: Remove.
5277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5279 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5280 (struct linux_target_ops) <breakpoint>: Remove.
5281 (struct linux_target_ops) <breakpoint_len>: Remove.
5282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5284 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5285 (struct linux_target_ops) <breakpoint>: Remove.
5286 (struct linux_target_ops) <breakpoint_len>: Remove.
5287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5289 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5290 (struct linux_target_ops) <breakpoint>: Remove.
5291 (struct linux_target_ops) <breakpoint_len>: Remove.
5292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5294 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5295 (struct linux_target_ops) <breakpoint>: Remove.
5296 (struct linux_target_ops) <breakpoint_len>: Remove.
5297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5299 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5300 (struct linux_target_ops) <breakpoint>: Remove.
5301 (struct linux_target_ops) <breakpoint_len>: Remove.
5302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5304 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5305 (struct linux_target_ops) <breakpoint>: Remove.
5306 (struct linux_target_ops) <breakpoint_len>: Remove.
5307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5309 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5310 (struct linux_target_ops) <breakpoint>: Remove.
5311 (struct linux_target_ops) <breakpoint_len>: Remove.
5312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5314 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5315 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5316 (struct linux_target_ops) <breakpoint>: Remove.
5317 (struct linux_target_ops) <breakpoint_len>: Remove.
5318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5320 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5321 (struct linux_target_ops) <breakpoint>: Remove.
5322 (struct linux_target_ops) <breakpoint_len>: Remove.
5323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5325
4cd98a19
AT
53262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5327
5328 * linux-cris-low.c (cris_get_pc): Remove void arg.
5329
774ee6d2
AR
53302015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5331
5332 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5333 variable name.
5334
833dcd29
AR
53352015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5336
5337 * inferiors.c (thread_pid_matches_callback): New function.
5338 (find_thread_process): New function.
5339 (remove_thread): Reset current_thread.
5340 (remove_process): Assert threads have been removed first.
5341
8d689ee5
YQ
53422015-10-15 Yao Qi <yao.qi@linaro.org>
5343
5344 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5345 if it is 3.
5346 (aarch64_remove_point): Likewise.
5347 * regcache.c (regcache_register_size): New function.
5348
1c2e1515
YQ
53492015-10-12 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-aarch64-low.c: Update all callers as emit_load_store
5352 is renamed to aarch64_emit_load_store.
5353
e1c587c3
YQ
53542015-10-12 Yao Qi <yao.qi@linaro.org>
5355
5356 * linux-aarch64-low.c: Update all callers of function renaming
5357 from emit_insn to aarch64_emit_insn.
5358
b6542f81
YQ
53592015-10-12 Yao Qi <yao.qi@linaro.org>
5360
5361 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5362 arch/aarch64-insn.h.
5363 (struct aarch64_memory_operand): Likewise.
5364 (ENCODE): Likewise.
5365 (emit_insn): Move to arch/aarch64-insn.c.
5366 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5367 (emit_load_store): Move to arch/aarch64-insn.c.
5368 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5369 (can_encode_int32): Remove.
5370
246994ce
YQ
53712015-10-12 Yao Qi <yao.qi@linaro.org>
5372
5373 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5374 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5375 (aarch64_relocate_instruction): Likewise.
5376 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5377 (struct aarch64_insn_visitor): Likewise.
5378
0badd99f
YQ
53792015-10-12 Yao Qi <yao.qi@linaro.org>
5380
5381 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5382 (struct aarch64_insn_visitor): New.
5383 (struct aarch64_insn_relocation_data): New.
5384 (aarch64_ftrace_insn_reloc_b): New function.
5385 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5386 (aarch64_ftrace_insn_reloc_cb): Likewise.
5387 (aarch64_ftrace_insn_reloc_tb): Likewise.
5388 (aarch64_ftrace_insn_reloc_adr): Likewise.
5389 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5390 (aarch64_ftrace_insn_reloc_others): Likewise.
5391 (visitor): New.
5392 (aarch64_relocate_instruction): Use visitor.
5393
dfaffe9d
YQ
53942015-10-12 Yao Qi <yao.qi@linaro.org>
5395
5396 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5397 int. Add argument buf.
5398 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5399 aarch64_relocate_instruction.
5400
70b439f0
YQ
54012015-10-12 Yao Qi <yao.qi@linaro.org>
5402
5403 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5404 argument insn. Remove local variable insn. Don't call
5405 target_read_uint32.
5406 (aarch64_install_fast_tracepoint_jump_pad): Call
5407 target_read_uint32.
5408
7781c06f
YQ
54092015-09-30 Yao Qi <yao.qi@linaro.org>
5410
5411 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5412 (emit_load_store_pair): Likewise.
5413
9a3c8263
SM
54142015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5415
5416 * dll.c (match_dll): Add cast(s).
5417 (unloaded_dll): Likewise.
5418 * linux-low.c (second_thread_of_pid_p): Likewise.
5419 (delete_lwp_callback): Likewise.
5420 (count_events_callback): Likewise.
5421 (select_event_lwp_callback): Likewise.
5422 (linux_set_resume_request): Likewise.
5423 * server.c (accumulate_file_name_length): Likewise.
5424 (emit_dll_description): Likewise.
5425 (handle_qxfer_threads_worker): Likewise.
5426 (visit_actioned_threads): Likewise.
5427 * thread-db.c (any_thread_of): Likewise.
5428 * tracepoint.c (same_process_p): Likewise.
5429 (match_blocktype): Likewise.
5430 (build_traceframe_info_xml): Likewise.
5431
224c3ddb
SM
54322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5433
5434 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5435 assignment.
5436 (gdb_unparse_agent_expr): Likewise.
5437 * hostio.c (require_data): Likewise.
5438 (handle_pread): Likewise.
5439 * linux-low.c (disable_regset): Likewise.
5440 (fetch_register): Likewise.
5441 (store_register): Likewise.
5442 (get_dynamic): Likewise.
5443 (linux_qxfer_libraries_svr4): Likewise.
5444 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5445 (set_fast_tracepoint_jump): Likewise.
5446 (uninsert_fast_tracepoint_jumps_at): Likewise.
5447 (reinsert_fast_tracepoint_jumps_at): Likewise.
5448 (validate_inserted_breakpoint): Likewise.
5449 (clone_agent_expr): Likewise.
5450 * regcache.c (init_register_cache): Likewise.
5451 * remote-utils.c (putpkt_binary_1): Likewise.
5452 (decode_M_packet): Likewise.
5453 (decode_X_packet): Likewise.
5454 (look_up_one_symbol): Likewise.
5455 (relocate_instruction): Likewise.
5456 (monitor_output): Likewise.
5457 * server.c (handle_search_memory): Likewise.
5458 (handle_qxfer_exec_file): Likewise.
5459 (handle_qxfer_libraries): Likewise.
5460 (handle_qxfer): Likewise.
5461 (handle_query): Likewise.
5462 (handle_v_cont): Likewise.
5463 (handle_v_run): Likewise.
5464 (captured_main): Likewise.
5465 * target.c (write_inferior_memory): Likewise.
5466 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5467 * tracepoint.c (init_trace_buffer): Likewise.
5468 (add_tracepoint_action): Likewise.
5469 (add_traceframe): Likewise.
5470 (add_traceframe_block): Likewise.
5471 (cmd_qtdpsrc): Likewise.
5472 (cmd_qtdv): Likewise.
5473 (cmd_qtstatus): Likewise.
5474 (response_source): Likewise.
5475 (response_tsv): Likewise.
5476 (cmd_qtnotes): Likewise.
5477 (gdb_collect): Likewise.
5478 (initialize_tracepoint): Likewise.
5479
afbe19f8
PL
54802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5481
5482 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5483 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5484 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5485 <NOP>: New.
5486 (enum aarch64_condition_codes): New enum.
5487 (w0): New static global.
5488 (fp): Likewise.
5489 (lr): Likewise.
5490 (struct aarch64_memory_operand) <type>: New
5491 MEMORY_OPERAND_POSTINDEX type.
5492 (postindex_memory_operand): New helper function.
5493 (emit_ret): New function.
5494 (emit_load_store_pair): New function, factored out of emit_stp
5495 with support for MEMORY_OPERAND_POSTINDEX.
5496 (emit_stp): Rewrite using emit_load_store_pair.
5497 (emit_ldp): New function.
5498 (emit_load_store): Likewise.
5499 (emit_ldr): Mention post-index instruction in comment.
5500 (emit_ldrh): New function.
5501 (emit_ldrb): New function.
5502 (emit_ldrsw): Mention post-index instruction in comment.
5503 (emit_str): Likewise.
5504 (emit_subs): New function.
5505 (emit_cmp): Likewise.
5506 (emit_and): Likewise.
5507 (emit_orr): Likewise.
5508 (emit_orn): Likewise.
5509 (emit_eor): Likewise.
5510 (emit_mvn): Likewise.
5511 (emit_lslv): Likewise.
5512 (emit_lsrv): Likewise.
5513 (emit_asrv): Likewise.
5514 (emit_mul): Likewise.
5515 (emit_sbfm): Likewise.
5516 (emit_sbfx): Likewise.
5517 (emit_ubfm): Likewise.
5518 (emit_ubfx): Likewise.
5519 (emit_csinc): Likewise.
5520 (emit_cset): Likewise.
5521 (emit_nop): Likewise.
5522 (emit_ops_insns): New helper function.
5523 (emit_pop): Likewise.
5524 (emit_push): Likewise.
5525 (aarch64_emit_prologue): New function.
5526 (aarch64_emit_epilogue): Likewise.
5527 (aarch64_emit_add): Likewise.
5528 (aarch64_emit_sub): Likewise.
5529 (aarch64_emit_mul): Likewise.
5530 (aarch64_emit_lsh): Likewise.
5531 (aarch64_emit_rsh_signed): Likewise.
5532 (aarch64_emit_rsh_unsigned): Likewise.
5533 (aarch64_emit_ext): Likewise.
5534 (aarch64_emit_log_not): Likewise.
5535 (aarch64_emit_bit_and): Likewise.
5536 (aarch64_emit_bit_or): Likewise.
5537 (aarch64_emit_bit_xor): Likewise.
5538 (aarch64_emit_bit_not): Likewise.
5539 (aarch64_emit_equal): Likewise.
5540 (aarch64_emit_less_signed): Likewise.
5541 (aarch64_emit_less_unsigned): Likewise.
5542 (aarch64_emit_ref): Likewise.
5543 (aarch64_emit_if_goto): Likewise.
5544 (aarch64_emit_goto): Likewise.
5545 (aarch64_write_goto_address): Likewise.
5546 (aarch64_emit_const): Likewise.
5547 (aarch64_emit_call): Likewise.
5548 (aarch64_emit_reg): Likewise.
5549 (aarch64_emit_pop): Likewise.
5550 (aarch64_emit_stack_flush): Likewise.
5551 (aarch64_emit_zero_ext): Likewise.
5552 (aarch64_emit_swap): Likewise.
5553 (aarch64_emit_stack_adjust): Likewise.
5554 (aarch64_emit_int_call_1): Likewise.
5555 (aarch64_emit_void_call_2): Likewise.
5556 (aarch64_emit_eq_goto): Likewise.
5557 (aarch64_emit_ne_goto): Likewise.
5558 (aarch64_emit_lt_goto): Likewise.
5559 (aarch64_emit_le_goto): Likewise.
5560 (aarch64_emit_gt_goto): Likewise.
5561 (aarch64_emit_ge_got): Likewise.
5562 (aarch64_emit_ops_impl): New static global variable.
5563 (aarch64_emit_ops): New target function, return
5564 &aarch64_emit_ops_impl.
5565 (struct linux_target_ops): Install it.
5566
bb903df0
PL
55672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5568
5569 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5570 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5571 aarch64-ipa.o.
5572 * linux-aarch64-ipa.c: New file.
5573 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5574 and endian.h.
5575 (aarch64_get_thread_area): New target method.
5576 (extract_signed_bitfield): New helper function.
5577 (aarch64_decode_ldr_literal): New function.
5578 (enum aarch64_opcodes): New enum.
5579 (struct aarch64_register): New struct.
5580 (struct aarch64_operand): New struct.
5581 (x0): New static global.
5582 (x1): Likewise.
5583 (x2): Likewise.
5584 (x3): Likewise.
5585 (x4): Likewise.
5586 (w2): Likewise.
5587 (ip0): Likewise.
5588 (sp): Likewise.
5589 (xzr): Likewise.
5590 (aarch64_register): New helper function.
5591 (register_operand): Likewise.
5592 (immediate_operand): Likewise.
5593 (struct aarch64_memory_operand): New struct.
5594 (offset_memory_operand): New helper function.
5595 (preindex_memory_operand): Likewise.
5596 (enum aarch64_system_control_registers): New enum.
5597 (ENCODE): New macro.
5598 (emit_insn): New helper function.
5599 (emit_b): New function.
5600 (emit_bcond): Likewise.
5601 (emit_cb): Likewise.
5602 (emit_tb): Likewise.
5603 (emit_blr): Likewise.
5604 (emit_stp): Likewise.
5605 (emit_ldp_q_offset): Likewise.
5606 (emit_stp_q_offset): Likewise.
5607 (emit_load_store): Likewise.
5608 (emit_ldr): Likewise.
5609 (emit_ldrsw): Likewise.
5610 (emit_str): Likewise.
5611 (emit_ldaxr): Likewise.
5612 (emit_stxr): Likewise.
5613 (emit_stlr): Likewise.
5614 (emit_data_processing_reg): Likewise.
5615 (emit_data_processing): Likewise.
5616 (emit_add): Likewise.
5617 (emit_sub): Likewise.
5618 (emit_mov): Likewise.
5619 (emit_movk): Likewise.
5620 (emit_mov_addr): Likewise.
5621 (emit_mrs): Likewise.
5622 (emit_msr): Likewise.
5623 (emit_sevl): Likewise.
5624 (emit_wfe): Likewise.
5625 (append_insns): Likewise.
5626 (can_encode_int32_in): New helper function.
5627 (aarch64_relocate_instruction): New function.
5628 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5629 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5630 (struct linux_target_ops): Install aarch64_get_thread_area,
5631 aarch64_install_fast_tracepoint_jump_pad and
5632 aarch64_get_min_fast_tracepoint_insn_len.
5633
787749ea
PL
56342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5635
5636 * Makefile.in (aarch64-insn.o): New rule.
5637 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5638
9812b2e6
YQ
56392015-09-21 Yao Qi <yao.qi@linaro.org>
5640
5641 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5642
18fe412b
YQ
56432015-09-21 Yao Qi <yao.qi@linaro.org>
5644
5645 * tracepoint.c (max_jump_pad_size): Remove.
5646
a0cc84cd
YQ
56472015-09-18 Yao Qi <yao.qi@linaro.org>
5648
5649 * linux-aarch64-low.c: Don't include sys/uio.h.
5650 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5651
d78908cf
WW
56522015-09-16 Wei-cheng Wang <cole945@gmail.com>
5653
5654 * tracepoint.c (eval_result_type): Change prototype.
5655 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5656
d57e0d50
PA
56572015-09-15 Pedro Alves <palves@redhat.com>
5658
5659 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5660 Check whether to report exec events instead of checking whether
5661 multiprocess is enabled.
5662
5a676acc
PA
56632015-09-15 Pedro Alves <palves@redhat.com>
5664
5665 PR remote/18965
5666 * remote-utils.c (prepare_resume_reply): Merge
5667 TARGET_WAITKIND_VFORK_DONE switch case with the
5668 TARGET_WAITKIND_FORKED case.
5669
7c5d0fad
YQ
56702015-09-15 Yao Qi <yao.qi@linaro.org>
5671
5672 * server.c (handle_query): Check string comparison using
5673 "else if" instead of "if".
5674
750ce8d1
YQ
56752015-09-15 Yao Qi <yao.qi@linaro.org>
5676
5677 * server.c (vCont_supported): New global variable.
5678 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5679 matches. Append ";vContSupported+" to own_buf.
5680 (handle_v_requests): Append ";s;S" to own_buf if target supports
5681 hardware single step or vCont_supported is false.
5682 (capture_main): Set vCont_supported to zero.
5683
70b90b91
YQ
56842015-09-15 Yao Qi <yao.qi@linaro.org>
5685
5686 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5687 it to ...
5688 (linux_supports_hardware_single_step): ... New function.
5689 (linux_target_ops): Update.
5690 * lynx-low.c (lynx_target_ops): Set field
5691 supports_hardware_single_step to target_can_do_hardware_single_step.
5692 * nto-low.c (nto_target_ops): Likewise.
5693 * spu-low.c (spu_target_ops): Likewise.
5694 * win32-low.c (win32_target_ops): Likewise.
5695 * target.c (target_can_do_hardware_single_step): New function.
5696 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5697 Remove. <supports_hardware_single_step>: New field.
5698 (target_supports_conditional_breakpoints): Remove.
5699 (target_supports_hardware_single_step): New macro.
5700 (target_can_do_hardware_single_step): Declare.
5701 * server.c (handle_query): Use target_supports_hardware_single_step
5702 instead of target_supports_conditional_breakpoints.
5703
ade90bde
YQ
57042015-09-15 Yao Qi <yao.qi@linaro.org>
5705
5706 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5707 function.
5708 (struct linux_target_ops the_low_target): Install
5709 aarch64_linux_siginfo_fixup.
5710
94585166
DB
57112015-09-11 Don Breazeal <donb@codesourcery.com>
5712 Luis Machado <lgustavo@codesourcery.com>
5713
5714 * linux-low.c (linux_mourn): Static declaration.
5715 (linux_arch_setup): Move in front of
5716 handle_extended_wait.
5717 (linux_arch_setup_thread): New function.
5718 (handle_extended_wait): Handle exec events. Call
5719 linux_arch_setup_thread. Make event_lwp argument a
5720 pointer-to-a-pointer.
5721 (check_zombie_leaders): Do not check stopped threads.
5722 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5723 (linux_low_filter_event): Add lwp and thread for exec'ing
5724 non-leader thread if leader thread has been deleted.
5725 Refactor code into linux_arch_setup_thread and call it.
5726 Pass child lwp pointer by reference to handle_extended_wait.
5727 (linux_wait_for_event_filtered): Update comment.
5728 (linux_wait_1): Prevent clobbering exec event status.
5729 (linux_supports_exec_events): New function.
5730 (linux_target_ops) <supports_exec_events>: Initialize new member.
5731 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5732 new member.
5733 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5734 * server.c (report_exec_events): New global variable.
5735 (handle_query): Handle qSupported query for exec-events feature.
5736 (captured_main): Initialize report_exec_events.
5737 * server.h (report_exec_events): Declare new global variable.
5738 * target.h (struct target_ops) <supports_exec_events>: New
5739 member.
5740 (target_supports_exec_events): New macro.
5741 * win32-low.c (win32_target_ops) <supports_exec_events>:
5742 Initialize new member.
5743
0568462b
MM
57442015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5745
5746 * linux-low.c (linux_low_enable_btrace): Remove.
5747 (linux_target_ops): Replace linux_low_enable_btrace with
5748 linux_enable_btrace.
5749
39edd165
YQ
57502015-09-03 Yao Qi <yao.qi@linaro.org>
5751
5752 * linux-aarch64-low.c (aarch64_insert_point): Call
5753 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5754 returns true.
5755
1db33b5a
UW
57562015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5757
5758 * linux-low.c (check_stopped_by_breakpoint): Use
5759 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5760
ab290430
PA
57612015-08-27 Pedro Alves <palves@redhat.com>
5762
5763 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5764
8d749320
SM
57652015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5766
6711b7f8
SM
5767 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5768 the XNEW-family equivalent.
8d749320
SM
5769 (compile_bytecodes): Likewise.
5770 * dll.c (loaded_dll): Likewise.
5771 * event-loop.c (append_callback_event): Likewise.
5772 (create_file_handler): Likewise.
5773 (create_file_event): Likewise.
5774 * hostio.c (handle_open): Likewise.
5775 * inferiors.c (add_thread): Likewise.
5776 (add_process): Likewise.
5777 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5778 * linux-arm-low.c (arm_new_process): Likewise.
5779 (arm_new_thread): Likewise.
5780 * linux-low.c (add_to_pid_list): Likewise.
5781 (linux_add_process): Likewise.
5782 (handle_extended_wait): Likewise.
5783 (add_lwp): Likewise.
5784 (enqueue_one_deferred_signal): Likewise.
5785 (enqueue_pending_signal): Likewise.
5786 (linux_resume_one_lwp_throw): Likewise.
5787 (linux_resume_one_thread): Likewise.
5788 (linux_read_memory): Likewise.
5789 (linux_write_memory): Likewise.
5790 * linux-mips-low.c (mips_linux_new_process): Likewise.
5791 (mips_linux_new_thread): Likewise.
5792 (mips_add_watchpoint): Likewise.
5793 * linux-x86-low.c (initialize_low_arch): Likewise.
5794 * lynx-low.c (lynx_add_process): Likewise.
5795 * mem-break.c (set_raw_breakpoint_at): Likewise.
5796 (set_breakpoint): Likewise.
5797 (add_condition_to_breakpoint): Likewise.
5798 (add_commands_to_breakpoint): Likewise.
5799 (clone_agent_expr): Likewise.
5800 (clone_one_breakpoint): Likewise.
5801 * regcache.c (new_register_cache): Likewise.
5802 * remote-utils.c (look_up_one_symbol): Likewise.
5803 * server.c (queue_stop_reply): Likewise.
5804 (start_inferior): Likewise.
5805 (queue_stop_reply_callback): Likewise.
5806 (handle_target_event): Likewise.
5807 * spu-low.c (fetch_ppc_memory): Likewise.
5808 (store_ppc_memory): Likewise.
5809 * target.c (set_target_ops): Likewise.
5810 * thread-db.c (thread_db_load_search): Likewise.
5811 (try_thread_db_load_1): Likewise.
5812 * tracepoint.c (add_tracepoint): Likewise.
5813 (add_tracepoint_action): Likewise.
5814 (create_trace_state_variable): Likewise.
5815 (cmd_qtdpsrc): Likewise.
5816 (cmd_qtro): Likewise.
5817 (add_while_stepping_state): Likewise.
5818 * win32-low.c (child_add_thread): Likewise.
5819 (get_image_name): Likewise.
5820
ed8b7b42
YQ
58212015-08-25 Yao Qi <yao.qi@linaro.org>
5822
5823 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5824
db3cb7cb
YQ
58252015-08-25 Yao Qi <yao.qi@linaro.org>
5826
5827 * Makefile.in (aarch64-linux.o): New rule.
5828 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5829 srv_tgtobj.
5830 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5831 (aarch64_init_debug_reg_state): Make it extern.
5832 (aarch64_linux_prepare_to_resume): Remove.
5833
f6011a1c
YQ
58342015-08-25 Yao Qi <yao.qi@linaro.org>
5835
5836 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5837 lwp_arch_private_info and ptid_of_lwp.
5838
88e2cf7e
YQ
58392015-08-25 Yao Qi <yao.qi@linaro.org>
5840
5841 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5842 Find proc_info by find_process_pid. All callers updated.
5843
5e35436e
YQ
58442015-08-25 Yao Qi <yao.qi@linaro.org>
5845
5846 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5847 Remove.
5848 (debug_reg_change_callback): Remove.
5849 (aarch64_notify_debug_reg_change): Remove.
5850
4a8a7965
YQ
58512015-08-25 Yao Qi <yao.qi@linaro.org>
5852
5853 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5854 Call current_lwp_ptid.
5855
32a271ee
YQ
58562015-08-25 Yao Qi <yao.qi@linaro.org>
5857
5858 * linux-aarch64-low.c (debug_reg_change_callback): Use
5859 debug_printf.
5860
0d51c8d7
YQ
58612015-08-25 Yao Qi <yao.qi@linaro.org>
5862
5863 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5864
31a43dd5
YQ
58652015-08-25 Yao Qi <yao.qi@linaro.org>
5866
5867 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5868
8ee52567
YQ
58692015-08-25 Yao Qi <yao.qi@linaro.org>
5870
5871 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5872 the code.
5873
ff3f0f45
YQ
58742015-08-25 Yao Qi <yao.qi@linaro.org>
5875
5876 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5877 Remove.
5878 (debug_reg_change_callback): Remove argument entry and add argument
5879 lwp. Remove local variable thread. Don't print thread id in the
5880 debugging output. Don't check whether pid of thread equals to pid.
5881 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5882 iterate_over_lwps instead find_inferior.
5883
3d40fbb5
PA
58842015-08-24 Pedro Alves <palves@redhat.com>
5885
5886 * inferiors.c (get_first_process): New function.
5887 * inferiors.h (get_first_process): New declaration.
5888 * remote-utils.c (read_ptid): Default to the first process in the
5889 list, instead of to the current thread's process.
5890
438e1e42
PA
58912015-08-24 Pedro Alves <palves@redhat.com>
5892
5893 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5894 * event-loop.c: Likewise.
5895 * remote-utils.c: Likewise.
5896 * tracepoint.c: Likewise.
5897
a8c6d4fc
PA
58982015-08-24 Pedro Alves <palves@redhat.com>
5899
5900 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5901 ptid_get_lwp.
5902
99b0bb12
PA
59032015-08-21 Pedro Alves <palves@redhat.com>
5904
5905 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5906 instead of literal 1.
5907
f8904751
PA
59082015-08-21 Pedro Alves <palves@redhat.com>
5909
5910 * tdesc.c (default_description): Explicitly zero-initialize.
5911
465a859e
PA
59122015-08-21 Pedro Alves <palves@redhat.com>
5913
5914 PR gdb/18749
5915 * inferiors.c (remove_thread): Discard any pending stop reply for
5916 this thread.
5917 * server.c (remove_all_on_match_pid): Rename to ...
5918 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5919 instead of a pid.
5920 (discard_queued_stop_replies): Change parameter to a ptid. Now
5921 extern.
5922 (handle_v_kill, kill_inferior_callback, captured_main)
5923 (process_serial_event): Adjust.
5924 * server.h (discard_queued_stop_replies): Declare.
5925
f0db101d
PA
59262015-08-21 Pedro Alves <palves@redhat.com>
5927
5928 * linux-low.c (wait_for_sigstop): Always switch to no thread
5929 selected if the previously current thread dies.
5930 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5931 process instead of the current thread's.
5932 * remote-utils.c (input_interrupt): Don't check if there's no
5933 current thread.
5934 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5935 current thread to the general thread fails, error out.
5936 (handle_qxfer_auxv, handle_qxfer_libraries)
5937 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5938 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5939 (handle_query): Check if there's a thread selected instead of
5940 checking whether there's any thread in the thread list.
5941 (handle_qxfer_threads, handle_qxfer_btrace)
5942 (handle_qxfer_btrace_conf): Don't error out early if there's no
5943 thread in the thread list.
5944 (handle_v_cont, myresume): Don't set the current thread to the
5945 continue thread.
5946 (process_serial_event) <Hg handling>: Also set thread_id if the
5947 previous general thread is still alive.
5948 (process_serial_event) <g/G handling>: If setting the current
5949 thread to the general thread fails, error out.
5950 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5951 thread's lwp instead of the current thread's.
5952 * target.c (set_desired_thread): If the desired thread was not
5953 found, leave the current thread pointing to NULL. Return an int
5954 (boolean) indicating success.
5955 * target.h (set_desired_thread): Change return type to int.
5956
40045d91
MF
59572015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5958
5959 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5960 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5961 #includes.
5962 (ps_get_thread_area): New function.
5963
45face3b
GB
59642015-08-19 Gary Benson <gbenson@redhat.com>
5965
5966 * hostio.c (handle_pread): Do not attempt to read more data
5967 than hostio_reply_with_data can fit in a packet.
5968
16d5f642
JB
59692015-08-18 Joel Brobecker <brobecker@adacore.com>
5970
5971 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5972
a738da3a
MF
59732015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5974
5975 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5976
33ebda9d
PA
59772015-08-06 Pedro Alves <palves@redhat.com>
5978
5979 * tracepoint.c (expr_eval_result): Now an int.
5980
a44892be
PA
59812015-08-06 Pedro Alves <palves@redhat.com>
5982
5983 * gdbthread.h (struct regcache): Forward declare.
5984 (struct thread_info) <regcache_data>: Now a struct regcache
5985 pointer.
5986 * inferiors.c (inferior_regcache_data)
5987 (set_inferior_regcache_data): Now work with struct regcache
5988 pointers.
5989 * inferiors.h (struct regcache): Forward declare.
5990 (inferior_regcache_data, set_inferior_regcache_data): Now work
5991 with struct regcache pointers.
5992 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5993 (free_register_cache_thread): Remove struct regcache pointer
5994 casts.
5995
608a1e46
PA
59962015-08-06 Pedro Alves <palves@redhat.com>
5997
5998 * server.c (captured_main): On error, print the exception message
5999 to stderr, and if run_once is set, throw a quit.
6000
f0ce0d3a
PA
60012015-08-06 Pedro Alves <palves@redhat.com>
6002
6003 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6004 the current thread.
6005
bf47e248
PA
60062015-08-06 Pedro Alves <palves@redhat.com>
6007
6008 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6009 reading beyond the passed in buffer length.
6010
b6b9ffcc
PL
60112015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6012
6013 * tracepoint.c (symbol_list) <required>: Remove.
6014
863d01bd
PA
60152015-08-06 Pedro Alves <palves@redhat.com>
6016
6017 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6018 count if stopping and suspending threads.
6019 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6020 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6021 (linux_detach): Complete an ongoing step-over.
6022 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6023 throughout.
6024 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6025 (linux_wait_1): If passing a signal to the inferior after
6026 finishing a step-over, unsuspend and re-resume all lwps. If we
6027 see a single-step event but the thread should be continuing, don't
6028 pass the trap to gdb.
6029 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6030 internal_error instead of gdb_assert.
6031 (enqueue_pending_signal): New function.
6032 (check_ptrace_stopped_lwp_gone): Add debug output.
6033 (start_step_over): Use internal_error instead of gdb_assert.
6034 (complete_ongoing_step_over): New function.
6035 (linux_resume_one_thread): Don't resume a suspended thread.
6036 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6037 it stepping.
6038
00db26fa
PA
60392015-08-06 Pedro Alves <palves@redhat.com>
6040
6041 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6042 (linux_thread_alive): Use lwp_is_marked_dead.
6043 (extended_event_reported): Delete.
6044 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6045 instead of extended_event_reported.
6046 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6047 as well.
6048 (lwp_is_marked_dead): New function.
6049 (lwp_running): Use lwp_is_marked_dead.
6050 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6051 comment.
6052
ad071a30
PA
60532015-08-06 Pedro Alves <palves@redhat.com>
6054
6055 * linux-low.c (linux_wait_1): Move fork event output out of the
6056 !report_to_gdb check. Pass event_child->waitstatus to
6057 target_waitstatus_to_string instead of ourstatus.
6058
524b57e6
YQ
60592015-08-04 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6062 if current_thread is 32 bit.
6063
6085d6f6
YQ
60642015-08-04 Yao Qi <yao.qi@linaro.org>
6065
6066 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6067 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6068 * server.c (extended_protocol): Remove "static".
6069 * server.h (extended_protocol): Declare it.
6070
8a7e4587
YQ
60712015-08-04 Yao Qi <yao.qi@linaro.org>
6072
6073 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6074 both aarch64 and aarch32.
6075 (aarch64_set_pc): Likewise.
6076
3b53ae99
YQ
60772015-08-04 Yao Qi <yao.qi@linaro.org>
6078
6079 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6080 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6081 arm-with-neon.xml to srv_xmlfiles.
6082 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6083 (is_64bit_tdesc): New function.
6084 (aarch64_linux_read_description): New function.
6085 (aarch64_arch_setup): Call aarch64_linux_read_description.
6086 (regs_info): Rename to regs_info_aarch64.
6087 (aarch64_regs_info): Return right regs_info.
6088 (initialize_low_arch): Call initialize_low_arch_aarch32.
6089
bd9e6534
YQ
60902015-08-04 Yao Qi <yao.qi@linaro.org>
6091
6092 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6093 * linux-aarch32-low.c: New file.
6094 * linux-aarch32-low.h: New file.
6095 * linux-arm-low.c (arm_fill_gregset): Move it to
6096 linux-aarch32-low.c.
6097 (arm_store_gregset): Likewise.
6098 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6099 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6100 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6101 (regs_info): Rename to regs_info_arm.
6102 (arm_regs_info): Return regs_info_aarch32 if
6103 have_ptrace_getregset is 1 and target description is
6104 arm_with_neon or arm_with_vfpv3.
6105 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6106 Call initialize_low_arch_aarch32 instead.
6107
ded48a5e
YQ
61082015-08-04 Yao Qi <yao.qi@linaro.org>
6109
6110 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6111 * linux-low.c: ... here.
6112 * linux-low.h (have_ptrace_getregset): Declare it.
6113
96e9210f
PA
61142015-08-04 Pedro Alves <palves@redhat.com>
6115
6116 * thread-db.c (struct thread_db): Use new typedefs.
6117 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6118 CHK calls.
6119 (disable_thread_event_reporting): Cast result of dlsym to
6120 destination function pointer type.
6121 (thread_db_mourn): Use td_ta_delete_ftype.
6122
af60a1ef
SL
61232015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6124
6125 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6126 arch variant.
6127 (CDX_BREAKPOINT): Define for R2.
6128 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6129 (the_low_target): Add comments.
6130
e8b41681
YQ
61312015-07-30 Yao Qi <yao.qi@linaro.org>
6132
6133 * linux-arm-low.c (arm_hwcap): Remove it.
6134 (arm_read_description): New local variable arm_hwcap. Don't
6135 set arm_hwcap to zero.
6136
89abb039
YQ
61372015-07-30 Yao Qi <yao.qi@linaro.org>
6138
6139 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6140 Use regcache->tdesc instead.
6141 (arm_store_wmmxregset): Likewise.
6142 (arm_fill_vfpregset): Likewise.
6143 (arm_store_vfpregset): Likewise.
6144
deca266c
YQ
61452015-07-30 Yao Qi <yao.qi@linaro.org>
6146
6147 * linux-arm-low.c: Include arch/arm.h.
6148 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6149 (arm_store_gregset): Likewise.
6150
aa58a496
SM
61512015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6152
6153 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6154 ptrace's 4th parameter.
6155
50904b25
YQ
61562015-07-27 Yao Qi <yao.qi@linaro.org>
6157
6158 * configure.srv (case aarch64*-*-linux*): Don't set
6159 srv_linux_usrregs.
6160
5826e159
PA
61612015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6162
6163 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6164 sys/ptrace.h.
6165 * linux-arm-low.c: Likewise.
6166 * linux-cris-low.c: Likewise.
6167 * linux-crisv32-low.c: Likewise.
6168 * linux-low.c: Likewise.
6169 * linux-m68k-low.c: Likewise.
6170 * linux-mips-low.c: Likewise.
6171 * linux-nios2-low.c: Likewise.
6172 * linux-s390-low.c: Likewise.
6173 * linux-sparc-low.c: Likewise.
6174 * linux-tic6x-low.c: Likewise.
6175 * linux-tile-low.c: Likewise.
6176 * linux-x86-low.c: Likewise.
6177
54019719
PA
61782015-07-24 Pedro Alves <palves@redhat.com>
6179
6180 * config.in: Regenerate.
6181 * configure: Regenerate.
6182
eb7aa561
PA
61832015-07-24 Pedro Alves <palves@redhat.com>
6184
6185 * acinclude.m4: Include ../ptrace.m4.
6186 * configure.ac: Call GDB_AC_PTRACE.
6187 * config.in, configure: Regenerate.
6188
55d7b841
YQ
61892015-07-24 Yao Qi <yao.qi@linaro.org>
6190
6191 * linux-low.c (linux_create_inferior): Remove setting to
6192 proc->priv->new_inferior.
6193 (linux_attach): Likewise.
6194 (linux_low_filter_event): Likewise.
6195 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6196
c06cbd92
YQ
61972015-07-24 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-low.c (linux_arch_setup): New function.
6200 (linux_low_filter_event): If proc->tdesc is NULL and
6201 proc->attached is true, call the_low_target.arch_setup.
6202 Otherwise, keep status pending, and return.
6203 (linux_resume_one_lwp_throw): Don't call get_pc if
6204 thread->while_stepping isn't NULL. Don't call
6205 get_thread_regcache if proc->tdesc is NULL.
6206 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6207 (linux_target_ops): Install arch_setup.
6208 * server.c (start_inferior): Call the_target->arch_setup.
6209 * target.h (struct target_ops) <arch_setup>: New field.
6210 (target_arch_setup): New marco.
6211 * lynx-low.c (lynx_target_ops): Update.
6212 * nto-low.c (nto_target_ops): Update.
6213 * spu-low.c (spu_target_ops): Update.
6214 * win32-low.c (win32_target_ops): Update.
6215
5ae3ebba
YQ
62162015-07-24 Yao Qi <yao.qi@linaro.org>
6217
6218 * linux-low.c (linux_add_process): Don't set
6219 proc->priv->new_inferior.
6220 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6221 (linux_attach): Likewise.
6222
eb97750b
YQ
62232015-07-24 Yao Qi <yao.qi@linaro.org>
6224
6225 * server.c (start_inferior): Code refactor.
6226
51aee833
YQ
62272015-07-24 Yao Qi <yao.qi@linaro.org>
6228
6229 * server.c (process_serial_event): Set general_thread.
6230
af1b22f3
YQ
62312015-07-21 Yao Qi <yao.qi@linaro.org>
6232
6233 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6234 aarch64_linux_get_debug_reg_capacity.
6235
554717a3
YQ
62362015-07-17 Yao Qi <yao.qi@linaro.org>
6237
6238 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6239 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6240 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6241 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6242 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6243 (AARCH64_HWP_ALIGNMENT): Likewise.
6244 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6245 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6246 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6247 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6248 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6249 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6250 (struct aarch64_debug_reg_state): Likewise.
6251 (struct arch_lwp_info): Likewise.
6252 (aarch64_align_watchpoint): Likewise.
6253 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6254 (aarch64_watchpoint_length): Likewise.
6255 (aarch64_point_encode_ctrl_reg): Likewise
6256 (aarch64_point_is_aligned): Likewise.
6257 (aarch64_align_watchpoint): Likewise.
6258 (aarch64_linux_set_debug_regs):
6259 (aarch64_dr_state_insert_one_point): Likewise.
6260 (aarch64_dr_state_remove_one_point): Likewise.
6261 (aarch64_handle_breakpoint): Likewise.
6262 (aarch64_handle_aligned_watchpoint): Likewise.
6263 (aarch64_handle_unaligned_watchpoint): Likewise.
6264 (aarch64_handle_watchpoint): Likewise.
6265
c67ca4de
YQ
62662015-07-17 Yao Qi <yao.qi@linaro.org>
6267
6268 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6269 and don't aarch64_get_debug_reg_state. All callers update.
6270 (aarch64_handle_aligned_watchpoint): Likewise.
6271 (aarch64_handle_unaligned_watchpoint): Likewise.
6272 (aarch64_handle_watchpoint): Likewise.
6273 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6274 (aarch64_remove_point): Likewise.
6275
25abf979
YQ
62762015-07-17 Yao Qi <yao.qi@linaro.org>
6277
6278 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6279 debug_printf.
6280 (aarch64_handle_unaligned_watchpoint): Likewise.
6281
db1ff28b
JK
62822015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6283
6284 Revert the previous 3 commits:
6285 Move gdb_regex* to common/
6286 Move linux_find_memory_regions_full & co.
6287 gdbserver build-id attribute generator
6288
700ca40f
JK
62892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6290 Jan Kratochvil <jan.kratochvil@redhat.com>
6291
6292 gdbserver build-id attribute generator.
6293 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6294 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6295 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6296 (find_phdr): New.
6297 (get_dynamic): Use find_pdhr to traverse program headers.
6298 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6299 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6300 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6301 (get_hex_build_id): New.
6302 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6303 to reply XML document.
6304
9904185c
JK
63052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6306 Jan Kratochvil <jan.kratochvil@redhat.com>
6307
6308 * target.c: Include target/target-utils.h and fcntl.h.
6309 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6310 (target_fileio_read_stralloc): New functions.
6311
6e5b4429
JK
63122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6313
6314 * Makefile.in (OBS): Add gdb_regex.o.
6315 (gdb_regex.o): New.
6316 * config.in: Rebuilt.
6317 * configure: Rebuilt.
6318
ddc98fbf
JK
63192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6320 Jan Kratochvil <jan.kratochvil@redhat.com>
6321
6322 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6323 * Makefile.in (OBS): Add target-utils.o.
6324 (linux-maps.o, target-utils.o): New.
6325 * configure.srv (srv_linux_obj): Add linux-maps.o.
6326
e57bb7a0
PL
63272015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6328
6329 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6330 function, return 1.
6331 (the_low_target): Install it.
6332
586b02a9
PA
63332015-07-14 Pedro Alves <palves@redhat.com>
6334
6335 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6336 Instead, ignore ECHILD, and throw an error for other errnos.
6337
58c1b36c
PA
63382015-07-10 Pedro Alves <palves@redhat.com>
6339
6340 * event-loop.c (struct callback_event) <data>: Change type to
6341 gdb_client_data instance instead of gdb_client_data pointer.
6342 (append_callback_event): Adjust.
6343
421530db
PL
63442015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6345
6346 * linux-aarch64-low.c: Add comments for each linux_target_ops
6347 method. Remove comments already covered in target_ops and
6348 linux_target_ops definitions.
6349 (the_low_target): Add comments for each unimplemented method.
6350
c2d65f38
YQ
63512015-07-09 Yao Qi <yao.qi@linaro.org>
6352
6353 * linux-aarch64-low.c (aarch64_regmap): Remove.
6354 (aarch64_usrregs_info): Remove.
6355 (regs_info): Set field usrregs to NULL.
6356
b20a6524
MM
63572015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6358
6359 * linux-low.c: Include "rsp-low.h"
6360 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6361 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6362 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6363 (handle_btrace_enable_pt): New.
6364 (handle_btrace_general_set): Support "pt".
6365 (handle_btrace_conf_general_set): Support "pt:size".
6366
96c97461
PL
63672015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6368
6369 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6370 Z_PACKET_SW_BP.
6371
37d66942
PL
63722015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6373
6374 * linux-aarch64-low.c: Remove comment about endianness.
6375 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6376 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6377 memcmp.
6378
dc06243f
GB
63792015-06-24 Gary Benson <gbenson@redhat.com>
6380
6381 * linux-i386-ipa.c (stdint.h): Do not include.
6382 * lynx-i386-low.c (stdint.h): Likewise.
6383 * lynx-ppc-low.c (stdint.h): Likewise.
6384 * mem-break.c (stdint.h): Likewise.
6385 * thread-db.c (stdint.h): Likewise.
6386 * tracepoint.c (stdint.h): Likewise.
6387 * win32-low.c (stdint.h): Likewise.
6388
124e13d9
SM
63892015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6390
6391 * server.c (write_qxfer_response): Update call to
6392 remote_escape_output.
6393
909c2cda
JK
63942015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6395 Jan Kratochvil <jan.kratochvil@redhat.com>
6396
6397 Merge multiple hex conversions.
6398 * gdbreplay.c (tohex): Rename to 'fromhex'.
6399 (logchar): Use fromhex.
6400
24c05f46
JK
64012015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6402
6403 * server.c (handle_qxfer_libraries): Set `version' attribute for
6404 <library-list>.
6405
14d2069a
GB
64062015-06-10 Gary Benson <gbenson@redhat.com>
6407
6408 * target.h (struct target_ops) <multifs_open>: New field.
6409 <multifs_unlink>: Likewise.
6410 <multifs_readlink>: Likewise.
6411 * linux-low.c (nat/linux-namespaces.h): New include.
6412 (linux_target_ops): Initialize the_target->multifs_open,
6413 the_target->multifs_unlink and the_target->multifs_readlink.
6414 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6415 * hostio.c (hostio_fs_pid): New static variable.
6416 (hostio_handle_new_gdb_connection): New function.
6417 (handle_setfs): Likewise.
6418 (handle_open): Use the_target->multifs_open as appropriate.
6419 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6420 (handle_readlink): Use the_target->multifs_readlink as
6421 appropriate.
6422 (handle_vFile): Handle vFile:setfs packets.
6423 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6424 after target_handle_new_gdb_connection.
6425
4b8b5e72
GB
64262015-06-10 Gary Benson <gbenson@redhat.com>
6427
6428 * configure.ac (AC_CHECK_FUNCS): Add setns.
6429 * config.in: Regenerate.
6430 * configure: Likewise.
6431 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6432 (linux-namespaces.o): New rule.
6433 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6434
3ac2e371
GB
64352015-06-09 Gary Benson <gbenson@redhat.com>
6436
6437 * hostio.c (handle_open): Process mode argument with
6438 fileio_to_host_mode.
6439
ca9b78ce
YQ
64402015-06-01 Yao Qi <yao.qi@linaro.org>
6441
6442 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6443 * linux-x86-low.c: Likewise.
6444
bfacd19d
DB
64452015-05-28 Don Breazeal <donb@codesourcery.com>
6446
6447 * linux-low.c (handle_extended_wait): Initialize
6448 thread_info.last_resume_kind for new fork children.
6449
452003ef
PA
64502015-05-15 Pedro Alves <palves@redhat.com>
6451
6452 * target.h (target_handle_new_gdb_connection): Rewrite using if
6453 wrapped in do/while.
6454
1041a03c
JB
64552015-05-14 Joel Brobecker <brobecker@adacore.com>
6456
6457 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6458 * configure, config.in: Regenerate.
6459 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6460 Declare typedef.
6461
c269dbdb
DB
64622015-05-12 Don Breazeal <donb@codesourcery.com>
6463
6464 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6465 PTRACE_EVENT_VFORK_DONE.
6466 (linux_low_ptrace_options, extended_event_reported): Add vfork
6467 events.
6468 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6469 and "vforkdone" for RSP 'T' Stop Reply Packet.
6470 * server.h (report_vfork_events): Declare
6471 global variable.
6472
3a8a0396
DB
64732015-05-12 Don Breazeal <donb@codesourcery.com>
6474
6475 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6476 (the_low_target) <new_fork>: Initialize new member.
6477 * linux-arm-low.c (arm_new_fork): New function.
6478 (the_low_target) <new_fork>: Initialize new member.
6479 * linux-low.c (handle_extended_wait): Call new target function
6480 new_fork.
6481 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6482 * linux-mips-low.c (mips_add_watchpoint): New function
6483 extracted from mips_insert_point.
6484 (the_low_target) <new_fork>: Initialize new member.
6485 (mips_linux_new_fork): New function.
6486 (mips_insert_point): Call mips_add_watchpoint.
6487 * linux-x86-low.c (x86_linux_new_fork): New function.
6488 (the_low_target) <new_fork>: Initialize new member.
6489
de0d863e
DB
64902015-05-12 Don Breazeal <donb@codesourcery.com>
6491
6492 * linux-low.c (handle_extended_wait): Implement return value,
6493 rename argument 'event_child' to 'event_lwp', handle
6494 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6495 (linux_low_ptrace_options): New function.
6496 (linux_low_filter_event): Call linux_low_ptrace_options,
6497 use different argument fo linux_enable_event_reporting,
6498 use return value from handle_extended_wait.
6499 (extended_event_reported): New function.
6500 (linux_wait_1): Call extended_event_reported and set
6501 status to report fork events.
6502 (linux_write_memory): Add pid to debug message.
6503 (reset_lwp_ptrace_options_callback): New function.
6504 (linux_handle_new_gdb_connection): New function.
6505 (linux_target_ops): Initialize new structure member.
6506 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6507 * lynx-low.c: Initialize new structure member.
6508 * remote-utils.c (prepare_resume_reply): Implement stop reason
6509 "fork" for "T" stop message.
6510 * server.c (handle_query): Call handle_new_gdb_connection.
6511 * server.h (report_fork_events): Declare global flag.
6512 * target.h (struct target_ops) <handle_new_gdb_connection>:
6513 New member.
6514 (target_handle_new_gdb_connection): New macro.
6515 * win32-low.c: Initialize new structure member.
6516
ddcbc397
DB
65172015-05-12 Don Breazeal <donb@codesourcery.com>
6518
6519 * mem-break.c (APPEND_TO_LIST): Define macro.
6520 (clone_agent_expr): New function.
6521 (clone_one_breakpoint): New function.
6522 (clone_all_breakpoints): New function.
6523 * mem-break.h: Declare new functions.
6524
89245bc0
DB
65252015-05-12 Don Breazeal <donb@codesourcery.com>
6526
6527 * linux-low.c (linux_supports_fork_events): New function.
6528 (linux_supports_vfork_events): New function.
6529 (linux_target_ops): Initialize new structure members.
6530 (initialize_low): Call linux_check_ptrace_features.
6531 * lynx-low.c (lynx_target_ops): Initialize new structure
6532 members.
6533 * server.c (report_fork_events, report_vfork_events):
6534 New global flags.
6535 (handle_query): Add new features to qSupported packet and
6536 response.
6537 (captured_main): Initialize new global variables.
6538 * target.h (struct target_ops) <supports_fork_events>:
6539 New member.
6540 <supports_vfork_events>: New member.
6541 (target_supports_fork_events): New macro.
6542 (target_supports_vfork_events): New macro.
6543 * win32-low.c (win32_target_ops): Initialize new structure
6544 members.
6545
835205d0
GB
65462015-05-12 Gary Benson <gbenson@redhat.com>
6547
6548 * server.c (handle_qxfer_exec_file): Use current process
6549 if annex is empty.
6550
21e94bd9
SL
65512015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6552
6553 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6554 Remove HAVE_PTRACE_GETREGS conditionals.
6555 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6556 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6557
45614f15
YQ
65582015-05-08 Yao Qi <yao.qi@linaro.org>
6559
6560 * linux-low.c (linux_supports_conditional_breakpoints): New
6561 function.
6562 (linux_target_ops): Install new target method.
6563 * lynx-low.c (lynx_target_ops): Install NULL hook for
6564 supports_conditional_breakpoints.
6565 * nto-low.c (nto_target_ops): Likewise.
6566 * spu-low.c (spu_target_ops): Likewise.
6567 * win32-low.c (win32_target_ops): Likewise.
6568 * server.c (handle_query): Check
6569 target_supports_conditional_breakpoints.
6570 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6571 New field.
6572 (target_supports_conditional_breakpoints): New macro.
6573
80ad801e
PA
65742015-05-06 Pedro Alves <palves@redhat.com>
6575
6576 PR server/18081
6577 * server.c (start_inferior): If the process exits, mourn it.
6578
819843c7
GB
65792015-04-21 Gary Benson <gbenson@redhat.com>
6580
6581 * hostio.c (fileio_open_flags_to_host): Factored out to
6582 fileio_to_host_openflags in common/fileio.c. Single use
6583 updated.
6584
a2d5a9d7
MF
65852015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6586
6587 * linux-xtensa-low.c (xtensa_fill_gregset)
6588 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6589 XCHAL_HAVE_LOOP.
6590
deb44829
MF
65912015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6592
6593 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6594 (regs_info): Replace usrregs pointer with NULL.
6595
e57f1de3
GB
65962015-04-17 Gary Benson <gbenson@redhat.com>
6597
6598 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6599 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6600 * server.c (handle_qxfer_exec_file): New function.
6601 (qxfer_packets): Add exec-file entry.
6602 (handle_query): Report qXfer:exec-file:read as supported packet.
6603
62828379
RN
66042015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6605
6606 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6607
b88bb450
GB
66082015-04-09 Gary Benson <gbenson@redhat.com>
6609
6610 * hostio-errno.c (errno_to_fileio_error): Remove function.
6611 Update caller to use remote_fileio_to_fio_error.
6612
c8f4bfdd
YQ
66132015-04-09 Yao Qi <yao.qi@linaro.org>
6614
6615 * linux-low.c (linux_insert_point): Call
6616 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6617 (linux_remove_point): Call remove_memory_breakpoint if type is
6618 raw_bkpt_type_sw.
6619 * linux-x86-low.c (x86_insert_point): Don't call
6620 insert_memory_breakpoint.
6621 (x86_remove_point): Don't call remove_memory_breakpoint.
6622
41f98f02
PA
66232015-04-01 Pedro Alves <palves@redhat.com>
6624 Cleber Rosa <crosa@redhat.com>
6625
6626 * server.c (gdbserver_usage): Reorganize and extend the usage
6627 message.
6628
2bf6fb9d
PA
66292015-03-24 Pedro Alves <palves@redhat.com>
6630
6631 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6632 output. Also dump TRAP_TRACE.
6633 (linux_low_filter_event): In debug output, distinguish a
6634 resume_stop SIGSTOP from a delayed SIGSTOP.
6635
369f6daa
GB
66362015-03-24 Gary Benson <gbenson@redhat.com>
6637
6638 * linux-x86-low.c (x86_linux_new_thread): Moved to
6639 nat/x86-linux.c.
6640 (x86_linux_prepare_to_resume): Likewise.
6641
8e5d4070
GB
66422015-03-24 Gary Benson <gbenson@redhat.com>
6643
6644 * Makefile.in (x86-linux-dregs.o): New rule.
6645 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6646 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6647 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6648 (x86_linux_dr_get): Likewise.
6649 (x86_linux_dr_set): Likewise.
6650 (update_debug_registers_callback): Likewise.
6651 (x86_linux_dr_set_addr): Likewise.
6652 (x86_linux_dr_get_addr): Likewise.
6653 (x86_linux_dr_set_control): Likewise.
6654 (x86_linux_dr_get_control): Likewise.
6655 (x86_linux_dr_get_status): Likewise.
6656 (x86_linux_update_debug_registers): Likewise.
6657
2b95d440
GB
66582015-03-24 Gary Benson <gbenson@redhat.com>
6659
6660 * linux-x86-low.c (x86_linux_update_debug_registers):
6661 New function, factored out from...
6662 (x86_linux_prepare_to_resume): ...this.
6663
14b0bc68
GB
66642015-03-24 Gary Benson <gbenson@redhat.com>
6665
6666 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6667 (x86_linux_dr_set): Likewise.
6668 (update_debug_registers_callback): Likewise.
6669 (x86_linux_dr_set_addr): Likewise.
6670 (x86_linux_dr_get_addr): Likewise.
6671 (x86_linux_dr_set_control): Likewise.
6672 (x86_linux_dr_get_control): Likewise.
6673 (x86_linux_dr_get_status): Likewise.
6674 (x86_linux_prepare_to_resume): Likewise.
6675
5dfe6ca8
GB
66762015-03-24 Gary Benson <gbenson@redhat.com>
6677
6678 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6679 Use perror_with_name. Pass string through gettext.
6680 (x86_linux_dr_set): Likewise.
6681
d33472ad
GB
66822015-03-24 Gary Benson <gbenson@redhat.com>
6683
6684 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6685 (x86_linux_dr_set_addr): ...this.
6686 (x86_dr_low_get_addr): Rename to...
6687 (x86_linux_dr_get_addr): ...this.
6688 (x86_dr_low_set_control): Rename to...
6689 (x86_linux_dr_set_control): ...this.
6690 (x86_dr_low_get_control): Rename to...
6691 (x86_linux_dr_get_control): ...this.
6692 (x86_dr_low_get_status): Rename to...
6693 (x86_linux_dr_get_status): ...this.
6694 (x86_dr_low): Update with new function names.
6695
4b134ca1
GB
66962015-03-24 Gary Benson <gbenson@redhat.com>
6697
6698 * Makefile.in (x86-linux.o): New rule.
6699 * configure.srv: Add x86-linux.o to relevant targets.
6700 * linux-low.c (lwp_set_arch_private_info): New function.
6701 (lwp_arch_private_info): Likewise.
6702 * linux-x86-low.c: Include nat/x86-linux.h.
6703 (arch_lwp_info): Removed structure.
6704 (update_debug_registers_callback):
6705 Use lwp_set_debug_registers_changed.
6706 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6707 and lwp_set_debug_registers_changed.
6708 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6709
34c703da
GB
67102015-03-24 Gary Benson <gbenson@redhat.com>
6711
6712 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6713 * linux-arm-low.c (arm_new_thread): Likewise.
6714 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6715 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6716 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6717 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6718
cff068da
GB
67192015-03-24 Gary Benson <gbenson@redhat.com>
6720
6721 * linux-low.c (ptid_of_lwp): New function.
6722 (lwp_is_stopped): Likewise.
6723 (lwp_stop_reason): Likewise.
6724 * linux-x86-low.c (update_debug_registers_callback):
6725 Use lwp_is_stopped.
6726 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6727 lwp_stop_reason.
6728
b2f7c7e8
GB
67292015-03-24 Gary Benson <gbenson@redhat.com>
6730
6731 * linux-low.h (linux_stop_lwp): Remove declaration.
6732
6d4ee8c6
GB
67332015-03-24 Gary Benson <gbenson@redhat.com>
6734
6735 * linux-low.h: Include nat/linux-nat.h.
6736 * linux-low.c (iterate_over_lwps_args): New structure.
6737 (iterate_over_lwps_filter): New function.
6738 (iterate_over_lwps): Likewise.
6739 * linux-x86-low.c (update_debug_registers_callback):
6740 Update signature to what iterate_over_lwps expects.
6741 Remove PID check that iterate_over_lwps now performs.
6742 (x86_dr_low_set_addr): Use iterate_over_lwps.
6743 (x86_dr_low_set_control): Likewise.
6744
70a0bb6b
GB
67452015-03-24 Gary Benson <gbenson@redhat.com>
6746
6747 * linux-x86-low.c (x86_debug_reg_state): New function.
6748 (x86_linux_prepare_to_resume): Use the above.
6749
7b669087
GB
67502015-03-24 Gary Benson <gbenson@redhat.com>
6751
6752 * linux-low.c (current_lwp_ptid): New function.
6753 * linux-x86-low.c: Include nat/linux-nat.h.
6754 (x86_dr_low_get_addr): Use current_lwp_ptid.
6755 (x86_dr_low_get_control): Likewise.
6756 (x86_dr_low_get_status): Likewise.
6757
eef49a3d
PA
67582015-03-20 Pedro Alves <palves@redhat.com>
6759
6760 * tracepoint.c (cmd_qtstatus): Make "str" const.
6761
b2333d22
PA
67622015-03-20 Pedro Alves <palves@redhat.com>
6763
6764 * server.c (handle_general_set): Make "req_str" const.
6765
23f238d3
PA
67662015-03-19 Pedro Alves <palves@redhat.com>
6767
6768 * linux-low.c (linux_resume_one_lwp): Rename to ...
6769 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6770 instead call perror_with_name.
6771 (check_ptrace_stopped_lwp_gone): New function.
6772 (linux_resume_one_lwp): Reimplement as wrapper around
6773 linux_resume_one_lwp_throw that swallows errors if the LWP is
6774 gone.
6775
91baf43f
PA
67762015-03-19 Pedro Alves <palves@redhat.com>
6777
6778 * linux-low.c (count_events_callback, select_event_lwp_callback):
6779 No longer check whether the thread has resume_stop as last resume
6780 kind.
6781
8bf3b159
PA
67822015-03-19 Pedro Alves <palves@redhat.com>
6783
6784 * linux-low.c (count_events_callback, select_event_lwp_callback):
6785 Use the lwp's status_pending_p field, not the thread's.
6786
b90fc188
PA
67872015-03-19 Pedro Alves <palves@redhat.com>
6788
6789 * linux-low.c (select_event_lwp_callback): Update comments to
6790 no longer mention SIGTRAP.
6791
464b0089
GB
67922015-03-18 Gary Benson <gbenson@redhat.com>
6793
6794 * server.c (handle_query): Do not report vFile:fstat as supported.
6795
aa9e327f
GB
67962015-03-11 Gary Benson <gbenson@redhat.com>
6797
6798 * hostio.c (sys/types.h): New include.
6799 (sys/stat.h): Likewise.
6800 (common-remote-fileio.h): Likewise.
6801 (handle_fstat): New function.
6802 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6803
791c0056
GB
68042015-03-11 Gary Benson <gbenson@redhat.com>
6805
6806 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6807 struct stat.st_blocks and struct stat.st_blksize.
6808 * configure: Regenerate.
6809 * config.in: Likewise.
6810 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6811 (OBS): Add common-remote-fileio.o.
6812 (common-remote-fileio.o): New rule.
6813
9a9df970
PA
68142015-03-09 Pedro Alves <palves@redhat.com>
6815
6816 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6817 'struct sockaddr' pointer in 'accept' call.
6818
9eb1356e
PA
68192015-03-09 Pedro Alves <palves@redhat.com>
6820
6821 Revert:
6822 2015-03-07 Pedro Alves <palves@redhat.com>
6823 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6824 or <winsock2.h> here. Instead include "gdb_socket.h".
6825 (remote_open): Use union gdb_sockaddr_u.
6826 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6827 or <winsock2.h> here. Instead include "gdb_socket.h".
6828 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6829 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6830 or <sys/un.h>.
6831 (init_named_socket, gdb_agent_helper_thread): Use union
6832 gdb_sockaddr_u.
6833
aac331e4
PA
68342015-03-07 Pedro Alves <palves@redhat.com>
6835
6836 * configure.ac (build_warnings): Move
6837 -Wdeclaration-after-statement to the C-specific set.
6838 * configure: Regenerate.
6839
366c75fc
PA
68402015-03-07 Pedro Alves <palves@redhat.com>
6841
6842 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6843 or <winsock2.h> here. Instead include "gdb_socket.h".
6844 (remote_open): Use union gdb_sockaddr_u.
6845 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6846 or <winsock2.h> here. Instead include "gdb_socket.h".
6847 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6848 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6849 or <sys/un.h>.
6850 (init_named_socket, gdb_agent_helper_thread): Use union
6851 gdb_sockaddr_u.
6852
492d29ea
PA
68532015-03-07 Pedro Alves <palves@redhat.com>
6854
6855 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6856 instead.
6857
60a191ed
YQ
68582015-03-06 Yao Qi <yao.qi@linaro.org>
6859
6860 * linux-aarch64-low.c (aarch64_insert_point): Use
6861 show_debug_regs as a boolean.
6862 (aarch64_remove_point): Likewise.
6863
f5771b1d
PA
68642015-03-05 Pedro Alves <palves@redhat.com>
6865
6866 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6867 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6868 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6869 * nto-low.c (nto_target_ops): Likewise.
6870 * spu-low.c (spu_target_ops): Likewise.
6871 * win32-low.c (win32_target_ops): Likewise.
6872
3e572f71
PA
68732015-03-04 Pedro Alves <palves@redhat.com>
6874
72f4393d 6875 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6876 Decide whether a breakpoint triggered based on the SIGTRAP's
6877 siginfo.si_code.
72f4393d
L
6878 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6879 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6880 (linux_low_filter_event): Check for breakpoints before checking
6881 watchpoints.
6882 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6883 siginfo.si_code.
72f4393d
L
6884 (linux_stopped_by_sw_breakpoint)
6885 (linux_supports_stopped_by_sw_breakpoint)
6886 (linux_stopped_by_hw_breakpoint)
6887 (linux_supports_stopped_by_hw_breakpoint): New functions.
6888 (linux_target_ops): Install new target methods.
3e572f71 6889
1ec68e26
PA
68902015-03-04 Pedro Alves <palves@redhat.com>
6891
6892 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6893 * server.c (swbreak_feature, hwbreak_feature): New globals.
6894 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6895 (captured_main): Clear swbreak_feature and hwbreak_feature.
6896 * server.h (swbreak_feature, hwbreak_feature): Declare.
6897 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6898 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6899 supports_stopped_by_hw_breakpoint>: New fields.
6900 (target_supports_stopped_by_sw_breakpoint)
6901 (target_stopped_by_sw_breakpoint)
6902 (target_supports_stopped_by_hw_breakpoint)
6903 (target_stopped_by_hw_breakpoint): Declare.
6904
15c66dd6
PA
69052015-03-04 Pedro Alves <palves@redhat.com>
6906
6907 enum lwp_stop_reason -> enum target_stop_reason
6908 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6909 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6910 (linux_wait_1, stuck_in_jump_pad_callback)
6911 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6912 (linux_stopped_by_watchpoint):
6913 * linux-low.h (enum lwp_stop_reason): Delete.
6914 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6915 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6916
98fc70d6
YQ
69172015-03-04 Yao Qi <yao.qi@linaro.org>
6918
6919 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6920
dd2ac174
GB
69212015-03-03 Gary Benson <gbenson@redhat.com>
6922
6923 * hostio.c (handle_vFile): Fix prefix lengths.
6924
d68e53f4
MM
69252015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6926
6927 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6928 ptr_bits.
6929
bf2d68ab
AA
69302015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6931
6932 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6933 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6934 (clean): Add "rm -f" for above C files.
6935 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6936 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6937 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6938 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6939 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6940 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6941 (init_registers_s390x_vx_linux64)
6942 (init_registers_s390x_tevx_linux64)
6943 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6944 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6945 declarations.
6946 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6947 (s390_store_vxrs_high): New functions.
6948 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6949 NT_S390_VXRS_HIGH.
6950 (s390_arch_setup): Add logic for selecting one of the new target
6951 descriptions. Activate the new vector regsets if applicable.
6952 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6953 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6954 and init_registers_s390x_tevx_linux64.
6955
c966a859
PA
69562015-03-01 Pedro Alves <palves@redhat.com>
6957
6958 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6959 parameter.
6960
4180215b
PA
69612015-02-27 Pedro Alves <palves@redhat.com>
6962
6963 * linux-x86-low.c (u_debugreg_offset): New function.
6964 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6965
749bab01
PA
69662015-02-27 Pedro Alves <palves@redhat.com>
6967
6968 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6969 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6970 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6971 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6972 (ps_lsetfpregs, ps_getpid)
6973 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6974 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6975 (ps_lsetxregs, ps_plog): Declare.
6976
3c14e5a3
PA
69772015-02-27 Pedro Alves <palves@redhat.com>
6978
6979 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6980 IP_AGENT_EXPORT_FUNC.
6981 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6982 IP_AGENT_EXPORT_FUNC.
6983 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6984 (IP_AGENT_EXPORT): Delete.
6985 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6986 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6987 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6988 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6989 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6990 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6991 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6992 (traceframe_read_count, traceframe_write_count)
6993 (traceframes_created, trace_state_variables, get_raw_reg)
6994 (get_trace_state_variable_value, set_trace_state_variable_value)
6995 (ust_loaded, helper_thread_id, cmd_buf): Use
6996 IPA_SYM_EXPORTED_NAME.
6997 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6998 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6999 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7000 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7001 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7002 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7003 EXTERN_C_PUSH/EXTERN_C_POP.
7004 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7005 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7006 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7007 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7008 (traceframe_write_count, traceframe_read_count)
7009 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7010 (about_to_request_buffer_space, get_trace_state_variable_value)
7011 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7012 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7013 EXTERN_C_PUSH/EXTERN_C_POP.
7014 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7015 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7016 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7017 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7018 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7019 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7020 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7021 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7022 Define.
7023 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7024 (IP_AGENT_EXPORT_VAR_DECL): Define.
7025 (tracing): Declare.
7026 (gdb_agent_get_raw_reg): Declare.
7027
fe978cb0
PA
70282015-02-27 Tom Tromey <tromey@redhat.com>
7029 Pedro Alves <palves@redhat.com>
7030
7031 Rename symbols whose names are reserved C++ keywords throughout.
7032
3bc3d82a
PA
70332015-02-27 Pedro Alves <palves@redhat.com>
7034
7035 * Makefile.in (COMPILER): New, get it from autoconf.
7036 (CXX): Get from autoconf instead.
7037 (COMPILE.pre): Use COMPILER.
7038 (CC-LD): Rename to ...
7039 (CC_LD): ... this. Use COMPILER.
7040 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7041 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7042 * acinclude.m4: Include build-with-cxx.m4.
7043 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7044 Disable -Werror by default if building in C++ mode.
7045 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7046 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7047 the C++ compiler. Save/restore CXXFLAGS too.
7048 * configure: Regenerate.
7049
07697489
PA
70502015-02-27 Pedro Alves <palves@redhat.com>
7051
7052 * acinclude.m4: Include libiberty.m4.
7053 * configure.ac: Call libiberty_INIT.
7054 * config.in, configure: Regenerate.
7055
9beb7c4e
PA
70562015-02-26 Pedro Alves <palves@redhat.com>
7057
7058 * linux-low.c (linux_wait_1): When incrementing the PC past a
7059 program breakpoint always use the_low_target.breakpoint_len as
7060 increment, rather than the maximum between that and
7061 the_low_target.decr_pc_after_break.
7062
8090aef2
PA
70632015-02-23 Pedro Alves <palves@redhat.com>
7064
7065 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7066 thread was doing a step-over; always adjust the PC if
7067 we stepped over a permanent breakpoint.
7068 (linux_wait_1): If we stepped over breakpoint that was on top of a
7069 permanent breakpoint, manually advance the PC past it.
7070
bc9540e8
PA
70712015-02-23 Pedro Alves <palves@redhat.com>
7072
7073 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7074 modes.
7075 (x86_fill_gregset, x86_store_gregset): Use it when handling
7076 $orig_eax.
7077
2db9a427
PA
70782015-02-20 Pedro Alves <palves@redhat.com>
7079
7080 * thread-db.c: Include "nat/linux-procfs.h".
7081 (thread_db_init): Skip listing new threads if the kernel supports
7082 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7083
afa8d396
PA
70842015-02-20 Pedro Alves <palves@redhat.com>
7085
7086 * linux-low.c (status_pending_p_callback): Use ptid_match.
7087
c9587f88
AT
70882015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7089
7090 PR breakpoints/16812
7091 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7092 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7093 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7094
b05ec7a5
AT
70952015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7096
7097 PR breakpoints/15956
7098 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7099
d33501a5
MM
71002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7101
7102 * linux-low.c (linux_low_btrace_conf): Print size.
7103 * server.c (handle_btrace_conf_general_set): New.
7104 (hanle_general_set): Call handle_btrace_conf_general_set.
7105 (handle_query): Report Qbtrace-conf:bts:size as supported.
7106
f4abbc16
MM
71072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7108
7109 * linux-low.c (linux_low_enable_btrace): Update parameters.
7110 (linux_low_btrace_conf): New.
7111 (linux_target_ops)<to_btrace_conf>: Initialize.
7112 * server.c (current_btrace_conf): New.
7113 (handle_btrace_enable): Rename to ...
7114 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7115 to target_enable_btrace. Update comment. Update users.
7116 (handle_qxfer_btrace_conf): New.
7117 (qxfer_packets): Add btrace-conf entry.
7118 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7119 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7120 (target_ops)<read_btrace_conf>: New.
7121 (target_enable_btrace): Update parameters.
7122 (target_read_btrace_conf): New.
7123
043c3577
MM
71242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7125
7126 * server.c (handle_btrace_general_set): Remove call to
7127 target_supports_btrace.
7128 (supported_btrace_packets): New.
7129 (handle_query): Call supported_btrace_packets.
7130 * target.h: include btrace-common.h.
7131 (btrace_target_info): Removed.
7132 (supports_btrace, target_supports_btrace): Update parameters.
7133
734b0e4b
MM
71342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7135
7136 * Makefile.in (SFILES): Add common/btrace-common.c.
7137 (OBS): Add common/btrace-common.o.
7138 (btrace-common.o): Add build rules.
7139 * linux-low: Include btrace-common.h.
7140 (linux_low_read_btrace): Use struct btrace_data. Call
7141 btrace_data_init and btrace_data_fini.
7142
d6c146e9
PA
71432015-02-06 Pedro Alves <palves@redhat.com>
7144
7145 * thread-db.c (find_new_threads_callback): Add debug output.
7146
20ba1ce6
PA
71472015-02-04 Pedro Alves <palves@redhat.com>
7148
7149 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7150 (resume_stopped_resumed_lwps): New function.
7151 (linux_wait_for_event_filtered): Use it.
7152
8cc73a39
SDJ
71532015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7154
7155 * Makefile.in (SFILES): Add linux-personality.c.
7156 (linux-personality.o): New rule.
7157 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7158 list of objects to be built.
7159 * linux-low.c: Include nat/linux-personality.h.
7160 (linux_create_inferior): Remove code to disable address space
7161 randomization (moved to ../nat/linux-personality.c). Create
7162 cleanup to disable address space randomization.
7163
fb23d554
SDJ
71642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7165
7166 * Makefile.in (posix-strerror.o): New rule.
7167 (mingw-strerror.o): Likewise.
7168 * configure: Regenerated.
7169 * configure.ac: Source file ../common/common.host. Initialize new
7170 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7171
cdf43629
YQ
71722015-01-14 Yao Qi <yao@codesourcery.com>
7173
7174 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7175 (ppc-linux.o): New rule.
7176 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7177 * configure.ac: AC_CHECK_FUNCS(getauxval).
7178 * config.in: Re-generated.
7179 * configure: Re-generated.
7180 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7181 ppc64_64bit_inferior_p
7182
514c5338
YQ
71832015-01-14 Yao Qi <yao@codesourcery.com>
7184
7185 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7186 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7187 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7188 (PT_ORIG_R3, PT_TRAP): Likewise.
7189 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7190 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7191 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7192
3368c1e5
JB
71932015-01-10 Joel Brobecker <brobecker@adacore.com>
7194
7195 * i387-fp.c (i387_cache_to_xsave): In look over
7196 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7197 zmmh_low_space field by use of zmmh_high_space.
7198
582511be
PA
71992015-01-09 Pedro Alves <palves@redhat.com>
7200
7201 * linux-low.c (step_over_bkpt): Move higher up in the file.
7202 (handle_extended_wait): Don't store the stop_pc here.
7203 (get_stop_pc): Adjust comments and rename to ...
7204 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7205 stopped for a software breakpoint or hardware breakpoint.
7206 (thread_still_has_status_pending_p): New function.
7207 (status_pending_p_callback): Use
7208 thread_still_has_status_pending_p. If the event is no longer
7209 interesting, resume the LWP.
7210 (handle_tracepoints): Add assert.
7211 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7212 (wstatus_maybe_breakpoint): New function.
7213 (cancel_breakpoint): Delete function.
7214 (check_stopped_by_watchpoint): New function, factored out from
7215 linux_low_filter_event.
7216 (lp_status_maybe_breakpoint): Delete function.
7217 (linux_low_filter_event): Remove filter_ptid argument.
7218 Leave thread group exits pending here. Store the LWP's stop PC.
7219 Always leave events pending.
7220 (linux_wait_for_event_filtered): Pull all events out of the
7221 kernel, and leave them all pending.
7222 (count_events_callback, select_event_lwp_callback): Consider all
7223 events.
7224 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7225 (select_event_lwp): Only give preference to the stepping LWP in
7226 all-stop mode. Adjust comments.
7227 (ignore_event): New function.
7228 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7229 references to cancel_breakpoints. Adjust to renames. Also give
7230 equal priority to all LWPs that have had events in non-stop mode.
7231 If reporting a software breakpoint event, unadjust the LWP's PC.
7232 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7233 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7234 Adjust.
7235 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7236 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7237 (linux_stopped_by_watchpoint): Adjust.
7238 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7239 * linux-low.h (enum lwp_stop_reason): New.
7240 (struct lwp_info) <stop_pc>: Adjust comment.
7241 <stopped_by_watchpoint>: Delete field.
7242 <stop_reason>: New field.
7243 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7244 * mem-break.c (software_breakpoint_inserted_here)
7245 (hardware_breakpoint_inserted_here): New function.
7246 * mem-break.h (software_breakpoint_inserted_here)
7247 (hardware_breakpoint_inserted_here): Declare.
7248 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7249 (cancel_breakpoints): Delete.
7250 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7251 (upload_fast_traceframes): Remove references to
7252 cancel_breakpoints.
7253
a33e3959
PA
72542015-01-09 Pedro Alves <palves@redhat.com>
7255
7256 * thread-db.c (find_new_threads_callback): Ignore thread if the
7257 kernel thread ID is -1.
7258
8784d563
PA
72592015-01-09 Pedro Alves <palves@redhat.com>
7260
7261 * linux-low.c (linux_attach_fail_reason_string): Move to
7262 nat/linux-ptrace.c, and rename.
7263 (linux_attach_lwp): Update comment.
7264 (attach_proc_task_lwp_callback): New function.
7265 (linux_attach): Adjust to rename and use
7266 linux_proc_attach_tgid_threads.
7267 (linux_attach_fail_reason_string): Delete declaration.
7268
76f2b779
JB
72692015-01-01 Joel Brobecker <brobecker@adacore.com>
7270
7271 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7272 * server.c (gdbserver_version): Likewise.
7273
fafcc06a
SDJ
72742014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7275
7276 * remote-utils.c: Include ctype.h.
7277 (input_interrupt): Explicitly handle the case when the char
7278 received is the NUL byte. Improve the printing of non-ASCII
7279 characters.
7280
beed38b8
JB
72812014-12-16 Joel Brobecker <brobecker@adacore.com>
7282
7283 * linux-low.c (linux_low_filter_event): Update call to
7284 linux_enable_event_reporting following the addition of
7285 a new parameter to that function.
7286
bf330350
CU
72872014-12-16 Catalin Udma <catalin.udma@freescale.com>
7288
7289 PR server/17457
7290 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7291 (AARCH64_FPCR_REGNO): Likewise.
7292 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7293 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7294 (aarch64_store_fpregset): Likewise.
7295
5227d625
JB
72962014-12-15 Joel Brobecker <brobecker@adacore.com>
7297
7298 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7299 Remove FIXME comment about assumption about N.
7300
f93b65a0
JB
73012014-12-13 Joel Brobecker <brobecker@adacore.com>
7302
7303 * configure.ac: If large-file support is disabled in GDBserver,
7304 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7305 * configure: Regenerate.
7306
e5a9158d
AA
73072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7308
7309 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7310 warning upon ENODATA from ptrace.
7311 * linux-s390-low.c (s390_store_tdb): New.
7312 (s390_regsets): Add regset for NT_S390_TDB.
7313
feea5f36
AA
73142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7315
7316 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7317 without a fill_function.
7318 * linux-s390-low.c (s390_fill_last_break): Remove.
7319 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7320 (s390_arch_setup): Use regset's size instead of fill_function for
7321 loop end condition.
7322
098dbe61
AA
73232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7324
7325 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7326 the regset's store function when ptrace returned an error.
7327 * regcache.c (get_thread_regcache): Invalidate register cache
7328 before fetching inferior's registers.
7329
28eef672
AA
73302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7331
7332 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7333 while-loop as for-loop.
7334 (regsets_store_inferior_registers): Likewise.
7335
bdca27a2
YQ
73362014-11-28 Yao Qi <yao@codesourcery.com>
7337
7338 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7339 * config.in, configure: Re-generate.
7340 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7341 is defined.
7342
9c232dda
YQ
73432014-11-21 Yao Qi <yao@codesourcery.com>
7344
7345 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7346 (AC_CHECK_HEADERS): Remove malloc.h.
7347 * configure: Re-generated.
7348 * config.in: Re-generated.
7349 * server.h: Don't include alloca.h and malloc.h.
7350 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7351 Don't include malloc.h.
7352
43968415
JB
73532014-11-17 Joel Brobecker <brobecker@adacore.com>
7354
7355 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7356 corresponding ERRNO check in same block.
7357
40e91bc7
PA
73582014-11-12 Pedro Alves <palves@redhat.com>
7359
7360 * server.c (cont_thread): Update comment.
7361 (start_inferior, attach_inferior): No longer clear cont_thread.
7362 (handle_v_cont): No longer set cont_thread.
7363 (captured_main): Clear cont_thread each time a GDB connects.
7364
c2c118cf
PA
73652014-11-12 Pedro Alves <palves@redhat.com>
7366
7367 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7368 thread, and don't resume all threads if the Hc thread has exited.
7369
78708b7c
PA
73702014-11-12 Pedro Alves <palves@redhat.com>
7371
7372 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7373 the process group instead of to a specific LWP.
7374
a2abc7de
PA
73752014-10-15 Pedro Alves <palves@redhat.com>
7376
7377 PR server/17487
7378 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7379 parameter.
7380 (arm_set_thread_context): Delete.
7381 (the_low_target): Adjust.
7382 * win32-i386-low.c (debug_registers_changed)
7383 (debug_registers_used): Delete.
7384 (update_debug_registers_callback): New function.
7385 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7386 needing to update their debug registers.
7387 (win32_get_current_dr): New function.
7388 (x86_dr_low_get_addr, x86_dr_low_get_control)
7389 (x86_dr_low_get_status): Fetch the debug register from the thread
7390 record's context.
7391 (i386_initial_stuff): Adjust.
7392 (i386_get_thread_context): Remove current_event parameter. Don't
7393 clear debug_registers_changed nor copy DR values to
7394 debug_reg_state.
7395 (i386_set_thread_context): Delete.
7396 (i386_prepare_to_resume): New function.
7397 (i386_thread_added): Mark the thread as needing to update irs
7398 debug registers.
7399 (the_low_target): Remove i386_set_thread_context and install
7400 i386_prepare_to_resume.
7401 * win32-low.c (win32_get_thread_context): Adjust.
7402 (win32_set_thread_context): Use SetThreadContext
7403 directly.
7404 (win32_prepare_to_resume): New function.
7405 (win32_require_context): New function, factored out from ...
7406 (thread_rec): ... this.
7407 (continue_one_thread): Call win32_prepare_to_resume on each thread
7408 we're about to continue.
7409 (win32_resume): Call win32_prepare_to_resume on the event thread.
7410 * win32-low.h (struct win32_thread_info)
7411 <debug_registers_changed>: New field.
7412 (struct win32_target_ops): Change prototype of set_thread_context,
7413 delete set_thread_context and add prepare_to_resume.
7414 (win32_require_context): New declaration.
7415
a442d071
GB
74162014-10-08 Gary Benson <gbenson@redhat.com>
7417
7418 * server.h: Do not include common-exceptions.h.
7419
6f1947e8
GB
74202014-10-08 Gary Benson <gbenson@redhat.com>
7421
7422 * server.h: Do not include cleanups.h.
7423
63b434a4
JH
74242014-09-30 James Hogan <james.hogan@imgtec.com>
7425
7426 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7427 mips64-dsp-linux.c.
7428
c4d9ceb6
YQ
74292014-09-23 Yao Qi <yao@codesourcery.com>
7430
7431 * linux-low.c (lp_status_maybe_breakpoint): New function.
7432 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7433 (count_events_callback): Likewise.
7434 (select_event_lwp_callback): Likewise.
7435 (cancel_breakpoints_callback): Likewise.
7436
89a5711c
DB
74372014-09-19 Don Breazeal <donb@codesourcery.com>
7438
7439 * linux-low.c (handle_extended_wait): Call
7440 linux_ptrace_get_extended_event.
7441 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7442 linux_is_extended_waitstatus.
7443
bffc0964
JB
74442014-09-16 Joel Brobecker <brobecker@adacore.com>
7445
7446 * Makefile.in (CPPFLAGS): Define.
7447 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7448 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7449
0bfdf32f
GB
74502014-09-16 Gary Benson <gbenson@redhat.com>
7451
7452 * inferiors.h (current_inferior): Renamed as...
7453 (current_thread): New variable. All uses updated.
7454 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7455 (maybe_move_out_of_jump_pad): Likewise.
7456 (cancel_breakpoint): Likewise.
7457 (linux_low_filter_event): Likewise.
7458 (wait_for_sigstop): Likewise.
7459 (linux_resume_one_lwp): Likewise.
7460 (need_step_over_p): Likewise.
7461 (start_step_over): Likewise.
7462 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7463 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7464 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7465 and save_inferior as saved_thread.
7466 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7467 saved_thread.
7468 (regcache_invalidate_thread): Likewise.
7469 * remote-utils.c (prepare_resume_reply): Likewise.
7470 * thread-db.c (thread_db_get_tls_address): Likewise.
7471 (disable_thread_event_reporting): Likewise.
7472 (remove_thread_event_breakpoints): Likewise.
7473 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7474 as saved_thread.
7475 * target.h (set_desired_inferior): Renamed as...
7476 (set_desired_thread): New declaration. All uses updated.
7477 * server.c (myresume): Updated comment to reference thread instead
7478 of inferior.
7479 (handle_serial_event): Likewise.
7480 (handle_target_event): Likewise.
7481
361c8ade
GB
74822014-09-12 Tom Tromey <tromey@redhat.com>
7483 Gary Benson <gbenson@redhat.com>
7484
7485 * regcache.h: Include common-regcache.h.
7486 (regcache_read_pc): Don't declare.
7487 * regcache.c (get_thread_regcache_for_ptid): New function.
7488
bd9269f7
GB
74892014-09-11 Tom Tromey <tromey@redhat.com>
7490 Gary Benson <gbenson@redhat.com>
7491
7492 * symbol.c: New file.
7493 * Makefile.in (SFILES): Add symbol.c.
7494 (OBS): Add symbol.o.
7495
f8c1d06b
GB
74962014-09-11 Gary Benson <gbenson@redhat.com>
7497
7498 * target.c (target_stop_ptid, target_continue_ptid): New
7499 functions.
7500
721ec300
GB
75012014-09-11 Tom Tromey <tromey@redhat.com>
7502 Gary Benson <gbenson@redhat.com>
7503
7504 * target.h: Include target/target.h.
7505 * target.c (target_read_memory, target_read_uint32)
7506 (target_write_memory): New functions.
7507
c5e92cca
GB
75082014-09-11 Gary Benson <gbenson@redhat.com>
7509
7510 * server.h (debug_hw_points): Don't declare.
7511 * server.c (debug_hw_points): Don't define. Replace all uses
7512 with show_debug_regs.
7513 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7514 all uses with show_debug_regs.
7515
2e4bb98a
EBM
75162014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7517
7518 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7519 endianness into account.
7520 (ppc_supply_ptrace_register): Likewise.
7521
ac740bc7
JH
75222014-09-03 James Hogan <james.hogan@imgtec.com>
7523
7524 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7525 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7526
97ea6506
GB
75272014-09-03 Gary Benson <gbenson@redhat.com>
7528
7529 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7530 ALL_DEBUG_ADDRESS_REGISTERS.
7531
df7e5265
GB
75322014-09-02 Gary Benson <gbenson@redhat.com>
7533
7534 * i386-low.h: Renamed as...
7535 * x86-low.h: New file. All type, function and variable name
7536 prefixes changed from "i386_" to "x86_". All references updated.
7537 * i386-low.c: Renamed as...
7538 * x86-low.c: New file. All type, function and variable name
7539 prefixes changed from "i386_" to "x86_". All references updated.
7540
ed859da7
GB
75412014-09-02 Gary Benson <gbenson@redhat.com>
7542
7543 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7544 (x86_linux_new_thread): Likewise.
7545
860789c7
GB
75462014-08-29 Gary Benson <gbenson@redhat.com>
7547
7548 * server.h (setjmp.h): Do not include.
7549 (toplevel): Do not declare.
7550 (common-exceptions.h): Include.
7551 (cleanups.h): Likewise.
7552 * server.c (toplevel): Do not define.
7553 (exit_code): New static global.
7554 (detach_or_kill_for_exit_cleanup): New function.
7555 (main): New function. Original main renamed to...
7556 (captured_main): New function.
7557 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7558
ff55e1b5
GB
75592014-08-29 Gary Benson <gbenson@redhat.com>
7560
7561 * Makefile.in (SFILES): Add common/common-exceptions.c.
7562 (OBS): Add common-exceptions.o.
7563 (common-exceptions.o): New rule.
7564 * utils.c (prepare_to_throw_exception): New function.
7565
e9bcb658
GB
75662014-08-29 Gary Benson <gbenson@redhat.com>
7567
7568 * config.in: Regenerate.
7569 * configure: Likewise.
7570
e3180625
GB
75712014-08-29 Gary Benson <gbenson@redhat.com>
7572
7573 * Makefile.in (SFILES): Add common/cleanups.c.
7574 (OBS): cleanups.o.
7575 (cleanups.o): New rule.
7576
e3d6ba5d
GB
75772014-08-29 Gary Benson <gbenson@redhat.com>
7578
7579 * utils.c (internal_vwarning): New function.
7580
7096e886
GB
75812014-08-28 Gary Benson <gbenson@redhat.com>
7582
7583 * utils.h (fatal): Remove declaration.
7584 * utils.c (fatal): Remove function.
7585
14ce3192
GB
75862014-08-28 Gary Benson <gbenson@redhat.com>
7587
7588 * tracepoint.c (gdb_agent_init): Replace fatal with
7589 perror_with_name.
7590 (initialize_tracepoint): Likewise.
7591
50278d59
GB
75922014-08-28 Gary Benson <gbenson@redhat.com>
7593
7594 * remote-utils.c (remote_prepare): Replace fatal with error.
7595
aa96c426
GB
75962014-08-28 Gary Benson <gbenson@redhat.com>
7597
7598 * linux-low.c (linux_async): Replace fatal with warning.
7599 Tidy up and return.
7600 (linux_start_non_stop): Return -1 if linux_async failed.
7601
f7160e97
GB
76022014-08-28 Gary Benson <gbenson@redhat.com>
7603
7604 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7605 gdb_assert.
7606 (i386_dr_low_get_addr): Remove vague comment.
7607 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7608 gdb_assert.
7609
38e08fca
GB
76102014-08-28 Gary Benson <gbenson@redhat.com>
7611
7612 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7613 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7614 internal_error.
7615 (linux_resume_one_lwp): Likewise.
7616 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7617 gdb_assert.
7618 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7619 with internal_error.
7620 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7621 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7622 (find_register_by_name): Replace fatal with internal_error.
7623 (find_regno): Likewise.
7624 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7625 * thread-db.c (thread_db_create_event): Likewise.
7626 (thread_db_load_search): Likewise.
7627 (try_thread_db_load_1): Likewise.
7628 * tracepoint.c (get_jump_space_head): Replace fatal with
7629 internal_error.
7630 (claim_trampoline_space): Likewise.
7631 (have_fast_tracepoint_trampoline_buffer): Likewise.
7632 (cmd_qtstart): Likewise.
7633 (stop_tracing): Likewise.
7634 (fast_tracepoint_collecting): Likewise.
7635 (target_malloc): Likewise.
7636 (download_tracepoint): Likewise.
7637 (download_trace_state_variables): Replace check with gdb_assert.
7638 (upload_fast_traceframes): Replace fatal with internal_error.
7639
34abf635
GB
76402014-08-19 Tom Tromey <tromey@redhat.com>
7641 Gary Benson <gbenson@redhat.com>
7642
7643 * Makefile.in (SFILES): Add common/common-debug.c.
7644 (OBS): Add common-debug.o.
7645 (common-debug.o): New rule.
7646 * debug.h (debug_printf): Don't declare.
7647 * debug.c (debug_printf): Renamed and rewritten as...
7648 (debug_vprintf): New function.
7649
f6e94d78
GB
76502014-08-19 Gary Benson <gbenson@redhat.com>
7651
7652 * utils.h: Do not include print-utils.h.
7653
9239eeab
GB
76542014-08-19 Tom Tromey <tromey@redhat.com>
7655 Gary Benson <gbenson@redhat.com>
7656
7657 * server.h: Add static assertion.
7658 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7659
ef87c8bb
GB
76602014-08-19 Tom Tromey <tromey@redhat.com>
7661 Gary Benson <gbenson@redhat.com>
7662
7663 * Makefile.in (SFILES): Add common/errors.c.
7664 (OBS): Add errors.o.
7665 (IPA_OBS): Add errors-ipa.o.
7666 (errors.o): New rule.
7667 (errors-ipa.o): Likewise.
7668 * utils.h (perror_with_name, error, warning): Don't declare.
7669 * utils.c (warning): Renamed and rewritten as...
7670 (vwarning): New function.
7671 (error): Renamed and rewritten as...
7672 (verror): New function.
7673 (internal_error): Renamed and rewritten as...
7674 (internal_verror): New function.
7675
bb974a24
GB
76762014-08-07 Gary Benson <gbenson@redhat.com>
7677
7678 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7679 * configure: Regenerate.
7680 * config.in: Likewise.
7681 * server.h: Do not include errno.h.
7682 * event-loop.c: Likewise.
7683 * hostio-errno.c: Likewise.
7684 * linux-low.c: Likewise.
7685 * remote-utils.c: Likewise.
7686 * spu-low.c: Likewise.
7687 * utils.c: Likewise.
7688 * gdbreplay.c: Unconditionally include errno.h.
7689
6d3d12eb
GB
76902014-08-07 Gary Benson <gbenson@redhat.com>
7691
7692 * server.h: Do not include string.h.
7693 * event-loop.c: Likewise.
7694 * linux-low.c: Likewise.
7695 * regcache.c: Likewise.
7696 * remote-utils.c: Likewise.
7697 * spu-low.c: Likewise.
7698 * utils.c: Likewise.
7699
dccbb609
GB
77002014-08-07 Gary Benson <gbenson@redhat.com>
7701
7702 * server.h: Do not include gdb_assert.h.
7703
e76df0d0
GB
77042014-08-07 Gary Benson <gbenson@redhat.com>
7705
7706 * server.h: Do not include common-utils.h.
7707
4cb9c816
GB
77082014-08-07 Gary Benson <gbenson@redhat.com>
7709
7710 * server.h: Do not include ptid.h.
7711 * notif.h: Likewise.
7712
3995eeee
GB
77132014-08-07 Gary Benson <gbenson@redhat.com>
7714
7715 * server.h: Do not include gdb_locale.h.
7716
cb9f1a9b
GB
77172014-08-07 Gary Benson <gbenson@redhat.com>
7718
7719 * server.h: Do not include gdb/signals.h.
7720 * win32-low.c: Likewise.
7721
a5fceff8
GB
77222014-08-07 Gary Benson <gbenson@redhat.com>
7723
7724 * server.h: Do not include pathmax.h.
7725
b9391142
GB
77262014-08-07 Gary Benson <gbenson@redhat.com>
7727
7728 * server.h: Do not include libiberty.h.
7729 * linux-bfin-low.c: Likewise.
7730
0e443c87
GB
77312014-08-07 Gary Benson <gbenson@redhat.com>
7732
7733 * server.h: Do not include ansidecl.h.
7734
8ebb3f56
GB
77352014-08-07 Gary Benson <gbenson@redhat.com>
7736
7737 * linux-x86-low.c: Do not include stddef.h.
7738 * lynx-ppc-low.c: Likewise.
7739 * tracepoint.c: Likewise.
7740
8980bdf6
GB
77412014-08-07 Gary Benson <gbenson@redhat.com>
7742
7743 * server.h: Do not include stdarg.h.
7744 * nto-low.c: Likewise.
7745
d7096f71
GB
77462014-08-07 Gary Benson <gbenson@redhat.com>
7747
7748 * server.h: Do not include stdlib.h.
7749 * inferiors.c: Likewise.
7750 * linux-low.c: Likewise.
7751 * regcache.c: Likewise.
7752 * spu-low.c: Likewise.
7753 * tracepoint.c: Likewise.
7754 * utils.c: Likewise.
7755
d02f550d
GB
77562014-08-07 Gary Benson <gbenson@redhat.com>
7757
7758 * server.h: Do not include stdio.h.
7759 * linux-low.c: Likewise.
7760 * remote-utils.c: Likewise.
7761 * spu-low.c: Likewise.
7762 * utils.c: Likewise.
7763 * wincecompat.c: Likewise.
7764
87f6c4e3
GB
77652014-08-06 Gary Benson <gbenson@redhat.com>
7766
7767 * regcache.c (init_register_cache): Move conditionals inside if.
7768
7089dca4
GB
77692014-08-06 Gary Benson <gbenson@redhat.com>
7770
7771 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7772
462f517e
GB
77732014-07-31 Gary Benson <gbenson@redhat.com>
7774
7775 * ax.h: Do not include server.h.
7776 * gdbthread.h: Likewise.
7777 * lynx-low.h: Likewise.
7778 * notif.h: Likewise.
7779
976411d6
GB
77802014-07-30 Gary Benson <gbenson@redhat.com>
7781
7782 * server.h: Include common-defs.h.
7783 Do not include config.h or build-gnulib-gdbserver/config.h.
7784
d41f6d8e
GB
77852014-07-30 Gary Benson <gbenson@redhat.com>
7786
7787 * hostio-errno.c: Move server.h to top of includes list.
7788 * inferiors.c: Likewise.
7789 * linux-x86-low.c: Likewise.
7790 * notif.c: Include server.h.
7791
314c6a35
TT
77922014-07-24 Tom Tromey <tromey@redhat.com>
7793 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h (CORE_ADDR): Now unsigned.
7796
69ff6be5
PA
77972014-07-16 Pedro Alves <palves@redhat.com>
7798
7799 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7800
ce9e3fe7
PA
78012014-07-15 Pedro Alves <palves@redhat.com>
7802
7803 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7804 copy.
7805
e76126e8
PA
78062014-07-11 Pedro Alves <palves@redhat.com>
7807
7808 * linux-low.c (kill_wait_lwp): New function, based on
7809 kill_one_lwp_callback, but use my_waitpid directly.
7810 (kill_one_lwp_callback, linux_kill): Use it.
7811
8e9db26e
PA
78122014-06-23 Pedro Alves <palves@redhat.com>
7813
7814 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7815 before setting DR0..DR3.
7816
698b3e08
GB
78172014-06-20 Gary Benson <gbenson@redhat.com>
7818
7819 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7820 * configure: Regenerated.
7821 * config.in: Likewise.
7822
125f8a3d
GB
78232014-06-20 Gary Benson <gbenson@redhat.com>
7824
7825 * Makefile.in (SFILES): Update locations for files moved
7826 from common to nat.
7827 (object file files): Reordered.
7828
42995dbd
GB
78292014-06-20 Gary Benson <gbenson@redhat.com>
7830
7831 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7832 (i386_dr_low_set_addr): Likewise.
7833 (i386_dr_low_get_addr): Likewise.
7834 (i386_dr_low_can_set_control): Likewise.
7835 (i386_dr_low_set_control): Likewise.
7836 (i386_dr_low_get_control): Likewise.
7837 (i386_dr_low_get_status): Likewise.
7838 (i386_get_debug_register_length): Likewise.
7839 * linux-x86-low.c (i386_dr_low_set_addr):
7840 Changed signature. Made static.
7841 (i386_dr_low_get_addr): Likewise.
7842 (i386_dr_low_set_control): Likewise.
7843 (i386_dr_low_get_control): Likewise.
7844 (i386_dr_low_get_status): Likewise.
7845 (i386_dr_low): New global variable.
7846 * win32-i386-low.c (i386_dr_low_set_addr):
7847 Changed signature. Made static.
7848 (i386_dr_low_get_addr): Likewise.
7849 (i386_dr_low_set_control): Likewise.
7850 (i386_dr_low_get_control): Likewise.
7851 (i386_dr_low_get_status): Likewise.
7852 (i386_dr_low): New global variable.
7853
e1d2394b
MS
78542014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7855
7856 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7857 * Makefile.in (AR, AR_FLAGS): Define.
7858 * configure: Regenerate.
7859
3a8ee006
GB
78602014-06-19 Gary Benson <gbenson@redhat.com>
7861
7862 * Makefile.in (i386-dregs.o): New rule.
7863 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7864 * i386-low.c (target.h): Remove include.
7865 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7866 (DR_CONTROL_SHIFT): Likewise.
7867 (DR_CONTROL_SIZE): Likewise.
7868 (DR_RW_EXECUTE): Likewise.
7869 (DR_RW_WRITE): Likewise.
7870 (DR_RW_READ): Likewise.
7871 (DR_RW_IORW): Likewise.
7872 (DR_LEN_1): Likewise.
7873 (DR_LEN_2): Likewise.
7874 (DR_LEN_4): Likewise.
7875 (DR_LEN_8): Likewise.
7876 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7877 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7878 (DR_ENABLE_SIZE): Likewise.
7879 (DR_LOCAL_SLOWDOWN): Likewise.
7880 (DR_GLOBAL_SLOWDOWN): Likewise.
7881 (DR_CONTROL_RESERVED): Likewise.
7882 (I386_DR_CONTROL_MASK): Likewise.
7883 (I386_DR_VACANT): Likewise.
7884 (I386_DR_LOCAL_ENABLE): Likewise.
7885 (I386_DR_GLOBAL_ENABLE): Likewise.
7886 (I386_DR_DISABLE): Likewise.
7887 (I386_DR_SET_RW_LEN): Likewise.
7888 (I386_DR_GET_RW_LEN): Likewise.
7889 (I386_DR_WATCH_HIT): Likewise.
7890 (i386_wp_op_t): Likewise.
7891 (i386_show_dr): Likewise.
7892 (i386_length_and_rw_bits): Likewise.
7893 (i386_insert_aligned_watchpoint): Likewise.
7894 (i386_remove_aligned_watchpoint): Likewise.
7895 (i386_handle_nonaligned_watchpoint): Likewise.
7896 i386_update_inferior_debug_regs(): Likewise.
7897 (i386_dr_insert_watchpoint): Likewise.
7898 (i386_dr_remove_watchpoint): Likewise.
7899 (i386_dr_region_ok_for_watchpoint): Likewise.
7900 (i386_dr_stopped_data_address): Likewise.
7901 (i386_dr_stopped_by_watchpoint): Likewise.
7902
8f26655c
GB
79032014-06-19 Gary Benson <gbenson@redhat.com>
7904
7905 * i386-low.c (i386_dr_show): Renamed to
7906 i386_show_dr and made static. All uses updated.
7907 (i386_dr_length_and_rw_bits): Renamed to
7908 i386_length_and_rw_bits and made static.
7909 All uses updated.
7910 (i386_dr_insert_aligned_watchpoint): Renamed to
7911 i386_insert_aligned_watchpoint and made static.
7912 All uses updated.
7913 (i386_dr_remove_aligned_watchpoint): Renamed to
7914 i386_remove_aligned_watchpoint and made static.
7915 All uses updated.
7916 (i386_dr_update_inferior_debug_regs): Renamed to
7917 i386_update_inferior_debug_regs and made static.
7918 All uses updated.
7919
b9228891
GB
79202014-06-18 Gary Benson <gbenson@redhat.com>
7921
5171def3
GB
7922 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7923 (i386_dr_low_can_set_control): Likewise.
7924 (i386_get_debug_register_length): Likewise.
7925 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7926 (i386_dr_low_can_set_control): Likewise.
7927 (i386_get_debug_register_length): Likewise.
7928
79292014-06-17 Gary Benson <gbenson@redhat.com>
7930
b9228891
GB
7931 * i386-low.h (i386-dregs.h): New include.
7932 (DR_FIRSTADDR): Now in i386-dregs.h.
7933 (DR_LASTADDR): Likewise.
7934 (DR_NADDR): Likewise.
7935 (DR_STATUS): Likewise.
7936 (DR_CONTROL): Likewise.
7937 (i386_debug_reg_state): Likewise.
7938 (i386_dr_insert_watchpoint): Likewise.
7939 (i386_dr_remove_watchpoint): Likewise.
7940 (i386_dr_region_ok_for_watchpoint): Likewise.
7941 (i386_dr_stopped_data_address): Likewise.
7942 (i386_dr_stopped_by_watchpoint): Likewise.
7943 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7944
4be83cc2
GB
79452014-06-18 Gary Benson <gbenson@redhat.com>
7946
7947 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7948 i386_dr_insert_watchpoint.
7949 (i386_low_remove_watchpoint): Renamed to
7950 i386_dr_remove_watchpoint.
7951 (i386_low_region_ok_for_watchpoint): Renamed to
7952 i386_dr_region_ok_for_watchpoint.
7953 (i386_low_stopped_data_address): Renamed to
7954 i386_dr_stopped_data_address.
7955 (i386_low_stopped_by_watchpoint): Renamed to
7956 i386_dr_stopped_by_watchpoint.
7957 * i386-low.c (i386_show_dr): Renamed to
7958 i386_dr_show and made nonstatic. All uses updated.
7959 (i386_length_and_rw_bits): Renamed to
7960 i386_dr_length_and_rw_bits and made nonstatic.
7961 All uses updated.
7962 (i386_insert_aligned_watchpoint): Renamed to
7963 i386_dr_insert_aligned_watchpoint and made nonstatic.
7964 All uses updated.
7965 (i386_remove_aligned_watchpoint): Renamed to
7966 i386_dr_remove_aligned_watchpoint and made nonstatic.
7967 All uses updated.
7968 (i386_update_inferior_debug_regs): Renamed to
7969 i386_dr_update_inferior_debug_regs and made nonstatic.
7970 All uses updated.
7971 (i386_low_insert_watchpoint): Renamed to
7972 i386_dr_insert_watchpoint. All uses updated.
7973 (i386_low_remove_watchpoint): Renamed to
7974 i386_dr_remove_watchpoint. All uses updated.
7975 (i386_low_region_ok_for_watchpoint): Renamed to
7976 i386_dr_region_ok_for_watchpoint. All uses updated.
7977 (i386_low_stopped_data_address): Renamed to
7978 i386_dr_stopped_data_address. All uses updated.
7979 (i386_low_stopped_by_watchpoint): Renamed to
7980 i386_dr_stopped_by_watchpoint. All uses updated.
7981
131aa0d4
GB
79822014-06-18 Gary Benson <gbenson@redhat.com>
7983
7984 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7985 (i386_dr_low_can_set_control): Likewise.
7986 (i386_insert_aligned_watchpoint): New check.
7987
d9305f7f
GB
79882014-06-18 Gary Benson <gbenson@redhat.com>
7989
7990 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7991 Renamed to state.
7992
e927c9fc
GB
79932014-06-18 Gary Benson <gbenson@redhat.com>
7994
7995 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7996 instead of fatal and error.
7997 (i386_handle_nonaligned_watchpoint): Likewise.
7998
1b6d4134
GB
79992014-06-18 Gary Benson <gbenson@redhat.com>
8000
8001 * i386-low.c (i386_get_debug_register_length): New macro.
8002 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8003 (i386_show_dr): Use debug_printf instead of fprintf. Use
8004 phex to format values.
8005
6e62758f
GB
80062014-06-18 Gary Benson <gbenson@redhat.com>
8007
8008 * i386-low.h: Comment changes.
8009 * i386-low.c: Likewise.
8010
fc6e2f03
GB
80112014-06-18 Gary Benson <gbenson@redhat.com>
8012
8013 * i386-low.c: Whitespace changes.
8014
f9d1eeed
TT
80152014-06-12 Tom Tromey <tromey@redhat.com>
8016
8017 * utils.c (freeargv): Remove.
8018
0b04e523
TT
80192014-06-12 Tom Tromey <tromey@redhat.com>
8020
8021 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8022 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8023 (parse_debug_format_options): Likewise.
8024 (gdbserver_usage): Likewise.
8025 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8026 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8027 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8028 against libiberty.
8029 ($(LIBGNU)): Depend on libiberty.
8030 (all-lib): Recurse into all subdirs.
8031 (install-only): Invoke "install" target in subdirs.
8032 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8033 targets.
8034 * configure: Rebuild.
8035 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8036 for vasprintf, vsnprintf, or gettimeofday.
8037 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8038 srv_tgtobj.
8039
270c9937
JB
80402014-06-05 Joel Brobecker <brobecker@adacore.com>
8041
8042 * development.sh: Delete.
8043 * Makefile.in (config.status): Adjust dependency on development.sh.
8044 * configure.ac: Adjust development.sh source call.
8045 * configure: Regenerate.
8046
0a261ed8
PA
80472014-06-02 Pedro Alves <palves@redhat.com>
8048
8049 * ax.c (gdb_free_agent_expr): New function.
8050 * ax.h (gdb_free_agent_expr): New declaration.
8051 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8052 list.
8053 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8054 static.
8055 (clear_breakpoint_conditions_and_commands): New function.
8056 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8057 (clear_breakpoint_conditions_and_commands): New declaration.
8058
e9dae05e
RR
80592014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8060
8061 * linux-aarch64-low.c (asm/ptrace.h): Include.
8062
5876f503
JK
80632014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8064
8065 Fix TLS access for -static -pthread.
8066 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8067 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8068 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8069
802e8e6d
PA
80702014-05-20 Pedro Alves <palves@redhat.com>
8071
8072 * linux-aarch64-low.c (aarch64_insert_point)
8073 (aarch64_remove_point): No longer check whether the type is
8074 supported here. Adjust to new interface.
8075 (the_low_target): Install aarch64_supports_z_point_type as
8076 supports_z_point_type method.
8077 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8078 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8079 instead of a Z packet char. Adjust.
8080 (arm_supports_z_point_type): New function.
8081 (arm_insert_point, arm_remove_point): Adjust to new interface.
8082 (the_low_target): Install arm_supports_z_point_type.
8083 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8084 (cris_insert_point, cris_remove_point): Adjust to new interface.
8085 Don't check whether the type is supported here.
8086 (the_low_target): Install cris_supports_z_point_type.
8087 * linux-low.c (linux_supports_z_point_type): New function.
8088 (linux_insert_point, linux_remove_point): Adjust to new interface.
8089 * linux-low.h (struct linux_target_ops) <insert_point,
8090 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8091 raw_breakpoint pointer parameter.
8092 <supports_z_point_type>: New method.
8093 * linux-mips-low.c (mips_supports_z_point_type): New function.
8094 (mips_insert_point, mips_remove_point): Adjust to new interface.
8095 Use mips_supports_z_point_type.
8096 (the_low_target): Install mips_supports_z_point_type.
8097 * linux-ppc-low.c (the_low_target): Install NULL as
8098 supports_z_point_type method.
8099 * linux-s390-low.c (the_low_target): Install NULL as
8100 supports_z_point_type method.
8101 * linux-sparc-low.c (the_low_target): Install NULL as
8102 supports_z_point_type method.
8103 * linux-x86-low.c (x86_supports_z_point_type): New function.
8104 (x86_insert_point): Adjust to new insert_point interface. Use
8105 insert_memory_breakpoint. Adjust to new
8106 i386_low_insert_watchpoint interface.
8107 (x86_remove_point): Adjust to remove_point interface. Use
8108 remove_memory_breakpoint. Adjust to new
8109 i386_low_remove_watchpoint interface.
8110 (the_low_target): Install x86_supports_z_point_type.
8111 * lynx-low.c (lynx_target_ops): Install NULL as
8112 supports_z_point_type callback.
8113 * nto-low.c (nto_supports_z_point_type): New.
8114 (nto_insert_point, nto_remove_point): Adjust to new interface.
8115 (nto_target_ops): Install nto_supports_z_point_type.
8116 * mem-break.c: Adjust intro comment.
8117 (struct raw_breakpoint) <raw_type, size>: New fields.
8118 <inserted>: Update comment.
8119 <shlib_disabled>: Delete field.
8120 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8121 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8122 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8123 (raw_bkpt_type_to_target_hw_bp_type): New function.
8124 (find_enabled_raw_code_breakpoint_at): New function.
8125 (find_raw_breakpoint_at): New type and size parameters. Use them.
8126 (insert_memory_breakpoint): New function, based off
8127 set_raw_breakpoint_at.
8128 (remove_memory_breakpoint): New function.
8129 (set_raw_breakpoint_at): Reimplement.
8130 (set_breakpoint): New, based on set_breakpoint_at.
8131 (set_breakpoint_at): Reimplement.
8132 (delete_raw_breakpoint): Go through the_target->remove_point
8133 instead of assuming memory breakpoints.
8134 (find_gdb_breakpoint_at): Delete.
8135 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8136 (find_gdb_breakpoint): New function.
8137 (set_gdb_breakpoint_at): Delete.
8138 (z_type_supported): New function.
8139 (set_gdb_breakpoint_1): New function, loosely based off
8140 set_gdb_breakpoint_at.
8141 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8142 (delete_gdb_breakpoint_at): Delete.
8143 (delete_gdb_breakpoint_1): New function, loosely based off
8144 delete_gdb_breakpoint_at.
8145 (delete_gdb_breakpoint): New function.
8146 (clear_gdb_breakpoint_conditions): Rename to ...
8147 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8148 breakpoint.
8149 (add_condition_to_breakpoint): Make static.
8150 (add_breakpoint_condition): Take a struct breakpoint pointer
8151 instead of an address. Adjust.
8152 (gdb_condition_true_at_breakpoint): Rename to ...
8153 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8154 z_type parameter.
8155 (gdb_condition_true_at_breakpoint): Reimplement.
8156 (add_breakpoint_commands): Take a struct breakpoint pointer
8157 instead of an address. Adjust.
8158 (gdb_no_commands_at_breakpoint): Rename to ...
8159 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8160 parameter. Return true if no breakpoint was found. Change debug
8161 output.
8162 (gdb_no_commands_at_breakpoint): Reimplement.
8163 (run_breakpoint_commands): Rename to ...
8164 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8165 and change return type to boolean.
8166 (run_breakpoint_commands): New function.
8167 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8168 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8169 breakpoint. Go through the_target->remove_point instead of
8170 assuming memory breakpoint.
8171 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8172 software and hardware breakpoints.
8173 (reinsert_raw_breakpoint): Go through the_target->insert_point
8174 instead of assuming memory breakpoint.
8175 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8176 software and hardware breakpoints.
8177 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8178 Check both software and hardware breakpoints.
8179 (validate_inserted_breakpoint): Assert the breakpoint is a
8180 software breakpoint. Set the inserted flag to -1 instead of
8181 setting shlib_disabled.
8182 (delete_disabled_breakpoints): Adjust.
8183 (validate_breakpoints): Only validate software breakpoints.
8184 Adjust to inserted flag change.
8185 (check_mem_read, check_mem_write): Skip breakpoint types other
8186 than software breakpoints. Adjust to inserted flag change.
8187 * mem-break.h (enum raw_bkpt_type): New enum.
8188 (raw_breakpoint, struct process_info): Forward declare.
8189 (Z_packet_to_target_hw_bp_type): Delete declaration.
8190 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8191 (set_gdb_breakpoint, delete_gdb_breakpoint)
8192 (clear_breakpoint_conditions): New declarations.
8193 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8194 (breakpoint_inserted_here): Update comment.
8195 (add_breakpoint_condition, add_breakpoint_commands): Replace
8196 address parameter with a breakpoint pointer parameter.
8197 (gdb_breakpoint_here): Update comment.
8198 (delete_gdb_breakpoint_at): Delete.
8199 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8200 * server.c (process_point_options): Take a struct breakpoint
8201 pointer instead of an address. Adjust.
8202 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8203 delete_gdb_breakpoint.
8204 * spu-low.c (spu_target_ops): Install NULL as
8205 supports_z_point_type method.
8206 * target.h: Include mem-break.h.
8207 (struct target_ops) <prepare_to_access_memory>: Update comment.
8208 <supports_z_point_type>: New field.
8209 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8210 instead of a char. Also take a raw breakpoint pointer.
8211 * win32-arm-low.c (the_low_target): Install NULL as
8212 supports_z_point_type.
8213 * win32-i386-low.c (i386_supports_z_point_type): New function.
8214 (i386_insert_point, i386_remove_point): Adjust to new interface.
8215 (the_low_target): Install i386_supports_z_point_type.
8216 * win32-low.c (win32_supports_z_point_type): New function.
8217 (win32_insert_point, win32_remove_point): Adjust to new interface.
8218 (win32_target_ops): Install win32_supports_z_point_type.
8219 * win32-low.h (struct win32_target_ops):
8220 <supports_z_point_type>: New method.
8221 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8222 instead of a char. Also take a raw breakpoint pointer.
8223
932539e3
PA
82242014-05-20 Pedro Alves <palves@redhat.com>
8225
8226 * mem-break.h: Include break-common.h.
8227 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8228 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8229 (Z_packet_to_target_hw_bp_type): New declaration.
8230 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8231 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8232 (Z_PACKET_ACCESS_WP): Delete macros.
8233 (Z_packet_to_hw_type): Delete function.
8234 * i386-low.h: Don't include break-common.h here.
8235 (Z_packet_to_hw_type): Delete declaration.
8236 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8237 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8238 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8239 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8240 * linux-aarch64-low.c: Don't include break-common.h here.
8241 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8242 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8243 (Z_packet_to_target_hw_bp_type): Delete function.
8244 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8245 function.
8246 (mips_insert_point, mips_remove_point): Use
8247 Z_packet_to_target_hw_bp_type.
8248
4ff0d3d8
PA
82492014-05-20 Pedro Alves <palves@redhat.com>
8250
8251 * linux-aarch64-low.c: Include break-common.h.
8252 (enum target_point_type): Delete.
8253 (Z_packet_to_point_type): Rename to ...
8254 (Z_packet_to_target_hw_bp_type): ... this, and return a
8255 target_hw_bp_type instead.
8256 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8257 instead of an enum target_point_type.
8258 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8259 breakpoint type.
8260 (aarch64_dr_state_insert_one_point)
8261 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8262 (aarch64_handle_aligned_watchpoint)
8263 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8264 Take an enum target_hw_bp_type instead of an enum
8265 target_point_type.
8266 (aarch64_supports_z_point_type): New function.
8267 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8268 use Z_packet_to_target_hw_bp_type.
8269
786dc519
JB
82702014-05-20 Joel Brobecker <brobecker@adacore.com>
8271
8272 * configure.ac: Only use -Werror by default when DEVELOPMENT
8273 is true.
8274 * configure: Regenerate.
8275
9e0aa64f
JK
82762014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8277
8278 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8279 * linux-x86-low.c (X86_64_USER_REGS): New.
8280 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8281
2b577b92
YQ
82822014-04-28 Yao Qi <yao@codesourcery.com>
8283
8284 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8285 name.
8286
94611da2
PA
82872014-04-25 Pedro Alves <palves@redhat.com>
8288
8289 PR server/16255
8290 * linux-low.c (linux_attach_fail_reason_string): New function.
8291 (linux_attach_lwp): Delete.
8292 (linux_attach_lwp_1): Rename to ...
8293 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8294 argument. Remove "initial" parameter. Return int instead of
8295 void. Don't error or warn here.
8296 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8297 failure to attach to the tgid. Call warning when failing to
8298 attach to an lwp.
8299 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8300 argument. Remove "initial" parameter. Return int instead of
8301 void. Don't error or warn here.
8302 (linux_attach_fail_reason_string): New declaration.
8303 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8304 interface change. Use linux_attach_fail_reason_string.
8305
01f9f808
MS
83062014-04-24 Michael Sturm <michael.sturm@mintel.com>
8307 Walfred Tedeschi <walfred.tedeschi@intel.com>
8308
8309 * Makefile.in: Added rules to handle new files
8310 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8311 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8312 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8313 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8314 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8315 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8316 x32-avx512-linux.o.
8317 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8318 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8319 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8320 i386/x32-avx512.xml.
8321 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8322 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8323 i386/x32-avx512-linux.xml.
8324 * i387-fp.c (num_avx512_k_registers): New constant for number
8325 of K registers.
8326 (num_avx512_zmmh_low_registers): New constant for number of
8327 lower ZMM registers (0-15).
8328 (num_avx512_zmmh_high_registers): New constant for number of
8329 higher ZMM registers (16-31).
8330 (num_avx512_ymmh_registers): New contant for number of higher
8331 YMM registers (ymm16-31 added by avx521 on x86_64).
8332 (num_avx512_xmm_registers): New constant for number of higher
8333 XMM registers (xmm16-31 added by AVX512 on x86_64).
8334 (struct i387_xsave): Add space for AVX512 registers.
8335 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8336 Add code to handle AVX512 registers.
8337 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8338 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8339 prototypei from generated file.
8340 (tdesc_amd64_avx512_linux): Likewise.
8341 (init_registers_x32_avx512_linux): Likewise.
8342 (tdesc_x32_avx512_linux): Likewise.
8343 (init_registers_i386_avx512_linux): Likewise.
8344 (tdesc_i386_avx512_linux): Likewise.
8345 (x86_64_regmap): Add AVX512 registers.
8346 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8347 mask.
8348 (initialize_low_arch): Add code to initialize AVX512 registers.
8349
51aa91f9
PA
83502014-04-23 Pedro Alves <palves@redhat.com>
8351
8352 * mem-break.c (find_gdb_breakpoint_at): Make static.
8353 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8354
a4165e94
PA
83552014-04-23 Pedro Alves <palves@redhat.com>
8356
8357 * i386-low.c: Don't include break-common.h here.
8358 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8359 prototype to take target_hw_bp_type as argument instead of a Z
8360 packet char.
8361 * i386-low.h: Include break-common.h here.
8362 (Z_packet_to_hw_type): Declare.
8363 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8364 prototypes.
8365 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8366 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8367 (x86_remove_point): Convert the packet number to a
8368 target_hw_bp_type before calling i386_low_remove_watchpoint.
8369 * win32-i386-low.c (i386_insert_point): Convert the packet number
8370 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8371 (i386_remove_point): Convert the packet number to a
8372 target_hw_bp_type before calling i386_low_remove_watchpoint.
8373
b8acf843
PA
83742014-04-23 Pedro Alves <palves@redhat.com>
8375
8376 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8377
d708bcd1
PA
83782014-04-10 Pedro Alves <palves@redhat.com>
8379
8380 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8381 Check if the condition or command is NULL before checking if the
8382 breakpoint is known. On success, return true.
8383 * mem-break.h (add_breakpoint_condition): Document return.
8384 (add_breakpoint_commands): Add describing comment.
8385 * server.c (skip_to_semicolon): New function.
8386 (process_point_options): Use it.
8387
2eec7d5b
PA
83882014-04-09 Pedro Alves <palves@redhat.com>
8389
8390 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8391 to lwpid_of.
8392
fa96cb38
PA
83932014-02-27 Pedro Alves <palves@redhat.com>
8394
8395 PR 12702
8396 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8397 macros.
8398 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8399 output.
8400 (last_thread_of_process_p): Take a PID argument instead of a
8401 thread pointer.
8402 (linux_wait_for_lwp): Delete.
8403 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8404 functions.
8405 (linux_low_filter_event): New function, party factored out from
8406 linux_wait_for_event.
8407 (linux_wait_for_event): Rename to ...
8408 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8409 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8410 sigsuspend. Check for zombie leaders.
8411 (linux_wait_for_event): Reimplement as wrapper around
8412 linux_wait_for_event_filtered.
8413 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8414 a normal or signal exit is seen, it's the whole process exiting.
8415 (wait_for_sigstop): No longer a for_each_inferior callback.
8416 Rewrite on top of linux_wait_for_event_filtered.
8417 (stop_all_lwps): Call wait_for_sigstop directly.
8418 * server.c (resume, handle_target_event): Handle
8419 TARGET_WAITKIND_NO_RESUMED.
8420
d763de10
JB
84212014-02-26 Joel Brobecker <brobecker@adacore.com>
8422
8423 * win32-low.c (psapi_get_dll_name,
8424 * win32_CreateToolhelp32Snapshot): Delete.
8425 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8426 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8427 Delete.
8428 (handle_load_dll): Add function description.
8429 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8430
850a0f76
JB
84312014-02-26 Joel Brobecker <brobecker@adacore.com>
8432
8433 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8434 Add comment.
8435 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8436 base address when calling win32_add_one_solib.
8437 (handle_load_dll): Delete local variable load_addr.
8438 Remove 0x1000 offset applied to DLL base address when calling
8439 win32_add_one_solib.
8440 (handle_unload_dll): Add comment.
8441
f25b3fc3
JB
84422014-02-26 Joel Brobecker <brobecker@adacore.com>
8443
8444 * win32-low.c (win32_add_all_dlls): Renames
8445 win32_ensure_ntdll_loaded. Rewrite function documentation.
8446 Adjust implementation to always load all DLLs.
8447 Add 0x1000 offset to DLL base address when calling
8448 win32_add_one_solib.
8449 (child_initialization_done): New static global.
8450 (do_initial_child_stuff): Set child_initialization_done to
8451 zero during child initialization, and 1 after. Replace call
8452 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8453 Add comment.
8454 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8455 (handle_unload_dll): Add function documentation.
8456 (get_child_debug_event): Ignore load and unload DLL events
8457 during child initialization.
8458
d86d4aaf
DE
84592014-02-20 Doug Evans <dje@google.com>
8460
3bc32da3 8461 Remove global all_lwps.
d86d4aaf
DE
8462 * inferiors.h (ptid_of): Move here from linux-low.h.
8463 (pid_of, lwpid_of): Ditto.
8464 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8465 parameter is a struct thread_info * now.
8466 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8467 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8468 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8469 directly.
8470 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8471 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8472 * linux-arm-low.c (update_registers_callback): Update, "entry"
8473 parameter is a struct thread_info * now.
8474 Fetch lwpid from current_inferior directly.
8475 (arm_insert_point): Pass &all_threads to find_inferior instead of
8476 &all_lwps.
8477 (arm_remove_point): Ditto.
8478 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8479 (arm_prepare_to_resume): Fetch pid from thread.
8480 (arm_read_description): Fetch lwpid from current_inferior directly.
8481 * linux-low.c (all_lwps): Delete.
8482 (delete_lwp): Delete call to remove_inferior.
8483 (handle_extended_wait): Fetch lwpid from thread.
8484 (add_lwp): Don't set lwp->entry.id. Remove call to
8485 add_inferior_to_list.
8486 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8487 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8488 (kill_one_lwp_callback): Ditto.
8489 (linux_kill): Don't dereference NULL pointer.
8490 Fetch ptid,lwpid from thread.
8491 (get_detach_signal): Fetch ptid from thread.
8492 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8493 Simplify call to regcache_invalidate_thread.
8494 (delete_lwp_callback): Update, "entry" parameter is a
8495 struct thread_info * now. Fetch pid from thread.
8496 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8497 (status_pending_p_callback): Update, "entry" parameter is a
8498 struct thread_info * now. Fetch ptid from thread.
8499 (find_lwp_pid): Update, "entry" parameter is a
8500 struct thread_info * now.
8501 (linux_wait_for_lwp): Fetch pid from thread.
8502 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8503 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8504 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8505 (dequeue_one_deferred_signal): Ditto.
8506 (cancel_breakpoint): Fetch ptid from current_inferior.
8507 (linux_wait_for_event): Pass &all_threads to find_inferior,
8508 not &all_lwps. Fetch ptid, lwpid from thread.
8509 (count_events_callback): Update, "entry" parameter is a
8510 struct thread_info * now.
8511 (select_singlestep_lwp_callback): Ditto.
8512 (select_event_lwp_callback): Ditto.
8513 (cancel_breakpoints_callback): Ditto.
8514 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8515 not &all_lwps.
8516 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8517 (unsuspend_one_lwp): Update, "entry" parameter is a
8518 struct thread_info * now.
8519 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8520 not &all_lwps.
8521 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8522 Fetch lwpid from thread, not lwp.
8523 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8524 Pass &all_threads to find_inferior, not &all_lwps.
8525 (send_sigstop): Fetch lwpid from thread, not lwp.
8526 (send_sigstop_callback): Update, "entry" parameter is a
8527 struct thread_info * now.
8528 (suspend_and_send_sigstop_callback): Ditto.
8529 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8530 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8531 struct thread_info * now.
8532 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8533 from thread, lwp.
8534 (lwp_running): Update, "entry" parameter is a
8535 struct thread_info * now.
8536 (stop_all_lwps): Fetch ptid from thread.
8537 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8538 (linux_resume_one_lwp): Fetch lwpid from thread.
8539 (linux_set_resume_request): Update, "entry" parameter is a
8540 struct thread_info * now. Fetch pid, lwpid from thread.
8541 (resume_status_pending_p): Update, "entry" parameter is a
8542 struct thread_info * now.
8543 (need_step_over_p): Ditto. Fetch lwpid from thread.
8544 (start_step_over): Fetch lwpid from thread.
8545 (linux_resume_one_thread): Update, "entry" parameter is a
8546 struct thread_info * now. Fetch lwpid from thread.
8547 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8548 (proceed_one_lwp): Update, "entry" parameter is a
8549 struct thread_info * now. Fetch lwpid from thread.
8550 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8551 struct thread_info * now.
8552 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8553 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8554 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8555 directly.
8556 (regsets_store_inferior_registers): Ditto.
8557 (fetch_register, store_register): Ditto.
8558 (linux_read_memory, linux_write_memory): Ditto.
8559 (linux_request_interrupt): Ditto.
8560 (linux_read_auxv): Ditto.
8561 (linux_xfer_siginfo): Ditto.
8562 (linux_qxfer_spu): Ditto.
8563 (linux_qxfer_libraries_svr4): Ditto.
8564 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8565 moved to inferiors.h.
8566 (get_lwp): Delete.
8567 (get_thread_lwp): Update.
8568 (struct lwp_info): Delete member "entry". Simplify comment for
8569 member "thread".
8570 (all_lwps): Delete.
8571 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8572 current_inferior directly.
8573 (update_watch_registers_callback): Update, "entry" parameter is a
8574 struct thread_info * now. Fetch pid from thread.
8575 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8576 (mips_insert_point): Fetch lwpid from current_inferior.
8577 Pass &all_threads to find_inferior, not &all_lwps.
8578 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8579 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8580 directly.
8581 (mips_stopped_data_address): Ditto.
8582 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8583 directly.
8584 * linux-tile-low.c (tile_arch_setup): Ditto.
8585 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8586 (update_debug_registers_callback): Update, "entry" parameter is a
8587 struct thread_info * now. Fetch pid from thread.
8588 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8589 Pass &all_threads to find_inferior, not &all_lwps.
8590 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8591 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8592 Pass &all_threads to find_inferior, not &all_lwps.
8593 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8594 (i386_dr_low_get_status): Ditto.
8595 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8596 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8597 (x86_linux_read_description): Ditto.
8598 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8599
3b8361aa
DE
86002014-02-20 Doug Evans <dje@google.com>
8601
8602 * inferiors.c (get_first_inferior): Fix buglet.
8603
f7667f0d
DE
86042014-02-19 Doug Evans <dje@google.com>
8605
8606 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8607 * inferiors.c (add_thread): Change result type to struct thread_info *.
8608 All callers updated.
8609 (add_lwp): Call add_thread here instead of in callers.
8610 All callers updated.
8611 * linux-low.h (get_lwp_thread): Rewrite.
8612 (struct lwp_info): New member "thread".
8613
b3312d80
DE
86142014-02-19 Doug Evans <dje@google.com>
8615
8616 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8617 All callers updated.
8618
ecc6f45c
DE
86192014-02-19 Doug Evans <dje@google.com>
8620
8621 * inferiors.c (add_thread): Fix whitespace.
8622
649ebbca
DE
86232014-02-19 Doug Evans <dje@google.com>
8624
8625 * dll.c (clear_dlls): Replace accessing list implemention details
8626 with API function.
8627 * gdbthread.h (get_first_thread): Declare.
8628 * inferiors.c (for_each_inferior_with_data): New function.
8629 (get_first_thread): New function.
8630 (find_thread_ptid): Simplify.
8631 (get_first_inferior): New function.
8632 (clear_list): Delete.
8633 (one_inferior_p): New function.
8634 (clear_inferior_list): New function.
8635 (clear_inferiors): Update.
8636 * inferiors.h (for_each_inferior_with_data): Declare.
8637 (clear_inferior_list): Declare.
8638 (one_inferior_p): Declare.
8639 (get_first_inferior): Declare.
8640 * linux-low.c (linux_wait_for_event): Replace accessing list
8641 implemention details with API function.
8642 * server.c (target_running): Ditto.
8643 (accumulate_file_name_length): New function.
8644 (emit_dll_description): New function.
8645 (handle_qxfer_libraries): Replace accessing list implemention
8646 details with API function.
8647 (handle_qxfer_threads_worker): New function.
8648 (handle_qxfer_threads_proper): Replace accessing list implemention
8649 details with API function.
8650 (handle_query): Ditto.
8651 (visit_actioned_threads_callback_ftype): New typedef.
8652 (visit_actioned_threads_data): New struct.
8653 (visit_actioned_threads): Rewrite to be find_inferior callback.
8654 (resume): Call find_inferior.
8655 (handle_status): Replace accessing list implemention
8656 details with API function.
8657 (process_serial_event): Replace accessing list implemention details
8658 with API function.
8659 * target.c (set_desired_inferior): Replace accessing list implemention
8660 details with API function.
8661 * tracepoint.c (same_process_p): New function.
8662 (gdb_agent_about_to_close): Replace accessing list implemention
8663 details with API function.
8664 * win32-low.c (child_delete_thread): Replace accessing list
8665 implemention details with API function.
8666 (match_dll_by_basename): New function.
8667 (dll_is_loaded_by_basename): New function.
8668 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8669 details call to dll_is_loaded_by_basename.
8670
80894984
DE
86712014-02-19 Doug Evans <dje@google.com>
8672
8673 * dll.h (struct dll_info): Add comment.
8674 * gdbthread.h (struct thread_info): Add comment.
8675 (current_ptid): Simplify.
8676 * inferiors.c (add_process): Update.
8677 (remove_process): Update.
8678 * inferiors.h (struct process_info): Rename member "head" to "entry".
8679 * linux-low.c (delete_lwp): Update.
8680 (add_lwp): Update.
8681 (last_thread_of_process_p): Update.
8682 (kill_one_lwp_callback, linux_kill): Update.
8683 (status_pending_p_callback): Update.
8684 (wait_for_sigstop): Update. Simplify read of ptid.
8685 (start_step_over): Update.
8686 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8687 (get_lwp_thread): Update.
8688 (struct lwp_info): Rename member "head" to "entry".
8689 * regcache.h (inferior_list_entry): Delete.
8690 * server.c (kill_inferior_callback): Update.
8691 (detach_or_kill_inferior_callback): Update.
8692 (print_started_pid): Update.
8693 (print_attached_pid): Update.
8694 (process_serial_event): Simplify read of ptid.
8695 * thread-db.c (thread_db_create_event): Update.
8696 (thread_db_get_tls_address): Update.
8697 * win32-low.c (current_inferior_ptid): Simplify.
8698
46917d26
TT
86992014-02-19 Tom Tromey <tromey@redhat.com>
8700
8701 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8702 argument.
8703 (target_supports_btrace): Update.
8704
0759a81e
YQ
87052014-02-14 Yao Qi <yao@codesourcery.com>
8706
8707 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8708 (rsp-low-ipa.o): New target.
8709
a7191e8b
TT
87102014-02-12 Tom Tromey <tromey@redhat.com>
8711
8712 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8713 convert_ascii_to_int.
8714 * regcache.c (registers_to_string): Likewise.
8715 * remote-utils.c (decode_M_packet): Likewise.
8716 * server.c (process_serial_event): Likewise.
8717
ff0e980e
TT
87182014-02-12 Tom Tromey <tromey@redhat.com>
8719
8720 * server.c (handle_query, handle_v_run): Use hex2bin, not
8721 unhexify.
8722 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8723
e9371aff
TT
87242014-02-12 Tom Tromey <tromey@redhat.com>
8725
8726 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8727 convert_int_to_ascii.
8728 * regcache.c (registers_to_string, collect_register_as_string):
8729 Likewise.
8730 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8731 Likewise.
8732 * server.c (process_serial_event): Likewise.
8733 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8734 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8735
971dc0b8
TT
87362014-02-12 Tom Tromey <tromey@redhat.com>
8737
8738 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8739 bin2hex, not hexify.
8740 * tracepoint.c (cmd_qtstatus): Likewise.
8741
0a822afb
TT
87422014-02-12 Tom Tromey <tromey@redhat.com>
8743
8744 * remote-utils.c (monitor_output): Pass explicit length to
8745 hexify.
8746
9c3d6531
TT
87472014-02-12 Tom Tromey <tromey@redhat.com>
8748
8749 * tracepoint.c: Include rsp-low.h.
8750 * server.c: Include rsp-low.h.
8751 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8752 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8753 declare.
8754 * remote-utils.c: Include rsp-low.h.
8755 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8756 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8757 (convert_int_to_ascii, convert_ascii_to_int): Move to
8758 common/rsp-low.c.
8759 * regcache.c: Include rsp-low.h.
8760 * ax.c: Include rsp-low.h.
8761 * Makefile.in (SFILES): Add common/rsp-low.c.
8762 (OBS): Add rsp-low.o.
8763 (rsp-low.o): New target.
8764
01fd3ea5
TT
87652014-02-12 Tom Tromey <tromey@redhat.com>
8766
8767 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8768 Include print-utils.h.
8769 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8770 (plongest, thirty_two, phex_nz): Remove.
8771 * Makefile.in (SFILES): Add common/print-utils.c.
8772 (OBS): Add print-utils.o.
8773 (print-utils-ipa.o): New target.
8774 (print-utils.o): New target.
8775 (IPA_OBJS): Add print-utils-ipa.o.
8776
e99dc820
TT
87772014-02-06 Tom Tromey <tromey@redhat.com>
8778
8779 * Makefile.in (SFILES): Fix indentation.
8780
ee1e2d4f
DE
87812014-02-05 Doug Evans <dje@google.com>
8782
8783 * linux-low.c (linux_wait_for_event): Improve comment.
8784 (linux_wait_1): Keep current_inferior in sync with event_child.
8785
f5a02773
DE
87862014-01-22 Doug Evans <dje@google.com>
8787
8788 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8789
87ce2a04
DE
87902014-01-22 Doug Evans <dje@google.com>
8791
8792 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8793 * configure: Regenerate.
8794 * config.in: Regenerate.
8795 * Makefile.in (SFILES): Add debug.c.
8796 (OBS): Add debug.o.
8797 * debug.c: New file.
8798 * debug.h: New file.
8799 * linux-aarch64-low.c (*): Update all debugging printfs to use
8800 debug_printf instead of fprintf.
8801 * linux-arm-low.c (*): Ditto.
8802 * linux-cris-low.c (*): Ditto.
8803 * linux-crisv32-low.c (*): Ditto.
8804 * linux-m32r-low.c (*): Ditto.
8805 * linux-sparc-low.c (*): Ditto.
8806 * linux-x86.c (*): Ditto.
8807 * linux-low.c (*): Ditto.
8808 (linux_wait_1): Add calls to debug_enter, debug_exit.
8809 (linux_wait): Remove redundant debugging printf.
8810 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8811 (linux_resume, unstop_all_lwps): Ditto.
8812 * mem-break.c (*): Update all debugging printfs to use
8813 debug_printf instead of fprintf.
8814 * remote-utils.c (*): Ditto.
8815 * thread-db.c (*): Ditto.
8816 * server.c #include <ctype.h>, "gdb_vecs.h".
8817 (debug_threads): Moved to debug.c.
8818 (*): Update all debugging printfs to use debug_printf instead of
8819 fprintf.
8820 (start_inferior): Replace call to fflush with call to debug_flush.
8821 (monitor_show_help): Mention set debug-format.
8822 (parse_debug_format_options): New function.
8823 (handle_monitor_command): Handle "monitor set debug-format".
8824 (gdbserver_usage): Mention --debug-format.
8825 (main): Parse --debug-format.
8826 * server.h (debug_threads): Declaration moved to debug.h.
8827 #include "debug.h".
8828 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8829 trace_debug_1 that uses debug_printf.
8830 (tracepoint_look_up_symbols): Update all debugging printfs to use
8831 debug_printf instead of fprintf.
8832
e671835b
BS
88332014-01-20 Baruch Siach <baruch@tkos.co.il>
8834
8835 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8836 sys/ptrace.h.
8837
b5737fa9
PA
88382014-01-17 Pedro Alves <palves@redhat.com>
8839
ea38d2a9 8840 PR build/16445
c7faa97a
PA
8841 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8842 defined after including gdb_proc_service.h.
b5737fa9 8843
40ed484e
DE
88442014-01-16 Doug Evans <dje@google.com>
8845
8846 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8847 (match_dll): Use it.
8848
969c39fb
MM
88492014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8850
8851 * target.h (target_ops) <read_btrace>: Change parameters and
8852 return type to allow error reporting.
8853 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8854 trace reading errors on.
8855 * linux-low.c (linux_low_read_btrace): Pass trace reading
8856 errors on.
8857 (linux_low_disable_btrace): New.
8858
ab7f45ba
DE
88592014-01-15 Doug Evans <dje@google.com>
8860
8861 * inferiors.c (thread_id_to_gdb_id): Delete.
8862 * inferiors.h (thread_id_to_gdb_id): Delete.
8863
66af0f44
EZ
88642014-01-13 Eli Zaretskii <eliz@gnu.org>
8865
8866 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8867 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8868 versions.
8869
9939e131
PA
88702014-01-08 Pedro Alves <palves@redhat.com>
8871
8872 * server.c (handle_status): Don't discard previous queued stop
8873 replies or thread's pending status here.
8874 (main) <disconnection>: Do it here instead.
8875
b7ea362b
PA
88762014-01-08 Pedro Alves <palves@redhat.com>
8877
8878 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8879 * server.c (visit_actioned_threads, handle_pending_status): New
8880 function.
8881 (handle_v_cont): Factor out parts to ...
8882 (resume): ... this new function. If in all-stop, and a thread
8883 being resumed has a pending status, report it without actually
8884 resuming.
8885 (myresume): Adjust to use the new 'resume' function.
8886 (clear_pending_status_callback, set_pending_status_callback)
8887 (find_status_pending_thread_callback): New functions.
8888 (handle_status): Handle the case of multiple threads having
8889 interesting statuses to report. Report threads' real last signal
8890 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8891 with an interesting thread to report the status for, instead of
8892 always reporting the status of the first thread.
8893
28498c42
JB
88942014-01-01 Joel Brobecker <brobecker@adacore.com>
8895
8896 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8897 * gdbreplay.c (gdbreplay_version): Likewise.
8898
f45c82da
YZ
88992013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8900
8901 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8902 iov.iov_len with the real length in use.
8903
379a5e2d
JB
89042013-12-13 Joel Brobecker <brobecker@adacore.com>
8905
8906 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8907 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8908 for all targets that use win32-low.c.
8909 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8910 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8911
4210d83e
PA
89122013-12-13 Pedro Alves <palves@redhat.com>
8913
8914 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8915 if equal to TARGET_WAITKIND_LOADED.
8916 * win32-low.c (cached_status): New static global.
8917 (win32_wait): Add declaration.
8918 (do_initial_child_stuff): Flush all initial pending debug events
8919 up to the initial breakpoint.
8920 (win32_wait): If CACHED_STATUS was set, return that instead
8921 of doing a real wait. Remove the code resuming the execution
8922 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8923 during the initial phase. Also remove the code changing
8924 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8925 TARGET_WAITKIND_STOPPED.
8926
e7f0d979
YQ
89272013-12-11 Yao Qi <yao@codesourcery.com>
8928
8929 * notif.c (handle_notif_ack): Return 0 if no notification
8930 matches.
8931
ebcf782c
DE
89322013-11-20 Doug Evans <dje@google.com>
8933
8934 * linux-low.c (linux_set_resume_request): Fix comment.
8935
20ad9378
DE
89362013-11-20 Doug Evans <dje@google.com>
8937
8938 * linux-low.c (resume_status_pending_p): Tweak comment.
8939
a196ebeb
WT
89402013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8941
8942 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8943 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8944 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8945 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8946 (srv_amd64_regobj): Add amd64-mpx.o.
8947 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8948 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8949 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8950 * i387-fp.c (num_pl_bnd_register) Added constant.
8951 (num_pl_bnd_cfg_registers) Added constant.
8952 (struct i387_xsave) Added reserved area and MPX fields.
8953 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8954 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8955 function.
8956 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8957 (init_registers_amd64_mpx_linux): Declare new function.
8958 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8959 (x86_64_regmap): Add MPX registers.
8960 (x86_linux_read_description): Add MPX case.
8961 (initialize_low_arch): Initialize MPX targets.
8962
0080a2f6
TT
89632013-11-18 Tom Tromey <tromey@redhat.com>
8964
8965 * configure: Rebuild.
8966 * configure.ac: Don't check for stdlib.h.
8967 * gdbreplay.c: Unconditionally include stdlib.h.
8968
2978b111
TT
89692013-11-18 Tom Tromey <tromey@redhat.com>
8970
8971 * config.in: Rebuild.
8972 * configure: Rebuild.
8973 * configure.ac: Don't use AC_HEADER_DIRENT.
8974
a3d08894
TT
89752013-11-18 Tom Tromey <tromey@redhat.com>
8976
8977 * server.h: Don't check HAVE_STRING_H.
8978 * gdbreplay.c: Don't check HAVE_STRING_H.
8979 * configure: Rebuild.
8980
0a5dd17d
TT
89812013-11-18 Tom Tromey <tromey@redhat.com>
8982
8983 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8984 LIBGNU.
8985
1bd2f0ba
TT
89862013-11-08 Tom Tromey <tromey@redhat.com>
8987
8988 * configure, config.in: Rebuild.
8989 * configure.ac: Remove unused configury.
8990
3266f10b
TT
89912013-11-08 Tom Tromey <tromey@redhat.com>
8992
8993 * acinclude.m4: Include common.m4, codeset.m4.
8994 * configure, config.in: Rebuild.
8995 * configure.ac: Use GDB_AC_COMMON.
8996
6682d959
AA
89972013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8998
8999 * linux-s390-low.c (HWCAP_S390_TE): New define.
9000 (s390_arch_setup): Consider the TE field in the HWCAP for
9001 determining 'have_regset_tdb'.
9002
fd0a4d76
SDJ
90032013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9004
9005 PR gdb/16014
9006 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9007 call to sizeof.
9008
1a3d890b
PA
90092013-10-02 Pedro Alves <palves@redhat.com>
9010
9011 * server.c (process_serial_event): Don't output "GDBserver
9012 exiting" if GDB is connected through stdio.
9013 * target.c (mywait): Likewise, be silent if GDB is connected
9014 through stdio.
9015
97ad4581
JB
90162013-10-01 Joel Brobecker <brobecker@adacore.com>
9017
9018 * lynx-low.c (lynx_add_threads_after_attach): New function.
9019 (lynx_attach): Remove call to add_thread. Add call to
9020 lynx_add_threads_after_attach instead.
9021
5b4e221c
MF
90222013-09-28 Mike Frysinger <vapier@gentoo.org>
9023
9024 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9025 * config.in, configure: Regenerated.
9026
ee47b2f8
YQ
90272013-09-18 Yao Qi <yao@codesourcery.com>
9028
9029 PR server/15959
9030 * server.c (start_inferior): Clear 'resume_info'.
9031
d6707650 90322013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9033
d6707650
JW
9034 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9035 for each register.
9036
9243dd0e 90372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9038
9243dd0e
JW
9039 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9040 linux-tile-low.o to srv_tgtobj.
9041
c623a6ef
WN
90422013-09-16 Will Newton <will.newton@linaro.org>
9043
9044 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9045 out regs.
9046
fb71d39e
PA
90472013-09-06 Pedro Alves <palves@redhat.com>
9048
9049 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9050 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9051 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9052 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9053 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9054 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9055
8e7e9910
PA
90562013-09-06 Pedro Alves <palves@redhat.com>
9057
9058 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9059 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9060
7c3a12ca
PA
90612013-09-06 Pedro Alves <palves@redhat.com>
9062
9063 * linux-amd64-ipa.c: Include tracepoint.h.
9064 * linux-i386-ipa.c: Include tracepoint.h.
9065
8eb3d7b6
RW
90662013-09-06 Ricard Wanderlof <ricardw@axis.com>
9067
9068 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9069 (ps_get_thread_area): New function.
9070
eddddb9d
RW
90712013-09-06 Ricard Wanderlof <ricardw@axis.com>
9072
9073 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9074 (initialize_low_arch): Call init_registers_crisv32 rather than
9075 init_register_crisv32.
9076
533b0600
PA
90772013-09-05 Pedro Alves <palves@redhat.com>
9078
9079 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9080 to ...
9081 * hostio.h: ... this new file.
9082 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9083 win32-low.c: Include hostio.h.
9084
0ce3d3b5
PA
90852013-09-05 Pedro Alves <palves@redhat.com>
9086
9087 * server.h (gdb_client_data, handler_func, callback_handler_func)
9088 (delete_file_handler, add_file_handler, append_callback_event)
9089 (delete_callback_event, start_event_loop, initialize_event_loop):
9090 Move to event-loop.h and include it.
9091 * event-loop.h: New file.
9092
799cdc37
PA
90932013-09-05 Pedro Alves <palves@redhat.com>
9094
9095 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9096 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9097 (loaded_dll, unloaded_dll): Move to ...
9098 * dll.h: ... this new file.
9099 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9100
6a6bbd9d
PA
91012013-09-05 Pedro Alves <palves@redhat.com>
9102
9103 * server.h (current_process, get_thread_process, all_processes)
9104 (add_inferior_to_list, for_each_inferior, current_inferior)
9105 (remove_inferior, add_process, remove_process, find_process_pid)
9106 (have_started_inferiors_p, have_attached_inferiors_p)
9107 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9108 (clear_inferiors, find_inferior, find_inferior_id)
9109 (inferior_target_data, set_inferior_target_data)
9110 (inferior_regcache_data, set_inferior_regcache_data): Move to
9111 inferiors.h, and include it.
9112 * inferiors.h: New file.
9113
f699aaba
PA
91142013-09-05 Pedro Alves <palves@redhat.com>
9115
9116 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9117 Move ...
72f4393d 9118 * ax.h: ... here.
f699aaba 9119
c144c7a0
PA
91202013-09-05 Pedro Alves <palves@redhat.com>
9121
9122 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9123 tracepoint.h.
9124 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9125 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9126 (handle_tracepoint_general_set, handle_tracepoint_query)
9127 (tracepoint_finished_step, tracepoint_was_hit)
9128 (release_while_stepping_state_list, current_traceframe)
9129 (in_readonly_region, traceframe_read_mem)
9130 (fetch_traceframe_registers, traceframe_read_sdata)
9131 (traceframe_read_info, struct fast_tpoint_collect_status)
9132 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9133 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9134 (supply_fast_tracepoint_registers)
9135 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9136 (ipa_tdesc, claim_trampoline_space)
9137 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9138 (agent_mem_read, agent_get_trace_state_variable_value)
9139 (agent_set_trace_state_variable_value, agent_tsv_read)
9140 (agent_mem_read_string, get_raw_reg_func_addr)
9141 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9142 * tracepoint.h: ... this new file.
9143
ff42e6ab
PA
91442013-09-05 Pedro Alves <palves@redhat.com>
9145
9146 * server.h (perror_with_name, error, fatal, warning, paddress)
9147 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9148 include it.
9149 * utils.h: New file.
9150
541af0f4
PA
91512013-09-05 Pedro Alves <palves@redhat.com>
9152
9153 * server.h (remote_debug, noack_mode, transport_is_reliable)
9154 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9155 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9156 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9157 (write_enn, initialize_async_io, enable_async_io)
9158 (disable_async_io, check_remote_input_interrupt_request)
9159 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9160 (dead_thread_notify, prepare_resume_reply)
9161 (decode_address_to_semicolon, decode_address, decode_m_packet)
9162 (decode_M_packet, decode_X_packet, decode_xfer_write)
9163 (decode_search_memory_packet, unhexify, hexify)
9164 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9165 (look_up_one_symbol, relocate_instruction)
9166 (monitor_output): Move to remote-utils.h, and include it.
9167 * remote-utils.h: New file.
9168
eebdf26b
PA
91692013-09-05 Pedro Alves <palves@redhat.com>
9170
9171 * server.h (_): Delete.
9172
3aafd2ff
PA
91732013-09-02 Pedro Alves <palves@redhat.com>
9174
9175 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9176 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9177 allocated.
9178 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9179
cee83bcb
PM
91802013-09-02 Pierre Muller <muller@sourceware.org>
9181
9182 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9183 or WriteProcessMemory complete successfully and handle
9184 ERROR_PARTIAL_COPY error.
9185
9a13b2fa
PA
91862013-09-02 Pedro Alves <palves@redhat.com>
9187
9188 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9189 error instead of EIO.
9190
602e3198
JK
91912013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9192
9193 PR server/15604
9194 * linux-low.c: Include filestuff.h.
9195 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9196 * lynx-low.c: Include filestuff.h.
9197 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9198 * server.c: Include filestuff.h.
9199 (main): Call notice_open_fds.
9200 * spu-low.c: Include filestuff.h.
9201 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9202
96d7229d
LM
92032013-08-22 Luis Machado <lgustavo@codesourcery.com>
9204
9205 * Makefile.in: Explain why ../target and ../nat are not
9206 listed as include file search paths.
9207 (linux-waitpid.o): New object file rule.
9208 * configure.srv (srv_native_linux_obj): New variable.
9209 Replace all occurrences of linux native object files with
9210 $srv_native_linux_obj.
9211 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9212 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9213 (linux_enable_event_reporting): Remove declaration.
9214 (my_waitpid): Moved to common/linux-waitpid.c.
9215 (linux_wait_for_event): Pass ptid when calling
9216 linux_enable_event_reporting.
9217 (linux_supports_tracefork_flag): Remove.
9218 (linux_enable_event_reporting): Likewise.
9219 (linux_tracefork_grandchild): Remove.
9220 (STACK_SIZE): Moved to common/linux-ptrace.c.
9221 (linux_tracefork_child): Remove.
9222 (linux_test_for_tracefork): Remove.
9223 (linux_look_up_symbols): Call linux_supports_traceclone.
9224 (initialize_low): Remove call to linux_test_for_tracefork.
9225 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9226 common/linux-ptrace.h.
9227 (PTRACE_TYPE_ARG4): Likewise.
9228 Include linux-ptrace.h.
9229
32940073
PA
92302013-08-21 Pedro Alves <palves@redhat.com>
9231
9232 * config.in: Renegerate.
9233
33b60d58 92342013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9235
33b60d58
LM
9236 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9237 (SFILES): Remove $(srcdir)/common/target-common.c and
9238 add $(srcdir)/target/waitstatus.c.
9239 (OBS): Remove target-common.o and add waitstatus.o.
9240 (server_h): Remove $(srcdir)/../common/target-common.h and
9241 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9242 and $(srcdir)/../target/waitstatus.h.
9243 (target-common.o): Remove.
9244 (waitstatus.o): New target object file.
9245 * target.h: Do not include target-common.h and
9246 include target/resume.h, target/wait.h and
9247 target/waitstatus.h.
9248
b8e1b30e
LM
92492013-08-13 Luis Machado <lgustavo@codesourcery.com>
9250
9251 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9252 to PTRACE_TYPE_ARG3.
9253 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9254 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9255 PTRACE_TYPE_ARG4.
9256 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9257 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9258
7a60ad40
YQ
92592013-07-27 Jie Zhang <jie@codesourcery.com>
9260 Daniel Jacobowitz <dan@codesourcery.com>
9261 Yao Qi <yao@codesourcery.com>
9262
9263 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9264 (mips-linux-watch.o): New rule.
9265 (mips_linux_watch_h): New variable.
9266 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9267 srv_tgtobj.
9268 * linux-mips-low.c: Include mips-linux-watch.h.
9269 (struct arch_process_info, struct arch_lwp_info): New.
9270 (update_watch_registers_callback): New function.
9271 (mips_linux_new_process, mips_linux_new_thread) New functions.
9272 (mips_linux_prepare_to_resume, mips_insert_point): New
9273 functions.
9274 (mips_remove_point, mips_stopped_by_watchpoint): New
9275 functions.
9276 (rsp_bp_type_to_target_hw_bp_type): New function.
9277 (mips_stopped_data_address): New function.
9278 (the_low_target): Add watchpoint support functions.
9279
de6f69ad
YQ
92802013-07-27 Yao Qi <yao@codesourcery.com>
9281
9282 * i386-low.c: Include break-common.h.
9283 (enum target_hw_bp_type): Remove.
9284
3360c0bf
LM
92852013-07-24 Luis Machado <lgustavo@codesourcery.com>
9286
9287 * Makefile.in (SFILES): /common/target-common.c.
9288 (OBS): Add target-common.o.
9289 (server_h): Add $(srcdir)/../common/target-common.h.
9290 (target-common.o): New target.
9291 * server.c (queue_stop_reply_callback): Free
9292 status string after use.
9293 * target.c (target_waitstatus_to_string): Remove.
9294 * target.h: Include target-common.h.
9295 (resume_kind): Likewise.
9296 (target_waitkind): Likewise.
9297 (target_waitstatus): Likewise.
9298 (TARGET_WNOHANG): Likewise.
9299
bd885420
YQ
93002013-07-04 Yao Qi <yao@codesourcery.com>
9301
9302 * Makefile.in (host_alias): Use @host_noncanonical@.
9303 (target_alias): Use @target_noncanonical@.
9304 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9305 ACX_NONCANONICAL_HOST.
9306 * configure: Regenerated.
9307
9308 Revert:
9309 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9310
9311 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9312 * configure: Rebuild.
9313 * Makefile.in (version_host, version_target): Get from configure.
9314 (version.c): Use $(version_host) and $(version_target).
9315
17ef446e
PA
93162013-07-03 Pedro Alves <palves@redhat.com>
9317
9318 * Makefile.in (config.status): Depend on development.sh.
9319 * acinclude.m4: Include libmcheck.m4.
9320 * configure: Regenerate.
9321
7a9a7487
MG
93222013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9323
9324 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9325 attribute inside the parentheses.
9326 (winapi_DebugSetProcessKillOnExit): Ditto.
9327 (winapi_DebugBreakProcess): Ditto.
9328 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9329
49b64de6
MG
93302013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9331
9332 * notif.h (notif_event): Add a dummy member to avoid compiler
9333 errors.
9334
d5749ee7
PA
93352013-07-01 Pedro Alves <palves@redhat.com>
9336
9337 * hostio.c (HOSTIO_PATH_MAX): Define.
9338 (require_filename, handle_open, handle_unlink, handle_readlink):
9339 Use it.
9340
d8d2a3ee
PA
93412013-07-01 Pedro Alves <palves@redhat.com>
9342
9343 * server.h: Include "pathmax.h".
9344 * linux-low.c: Don't include sys/param.h.
9345 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9346 MAXPATHLEN.
9347 * win32-low.c: Don't include sys/param.h.
9348 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9349
bc7dea8d
PA
93502013-07-01 Pedro Alves <palves@redhat.com>
9351
9352 * event-loop.c: Don't check HAVE_UNISTD_H before including
9353 <unistd.h>.
9354 * gdbreplay.c: Likewise.
9355 * remote-utils.c: Likewise.
9356 * server.c: Likewise.
9357 * configure.ac: Don't check for unistd.h.
9358 * configure: Regenerate.
9359
d6c2da54
TT
93602013-06-28 Tom Tromey <tromey@redhat.com>
9361
9362 * Makefile.in (version.c): Use version.in, not
9363 common/version.in.
9364
257b6bec
MG
93652013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9366
9367 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9368 * configure: Rebuild.
9369 * Makefile.in (version_host, version_target): Get from configure.
9370 (version.c): Use $(version_host) and $(version_target).
9371
86ebe149
DK
93722013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9373
9374 Fix trace-status to output user name without trailing colon.
9375 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9376
f30aa5af
DK
93772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9378
9379 Fix trace-status to output proper start-time and stop-time.
9380 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9381 output start time and stop time in hex as gdb expects.
9382
28a93511
YQ
93832013-06-26 Pedro Alves <pedro@codesourcery.com>
9384
9385 * tracepoint.c (build_traceframe_info_xml): Output trace state
9386 variables present in the trace buffer.
9387
01208463
TT
93882013-06-24 Tom Tromey <tromey@redhat.com>
9389
9390 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9391 create-version.sh.
9392 (version.o): Remove.
9393 * gdbreplay.c: Include version.h.
9394 (version, host_name): Don't declare.
9395 * server.h: Include version.h.
9396 (version, host_name): Don't declare.
9397
760256f9
PA
93982013-06-12 Pedro Alves <palves@redhat.com>
9399
9400 * linux-x86-low.c (linux_is_elf64): Delete global.
9401 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9402 with local linux_pid_exe_is_elf_64_file use.
9403
030031ee
PA
94042013-06-11 Pedro Alves <palves@redhat.com>
9405
9406 * linux-low.c (regset_disabled, disable_regset): New functions.
9407 (regsets_fetch_inferior_registers)
9408 (regsets_store_inferior_registers): Use them.
9409 (initialize_regsets_info); Don't allocate the disabled_regsets
9410 array here.
9411 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9412 comment.
9413
5da6eb0a
PA
94142013-06-11 Pedro Alves <palves@redhat.com>
9415
9416 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9417 xmalloc.
9418
7e5aaa09
PA
94192013-06-11 Pedro Alves <palves@redhat.com>
9420
9421 * linux-x86-low.c (initialize_low_arch): Call
9422 init_registers_x32_avx_linux.
9423
d878444c
JK
94242013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9425
9426 Fix compatibility with Android Bionic.
9427 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9428 it is not empty.
9429
3aee8918
PA
94302013-06-07 Pedro Alves <palves@redhat.com>
9431
5f2b57b5 9432 PR server/14823
3aee8918
PA
9433 * Makefile.in (OBS): Add tdesc.o.
9434 (IPA_OBJS): Add tdesc-ipa.o.
9435 (tdesc-ipa.o): New rule.
9436 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9437 interface.
9438 * linux-low.c (new_inferior): Delete.
9439 (disabled_regsets, num_regsets): Delete.
9440 (linux_add_process): Adjust to set the new per-process
9441 new_inferior flag.
9442 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9443 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9444 was a stop. When calling arch_setup, switch the current inferior
9445 to the thread that got an event.
9446 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9447 (regsets_fetch_inferior_registers)
9448 (regsets_store_inferior_registers): New regsets_info parameter.
9449 Adjust to use it.
9450 (linux_register_in_regsets): New regs_info parameter. Adjust to
9451 use it.
9452 (register_addr, fetch_register, store_register): New usrregs_info
9453 parameter. Adjust to use it.
9454 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9455 parameter regs_info. Adjust to use it.
9456 (linux_fetch_registers): Get the current inferior's regs_info, and
9457 adjust to use it.
9458 (linux_store_registers): Ditto.
9459 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9460 (initialize_low): Don't initialize the target_regsets here. Call
9461 initialize_low_arch.
9462 * linux-low.h (target_regsets): Delete declaration.
9463 (struct regsets_info): New.
9464 (struct usrregs_info): New.
9465 (struct regs_info): New.
9466 (struct process_info_private) <new_inferior>: New field.
9467 (struct linux_target_ops): Delete the num_regs, regmap, and
9468 regset_bitmap fields. New field regs_info.
9469 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9470 * i387-fp.c (num_xmm_registers): Delete.
9471 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9472 calls to new interface.
9473 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9474 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9475 Infer the number of xmm registers from the regcache's target
9476 description.
9477 * i387-fp.h (num_xmm_registers): Delete.
9478 * inferiors.c (add_thread): Don't install the thread's regcache
9479 here.
9480 * proc-service.c (gregset_info): Fetch the current inferior's
9481 regs_info. Adjust to use it.
9482 * regcache.c: Include tdesc.h.
9483 (register_bytes, reg_defs, num_registers)
9484 (gdbserver_expedite_regs): Delete.
9485 (get_thread_regcache): If the thread doesn't have a regcache yet,
9486 create one, instead of aborting gdbserver.
9487 (regcache_invalidate_one): Rename to ...
9488 (regcache_invalidate_thread): ... this.
9489 (regcache_invalidate_one): New.
9490 (regcache_invalidate): Only invalidate registers of the current
9491 process.
9492 (init_register_cache): Add target_desc parameter, and use it.
9493 (new_register_cache): Ditto. Assert the target description has a
9494 non zero registers_size.
9495 (regcache_cpy): Add assertions. Adjust.
9496 (realloc_register_cache, set_register_cache): Delete.
9497 (registers_to_string, registers_from_string): Adjust.
9498 (find_register_by_name, find_regno, find_register_by_number)
9499 (register_cache_size): Add target_desc parameter, and use it.
9500 (free_register_cache_thread, free_register_cache_thread_one)
9501 (regcache_release, register_cache_size): New.
9502 (register_size): Add target_desc parameter, and use it.
9503 (register_data, supply_register, supply_register_zeroed)
9504 (supply_regblock, supply_register_by_name, collect_register)
9505 (collect_register_as_string, collect_register_by_name): Adjust.
9506 * regcache.h (struct target_desc): Forward declare.
9507 (struct regcache) <tdesc>: New field.
9508 (init_register_cache, new_register_cache): Add target_desc
9509 parameter.
9510 (regcache_invalidate_thread): Declare.
9511 (regcache_invalidate_one): Delete declaration.
9512 (regcache_release): Declare.
9513 (find_register_by_number, register_cache_size, register_size)
9514 (find_regno): Add target_desc parameter.
9515 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9516 declarations.
9517 * remote-utils.c: Include tdesc.h.
9518 (outreg, prepare_resume_reply): Adjust.
9519 * server.c: Include tdesc.h.
9520 (gdbserver_xmltarget): Delete declaration.
9521 (get_features_xml, process_serial_event): Adjust.
9522 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9523 declare.
9524 (struct process_info) <tdesc>: New field.
9525 (ipa_tdesc): Declare.
9526 * tdesc.c: New file.
9527 * tdesc.h: New file.
9528 * tracepoint.c: Include tdesc.h.
9529 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9530 (get_context_regcache): Adjust to pass ipa_tdesc down.
9531 (do_action_at_tracepoint): Adjust to get the register cache size
9532 from the context regcache's description.
9533 (traceframe_walk_blocks): Adjust to get the register cache size
9534 from the current trace frame's description.
9535 (traceframe_get_pc): Adjust to get current trace frame's
9536 description and pass it down.
9537 (gdb_collect): Adjust to get the register cache size from the
9538 IPA's description.
9539 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9540 (gdbserver_xmltarget): Delete.
9541 (initialize_low_tracepoint): Set the ipa's target description.
9542 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9543 (initialize_low_tracepoint): Set the ipa's target description.
9544 * linux-x86-low.c: Include tdesc.h.
9545 [__x86_64__] (is_64bit_tdesc): New.
9546 (ps_get_thread_area, x86_get_thread_area): Use it.
9547 (i386_cannot_store_register): Rename to ...
9548 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9549 (i386_cannot_fetch_register): Rename to ...
9550 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9551 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9552 to new interface.
9553 (target_regsets): Rename to ...
9554 (x86_regsets): ... this.
9555 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9556 interface.
9557 (x86_siginfo_fixup): Use is_64bit_tdesc.
9558 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9559 (tdesc_x32_avx_linux, tdesc_x32_linux)
9560 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9561 Declare.
9562 (x86_linux_update_xmltarget): Delete.
9563 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9564 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9565 (AMD64_LINUX_USER64_CS): New.
9566 (x86_linux_read_description): New, based on
9567 x86_linux_update_xmltarget.
9568 (same_process_callback): New.
9569 (x86_arch_setup_process_callback): New.
9570 (x86_linux_update_xmltarget): New.
9571 (x86_regsets_info): New.
9572 (amd64_linux_regs_info): New.
9573 (i386_linux_usrregs_info): New.
9574 (i386_linux_regs_info): New.
9575 (x86_linux_regs_info): New.
9576 (x86_arch_setup): Reimplement.
9577 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9578 (x86_emit_ops): Ditto.
9579 (the_low_target): Adjust. Install x86_linux_regs_info,
9580 x86_cannot_fetch_register, and x86_cannot_store_register.
9581 (initialize_low_arch): New.
9582 * linux-ia64-low.c (tdesc_ia64): Declare.
9583 (ia64_fetch_register): Adjust.
9584 (ia64_usrregs_info, regs_info): New globals.
9585 (ia64_regs_info): New function.
9586 (the_low_target): Adjust.
9587 (initialize_low_arch): New function.
9588 * linux-sparc-low.c (tdesc_sparc64): Declare.
9589 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9590 Adjust.
9591 (sparc_arch_setup): New function.
9592 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9593 (the_low_target): Adjust.
9594 (initialize_low_arch): New function.
9595 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9596 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9597 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9598 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9599 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9600 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9601 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9602 (tdesc_powerpc_isa205_vsx64l): Declare.
9603 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9604 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9605 (ppc_set_pc, ppc_get_hwcap): Adjust.
9606 (ppc_usrregs_info): Forward declare.
9607 (!__powerpc64__) ppc_regmap_adjusted: New global.
9608 (ppc_arch_setup): Adjust to the current process'es target
9609 description.
9610 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9611 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9612 (ppc_store_evrregset): Adjust.
9613 (target_regsets): Rename to ...
9614 (ppc_regsets): ... this, and make static.
9615 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9616 (ppc_regs_info): New function.
9617 (the_low_target): Adjust.
9618 (initialize_low_arch): New function.
9619 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9620 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9621 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9622 (tdesc_s390x_linux64v2): Declare.
9623 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9624 (s390_fill_gregset, s390_store_last_break): Adjust.
9625 (target_regsets): Rename to ...
9626 (s390_regsets): ... this, and make static.
9627 (s390_get_pc, s390_set_pc): Adjust.
9628 (s390_get_hwcap): New target_desc parameter, and use it.
9629 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9630 (s390_arch_setup): Adjust to set the current process'es target
9631 description. Don't adjust the regmap.
9632 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9633 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9634 (regs_info_3264): New globals.
9635 (s390_regs_info): New function.
9636 (the_low_target): Adjust.
9637 (initialize_low_arch): New function.
9638 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9639 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9640 [__mips64] (init_registers_mips_linux)
9641 (init_registers_mips_dsp_linux): Delete defines.
9642 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9643 (have_dsp): New global.
9644 (mips_read_description): New, based on mips_arch_setup.
9645 (mips_arch_setup): Reimplement.
9646 (get_usrregs_info): New function.
9647 (mips_cannot_fetch_register, mips_cannot_store_register)
9648 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9649 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9650 (target_regsets): Rename to ...
9651 (mips_regsets): ... this, and make static.
9652 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9653 (dsp_regs_info, regs_info): New globals.
9654 (mips_regs_info): New function.
9655 (the_low_target): Adjust.
9656 (initialize_low_arch): New function.
9657 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9658 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9659 Declare.
9660 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9661 (arm_read_description): New, with bits factored from
9662 arm_arch_setup.
9663 (arm_arch_setup): Reimplement.
9664 (target_regsets): Rename to ...
9665 (arm_regsets): ... this, and make static.
9666 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9667 (arm_regs_info): New function.
9668 (the_low_target): Adjust.
9669 (initialize_low_arch): New function.
9670 * linux-m68k-low.c (tdesc_m68k): Declare.
9671 (target_regsets): Rename to ...
9672 (m68k_regsets): ... this, and make static.
9673 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9674 (m68k_regs_info): New function.
9675 (m68k_arch_setup): New function.
9676 (the_low_target): Adjust.
9677 (initialize_low_arch): New function.
9678 * linux-sh-low.c (tdesc_sharch): Declare.
9679 (target_regsets): Rename to ...
9680 (sh_regsets): ... this, and make static.
9681 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9682 (sh_regs_info, sh_arch_setup): New functions.
9683 (the_low_target): Adjust.
9684 (initialize_low_arch): New function.
9685 * linux-bfin-low.c (tdesc_bfin): Declare.
9686 (bfin_arch_setup): New function.
9687 (bfin_usrregs_info, regs_info): New globals.
9688 (bfin_regs_info): New function.
9689 (the_low_target): Adjust.
9690 (initialize_low_arch): New function.
9691 * linux-cris-low.c (tdesc_cris): Declare.
9692 (cris_arch_setup): New function.
9693 (cris_usrregs_info, regs_info): New globals.
9694 (cris_regs_info): New function.
9695 (the_low_target): Adjust.
9696 (initialize_low_arch): New function.
9697 * linux-cris-low.c (tdesc_crisv32): Declare.
9698 (cris_arch_setup): New function.
9699 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9700 (cris_regs_info): New function.
9701 (the_low_target): Adjust.
9702 (initialize_low_arch): New function.
9703 * linux-m32r-low.c (tdesc_m32r): Declare.
9704 (m32r_arch_setup): New function.
9705 (m32r_usrregs_info, regs_info): New globals.
9706 (m32r_regs_info): Adjust.
9707 (initialize_low_arch): New function.
9708 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9709 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9710 (tic6x_usrregs_info): Forward declare.
9711 (tic6x_read_description): New function, based on ...
9712 (tic6x_arch_setup): ... this. Reimplement.
9713 (target_regsets): Rename to ...
9714 (tic6x_regsets): ... this, and make static.
9715 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9716 (tic6x_regs_info): New function.
9717 (the_low_target): Adjust.
9718 (initialize_low_arch): New function.
9719 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9720 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9721 (target_regsets): Rename to ...
9722 (xtensa_regsets): ... this, and make static.
9723 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9724 globals.
9725 (xtensa_arch_setup, xtensa_regs_info): New functions.
9726 (the_low_target): Adjust.
9727 (initialize_low_arch): New function.
9728 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9729 (nios2_arch_setup): Set the current process'es tdesc.
9730 (target_regsets): Rename to ...
9731 (nios2_regsets): ... this.
9732 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9733 (nios2_regs_info): New function.
9734 (the_low_target): Adjust.
9735 (initialize_low_arch): New function.
a261b8f5
PA
9736 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9737 (aarch64_arch_setup): Set the current process'es tdesc.
9738 (target_regsets): Rename to ...
9739 (aarch64_regsets): ... this.
9740 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9741 (aarch64_regs_info): New function.
9742 (the_low_target): Adjust.
9743 (initialize_low_arch): New function.
3aee8918
PA
9744 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9745 globals.
9746 (target_regsets): Rename to ...
9747 (tile_regsets): ... this.
9748 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9749 (tile_regs_info): New function.
9750 (tile_arch_setup): Set the current process'es tdesc.
9751 (the_low_target): Adjust.
9752 (initialize_low_arch): New function.
9753 * spu-low.c (tdesc_spu): Declare.
9754 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9755 * win32-arm-low.c (tdesc_arm): Declare.
9756 (arm_arch_setup): New function.
9757 (the_low_target): Install arm_arch_setup instead of
9758 init_registers_arm.
9759 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9760 (init_windows_x86): Rename to ...
9761 (i386_arch_setup): ... this. Set `win32_tdesc'.
9762 (the_low_target): Adjust.
9763 * win32-low.c (win32_tdesc): New global.
9764 (child_add_thread): Don't create the thread cache here.
9765 (do_initial_child_stuff): Set the new process'es tdesc.
9766 * win32-low.h (struct target_desc): Forward declare.
9767 (win32_tdesc): Declare.
9768 * lynx-i386-low.c (tdesc_i386): Declare global.
9769 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9770 * lynx-low.c (lynx_tdesc): New global.
9771 (lynx_add_process): Set the new process'es tdesc.
9772 * lynx-low.h (struct target_desc): Forward declare.
9773 (lynx_tdesc): Declare global.
9774 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9775 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9776 * nto-low.c (nto_tdesc): New global.
9777 (do_attach): Set the new process'es tdesc.
9778 * nto-low.h (struct target_desc): Forward declare.
9779 (nto_tdesc): Declare.
9780 * nto-x86-low.c (tdesc_i386): Declare.
9781 (nto_x86_arch_setup): Set `nto_tdesc'.
9782
b1fbec62
GB
97832013-06-04 Gary Benson <gbenson@redhat.com>
9784
9785 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9786 to qSupported response when appropriate.
9787 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9788 with nonzero-length annex.
9789 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9790 arguments supplied in annex.
9791
d1ec4ce7
DE
97922013-05-31 Doug Evans <dje@google.com>
9793
ac44adcb 9794 PR server/15594
d1ec4ce7
DE
9795 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9796 64 bits in 64-cross-32 environment.
9797
9b25f2d3
PA
97982013-05-28 Pedro Alves <palves@redhat.com>
9799
9800 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9801 (aarch64-without-fpu.c): Delete rule.
9802 * configure.srv (aarch64*-*-linux*): Remove references to
9803 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9804 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9805 declaration.
9806
6740dc9c
PA
98072013-05-24 Pedro Alves <palves@redhat.com>
9808
9809 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9810 instead of strchr/decode_address. Error if the range isn't split
9811 with a ','. Don't assume there's be a ':' in the action.
9812
c2d6af84
PA
98132013-05-23 Yao Qi <yao@codesourcery.com>
9814 Pedro Alves <palves@redhat.com>
9815
9816 * linux-low.c (lwp_in_step_range): New function.
9817 (linux_wait_1): If the thread was range stepping and stopped
9818 outside the stepping range, report the stop to GDB. Otherwise,
9819 continue stepping. Add range stepping debug output.
9820 (linux_set_resume_request): Copy the step range from the resume
9821 request to the lwp.
9822 (linux_supports_range_stepping): New.
9823 (linux_target_ops) <supports_range_stepping>: Set to
9824 linux_supports_range_stepping.
9825 * linux-low.h (struct linux_target_ops)
9826 <supports_range_stepping>: New field.
9827 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9828 * linux-x86-low.c (x86_supports_range_stepping): New.
9829 (the_low_target) <supports_range_stepping>: Set to
9830 x86_supports_range_stepping.
9831 * server.c (handle_v_cont): Handle 'r' action.
9832 (handle_v_requests): Append ";r" if the target supports range
9833 stepping.
9834 * target.h (struct thread_resume) <step_range_start,
9835 step_range_end>: New fields.
9836 (struct target_ops) <supports_range_stepping>:
9837 New field.
9838 (target_supports_range_stepping): New macro.
9839
58794e1a
JB
98402013-05-17 Joel Brobecker <brobecker@adacore.com>
9841
9842 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9843 confusion in comment.
9844
d631c5a7
JB
98452013-05-17 Joel Brobecker <brobecker@adacore.com>
9846
9847 * lynx-low.c (struct process_info_private): New type.
9848 (lynx_add_process): New function.
9849 (lynx_create_inferior, lynx_attach): Replace calls to
9850 add_process by calls to lynx_add_process.
9851 (lynx_resume): If PTID is null, then try using
9852 current_process()->private->last_wait_event_ptid.
9853 Add comments.
9854 (lynx_clear_inferiors): Delete. The contents of that function
9855 has been inlined in lynx_mourn;
9856 (lynx_wait_1): Save the ptid in the process's private data.
9857 (lynx_mourn): Free the process' private data. Replace call
9858 to lynx_clear_inferiors by call to clear_inferiors.
9859
96f7a20f
YQ
98602013-05-17 Yao Qi <yao@codesourcery.com>
9861
9862 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9863 the right place.
9864
db0dfaa0
LM
98652013-05-16 Luis Machado <lgustavo@codesourcery.com>
9866
9867 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9868 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9869 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9870 PT_TEXT_END_ADDR guards. Update comments.
9871 (linux_target_op) <read_offsets>: Conditionally define to
9872 linux_read_offsets if the target is UCLIBC and if it defines
9873 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9874
68f5f838
SL
98752013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9876 Andrew Jenner <andrew@codesourcery.com>
9877
9878 * Makefile.in (SFILES): Add linux-nios2-low.c.
9879 (clean): Add action to delete nios2-linux.c.
9880 (nios2-linux.c): New rule.
9881 * configure.srv: Add nios2*-*-linux*.
9882 * linux-nios2-low.c: New.
9883
1ebff1fd
HAQ
98842013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9885
9886 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9887
f6150862
HZ
98882013-04-25 Hui Zhu <hui@codesourcery.com>
9889
9890 PR gdb/15186
f6150862
HZ
9891 * ax.c (ax_printf): Add fflush.
9892
614c279d
TT
98932013-04-22 Tom Tromey <tromey@redhat.com>
9894
9895 * Makefile.in (SFILES): Add filestuff.c.
9896 (OBS): Add filestuff.o.
9897 (filestuff.o): New target.
9898 * config.in, configure: Rebuild.
9899 * configure.ac: Check for fdwalk, pipe2.
9900
7d4e5717
PA
99012013-04-17 Pedro Alves <palves@redhat.com>
9902
9903 * configure.ac (USE_THREAD_DB): Delete variable.
9904 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9905 Don't AC_SUBST USE_THREAD_DB.
9906 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9907 * config.in, configure: Regenerate.
9908
d5c93e41
PA
99092013-04-16 Pedro Alves <palves@redhat.com>
9910
9911 * linux-low.h (struct lwp_info) <thread_known>: Move under
9912 the USE_THREAD_DB #ifdef.
9913
04f5fe89
PA
99142013-04-16 Pedro Alves <palves@redhat.com>
9915
9916 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9917 (linux-low.o): Delete rule.
9918 * linux-low.h: Always include "gdb_thread_db.h" instead of
9919 conditionally including thread_db.h.
9920 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9921 HAVE_THREAD_DB_H.
9922
480b27bf
JK
99232013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9924
9925 * Makefile.in (install-only): Fix make install regression.
9926
43662968
JK
99272013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9928
9929 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9930 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9931 installation.
9932 * gdbserver.1: Remove.
9933
3e74e146
PA
99342013-03-22 Pedro Alves <palves@redhat.com>
9935
9936 * linux-low.c (handle_extended_wait): Don't call
9937 linux_enable_event_reporting.
9938
a8347a2a
TT
99392013-03-15 Tony Theodore <tonyt@logyst.com>
9940
9941 PR build/9098:
9942 * Makefile.in (SHELL): Use @SHELL@.
9943
eeb56fa7
SDJ
99442013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9945
9946 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9947 compiler warning.
9948
4fa7e2ff
JB
99492013-03-13 Joel Brobecker <brobecker@adacore.com>
9950
9951 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9952 Remove extraneous NULL element.
9953
8ddb1965
YQ
99542013-03-13 Yao Qi <yao@codesourcery.com>
9955
9956 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9957 'V' block in trace frame.
9958
9accd112
MM
99592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9960
9961 * target.h (struct target_ops): Add btrace ops.
9962 (target_supports_btrace): New macro.
9963 (target_enable_btrace): New macro.
9964 (target_disable_btrace): New macro.
9965 (target_read_btrace): New macro.
9966 * gdbthread.h (struct thread_info): Add btrace field.
9967 * server.c: Include btrace-common.h.
9968 (handle_btrace_general_set): New function.
9969 (handle_btrace_enable): New function.
9970 (handle_btrace_disable): New function.
9971 (handle_general_set): Call handle_btrace_general_set.
9972 (handle_qxfer_btrace): New function.
9973 (struct qxfer qxfer_packets[]): Add btrace entry.
9974 * inferiors.c (remove_thread): Disable btrace.
9975 * linux-low: Include linux-btrace.h.
9976 (linux_low_enable_btrace): New function.
9977 (linux_low_read_btrace): New function.
9978 (linux_target_ops): Add btrace ops.
9979 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9980 Add srv_linux_btrace=yes.
9981 (x86_64-*-linux*): Add linux-btrace.o.
9982 Add srv_linux_btrace=yes.
9983 * configure.ac: Define HAVE_LINUX_BTRACE.
9984 * config.in: Regenerated.
9985 * configure: Regenerated.
9986
5cc22e4c
MM
99872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9988
9989 * server.c (handle_qxfer): Preserve error message if -3 is
9990 returned.
9991 (qxfer): Document the -3 return value.
9992
7c97f91e
MM
99932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9994
9995 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9996 (linux_btrace_h): New variable.
9997 (linux-btrace.o): New rule.
9998
be9a119c 99992013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10000 Hafiz Abid Qadeer <abidh@codesourcery.com>
10001
10002 * tracepoint.c (trace_buffer_size): New global.
10003 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10004 (init_trace_buffer): Change to one-argument function. Allocate
10005 trace buffer memory.
10006 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10007 handle QTBuffer:size packet.
10008 (cmd_bigqtbuffer_size): New function.
10009 (initialize_tracepoint): Call init_trace_buffer with
10010 DEFAULT_TRACE_BUFFER_SIZE.
10011 * server.c (handle_query): Add QTBuffer:size in the
10012 supported packets.
10013
e64f7499
YQ
100142013-03-07 Yao Qi <yao@codesourcery.com>
10015
10016 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10017 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10018 of -1.
10019 (cmd_qtsp): Adjust condition. Do post increment.
10020 Set cur_action and cur_step_action back to 0.
10021
f0ae6fc3
PA
100222013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10023
10024 PR server/15236
10025 * linux-low.c (linux_write_memory): Return early success if LEN is
10026 zero.
10027
b5b0b0af
CV
100282013-03-05 Corinna Vinschen <vinschen@redhat.de>
10029
334ad4a8 10030 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10031
589bc927
TT
100322013-02-28 Tom Tromey <tromey@redhat.com>
10033
10034 * configure.ac: Invoke AC_SYS_LARGEFILE.
10035 * configure, config.in: Rebuild.
10036
dfe07582
CV
100372013-02-28 Corinna Vinschen <vinschen@redhat.com>
10038
10039 * win32-low.c: Throughout, fix format strings and casts of
10040 printf-like functions to avoid type related warnings on all
10041 platforms.
10042 (get_child_debug_event): Print dwDebugEventCode as hex since
10043 that's how it's usually documented.
10044
736cd585
YQ
100452013-02-28 Yao Qi <yao@codesourcery.com>
10046
10047 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10048 pulongest.
10049
e1f58301
JW
100502013-02-27 Jiong Wang <jiwang@tilera.com>
10051
10052 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10053 (reg-tilegx32.c): New rule.
10054 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10055 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10056 different register info initializer according to elf class.
10057 (init_registers_tilgx32): New function. The tilegx32 register info
10058 initializer.
10059 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10060 (tile_store_gregset): Likewise.
10061
d171ca78
YQ
100622013-02-27 Yao Qi <yao@codesourcery.com>
10063
10064 * server.c (process_point_options): Print debug message when
10065 debug_threads is true.
10066
282bbdf3
YQ
100672013-02-26 Yao Qi <yao@codesourcery.com>
10068
10069 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10070
aca22551
PA
100712013-02-19 Pedro Alves <palves@redhat.com>
10072 Kai Tietz <ktietz@redhat.com>
10073
10074 PR gdb/15161
10075
10076 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10077 instead of strtoul to extract address from packet.
10078 (process_serial_event) <'z'>: Likewise.
10079
4f3cee1c
YQ
100802013-02-18 Yao Qi <yao@codesourcery.com>
10081
10082 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10083
8e1d55a3
PA
100842013-02-14 Pedro Alves <palves@redhat.com>
10085
10086 Plug memory leak.
10087
10088 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10089 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10090
458820da
PA
100912013-02-14 Pedro Alves <palves@redhat.com>
10092
10093 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10094
baea0dae
PA
100952013-02-14 Pedro Alves <palves@redhat.com>
10096
10097 * tracepoint.c (save_string): Delete.
10098 (add_tracepoint_action): Use savestring instead of save_string.
10099
0b1afbb3
PA
101002013-02-12 Pedro Alves <palves@redhat.com>
10101
10102 * linux-xtensa-low.c: Ditto.
10103 * xtensa-xtregs.c: Ditto.
10104
8a4ac37e
PA
101052013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10106
10107 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10108 thread_db.
10109
148de6bb
MS
101102013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10111
10112 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10113 aarch64_num_wp_regs and aarch64_num_bp_regs to
10114 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10115
55fac6e0
MS
101162013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10117
10118 * linux-aarch64-low.c (ps_get_thread_area): Replace
10119 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10120
176eb98c
MS
101212013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10122 Marcus Shawcroft <marcus.shawcroft@arm.com>
10123 Nigel Stephens <nigel.stephens@arm.com>
10124 Yufeng Zhang <yufeng.zhang@arm.com>
10125
10126 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10127 (aarch64.c, aarch64-without-fpu.c): New targets.
10128 * configure.srv (aarch64*-*-linux*): New.
10129 * linux-aarch64-low.c: New file.
10130
56f7af9c
MS
101312013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10132
43aaf8b6 10133 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10134 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10135 (dequeue_one_deferred_signal, linux_resume_one_thread)
10136 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10137 (linux_tracefork_grandchild, linux_test_for_tracefork)
10138 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10139 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10140 where the argument is 0.
10141
60f662b0
YQ
101422013-01-25 Yao Qi <yao@codesourcery.com>
10143
10144 * event-loop.c: Include "queue.h".
10145 (gdb_event_p): New typedef.
10146 (struct gdb_event) <next_event>: Remove.
10147 (event_queue): Change to QUEUE(gdb_event_p).
10148 (async_queue_event): Remove.
10149 (gdb_event_xfree): New.
10150 (initialize_event_loop): New.
10151 (process_event): Use API from QUEUE.
10152 (wait_for_event): Likewise.
10153 * server.c (main): Call initialize_event_loop.
10154 * server.h (initialize_event_loop): Declare.
10155
5ae4861a
YQ
101562013-01-18 Yao Qi <yao@codesourcery.com>
10157
10158 * ax.h (struct eval_agent_expr_context): New.
10159 (gdb_eval_agent_expr): Update declaration.
10160 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10161 TFRAME. Add new argument CTX.
10162 * server.h (struct eval_agent_expr_context): Declare.
10163 (agent_mem_read, agent_tsv_read): Update declaration.
10164 (agent_mem_read_string): Likewise.
10165 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10166 (add_traceframe_block): Add new argument TPOINT.
10167 Increase TPOINT->traceframe_usage.
10168 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10169 eval_tracepoint_agent_expr.
10170 (condition_true_at_tracepoint): Likewise.
10171 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10172 (agent_mem_read_string, agent_tsv_read): Likewise.
10173
85e00e85
YQ
101742013-01-16 Yao Qi <yao@codesourcery.com>
10175
10176 * linux-low.c (linux_resume_one_lwp): Don't check
10177 'lwp->bp_reinsert != 0'.
10178
4039cf45
JB
101792013-01-07 Joel Brobecker <brobecker@adacore.com>
10180 Pedro Alves <palves@redhat.com>
10181
10182 * lynx-low.c (ptrace_request_to_str): Define a temporary
10183 macro and use it to simplify this function's implementation.
10184
9044dee2
JB
101852013-01-07 Joel Brobecker <brobecker@adacore.com>
10186
10187 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10188 sets errno.
10189
e6352c8f
JB
101902013-01-07 Joel Brobecker <brobecker@adacore.com>
10191
10192 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10193
50681a27
JB
101942013-01-07 Joel Brobecker <brobecker@adacore.com>
10195
10196 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10197
3f6e77ef
JB
101982013-01-07 Joel Brobecker <brobecker@adacore.com>
10199
10200 * lynx-low.c (lynx_resume): Use the resume_info parameter
10201 to determine the ptid for the lynx_ptrace call, unless
10202 it is equal to minus_one_ptid, in which case we use the
10203 ptid of the current_inferior.
10204 (lynx_wait_1): After having received a thread create/exit
10205 event, resume the inferior's execution using the signaling
10206 thread's ptid, rather than the old ptid.
10207
7fda33ae
JB
102082013-01-07 Joel Brobecker <brobecker@adacore.com>
10209
10210 * lynx-low.c (lynx_resume): Delete variable ret.
10211
b9786c74
JB
102122013-01-01 Joel Brobecker <brobecker@adacore.com>
10213
10214 * gdbreplay.c (gdbreplay_version): Update copyright year.
10215 * server.c (gdbserver_version): Likewise.
10216
8b93d60f
JB
102172012-12-17 Joel Brobecker <brobecker@adacore.com>
10218
10219 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10220 new thread.
10221
037335a7
JB
102222012-12-17 Joel Brobecker <brobecker@adacore.com>
10223
10224 * lynx-low.c (ptrace_request_to_str): Add handling for
10225 PTRACE_GETTRACESIG.
10226
52d4cbd8
JB
102272012-12-17 Joel Brobecker <brobecker@adacore.com>
10228
10229 * lynx-low.c (lynx_attach): Delete variable new_process.
10230
ab8f6ca9
JB
102312012-12-17 Joel Brobecker <brobecker@adacore.com>
10232
10233 * lynx-low.c (lynx_create_inferior): Delete variable
10234 new_process.
10235
78cbc024
JB
102362012-12-17 Joel Brobecker <brobecker@adacore.com>
10237
10238 * lynx-low.c (ptrace_request_to_str): Do not handle
10239 PTRACE_GETTHREADLIST if this macro does not exist.
10240
14a00470
YQ
102412012-12-15 Yao Qi <yao@codesourcery.com>
10242
10243 * Makefile.in (OBS): Add notif.o.
10244 * notif.c, notif.h: New.
10245 * server.c: Include "notif.h".
10246 (struct vstop_notif) <next>: Remove.
10247 <base>: New field.
10248 (queue_stop_reply): Update.
10249 (push_event, send_next_stop_reply): Remove.
10250 (discard_queued_stop_replies): Update.
10251 (notif_stop): New variable.
10252 (handle_v_stopped): Remove.
10253 (handle_v_requests): Don't call handle_v_stopped. Call
10254 handle_ack_notif instead.
10255 (queue_stop_reply_callback): Call notif_event_enque instead
10256 of queue_stop_reply.
10257 (handle_status): Don't call send_next_stop_reply, call
10258 notif_write_event instead.
10259 (kill_inferior_callback): Likewise.
10260 (detach_or_kill_inferior_callback): Likewise.
10261 (main): Call initialize_notif.
10262 (process_serial_event): Call QUEUE_is_empty.
10263 (handle_target_event): Call notif_push instead of push event.
10264 * server.h (push_event): Remove declaration.
10265
61c125b9
TT
102662012-12-10 Tom Tromey <tromey@redhat.com>
10267
10268 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10269 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10270 macros.
10271 (.c.o): Rewrite.
10272 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10273 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10274 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10275 (amd64-linux-ipa.o, ax.o): Rewrite.
10276 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10277 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10278 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10279 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10280 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10281 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10282 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10283 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10284 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10285 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10286 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10287 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10288 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10289 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10290 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10291 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10292 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10293 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10294 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10295 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10296 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10297 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10298 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10299 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10300 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10301 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10302 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10303 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10304 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10305 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10306 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10307 (reg-tilegx.o): Remove.
10308 (all_object_files): New macro.
10309 Include .deps files.
10310 * aclocal.m4, configure: Rebuild.
10311 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10312 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10313 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10314
e90e9ad9
TT
103152012-12-05 Tom Tromey <tromey@redhat.com>
10316
10317 PR gdb/14917:
10318 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10319
02d403bf 103202012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10321
10322 * configure.ac: Check for linux/perf_event.h.
10323 * config.in: Regenerated.
10324 * configure: Regenerated.
10325
0270a750
PA
103262012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10327
10328 * hostio.c (handle_readlink): Decrease buffer size
10329 parameter passed to readlink by one byte.
10330
8c29b58e
YQ
103312012-11-26 Yao Qi <yao@codesourcery.com>
10332
10333 * configure.ac (build_warnings): Append '-Wempty-body'.
10334 * configure: Regenerated.
10335 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10336 body.
10337
8bdce1ff
PM
103382012-11-15 Pierre Muller <muller@sourceware.org>
10339
10340 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10341 * config.in: Regenerate.
10342 * configure: Regenerate.
10343 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10344 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10345 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10346 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10347 header.
10348 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10349 instead of <sys/wait.h> header.
10350 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10351
02d403bf 103522012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10353
10354 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10355 (various make rules): Remove -DGDBSERVER
10356
fbd5db48
YQ
103572012-11-09 Yao Qi <yao@codesourcery.com>
10358
10359 * spu-low.c (current_ptid): Move it to ..
10360 * gdbthread.h: ... here. New.
10361 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10362 * server.c (myresume, process_serial_event): Likewise.
10363 * thread-db.c (thread_db_find_new_threads): Likewise.
10364 * tracepoint.c (run_inferior_command): Likewise.
10365
b3dc46ff
AB
103662012-10-01 Andrew Burgess <aburgess@broadcom.com>
10367
10368 * server.c (handle_search_memory_1): Include access length in
10369 warning message.
10370
07c04788
HPN
103712012-09-05 Michael Brandt <michael.brandt@axis.com>
10372
10373 * linux-crisv32-low.c: Fix compile errors.
10374
918d227b
YQ
103752012-09-04 Yao Qi <yao@codesourcery.com>
10376
10377 * tracepoint.c (cmd_qtsv): Adjust debug message.
10378 Don't check CUR_TPOINT.
10379
18c1b81a
YQ
103802012-08-28 Yao Qi <yao@codesourcery.com>
10381
10382 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10383 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10384 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10385 Remove declarations of xmalloc, xreallloc, xstrdup and
10386 freeargv.
10387 * Makefile.in (libiberty_h): New.
10388 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10389 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10390
dc82f37b
YQ
103912012-08-23 Yao Qi <yao@codesourcery.com>
10392
10393 * server.h: Remove declaration of 'xsnprintf'.
10394
406b1477
KS
103952012-08-22 Keith Seitz <keiths@redhat.com>
10396
10397 * server.h: Include build-gnulib-gbserver/config.h.
10398 * gdbreplay.c: Likewise.
10399
e6712ff1
DE
104002012-08-08 Doug Evans <dje@google.com>
10401
10402 * Makefile.in (SFILES): Add gdb_vecs.c.
10403 (OBS): Add gdb_vecs.o.
10404 (gdb_vecs_h, host_defs_h): New variables.
10405 (thread-db.o): Add $(gdb_vecs_h) dependency.
10406 (gdb_vecs.o): New rule.
10407 * thread-db.c: #include "gdb_vecs.h".
10408 (thread_db_load_search): Use a vector to iterate over path elements.
10409 Handle text appearing after "$pdir".
10410
10411 * configure.ac: Add check for strstr.
10412 * config.in: Regenerate.
10413 * configure: Regenerate.
10414
7c3270ae
UW
104152012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10416
10417 * hostio.c (handle_pread): If pread fails, fall back to attempting
10418 lseek/read.
10419 (handle_pwrite): Likewise for pwrite.
10420
b62e2b27
UW
104212012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10422
10423 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10424 between unsupported TYPE and unimplementable ADDR/LEN combination.
10425 (arm_insert_point): Act on new return value.
10426
78a99e91
PA
104272012-07-31 Pedro Alves <palves@redhat.com>
10428
10429 * server.c (process_point_options): Only skip tokens if we find
10430 one that is unrecognized. Don't treat 'X' specially while
10431 skipping unrecognized tokens.
10432
fcf303ab
UW
104332012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10434
10435 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10436 to 4-byte-align HW breakpoint addresses for Thumb.
10437
7255706c
YQ
104382012-07-27 Yao Qi <yao@codesourcery.com>
10439
10440 PR remote/14161.
10441
10442 * server.h: Declare gdb_agent_about_to_close.
10443 * target.c (kill_inferior): Include "agent.h".
10444 New. Send command 'kill'.
10445 * target.h (kill_inferior): Removed macro.
10446 * tracepoint.c (gdb_agent_about_to_close): New.
10447 (gdb_agent_helper_thread): Handle command 'close'.
10448 Wait endlessly until the inferior stops.
10449 Install gdb_agent_remove_socket to atexit hook.
10450 (agent_socket_name): New static variable.
10451 (gdb_agent_socket_init): Replace local variable 'name' with
10452 'agent_socket_name'.
10453 (gdb_agent_remove_socket): New.
10454
5a3f286f
YQ
104552012-07-27 Yao Qi <yao@codesourcery.com>
10456
10457 * server.c (process_point_options): Stop at 'X' when parsing.
10458
961bd387
ME
104592012-07-19 Michael Eager <eager@eagercon.com>
10460
a261b8f5 10461 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10462 to hw_execute.
10463 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10464 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10465 hardware breakpoint.
10466
aa7c7447
JK
104672012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10468
10469 * gdbserver/linux-low.c (initialize_low): Call
10470 linux_ptrace_init_warnings.
10471
7f216e7c
DE
104722012-07-02 Doug Evans <dje@google.com>
10473
10474 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10475 pointer to int.
10476
d3ce09f5
SS
104772012-07-02 Stan Shebs <stan@codesourcery.com>
10478
10479 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10480 (ax.o): Add it to build rule.
10481 (ax-ipa.o): Ditto.
10482 (OBS): Add format.o.
10483 (IPA_OBS): Add format.o.
10484 * server.c (handle_query): Claim support for breakpoint commands.
10485 (process_point_options): Add command case.
10486 (process_serial_event): Leave running if there are printfs in
10487 effect.
10488 * mem-break.h (any_persistent_commands): Declare.
10489 (add_breakpoint_commands): Declare.
10490 (gdb_no_commands_at_breakpoint): Declare.
10491 (run_breakpoint_commands): Declare.
10492 * mem-break.c (struct point_command_list): New struct.
10493 (struct breakpoint): New field command_list.
10494 (any_persistent_commands): New function.
10495 (add_commands_to_breakpoint): New function.
10496 (add_breakpoint_commands): New function.
10497 (gdb_no_commands_at_breakpoint): New function.
10498 (run_breakpoint_commands): New function.
10499 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10500 locally.
10501 * ax.c: Include format.h.
10502 (ax_printf): New function.
10503 (gdb_eval_agent_expr): Add printf opcode.
10504
2f8f6aed
YQ
105052012-06-13 Yao Qi <yao@codesourcery.com>
10506
10507 * server.c (start_inferior): Remove duplicated writes to fields
10508 'last_resume_kind' and 'last_status' of 'current_inferior'.
10509
0c9070b3
YQ
105102012-06-12 Yao Qi <yao@codesourcery.com>
10511 Pedro Alves <palves@redhat.com>
10512
10513 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10514 comment.
10515 * server.c (handle_v_cont): Extend comment.
10516
c52daf70
YQ
105172012-06-11 Yao Qi <yao@codesourcery.com>
10518
10519 * linux-low.c (linux_attach): Add 'static'.
10520
d38bbb0a
YQ
105212012-06-06 Yao Qi <yao@codesourcery.com>
10522
10523 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10524
89dc0afd
JK
105252012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10526
10527 Fix gcc -flto compilation warning.
10528 * server.c (main): Make variable multi_mode and attach volatile.
10529
75f62ce7
TJB
105302012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10531
10532 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10533 if the platform doesn't know about it.
10534
65f479b6
PA
105352012-05-30 Jeff Kenton <jkenton@tilera.com>
10536
10537 * Makefile.in (SFILES): Add linux-tile-low.c.
10538 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10539 * configure.srv: Handle tilegx-*-linux*.
10540 * linux-tile-low.c: New file.
10541
0c5bf5a9
JK
105422012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10543
10544 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10545
a493e3e2
PA
105462012-05-24 Pedro Alves <palves@redhat.com>
10547
10548 PR gdb/7205
10549
43aaf8b6 10550 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10551
2ea28649
PA
105522012-05-24 Pedro Alves <palves@redhat.com>
10553
10554 PR gdb/7205
10555
10556 Replace target_signal with gdb_signal throughout.
10557
8d409d16
MR
105582012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10559
10560 * linux-low.c (linux_store_registers): Avoid the copying sequence
10561 when no data has been retrieved by ptrace.
10562
23512c01
MGD
105632012-05-22 Will Deacon <will.deacon@arm.com>
10564
10565 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10566 Include asm/ptrace.h.
10567 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10568 already defined.
10569
4934b29e
MR
105702012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10571
10572 * linux-low.c (linux_store_registers): Don't re-retrieve data
10573 with ptrace that has already been obtained from /proc. Always
10574 copy any data retrieved with ptrace to the buffer supplied.
10575
bde24c0a
PA
105762012-05-11 Yao Qi <yao@codesourcery.com>
10577 Pedro Alves <palves@redhat.com>
10578
10579 * linux-low.c (enum stopping_threads_kind): New.
10580 (stopping_threads): Change type to `enum stopping_threads_kind'.
10581 (handle_extended_wait): If stopping and suspending threads, leave
10582 the new_lwp suspended too.
10583 (linux_wait_for_event): Adjust.
10584 (stop_all_lwps): Set `stopping_threads' to
10585 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10586 whether we're suspending threads or just stopping them. Assert no
10587 recursion happens.
10588
623b6bdf
YQ
105892012-04-29 Yao Qi <yao@codesourcery.com>
10590
10591 * server.h: Move some code to ...
10592 * gdbthread.h: ... here. New.
10593 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10594 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10595 (nto-low.o, win32-low.o): Likewise.
10596 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10597 * regcache.c, remote-utils.c, server.c: Likewise.
10598 * target.c, tracepoint.c, win32-low.c: Likewise.
10599
f15f9948
TJB
106002012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10601
10602 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10603 (PTRACE_ARG4_TYPE): Likewise.
10604 (PTRACE_XFER_TYPE): Likewise.
10605 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10606 ptrace to PTRACE_ARG3_TYPE.
10607 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10608 (PTRACE_ARG4_TYPE): Likewise.
10609 (PTRACE_XFER_TYPE): Likewise.
10610 (linux_detach_one_lwp): Cast fourth argument of
10611 ptrace to long then PTRACE_ARG4_TYPE.
10612 (regsets_fetch_inferior_registers): Cast third argument of
10613 ptrace to long then PTRACE_ARG3_TYPE.
10614 (regsets_store_inferior_registers): Likewise.
10615
38ea300a
PA
106162012-04-20 Pedro Alves <palves@redhat.com>
10617
10618 * configure: Regenerate.
10619
c971b7fa
PA
106202012-04-19 Pedro Alves <palves@redhat.com>
10621
43aaf8b6 10622 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10623 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10624 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10625 (all, install-only, uninstall, clean-info, all-lib, clean): No
10626 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10627 (maintainer-clean realclean distclean): Use subdir_do.
10628 (subdir_do): New.
10629 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10630 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10631 * acinclude.m4: Include acx_configure_dir.m4.
10632 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10633 calls. Call AC_PROG_RANLIB. Configure gnulib using
10634 ACX_CONFIGURE_DIR.
10635 (GNULIB): New.
10636 (GNULIB_STDINT_H): Adjust.
10637 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10638 * gdbreplay.c: Include build-gnulib/config.h.
10639 * server.h: Likewise.
10640 * aclocal.m4: Regenerate.
10641 * config.in: Regenerate.
10642 * configure: Regenerate.
c971b7fa 10643
809277f8
PA
106442012-04-19 Pedro Alves <palves@redhat.com>
10645
10646 * Makefile.in (LIBGNU, INCGNU): Adjust.
10647 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10648 (all, install-only, uninstall, clean-info, all-lib, clean)
10649 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10650 * configure.ac: Adjust AC_OUTPUT output.
10651 * aclocal.m4: Regenerate.
10652 * configure: Regenerate.
10653
fd9bb8b8
PA
106542012-04-19 Pedro Alves <palves@redhat.com>
10655
10656 * Makefile.in (generated_files): New.
10657 (server_h): Remove the explicit dependency on config.h, and depend
10658 on $generated_files.
10659
1c298c66
PA
106602012-04-19 Pedro Alves <palves@redhat.com>
10661
10662 * Makefile.in (INCGNU): Add -Ignulib.
10663
57c4b50b
PA
106642012-04-19 Pedro Alves <palves@redhat.com>
10665
10666 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10667 (INCGNU): ... this, and spell out -I here.
10668 (GNULIB_LIB): Rename to ...
10669 (LIBGNU): ... this.
10670 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10671
1030e047
PA
106722012-04-19 Pedro Alves <palves@redhat.com>
10673
10674 * config.in: Regenerate.
10675
447d4319
PA
106762012-04-19 Pedro Alves <palves@redhat.com>
10677
10678 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10679 * server.h (memmem): Remove declaration.
10680 * config.in: Regenerate.
10681 * configure: Regenerate.
10682
aad9eab9
YQ
106832012-04-19 Yao Qi <yao@codesourcery.com>
10684
10685 * Makefile.in (SFILES): Add common/vec.c.
10686 (OBS): Add vec.o.
10687 (vec.o): New rule.
10688
3e10640f
YQ
106892012-04-19 Yao Qi <yao@codesourcery.com>
10690
10691 * remote-utils.c (prepare_resume_reply): Replace with macro
10692 target_core_of_thread.
10693 * server.c (handle_qxfer_threads_proper): Likewise.
10694 * target.h (traget_core_of_thread): New macro.
10695
71622373
PA
106962012-04-18 Pedro Alves <palves@redhat.com>
10697
10698 * aclocal.m4: Regenerate.
10699 * configure: Regenerate.
10700
80d26939
YQ
107012012-04-16 Yao Qi <yao@codesourcery.com>
10702
10703 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10704 duplicated on address.
10705
42476b70
YQ
107062012-04-16 Yao Qi <yao@codesourcery.com>
10707
10708 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10709 (struct tracepoint_action_ops) <send>: New field.
10710 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10711 (agent_expr_send, x_tracepoint_action_send): New.
10712 (l_tracepoint_action_send): New.
10713 (cmd_qtdp): Download and install tracepoint
10714 according to `use_agent'.
10715 (run_inferior_command): Add one more parameter `len'.
10716 Update callers.
10717 (tracepoint_send_agent): New.
10718 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10719
7bc83639
YQ
107202012-04-16 Yao Qi <yao@codesourcery.com>
10721
10722 * tracepoint.c (download_tracepoints): Moved to ...
10723 (cmd_qtstart): ... here.
10724
5f18041e
YQ
107252012-04-14 Yao Qi <yao@codesourcery.com>
10726
10727 * tracepoint.c: Include inttypes.h.
10728 (struct collect_memory_action): Use sized types.
10729 (struct tracepoint): Likewise.
10730 (cmd_qtdp, stop_tracing): Update print specifiers.
10731 (cmd_qtp, response_tracepoint): Likewise.
10732 (collect_data_at_tracepoint): Likewise.
10733 (collect_data_at_step): Likewise.
10734
55a8c076
YQ
107352012-04-14 Yao Qi <yao@codesourcery.com>
10736
10737 Import gnulib module inttypes.
10738 * aclocal.m4, config.in, configure: Regenerated.
10739
dc750257
YQ
107402012-04-14 Yao Qi <yao@codesourcery.com>
10741
10742 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10743 Makefile and config.status at last.
10744
0ab5faf9
YQ
107452012-04-13 Yao Qi <yao@codesourcery.com>
10746
10747 * tracepoint.c: Include stdint.h unconditionally.
10748
18f5fd81
TJB
107492012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10750
10751 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10752 on BFD_HAVE_SYS_PROCFS_TYPE.
10753 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10754 * configure: Regenerate.
10755 * config.in: Likewise.
10756
4d47af5c
L
107572012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10758
10759 * Makefile.in (clean): Also remove x32.c x32-linux.c
10760 x32-avx.c x32-avx-linux.c.
10761 (x32.o): New target.
10762 (x32.c): Likewise.
10763 (x32-linux.o): Likewise.
10764 (x32-linux.c): Likewise.
10765 (x32-avx.o): Likewise.
10766 (x32-avx.c): Likewise.
10767 (x32-avx-linux.o): Likewise.
10768 (x32-avx-linux.c): Likewise.
10769
10770 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10771 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10772 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10773 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10774 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10775 i386/x32-avx-linux.xml.
10776
10777 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10778 (init_registers_x32_avx_linux): Likwise.
10779 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10780 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10781
ecedbe58
PA
107822012-04-13 Pedro Alves <palves@redhat.com>
10783
10784 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10785 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10786 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10787 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10788 the sub-make.
10789
c92b5177
L
107902012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10791
10792 * linux-x86-low.c (compat_x32_clock_t): New.
10793 (compat_x32_siginfo_t): Likewise.
10794 (compat_x32_siginfo_from_siginfo): Likewise.
10795 (siginfo_from_compat_x32_siginfo): Likewise.
10796 (linux_is_elf64): Likewise.
10797 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10798 and siginfo_from_compat_x32_siginfo for x32.
10799 (x86_arch_setup): Set linux_is_elf64.
10800
214d508e
L
108012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10802
10803 PR gdb/13969
10804 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10805 e_machine field.
10806 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10807 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10808 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10809 compatible with process.
10810
c9a1864a
YQ
108112012-04-12 Yao Qi <yao@codesourcery.com>
10812
10813 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10814 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10815 (install-only, install-info, clean): Handle sub dir gnulib.
10816 (all-lib, am--refresh): New targets.
10817 (memmem.o): Remove target.
10818 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10819 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10820 (AC_REPLACE_FUNCS): Remove memmem.
10821 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10822 (AC_OUTPUT): Generate Makefile in gnulib/.
10823 * aclocal.m4, config.in, configure: Regenerated.
10824
367ba2c2
MR
108252012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10826
10827 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10828
9d236627
PA
108292012-04-05 Pedro Alves <palves@redhat.com>
10830
10831 -Werror=strict-aliasing
10832
10833 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10834 pointer.
10835
111217b3
PA
108362012-04-04 Pedro Alves <palves@redhat.com>
10837
10838 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10839 (sparc_store_gregset_from_stack, sparc_store_gregset)
10840 (sparc_breakpoint_at): Fix formatting.
10841
8365dcf5
TJB
108422012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10843
10844 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10845 are available.
10846 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10847 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10848 * config.in: Regenerate.
10849 * configure: Likewise.
10850
689cc2ae
PA
108512012-03-29 Pedro Alves <palves@redhat.com>
10852
10853 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10854 Correct ptrace arguments.
10855
c14dfd32
PA
108562012-03-28 Pedro Alves <palves@redhat.com>
10857
10858 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10859 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10860 (IA64_FR1_REGNUM): New defines.
10861 (ia64_fetch_register): New.
10862 (the_low_target): Install it.
10863 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10864 field.
10865 * linux-low.c (linux_fetch_registers): Try the
10866 the_low_target.fetch_register hook first.
10867
10868 * linux-arm-low.c (the_low_target): Adjust.
10869 * linux-bfin-low.c (the_low_target): Adjust.
10870 * linux-cris-low.c (the_low_target): Adjust.
10871 * linux-crisv32-low.c (the_low_target): Adjust.
10872 * linux-m32r-low.c (the_low_target): Adjust.
10873 * linux-m68k-low.c (the_low_target): Adjust.
10874 * linux-mips-low.c (the_low_target): Adjust.
10875 * linux-ppc-low.c (the_low_target): Adjust.
10876 * linux-s390-low.c (the_low_target): Adjust.
10877 * linux-sh-low.c (the_low_target): Adjust.
10878 * linux-sparc-low.c (the_low_target): Adjust.
10879 * linux-tic6x-low.c (the_low_target): Adjust.
10880 * linux-x86-low.c (the_low_target): Adjust.
10881 * linux-xtensa-low.c (the_low_target): Adjust.
10882
63c88e13
PA
108832012-03-26 Pedro Alves <palves@redhat.com>
10884
10885 * server.c (handle_qxfer_libraries): Don't bail early if
10886 the_target->qxfer_libraries_svr4 is not NULL.
10887
fb723180
PA
108882012-03-26 Pedro Alves <palves@redhat.com>
10889
10890 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10891
0afae3cf
PA
108922012-03-23 Pedro Alves <palves@redhat.com>
10893
10894 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10895 "library-list-svr4" element's start tag when the the DSO list is
10896 empty.
10897
485f1ee4
PA
108982012-03-23 Pedro Alves <palves@redhat.com>
10899
10900 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10901 a variable whose type size is the same as the inferior's pointer
10902 size.
10903
a5362b9a
TS
109042012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10905
10906 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10907 struct siginfo.
10908 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10909 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10910 * linux-low.h: Include <signal.h>.
10911 (struct siginfo): Remove forward declaration.
10912 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10913 struct siginfo.
10914
d226c142
MF
109152012-03-21 Mike Frysinger <vapier@gentoo.org>
10916
10917 * .gitignore: Ignore more files.
10918
122f36ef
PA
109192012-03-19 Pedro Alves <palves@redhat.com>
10920 Jan Kratochvil <jan.kratochvil@redhat.com>
10921
10922 * server.c (cont_thread, general_thread): Add describing comments.
10923 (start_inferior): Clear `cont_thread'.
10924 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10925 of a process.
10926
fc3e5175
YQ
109272012-03-15 Yao Qi <yao@codesourcery.com>
10928
10929 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10930 handling to ...
10931 (cmd_qtdp): ... here.
10932
8d0d92cd
YQ
109332012-03-15 Yao Qi <yao@codesourcery.com>
10934
10935 * tracepoint.c (struct tracepoint_action_ops): New.
10936 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10937 (m_tracepoint_action_download): New.
10938 (r_tracepoint_action_download): New.
10939 (x_tracepoint_action_download): New.
10940 (l_tracepoint_action_download): New.
10941 (add_tracepoint_action): Install `action->ops' according type.
10942 (download_tracepoint_1): Move code `download' function pointer
10943 of various tracepoint_action_ops.
10944
87b0bb13
JK
109452012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10946
10947 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10948 linux_ptrace_attach_warnings.
10949
5f572dec
JK
109502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10951
10952 * Makefile.in (linux-ptrace.o): New.
10953 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10954 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10955 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10956 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10957 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10958 of these targets.
10959 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10960
f4647387
YQ
109612012-03-08 Yao Qi <yao@codesourcery.com>
10962 Pedro Alves <palves@redhat.com>
10963
10964 Fix PR server/13392.
10965 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10966 offset of JMP insn.
10967 * tracepoint.c (remove_tracepoint): New.
10968 (cmd_qtdp): Call remove_tracepoint when failed to install.
10969
9b224c5e
PA
109702012-03-07 Pedro Alves <palves@redhat.com>
10971
10972 * linux-low.c (get_detach_signal): New.
10973 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10974 Pass on pending signals to PTRACE_DETACH. Check the result of the
10975 ptrace call.
10976 * server.c (program_signals, program_signals_p): New.
10977 (handle_general_set): Handle QProgramSignals.
10978 * server.h (program_signals, program_signals_p): Declare.
10979
e237a7e2
JK
109802012-03-05 Pedro Alves <palves@redhat.com>
10981 Jan Kratochvil <jan.kratochvil@redhat.com>
10982
10983 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10984 New comment why.
10985
5808517f
YQ
109862012-03-03 Yao Qi <yao@codesourcery.com>
10987
10988 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10989 agent_look_up_symbols.
10990
58b4daa5
YQ
109912012-03-03 Yao Qi <yao@codesourcery.com>
10992
10993 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10994 (linux-x86-low.o): Likewise.
10995 * server.h: Remove in_process_agent_loaded.
10996 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10997 common/agent.c.
10998 Update callers.
10999
8ffcbaaf
YQ
110002012-03-03 Yao Qi <yao@codesourcery.com>
11001
11002 * tracepoint.c (gdb_agent_capability): New global.
11003 (in_process_agent_loaded_ust): Renamed to
11004 `in_process_agent_supports_ust'.
11005 Update callers.
11006 (in_process_agent_supports_ust): Call agent_capability_check.
11007 (clear_installed_tracepoints): Assert that agent supports
11008 agent.
11009
d1feda86
YQ
110102012-03-03 Yao Qi <yao@codesourcery.com>
11011
11012 * linux-low.c (linux_supports_agent): New.
11013 (linux_target_ops): Initialize field `supports_agent' with
11014 linux_supports_agent.
11015 * target.h (struct target_ops) <supports_agent>: New.
11016 (target_supports_agent): New macro.
11017 * server.c (handle_general_set): Handle packet 'QAgent'.
11018 (handle_query): Send `QAgent+'.
11019 * Makefile.in (server.o): Depends on agent.h.
11020
2fa291ac
YQ
110212012-03-03 Yao Qi <yao@codesourcery.com>
11022
11023 * Makefile.in (OBS): Add agent.o.
11024 Add new rule for agent.o.
11025 Track dependence of tracepoint.c on agent.h.
11026 * tracepoint.c (run_inferior_command_1):
11027 (run_inferior_command): Call agent_run_command.
11028 (gdb_ust_connect_sync_socket): Deleted. Move it to
11029 common/agent.c.
11030 (resume_thread, stop_thread): Likewise.
11031 (gdb_ust_socket_init): Renamed to ...
11032 (gdb_agent_socket_init): ... New.
11033 (gdb_ust_thread): Renamed to ...
11034 (gdb_agent_helper_thread): ... New.
11035 (gdb_ust_init): Move some code to ...
11036 (gdb_agent_init): ... here. New.
11037 [HAVE_UST]: Call gdb_ust_init.
11038 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11039 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11040 * config.in, configure: Regenerated.
11041
05044653
PA
110422012-03-02 Pedro Alves <palves@redhat.com>
11043
11044 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11045 * linux-low.c (struct simple_pid_list): New.
11046 (stopped_pids): New a struct simple_pid_list pointer.
11047 (add_to_pid_list, pull_pid_from_list): New.
11048 (handle_extended_wait): Don't assume the first signal new children
11049 report is SIGSTOP. Adjust call to pull_pid_from_list.
11050 (linux_wait_for_lwp): Adjust.
11051
8d00225b
YQ
110522012-03-02 Yao Qi <yao@codesourcery.com>
11053
11054 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11055 debug log.
11056
19560ba5
YQ
110572012-03-02 Yao Qi <yao@codesourcery.com>
11058
11059 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11060 `stop_pc' and `tpoint'. Update caller.
11061
1faeff08
MR
110622012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11063
11064 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11065 * linux-low.c (use_linux_regsets): New macro.
11066 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11067 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11068 (linux_register_in_regsets): New function.
11069 (usr_fetch_inferior_registers): Skip registers covered by
11070 regsets.
11071 (usr_store_inferior_registers): Likewise.
11072 (usr_fetch_inferior_registers): New macro.
11073 (usr_store_inferior_registers): Likewise.
11074 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11075 (linux_store_registers): Likewise.
11076 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11077 prototype.
11078 (init_registers_mips64_dsp_linux): Likewise.
11079 (init_registers_mips_linux): New macro.
11080 (init_registers_mips_dsp_linux): Likewise.
11081 (mips_dsp_num_regs): Likewise.
11082 (DSP_BASE, DSP_CONTROL): New fallback macros.
11083 (mips_base_regs): New macro.
11084 (mips_regmap): Use it. Fix the size.
11085 (mips_dsp_regmap): New variable.
11086 (mips_dsp_regset_bitmap): Likewise.
11087 (mips_arch_setup): New function.
11088 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11089 than mips_regmap.
11090 (mips_cannot_store_register): Likewise.
11091 (the_low_target): Update .arch_setup, .num_regs and .regmap
11092 initializers. Add .regset_bitmap initializer.
11093 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11094 initializer.
11095 * linux-bfin-low.c (the_low_target): Likewise.
11096 * linux-cris-low.c (the_low_target): Likewise.
11097 * linux-crisv32-low.c (the_low_target): Likewise.
11098 * linux-ia64-low.c (the_low_target): Likewise.
11099 * linux-m32r-low.c (the_low_target): Likewise.
11100 * linux-m68k-low.c (the_low_target): Likewise.
11101 * linux-ppc-low.c (the_low_target): Likewise.
11102 * linux-s390-low.c (the_low_target): Likewise.
11103 * linux-sh-low.c (the_low_target): Likewise.
11104 * linux-sparc-low.c (the_low_target): Likewise.
11105 * linux-tic6x-low.c (the_low_target): Likewise.
11106 * linux-x86-low.c (the_low_target): Likewise.
11107 * linux-xtensa-low.c (the_low_target): Likewise.
11108 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11109 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11110 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11111 srv_xmlfiles.
11112 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11113 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11114
c03e6ccc
YQ
111152012-02-29 Yao Qi <yao@codesourcery.com>
11116 Pedro Alves <palves@redhat.com>
11117
11118 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11119 `step_over_finished' is true.
11120
644cebc9
PA
111212012-02-27 Pedro Alves <palves@redhat.com>
11122
11123 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11124 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11125
c14d7ab2
PA
111262012-02-27 Pedro Alves <palves@redhat.com>
11127
11128 PR server/9684
11129 * linux-low.c (pid_is_stopped): New.
11130 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11131
412c89dd
LM
111322012-02-25 Luis Machado <lgustavo@codesourcery.com>
11133
11134 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11135 of conditions.
11136
b745defe
MR
111372012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11138
11139 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11140
9f3a5c85
LM
111412012-02-24 Luis Machado <lgustavo@codesourcery>
11142
11143 * server.c (handle_query): Advertise support for target-side
11144 breakpoint condition evaluation.
11145 (process_point_options): New function.
11146 (process_serial_event): When inserting a breakpoint, check for
11147 a target-side condition that should be evaluated.
11148
11149 * mem-break.c: Include regcache.h and ax.h.
11150 (point_cond_list_t): New data structure.
11151 (breakpoint) <cond_list>: New field.
11152 (find_gdb_breakpoint_at): Make non-static.
11153 (delete_gdb_breakpoint_at): Clear any target-side
11154 conditions.
11155 (clear_gdb_breakpoint_conditions): New function.
11156 (add_condition_to_breakpoint): Likewise.
11157 (add_breakpoint_condition): Likewise.
11158 (gdb_condition_true_at_breakpoint): Likewise.
11159 (gdb_breakpoint_here): Return result directly instead
11160 of going through a local variable.
11161
11162 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11163 (clear_gdb_breakpoint_conditions): Likewise.
11164 (add_breakpoint_condition): Likewise.
11165 (gdb_condition_true_at_breakpoint): Likewise.
11166
11167 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11168 (need_step_over_p): Take target-side breakpoint condition into
11169 consideration.
11170
5e1dc496
LM
111712012-02-24 Luis Machado <lgustavo@codesourcery>
11172
11173 * server.h: Include tracepoint.h.
11174 (agent_mem_read, agent_get_trace_state_variable_value,
11175 agent_set_trace_state_variable_value,
11176 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11177 get_set_tsv_func_addr): New prototypes.
11178
11179 * ax.h: New include file.
11180 * ax.c: New source file.
11181
11182 * tracepoint.c: Include ax.h.
11183 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11184 agent_expr, eval_result_type): Move to ax.h.
11185 (parse_agent_expr): Rename to ...
11186 (gdb_parse_agent_expr): ... this, make it non-static and move
11187 to ax.h.
11188 (unparse_agent_expr) Rename to ...
11189 (gdb_unparse_agent_expr): ... this, make it non-static and move
11190 to ax.h.
11191 (eval_agent_expr): Rename to ...
11192 (eval_tracepoint_agent_expr): ... this.
11193 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11194 forward declarations.
11195 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11196 (agent_get_trace_state_variable_value): New function.
11197 (agent_set_trace_state_variable_value): New function.
11198 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11199 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11200 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11201 (condition_true_at_tracepoint): Likewise.
11202 (parse_agent_expr): Rename to ...
11203 (gdb_parse_agent_expr): ... this and move to ax.c.
11204 (unparse_agent_expr): Rename to ...
11205 (gdb_unparse_agent_expr): ... this and move to ax.c.
11206 (gdb_agent_op_name): Move to ax.c.
11207 (eval_agent_expr): Rename to ...
11208 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11209 and move to ax.c.
11210 (eval_tracepoint_agent_expr): New function.
11211 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11212 non-static.
5e1dc496
LM
11213 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11214 ax.c.
11215 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11216 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11217 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11218 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11219 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11220 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11221 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11222 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11223 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11224 (compile_bytecodes): Remove forward declaration.
11225 (is_goto_target): Move to ax.c.
11226 (compile_bytecodes): Move to ax.c and call
11227 agent_get_trace_state_variable_value (...) and
11228 agent_set_trace_state_variable_value (...).
11229
11230 * Makefile.in: Update ax.c and IPA dependencies.
11231
277e4e52
PA
112322012-02-24 Pedro Alves <palves@redhat.com>
11233
11234 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11235 (cmd_bigqtbuffer_circular): ... this. Only handle
11236 'QTBuffer:circular:'.
11237 (handle_tracepoint_general_set): Adjust.
11238
bf4c19f7
YQ
112392012-02-16 Yao Qi <yao@codesourcery.com>
11240
11241 * inferiors.c: Move code to ...
11242 * dll.c: .... here. New.
11243 * server.h: Declare clear_dlls.
11244 * Makefile.in (SFILES): Add dll.c.
11245 (OBS): Add dll.o
11246 (dll.o): New rule.
11247
d73f2619
YQ
112482012-02-11 Yao Qi <yao@codesourcery.com>
11249
11250 * server.c: (handle_monitor_command): Add a new parameter
11251 `own_buf'.
11252 (handle_query): Update caller.
11253
f8255c2a
JB
112542012-02-09 Joel Brobecker <brobecker@adacore.com>
11255
11256 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11257 * configure, config.in: Regenerate.
11258 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11259 is not defined.
11260
da84f473
PA
112612012-02-02 Pedro Alves <palves@redhat.com>
11262
11263 Try SIGKILL first, then PTRACE_KILL.
11264 * linux-low.c (linux_kill_one_lwp): New.
11265 (linux_kill_one_lwp): Rename to ...
11266 (kill_one_lwp_callback): ... this. Use the new
11267 linux_kill_one_lwp.
11268
e886a173
PA
112692012-02-02 Pedro Alves <palves@redhat.com>
11270
11271 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11272 inferior.
11273
be07f1a2
PA
112742012-01-27 Pedro Alves <palves@redhat.com>
11275
11276 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11277 (elf_64_file_p): Make static.
11278 (linux_pid_exe_is_elf_64_file): New.
11279 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11280 Delete declarations.
11281 (linux_pid_exe_is_elf_64_file): Declare.
11282 * linux-x86-low.c (x86_arch_setup): Use
11283 linux_pid_exe_is_elf_64_file.
11284
d8301ad1
JK
112852012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11286
11287 * linux-low.c (linux_wait_for_event_1): Rename to ...
11288 (linux_wait_for_event): ... here and merge it with former
11289 linux_wait_for_event - new variable wait_ptid, use it.
11290 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11291
01b17894
PA
112922012-01-23 Pedro Alves <palves@redhat.com>
11293
11294 * server.c (main): Avoid yet another case of infinite loop while
11295 detaching/killing after a longjmp.
11296
e825046f
JK
112972012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11298
11299 Code cleanup.
11300 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11301
b9e7b9c3
UW
113022012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11303
11304 * hostio.c (handle_readlink): New function.
11305 (handle_vFile): Call it to handle "vFile:readlink" packets.
11306
901f9912
UW
113072012-01-20 Pedro Alves <palves@redhat.com>
11308 Ulrich Weigand <ulrich.weigand@linaro.org>
11309
11310 * server.c (handle_v_requests): Only support vAttach and vRun to
11311 start multiple processes when in extended protocol mode.
11312
fc1ab1a0
PA
113132012-01-17 Pedro Alves <palves@redhat.com>
11314
11315 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11316 memalign plus mprotect to allocate the scratch buffer.
11317
7d5d4e98
PA
113182012-01-13 Pedro Alves <palves@redhat.com>
11319
11320 * server.c (attach_inferior): Clear `cont_thread'.
11321
f128d5e9
PA
113222012-01-13 Pedro Alves <palves@redhat.com>
11323
11324 * server.c (main): Avoid infinite loop while detaching/killing
11325 after a longjmp.
11326
06db92f0
DE
113272012-01-09 Doug Evans <dje@google.com>
11328
11329 * server.c (start_inferior): Set last_ptid in --wrapper case.
11330
32d92999
YQ
113312012-01-06 Yao Qi <yao@codesourcery.com>
11332
11333 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11334 defined.
11335 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11336
5e0a92a9
YQ
113372012-01-04 Yao Qi <yao@codesourcery.com>
11338
11339 * tracepoint.c (cmd_qtdp): Print debug message
11340 for static tracepoint.
11341
ae639e8c
YQ
113422012-01-04 Yao Qi <yao@codesourcery.com>
11343
11344 * tracepoint.c (trace_vdebug): Differentiate debug message
11345 between gdbserver and IPA.
11346
f72429c5
YQ
113472012-01-03 Yao Qi <yao@codesourcery.com>
11348
11349 * tracepoint.c (tracepoint_was_hit): Don't collect for
11350 static tracepoint.
11351
12c3e59c
JB
113522012-01-02 Joel Brobecker <brobecker@adacore.com>
11353
11354 * terminal.h: Reformat copyright header.
11355
67827812
JB
113562012-01-02 Joel Brobecker <brobecker@adacore.com>
11357
11358 * server.c (gdbserver_version): Update copyright year.
11359 * gdbreplay.c (gdbreplay_version): Likewise.
11360
3e52c33d
JK
113612011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11362
11363 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11364
11365 Revert:
11366 2011-12-18 Hui Zhu <teawater@gmail.com>
11367 * linux-low.c (linux_create_inferior): Save return value to ret.
11368
66f1260e
HZ
113692011-12-18 Hui Zhu <teawater@gmail.com>
11370
11371 * linux-low.c (linux_create_inferior): Save return value to ret.
11372
e77616d7
DE
113732011-12-16 Doug Evans <dje@google.com>
11374
e7b06c57
DE
11375 * linux-low.c (linux_create_inferior): If stdio connection,
11376 redirect stdin from /dev/null, stdout to stderr.
11377 * remote-utils.c (remote_is_stdio): New static global.
11378 (remote_connection_is_stdio): New function.
11379 (remote_prepare): Handle stdio connection.
11380 (remote_open): Ditto.
11381 (remote_close): Don't close stdin for stdio connections.
11382 (read_prim,write_prim): New functions. Replace all calls to
11383 read/write to these.
11384 * server.c (main): Watch for "-" argument. Move call to
11385 remote_prepare before start_inferior.
11386 * server.h (STDIO_CONNECTION_NAME): New macro.
11387 (remote_connection_is_stdio): Declare.
11388
e77616d7
DE
11389 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11390 in debugging output.
11391
82067193
YQ
113922011-12-15 Yao Qi <yao@codesourcery.com>
11393
11394 * tracepoint.c: Include sys/syscall.h.
11395 (gdb_ust_thread): Remove preprocessor conditional.
11396
82bfbe7e
PA
113972011-12-14 Pedro Alves <pedro@codesourcery.com>
11398
11399 * linux-low.c (linux_detach_one_lwp): Call
11400 the_low_target.prepare_to_resume before detaching.
11401
712c6575
YQ
114022011-12-14 Yao Qi <yao@codesourcery.com>
11403
11404 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11405 of write.
11406
d54d1edf
YQ
114072011-12-14 Yao Qi <yao@codesourcery.com>
11408
11409 * i386-low.c (i386_low_stopped_data_address): Initialize local
11410 variable `control'.
11411
6210a125
PA
114122011-12-13 Pedro Alves <pedro@codesourcery.com>
11413
11414 PR remote/13492
11415
11416 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11417 DR_CONTROL unless necessary. Extend comments.
11418 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11419 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11420
2ece8244
YQ
114212011-12-13 Yao Qi <yao@codesourcery.com>
11422
11423 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11424 macros.
11425 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11426
784867a5
JK
114272011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11428
11429 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11430 Print new debug message for such case.
11431
6bf36717
JK
114322011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11433
11434 Fix overlapping memcpy.
11435 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11436 the read_inferior_memory transfer.
11437 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11438 write_inferior_memory transfer.
11439 (set_fast_tracepoint_jump): New variable buf. Use it for the
11440 read_inferior_memory and write_inferior_memory transfers.
11441 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11442 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11443 Use it for the write_inferior_memory transfer.
11444 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11445 buffers.
11446
50275556
MR
114472011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11448
11449 * linux-low.c (fetch_register, store_register): Make code
11450 consistent, fix formatting.
11451
7325beb4
MR
114522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11453
11454 * linux-low.c (usr_store_inferior_registers): Factor out code
11455 to handle individual registers into...
11456 (store_register): ... this new function.
11457
c642a434
UW
114582011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11459
11460 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11461 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11462 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11463 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11464 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11465 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11466 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11467 (srv_xmlfiles): Add new XML files.
11468
11469 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11470 and <sys/uio.h>.
11471 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11472 (init_registers_s390_linux32v1): Add prototype.
11473 (init_registers_s390_linux32v2): Likewise.
11474 (init_registers_s390_linux64v1): Likewise.
11475 (init_registers_s390_linux64v2): Likewise.
11476 (init_registers_s390x_linux64v1): Likewise.
11477 (init_registers_s390x_linux64v2): Likewise.
11478 (s390_num_regs): Increment to 52.
11479 (s390_regmap): Add orig_r2 register.
11480 (s390_num_regs_3264): Increment to 68.
11481 (s390_regmap_3264): Add orig_r2 register.
11482 (s390_collect_ptrace_register): Handle orig_r2 register.
11483 (s390_supply_ptrace_register): Likewise.
11484 (s390_fill_last_break): New function.
11485 (s390_store_last_break): Likewise.
11486 (s390_fill_system_call): New function.
11487 (s390_store_system_call): Likewise.
11488 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11489 register sets.
11490 (s390_check_regset): New function.
11491 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11492 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11493 Update target_regsets for available register sets.
11494
2268b414
JK
114952011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11496 Jan Kratochvil <jan.kratochvil@redhat.com>
11497
11498 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11499 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11500 New.
11501 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11502 * linux-low.h (struct process_info_private): New member r_debug.
11503 * server.c (handle_qxfer_libraries): Call
11504 the_target->qxfer_libraries_svr4.
11505 (handle_qxfer_libraries_svr4): New function.
11506 (qxfer_packets): New entry "libraries-svr4".
11507 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11508 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11509 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11510 PACKET_qXfer_libraries_svr4.
11511
d6db1fab
UW
115122011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11513
11514 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11515 PSW address/mask between 8-byte and 16-byte formats.
11516 (s390_supply_ptrace_register): Likewise.
11517 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11518 basic addressing mode bit.
11519
242f5f1c
SS
115202011-11-24 Stan Shebs <stan@codesourcery.com>
11521
11522 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11523
f196051f
SS
115242011-11-17 Stan Shebs <stan@codesourcery.com>
11525
11526 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11527 (tracing_start_time): New global.
11528 (tracing_stop_time): New global.
11529 (tracing_user_name): New global.
11530 (tracing_notes): New global.
11531 (tracing_stop_note): New global.
11532 (cmd_qtstart): Set traceframe_usage, start_time.
11533 (stop_tracing): Set stop_time.
11534 (cmd_qtstatus): Report additional status.
11535 (cmd_qtp): New function.
11536 (handle_tracepoint_query): Call it.
11537 (cmd_qtnotes): New function.
11538 (handle_tracepoint_general_set): Call it.
11539 (get_timestamp): Rename from tsv_get_timestamp.
11540
405f8e94
SS
115412011-11-14 Stan Shebs <stan@codesourcery.com>
11542 Kwok Cheung Yeung <kcy@codesourcery.com>
11543
11544 * linux-x86-low.c (small_jump_insn): New.
11545 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11546 trampoline and error message, build a trampoline and issue a small
11547 jump instruction to it.
11548 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11549 trampoline and error message.
11550 (x86_get_min_fast_tracepoint_insn_len): New.
11551 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11552 * linux-low.h (struct linux_target_ops): Add arguments to
11553 install_fast_tracepoint_jump_pad operation, add new operation.
11554 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11555 arguments.
11556 (linux_get_min_fast_tracepoint_insn_len): New function.
11557 (linux_target_op): Add new operation.
11558 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11559 (gdb_trampoline_buffer_end): Ditto.
11560 (gdb_trampoline_buffer_error): Ditto.
11561 (struct ipa_sym_addresses): Add fields for new IPA variables.
11562 (symbol_list): Add entries for new IPA variables.
11563 (struct tracepoint): Add fields to hold the address range of the
11564 trampoline used by the tracepoint.
11565 (trampoline_buffer_head): New static variable.
11566 (trampoline_buffer_tail): Ditto.
11567 (claim_trampoline_space): New function.
11568 (have_fast_tracepoint_trampoline_buffer): New function.
11569 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11570 structure.
11571 (install_fast_tracepoint): Ditto, also add error buffer argument.
11572 (cmd_qtminftpilen): New function.
11573 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11574 (fast_tracepoint_from_trampoline_address): New function.
11575 (fast_tracepoint_collecting): Handle trampoline as part of jump
11576 pad space.
11577 (set_trampoline_buffer_space): New function.
11578 (initialize_tracepoint): Initialize new IPA variables.
11579 * target.h (struct target_ops): Add arguments to
11580 install_fast_tracepoint_jump_pad operation, add new
11581 get_min_fast_tracepoint_insn_len operation.
11582 (target_get_min_fast_tracepoint_insn_len): New.
11583 (install_fast_tracepoint_jump_pad): Add arguments.
11584 * server.h (IPA_BUFSIZ): Define.
11585 * linux-i386-ipa.c: Include extra header files.
11586 (initialize_fast_tracepoint_trampoline_buffer): New function.
11587 (initialize_low_tracepoint): Call it.
11588 * server.h (set_trampoline_buffer_space): Declare.
11589 (claim_trampoline_space): Ditto.
11590 (have_fast_tracepoint_trampoline_buffer): Ditto.
11591
1e4d1764
YQ
115922011-11-14 Yao Qi <yao@codesourcery.com>
11593
11594 * server.c (handle_query): Handle InstallInTrace for qSupported.
11595 * tracepoint.c (add_tracepoint): Sort list.
11596 (install_tracepoint, download_tracepoint): New.
11597 (cmd_qtdp): Call them to install and download tracepoints.
11598 (sort_tracepoints): Removed.
11599 (cmd_qtstart): Update.
11600
5c73ff4e
YQ
116012011-11-14 Yao Qi <yao@codesourcery.com>
11602
11603 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11604 * mem-break.h: Declare.
11605 * tracepoint.c (cmd_qtstart): Move some code to ...
11606 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11607 New.
11608 (download_tracepoints): Move some code to ...
11609 (download_tracepoint_1): ... here. New.
11610
86a30030
YQ
116112011-11-08 Yao Qi <yao@codesourcery.com>
11612
11613 * remote-utils.c (relocate_instruction): A comment fix.
11614
8d26e50c
JB
116152011-11-07 Joel Brobecker <brobecker@adacore.com>
11616
11617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11618 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11619 dr_status_mirror and dr_control_mirror from debug_reg_state.
11620 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11621 (i386_initial_stuff): Remove use of deleted globals.
11622 (i386_get_thread_context, i386_set_thread_context,
11623 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11624 from debug_reg_state.
11625
a59306a3
YQ
116262011-11-05 Yao Qi <yao@codesourcery.com>
11627
11628 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11629 address as TPOINT's.
11630
3065dfb6
SS
116312011-11-02 Stan Shebs <stan@codesourcery.com>
11632
11633 * tracepoint.c (agent_mem_read_string): New function.
11634 (eval_agent_expr): Call it for tracenz.
11635 * server.c (handle_query): Report support for tracenz.
11636
fd0d8c7c
YQ
116372011-11-02 Yao Qi <yao@codesourcery.com>
11638
11639 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11640
609086b1
YQ
116412011-11-02 Yao Qi <yao@codesourcery.com>
11642
11643 * target.h: Fix a typo in comment.
11644
b9fd1791
PA
116452011-10-31 Pedro Alves <pedro@codesourcery.com>
11646
11647 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11648 clobber the breakpoints' shadows with fast tracepoint jumps.
11649 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11650 * target.c (write_inferior_memory): Also pass MYADDR down to
11651 check_mem_write.
11652
03583c20
UW
116532011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11654
11655 * configure.ac: Check support for personality routine.
11656 * configure: Regenerate.
11657 * config.in: Likewise.
11658 * linux-low.c: Include <sys/personality.h>.
11659 Define ADDR_NO_RANDOMIZE if necessary.
11660 (linux_create_inferior): Disable address space randomization when
11661 forking inferior, if requested.
11662 (linux_supports_disable_randomization): New function.
11663 (linux_target_ops): Install it.
11664 * server.h (disable_randomization): Declare.
11665 * server.c (disable_randomization): New global variable.
11666 (handle_general_set): Handle QDisableRandomization.
11667 (handle_query): Likewise for qSupported.
11668 (main): Support --disable-randomization and --no-disable-randomization
11669 command line arguments.
11670 * target.h (struct target_ops): Add supports_disable_randomization.
11671 (target_supports_disable_randomization): New macro.
11672
723b724b
MF
116732011-09-29 Mike Frysinger <vapier@gentoo.org>
11674
11675 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11676 ifdef check.
11677 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11678 [!PT_GETDSBT] (target_loadmap): New definition.
11679 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11680 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11681 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11682 and PT_GETDSBT to LINUX_LOADMAP.
11683 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11684 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11685
55329a5c 116862011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11687
11688 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11689 (arm_linux_hwbp_cap): New static variable.
11690 (arm_linux_get_hwbp_cap): Replace by ...
11691 (arm_linux_init_hwbp_cap): ... this new function.
11692 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11693 (arm_linux_get_hw_watchpoint_count): Likewise.
11694 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11695 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11696 (arm_prepare_to_resume): Use perror_with_name instead of error.
11697
55329a5c 116982011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11699
11700 * linux-arm-low.c: Include <signal.h>.
11701 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11702 (struct arm_linux_hwbp_cap): New data type.
11703 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11704 (struct arm_linux_hw_breakpoint): New data type.
11705 (MAX_BPTS, MAX_WPTS): Define.
11706 (struct arch_process_info, struct arch_lwp_info): New data types.
11707 (arm_linux_get_hwbp_cap): New function.
11708 (arm_linux_get_hw_breakpoint_count): Likewise.
11709 (arm_linux_get_hw_watchpoint_count): Likewise.
11710 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11711 (arm_hwbp_control_initialize): Likewise.
11712 (arm_hwbp_control_is_enabled): Likewise.
11713 (arm_hwbp_control_is_initialized): Likewise.
11714 (arm_hwbp_control_disable): Likewise.
11715 (arm_linux_hw_breakpoint_equal): Likewise.
11716 (arm_linux_hw_point_initialize): Likewise.
11717 (struct update_registers_data): New data structure.
11718 (update_registers_callback: New function.
11719 (arm_insert_point): Likewise.
11720 (arm_remove_point): Likewise.
11721 (arm_stopped_by_watchpoint): Likewise.
11722 (arm_stopped_data_address): Likewise.
11723 (arm_new_process): Likewise.
11724 (arm_new_thread): Likewise.
11725 (arm_prepare_to_resume): Likewise.
11726 (the_low_target): Register arm_insert_point, arm_remove_point,
11727 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11728 arm_new_thread, and arm_prepare_to_resume.
11729
6b9801d4
SS
117302011-09-15 Stan Shebs <stan@codesourcery.com>
11731
11732 * server.h (struct emit_ops): Add compare-goto fields.
11733 * tracepoint.c (gdb_agent_op_sizes): New table.
11734 (emit_eq_goto): New function.
11735 (emit_ne_goto): New function.
11736 (emit_lt_goto): New function.
11737 (emit_le_goto): New function.
11738 (emit_gt_goto): New function.
11739 (emit_ge_goto): New function.
11740 (is_goto_target): New function.
11741 (compile_bytecodes): Recognize special cases of compare-goto
11742 combinations and call specialized emitters for them.
11743 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11744 (amd64_emit_ne_goto): New function.
11745 (amd64_emit_lt_goto): New function.
11746 (amd64_emit_le_goto): New function.
11747 (amd64_emit_gt_goto): New function.
11748 (amd64_emit_ge_goto): New function.
11749 (amd64_emit_ops): Add the new functions.
11750 (i386_emit_eq_goto): New function.
11751 (i386_emit_ne_goto): New function.
11752 (i386_emit_lt_goto): New function.
11753 (i386_emit_le_goto): New function.
11754 (i386_emit_gt_goto): New function.
11755 (i386_emit_ge_goto): New function.
11756 (i386_emit_ops): Add the new functions.
11757
bf15cbda
SS
117582011-09-08 Stan Shebs <stan@codesourcery.com>
11759
11760 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11761 (i386_emit_epilogue): Restore %ebx.
11762
943ca1dd
JZ
117632011-08-31 Jie Zhang <jzhang918@gmail.com>
11764
11765 * server.c (step_thread): Remove definition.
11766 (process_serial_event): Don't handle Hs.
11767 * server.h (step_thread): Remove declaration.
11768 * target.c (set_desired_inferior): Remove use of step_thread.
11769
e3deef73
LM
117702011-08-24 Luis Machado <lgustavo@codesourcery.com>
11771
11772 * linux-low.c: Include linux-procfs.h.
11773 (linux_attach_lwp_1): Update comments.
11774 (linux_attach): Scan for existing threads when attaching to a
11775 process that is the tgid.
11776 * Makefile.in: Update dependencies.
11777
13da1c97
LM
117782011-08-24 Luis Machado <lgustavo@codesourcery.com>
11779
11780 * configure.srv: Add linux-procfs.o dependencies.
11781
881127c9
YQ
117822011-08-14 Yao Qi <yao@codesourcery.com>
11783
11784 * target.h (struct target_ops): Fix indent.
11785 * win32-low.c (win32_target_ops): Fix comment.
11786
58dbd541
YQ
117872011-08-14 Andrew Jenner <andrew@codesourcery.com>
11788 Yao Qi <yao@codesourcery.com>
11789
11790 * Makefile.in (clean): Remove tic6x-*.c files.
11791 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11792 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11793 (tic6x-c64xp-linux.c): Likewise.
11794 * configure.srv: Add support for tic6x-*-uclinux.
11795 * linux-tic6x-low.c: New.
11796 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11797
78d85199
YQ
117982011-08-14 Andrew Stubbs <ams@codesourcery.com>
11799 Yao Qi <yao@codesourcery.com>
11800
11801 * target.h (struct target_ops): Add read_loadmap.
11802 * linux-low.c (struct target_loadseg): New type.
11803 (struct target_loadmap): New type.
11804 (linux_read_loadmap): New function.
11805 (linux_target_ops): Add linux_read_loadmap.
11806 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11807 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11808 to NULL.
78d85199 11809
a959a88d
EZ
118102011-08-05 Eli Zaretskii <eliz@gnu.org>
11811
11812 * win32-low.c: Include <stdint.h>.
11813
1ced966e
PA
118142011-07-22 Pedro Alves <pedro@codesourcery.com>
11815
11816 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11817 to the inferior here.
11818 (i386_remove_aligned_watchpoint): Ditto.
11819 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11820 fit part of the watchpoint in the debug registers.
11821 (i386_update_inferior_debug_regs): New.
11822 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11823 registers, and only update the inferior on success.
11824 (i386_low_remove_watchpoint): Ditto.
11825
d26e3629
KY
118262011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11827
11828 * linux-low.c (compare_ints, unique, list_threads, show_process,
11829 linux_core_of_thread): Delete.
11830 (linux_target_ops): Change linux_core_of_thread to
11831 linux_common_core_of_thread.
11832 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11833 * utils.c (malloc_failure): Change type of argument.
11834 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11835 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11836 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11837 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11838 (IPA_OBJS): Add common-utils-ipa.o.
11839 (ptid_h, linux_osdata_h): New macros.
11840 (server_h): Add common/common-utils.h, common/xml-utils.h,
11841 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11842 common/ptid.h.
11843 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11844 ptid.o, buffer.o): New rules.
11845 (linux-low.o): Add common/linux-osdata.h as a dependency.
11846 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11847 * configure.ac: Add AC_HEADER_DIRENT check.
11848 * config.in: Regenerate.
11849 * configure: Regenerate.
11850 * remote-utils.c (xml_escape_text): Delete.
11851 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11852 buffer_xml_printf): Move to common/buffer.c.
11853 * server.c (main): Remove call to initialize_inferiors.
11854 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11855 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11856 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11857 internal_error, gdb_assert, gdb_assert_fail): Delete.
11858 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11859 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11860 common/buffer.h.
11861 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11862 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11863 initialize_inferiors): Delete.
11864
2275a1a7
PA
118652011-07-20 Pedro Alves <pedro@codesourcery.com>
11866
11867 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11868 symbol error.
11869
0a5b1e09
PA
118702011-05-31 Pedro Alves <pedro@codesourcery.com>
11871
11872 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11873 assertion.
11874 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11875
6938fd34
YQ
118762011-05-26 Yao Qi <yao@codesourcery.com>
11877
11878 * Makefile.in (thread-db.o): Track dependence to
11879 common/gdb_thread_db.h.
11880 * thread-db.c: include gdb_thread_db.h from right place.
11881
b481f9e0
TT
118822011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11883
11884 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11885 __FILE__ and __LINE__ to internal_error.
11886
98a5dd13
DE
118872011-05-13 Doug Evans <dje@google.com>
11888
11889 * thread-db.c (try_thread_db_load_from_sdir): New function.
11890 (try_thread_db_load_from_dir): New function.
11891 (thread_db_load_search): Handle $sdir, ignore $pdir.
11892 Remove trying of system directories if search of
11893 libthread-db-search-path fails, that is now done via $sdir.
11894
d248b706
KY
118952011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11896
11897 * server.c (handle_query): Add EnableDisableTracepoints to the list
11898 of supported features.
43aaf8b6 11899 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11900 tracepoints.
43aaf8b6
PA
11901 (cmd_qtenable_disable): New.
11902 (cmd_qtstart): Install tracepoints even if disabled.
11903 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11904 receiving a QTEnable or QTDisable packet.
11905 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11906 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11907 tracepoints.
11908 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11909
84e578fb
DE
119102011-05-10 Doug Evans <dje@google.com>
11911
11912 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11913
71f55dd8
DE
119142011-05-04 Doug Evans <dje@google.com>
11915
11916 * linux-low.c (linux_join): Skip process lookup.
11917 * spu-low.c (spu_join): Ditto.
11918 * server.c (join_inferiors_callback): Delete.
11919 (process_serial_event): For 'D' packet (detach) call join_inferior
11920 directly.
11921
4d393d60
JM
119222011-05-04 Joseph Myers <joseph@codesourcery.com>
11923
11924 * README: Don't mention xscale*-*-linux*.
11925 * configure.srv (xscale*-*-linux*): Don't handle target.
11926
b00ad6ff
NF
119272011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11928
11929 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11930 casting pointers.
11931 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11932 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11933 (i386_emit_void_call_2): Likewise.
11934
af96c192
YQ
119352011-04-26 Yao Qi <yao@codesourcery.com>
11936
43aaf8b6
PA
11937 * linux-low.c: Move common macros to linux-ptrace.h.
11938 Include linux-ptrace.h.
af96c192
YQ
11939 * Makefile.in (linux_ptrace_h): New.
11940 (linux-low.o): Depends on linux-ptrace.h.
11941
03f2bd59
JK
119422011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11943
11944 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11945 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11946 (remote_prepare): New function with most of the TCP code from ...
11947 (remote_open): ... here. Detect PORT here unconditionally. Move also
11948 setting transport_is_reliable.
11949 * server.c (run_once): New variable.
11950 (gdbserver_usage): Document it.
11951 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11952 the first run if RUN_ONCE.
11953 * server.h (run_once, remote_prepare): New declarations.
11954
7a9dd1b2
TT
119552011-04-19 Tom Tromey <tromey@redhat.com>
11956
11957 * win32-low.c (handle_load_dll): Remove duplicate "the".
11958
81239425
PM
119592011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11960
11961 Remove support for old Cygwin 1.5 versions.
11962 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11963 function to avoid warning.
11964 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11965 warning.
11966
9e0627f1
PM
119672011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11968
11969 * gdbserver/server.h (Macro _): Define it if not available.
11970
588eebee
MS
119712011-03-14 Michael Snyder <msnyder@vmware.com>
11972
348af9f7 11973 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11974
43f70d4c
JB
119752011-03-10 Joel Brobecker <brobecker@adacore.com>
11976
11977 * Makefile.in (maintainer-clean realclean distclean): Remove
11978 "make ... subdir_do" command.
11979
348af9f7
MS
119802011-03-10 Michael Snyder <msnyder@vmware.com>
11981
11982 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11983
11984 * server.c (handle_v_run): Free alloced buffer on early return.
11985
e637a4f5
YQ
119862011-03-09 Yao Qi <yao@codesourcery.com>
11987
11988 Revert:
11989 2011-03-04 Yao Qi <yao@codesourcery.com>
11990
11991 * Makefile.in: Remove GNU make feature --directory.
11992
11993 2011-03-05 Yao Qi <yao@codesourcery.com>
11994
11995 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11996 (subdir_do): New make target. Copied from gdb/Makefile.
11997 (maintainer-clean, realclean, distclean, clean): Call corresponding
11998 make targets in common/Makefile.
11999
12000 2011-02-11 Yao Qi <yao@codesourcery.com>
12001
12002 * configure.ac: Call AC_PROG_RANLIB.
12003 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12004 * configure: Regenerate.
12005
e6edda56
JK
120062011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12007
12008 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12009
e5141119
JB
120102011-03-06 Yao Qi <yao@codesourcery.com>
12011
12012 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12013
64794aa4
JB
120142011-03-05 Yao Qi <yao@codesourcery.com>
12015
12016 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12017 (subdir_do): New make target. Copied from gdb/Makefile.
12018 (maintainer-clean, realclean, distclean, clean): Call corresponding
12019 make targets in common/Makefile.
12020
7a762829
YQ
120212011-03-04 Yao Qi <yao@codesourcery.com>
12022
12023 * Makefile.in: Remove GNU make feature --directory.
12024
348af9f7
MS
120252011-03-04 Michael Snyder <msnyder@vmware.com>
12026
12027 * server.c (queue_stop_reply): Call xmalloc not malloc.
12028
120292011-03-02 Michael Snyder <msnyder@vmware.com>
12030
12031 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12032
9f72fee2
MS
120332011-02-28 Michael Snyder <msnyder@vmware.com>
12034
588eebee
MS
12035 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12036 (cmd_qtframe): Ditto.
12037 (cmd_qtbuffer): Ditto.
12038 (cmd_bigqtbuffer): Ditto.
12039
9f72fee2
MS
12040 * utils.c (decimal2str): Initialize 'width' to nine, then
12041 don't mess with it.
12042
8040bd49
UW
120432011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12044
12045 * hostio.c (require_data): Free *data, not data.
12046
7e52cbd0
JK
120472011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12048
12049 * hostio.c (require_data): Use free, not xfree.
12050
9130f83e
MS
120512011-02-27 Michael Snyder <msnyder@vmware.com>
12052
4b812f4e
MS
12053 * server.c (handle_query): Discard unused value.
12054
9130f83e
MS
12055 * hostio.c (require_data): Free malloc memory before returning
12056 error.
12057
69d37113
MS
120582011-02-26 Michael Snyder <msnyder@vmware.com>
12059
12060 * linux-low.c (list_threads): Call closedir for dirent.
12061
35f5825a
MS
120622011-02-27 Michael Snyder <msnyder@vmware.com>
12063
2a589cef
MS
12064 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12065 a case statement falls through.
12066
0adea5f7
MS
12067 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12068
35f5825a
MS
12069 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12070 in comparison.
12071
238f1c74
MS
120722011-02-26 Michael Snyder <msnyder@vmware.com>
12073
12074 * utils.c (decimal2str): Eliminate dead code and dead param.
12075 (pulongest): Drop dead param from call to decimal2str.
12076 (plongest): Ditto.
12077
633ff500
JB
120782011-02-24 Joel Brobecker <brobecker@adacore.com>
12079
12080 Revert the following patch (not approved yet):
12081 2011-02-21 Hui Zhu <teawater@gmail.com>
12082 * tracepoint.c (tp_printf): New function.
12083 (eval_agent_expr): Handle gdb_agent_op_printf.
12084
f9c6ff72
HZ
120852011-02-21 Hui Zhu <teawater@gmail.com>
12086
12087 * tracepoint.c (tp_printf): New function.
12088 (eval_agent_expr): Handle gdb_agent_op_printf.
12089
94d5e490
TT
120902011-02-18 Tom Tromey <tromey@redhat.com>
12091
12092 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12093 (tracepoint.o): Likewise.
12094 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12095 (gdb_agent_op_names): Likewise.
12096
c7f96d2b
TT
120972011-02-18 Tom Tromey <tromey@redhat.com>
12098
12099 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12100 gdb_agent_op_rot>: New constants.
12101 (gdb_agent_op_names): Add pick and roll.
12102 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12103 cases.
12104
0feedb2c
JK
121052011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12106
12107 * aclocal.m4: Regenerated with aclocal-1.11.1.
12108
b3b9301e
PA
121092011-02-14 Pedro Alves <pedro@codesourcery.com>
12110
12111 * server.c (handle_qxfer_traceframe_info): New.
12112 (qxfer_packets): Register "traceframe-info".
12113 (handle_query): Report support for qXfer:traceframe-info:read+.
12114 * tracepoint.c (match_blocktype): New.
12115 (traceframe_find_block_type): Rename to ...
12116 (traceframe_walk_blocks): ... this. Add callback filter argument,
12117 and use it.
12118 (traceframe_find_block_type): New, reimplemented on top of
12119 traceframe_walk_blocks.
12120 (build_traceframe_info_xml): New.
12121 (traceframe_read_info): New.
12122 * server.h (traceframe_read_info): Declare.
12123
4f3e6fb7
YQ
121242011-02-11 Yao Qi <yao@codesourcery.com>
12125
12126 * configure.ac: Call AC_PROG_RANLIB.
12127 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12128 * configure: Regenerate.
12129
764880b7
PA
121302011-02-07 Pedro Alves <pedro@codesourcery.com>
12131
12132 * server.c (gdb_read_memory): Change return semantics to allow
12133 partial transfers.
12134 (handle_search_memory_1): Adjust.
12135 (process_serial_event) <'m' packet>: Handle partial transfers.
12136 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12137
1c79eb8a
PA
121382011-01-28 Pedro Alves <pedro@codesourcery.com>
12139
12140 * regcache.c (init_register_cache): Initialize
12141 regcache->register_status.
12142 (free_register_cache): Release regcache->register_status.
12143 (regcache_cpy): Copy register_status.
12144 (registers_to_string): Print 'x's for unavailable registers.
12145 (supply_register): Mark the register's status valid or
12146 unavailable, depending on whether a buffer was passed in or not.
12147 (supply_register_zeroed): New.
12148 (supply_regblock): Mark the registers' status valid or
12149 unavailable, depending on whether a buffer was passed in or not.
12150 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12151 (struct regcache): New `register_status' field.
12152 (supply_register_zeroed): Declare.
12153 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12154 supply_register_zeroed, rather than passing a NULL buffer to
12155 supply_register.
12156 * tracepoint.c (fetch_traceframe_registers): Update comment.
12157
85724a0e
PA
121582011-01-28 Pedro Alves <pedro@codesourcery.com>
12159
12160 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12161 buffer explicit.
12162
d08aafef
PA
121632011-01-25 Pedro Alves <pedro@codesourcery.com>
12164
12165 * server.h (decode_xfer_write): Change prototype.
12166 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12167 and don't extract the annex here.
12168 * server.c (decode_xfer_read): Remove `annex' parameter,
12169 and don't extract the annex here.
12170 (decode_xfer): New.
12171 (struct qxfer): New.
12172 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12173 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12174 (handle_qxfer_statictrace): New functions, abstracted out from
12175 handle_query, and made to use the struct qxfer interface.
12176 (handle_threads_qxfer_proper): Rename to ...
12177 (handle_qxfer_threads_proper): ... this.
12178 (handle_threads_qxfer): Rename to ...
12179 (handle_qxfer_threads): ... this. Adjust.
12180 (qxfer_packets): New array.
12181 (handle_qxfer): New function.
12182 (handle_query): Use handle_qxfer.
12183
493e2a69
MS
121842011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12185
12186 * gdbreplay.c: Shorten lines of >= 80 columns.
12187 * linux-low.c: Ditto.
12188 * linux-ppc-low.c: Ditto.
12189 * linux-s390-low.c: Ditto.
12190 * linux-sparc-low.c: Ditto.
12191 * linux-x86-low.c: Ditto.
12192 * linux-xtensa-low.c: Ditto.
12193 * mem-break.c: Ditto.
12194 * nto-low.c: Ditto.
12195 * regcache.h: Ditto.
12196 * remote-utils.c: Ditto.
12197 * server.c: Ditto.
12198 * server.h: Ditto.
12199 * thread-db.c: Ditto.
12200 * tracepoint.c: Ditto.
12201 * utils.c: Ditto.
12202 * win32-low.h: Ditto.
12203
44944448
JB
122042011-01-05 Joel Brobecker <brobecker@adacore.com>
12205
12206 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12207 update.
12208
71ce852c
JB
122092011-01-01 Joel Brobecker <brobecker@adacore.com>
12210
12211 * server.c (gdbserver_version): Update copyright year in version
12212 output.
12213 * gdbreplay.c (gdbreplay_version): Ditto.
12214
eb826dc6
MF
122152010-12-29 Jie Zhang <jie.zhang@analog.com>
12216
12217 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12218 * linux-bfin-low.c: New file.
12219 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12220 PT_DATA_ADDR for BFIN targets.
12221 * Makefile.in (SFILES): Add linux-bfin-low.c.
12222 (clean): Remove reg-bfin.c.
12223 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12224 * README: Mention supported Blackfin targets.
12225
39ab222a
MF
122262010-12-23 Mike Frysinger <vapier@gentoo.org>
12227
12228 * .gitignore: New file.
12229
a1f2ce7d
MF
122302010-11-16 Mike Frysinger <vapier@gentoo.org>
12231
12232 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12233
f474844c
JZ
122342010-10-22 Jie Zhang <jie@codesourcery.com>
12235
12236 * Makefile.in: Add FLAGS_TO_PASS variable.
12237 (install): Remove dependency of install-only and recursively
12238 invoke make for install-only.
12239
f1048712
DE
122402010-10-04 Doug Evans <dje@google.com>
12241
12242 * Makefile.in (uninstall): Use $(DESTDIR).
12243
b53a1623
PA
122442010-09-24 Pedro Alves <pedro@codesourcery.com>
12245
e6ee044d
PA
12246 PR gdb/11842
12247
b53a1623
PA
12248 * linux-x86-low.c (compat_siginfo_from_siginfo)
12249 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12250 si_code is < 0. Check for si_code == SI_TIMER before checking for
12251 si_code < 0.
12252
fa1bd1e4
JB
122532010-09-13 Joel Brobecker <brobecker@adacore.com>
12254
12255 * lynx-i386-low.c: New file.
12256 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12257
47fac8f8
JB
122582010-09-13 Joel Brobecker <brobecker@adacore.com>
12259
12260 * lynx-low.c (ptrace_request_to_str): Remove handling for
12261 request values that have been removed in LynxOS 5.x.
12262
1adfc54d
JB
122632010-09-13 Joel Brobecker <brobecker@adacore.com>
12264
12265 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12266 <ptrace.h>
12267
c2a66c29
NS
122682010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12269
12270 * configure.ac: Add --enable-inprocess-agent option.
12271 * configure: Rebuilt.
12272
32fcada3
YQ
122732010-09-06 Yao Qi <yao@codesourcery.com>
12274
12275 * linux-low.c (linux_kill): Remove unused variable.
12276 (linux_stabilize_threads): Likewise.
12277 * server.c (start_inferior): Likewise.
12278 (queue_stop_reply_callback): Likewise.
12279 * tracepoint.c (do_action_at_tracepoint): Likewise.
12280
0cccb683
YQ
122812010-09-06 Yao Qi <yao@codesourcery.com>
12282
12283 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12284 on return.
12285
423ec54c
JK
122862010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12287
12288 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12289
12ac6819
PA
122902010-09-06 Pedro Alves <pedro@codesourcery.com>
12291
12292 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12293 "$(IPA_DEPFILES)".
12294
8ed54b31
JB
122952010-09-01 Joel Brobecker <brobecker@adacore.com>
12296
12297 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12298 gdbserver/lynx-ppc-low.c: New files.
12299 * Makefile.in (lynx_low_h): New variable.
12300 (lynx-low.o, lynx-ppc-low.o): New rules.
12301 * configure.ac: On LynxOS, link with -lnetinet.
12302 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12303 * configure: regenerate.
12304
bb0116a4
JB
123052010-09-01 Joel Brobecker <brobecker@adacore.com>
12306
12307 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12308 * configure.ac: Add check for vasprintf and vsnprintf.
12309 * configure, config.in: Regenerate.
12310 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12311
a778ab81 123122010-09-01 Joel Brobecker <brobecker@adacore.com>
12313
12314 * gdbreplay.c: Move include of alloca.h up, next to include of
12315 malloc.h.
12316 * server.h: Add include of malloc.h.
12317 * mem-break.c: Remove include of malloc.h.
12318 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12319
8b034a19 123202010-09-01 Joel Brobecker <brobecker@adacore.com>
12321
12322 * Makefile.in (memmem.o): Build with -Wno-error.
12323
123242010-09-01 Joel Brobecker <brobecker@adacore.com>
12325
12326 * utils.c (xsnprintf): Make non-static.
12327 * server.h: Add xsnprintf declaration.
12328 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12329 replace calls to snprintf by calls to xsnprintf throughout.
12330
123312010-09-01 Joel Brobecker <brobecker@adacore.com>
12332
12333 * configure.ac: Add configure check for alloca.
12334 * configure, config.in: Regenerate.
12335 * server.h: Include alloca.h if it exists.
12336 * gdbreplay.c: Include alloca.h if it exists.
12337
1a981360
PA
123382010-08-28 Pedro Alves <pedro@codesourcery.com>
12339
12340 * linux-low.c (__SIGRTMIN): Define if not already defined.
12341 (linux_create_inferior): Check for __ANDROID__ rather than
12342 __SIGRTMIN.
12343 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12344 are already deferred.
12345 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12346 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12347 stopped and already has a pending signal to report.
12348 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12349 a pending signal to report or is moving out of a jump pad.
12350 (linux_init_signals): Check for __ANDROID__ rather than
12351 __SIGRTMIN.
12352
b4d51a55
PA
123532010-08-28 Pedro Alves <pedro@codesourcery.com>
12354
12355 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12356 debug_threads check. Avoid a linear search when not doing debug
12357 output.
12358
ec48365d
PA
123592010-08-27 Pedro Alves <pedro@codesourcery.com>
12360
12361 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12362 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12363 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12364 (process_event): Change local fd's type to gdb_fildes_t.
12365 (create_file_handler): Adjust prototype.
12366 (delete_file_handler): Adjust prototype.
12367 (handle_file_event): Adjust prototype. Use pfildes.
12368 (create_file_event): Adjsut prototype.
12369 * remote-utils.c (remote_desc, listen_desc): Change type to
12370 gdb_fildes_t.
12371 * server.h: New gdb_fildes_t typedef.
12372 [USE_WIN32API]: Include winsock2.h.
12373 (delete_file_handler, add_file_handler): Adjust prototypes.
12374 (pfildes): Declare.
12375 * utils.c (pfildes): New.
12376
854d88f0
PA
123772010-08-27 Pedro Alves <pedro@codesourcery.com>
12378
12379 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12380 * configure: Regenerate.
12381
0146f85b
PA
123822010-08-27 Pedro Alves <pedro@codesourcery.com>
12383
12384 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12385 (linux_done_accessing_memory): ... this.
12386 (linux_target_ops): Adjust.
12387 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12388 * nto-low.c (nto_target_ops): Adjust comment.
12389 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12390 * spu-low.c (spu_target_ops): Adjust comment.
12391 * target.h (target_ops): Rename unprepare_to_access_memory field
12392 to done_accessing_memory.
12393 (unprepare_to_access_memory): Rename to ...
12394 (done_accessing_memory): ... this.
12395
90d74c30
PA
123962010-08-26 Pedro Alves <pedro@codesourcery.com>
12397
12398 * linux-low.c (linux_prepare_to_access_memory): New.
12399 (linux_unprepare_to_access_memory): New.
12400 (linux_target_ops): Install them.
12401 * server.c (read_memory): Rename to ...
12402 (gdb_read_memory): ... this. Use
12403 prepare_to_access_memory/prepare_to_access_memory.
12404 (write_memory): Rename to ...
12405 (gdb_write_memory): ... this. Use
12406 prepare_to_access_memory/prepare_to_access_memory.
12407 (handle_search_memory_1): Adjust.
12408 (process_serial_event): Adjust.
12409 * target.h (struct target_ops): New fields
12410 prepare_to_access_memory and unprepare_to_access_memory.
12411 (prepare_to_access_memory, unprepare_to_access_memory): New.
12412 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12413 prepare_to_access_memory/prepare_to_access_memory.
12414 * nto-low.c (nto_target_ops): Adjust.
12415 * spu-low.c (spu_target_ops): Adjust.
12416 * win32-low.c (win32_target_ops): Adjust.
12417
fd467969
PA
124182010-08-26 Pedro Alves <pedro@codesourcery.com>
12419
12420 * Makefile.in (WARN_CFLAGS): Get it from configure.
12421 (WERROR_CFLAGS): New.
12422 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12423 * configure.ac: Introduce --enable-werror, which adds -Werror to
12424 the compiler command line. Enabled by default. Disable with
12425 --disable-werror. Add -Wdeclaration-after-statement
12426 Wpointer-arith and -Wformat-nonliteral to warning flags.
12427 * configure: Regenerate.
12428
331e2f5f
PA
124292010-08-26 Pedro Alves <pedro@codesourcery.com>
12430
12431 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12432
e581f2b4
PA
124332010-08-26 Pedro Alves <pedro@codesourcery.com>
12434
12435 * gdbreplay.c (remote_error): New.
12436 (gdbchar): New.
12437 (expect): Use gdbchar. Check for error reading from GDB.
12438 Clarify sync error output.
12439 (play): Check for errors writing to GDB.
12440 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12441 * remote-utils.c (getpkt): Check for errors writing to the remote
12442 descriptor.
12443
3c11dd79
PA
124442010-08-25 Pedro Alves <pedro@codesourcery.com>
12445
12446 * linux-low.c (linux_wait_1): Move non-debugging code out of
12447 `debug_threads' control.
12448
d20a8ad9
PA
124492010-08-25 Pedro Alves <pedro@codesourcery.com>
12450
12451 * linux-low.c (linux_wait_1): Don't set last_status here.
12452 * server.c (push_event, queue_stop_reply_callback): Assert we're
12453 not pushing a TARGET_WAITKIND_IGNORE event.
12454 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12455 (myresume, handle_target_event): Set the thread's last_resume_kind
12456 and last_status from the target returned status.
12457
964e4306
PA
124582010-08-25 Pedro Alves <pedro@codesourcery.com>
12459
12460 PR threads/10729
12461
12462 * linux-x86-low.c (update_debug_registers_callback): New.
12463 (i386_dr_low_set_addr): Use it.
12464 (i386_dr_low_get_addr): New.
12465 (i386_dr_low_set_control): Use update_debug_registers_callback.
12466 (i386_dr_low_get_control): New.
12467 (i386_dr_low_get_status): Adjust.
12468 * linux-low.c (linux_stop_lwp): New.
12469 * linux-low.h (linux_stop_lwp): Declare.
12470
12471 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12472 argument instead of a i386_debug_reg_state.
12473 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12474 a i386_debug_reg_state.
12475 (i386_insert_aligned_watchpoint): Adjust.
12476 (i386_remove_aligned_watchpoint): Adjust.
12477 (i386_low_stopped_data_address): Read the debug registers from the
12478 inferior instead of from the mirrors.
12479 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12480 (i386_dr_low_get_addr): Declare.
12481 (i386_dr_low_get_control): Declare.
12482 (i386_dr_low_get_status): Change prototype.
12483
12484 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12485 (i386_dr_low_get_addr): New.
12486 (i386_dr_low_get_control): New.
12487 (i386_dr_low_get_status): Adjust prototype. Return
12488 dr_status_mirror.
12489 (i386_initial_stuff): Clear dr_status_mirror and
12490 dr_control_mirror.
12491 (i386_get_thread_context): Adjust.
12492 (i386_set_thread_context): Adjust.
12493 (i386_thread_added): Adjust.
12494
5f21a75b
PA
124952010-08-24 Pedro Alves <pedro@codesourcery.com>
12496
12497 * linux-low.h (linux_thread_area): Delete declaration.
12498
3e4c1235
TS
124992010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12500
12501 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12502 after its termination.
12503
1971b033
PA
125042010-08-09 Pedro Alves <pedro@codesourcery.com>
12505
12506 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12507 (gdb_wants_all_stopped): Delete.
12508 (linux_wait_1): Don't call them.
12509 * server.c (handle_v_cont): Tag all threads as want-stopped.
12510 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12511 stopped as "client-wants-stopped".
12512
310444ac
PA
125132010-07-31 Pedro Alves <pedro@codesourcery.com>
12514
12515 * Makefile.in (signals_h): New.
12516 (server_h): Depend on it.
12517 (server.o): Don't depend on $(signals_def).
12518 (signals.o): Depend on $(signals_def).
12519
a19cae16
JK
125202010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12521
12522 * Makefile.in (signals_def): New.
12523 (server_h): Append include/gdb/signals.h and signals_def.
12524 (server.o): Append signals_def.
12525
30d50328
JK
125262010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12527
12528 * server.c (handle_target_event): Use target_signal_to_host for
12529 resume_info.sig initialization.
12530 * target.h (struct thread_resume) <sig>: New comment.
12531
5c3216e2
OS
125322010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12533
c6f46ca0
OS
12534 * server.c (handle_query): strcpy() the returned string from paddress()
12535 instead of sprintf().
5c3216e2
OS
12536 * utils.c (paddress): Return phex_nz().
12537
6bd31874
JB
125382010-07-07 Joel Brobecker <brobecker@adacore.com>
12539
12540 * server.c (handle_v_cont): Call mourn_inferior if process
12541 just exited.
12542 (myresume): Likewise.
12543
0fb4aa4b
PA
125442010-07-01 Pedro Alves <pedro@codesourcery.com>
12545
12546 Static tracepoints, and integration with UST.
12547
12548 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12549 * mem-break.c (uninsert_all_breakpoints)
12550 (reinsert_all_breakpoints): New.
12551 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12552 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12553 (gdb_agent_ust_loaded, helper_thread_id)
12554 (gdb_agent_helper_thread_id): New macros.
12555 (struct ipa_sym_addresses): Add addr_ust_loaded,
12556 addr_helper_thread_id, addr_cmd_buf.
12557 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12558 (in_process_agent_loaded_ust): New.
12559 (write_e_ust_not_loaded): New.
12560 (maybe_write_ipa_ust_not_loaded): New.
12561 (struct collect_static_trace_data_action): New.
12562 (enum tracepoint_type) <static_tracepoint>: New.
12563 (struct tracepoint) <handle>: Mention static tracepoints.
12564 (struct static_tracepoint_ctx): New.
12565 (CMD_BUF_SIZE): New.
12566 (add_tracepoint_action): Handle static tracepoint actions.
12567 (unprobe_marker_at): New.
12568 (clear_installed_tracepoints): Handle static tracepoints.
12569 (cmd_qtdp): Handle static tracepoints.
12570 (probe_marker_at): New.
12571 (cmd_qtstart): Handle static tracepoints.
12572 (response_tracepoint): Handle static tracepoints.
12573 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12574 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12575 (get_context_regcache): Handle static tracepoints.
12576 (do_action_at_tracepoint): Handle static tracepoint actions.
12577 (traceframe_find_block_type): Handle static trace data blocks.
12578 (traceframe_read_sdata): New.
12579 (download_tracepoints): Download static tracepoint actions.
12580 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12581 (GDB_PROBE_NAME): New.
12582 (ust_ops): New.
12583 (GET_UST_SYM): New.
12584 (USTF): New.
12585 (dlsym_ust): New.
12586 (ust_marker_to_static_tracepoint): New.
12587 (gdb_probe): New.
12588 (collect_ust_data_at_tracepoint): New.
12589 (gdb_ust_probe): New.
12590 (UNIX_PATH_MAX, SOCK_DIR): New.
12591 (gdb_ust_connect_sync_socket): New.
12592 (resume_thread, stop_thread): New.
12593 (run_inferior_command): New.
12594 (init_named_socket): New.
12595 (gdb_ust_socket_init): New.
12596 (cstr_to_hexstr): New.
12597 (next_st): New.
12598 (first_marker, next_marker): New.
12599 (response_ust_marker): New.
12600 (cmd_qtfstm, cmd_qtsstm): New.
12601 (unprobe_marker_at, probe_marker_at): New.
12602 (cmd_qtstmat, gdb_ust_thread): New.
12603 (gdb_ust_init): New.
12604 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12605 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12606 (ST_REGENTRY): New.
12607 (x86_64_st_collect_regmap): New.
12608 (X86_64_NUM_ST_COLLECT_GREGS): New.
12609 (AMD64_RIP_REGNUM): New.
12610 (supply_static_tracepoint_registers): New.
12611 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12612 (ST_REGENTRY): New.
12613 (i386_st_collect_regmap): New.
12614 (i386_NUM_ST_COLLECT_GREGS): New.
12615 (supply_static_tracepoint_registers): New.
12616 * server.c (handle_query): Handle qXfer:statictrace:read.
12617 <qSupported>: Report support for StaticTracepoints, and
12618 qXfer:statictrace:read features.
12619 * server.h (traceframe_read_sdata)
12620 (supply_static_tracepoint_registers): Declare.
12621 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12622 (unpack_varlen_hex): Include in IPA build.
12623 * Makefile.in (ustlibs, ustinc): New.
12624 (IPA_OBJS): Add remote-utils-ipa.o.
12625 ($(IPA_LIB)): Link -ldl and -lpthread.
12626 (UST_CFLAGS): New.
12627 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12628 * config.in, configure: Regenerate.
12629
9e4344e5
PA
126302010-06-20 Ian Lance Taylor <iant@google.com>
12631 Pedro Alves <pedro@codesourcery.com>
12632
12633 * linux-x86-low.c (always_true): Delete.
12634 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12635 trying to fool the compiler with always_true.
12636
c6beb2cb
PA
126372010-06-20 Pedro Alves <pedro@codesourcery.com>
12638
12639 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12640 conditions in gdbserver.
12641
d2ed6730
UW
126422010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12643
12644 * spu-low.c (spu_read_memory): Wrap around local store limit.
12645 (spu_write_memory): Likewise.
12646
4e29fb54
PA
126472010-06-15 Pedro Alves <pedro@codesourcery.com>
12648
12649 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12650 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12651 LONGEST uses.
12652 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12653 uses.
12654 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12655 uses with LONGEST uses.
12656
6a271cae
PA
126572010-06-14 Stan Shebs <stan@codesourcery.com>
12658 Pedro Alves <pedro@codesourcery.com>
12659
12660 Bytecode compiler.
12661
12662 * linux-x86-low.c: Include limits.h.
12663 (add_insns): New.
12664 (always_true): New.
12665 (EMIT_ASM): New.
12666 (EMIT_ASM32): New.
12667 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12668 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12669 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12670 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12671 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12672 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12673 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12674 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12675 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12676 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12677 (amd64_emit_void_call_2): New.
12678 (amd64_emit_ops): New.
12679 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12680 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12681 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12682 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12683 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12684 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12685 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12686 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12687 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12688 (i386_emit_stack_adjust, i386_emit_int_call_1)
12689 (i386_emit_void_call_2): New.
12690 (i386_emit_ops): New.
12691 (x86_emit_ops): New.
12692 (the_low_target): Install x86_emit_ops.
12693 * server.h (struct emit_ops): New.
12694 (get_raw_reg_func_addr): Declare.
12695 (current_insn_ptr, emit_error): Declare.
12696 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12697 (set_trace_state_variable_value): New defines.
12698 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12699 addr_get_trace_state_variable_value and
12700 addr_set_trace_state_variable_value.
12701 (symbol_list): New fields for get_raw_reg,
12702 get_trace_state_variable_value and set_trace_state_variable_value.
12703 (condfn): New typedef.
12704 (struct tracepoint): New field `compiled_cond'.
12705 (do_action_at_tracepoint): Clear compiled_cond.
12706 (get_trace_state_variable_value, set_trace_state_variable_value):
12707 Export in the IPA.
12708 (condition_true_at_tracepoint): If there's a compiled condition,
12709 run that.
12710 (current_insn_ptr, emit_error): New globals.
12711 (struct bytecode_address): New.
12712 (get_raw_reg_func_addr): New.
12713 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12714 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12715 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12716 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12717 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12718 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12719 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12720 (compile_tracepoint_condition, compile_bytecodes): New.
12721 * target.h (emit_ops): Forward declare.
12722 (struct target_ops): New field emit_ops.
12723 (target_emit_ops): New.
12724 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12725 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12726 * linux-low.c (linux_emit_ops): New.
12727 (linux_target_ops): Install it.
12728 * linux-low.h (struct linux_target_ops): New field emit_ops.
12729
92b72907
UW
127302010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12731
12732 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12733 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12734
fa593d66
PA
127352010-06-01 Pedro Alves <pedro@codesourcery.com>
12736 Stan Shebs <stan@codesourcery.com>
12737
12738 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12739 (all): Depend on $(extra_libraries).
12740 (install-only): Install the IPA.
12741 (IPA_OBJS, IPA_LIB): New.
12742 (clean): Remove the IPA lib.
12743 (IPAGENT_CFLAGS): New.
12744 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12745 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12746 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12747 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12748 * configure.ac: Check for atomic builtins support in the compiler.
12749 (IPA_DEPFILES, extra_libraries): Define.
12750 * configure.srv (ipa_obj): Add description.
12751 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12752 (i[34567]86-*-linux*): Set ipa_obj.
12753 (x86_64-*-linux*): Set ipa_obj.
12754 * linux-low.c (stabilizing_threads): New.
12755 (supports_fast_tracepoints): New.
12756 (linux_detach): Stabilize threads before detaching.
12757 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12758 the lwp is either not stabilizing, or is moving out of a jump pad.
12759 (linux_fast_tracepoint_collecting): New.
12760 (maybe_move_out_of_jump_pad): New.
12761 (enqueue_one_deferred_signal): New.
12762 (dequeue_one_deferred_signal): New.
12763 (linux_wait_for_event_1): If moving out of a jump pad, defer
12764 pending signals to later.
12765 (linux_stabilize_threads): New.
12766 (linux_wait_1): Check if threads need moving out of jump pads, and
12767 do it if so.
12768 (stuck_in_jump_pad_callback): New.
12769 (move_out_of_jump_pad_callback): New.
12770 (lwp_running): New.
12771 (linux_resume_one_lwp): Handle moving out of jump pads.
12772 (linux_set_resume_request): Dequeue deferred signals.
12773 (need_step_over_p): Also step over fast tracepoint jumps.
12774 (start_step_over): Also uninsert fast tracepoint jumps.
12775 (finish_step_over): Also reinsert fast tracepoint jumps.
12776 (linux_install_fast_tracepoint_jump): New.
12777 (linux_target_ops): Install linux_stabilize_threads and
12778 linux_install_fast_tracepoint_jump_pad.
12779 * linux-low.h (linux_target_ops) <get_thread_area,
12780 install_fast_tracepoint_jump_pad>: New fields.
12781 (struct lwp_info) <collecting_fast_tracepoint,
12782 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12783 (linux_get_thread_area): Declare.
12784 * linux-x86-low.c (jump_insn): New.
12785 (x86_get_thread_area): New.
12786 (append_insns): New.
12787 (push_opcode): New.
12788 (amd64_install_fast_tracepoint_jump_pad): New.
12789 (i386_install_fast_tracepoint_jump_pad): New.
12790 (x86_install_fast_tracepoint_jump_pad): New.
12791 (the_low_target): Install x86_get_thread_area and
12792 x86_install_fast_tracepoint_jump_pad.
12793 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12794 (struct fast_tracepoint_jump): New.
12795 (fast_tracepoint_jump_insn): New.
12796 (fast_tracepoint_jump_shadow): New.
12797 (find_fast_tracepoint_jump_at): New.
12798 (fast_tracepoint_jump_here): New.
12799 (delete_fast_tracepoint_jump): New.
12800 (set_fast_tracepoint_jump): New.
12801 (uninsert_fast_tracepoint_jumps_at): New.
12802 (reinsert_fast_tracepoint_jumps_at): New.
12803 (set_breakpoint_at): Use write_inferior_memory.
12804 (uninsert_raw_breakpoint): Use write_inferior_memory.
12805 (check_mem_read): Mask out fast tracepoint jumps.
12806 (check_mem_write): Mask out fast tracepoint jumps.
12807 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12808 (set_fast_tracepoint_jump): Declare.
12809 (delete_fast_tracepoint_jump)
12810 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12811 (reinsert_fast_tracepoint_jumps_at): Declare.
12812 * regcache.c: Don't compile many functions when building the
12813 in-process agent library.
12814 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12815 the register buffer in the heap.
12816 (free_register_cache): If the register buffer isn't owned by the
12817 regcache, don't free it.
12818 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12819 pre-existing register caches.
12820 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12821 type.
12822 (convert_ascii_to_int): : Constify `from' parameter type.
12823 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12824 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12825 the needed buffer in-place.
12826 (relocate_instruction): New.
12827 * server.c (handle_query) <qSymbols>: If the target supports
12828 tracepoints, give it a chance of looking up symbols. Report
12829 support for fast tracepoints.
12830 (handle_status): Stabilize threads.
12831 (process_serial_event): Adjust.
12832 * server.h (struct fast_tracepoint_jump): Forward declare.
12833 (struct process_info) <fast_tracepoint_jumps>: New field.
12834 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12835 (decode_X_packet, decode_M_packet): Adjust.
12836 (relocate_instruction): Declare.
12837 (in_process_agent_loaded): Declare.
12838 (tracepoint_look_up_symbols): Declare.
12839 (struct fast_tpoint_collect_status): Declare.
12840 (fast_tracepoint_collecting): Declare.
12841 (force_unlock_trace_buffer): Declare.
12842 (handle_tracepoint_bkpts): Declare.
12843 (initialize_low_tracepoint)
12844 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12845 * target.h (struct target_ops) <stabilize_threads,
12846 install_fast_tracepoint_jump_pad>: New fields.
12847 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12848 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12849 [HAVE_STDINT_H]: Include stdint.h.
12850 (trace_debug_1): Rename to ...
12851 (trace_vdebug): ... this.
12852 (trace_debug): Rename to ...
12853 (trace_debug_1): ... this. Add `level' parameter.
12854 (trace_debug): New.
12855 (ATTR_USED, ATTR_NOINLINE): New.
12856 (IP_AGENT_EXPORT): New.
12857 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12858 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12859 (about_to_request_buffer_space, trace_buffer_is_full)
12860 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12861 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12862 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12863 (traceframe_write_count, traceframes_created)
12864 (trace_state_variables)
12865 New renaming defines.
12866 (struct ipa_sym_addresses): New.
12867 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12868 (symbol_list): New.
12869 (ipa_sym_addrs): New.
12870 (all_tracepoint_symbols_looked_up): New.
12871 (in_process_agent_loaded): New.
12872 (write_e_ipa_not_loaded): New.
12873 (maybe_write_ipa_not_loaded): New.
12874 (tracepoint_look_up_symbols): New.
12875 (debug_threads) [IN_PROCESS_AGENT]: New.
12876 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12877 (UNKNOWN_SIDE_EFFECTS): New.
12878 (stop_tracing): New.
12879 (flush_trace_buffer): New.
12880 (stop_tracing_bkpt): New.
12881 (flush_trace_buffer_bkpt): New.
12882 (read_inferior_integer): New.
12883 (read_inferior_uinteger): New.
12884 (read_inferior_data_pointer): New.
12885 (write_inferior_data_pointer): New.
12886 (write_inferior_integer): New.
12887 (write_inferior_uinteger): New.
12888 (struct collect_static_trace_data_action): Delete.
12889 (enum tracepoint_type): New.
12890 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12891 <actions_str, step_actions, step_actions_str>: Only include in
12892 GDBserver.
fa593d66
PA
12893 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12894 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12895 (tracepoints): Use IP_AGENT_EXPORT.
12896 (last_tracepoint): Don't include in the IPA.
12897 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12898 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12899 (alloced_trace_state_variables): New.
12900 (trace_state_variables): Use IP_AGENT_EXPORT.
12901 (traceframe_t): Delete unused variable.
12902 (circular_trace_buffer): Don't include in the IPA.
12903 (trace_buffer_start): Delete.
12904 (struct trace_buffer_control): New.
12905 (trace_buffer_free): Delete.
12906 (struct ipa_trace_buffer_control): New.
12907 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12908 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12909 New.
12910 (trace_buffer_ctrl): New.
12911 (TRACE_BUFFER_CTRL_CURR): New.
12912 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12913 Reimplement as macros.
12914 (trace_buffer_wrap): Delete.
12915 (traceframe_write_count, traceframe_read_count)
12916 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12917 (struct tracepoint_hit_ctx) <type>: New field.
12918 (struct fast_tracepoint_ctx): New.
12919 (memory_barrier): New.
12920 (cmpxchg): New.
12921 (record_tracepoint_error): Update atomically in the IPA.
12922 (clear_inferior_trace_buffer): New.
12923 (about_to_request_buffer_space): New.
12924 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12925 updating the same buffer.
12926 (add_tracepoint): Default the tracepoint's type to trap
12927 tracepoint, and orig_size to -1.
12928 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12929 internal variables.
12930 (create_trace_state_variable): New parameter `gdb'. Handle it.
12931 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12932 (cmd_qtdp): Handle fast tracepoints.
12933 (cmd_qtdv): Adjust.
12934 (max_jump_pad_size): New.
12935 (gdb_jump_pad_head): New.
12936 (get_jump_space_head): New.
12937 (claim_jump_space): New.
12938 (sort_tracepoints): New.
12939 (MAX_JUMP_SIZE): New.
12940 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12941 IPA.
12942 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12943 support. Upload fast traceframes, and delete internal IPA
12944 breakpoints.
12945 (stop_tracing_handler): New.
12946 (flush_trace_buffer_handler): New.
12947 (cmd_qtstop): Upload fast tracepoints.
12948 (response_tracepoint): Handle fast tracepoints.
12949 (tracepoint_finished_step): Upload fast traceframes. Set the
12950 tracepoint hit context's tracepoint type.
12951 (handle_tracepoint_bkpts): New.
12952 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12953 type. Add comment about fast tracepoints.
12954 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12955 non-existing action_str field.
12956 (get_context_regcache): Handle fast tracepoints.
12957 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12958 to the regcache.
12959 (fast_tracepoint_from_jump_pad_address): New.
12960 (fast_tracepoint_from_ipa_tpoint_address): New.
12961 (collecting_t): New.
12962 (force_unlock_trace_buffer): New.
12963 (fast_tracepoint_collecting): New.
12964 (collecting): New.
12965 (gdb_collect): New.
12966 (write_inferior_data_ptr): New.
12967 (target_tp_heap): New.
12968 (target_malloc): New.
12969 (download_agent_expr): New.
12970 (UALIGN): New.
12971 (download_tracepoints): New.
12972 (download_trace_state_variables): New.
12973 (upload_fast_traceframes): New.
12974 (IPA_FIRST_TRACEFRAME): New.
12975 (IPA_NEXT_TRACEFRAME_1): New.
12976 (IPA_NEXT_TRACEFRAME): New.
12977 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12978 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12979 (gdb_jump_pad_buffer_end): New.
12980 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12981 (initialize_tracepoint): Adjust.
12982 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12983 buffer. Initialize the low module.
12984 * utils.c (PREFIX, TOOLNAME): New.
12985 (malloc_failure): Use PREFIX.
12986 (error): In the IPA, an error causes an exit.
12987 (fatal, warning): Use PREFIX.
12988 (internal_error): Use TOOLNAME.
12989 (NUMCELLS): Increase to 10.
12990 * configure, config.in: Regenerate.
12991
d149dd1d
PA
129922010-06-01 Pedro Alves <pedro@codesourcery.com>
12993
12994 * server.c (handle_query) <qSupported>: Do two passes over the
12995 qSupported string to avoid nesting strtok.
12996
f6528abd
JK
129972010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12998
12999 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13000 (CDEPS): New.
13001 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13002 -Wl,--dynamic-list.
13003 * configure: Regenerate.
13004 * proc-service.list: New.
13005
ca2a87a0
JK
130062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13007
13008 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13009 New comment.
13010
363a6e9f
OS
130112010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13012
13013 * gdbreplay.c (remote_open): Check error return from socket() call by
13014 its equality to -1 not by it being negative.
13015 * remote-utils.c (remote_open): Likewise.
13016
d23b6cb1
PA
130172010-05-23 Pedro Alves <pedro@codesourcery.com>
13018
13019 * config.h: Regenerate.
13020
28d3cf85
MK
130212010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13022
13023 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13024 doesn't provide PTRACE_GET_THREAD_AREA.
13025
fea36a59
MK
130262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13027
13028 * linux-m68k-low.c: Include <asm/ptrace.h>
13029 (ps_get_thread_area): Implement.
13030
24b066ba
DE
130312010-05-03 Doug Evans <dje@google.com>
13032
13033 * event-loop.c (struct callback_event): New struct.
13034 (callback_list): New global.
13035 (append_callback_event, delete_callback_event): New functions.
13036 (process_callback): New function.
13037 (start_event_loop): Call it.
13038 * remote-utils.c (NOT_SCHEDULED): Define.
13039 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13040 moved out of readchar.
13041 (readchar): Rewrite. Call reschedule before returning.
13042 (reset_readchar): New function.
13043 (remote_close): Call it.
13044 (process_remaining, reschedule): New functions.
13045 * server.h (callback_handler_func): New typedef.
13046 (append_callback_event, delete_callback_event): Declare.
13047
9836d6ea
PA
130482010-05-03 Pedro Alves <pedro@codesourcery.com>
13049
13050 * proc-service.c (ps_pglobal_lookup): Use
13051 thread_db_look_up_one_symbol.
13052 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13053 parameter. Use it instead of all_symbols_looked_up.
13054 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13055 field.
13056 (all_symbols_looked_up): Don't declare.
13057 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13058 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13059 field.
13060 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13061 Set all_symbols_looked_up here.
13062 (thread_db_look_up_one_symbol): New.
13063 (thread_db_get_tls_address): Adjust.
13064 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13065 thread_db object on the heap, and tentatively set it in the
13066 process structure.
13067 (thread_db_init): Don't set all_symbols_looked_up here.
13068 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13069
7984d532
PA
130702010-05-03 Pedro Alves <pedro@codesourcery.com>
13071
13072 * linux-low.c (linux_kill, linux_detach): Adjust.
13073 (status_pending_p_callback): Remove redundant statement. Check
13074 for !TARGET_WAITIKIND_IGNORE, instead of
13075 TARGET_WAITKIND_STOPPED.
13076 (handle_tracepoints): Make sure LWP is locked. Adjust.
13077 (linux_wait_for_event_1): Adjust.
13078 (linux_cancel_breakpoints): New.
13079 (unsuspend_one_lwp): New.
13080 (unsuspend_all_lwps): New.
13081 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13082 (send_sigstop_callback): Change return type to int, add new
13083 `except' parameter and handle it.
13084 (suspend_and_send_sigstop_callback): New.
13085 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13086 pass them down. If SUSPEND, also increment the lwp's suspend
13087 count.
13088 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13089 (need_step_over_p): Don't consider suspended LWPs.
13090 (start_step_over): Adjust.
13091 (proceed_one_lwp): Change return type to int, add new `except'
13092 parameter and handle it.
13093 (unsuspend_and_proceed_one_lwp): New.
13094 (proceed_all_lwps): Use find_inferior instead of
13095 for_each_inferior.
13096 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13097 also decrement the suspend count of LWPs. Pass `except' down,
13098 instead of hacking its suspend count.
13099 (linux_pause_all): Add `freeze' parameter. Adjust.
13100 (linux_unpause_all): New.
13101 (linux_target_ops): Install linux_unpause_all.
13102 * server.c (handle_status): Adjust.
13103 * target.h (struct target_ops): New fields `unpause_all' and
13104 `cancel_breakpoints'. Add new parameter to `pause_all'.
13105 (pause_all): Add new `freeze' parameter.
13106 (unpause_all): New.
13107 (cancel_breakpoints): New.
13108 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13109 cancel breakpoints.
13110 (cmd_qtstart): Pause threads.
13111 (stop_tracing): Pause threads, and cancel breakpoints.
13112 * win32-low.c (win32_target_ops): Adjust.
13113
e471f25b
PA
131142010-05-03 Pedro Alves <pedro@codesourcery.com>
13115
13116 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13117 the inferior right away from here...
13118 (linux_wait_1): ... to here, and adjust to check the thread's
13119 last_resume_kind instead of the lwp's step or stop_expected flags.
13120
1915ef4f
PA
131212010-05-02 Pedro Alves <pedro@codesourcery.com>
13122
13123 * README: Use consistent `GDB' and `GDBserver' spellings.
13124
f9e39928
PA
131252010-05-02 Pedro Alves <pedro@codesourcery.com>
13126
13127 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13128 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13129 (linux_detach_one_lwp): Assume the lwp is stopped.
13130 (any_thread_of): Delete.
13131 (linux_detach): Stop all lwps here. Don't blindly delete all
13132 breakpoints.
13133 (delete_lwp_callback): New.
13134 (linux_mourn): Delete all lwps of the process that is gone.
13135 (linux_wait_1): Don't delete the last lwp of the process here.
13136 * mem-break.h (mark_breakpoints_out): Declare.
13137 * mem-break.c (mark_breakpoints_out): New.
13138 (free_all_breakpoints): Use it.
13139 * server.c (handle_target_event): If the process is gone, mark
13140 breakpoints out.
13141 * thread-db.c (struct thread_db) <create_bp>: New field.
13142 (thread_db_enable_reporting): Fix prototype. Store a thread event
13143 breakpoint reference in the thread_db struct.
13144 (thread_db_load_search): Clear the thread_db object.
13145 (try_thread_db_load_1): Ditto.
13146 (switch_to_process): New.
13147 (disable_thread_event_reporting): Use it.
13148 (remove_thread_event_breakpoints): New.
13149 (thread_db_detach, thread_db_mourn): Use it.
13150
1e7fc18c
PA
131512010-05-01 Pedro Alves <pedro@codesourcery.com>
13152
13153 * linux-low.c (linux_enable_event_reporting): New.
13154 (linux_wait_for_event_1, handle_extended_wait): Use it.
13155
02fc4de7
PA
131562010-04-30 Pedro Alves <pedro@codesourcery.com>
13157
13158 * linux-low.c (linux_kill_one_lwp, linux_kill)
13159 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13160 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13161 SIGSTOP even if the LWP is stopped.
13162 (send_sigstop_callback): New.
13163 (stop_all_lwps): Use send_sigstop_callback instead.
13164 (linux_resume_one_thread): Adjust.
13165 (proceed_one_lwp): Still proceed an LWP that the client has
13166 requested to stop, if we haven't reported it as stopped yet. Make
13167 sure that LWPs the client want stopped, have a pending SIGSTOP.
13168
bc3b5632
DE
131692010-04-26 Doug Evans <dje@google.com>
13170
ae1ada35
DE
13171 * server.c (handle_general_set): Make static.
13172
bc3b5632
DE
13173 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13174 Print received char after testing for error/eof instead of before.
13175 (input_interrupt): Tweak comment.
13176
65730243
DE
131772010-04-23 Doug Evans <dje@google.com>
13178
13179 * server.c (start_inferior): Print inferior argv if --debug.
13180
a8ae7dc0
AR
131812010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13182
13183 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13184 * nto-x86-low.c: Include server.h
13185
1c07cc19
PM
131862010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13187
13188 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13189 be consistent with other sources of this directory.
13190 (init_registers_amd64): Correct name of source file of this function
13191 in the comment.
13192
e0a61e09
PM
131932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13194
13195 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13196 64-bit executables.
13197
54709339
PM
131982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13199
13200 * win32-i386-low.c: Add 64-bit support.
13201 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13202 (init_registers_amd64): Declare.
13203 (mappings): Add 64-bit version of array.
13204 (init_windows_x86): New function.
13205 (the_low_target): Change init_arch field to init_windows_x86.
13206
e8f0053d
PM
132072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13208
13209 * win32-low.c: Adapt to support also 64-bit architecture.
13210 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13211 (get_image_name): Use SIZE_T type for local variable `done'.
13212 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13213 (toolhelp_get_dll_name): Idem.
13214 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13215 Use uintptr_t typecast to avoid warning.
13216 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13217 (handle_exception): Use phex_nz to avoid warning.
13218 (win32_wait): Remove unused local variable `process'.
13219
c481e77e
PM
132202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13221
13222 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13223 `amd64-avx.o'.
13224
12ea4b69
PM
132252010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13226
13227 * configure.ac: Use `ws2_32' library for srv_mingw.
13228 * configure: Regenerate.
13229 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13230 * remote-utils.c: Likewise.
13231
f6d1620c
L
132322010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13233
13234 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13235 if __x86_64__ is defined.
13236
8e642873
PM
132372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13238
13239 * configure: Regenerate.
13240
711e434b
PM
132412010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13242
13243 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13244 * target.h (target_ops): New get_tib_address field.
13245 * win32-low.h (win32_thread_info): Add thread_local_base field.
13246 * win32-low.c (child_add_thread): Add tlb argument.
13247 Set thread_local_base field to TLB.
13248 (get_child_debug_event): Adapt to child_add_thread change.
13249 (win32_get_tib_address): New function.
13250 (win32_target_ops): Set get_tib_address field to
13251 win32_get_tib_address.
13252 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13253
505106cd
PA
132542010-04-12 Pedro Alves <pedro@codesourcery.com>
13255
505106cd
PA
13256 * linux-low.c (linux_mourn): Also remove the process.
13257 * server.c (handle_target_event): Don't remove the process here.
13258 * nto-low.c (nto_mourn): New.
13259 (nto_target_ops): Install it.
13260 * spu-low.c (spu_mourn): New.
13261 (spu_target_ops): Install it.
13262 * win32-low.c (win32_mourn): New.
13263 (win32_target_ops): Install it.
13264
e8470a06
PA
132652010-04-12 Pedro Alves <pedro@codesourcery.com>
13266
13267 * server.h (buffer_xml_printf): Remove redundant `;'.
13268
45ba0d02
PA
132692010-04-12 Pedro Alves <pedro@codesourcery.com>
13270
13271 * regcache.c (set_register_cache): Invalidate regcaches before
13272 changing the register cache layout.
13273 (regcache_invalidate_one): Allow a NULL regcache.
13274 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13275 regcaches before changing the register cache layout or the target
13276 regsets.
13277
59e04013
L
132782010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13279
13280 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13281 variable warning on Linux/x86-64.
13282
8336d594
PA
132832010-04-11 Pedro Alves <pedro@codesourcery.com>
13284
13285 GDBserver disconnected tracing support.
13286
13287 * linux-low.c (linux_remove_process): Delete.
13288 (add_lwp): Don't set last_resume_kind here.
13289 (linux_kill): Use `mourn'.
13290 (linux_detach): Use `thread_db_detach', and `mourn'.
13291 (linux_mourn): New.
13292 (linux_attach_lwp_1): Adjust comment.
13293 (linux_attach): last_resume_kind moved the thread_info; adjust.
13294 (status_pending_p_callback): Adjust.
13295 (linux_wait_for_event_1): Adjust.
13296 (count_events_callback, select_singlestep_lwp_callback)
13297 (select_event_lwp_callback, cancel_breakpoints_callback)
13298 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13299 (proceed_one_lwp): Adjust.
13300 (linux_async): Add debug output.
13301 (linux_thread_stopped): New.
13302 (linux_pause_all): New.
13303 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13304 linux_pause_all.
13305 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13306 (thread_db_free): Delete declaration.
13307 (thread_db_detach, thread_db_mourn): Declare.
13308 * thread-db.c (thread_db_init): Use thread_db_mourn.
13309 (thread_db_free): Delete, split in two.
13310 (disable_thread_event_reporting): New.
13311 (thread_db_detach): New.
13312 (thread_db_mourn): New.
13313
13314 * server.h (struct thread_info) <last_resume_kind>: New field.
13315 <attached>: Add comment.
13316 <gdb_detached>: New field.
13317 (handler_func): Change return type to int.
13318 (handle_serial_event, handle_target_event): Ditto.
13319 (gdb_connected): Declare.
13320 (tracing): Delete.
13321 (disconnected_tracing): Declare.
13322 (stop_tracing): Declare.
13323
13324 * server.c (handle_query) <qSupported>: Report support for
13325 disconnected tracing.
13326 (queue_stop_reply_callback): Account for running threads.
13327 (gdb_wants_thread_stopped): New.
13328 (gdb_wants_all_threads_stopped): New.
13329 (gdb_reattached_process): New.
13330 (handle_status): Clear the `gdb_detached' flag of all processes.
13331 In all-stop, stop all threads.
13332 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13333 (process_serial_event): If the remote connection breaks, or if an
13334 exit was forced with "monitor exit", force an event loop exit.
13335 Handle disconnected tracing on detach.
13336 (handle_serial_event): Adjust.
13337 (handle_target_event): If GDB isn't connected, forward events back
13338 to the inferior, unless the last process exited, in which case,
13339 exit gdbserver. Adjust interface.
13340
13341 * remote-utils.c (remote_open): Don't block in accept. Instead
13342 register an event loop source on the listen socket file
13343 descriptor. Refactor bits into ...
13344 (listen_desc): ... this new global.
13345 (gdb_connected): ... this new function.
13346 (enable_async_notification): ... this new function.
13347 (handle_accept_event): ... this new function.
13348 (remote_close): Clear remote_desc.
13349
13350 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13351
13352 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13353 New fields.
13354 (mourn_inferior): Define.
13355 (target_process_qsupported): Avoid the dangling else problem.
13356 (thread_stopped): Define.
13357 (pause_all): Define.
13358 (target_waitstatus_to_string): Declare.
13359 * target.c (target_waitstatus_to_string): New.
13360
13361 * tracepoint.c (tracing): Make extern.
13362 (disconnected_tracing): New.
13363 (stop_tracing): Make extern. Handle tracing stops due to GDB
13364 disconnecting.
13365 (cmd_qtdisconnected): New.
13366 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13367 (handle_tracepoint_general_set): Handle QTDisconnected.
13368
13369 * event-loop.c (event_handler_func): Change return type to int.
13370 (process_event): Bail out if the event handler wants the event
13371 loop to stop.
13372 (handle_file_event): Ditto.
13373 (start_event_loop): Bail out if the event handler wants the event
13374 loop to stop.
13375
13376 * nto-low.c (nto_target_ops): Adjust.
13377 * spu-low.c (spu_wait): Don't remove the process here.
13378 (spu_target_ops): Adjust.
13379 * win32-low.c (win32_wait): Don't remove the process here.
13380 (win32_target_ops): Adjust.
13381
5d267c4c
PA
133822010-04-11 Pedro Alves <pedro@codesourcery.com>
13383
13384 * regcache.c (realloc_register_cache): Invalidate inferior's
13385 regcache before recreating it.
13386
623ccd72
PA
133872010-04-09 Pedro Alves <pedro@codesourcery.com>
13388
13389 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13390
219f2f23
PA
133912010-04-09 Stan Shebs <stan@codesourcery.com>
13392 Pedro Alves <pedro@codesourcery.com>
13393
13394 * server.h (LONGEST): New.
13395 (struct thread_info) <while_stepping>: New field.
13396 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13397 Declare.
13398 (initialize_tracepoint, handle_tracepoint_general_set)
13399 (handle_tracepoint_query, tracepoint_finished_step)
13400 (tracepoint_was_hit, release_while_stepping_state_list):
13401 (current_traceframe): Declare.
13402 * server.c (handle_general_set): Handle tracepoint packets.
13403 (read_memory): New.
13404 (write_memory): New.
13405 (handle_search_memory_1): Use read_memory.
13406 (handle_query): Report support for conditional tracepoints, trace
13407 state variables, and tracepoint sources. Handle tracepoint
13408 queries.
13409 (main): Initialize the tracepoints module.
13410 (process_serial_event): Handle traceframe reads/writes.
13411
13412 * linux-low.c (handle_tracepoints): New.
13413 (linux_wait_1): Call it.
13414 (linux_resume_one_lwp): Handle while-stepping.
13415 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13416 (linux_target_ops): Install them.
13417 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13418 New field.
13419 * linux-x86-low.c (x86_supports_tracepoints): New.
13420 (the_low_target). Install it.
13421
13422 * mem-break.h (delete_breakpoint): Declare.
13423 * mem-break.c (delete_breakpoint): Make external.
13424
13425 * target.h (struct target_ops): Add `supports_tracepoints',
13426 `read_pc', and `write_pc' fields.
13427 (target_supports_tracepoints): Define.
13428 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13429 (phex_nz): New.
13430
13431 * regcache.h (struct regcache) <registers_owned>: New field.
13432 (init_register_cache, regcache_cpy): Declare.
13433 (regcache_read_pc, regcache_write_pc): Declare.
13434 (register_cache_size): Declare.
13435 (supply_regblock): Declare.
13436 * regcache.c (init_register_cache): New.
13437 (new_register_cache): Use it.
13438 (regcache_cpy): New.
13439 (register_cache_size): New.
13440 (supply_regblock): New.
13441 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13442
219f2f23
PA
13443 * tracepoint.c: New.
13444
13445 * Makefile.in (OBS): Add tracepoint.o.
13446 (tracepoint.o): New rule.
13447
3a13a53b
L
134482010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13449
13450 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13451 (i386-mmx.o): New.
13452 (i386-mmx.c): Likewise.
13453 (i386-mmx-linux.o): Likewise.
13454 (i386-mmx-linux.c): Likewise.
13455
13456 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13457 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13458 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13459 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13460
13461 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13462 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13463 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13464
1570b33e
L
134652010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13466
13467 * Makefile.in (clean): Updated.
13468 (i386-avx.o): New.
13469 (i386-avx.c): Likewise.
13470 (i386-avx-linux.o): Likewise.
13471 (i386-avx-linux.c): Likewise.
13472 (amd64-avx.o): Likewise.
13473 (amd64-avx.c): Likewise.
13474 (amd64-avx-linux.o): Likewise.
13475 (amd64-avx-linux.c): Likewise.
13476
13477 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13478 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13479 (srv_amd64_regobj): Add amd64-avx.o.
13480 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13481 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13482 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13483 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13484 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13485 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13486 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13487
13488 * i387-fp.c: Include "i386-xstate.h".
13489 (i387_xsave): New.
13490 (i387_cache_to_xsave): Likewise.
13491 (i387_xsave_to_cache): Likewise.
13492 (x86_xcr0): Likewise.
13493
13494 * i387-fp.h (i387_cache_to_xsave): Likewise.
13495 (i387_xsave_to_cache): Likewise.
13496 (x86_xcr0): Likewise.
13497
13498 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13499 * linux-crisv32-low.c (target_regsets): Likewise.
13500 * linux-m68k-low.c (target_regsets): Likewise.
13501 * linux-mips-low.c (target_regsets): Likewise.
13502 * linux-ppc-low.c (target_regsets): Likewise.
13503 * linux-s390-low.c (target_regsets): Likewise.
13504 * linux-sh-low.c (target_regsets): Likewise.
13505 * linux-sparc-low.c (target_regsets): Likewise.
13506 * linux-xtensa-low.c (target_regsets): Likewise.
13507
13508 * linux-low.c: Include <sys/uio.h>.
13509 (regsets_fetch_inferior_registers): Support nt_type.
13510 (regsets_store_inferior_registers): Likewise.
13511 (linux_process_qsupported): New.
13512 (linux_target_ops): Add linux_process_qsupported.
13513
13514 * linux-low.h (regset_info): Add nt_type.
13515 (linux_target_ops): Add process_qsupported.
13516
13517 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13518 and <sys/uio.h>.
13519 (init_registers_i386_avx_linux): New.
13520 (init_registers_amd64_avx_linux): Likewise.
13521 (xmltarget_i386_linux_no_xml): Likewise.
13522 (xmltarget_amd64_linux_no_xml): Likewise.
13523 (PTRACE_GETREGSET): Likewise.
13524 (PTRACE_SETREGSET): Likewise.
13525 (x86_fill_xstateregset): Likewise.
13526 (x86_store_xstateregset): Likewise.
13527 (use_xml): Likewise.
13528 (x86_linux_update_xmltarget): Likewise.
13529 (x86_linux_process_qsupported): Likewise.
13530 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13531 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13532 init_registers_i386_linux here. Call
13533 x86_linux_update_xmltarget.
13534 (the_low_target): Add x86_linux_process_qsupported.
13535
13536 * server.c (handle_query): Call target_process_qsupported.
13537
13538 * target.h (target_ops): Add process_qsupported.
13539 (target_process_qsupported): New.
13540
fc7238bb
PA
135412010-04-03 Pedro Alves <pedro@codesourcery.com>
13542
13543 * inferiors.c (add_thread): Set last_status kind to
13544 TARGET_WAITKIND_IGNORE.
13545 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13546 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13547 (linux_wait_1): Move `thread' local definition to block that uses
13548 it. Don't NULL initialize `event_child'.
13549 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13550 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13551 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13552
bdabb078
PA
135532010-04-01 Pedro Alves <pedro@codesourcery.com>
13554
13555 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13556 an extended waitstatus, or by a watchpoint.
13557 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13558 thread was stepping or has been stopped by a watchpoint.
13559
d3bbe7a0
PA
135602010-04-01 Pedro Alves <pedro@codesourcery.com>
13561
13562 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13563 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13564 of another, then delete the previous, and validate all
13565 breakpoints.
13566 (validate_inserted_breakpoint): New.
13567 (delete_disabled_breakpoints): New.
13568 (validate_breakpoints): New.
13569 (check_mem_read): Validate breakpoints before trusting their
13570 shadow. Delete disabled breakpoints.
13571 (check_mem_write): Validate breakpoints before trusting they
13572 should be inserted. Delete disabled breakpoints.
13573 * mem-break.h (validate_breakpoints):
13574 * server.c (handle_query): Validate breakpoints when we see a
13575 qSymbol query.
13576
8b07ae33
PA
135772010-04-01 Pedro Alves <pedro@codesourcery.com>
13578
13579 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13580 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13581 if we could tell there's a GDB breakpoint at stop_pc.
13582 (need_step_over_p): Don't do a step over if we find a GDB
13583 breakpoint at the resume PC.
13584
13585 * mem-break.c (struct raw_breakpoint): New.
13586 (enum bkpt_type): New type `gdb_breakpoint'.
13587 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13588 fields. New field `raw'.
13589 (find_raw_breakpoint_at): New.
13590 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13591 breakpoint instead.
13592 (set_breakpoint_at): Adjust.
13593 (delete_raw_breakpoint): New.
13594 (release_breakpoint): New.
13595 (delete_breakpoint): Rename to...
13596 (delete_breakpoint_1): ... this. Add proc parameter. Use
13597 release_breakpoint. Return ENOENT.
13598 (delete_breakpoint): Reimplement.
13599 (find_breakpoint_at): Delete.
13600 (find_gdb_breakpoint_at): New.
13601 (delete_breakpoint_at): Delete.
13602 (set_gdb_breakpoint_at): New.
13603 (delete_gdb_breakpoint_at): New.
13604 (gdb_breakpoint_here): New.
13605 (set_reinsert_breakpoint): Use release_breakpoint.
13606 (uninsert_breakpoint): Rename to ...
13607 (uninsert_raw_breakpoint): ... this.
13608 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13609 (reinsert_raw_breakpoint): Change parameter type to
13610 raw_breakpoint.
13611 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13612 instead.
13613 (check_breakpoints): Adjust. Use release_breakpoint.
13614 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13615 (breakpoint_inserted_here): Ditto.
13616 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13617 Don't trust the breakpoint's shadow if it is not inserted.
13618 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13619 (delete_all_breakpoints): Adjust.
13620 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13621 use delete_breakpoint_1.
13622
13623 * mem-break.h (breakpoints_supported): Delete declaration.
13624 (set_gdb_breakpoint_at): Declare.
13625 (gdb_breakpoint_here): Declare.
13626 (delete_breakpoint_at): Delete.
13627 (delete_gdb_breakpoint_at): Declare.
13628
13629 * server.h (struct raw_breakpoint): Forward declare.
13630 (struct process_info): New field `raw_breakpoints'.
13631
13632 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13633 breakpoints.
13634
6bf5e0ba
PA
136352010-03-24 Pedro Alves <pedro@codesourcery.com>
13636
13637 * linux-low.c (status_pending_p_callback): Fix comment.
13638 (linux_wait_for_event_1): Move most of the internal breakpoint
13639 handling from here...
13640 (linux_wait_1): ... to here.
13641 (count_events_callback): New.
13642 (select_singlestep_lwp_callback): New.
13643 (select_event_lwp_callback): New.
13644 (cancel_breakpoints_callback): New.
13645 (select_event_lwp): New.
13646 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13647 priority to all LWPs that have had events that should be reported
13648 to the client. Cancel breakpoints when about to reporting the
13649 event to the client, not while stopping lwps. No longer cancel
13650 finished single-steps here.
13651 (cancel_finished_single_step): Delete.
13652 (cancel_finished_single_steps): Delete.
13653
414a389f
PA
136542010-03-24 Pedro Alves <pedro@codesourcery.com>
13655
13656 * mem-break.c (enum bkpt_type): New.
13657 (struct breakpoint): New field `type'.
13658 (set_breakpoint_at): Change return type to struct breakpoint
13659 pointer. Set type to `other_breakpoint' by default.
13660 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13661 in the breakpoint list.
13662 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13663 (reinsert_breakpoint): Rename to ...
13664 (reinsert_raw_breakpoint): ... this.
13665 (reinsert_breakpoints_at): Adjust.
13666 * mem-break.h (struct breakpoint): Declare.
13667 (set_breakpoint_at): Change return type to struct breakpoint
13668 pointer.
13669
2280c721
PA
136702010-03-24 Pedro Alves <pedro@codesourcery.com>
13671
13672 * server.c (handle_query): Assign, not compare.
13673
d50171e4
PA
136742010-03-24 Pedro Alves <pedro@codesourcery.com>
13675
13676 Teach linux gdbserver to step-over-breakpoints.
13677
13678 * linux-low.c (can_hardware_single_step): New.
13679 (supports_breakpoints): New.
13680 (handle_extended_wait): If stopping threads, read the stop pc of
13681 the new cloned LWP.
13682 (get_pc): New.
13683 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13684 low target doesn't support retrieving the PC.
13685 (add_lwp): Set last_resume_kind to resume_continue.
13686 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13687 (linux_attach): Don't clear stop_expected. Set the lwp's
13688 last_resume_kind to resume_stop.
13689 (linux_detach_one_lwp): Don't check for removed breakpoints.
13690 (check_removed_breakpoint): Delete.
13691 (status_pending_p): Rename to ...
13692 (status_pending_p_callback): ... this. Don't check for removed
13693 breakpoints. Don't consider threads that are stopped from GDB's
13694 perspective.
13695 (linux_wait_for_lwp): Always read the stop_pc here.
13696 (cancel_breakpoint): New.
13697 (step_over_bkpt): New global.
13698 (linux_wait_for_event_1): Implement stepping over breakpoints.
13699 (gdb_wants_lwp_stopped): New.
13700 (gdb_wants_all_stopped): New.
13701 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13702 single-step traps here. Store the thread's last reported target
13703 wait status.
13704 (send_sigstop): Don't clear stop_expected. Always set it,
13705 instead.
13706 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13707 (cancel_finished_single_step): New.
13708 (cancel_finished_single_steps): New.
13709 (wait_for_sigstop): Don't cancel finished single-step traps here.
13710 (linux_resume_one_lwp): Don't check for removed breakpoints.
13711 Don't set `step' on non-hardware step archs.
13712 (linux_set_resume_request): Ignore resume_stop requests if already
13713 stopping or stopped. Set the lwp's last_resume_kind.
13714 (resume_status_pending_p): Don't check for removed breakpoints.
13715 (need_step_over_p): New.
13716 (start_step_over): New.
13717 (finish_step_over): New.
13718 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13719 requests. Clear the thread's last reported target waitstatus.
13720 Don't use the `suspended' flag. Don't consider pending breakpoints.
13721 (linux_resume): Start a step-over if necessary.
13722 (proceed_one_lwp): New.
13723 (proceed_all_lwps): New.
13724 (unstop_all_lwps): New.
13725 * linux-low.h (struct lwp_info): Rewrite comment for the
13726 `suspended' flag. Add the `stop_pc' field. Delete the
13727 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13728 Add `'last_resume_kind' and `need_step_over' fields.
13729 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13730 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13731 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13732 (set_raw_breakpoint_at): New.
13733 (set_breakpoint_at): Rewrite to use it.
13734 (reinsert_breakpoint_handler): Delete.
13735 (set_reinsert_breakpoint): New.
13736 (reinsert_breakpoint_by_bp): Delete.
13737 (delete_reinsert_breakpoints): New.
13738 (uninsert_breakpoint): Rewrite.
13739 (uninsert_breakpoints_at): New.
13740 (reinsert_breakpoint): Rewrite.
13741 (reinsert_breakpoints_at): New.
13742 (check_breakpoints): Rewrite.
13743 (breakpoint_here): New.
13744 (breakpoint_inserted_here): New.
13745 (check_mem_read): Adjust.
13746 * mem-break.h (breakpoints_supported, breakpoint_here)
13747 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13748 (reinsert_breakpoint_by_bp): Delete declaration.
13749 (delete_reinsert_breakpoints): Declare.
13750 (reinsert_breakpoint): Delete declaration.
13751 (reinsert_breakpoints_at): Declare.
13752 (uninsert_breakpoint): Delete declaration.
13753 (uninsert_breakpoints_at): Declare.
13754 (check_breakpoints): Adjust prototype.
13755 * server.h: Adjust include order.
13756 (struct thread_info): Declare here. Add a `last_status' field.
13757
30ba68cb
MS
137582010-03-23 Michael Snyder <msnyder@vmware.com>
13759
13760 * server.c (crc32): New function.
13761 (handle_query): Add handling for 'qCRC:' request.
13762
b9a881c2
PA
137632010-03-23 Pedro Alves <pedro@codesourcery.com>
13764
13765 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13766 lwp had been stopped by a watchpoint.
13767
e92d13d5
PA
137682010-03-16 Pedro Alves <pedro@codesourcery.com>
13769
13770 * server.h (internal_error): Declare.
13771 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13772 * utils.c (internal_error): New function.
13773
64daa791
AS
137742010-03-15 Andreas Schwab <schwab@redhat.com>
13775
13776 * configure.srv: Fix typo setting srv_regobj.
13777
f52cd8cd
PA
137782010-03-15 Pedro Alves <pedro@codesourcery.com>
13779
13780 * linux-low.c (fetch_register): Avoid passing a non string literal
13781 format to `error'.
13782 (usr_store_inferior_registers): Ditto.
13783
93ae6fdc
PA
137842010-03-14 Pedro Alves <pedro@codesourcery.com>
13785
13786 * linux-low.c (linux_write_memory): Bail out early if peeking
13787 memory failed.
13788
c3adc08c
PA
137892010-03-14 Pedro Alves <pedro@codesourcery.com>
13790
13791 * linux-low.h (struct lwp_info): New fields
13792 `stopped_by_watchpoint' and `stopped_data_address'.
13793 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13794 here, and cache them in the lwp object.
13795 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13796 directly.
13797 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13798 field.
13799 (linux_stopped_by_watchpoint): Rewrite.
13800 (linux_stopped_data_address): Rewrite.
13801
bce522a2
PA
138022010-03-06 Simo Melenius <simo.melenius@iki.fi>
13803
13804 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13805 switching the current inferior, not before.
13806
90884b2b
L
138072010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13808
13809 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13810 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13811 i386-linux.c and amd64-linux.c.
13812 (reg-i386.o): Removed.
13813 (reg-i386.c): Likewise.
13814 (reg-i386-linux.o): Likewise.
13815 (reg-i386-linux.c): Likewise.
13816 (reg-x86-64.o): Likewise.
13817 (reg-x86-64.c): Likewise.
13818 (reg-x86-64-linux.o): Likewise.
13819 (reg-x86-64-linux.c): Likewise.
13820 (i386.o): New.
13821 (i386.c): Likewise.
13822 (i386-linux.o): Likewise.
13823 (i386-linux.c): Likewise.
13824 (amd64.o): Likewise.
13825 (amd64.c): Likewise.
13826 (amd64-linux.o): Likewise.
13827 (amd64-linux.c): Likewise.
13828
13829 * configure.srv (srv_i386_regobj): New.
13830 (srv_i386_linux_regobj): Likewise.
13831 (srv_amd64_regobj): Likewise.
13832 (srv_amd64_linux_regobj): Likewise.
13833 (srv_i386_32bit_xmlfiles): Likewise.
13834 (srv_i386_64bit_xmlfiles): Likewise.
13835 (srv_i386_xmlfiles): Likewise.
13836 (srv_amd64_xmlfiles): Likewise.
13837 (srv_i386_linux_xmlfiles): Likewise.
13838 (srv_amd64_linux_xmlfiles): Likewise.
13839 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13840 srv_xmlfiles to $srv_i386_xmlfiles.
13841 (i[34567]86-*-mingw32ce*): Likewise.
13842 (i[34567]86-*-mingw*): Likewise.
13843 (i[34567]86-*-nto*): Likewise.
13844 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13845 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13846 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13847 (x86_64-*-linux*): Likewise.
13848
13849 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13850 (init_registers_amd64_linux): New.
13851 (x86_arch_setup): Replace init_registers_x86_64_linux with
13852 init_registers_amd64_linux.
13853
193f13e6
MK
138542010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13855
13856 * configure.ac: Check for libdl. If it is not available link against
13857 static libthread_db.
13858 * configure: Regenerate.
13859
85d721b8
PA
138602010-02-22 Pedro Alves <pedro@codesourcery.com>
13861
13862 PR9605
13863
13864 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13865 handing a read watchpoint.
13866 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13867
6076632b
DE
138682010-02-12 Doug Evans <dje@google.com>
13869
13870 * linux-low.c (linux_supports_tracefork_flag): Document.
13871 (linux_look_up_symbols): Add comment.
13872
3327ccf7
L
138732010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13874
13875 * regcache.c (supply_register): Clear regcache if buf is NULL.
13876
0718675c 138772010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13878 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13879
13880 * inferiors.c (find_inferior): Add function documentation.
13881 (unloaded_dll): Handle the case where the unloaded dll has not
13882 been previously registered in the dll list.
13883
177321bd
DJ
138842010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13885
13886 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13887 (thumb2_breakpoint): New.
13888 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13889
2b009048
DJ
138902010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13891
13892 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13893 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13894 breakpoints.
13895
3be029c7
PA
138962010-01-21 Pedro Alves <pedro@codesourcery.com>
13897
13898 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13899
18f5de3b
JK
139002010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13901
13902 * linux-s390-low.c (s390_collect_ptrace_register)
13903 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13904
3743bb4f
DE
139052010-01-21 Doug Evans <dje@google.com>
13906
14ce3065
DE
13907 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13908 (PTRACE_ARG4_TYPE): New macro.
13909 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13910 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13911 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13912 (usr_store_inferior_registers): Ditto.
13913 (linux_read_memory, linux_write_memory): Ditto.
13914 (linux_test_for_tracefork): Ditto.
13915
3743bb4f
DE
13916 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13917 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13918
8b315be5
PA
139192010-01-21 Pedro Alves <pedro@codesourcery.com>
13920
13921 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13922 target.
13923
85492558
PA
139242010-01-21 Pedro Alves <pedro@codesourcery.com>
13925
13926 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13927 prototype to take a regcache. Adjust.
13928
442ea881
PA
139292010-01-20 Pedro Alves <pedro@codesourcery.com>
13930
13931 * regcache.h (struct thread_info): Forward declare.
13932 (struct regcache): New.
13933 (new_register_cache): Adjust prototype.
13934 (get_thread_regcache): Declare.
13935 (free_register_cache): Adjust prototype.
13936 (registers_to_string, registers_from_string): Ditto.
13937 (supply_register, supply_register_by_name, collect_register)
13938 (collect_register_as_string, collect_register_by_name): Ditto.
13939 * regcache.c (struct inferior_regcache_data): Delete.
13940 (get_regcache): Rename to ...
13941 (get_thread_regcache): ... this. Adjust. Switch inferior before
13942 fetching registers.
13943 (regcache_invalidate_one): Adjust.
13944 (regcache_invalidate): Fix prototype.
13945 (new_register_cache): Return the new register cache.
13946 (free_register_cache): Change prototype.
13947 (realloc_register_cache): Adjust.
13948 (registers_to_string): Change prototype to take a regcache. Adjust.
13949 (registers_from_string): Ditto.
13950 (register_data): Ditto.
13951 (supply_register): Ditto.
13952 (supply_register_by_name): Ditto.
13953 (collect_register): Ditto.
13954 (collect_register_as_string): Ditto.
13955 (collect_register_by_name): Ditto.
13956 * server.c (process_serial_event): Adjust.
13957 * linux-low.h (regset_fill_func, regset_store_func): Change
13958 prototype.
13959 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13960 Change prototype.
13961 * linux-low.c (get_stop_pc): Adjust.
13962 (check_removed_breakpoint): Adjust.
13963 (linux_wait_for_event): Adjust.
13964 (linux_resume_one_lwp): Adjust.
13965 (fetch_register): Add regcache parameter. Adjust.
13966 (usr_store_inferior_registers): Ditto.
13967 (regsets_fetch_inferior_registers): Ditto.
13968 (regsets_store_inferior_registers): Ditto.
13969 (linux_fetch_registers, linux_store_registers): Ditto.
13970 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13971 regcache. Adjust.
43aaf8b6
PA
13972 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13973 Ditto.
442ea881
PA
13974 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13975 prototype to take a regcache.
13976 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13977 * remote-utils.c (convert_ascii_to_int, outreg)
13978 (prepare_resume_reply): Change prototype to take a regcache.
13979 Adjust.
13980 * target.h (struct target_ops) <fetch_registers, store_registers>:
13981 Change prototype to take a regcache.
13982 (fetch_inferior_registers, store_inferior_registers): Change
13983 prototype to take a regcache. Adjust.
13984 * proc-service.c (ps_lgetregs): Adjust.
13985 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13986 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13987 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13988 take a regcache. Adjust.
13989 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13990 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13991 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13992 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13993 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13994 (cris_cannot_fetch_register):
13995 (cris_breakpoint_at): Change prototype to take a regcache.
13996 Adjust.
13997 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13998 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13999 to take a regcache. Adjust.
14000 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14001 Adjust.
14002 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14003 take a regcache. Adjust.
14004 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14005 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14006 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14007 * linux-mips-low.c (mips_get_pc):
14008 (mips_set_pc): Change prototype to take a regcache. Adjust.
14009 (mips_reinsert_addr): Adjust.
14010 (mips_collect_register): Change prototype to take a regcache.
14011 Adjust.
14012 (mips_supply_register):
14013 (mips_collect_register_32bit, mips_supply_register_32bit)
14014 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14015 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14016 * linux-ppc-low.c (ppc_supply_ptrace_register)
14017 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14018 (parse_spufs_run): Adjust.
14019 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14020 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14021 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14022 take a regcache. Adjust.
14023 * linux-s390-low.c (s390_collect_ptrace_register)
14024 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14025 (s390_set_pc): Change prototype to take a regcache. Adjust.
14026 (s390_arch_setup): Adjust.
14027 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14028 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14029 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14030 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14031 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14032 regcache. Adjust.
14033 (sparc_breakpoint_at): Adjust.
14034 * linux-xtensa-low.c (xtensa_fill_gregset):
14035 (xtensa_store_gregset):
14036 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14037 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14038 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14039 prototype to take a regcache. Adjust.
14040 * win32-arm-low.c (arm_fetch_inferior_register)
14041 (arm_store_inferior_register): Change prototype to take a
14042 regcache. Adjust.
14043 * win32-i386-low.c (i386_fetch_inferior_register)
14044 (i386_store_inferior_register): Change prototype to take a
14045 regcache. Adjust.
14046 * win32-low.c (child_fetch_inferior_registers)
14047 (child_store_inferior_registers): Change prototype to take a
14048 regcache. Adjust.
14049 (win32_wait): Adjust.
14050 (win32_fetch_inferior_registers): Change prototype to take a
14051 regcache. Adjust.
14052 (win32_store_inferior_registers): Adjust.
14053 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14054 store_inferior_register>: Change prototype to take a regcache.
14055
60c3d7b0
DE
140562010-01-20 Doug Evans <dje@google.com>
14057
14058 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14059 #ifdef.
14060 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14061 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14062
dc146f7c
VP
140632010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14064
14065 * linux-low.c (linux_core_of_thread): New.
14066 (compare_ints, show_process, list_threads): New.
14067 (linux_qxfer_osdata): Report threads and cores.
14068 (linux_target_op): Register linux_core_of_thread.
14069 * remote-utils.c (prepare_resume_reply): Report the core.
14070 (buffer_xml_printf): Support %d specifier.
14071 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14072 New.
14073 (handle_query): Handle qXfer:threads. Announce availability
14074 thereof.
14075 * target.h (struct target_ops): New field core_of_thread.
14076
7803799a
UW
140772010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14078
14079 * Makefile.in (clean): Remove new generated files.
14080 (reg-s390.o, reg-s390.c): Remove rules.
14081 (reg-s390x.o, reg-s390x.c): Likewise.
14082 (s390-linux32.o, s390-linux32.c): Add rules.
14083 (s390-linux64.o, s390-linux64.c): Likewise.
14084 (s390x-linux64.o, s390x-linux64.c): Likewise.
14085 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14086 * linux-s390-low.c: Include <elf.h>.
14087 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14088 (init_registers_s390): Remove prototype.
14089 (init_registers_s390x): Likewise.
14090 (init_registers_s390_linux32): Add prototype.
14091 (init_registers_s390_linux64): Likewise.
14092 (init_registers_s390x_linux64): Likewise.
14093 (s390_num_regs_3264): New define.
14094 (s390_regmap_3264): New global variable.
14095 (s390_cannot_fetch_register): Remove obsolete check.
14096 (s390_cannot_store_register): Likewise.
14097 (s390_collect_ptrace_register): Handle upper/lower register halves.
14098 (s390_supply_ptrace_register): Likewise.
14099 (s390_fill_gregset): Update to register number changes.
14100 (s390_get_hwcap): New routine.
14101 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14102 Install appropriate regmap and register set.
14103
6e7ffa39
JB
141042010-01-01 Joel Brobecker <brobecker@adacore.com>
14105
14106 * server.c (gdbserver_version): Update copyright year to 2010.
14107 * gdbreplay.c (gdbreplay_version): Likewise.
14108
957f3f49
DE
141092009-12-28 Doug Evans <dje@google.com>
14110
14111 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14112 elf/external.h. Include <elf.h> instead but only if necessary.
14113
ca5c370d
PA
141142009-12-28 Pedro Alves <pedro@codesourcery.com>
14115
14116 * linux-low.c (linux_remove_process): Remove `detaching'
14117 parameter. Don't release/detach from thread_db here.
14118 (linux_kill): Release/detach from thread_db here, ...
14119 (linux_detach): ... and here, before actually detaching.
14120 (linux_wait_1): ... and here, when a process exits.
14121 * thread-db.c (any_thread_of): New.
14122 (thread_db_free): Switch the current inferior to a thread of the
14123 passed in process.
14124
4ee62156
DE
141252009-12-21 Doug Evans <dje@google.com>
14126
d90e6a88
DE
14127 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14128
c5f62d5f
DE
14129 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14130 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14131 warning ifndef __NR_tkill. Move setting of errno there too.
14132 Delete unnecessary resetting of errno after syscall.
14133 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14134
10e86dd7
DE
14135 * configure.ac: Check for dladdr.
14136 * config.in: Regenerate.
14137 * configure: Regenerate.
14138 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14139 (try_thread_db_load): Update.
14140
4ee62156
DE
14141 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14142
00f515da
DE
141432009-12-18 Doug Evans <dje@google.com>
14144
e9464885
DE
14145 * event-loop.c: Include unistd.h if it exists.
14146
07d4f67e
DE
14147 * linux-low.c (my_waitpid): Move definition away from being in
14148 between linux_tracefork_child/linux_test_for_tracefork.
14149
00f515da
DE
14150 * gdb_proc_service.h (psaddr_t): Fix type.
14151 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14152 signature to match glibc.
14153
1de1badb
DE
141542009-12-16 Doug Evans <dje@google.com>
14155
14156 * linux-low.c (linux_read_memory): Fix argument to read.
14157
aeeb81d1
PA
141582009-11-26 Pedro Alves <pedro@codesourcery.com>
14159
14160 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14161 events, don't leave current_inferior pointing at null.
14162
10357975
PA
141632009-11-26 Pedro Alves <pedro@codesourcery.com>
14164
14165 * win32-low.c (LOG): Delete.
14166 (OUTMSG): Output to stderr.
14167 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14168 on compile time LOG macro.
14169 (win32_wait): Fix debug output.
14170
cf6e3471
PA
141712009-11-26 Pedro Alves <pedro@codesourcery.com>
14172
14173 * win32-low.c (win32_add_one_solib): If the dll name is
14174 "ntdll.dll", prepend the system directory to the dll path.
14175
0c85e18e
MK
141762009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14179
9ac544ce 141802009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14181 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14182
14183 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14184 * configure.ac: Check for __mcoldfire__ and set
14185 gdb_cv_m68k_is_coldfire.
14186 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14187 reg-cf.o and reg-m68k.o.
14188 * configure: Regenerated.
14189
fd7dd3e6
PA
141902009-11-16 Pedro Alves <pedro@codesourcery.com>
14191
14192 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14193 Pass it to thread_db_free.
14194 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14195 proper `detaching' argument to linux_remove_process.
14196 * linux-low.h (thread_db_free): Add `detaching' parameter.
14197 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14198 to thread_db_free.
14199 (thread_db_free): Add `detaching' parameter. Only
14200 call td_ta_clear_event if detaching from process.
14201
75aa492e
MK
142022009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14203
14204 * thread-db.c (thread_db_free): Fix typo.
14205
21e1bee4
PP
142062009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14207
14208 PR gdb/10838
14209 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14210
8838b45e
NS
142112009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14212
14213 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14214 with an i686 compiler.
14215 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14216 needed.
14217 * configure: Rebuilt.
14218
8a35fb51
SL
142192009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14220
14221 PR gdb/10783
14222
14223 * server.c (handle_search_memory_1): Correct read_addr initialization
14224 in loop for searching subsequent chunks.
14225
96f15937
PP
142262009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14227
14228 * configure.ac: New --with-libthread-db option.
14229 * thread-db.c: Allow direct dependence on libthread_db.
14230 (thread_db_free): Adjust.
14231 * config.in: Regenerate.
14232 * configure: Likewise.
889bf7c5 14233
5f7d1694
PP
142342009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14235
14236 PR gdb/10757
14237 * thread-db.c (attach_thread): New function.
14238 (maybe_attach_thread): Return success/failure.
14239 (find_new_threads_callback): Adjust.
889bf7c5
PA
14240 (thread_db_find_new_threads): Loop until no new threads.
14241
88e3b899
PA
142422009-10-13 Pedro Alves <pedro@codesourcery.com>
14243
14244 * proc-service.c (ps_lgetregs): Formatting.
14245
cdbfd419
PP
142462009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14247
14248 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14249 * configure.ac: Adjust.
14250 * linux-low.h (struct process_info_private): Move members to struct
14251 thread_db.
14252 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14253 * linux-low.c (linux_remove_process): Adjust.
14254 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14255 * server.c (handle_query): Move code ...
14256 (handle_monitor_command): ... here. New function.
14257 * target.h (struct target_ops): New member.
14258 * thread-db.c (struct thread_db): New.
14259 (libthread_db_search_path): New variable.
14260 (thread_db_create_event, thread_db_enable_reporting)
14261 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14262 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14263 (try_thread_db_load_1, dladdr_to_soname): New functions.
14264 (try_thread_db_load, thread_db_load_search): New functions.
14265 (thread_db_init): Search for libthread_db.
14266 (thread_db_free): New function.
14267 (thread_db_handle_monitor_command): Likewise.
14268 * config.in: Regenerate.
14269 * configure: Regenerate.
889bf7c5 14270
4168d2d6
UW
142712009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14272
14273 * spu-low.c (spu_kill): Wait for inferior to terminate.
14274 Call clear_inferiors.
14275 (spu_detach): Call clear_inferiors.
14276
81ecdfbb
RW
142772009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14278
14279 * aclocal.m4: Regenerate.
14280 * config.in: Likewise.
14281 * configure: Likewise.
14282
0b9ff2c0
UW
142832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14284
14285 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14286 (parse_spufs_run): New function.
14287 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14288 (ppc_breakpoint_at): Handle SPU breakpoints.
14289
efcbbd14
UW
142902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14291
14292 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14293 (SPUFS_MAGIC): Define.
14294 (spu_enumerate_spu_ids): New function.
14295 (linux_qxfer_spu): New function.
14296 (linux_target_ops): Install linux_qxfer_spu.
14297
f4d9bade
UW
142982009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14299
14300 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14301 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14302 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14303 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14304 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14305 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14306 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14307 (init_registers_powerpc_cell32l): Add prototype.
14308 (init_registers_powerpc_cell64l): Likewise.
14309 (ppc_arch_setup): Detect Cell/B.E. architecture.
14310
96e946ca
RW
143112009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14312
14313 * Makefile.in (datarootdir): New variable.
14314
58d6951d
DJ
143152009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * linux-low.c (linux_write_memory): Update debugging output.
14318 * Makefile.in (clean): Add new descriptions.
14319 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14320 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14321 * configure.srv: Add new files for arm*-*-linux*.
14322 * linux-arm-low.c: Add new declarations.
14323 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14324 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14325 (HWCAP_VFPv3D16): New.
14326 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14327 instead of __IWMMXT__.
14328 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14329 (arm_arch_setup): New.
14330 (target_regsets): Remove #ifdef. Add VFP regset.
14331 (the_low_target): Use arm_arch_setup.
14332
12b42a12
DJ
143332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14336 the main thread again.
14337
ac8c974e
AR
143382009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14339
14340 Adding Neutrino gdbserver.
14341 * configure: Regenerated.
14342 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14343 * configure.srv (i[34567]86-*-nto*): New target.
14344 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14345 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14346 (nto_comctrl) [__QNX__]: New function.
14347 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14348
4424e0c3 143492009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14350
14351 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14352 srv_tgtobj.
14353
912cf4ba
PA
143542009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14355 Pedro Alves <pedro@codesourcery.com>
14356
14357 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14358 don't support CONTEXT_EXTENDED_REGISTERS.
14359 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14360 (the_low_target): Install them.
14361 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14362 failing with ERROR_PIPE_NOT_CONNECTED.
14363
aa5ca48f
DE
143642009-06-30 Doug Evans <dje@google.com>
14365 Pierre Muller <muller@ics.u-strasbg.fr>
14366
14367 Add h/w watchpoint support to x86-linux, win32-i386.
14368 * Makefile.in (SFILES): Add i386-low.c
14369 (i386_low_h): Define.
14370 (i386-low.o): Add dependencies.
14371 (linux-x86-low.o): Add i386-low.h dependency.
14372 (win32-i386-low.o): Ditto.
14373 * i386-low.c: New file.
14374 * i386-low.h: New file.
14375 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14376 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14377 * linux-low.c (linux_add_process): Initialize arch_private.
14378 (linux_remove_process): Free arch_private.
14379 (add_lwp): Initialize arch_private.
14380 (delete_lwp): Free arch_private.
14381 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14382 provided.
14383 * linux-low.h (process_info_private): New member arch_private.
14384 (lwp_info): New member arch_private.
14385 (linux_target_ops): New members new_process, new_thread,
14386 prepare_to_resume.
14387 (ptid_of): New macro.
14388 * linux-x86-low.c: Include stddef.h, i386-low.h.
14389 (arch_process_info): New struct.
14390 (arch_lwp_info): New struct.
14391 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14392 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14393 (i386_dr_low_get_status): New function.
14394 (x86_insert_point, x86_remove_point): New functions.
14395 (x86_stopped_by_watchpoint): New function.
14396 (x86_stopped_data_address): New function.
14397 (x86_linux_new_process, x86_linux_new_thread): New functions.
14398 (x86_linux_prepare_to_resume): New function.
14399 (the_low_target): Add entries for insert_point, remove_point,
14400 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14401 prepare_to_resume.
14402 * server.c (debug_hw_points): New global.
14403 (monitor_show_help): Document set debug-hw-points.
14404 (handle_query): Process "set debug-hw-points".
14405 * server.h (debug_hw_points): Declare.
14406 (paddress): Declare.
14407 * utils.c (NUMCELLS, CELLSIZE): New macros.
14408 (get_sell, xsnprintf, paddress): New functions.
14409 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14410 remove_point, stopped_by_watchpoint, stopped_data_address.
14411 * win32-i386-low.c: Include i386-low.h.
14412 (debug_reg_state): Replaces dr.
14413 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14414 (i386_dr_low_get_status): New function.
14415 (i386_insert_point, i386_remove_point): New functions.
14416 (i386_stopped_by_watchpoint): New function.
14417 (i386_stopped_data_address): New function.
14418 (i386_initial_stuff): Update.
14419 (get_thread_context,set_thread_context,i386_thread_added): Update.
14420 (the_low_target): Add entries for insert_point,
14421 remove_point, stopped_by_watchpoint, stopped_data_address.
14422 * win32-low.c (win32_insert_watchpoint): New function.
14423 (win32_remove_watchpoint): New function.
14424 (win32_stopped_by_watchpoint): New function.
14425 (win32_stopped_data_address): New function.
14426 (win32_target_ops): Add entries for insert_watchpoint,
14427 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14428 * win32-low.h (win32_target_ops): New members insert_point,
14429 remove_point, stopped_by_watchpoint, stopped_data_address.
14430
d993e290
PA
144312009-06-25 Pedro Alves <pedro@codesourcery.com>
14432
14433 * server.c (process_serial_event): Re-return unsupported, not
14434 error, if the type isn't recognized. Re-allow supporting only
14435 insert or remove packets. Also call require_running for
14436 breakpoints. Add missing break statement to default case. Tidy.
14437 * target.h (struct target_ops): Rename insert_watchpoint to
14438 insert_point, and remove_watchpoint to remove_point.
14439
14440 * linux-low.h (struct linux_target_ops): Likewise.
14441 * linux-low.c (linux_insert_watchpoint): Rename to ...
14442 (linux_insert_point): ... this. Adjust.
14443 (linux_remove_watchpoint): Rename to ...
14444 (linux_remove_point): ... this. Adjust.
14445 (linux_target_ops): Adjust.
14446 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14447 (cris_insert_point): ... this.
14448 (cris_remove_watchpoint): Rename to ...
14449 (cris_remove_point): ... this.
14450 (the_low_target): Adjust.
14451
0f54c268
PM
144522009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14453
14454 * server.c (handle_v_kill): Pass signal_pid to
14455 kill_inferior if multi_process is zero.
14456
c6314022
AR
144572009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14458
14459 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14460 * target.h (target_ops): Comment for *_watchpoint to make it clear
14461 the functions can get types '0' and '1'.
14462
4463ce24
AR
144632009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14464
14465 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14466 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14467 * regcache.c (get_regcache): Likewise.
14468 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14469 * win32-low.c (child_fetch_inferior_registers): Remove check for
14470 regno 0.
14471
cf8fd78b
PA
144722009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14473 Pedro Alves <pedro@codesourcery.com>
14474
14475 * target.h (struct target_ops) <supports_multi_process>: New
14476 callback.
14477 (target_supports_multi_process): New.
14478 * server.c (handle_query): Even if GDB reports support, only
14479 enable multi-process if the target also supports it. Report
14480 multi-process support only if the target backend supports it.
14481 * linux-low.c (linux_supports_multi_process): New function.
14482 (linux_target_ops): Install it as target_supports_multi_process
14483 callback.
14484
47c0c975
DE
144852009-05-24 Doug Evans <dje@google.com>
14486
e09875d4
DE
14487 Global renaming of find_thread_pid to find_thread_ptid.
14488 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14489 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14490 All callers updated.
14491
e27d73f6
DE
14492 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14493 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14494 directly.
14495
47c0c975
DE
14496 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14497 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14498 (linux_resume_one_lwp): Ditto.
14499
2acc282a
DE
145002009-05-23 Doug Evans <dje@google.com>
14501
14502 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14503 from struct inferior_list_entry * to struct lwp_info *.
14504 All callers updated.
14505
9f1036c1
DE
145062009-05-13 Doug Evans <dje@google.com>
14507
14508 * linux-x86-low.c: Don't include assert.h.
14509 (x86_siginfo_fixup): Use fatal, not assert.
14510 (x86_arch_setup): Fix comment.
14511
d0722149
DE
145122009-05-12 Doug Evans <dje@google.com>
14513
14514 Biarch support for i386/amd64 gdbserver.
14515 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14516 Add linux-x86-low.c.
14517 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14518 (linux-x86-low.o): Add.
14519 * linux-x86-64-low.c: Delete.
14520 * linux-i386-low.c: Delete.
14521 * linux-x86-low.c: New file.
14522 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14523 linux-x86-low.o.
14524 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14525 linux-x86-low.o.
14526 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14527 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14528 (linux_child_pid_to_exec_file): New function.
14529 (elf_64_header_p, elf_64_file_p): New functions.
14530 (siginfo_fixup): New function.
14531 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14532 give target a chance to convert layout.
14533 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14534 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14535
fdeb2a12
DE
145362009-05-07 Doug Evans <dje@google.com>
14537
14538 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14539 (regsets_store_inferior_registers): Ditto.
14540
a6dbe5df
PA
145412009-05-06 Pedro Alves <pedro@codesourcery.com>
14542
14543 PR server/10048
14544
14545 * linux-low.c (must_set_ptrace_flags): Delete.
14546 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14547 of the global.
14548 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14549 `lwp->must_set_ptrace_flags' instead.
ba42693b 14550 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14551 (linux_wait_1): ... not here.
14552
5091eb23
DE
145532009-04-30 Doug Evans <dje@google.com>
14554
9f767825
DE
14555 * inferiors.c (started_inferior_callback): New function.
14556 (attached_inferior_callback): New function.
14557 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14558 * server.c (print_started_pid, print_attached_pid): New functions.
14559 (detach_or_kill_for_exit): New function.
14560 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14561 * server.h (have_started_inferiors_p): Declare.
14562 (have_attached_inferiors_p): Declare.
14563
5091eb23
DE
14564 * inferiors.c (remove_process): Fix memory leak, free process.
14565 * linux-low.c (linux_remove_process): New function.
14566 (linux_kill): Call it instead of remove_process.
14567 (linux_detach, linux_wait_1): Ditto.
14568
155c8968
PA
145692009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14570
14571 * configure.srv: Add x86 Windows CE target.
14572
7fe519cb
UW
145732009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14574
14575 * inferiors.c (get_thread_process): Make global.
14576 * server.h (get_thread_process): Add prototype.
14577 * thread-db.c (find_one_thread): Use get_thread_process
14578 instead of current_process.
14579 (thread_db_get_tls_address): Do not crash if called when
14580 thread layer is not yet initialized.
14581
5472f405
UW
145822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14583
14584 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14585 * spu-low.c (current_tid): Rename to ...
14586 (current_ptid): ... this.
14587 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14588 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14589 ptid_get_lwp (current_ptid) instead of current_tid.
14590 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14591 instead of current_tid. Use find_process_pid to verify pid
14592 argument is valid. Pass proper argument to remove_process.
14593 (spu_thread_alive): Compare current_ptid instead of current_tid.
14594 (spu_resume): Likewise.
14595
55ac2b99
PA
145962009-04-02 Pedro Alves <pedro@codesourcery.com>
14597
14598 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14599 variable.
14600
95954743
PA
146012009-04-01 Pedro Alves <pedro@codesourcery.com>
14602
14603 Implement the multiprocess extensions, and add linux multiprocess
14604 support.
14605
14606 * server.h (ULONGEST): Declare.
14607 (struct ptid, ptid_t): New.
14608 (minus_one_ptid, null_ptid): Declare.
14609 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14610 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14611 (struct inferior_list_entry): Change `id' type from unsigned from
14612 to ptid_t.
14613 (struct sym_cache, struct breakpoint, struct
14614 process_info_private): Forward declare.
14615 (struct process_info): Declare.
14616 (current_process): Declare.
14617 (all_processes): Declare.
14618 (initialize_inferiors): Declare.
14619 (add_thread): Adjust to use ptid_t.
14620 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14621 (add_process, remove_process, find_thread_pid): Declare.
14622 (find_inferior_id): Adjust to use ptid_t.
14623 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14624 (multi_process): Declare.
14625 (push_event): Adjust to use ptid_t.
14626 (read_ptid, write_ptid): Declare.
14627 (prepare_resume_reply): Adjust to use ptid_t.
14628 (clear_symbol_cache): Declare.
14629 * inferiors.c (all_processes): New.
14630 (null_ptid, minus_one_ptid): New.
14631 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14632 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14633 (add_thread): Change unsigned long to ptid. Remove gdb_id
14634 parameter. Adjust.
14635 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14636 (gdb_id_to_thread): Rename to ...
14637 (find_thread_pid): ... this. Change unsigned long to ptid.
14638 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14639 (loaded_dll, pull_pid_from_list): Adjust.
14640 (add_process, remove_process, find_process_pid)
14641 (get_thread_process, current_process, initialize_inferiors): New.
14642 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14643 (struct target_waitstatus) <related_pid>: Ditto.
14644 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14645 return type to int.
14646 (struct target_ops) <join>: Add `pid' argument.
14647 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14648 (struct target_ops) <wait>: Add `ptid' field. Change return type
14649 to ptid.
14650 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14651 (mywait): Add `ptid' argument. Change return type to ptid_t.
14652 (target_pid_to_str): Declare.
14653 * target.c (set_desired_inferior): Adjust to use ptids.
14654 (mywait): Add new `ptid' argument. Adjust.
14655 (target_pid_to_str): New.
14656 * mem-break.h (free_all_breakpoints): Declare.
14657 * mem-break.c (breakpoints): Delelete.
14658 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14659 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14660 to use per-process breakpoint list.
14661 (free_all_breakpoints): New.
14662 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14663 (symbol_cache, all_symbols_looked_up): Delete.
14664 (hexchars): New.
14665 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14666 read_ptid): New.
14667 (prepare_resume_reply): Change ptid argument's type from unsigned
14668 long to ptid_t. Adjust. Implement W;process and X;process.
14669 (free_sym_cache, clear_symbol_cache): New.
14670 (look_up_one_symbol): Adjust to per-process symbol cache. *
14671 * server.c (cont_thread, general_thread, step_thread): Change type
14672 to ptid_t.
14673 (attached): Delete.
14674 (multi_process): New.
14675 (last_ptid): Change type to ptid_t.
14676 (struct vstop_notif) <ptid>: Change type to ptid_t.
14677 (queue_stop_reply, push_event): Change `ptid' argument's type to
14678 ptid_t.
14679 (discard_queued_stop_replies): Add `pid' argument.
14680 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14681 changes. Don't reference the `attached' global.
14682 (attach_inferior): Adjust to mywait interface changes.
14683 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14684 features. Handle and report "multiprocess+". Handle
14685 "qAttached:PID".
14686 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14687 changes.
14688 (handle_v_kill): New.
14689 (handle_v_stopped): Adjust to use target_pid_to_str.
14690 (handle_v_requests): Allow multiple attaches and runs when
14691 multiprocess extensions are in effect. Handle "vKill".
14692 (myresume): Adjust to use ptids.
14693 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14694 (handle_status): Adjust to discard_queued_stop_replies interface
14695 change.
14696 (first_thread_of, kill_inferior_callback)
14697 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14698 (main): Call initialize_inferiors. Adjust to use ptids, killing
14699 and detaching from all inferiors. Handle multiprocess packet
14700 variants.
14701 * linux-low.h: Include gdb_proc_service.h.
14702 (struct process_info_private): New.
14703 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14704 <lwpid_of>: Use ptid_get_lwp.
14705 (get_lwp_thread): Adjust.
14706 (struct lwp_info): Add `dead' member.
14707 (find_lwp_pid): Declare.
14708 * linux-low.c (thread_db_active): Delete.
14709 (new_inferior): Adjust comment.
14710 (inferior_pid): Delete.
14711 (linux_add_process): New.
14712 (handle_extended_wait): Adjust.
14713 (add_lwp): Change unsigned long to ptid.
14714 (linux_create_inferior): Add process to processes table. Adjust
14715 to use ptids. Don't set new_inferior here.
14716 (linux_attach_lwp): Rename to ...
14717 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14718 it. Adjust to use ptids.
14719 (linux_attach_lwp): New.
14720 (linux_attach): Add process to processes table. Don't set
14721 new_inferior here.
14722 (struct counter): New.
14723 (second_thread_of_pid_p, last_thread_of_process_p): New.
14724 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14725 multiple processes.
14726 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14727 processes. Remove process from process table.
14728 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14729 to multiple processes.
14730 (any_thread_of): New.
14731 (linux_detach): Add `pid' argument, and handle it. Remove process
14732 from processes table.
14733 (linux_join): Add `pid' argument. Handle it.
14734 (linux_thread_alive): Change unsighed long argument to ptid_t.
14735 Consider dead lwps as not being alive.
14736 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14737 threads we're not interested in.
14738 (same_lwp, find_lwp_pid): New.
14739 (linux_wait_for_lwp): Change `pid' argument's type from int to
14740 ptid_t. Adjust.
14741 (linux_wait_for_event): Rename to ...
14742 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14743 from int to ptid_t. Adjust.
14744 (linux_wait_for_event): New.
14745 (linux_wait_1): Add `ptid' argument. Change return type to
14746 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14747 that exit from the process table.
14748 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14749 Adjust.
14750 (mark_lwp_dead): New.
14751 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14752 stopping all threads, mark its main lwp as dead.
14753 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14754 ptids.
14755 (fetch_register, usr_store_inferior_registers)
14756 (regsets_fetch_inferior_registers)
14757 (regsets_store_inferior_registers, linux_read_memory)
14758 (linux_write_memory): Inline `inferior_pid'.
14759 (linux_look_up_symbols): Adjust to use per-process
14760 `thread_db_active'.
14761 (linux_request_interrupt): Adjust to use ptids.
14762 (linux_read_auxv): Inline `inferior_pid'.
14763 (initialize_low): Don't reference thread_db_active.
14764 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14765 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14766 (ps_getpid): Return the pid of the current inferior.
14767 * thread-db.c (proc_handle, thread_agent): Delete.
14768 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14769 per-process data.
14770 (find_one_thread): Change argument type to ptid_t. Adjust to
14771 per-process data.
14772 (maybe_attach_thread): Adjust to per-process data and ptids.
14773 (thread_db_find_new_threads): Ditto.
14774 (thread_db_init): Ditto.
14775 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14776 processes table. Adjust to use ptids.
14777 (spu_kill, spu_detach): Adjust interface. Remove process from
14778 processes table.
14779 (spu_join, spu_thread_alive): Adjust interface.
14780 (spu_wait): Adjust interface. Remove process from processes
14781 table. Adjust to use ptids.
14782 * win32-low.c (current_inferior_tid): Delete.
14783 (current_inferior_ptid): New.
14784 (debug_event_ptid): New.
14785 (thread_rec): Take a ptid. Adjust.
14786 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14787 (child_delete_thread): Ditto.
14788 (do_initial_child_stuff): Add `attached' argument. Add process to
14789 processes table.
14790 (child_fetch_inferior_registers, child_store_inferior_registers):
14791 Adjust.
14792 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14793 (win32_attach): Pass 1 to do_initial_child_stuff.
14794 (win32_kill): Adjust interface. Remove process from processes
14795 table.
14796 (win32_detach): Ditto.
14797 (win32_join): Adjust interface.
14798 (win32_thread_alive): Take a ptid.
14799 (win32_resume): Adjust to use ptids.
14800 (get_child_debug_event): Ditto.
14801 (win32_wait): Adjust interface. Remove exiting process from
14802 processes table.
14803
bd99dc85
PA
148042009-04-01 Pedro Alves <pedro@codesourcery.com>
14805
14806 Non-stop mode support.
14807
14808 * server.h (non_stop): Declare.
14809 (gdb_client_data, handler_func): Declare.
14810 (delete_file_handler, add_file_handler, start_event_loop):
14811 Declare.
14812 (handle_serial_event, handle_target_event, push_event)
14813 (putpkt_notif): Declare.
14814 * target.h (enum resume_kind): New.
14815 (struct thread_resume): Replace `step' field by `kind' field.
14816 (TARGET_WNOHANG): Define.
14817 (struct target_ops) <wait>: Add `options' argument.
14818 <supports_non_stop, async, start_non_stop>: New fields.
14819 (target_supports_non_stop, target_async): New.
14820 (start_non_stop): Declare.
14821 (mywait): Add `options' argument.
14822 * target.c (mywait): Add `options' argument. Print child exit
14823 notifications here.
14824 (start_non_stop): New.
14825 * server.c (non_stop, own_buf, mem_buf): New globals.
14826 (struct vstop_notif): New.
14827 (notif_queue): New global.
14828 (queue_stop_reply, push_event, discard_queued_stop_replies)
14829 (send_next_stop_reply): New.
14830 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14831 interface changes.
14832 (attach_inferior): In non-stop mode, don't wait for the target
14833 here.
14834 (handle_general_set): Handle QNonStop.
14835 (handle_query): When handling qC, return the current general
14836 thread, instead of the first thread of the list.
14837 (handle_query): If the backend supports non-stop mode, include
14838 QNonStop+ in the qSupported query response.
14839 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14840 and non-stop mode.
14841 (handle_v_attach, handle_v_run): Handle non-stop mode.
14842 (handle_v_stopped): New.
14843 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14844 (myresume): Adjust to use resume_kind. Handle non-stop.
14845 (queue_stop_reply_callback): New.
14846 (handle_status): Handle non-stop mode.
14847 (main): Clear non_stop flag on reconnection. Use the event-loop.
14848 Refactor serial protocol handling from here ...
14849 (process_serial_event): ... to this new function. When GDB
14850 selects any thread, select one here. In non-stop mode, wait until
14851 GDB acks all pending events before exiting.
14852 (handle_serial_event, handle_target_event): New.
14853 * remote-utils.c (remote_open): Install remote_desc in the event
14854 loop.
14855 (remote_close): Remove remote_desc from the event loop.
14856 (putpkt_binary): Rename to...
14857 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14858 (putpkt_binary): New as wrapper around putpkt_binary_1.
14859 (putpkt_notif): New.
14860 (prepare_resume_reply): In non-stop mode, don't change the
14861 general_thread.
14862 * event-loop.c: New.
14863 * Makefile.in (OBJ): Add event-loop.o.
14864 (event-loop.o): New rule.
14865
14866 * linux-low.h (pid_of): Moved here.
14867 (lwpid_of): New.
14868 (get_lwp_thread): Use lwpid_of.
14869 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14870 * linux-low.c (pid_of): Delete.
14871 (inferior_pid): Use lwpid_of.
14872 (linux_event_pipe): New.
14873 (target_is_async_p): New.
14874 (delete_lwp): New.
14875 (handle_extended_wait): Use lwpid_of.
14876 (add_lwp): Don't set lwpid field.
14877 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14878 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14879 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14880 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14881 first. Adjust to linux_wait_for_event interface changes. Use
14882 lwpid_of.
14883 (linux_detach): Don't delete the main lwp here.
14884 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14885 (status_pending_p): Don't consider explicitly suspended lwps.
14886 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14887 pointer. Add OPTIONS argument. Change return type to int. Use
14888 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14889 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14890 pointer. Add status pointer argument. Return a pid instead of a
14891 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14892 changes. In non-stop mode, don't switch to a random thread.
14893 (linux_wait): Rename to...
14894 (linux_wait_1): ... this. Add target_options argument, and handle
14895 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14896 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14897 clean exit and signal exit code. Don't stop all threads in
14898 non-stop mode. In all-stop mode, only stop all threads when
14899 reporting a stop to GDB. Handle explicit thread stop requests.
14900 (async_file_flush, async_file_mark): New.
14901 (linux_wait): New.
14902 (send_sigstop): Use lwpid_of.
14903 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14904 interface changes. In non-stop mode, don't switch to a random
14905 thread.
14906 (linux_resume_one_lwp): Use lwpid_of.
14907 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14908 (linux_resume_one_thread): ... this. Handle resume_stop. In
14909 non-stop mode, don't look for pending flag in all threads.
14910 (resume_status_pending_p): Don't consider explicitly suspended
14911 threads.
14912 (my_waitpid): Reimplement. Emulate __WALL.
14913 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14914 Use lwpid_of.
14915 (sigchld_handler, linux_supports_non_stop, linux_async)
14916 (linux_start_non_stop): New.
14917 (linux_target_ops): Register linux_supports_non_stop, linux_async
14918 and linux_start_non_stop.
14919 (initialize_low): Install SIGCHLD handler.
14920 * thread-db.c (thread_db_create_event, find_one_thread)
14921 (thread_db_get_tls_address): Use lwpid_of.
14922 * win32-low.c (win32_detach): Adjust to use resume_kind.
14923 (win32_wait): Add `options' argument.
14924 * spu-low.c (spu_resume): Adjust to use resume_kind.
14925 (spu_wait): Add `options' argument.
14926
5b1c542e
PA
149272009-04-01 Pedro Alves <pedro@codesourcery.com>
14928
14929 Decouple target code from remote protocol.
14930
14931 * target.h (enum target_waitkind): New.
14932 (struct target_waitstatus): New.
14933 (struct target_ops) <wait>: Return an unsigned long. Take a
14934 target_waitstatus pointer instead of a char pointer.
14935 (mywait): Likewise.
14936 * target.c (mywait): Change prototype to return an unsigned long.
14937 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14938 * server.h (thread_from_wait, old_thread_from_wait): Delete
14939 declarations.
14940 (prepare_resume_reply): Change prototype to take a
14941 target_waitstatus.
14942 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14943 (last_status, last_ptid): New.
14944 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14945 pid instead of a signal.
14946 (attach_inferior): Remove "status" and "signal" parameters.
14947 Adjust.
14948 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14949 not as an address.
14950 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14951 (handle_v_requests, myresume): Remove "status" and "signal"
14952 parameters. Adjust.
14953 (handle_status): New.
14954 (main): Delete local `status'. Adjust.
14955 * remote-utils.c: Include target.h.
14956 (prepare_resume_reply): Change prototype to take a
14957 target_waitstatus. Adjust.
14958
14959 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14960 interface.
14961 * spu-low.c (spu_wait): Adjust.
14962 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14963 Delete.
14964 (win32_wait): Adjust.
14965
2bd7c093
PA
149662009-04-01 Pedro Alves <pedro@codesourcery.com>
14967
14968 * target.h (struct thread_resume): Delete leave_stopped member.
14969 (struct target_ops): Add a `n' argument to the `resume' callback.
14970 * server.c (start_inferior): Adjust.
14971 (handle_v_cont, myresume): Adjust.
14972 * linux-low.c (check_removed_breakpoint): Adjust to resume
14973 interface change, and to removed leave_stopped field.
14974 (resume_ptr): Delete.
14975 (struct thread_resume_array): New.
14976 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14977 resume interface change.
14978 (linux_continue_one_thread, linux_queue_one_thread)
14979 (resume_status_pending_p): Check if the resume field is NULL
14980 instead of checking the leave_stopped member.
14981 (linux_resume): Adjust to the target resume interface change.
14982 * spu-low.c (spu_resume): Adjust to the target resume interface
14983 change.
14984 * win32-low.c (win32_detach, win32_resume): Ditto.
14985
c35fafde
PA
149862009-04-01 Pedro Alves <pedro@codesourcery.com>
14987
14988 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14989 flag.
14990 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14991 pending.
14992 (linux_continue_one_thread): Only preserve the stepping flag if
14993 there's a pending breakpoint.
14994
0a59d50b
PA
149952009-03-31 Pedro Alves <pedro@codesourcery.com>
14996
14997 * server.c (main): After the inferior having exited, call
14998 remote_close before exiting gdbserver.
14999
f04c6d38
TJB
150002009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15001
15002 Fix size of FPSCR in Power 7 processors.
15003 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15004 (PPC_FEATURE_HAS_DFP): New #define.
15005 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15006 size of the FPSCR.
15007
78e5cee6
PA
150082009-03-23 Pedro Alves <pedro@codesourcery.com>
15009
15010 * server.c (handle_query) Whitespace and formatting.
15011
1b3f6016
PA
150122009-03-22 Pedro Alves <pedro@codesourcery.com>
15013
15014 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15015 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15016 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15017 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15018 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15019 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15020 Makefile.in, configure.ac: Fix whitespace throughout.
15021 * configure: Regenerate.
15022
a07b2135
PA
150232009-03-22 Pedro Alves <pedro@codesourcery.com>
15024
15025 * inferiors.c (find_inferior): Make it safe for the callback
15026 function to delete the currently iterated inferior.
15027
67cc2626
PA
150282009-03-22 Pedro Alves <pedro@codesourcery.com>
15029
15030 * Makefile.in (linuw_low_h): Move higher.
15031 (thread-db.o): Depend on $(linux_low_h).
15032
54a0b537
PA
150332009-03-17 Pedro Alves <pedro@codesourcery.com>
15034
15035 Rename "process" to "lwp" throughout.
15036
15037 * linux-low.c (all_processes): Rename to...
15038 (all_lwps): ... this.
15039 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15040 (add_process): Rename to ...
15041 (add_lwp): ... this. Adjust.
15042 (linux_create_inferior): Adjust.
15043 (linux_attach_lwp): Adjust.
15044 (linux_attach): Adjust.
15045 (linux_kill_one_process): Rename to ...
15046 (linux_kill_one_lwp): ... this. Adjust.
15047 (linux_kill): Adjust.
15048 (linux_detach_one_process): Rename to ...
15049 (linux_detach_one_lwp): ... this. Adjust.
15050 (linux_detach): Adjust.
15051 (check_removed_breakpoint): Adjust.
15052 (status_pending_p): Adjust.
15053 (linux_wait_for_process): Rename to ...
15054 (linux_wait_for_lwp): ... this. Adjust.
15055 (linux_wait_for_event): Adjust.
15056 (send_sigstop): Adjust.
15057 (wait_for_sigstop): Adjust.
15058 (stop_all_processes): Rename to ...
15059 (stop_all_lwps): ... this.
15060 (linux_resume_one_process): Rename to ...
15061 (linux_resume_one_lwp): ... this. Adjust.
15062 (linux_set_resume_request, linux_continue_one_thread)
15063 (linux_queue_one_thread, resume_status_pending_p)
15064 (usr_store_inferior_registers, regsets_store_inferior_registers)
15065 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15066 Adjust.
15067 * linux-low.h (get_process): Rename to ...
15068 (get_lwp): ... this. Adjust.
15069 (get_thread_process): Rename to ...
15070 (get_thread_lwp): ... this. Adjust.
15071 (get_process_thread): Rename to ...
15072 (get_lwp_thread): ... this. Adjust.
15073 (struct process_info): Rename to ...
15074 (struct lwp_info): ... this.
15075 (all_processes): Rename to ...
15076 (all_lwps): ... this.
15077 * proc-service.c (ps_lgetregs): Adjust.
15078 * thread-db.c (thread_db_create_event, find_one_thread)
15079 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15080
0b16c5cf
PA
150812009-03-14 Pedro Alves <pedro@codesourcery.com>
15082
15083 * server.c (handle_query): Handle "qAttached".
15084
32de4b9d
NS
150852009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15086
15087 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15088 GPLv3, update license URL.
15089
2aecd87f
DE
150902009-03-01 Doug Evans <dje@google.com>
15091
93efd302 15092 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15093 (server_h): Add gdb_signals.h.
15094 (signals.o): Update.
15095 * server.h (target_signal_from_host,target_signal_to_host_p)
15096 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15097
86b1f9c5
PM
150982009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15099
15100 * remote-utils.c (getpkt): Also generate remote-debug
15101 information if noack_mode is set.
15102
4aa995e1
PA
151032009-02-06 Pedro Alves <pedro@codesourcery.com>
15104
15105 * server.c (handle_query): Report qXfer:siginfo:read and
15106 qXfer:siginfo:write as supported and handle them.
15107 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15108 * linux-low.c (linux_xfer_siginfo): New.
15109 (linux_target_ops): Set it.
15110
62709adf
PA
151112009-01-26 Pedro Alves <pedro@codesourcery.com>
15112
15113 * server.c (gdbserver_usage): Mention --remote-debug.
15114 (main): Accept '--remote-debug' switch.
15115
aef93bd7
DE
151162009-01-18 Doug Evans <dje@google.com>
15117
15118 * regcache.c (new_register_cache): No need to check result of xcalloc.
15119 * server.c (handle_search_memory): Back out calls to xmalloc,
15120 result is checked and error is returned to user upon failure.
15121 (handle_query): Ditto. Add more checks for result of malloc.
15122 (handle_v_cont): Check result of malloc, report error back to
15123 user upon failure.
15124 (handle_v_run): Ditto. Call freeargv.
15125 * server.h (freeargv): Declare.
15126 * utils.c (freeargv): New fn.
15127
54363045
DE
151282009-01-15 Doug Evans <dje@google.com>
15129
f626972c
DE
15130 * gdbreplay.c (perror_with_name): Make arg const char *.
15131 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15132 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15133 * utils.c (perror_with_name): Make arg const char *.
54363045 15134
18aae699
PA
151352009-01-14 Pedro Alves <pedro@codesourcery.com>
15136
15137 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15138 when handling a EXIT_PROCESS_DEBUG_EVENT.
15139
ff703abe
JB
151402009-01-06 Joel Brobecker <brobecker@adacore.com>
15141
15142 * gdbreplay.c (gdbreplay_version): Update copyright year.
15143 * server.c (gdbserver_version): Likewise.
15144
f21cc1a2 151452009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15146
15147 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15148 (handle_extended_wait): Improve comment.
0e21c1ec 15149
bca929d3
DE
151502008-12-13 Doug Evans <dje@google.com>
15151
15152 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15153 * server.h (ATTR_MALLOC): New macro.
15154 (xmalloc,xcalloc,xstrdup): Declare.
15155 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15156 * inferiors.c: Ditto.
15157 * linux-low.c: Ditto.
15158 * mem-break.c: Ditto.
15159 * regcache.c: Ditto.
15160 * remote-utils.c: Ditto.
15161 * server.c: Ditto.
15162 * target.c: Ditto.
15163 * win32-low.c: Ditto.
15164
97438e3f
DE
151652008-12-12 Doug Evans <dje@google.com>
15166
896c7fbb
DE
15167 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15168 in debugging printf.
15169
97438e3f
DE
15170 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15171
e3b886f8
DE
151722008-12-09 Doug Evans <dje@google.com>
15173
15174 * linux-low.h (struct process_info): Delete member tid, unused.
15175 * thread-db.c (find_one_thread): Update.
15176 (maybe_attach_thread): Update.
15177
07e059b5
VP
151782008-12-02 Pedro Alves <pedro@codesourcery.com>
15179
889bf7c5
PA
15180 * target.h (struct target_ops): Add qxfer_osdata member.
15181 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15182 and dirent.h.
15183 (linux_qxfer_osdata): New functions.
15184 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15185 callback.
15186 * server.c (handle_query): Handle "qXfer:osdata:read:".
15187 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15188 (buffer_xml_printf): New functions.
15189 * server.h (struct buffer): New.
15190 (buffer_grow_str, buffer_grow_str0): New macros.
15191 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15192 (buffer_xml_printf): Declare.
07e059b5 15193
4cab47ab
DE
151942008-11-24 Doug Evans <dje@google.com>
15195
15196 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15197
f142445f
DJ
151982008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * server.c (handle_v_run): Always use the supplied argument list.
15201
d0107bb6 152022008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15203
d0107bb6
BW
15204 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15205 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15206
2c4ad781
TJB
152072008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15208
15209 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15210 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15211 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15212 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15213 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15214 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15215 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15216 XML target descriptions.
15217 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15218 when inferior is running on an ISA 2.05 or later processor. Add
15219 special case to return offset for full 64-bit slot of FPSCR when
15220 in 32-bits.
15221
dfb64f85
DJ
152222008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15223
15224 * Makefile.in (SFILES, clean): Added sparc64 files.
15225 (reg-sparc64.o, reg-sparc64.c): New.
15226 * configure.srv (sparc*-*-linux*): New configuration.
15227 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15228 syscall arguments for SPARC.
15229 (regsets_store_inferior_registers): Likewise.
15230 * linux-sparc-low.c: New file.
15231
66b6e1dd
DE
152322008-10-21 Doug Evans <dje@google.com>
15233
15234 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15235 (READLINE_DIR,READLINE_DEP): Delete.
15236 (INTERNAL_CFLAGS): Update.
15237 (LINTFLAGS): Update.
15238
9b710a42
PA
152392008-10-10 Pedro Alves <pedro@codesourcery.com>
15240
15241 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15242 whole argv from the last run, not just argv[0].
15243
5822d809
PA
152442008-09-08 Pedro Alves <pedro@codesourcery.com>
15245
15246 * regcache.c (new_register_cache): Return NULL if the register
15247 cache size isn't known yet.
15248 (free_register_cache): Avoid dereferencing a NULL regcache.
15249
74aac56f
DJ
152502008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15251
15252 * configure.srv: Merge MIPS and MIPS64.
15253
400b20f5
MR
152542008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15255
15256 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15257
677c5bb1
LM
152582008-08-18 Luis Machado <luisgpm@br.ibm.com>
15259
15260 * Makefile.in: Add required vsx dependencies.
15261
15262 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15263 Declare init_registers_powerpc_vsx32l.
15264 Declare init_registers_powerpc_vsx64l.
15265 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15266 (ppc_arch_setup): Check for VSX in hwcap.
15267 (ppc_fill_vsxregset): New function.
15268 (ppc_store_vsxregset): New function.
15269 Add new VSX entry in regset_info target_regsets.
15270
15271 * configure.srv: Add new VSX dependencies.
15272
a6f3e723
SL
152732008-08-12 Pedro Alves <pedro@codesourcery.com>
15274
15275 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15276 (remote_open): Set or clear transport_is_reliable.
15277 (putpkt_binary): Don't expect acks in noack mode.
15278 (getpkt): Don't send ack/nac in noack mode.
15279 * server.c (handle_general_set): Handle QStartNoAckMode.
15280 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15281 qSupported.
15282 (main): Reset noack_mode on every connection.
15283 * server.h (noack_mode): Declare.
15284
a417dc56
RW
152852008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15286
15287 * Makefile.in (GDBREPLAY_OBS): New variable.
15288 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15289
3221518c
UW
152902008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15291 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15294 (usr_store_inferior_registers): Likewise.
15295 (regsets_store_inferior_registers): Likewise.
15296
ec56be1b
PA
152972008-07-31 Rolf Jansen <rj@surtec.com>
15298 Pedro Alves <pedro@codesourcery.com>
15299
15300 * configure.ac: Check for memmem declaration.
15301 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15302 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15303 (disable_packet_qfThreadInfo): Unconditionally compile.
15304 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15305 * configure, config.in: Regenerate.
15306
2fe5e3ff
DE
153072008-07-28 Doug Kwan <dougkwan@google.com>
15308
15309 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15310 (linux_write_memory): Remove declaration of errno.
15311
836acd6d
UW
153122008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15313
15314 * linux-low.c (handle_extended_wait): Do not use "status"
15315 variable uninitialized.
15316
aeba519e
PA
153172008-07-07 Pedro Alves <pedro@codesourcery.com>
15318
15319 * server.c (handle_v_attach): Inhibit reporting dll changes.
15320
db42f210
PA
153212008-06-27 Pedro Alves <pedro@codesourcery.com>
15322
15323 * remote-utils.c (prepare_resume_reply): If requested, don't
15324 output "thread:TID" in the T stop reply.
15325
15326 * server.c (disable_packet_vCont, disable_packet_Tthread)
15327 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15328 (handle_query): If requested, disable support for qC, qfThreadInfo
15329 and qsThreadInfo.
15330 (handle_v_requests): If requested, disable support for vCont.
15331 (gdbserver_show_disableable): New.
15332 (main): Handle --disable-packet and --disable-packet=LIST.
15333
15334 * server.h (disable_packet_vCont, disable_packet_Tthread)
15335 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15336
8e4c5421
CD
153372008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15338
15339 * server.c (gdbserver_usage): Mention --version.
15340
6e23a804
DJ
153412008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15342
15343 * Makefile.in (gdbreplay.o): New rule.
15344
90aa6a40
JM
153452008-06-06 Joseph Myers <joseph@codesourcery.com>
15346
15347 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15348 message, not gdbserver.
15349
c16158bc 153502008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15351 Nathan Sidwell <nathan@codesourcery.com>
15352 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15353
15354 * acinclude.m4: Include ../../config/acx.m4.
15355 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15356 * configure, config.in: Regenerate.
15357 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15358 * server.c (gdbserver_version): Print PKGVERSION.
15359 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15360 (main): Adjust gdbserver_usage calls.
15361 * gdbreplay.c (version, host_name): Add declarations.
15362 (gdbreplay_version, gdbreplay_usage): New.
15363 (main): Accept --version and --help options.
15364
aeb75bf5
DJ
153652008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15366
15367 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15368 (arm_breakpoint_at): Handle Thumb.
15369 (the_low_target): Add comment.
15370
76b233dd
UW
153712008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15372
15373 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15374
08388c79
DE
153752008-05-09 Doug Evans <dje@google.com>
15376
a3c83fae
DE
15377 * server.h (decode_search_memory_packet): Declare.
15378 * remote-utils.c (decode_search_memory_packet): New fn.
15379 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15380 (handle_search_memory): New fn.
15381 (handle_query): Process qSearch:memory packets.
15382
bb9c3d36
UW
153832008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15384
15385 * regcache.c (registers_length): Remove.
15386 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15387 full register packet.
15388 * regcache.h (registers_length): Remove prototype.
15389 * server.h (PBUFSIZ): Define to 16384.
15390
7284e1be
UW
153912008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15392
15393 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15394 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15395 powerpc-64l.o, and powerpc-altivec64l.o.
15396 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15397 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15398 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15399 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15400 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15401 to srv_xmlfiles.
15402
15403 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15404 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15405 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15406 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15407 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15408 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15409 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15410 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15411 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15412 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15413 (clean): Update.
15414
15415 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15416 (init_registers_powerpc_32l): ... this new prototype.
15417 (init_registers_powerpc_32): Remove, replace by ...
15418 (init_registers_powerpc_altivec32l): ... this new prototype.
15419 (init_registers_powerpc_e500): Remove, replace by ...
15420 (init_registers_powerpc_e500l): ... this new prototype.
15421 (init_registers_ppc64): Remove, replace by ...
15422 (init_registers_powerpc_64l): ... this new prototype.
15423 (init_registers_powerpc_64): Remove, replace by ...
15424 (init_registers_powerpc_altivec64l): ... this new prototype.
15425 (ppc_num_regs): Set to 73.
15426 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15427 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15428 (ppc_cannot_store_register): Handle orig_r3 and trap.
15429 (ppc_arch_setup): Update init_registers_... calls.
15430 (ppc_fill_gregset): Handle orig_r3 and trap.
15431
15432 * inferiors.c (clear_inferiors): Reset current_inferior.
15433
fdc59709
PB
154342008-04-23 Paolo Bonzini <bonzini@gnu.org>
15435
889bf7c5
PA
15436 * acinclude.m4: Add override.m4.
15437 * configure: Regenerate.
fdc59709 15438
c9b2f845
UW
154392008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15440
15441 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15442 initial call to init_register_ppc64.
15443
550512b8
UW
154442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15445
43aaf8b6
PA
15446 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15447 single powerpc*-*-linux* case.
550512b8
UW
15448 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15449
b6430ec3
UW
154502008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15451
15452 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15453 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15454 from reg_xmlfiles.
15455 * linux-ppc-low.c: Include <elf.h>.
15456 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15457 (ppc_hwcap): New global variable.
15458 (ppc_regmap): Remove __SPE__ #ifdef sections.
15459 (ppc_regmap_e500): New global variable.
15460 (ppc_cannot_store_register): Update __SPE__ special case.
15461 (ppc_get_hwcap): New function.
15462 (ppc_arch_setup): Use it to determine whether inferior supports
15463 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15464 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15465 Do not access registers if target does not support AltiVec.
15466 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15467 Do not access registers if target does not support SPE.
15468 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15469
52fa2412
UW
154702008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * linux-low.c (disabled_regsets, num_regsets): New.
15473 (use_regsets_p): Delete.
15474 (linux_wait_for_process): Clear disabled_regsets.
15475 (regsets_fetch_inferior_registers): Check and set it.
15476 (regsets_store_inferior_registers): Likewise.
15477 (linux_fetch_registers, linux_store_registers): Do not use
15478 use_regsets_p.
15479 (initialize_low): Allocate disabled_regsets.
15480
e28b3332
DJ
154812008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15482
15483 * Makefile.in (LIBOBJS): New.
15484 (OBS): Use LIBOBJS.
15485 (memmem.o): New rule.
15486 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15487 * configure: Regenerated.
15488
4536995d
UW
154892008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15490
15491 * server.c (handle_query): Never return "unsupported" for
15492 qXfer:features:read queries.
15493
221c031f
UW
154942008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15495
15496 * server.c (get_features_xml): Fix inverted condition.
15497 (handle_query): Always support qXfer:feature:read.
15498
ccd213ac
DJ
154992008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15500
15501 * server.c (wrapper_argv): New.
15502 (start_inferior): Handle wrapper_argv. If set, expect an extra
15503 trap.
15504 (gdbserver_usage): Document --wrapper.
15505 (main): Parse --wrapper.
15506
6fe305f7
UW
155072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15508
15509 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15510 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15511 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15512 (ppc_set_pc): Likewise.
15513 (ppc_arch_setup): New function.
15514 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15515 of collect_register.
889bf7c5 15516 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15517
5b0a002e
UW
155182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15519
15520 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15521 instead of linux-ppc64-low.o.
15522 * linux-ppc64-low.c: Remove file.
15523 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15524 (linux-ppc64-low.o): Remove rule.
15525
15526 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15527 (init_registers_powerpc_64): Likewise.
15528 (ppc_regmap): Conditionally define depending on __powerpc64__.
15529 (ppc_cannot_store_register): Do not special-case "fpscr" when
15530 compiled on __powerpc64__.
15531 (ppc_collect_ptrace_register): New function.
15532 (ppc_supply_ptrace_register): New function.
15533 (ppc_breakpoint): Change type to "unsigned int".
15534 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15535 (the_low_target): Conditionally provide initializers for the
889bf7c5 15536 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15537 collect_ptrace_register and supply_ptrace_register members.
15538
9b4b61c8
UW
155392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15540
15541 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15542 * server.c (gdbserver_xmltarget): Define.
15543 (get_features_xml): Use it to replace "target.xml" and arch_string.
15544
15545 * configure.srv: Remove srv_xmltarget. Add XML files that were
15546 mentioned there to srv_xmlfiles instead. Remove conditional tests
15547 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15548 srv_xmlfiles and srv_regobj to include all possible choices.
15549 * configure.ac (srv_xmltarget): Remove.
15550 (srv_xmlfiles): Do not add "target.xml".
15551 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15552 checks for supplementary target information.
15553 * configure: Regenerate.
15554 * Makefile.in (XML_TARGET): Remove.
15555 (target.xml): Remove rule.
15556 (clean): Do not clean up target.xml.
15557 (.PRECIOUS): Do not mention target.xml.
15558
15559 * target.h (struct target_ops): Remove arch_string member.
15560 * linux-low.c (linux_arch_string): Remove.
15561 (linux_target_ops): Remove arch_string initializer.
15562 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15563 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15564 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15565 * spu-low.c (spu_arch_string): Remove.
15566 (spu_target_ops): Remove arch_string initializer.
15567 * win32-low.c (win32_arch_string): Remove.
15568 (win32_target_ops): Remove arch_string initializer.
15569 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15570 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15571 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15572
ee1a7ae4
UW
155732008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15574
15575 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15576 by collect_ptrace_register and supply_ptrace_register hooks.
15577 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15578 instead of checking for the_low_target.left_pad_xfer.
15579 (usr_store_inferior_registers): Use collect_ptrace_register callback
15580 instead of checking for the_low_target.left_pad_xfer.
15581
15582 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15583 (s390_supply_ptrace_register): Likewise.
15584 (s390_fill_gregset): Call s390_collect_ptrace_register.
15585 (the_low_target): Update.
15586
15587 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15588 (ppc_supply_ptrace_register): Likewise.
15589 (the_low_target): Update.
15590
15591 * linux-i386-low.c (the_low_target): Update.
15592 * linux-x86-64-low.c (the_low_target): Update.
15593
d61ddec4
UW
155942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15595
15596 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15597 reg-s390.o and reg-s390x.o.
15598
15599 * linux-low.c (new_inferior): New global variable.
15600 (linux_create_inferior, linux_attach): Set it.
15601 (linux_wait_for_process): Call the_low_target.arch_setup after the
15602 target has stopped for the first time.
15603 (initialize_low): Do not call the_low_target.arch_setup.
15604
15605 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15606 (s390_set_pc): Likewise.
15607 (s390_arch_setup): New function.
15608 (the_low_target): Use s390_arch_setup as arch_setup routine.
15609
15610 * regcache.c (realloc_register_cache): New function.
15611 (set_register_cache): Call it for each existing regcache.
15612
d05b4ac3
UW
156132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15614
15615 * server.h (init_registers): Remove prototype.
15616
15617 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15618 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15619 instead of init_registers ().
15620 * linux-arm-low.c (init_registers_arm): Add prototype.
15621 (init_registers_arm_with_iwmmxt): Likewise.
15622 (the_low_target): Add initializer for arch_setup field.
15623 * linux-cris-low.c (init_registers_cris): Add prototype.
15624 (the_low_target): Add initializer for arch_setup field.
15625 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15626 (the_low_target): Add initializer for arch_setup field.
15627 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15628 (the_low_target): Add initializer for arch_setup field.
15629 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15630 (the_low_target): Add initializer for arch_setup field.
15631 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15632 (the_low_target): Add initializer for arch_setup field.
15633 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15634 (the_low_target): Add initializer for arch_setup field.
15635 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15636 (init_registers_mips64_linux): Likewise.
15637 (the_low_target): Add initializer for arch_setup field.
15638 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15639 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15640 (the_low_target): Add initializer for arch_setup field.
15641 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15642 (init_registers_powerpc_64): Likewise.
15643 (the_low_target): Add initializer for arch_setup field.
15644 * linux-s390-low.c (init_registers_s390): Add prototype.
15645 (init_registers_s390x): Likewise.
15646 (the_low_target): Add initializer for arch_setup field.
15647 * linux-sh-low.c (init_registers_sh): Add prototype.
15648 (the_low_target): Add initializer for arch_setup field.
15649 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15650 (the_low_target): Add initializer for arch_setup field.
15651 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15652 (the_low_target): Add initializer for arch_setup field.
15653
15654 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15655 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15656 instead of init_registers ().
15657 * win32-arm-low.c (init_registers_arm): Add prototype.
15658 (the_low_target): Add initializer for arch_setup field.
15659 * win32-i386-low.c (init_registers_i386): Add prototype.
15660 (the_low_target): Add initializer for arch_setup field.
15661
15662 * spu-low.c (init_registers_spu): Add prototype.
15663 (initialize_low): Call initialie_registers_spu () instead of
15664 initialize_registers ().
15665
fd96d250
PA
156662008-02-19 Pedro Alves <pedro@codesourcery.com>
15667
15668 * server.c (handle_v_requests): When handling the vRun and vAttach
15669 packets, if already debugging a process, don't kill it. Return an
15670 error instead.
15671
d41b6bb4
DJ
156722008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15673
15674 * server.c (handle_query): Correct length check.
15675
5ac588cf
PA
156762008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15677
15678 * win32-low.c (do_initial_child_stuff): Add process handle
15679 parameter. Set current_process_handle and current_process_id from the
15680 parameters. Clear globals.
15681 (win32_create_inferior): Don't set current_process_handle and
15682 current_process_id here. Instead pass them on the call to
15683 do_initial_child_stuff.
15684 (win32_attach): Likewise.
15685 (win32_clear_inferiors): New.
15686 (win32_kill): Don't close the current process handle or the
15687 current thread handle here. Instead call win32_clear_inferiors.
15688 (win32_detach): Don't open a new handle to the process. Call
15689 win32_clear_inferiors.
15690 (win32_join): Don't rely on current_process_handle; open a new
15691 handle using the process id.
15692 (win32_wait): Call win32_clear_inferiors when the inferior process
15693 has exited.
15694
ecd7ecbc
DJ
156952008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15696
15697 * server.c (monitor_show_help): Add "exit".
15698
1525d545
MG
156992008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15700
ecd7ecbc 15701 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15702 (clean): Add reg-xtensa.c.
15703 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15704 * configure.srv (xtensa*-*-linux*) New target.
15705 * linux-xtensa-low.c: New.
15706 * xtensa-xtregs.c: New.
1525d545 15707
59a016f0
PA
157082008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15709
15710 * hostio.c: Don't include errno.h.
15711 (errno_to_fileio_errno): Move to hostio-errno.
15712 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15713 error number outputting to the target->hostio_last_error callback.
15714 (hostio_packet_error): Use FILEIO_EINVAL directly.
15715 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15716 calls to hostio_error.
15717 * hostio-errno.c: New.
15718 * server.h (hostio_last_error_from_errno): Declare.
15719 * target.h (target_ops): Add hostio_last_error member.
15720 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15721 as hostio_last_error handler.
889bf7c5 15722 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15723 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15724 (wince_hostio_last_error): New functions.
15725 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15726 as hostio_last_error handler.
15727 (win32_target_ops) [!_WIN32_WCE]: Register
15728 hostio_last_error_from_errno as hostio_last_error handler.
15729 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15730 (hostio-errno.o): New rule.
15731 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15732 * configure.srv (srv_hostio_err_objs): New variable. Default to
15733 hostio-errno.o.
15734 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15735 * configure: Regenerate.
15736
2d717e4f
DJ
157372008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15738
15739 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15740 (linux_kill, linux_detach): Clean up the process list.
15741 * remote-utils.c (remote_open): Improve port number parsing.
15742 (putpkt_binary, input_interrupt): Only send interrupts if the target
15743 is running.
15744 * server.c (extended_protocol): Make static.
15745 (attached): Define earlier.
15746 (exit_requested, response_needed, program_argv): New variables.
15747 (target_running): New.
15748 (start_inferior): Clear attached here.
15749 (attach_inferior): Set attached here.
15750 (require_running): Define.
15751 (handle_query): Use require_running and target_running. Implement
15752 "monitor exit".
15753 (handle_v_attach, handle_v_run): New.
15754 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15755 (gdbserver_usage): Update.
15756 (main): Redo argument parsing. Handle --debug and --multi. Handle
15757 --attach along with other options or after the port. Save
15758 program_argv. Support no initial program. Resynchronize
15759 communication with GDB after an error. Handle "monitor exit".
15760 Use require_running and target_running. Always allow the extended
15761 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15762 restart in extended mode.
15763 * README: Refer to the GDB manual. Update --attach usage.
15764
7407e2de
AS
157652007-12-20 Andreas Schwab <schwab@suse.de>
15766
15767 * linux-low.c (STACK_SIZE): Define.
15768 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15769 (linux_test_for_tracefork): Likewise.
15770
b65d95c5
DJ
157712007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * linux-low.c (linux_wait_for_event): Update messages. Do not
15774 reinsert auto-delete breakpoints.
15775 * mem-break.c (struct breakpoint): Change return type of handler to
15776 int.
15777 (set_breakpoint_at): Update handler type.
15778 (reinsert_breakpoint_handler): Return 1 instead of calling
15779 delete_breakpoint.
15780 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15781 setting a new one.
15782 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15783 * mem-break.h (set_breakpoint_at): Update handler type.
15784 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15785 * win32-low.c (auto_delete_breakpoint): New.
15786 (get_child_debug_event): Use it.
15787
4e799345
DJ
157882007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15789
15790 * configure.ac: Check for pread and pwrite.
15791 * hostio.c (handle_pread): Fall back to lseek and read.
15792 (handle_pwrite): Fall back to lseek and write.
15793 * config.in, configure: Regenerated.
15794
27524b67
DJ
157952007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15796
15797 * server.c (myresume): Add own_buf argument.
15798 (main): Update calls.
15799
a20d5e98
DJ
158002007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15801
15802 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15803 * remote-utils.c (remote_open): Do not call disable_async_io.
15804 (block_async_io): Delete.
15805 (unblock_async_io): Make static.
15806 (initialize_async_io): New.
15807 * server.c (handle_v_cont): Handle async I/O here.
15808 (myresume): Likewise. Move other common resume tasks here...
15809 (main): ... from here. Call initialize_async_io. Disable async
15810 I/O before the main loop.
15811 * server.h (initialize_async_io): Declare.
15812 (block_async_io, unblock_async_io): Delete prototypes.
15813 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15814
b79d787e
DJ
158152007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15816
15817 * remote-utils.c (readchar): Allow binary data in received messages.
15818
d97903b2
PA
158192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15820
15821 * win32-low.c (attaching): New global.
15822 (win32_create_inferior): Clear the `attaching' global.
15823 (win32_attach): Set the `attaching' global.
15824 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15825 attaching. Only set a breakpoint at the entry point if not
15826 attaching.
15827
311de423
PA
158282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15829
15830 * server.c (main): Don't report dll events on the initial
15831 connection on attaches.
15832
6c2d16d2
PA
158332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15834
15835 * server.c (main): Relax numerical bases supported for the pid of
15836 the --attach command line argument.
15837
5ca906e6
PA
158382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15839
15840 * win32-low.c (win32_attach): Call OpenProcess before
15841 DebugActiveProcess, not after. Add last error output to error
15842 call.
15843
9c6c8194
PA
158442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15845
15846 * win32-low.c (win32_get_thread_context)
15847 (win32_set_thread_context): New functions.
15848 (thread_rec): Use win32_get_thread_context.
15849 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15850 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15851 field.
15852
4d5d1aaa
PA
158532007-12-03 Leo Zayas
15854 Pedro Alves <pedro_alves@portugalmail.pt>
15855
15856 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15857 global variables.
15858 (child_add_thread): Minor cleanup.
15859 (child_continue): Resume artificially suspended threads before
15860 calling ContinueDebugEvent.
15861 (suspend_one_thread): New.
15862 (fake_breakpoint_event): New.
15863 (get_child_debug_event): Change return type to int. Check here if
15864 gdb sent an interrupt request. If a soft interrupt was requested,
15865 fake a breakpoint event. Return 0 if there is no event to handle,
15866 and 1 otherwise.
15867 (win32_wait): Don't check here if gdb sent an interrupt request.
15868 Ensure there is a valid event to handle.
15869 (win32_request_interrupt): Add soft interruption method as last
15870 resort.
15871
c436e841
PA
158722007-12-03 Leo Zayas
15873 Pedro Alves <pedro_alves@portugalmail.pt>
15874
15875 * win32-low.h (win32_thread_info): Add descriptions to the
15876 structure members. Replace `suspend_count' counter by a
15877 `suspended' flag.
15878 * win32-low.c (thread_rec): Update condition of when to get the
15879 context from the inferior. Rely on ContextFlags being set if it
15880 has already been retrieved. Only suspend the inferior thread if
15881 we haven't already. Warn if that fails.
15882 (continue_one_thread): s/suspend_count/suspended/. Only call
15883 ResumeThread once. Warn if that fails.
15884
e7b5fa67
PA
158852007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15886
15887 * win32-low.c (win32_wait): Don't read from the inferior when it
15888 has already exited.
15889
a385171d
PA
158902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15891
15892 * Makefile.in (win32_low_h): New variable.
15893 (win32-low.o): Add dependency on $(win32_low_h).
15894 (win32-arm-low.o, win32-i386-low.o): New rules.
15895
f80c84b3
DJ
158962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15897
15898 * hostio.c: Correct copyright year.
15899
a6b151f1
DJ
159002007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15901
15902 * Makefile.in (OBS): Add hostio.o.
15903 (hostio.o): New rule.
15904 * server.h (handle_vFile): Declare.
15905 * hostio.c: New file.
15906 * server.c (handle_v_requests): Take packet_len and new_packet_len
15907 for binary packets. Call handle_vFile.
15908 (main): Update call to handle_v_requests.
15909
f9387fc3
DJ
159102007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15911
15912 * linux-low.c: Include <sched.h>.
15913
51c2684e
DJ
159142007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15915
15916 * linux-low.c (linux_tracefork_grandchild): New.
15917 (linux_tracefork_child): Use clone.
15918 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15919
75f83163
JB
159202007-10-31 Joel Brobecker <brobecker@adacore.com>
15921
15922 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15923
da5898ce
DJ
159242007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15925
15926 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15927
24a09b5f
DJ
159282007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15929
15930 * inferiors.c (change_inferior_id): Delete.
15931 (add_pid_to_list, pull_pid_from_list): New.
15932 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15933 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15934 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15935 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15936 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15937 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15938 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15939 (using_threads): Always set to 1.
15940 (handle_extended_wait): New.
15941 (add_process): Do not set TID.
15942 (linux_create_inferior): Set must_set_ptrace_flags.
15943 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15944 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15945 (linux_thread_alive): Rename TID argument to LWPID.
15946 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15947 (linux_wait_for_event): Do not use TID or check using_threads. Update
15948 call to dead_thread_notify. Call handle_extended_wait.
15949 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15950 (send_sigstop): Delete sigstop_sent.
15951 (wait_for_sigstop): Avoid TID.
15952 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15953 (linux_test_for_tracefork): New.
15954 (linux_lookup_signals): Use thread_db_active and
15955 linux_supports_tracefork_flag.
15956 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15957 * linux-low.h (get_process_thread): Avoid TID.
15958 (struct process_ifo): Move thread_known and tid to the end. Remove
15959 sigstop_sent.
15960 (linux_attach_lwp, thread_db_init): Update prototypes.
15961 * server.h (change_inferior_id): Delete prototype.
15962 (add_pid_to_list, pull_pid_from_list): New prototypes.
15963 * thread-db.c (thread_db_use_events): New.
15964 (find_first_thread): Rename to...
15965 (find_one_thread): ...this. Update callers and messages. Do not
15966 call fatal. Check thread_db_use_events. Do not call
15967 change_inferior_id or new_thread_notify.
15968 (maybe_attach_thread): Update. Do not call new_thread_notify.
15969 (thread_db_init): Set thread_db_use_events. Check use_events.
15970 * utils.c (fatal, warning): Correct message prefix.
15971
30ed0a8f
DJ
159722007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15973
15974 * Makefile.in (clean): Remove new files.
15975 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15976 (powerpc-64.o, powerpc-64.c): New rules.
15977 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15978 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15979 with SPE.
15980 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15981 SPE targets.
15982 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15983 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15984 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15985 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15986 (target_regsets): Add AltiVec and SPE register sets.
15987 * configure.ac: Check for AltiVec and SPE.
15988 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15989 (ppc_fill_vrregset, ppc_store_vrregset): New.
15990 (target_regsets): Add AltiVec register set.
15991 * configure: Regenerated.
15992
fd462a61
DJ
159932007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15994
15995 * linux-low.c (O_LARGEFILE): Define.
15996 (linux_read_memory): Use /proc/PID/mem.
15997 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15998 * configure, config.in: Regenerated.
15999
69f223ed
DJ
160002007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16001
16002 * linux-low.c (linux_wait_for_event): Do not pass signals while
16003 single-stepping.
16004
aec18585
PA
160052007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16006
16007 * win32-low.c (create_process): New.
16008 (win32_create_inferior): Use create_process instead of
16009 CreateProcess. If create_process failed retry appending an ".exe"
16010 suffix. Store the GetLastError result immediatelly after
16011 create_process calls and use it on the call to error.
16012
34d86ddd
PA
160132007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16014
16015 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16016
5a0e3bd0
JB
160172007-08-23 Joel Brobecker <brobecker@adacore.com>
16018
16019 * configure.ac: Switch license to GPLv3.
16020
f88c79e6
MS
160212007-08-01 Michael Snyder <msnyder@access-company.com>
16022
16023 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16024
6b3d9b83
PA
160252007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16026
16027 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16028 typedef.
16029 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16030 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16031 CloseToolhelp32Snapshot.
16032 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16033 CloseToolhelp32Snapshot.
16034
c588c53c
MS
160352007-07-27 Michael Snyder <michael.snyder@access-company.com>
16036
16037 * server.c (main): Check for inferior exit before main loop.
16038
aa0403d9
PA
160392007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16040
16041 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16042 instead of on tmp_desc.
16043
255e7678
DJ
160442007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16045 Daniel Jacobowitz <dan@codesourcery.com>
16046
16047 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16048 (add_thread): Minor cleanups.
16049 (clear_inferiors): Move lower in the file. Clear the DLL
16050 list.
16051 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16052 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16053 (xml_escape_text): New.
16054 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16055 for qSupported.
16056 (handle_v_cont): Report errors.
16057 (gdbserver_version): Update.
16058 (main): Correct size of own_buf. Do not report initial DLL events.
16059 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16060 (unloaded_dll, xml_escape_text): New.
16061 * win32-low.c (enum target_waitkind): Update comments.
16062 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16063 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16064 (win32_EnumProcessModules, win32_GetModuleInformation)
16065 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16066 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16067 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16068 (win32_Module32First, win32_Module32Next, load_toolhelp)
16069 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16070 (get_child_debug_event): Handle DLL events.
16071 (win32_wait): Likewise.
16072
0d37add9
DJ
160732007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16074
16075 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16076 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16077
45e2715e
PA
160782007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16079
16080 * win32-low.c (handle_output_debug_string): Ignore event if not
16081 waiting.
16082
c5674cf1
PA
160832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16084
16085 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16086
2bbe3cc1
DJ
160872007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16088
16089 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16090
ae13219e
DJ
160912007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16092
16093 * inferiors.c (change_inferior_id): Add comment.
16094 * linux-low.c (check_removed_breakpoint): Add an early
16095 prototype. Improve debug output.
16096 (linux_attach): Doc update.
16097 (linux_detach_one_process, linux_detach): Clean up before releasing
16098 each process.
16099 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16100 * linux-low.h (struct process_info): Doc improvement.
16101 * mem-break.c (delete_all_breakpoints): New.
16102 * mem-break.h (delete_all_breakpoints): New prototype.
16103 * thread-db.c (find_first_thread): New.
16104 (thread_db_create_event): Call it instead of
16105 thread_db_find_new_threads. Clean up unused variables.
16106 (maybe_attach_thread): Remove first thread handling.
16107 (thread_db_find_new_threads): Use find_first_thread.
16108 (thread_db_get_tls_address): Likewise.
16109
4105de34
DJ
161102007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16111
16112 * thread-db.c (thread_db_find_new_threads): Add prototype.
16113 (thread_db_create_event): Check for the main thread before adding
16114 a new thread.
16115 (maybe_attach_thread): Only enable event reporting if TID == 0.
16116 (thread_db_get_tls_address): Check for new threads.
16117
2b876972
DJ
161182007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16119
16120 * linux-low.c (linux_create_inferior): Try execv before execvp.
16121 * spu-low.c (spu_create_inferior): Likewise.
16122
7a245884
DJ
161232007-06-13 Mike Frysinger <vapier@gentoo.org>
16124
16125 * linux-low.c (linux_create_inferior): Change execv to execvp.
16126 * spu-low.c (spu_create_inferior): Likewies.
16127
117ce543
DJ
161282007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16129
16130 * Makefile.in (clean): Clean new files instead of deleted ones.
16131 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16132 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16133 rules.
16134 * configure.srv: Specify XML files and new regformats for MIPS and
16135 MIPS64 GNU/Linux.
16136 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16137 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16138 an entry for the restart register.
16139 (mips_cannot_fetch_register, mips_cannot_store_register)
16140 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16141 register names to match the XML descriptions.
16142 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16143 restart register instead of $0.
16144
0e7f50da
UW
161452007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16146 Markus Deuling <deuling@de.ibm.com>
16147
16148 * remote-utils.c (decode_xfer_write): New function.
16149 * server.h (decode_xfer_write): Add prototype.
16150 * server.c (handle_query): Add PACKET_LEN argument. Support
16151 qXfer:spu:read and qXfer:spu:write packets.
16152 (main): Pass packet_len to handle_query.
16153 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16154 * target.h (target_ops): Add qxfer_spu.
16155
374c1d38
UW
161562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16157
16158 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16159 accessing non-seekable spufs files.
16160
bb63802a
UW
161612007-05-16 Markus Deuling <deuling@de.ibm.com>
16162
889bf7c5 16163 * server.c (handle_query): Add reply for qC packet.
bb63802a 16164
7390519e
PA
161652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16166 Leo Zayas <lerele@champenstudios@com>
16167
16168 * server.h (check_remote_input_interrupt_request): New function.
16169 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16170 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16171 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16172 (check_remote_input_interrupt_request): New function.
16173 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16174 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16175 winapi_GenerateConsoleCtrlEvent): New typedefs.
16176 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16177 to 250 ms.
16178 (win32_wait): Check for remote interrupt request
16179 with check_remote_input_interrupt_request.
16180 (win32_request_interrupt): New function.
16181 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16182
34b34921
PA
161832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16184
16185 * win32-low.c (debug_registers_changed,
16186 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16187 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16188 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16189 (thread_rec): Get context using the low target.
16190 (child_add_thread): Call thread_added on the low target,
16191 which does the same thing.
16192 (regptr): Delete.
16193 (do_initial_child_stuff): Remove debug registers references.
16194 Set context using the low target. Resume threads after
16195 setting the contexts.
16196 (child_continue): Remove dead variable. Remove debug
16197 registers references.
16198 (child_fetch_inferior_registers): Go through the low target.
16199 (do_child_store_inferior_registers): Remove.
16200 (child_store_inferior_registers): Go through the low target.
16201 (win32_resume): Remove debug registers references.
16202 Set context using the low target.
16203 (handle_exception): Change return type to void. Don't record
16204 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16205 first chance exception.
889bf7c5 16206 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16207 goto loop. Always return after waiting for debug event.
16208 (win32_wait): Convert to switch statement. Handle spurious
16209 events.
16210
16211 * win32-i386-low.c (debug_registers_changed,
16212 debug_registers_used): New.
16213 (initial_stuff): Rename to ...
16214 (i386_initial_stuff): ... this. Clear debug registers
16215 state variables.
16216 (store_debug_registers): Delete.
16217 (i386_get_thread_context): New.
16218 (load_debug_registers): Delete.
16219 (i386_set_thread_context): New.
16220 (i386_thread_added): New.
16221 (single_step): Rename to ...
16222 (i386_single_step): ... this.
16223 (do_fetch_inferior_registers): Rename to ...
16224 (i386_fetch_inferior_register): ... this.
16225 (i386_store_inferior_register): New.
16226 (the_low_target): Adapt to new interface.
16227
16228 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16229 (arm_get_thread_context): New.
16230 (arm_set_thread_context): New.
16231 (regptr): New.
16232 (do_fetch_inferior_registers): Rename to ...
16233 (arm_fetch_inferior_register): ... this.
16234 (arm_store_inferior_register): New.
16235 (arm_wince_breakpoint): Reimplement as unsigned long.
16236 (arm_wince_breakpoint_len): Define.
16237 (the_low_target): Adapt to new interface.
16238
16239 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16240 load_debug_registers. Add get_thread_context, set_thread_context,
16241 thread_added and store_inferior_register. Rename
16242 fetch_inferior_registers to fetch_inferior_register.
16243 (regptr): Remove declaration.
16244
dd6953e1
PA
162452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16246
16247 * linux-low.c (linux_detach): Change return type to int. Return 0.
16248 * spu-low.c (spu_detach): Likewise.
16249
444d6139
PA
162502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16251
16252 * target.h (target_ops): Change return type of detach to int.
16253 Add join.
16254 (join_inferior): New.
16255 * server.c (main): Don't skip detach support on mingw32.
16256 If the inferior doesn't support detaching return error.
16257 Call join_inferior instead of using waitpid.
16258 * linux-low.c (linux_join): New.
16259 (linux_target_op): Add linux_join.
16260 * spu-low.c (spu_join): New.
16261 (spu_target_ops): Add spu_join.
16262 * win32-low.c (win32_detach): Adapt to new interface.
16263 Reopen current_process_handle before detaching. Issue a child
16264 resume before detaching.
16265 (win32_join): New.
16266 (win32_target_op): Add win32_join.
16267
1d5315fe
PA
162682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16269
16270 * win32-low.c (win32-attach): Fix return value.
16271 * target.h (target_ops): Describe ATTACH return values.
16272
bf914831
PA
162732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16274
16275 * win32-low.c (GETPROCADDRESS): Define.
16276 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16277 (winapi_DebugSetProcessKillOnExit): Likewise.
16278 (win32_create_inferior): Force usage of ansi CreateProcessA.
16279 (win32_attach): Use GETPROCADDRESS.
16280 (win32_detach): Likewise.
16281
f72f3e60
PA
162822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16283
16284 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16285
ed50f18f
PA
162862007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16287
16288 * win32-low.c: Commit leftover changes from 2007-03-29.
16289
0c2ead7e
DJ
162902007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16291
16292 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16293 fields short instead of int. Add explicit padding.
16294 (i387_cache_to_fsave): Remove unnecessary casts.
16295 (i387_fsave_to_cache): Doc fix.
16296 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16297
73725ff3
DJ
162982007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16299
16300 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16301 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16302
d99f33d8
PA
163032007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16304
16305 * configure.srv (arm*-*-mingw32ce*): Move near the other
16306 arm targets.
16307
68070c10
PA
163082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16309
2482afc6 16310 * configure.ac: Add errno checking.
68070c10
PA
16311 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16312 sys/file.h and malloc.h.
16313 (AC_CHECK_DECLS): Add perror.
16314 (srv_mingwce): Handle.
2482afc6 16315 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16316 win32-i386-low.o to srv_tgtobj.
16317 (i[34567]86-*-mingw*): Likewise.
16318 (arm*-*-mingw32ce*): Add case.
16319 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16320 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16321 [__MINGW32CE__] (strerror): New function.
16322 [__MINGW32CE__] (errno): Define to GetLastError.
16323 [__MINGW32CE__] (COUNTOF): New macro.
16324 (remote_open): Remove extra close call.
16325 * mem-break.c (delete_breakpoint_at): New function.
16326 * mem-break.h (delete_breakpoint_at): Declare.
16327 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16328 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16329 [USE_WIN32API] (read, write): Add char* casts.
16330 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16331 * server.h: Include wincecompat.h on Windows CE.
16332 [HAVE_ERRNO_H]: Check.
16333 (perror): Declare if not declared.
16334 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16335 (perror_with_name): Remove errno declaration.
16336 * wincecompat.h: New.
16337 * wincecompat.c: New.
16338 * win32-low.h: New.
16339 * win32-arm-low.c: New.
16340 * win32-i386-low.c: New.
16341 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16342 (OUTMSG2): Make it safe.
16343 (_T): New macro.
16344 (COUNTOF): New macro.
16345 (NUM_REGS): Get it from the low target.
16346 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16347 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16348 (thread_rec): Let low target handle debug registers.
16349 (child_add_thread): Likewise.
16350 (child_init_thread_list): Likewise.
16351 (continue_one_thread): Likewise.
16352 (regptr): New.
16353 (do_child_fetch_inferior_registers): Move to ...
16354 * win32-i386-low.c: ... here, and rename to ...
16355 (do_fetch_inferior_registers): ... this.
889bf7c5 16356 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16357 Go through the low target.
16358 (do_child_store_inferior_registers): Use regptr.
16359 (strwinerror): New function.
16360 (win32_create_inferior): Handle Windows CE.
16361 Use strwinerror instead of strerror on Windows error
16362 codes. Add program to the error output.
16363 Don't close the main thread handle on Windows CE.
16364 (win32_attach): Use coredll.dll on Windows CE.
16365 (win32_kill): Close current process and current
16366 thread handles.
16367 (win32_detach): Use coredll.dll on Windows CE.
16368 (win32_resume): Let low target handle debug registers, and
16369 step request.
16370 (handle_exception): Add/Remove initial breakpoint. Avoid
16371 non-existant WSTOPSIG on Windows CE.
16372 (win32_read_inferior_memory): Cast to remove warning.
16373 (win32_arch_string): Go through the low target.
16374 (initialize_low): Call set_breakpoint_data with the low
16375 target's breakpoint.
16376 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16377 FOP_REGNUM, mappings): Move to ...
16378 * win32-i386-low.c: ... here.
16379 * win32-low.c (win32_thread_info): Move to ...
16380 * win32-low.h: ... here.
16381 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16382 win32-arm-low.c and wincecompat.c.
16383 (all:): Add $EXEEXT.
16384 (install-only:): Likewise.
16385 (gdbserver:): Likewise.
16386 (gdbreplay:): Likewise.
16387 * config.in: Regenerate.
16388 * configure: Regenerate.
16389
41093d81
PA
163902007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16391
16392 * win32-low.c: Rename typedef thread_info to
16393 win32_thread_info throughout.
16394
544afa54
PA
163952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16396
16397 * win32-i386-low.c: Rename to ...
16398 * win32-low.c: ... this.
16399 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16400 * Makefile.in: Likewise.
16401
bce7165d
PA
164022007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16403
16404 * remote-utils.c (monitor_output): Constify msg parameter.
16405 * server.h (monitor_output): Likewise.
16406 * win32-i386-low.c (handle_output_debug_string): New.
16407 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16408 handle_output_debug_string.
16409 (get_child_debug_event): Likewise.
16410
506c7aa0
DJ
164112007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16412
16413 * server.c (main): Correct strtoul check.
16414
42c81e2a
DJ
164152007-03-27 Jon Ringle <jon@ringle.org>
16416
16417 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16418
9453113a
DJ
164192007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16420
16421 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16422
64a69107
DJ
164232007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16424
16425 * terminal.h: Check HAVE_SGTTY_H.
16426
164272007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16428
16429 * remote-utils.c (remote_open): Print out the assigned port number.
16430
c74d0ad8
DJ
164312007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16432
16433 * remote-utils.c (monitor_output): New function.
16434 * server.c (debug_threads): Define here.
16435 (monitor_show_help): New function.
16436 (handle_query): Handle qRcmd.
16437 (main): Do not handle 'd' packet.
16438 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16439 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16440 of debug_threads.
16441
de7c3b4a
PA
164422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16443
16444 * Makefile.in (EXEEXT): New.
16445 (clean): Use $(EXEEXT).
16446
ef57601b
PA
164472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16448
16449 * target.h (target_ops): Rename send_signal to request_interrupt,
16450 and remove enum target_signal parameter.
16451 * linux-low.c (linux_request_interrupt): Rename from
16452 linux_send_signal, and always send SIGINT.
16453 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16454 and always send SIGINT.
16455 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16456 of send_signal.
16457 (input_interrupt): Likewise.
16458
820f2bda
PA
164592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16460
16461 * server.c (get_features_xml): Check if target implemented
16462 arch_string.
16463 * win32-i386-low.c (win32_arch_string): New.
16464 (win32_target_ops): Add win32_arch_string as arch_string member.
16465
ab39bf24
UW
164662007-02-22 Markus Deuling <deuling@de.ibm.com>
16467
16468 * spu-low.c (spu_arch_string): New.
16469 (spu_target_ops): Add spu_arch_string.
16470
61ff6e04
DJ
164712007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16472
16473 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16474 * configure.ac: Do not check for terminal.h.
16475 * configure, config.in: Regenerated.
16476
fb1e4ffc
DJ
164772007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * Makefile.in (OBS): Add $(XML_BUILTIN).
16480 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16481 (clean): Update.
16482 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16483 (arm-with-iwmmxt.c): New.
16484 * config.in, configure: Regenerate.
16485 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16486 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16487 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16488 (arm*-*-linux*): Add iWMMXt and regset support.
16489 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16490 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16491 (arm_store_wmmxregset, target_regsets): New.
16492 * server.c (get_features_xml): Take annex argument. Check builtin
16493 XML documents.
16494 (handle_query): Handle multiple annexes.
16495
0f48aa01
DJ
164962007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16497
16498 * remote-utils.c [USE_WIN32API] (read, write): Define.
16499 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16500 write.
16501
23181151
DJ
165022007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16503
16504 * linux-i386-low.c (the_low_target): Set arch_string.
16505 * linux-x86-64-low.c (the_low_target): Likewise.
16506 * linux-low.c (linux_arch_string): New.
16507 (linux_target_ops): Add it.
16508 * linux-low.h (struct linux_target_ops): Add arch_string.
16509 * server.c (write_qxfer_response): Use const void * for DATA.
16510 (get_features_xml): New.
16511 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16512 * target.h (struct target_ops): Add arch_string method.
16513
9d606399
DJ
165142007-01-03 Denis Pilat <denis.pilat@st.com>
16515 Daniel Jacobowitz <dan@codesourcery.com>
16516
16517 * linux-low.c (linux_kill): Handle being called with no threads.
16518 * win32-i386-low.c (win32_kill): Likewise.
16519 (get_child_debug_event): Clear current_process_handle.
16520
165212006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16522 Daniel Jacobowitz <dan@codesourcery.com>
16523
16524 * remote-utils.c (remote_open): Check the type of specified
16525 serial port devices before opening them.
16526 * server.c (main): Kill the inferior if an error occurs during
16527 the first remote_open.
16528
a5e13d24
DJ
165292006-12-05 Markus Deuling <deuling@de.ibm.com>
16530
16531 * README: Update supported targets.
16532
186947f7
DJ
165332006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * Makefile.in (clean): Remove reg-mips64.c.
16536 (reg-mips64.c, reg-mips64.o): New rules.
16537 * configure.srv: Handle mips64. Include regset support for mips.
16538 * linux-mips-low.c (union mips_register): New.
16539 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16540 (mips_breakpoint, mips_breakpoint_at): Use int.
16541 (mips_collect_register, mips_supply_register)
16542 (mips_collect_register_32bit, mips_supply_register_32bit)
16543 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16544 (mips_store_fpregset, target_regsets): New.
16545 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16546
a13e2c95
UW
165472006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16548
16549 * configure.srv: Add target "spu*-*-*".
16550 * Makefile.in (clean): Remove reg-spu.c.
16551 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16552 * spu-low.c: New file.
16553
cb7283db
DJ
165542006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16555
16556 * configure.ac: Correct td_thr_tls_get_addr test.
16557 * configure: Regenerated.
16558
89be2091
DJ
165592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16560
16561 * linux-low.c (linux_wait_for_event): Reformat. Use the
16562 pass_signals array.
16563 * remote-utils.c (decode_address_to_semicolon): New.
16564 * server.c (pass_signals, handle_general_set): New.
16565 (handle_query): Mention QPassSignals for qSupported.
16566 (main): Call handle_general_set.
16567 * server.h (pass_signals, decode_address_to_semicolon): New.
16568
000ef4f0
DJ
165692006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * server.c (handle_query): Correct error handling for read_auxv.
16572
b7149293
UW
165732005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16574
16575 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16576 and srv_linux_thread_db to yes.
16577 * linux-s390-low.c (s390_fill_gregset): New function.
16578 (target_regsets): Define data structure.
16579
dae5f5cf
DJ
165802006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16581
16582 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16583 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16584 * config.in, configure: Regenerated.
16585 * inferiors.c (gdb_id_to_thread): New function.
16586 (gdb_id_to_thread_id): Use it.
16587 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16588 * linux-low.h (struct process_info): Add th member.
16589 (thread_db_get_tls_address): New prototype.
16590 * remote-utils.c (decode_address): Make non-static.
16591 * server.c (handle_query): Handle qGetTLSAddr.
16592 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16593 * target.h (struct target_ops): Add get_tls_address.
16594 * thread-db.c (maybe_attach_thread): Save the thread handle.
16595 (thread_db_get_tls_address): New.
16596
32ca6d61
DJ
165972006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16598
16599 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16600 (linux_resume_one_process): Take a siginfo_t *. Update all
16601 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16602 (struct pending_signals): Add a siginfo_t.
16603 (linux_wait_for_process): Always set last_status.
16604 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16605 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16606 * linux-low.h (struct process_info): Add last_status.
16607
5ffff7c1
DJ
166082006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16609
16610 * remote-utils.c (try_rle): New function.
16611 (putpkt_binary): Use it.
16612
8695c747
DJ
166132006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16614
16615 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16616 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16617 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16618 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16619 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16620 point registers.
16621
290fadea
RS
166222006-08-08 Richard Sandiford <richard@codesourcery.com>
16623
16624 * server.c (terminal_fd): New variable.
16625 (old_foreground_pgrp): Likewise.
16626 (restore_old_foreground_pgrp): New function.
16627 (start_inferior): Record the terminal file descriptor in terminal_fd
16628 and its original foreground group in old_foreground_pgrp. Register
16629 restore_old_foreground_pgrp with atexit().
16630
9f2e1e63
DJ
166312006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * server.c (handle_query): Correct qPart to qXfer.
16634
b80864fb
DJ
166352006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * configure.ac: Check for more headers which are missing on
16638 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16639 * configure.srv: Add Cygwin and mingw32.
16640 * remote-utils.c: Don't include headers unconditionally which
16641 are missing on mingw32. Include <winsock.h> for mingw32.
16642 (remote_open): Adjust for mingw32 support. Flush
16643 standard error after writing to it.
16644 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16645 (unblock_async_io, enable_async_io, disable_async_io)
16646 (readchar, getpkt): Update for Winsock support.
16647 (prepare_resume_reply): Expect a protocol signal number.
16648 * server.c: Disable <sys/wait.h> on mingw32.
16649 (start_inferior): Adjust for mingw32 support. Flush
16650 standard error after writing to it.
16651 (attach_inferior): Likewise. Use protocol signal
16652 numbers.
16653 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16654 and names.
16655 * win32-i386-low.c: New file.
16656 * Makefile.in (XM_CLIBS): Set.
16657 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16658 (win32-i386-low.o): New dependency rule.
16659 * linux-low.c (linux_wait): Use target signal numbers.
16660 * target.h (struct target_ops): Doc fix.
16661 * server.h (target_signal_to_name): New prototype.
16662 * gdbreplay.c: Don't include headers unconditionally which
16663 are missing on mingw32. Include <winsock.h> for mingw32.
16664 (remote_close, remote_open): Adjust for Winsock support.
16665 * configure, config.in: Regenerated.
16666
0876f84a
DJ
166672006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16668
16669 * server.c (decode_xfer_read, write_qxfer_response): New.
16670 (handle_query): Take a packet length argument. Handle
16671 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16672 the qSupported response.
16673 (main): Update call to handle_query.
16674
01f9e8fa
DJ
166752006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16676
16677 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16678 (putpkt_binary): Renamed from putpkt and adjusted for binary
16679 data.
16680 (putpkt): New wrapper for putpkt_binary.
16681 (readchar): Don't mask off the high bit.
16682 (decode_X_packet): New function.
16683 * server.c (main): Call putpkt_binary if a handler sets the packet
16684 length. Save the length of the incoming packet. Handle 'X'.
16685 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16686
be2a5f71
DJ
166872006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16688
16689 * server.c (handle_query): Handle qSupported.
16690
ea025f5f
DJ
166912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16692
16693 * remote-utils.c (all_symbols_looked_up): New variable.
16694 (look_up_one_symbol): Check it.
16695 * server.h (look_up_one_symbol): New declaration.
16696 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16697
9308fc88
DJ
166982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16699
16700 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16701 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16702 (PTRACE_GET_THREAD_AREA): Define.
16703 (ps_get_thread_area): New function.
16704
52fb6437
NS
167052006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16706
16707 * configure.srv (m68k*-*-uclinux*): New target.
16708 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16709 (linux_resume_one_process): Remove extraneous cast.
16710 (linux_read_offsets): New.
16711 (linux_target_op): Add linux_read_offsets on mmuless systems.
16712 * server.c (handle_query): Add qOffsets logic.
16713 * target.h (struct target_ops): Add read_offsets.
16714
21b0f40c
DJ
167152006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16716
16717 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16718 (PTRACE_GET_THREAD_AREA): Define.
16719 (ps_get_thread_area): New function.
16720 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16721 (linux-x86-64-low.o): Update.
16722
0050a760
DJ
167232006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16724
16725 * configure.ac: Remove checks for prfpregset_t.
16726 * gdb_proc_service.h: New file.
16727 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16728 new "gdb_proc_service.h".
16729 * proc-service.c: Likewise.
16730 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16731 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16732 * Makefile.in (gdb_proc_service_h): Updated.
16733 * configure, config.in: Regenerated.
16734
b92a518e
DJ
167352006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16736
16737 * remote-utils.c (prepare_resume_reply): Move declaration
16738 of gdb_id_from_wait to the top of the block.
16739
545587ee
DJ
167402006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * linux-low.c (regsets_store_inferior_registers): Read the regset
16743 from the target before filling it.
16744
9db87ebd
DJ
167452006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16746
16747 * server.c (attach_inferior): Return SIGTRAP for a successful
16748 attach.
16749
dd24457d
DJ
167502006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16751
16752 * Makefile.in (OBS): Add version.o.
16753 (STAGESTUFF): Delete.
16754 (version.o): Add dependencies.
16755 (version.c): Replace rule.
16756 (clean): Remove version.c.
16757 * server.c (gdbserver_version): New.
16758 (gdbserver_usage): Use printf.
16759 (main): Handle --version and --help.
16760 * server.h (version, host_name): Add declarations.
16761
6f0f660e
EZ
167622005-12-23 Eli Zaretskii <eliz@gnu.org>
16763
889bf7c5
PA
16764 * linux-arm-low.c:
16765 * linux-arm-low.c:
16766 * inferiors.c:
16767 * i387-fp.h:
16768 * i387-fp.c:
16769 * gdbreplay.c:
16770 * regcache.c:
16771 * proc-service.c:
16772 * mem-break.h:
16773 * mem-break.c:
16774 * linux-x86-64-low.c:
16775 * linux-sh-low.c:
16776 * linux-s390-low.c:
16777 * linux-ppc64-low.c:
16778 * linux-ppc-low.c:
16779 * linux-mips-low.c:
16780 * linux-m68k-low.c:
16781 * linux-m32r-low.c:
16782 * linux-low.h:
16783 * linux-low.c:
16784 * linux-ia64-low.c:
16785 * linux-i386-low.c:
16786 * linux-crisv32-low.c:
16787 * thread-db.c:
16788 * terminal.h:
16789 * target.h:
16790 * target.c:
16791 * server.h:
16792 * server.c:
16793 * remote-utils.c:
16794 * regcache.h:
16795 * utils.c:
16796 * Makefile.in:
16797 * configure.ac:
6f0f660e
EZ
16798 * gdbserver.1: Add (C) after Copyright. Update the FSF
16799 address.
16800
9d1fb177
DJ
168012005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16802
16803 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16804 (arm_breakpoint_at): Recognize both breakpoints.
16805 (the_low_target): Use the correct breakpoint instruction.
16806
011a70c2
DJ
168072005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16808
16809 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16810 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16811 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16812 (the_low_target): Update.
16813
7fb85e41
AS
168142005-10-25 Andreas Schwab <schwab@suse.de>
16815
16816 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16817
16818 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16819 (ia64_num_regs): Reduce to 462.
16820
3db0444b
DJ
168212005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16822
16823 * acinclude.m4: Correct quoting.
16824 * aclocal.m4: Regenerated.
16825
16826 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16827 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16828 (thread_db_init): Call thread_db_err_str.
16829 * configure.ac: Check for TD_VERSION.
16830 * config.in, configure: Regenerated.
16831
bee0189a
DJ
168322005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16833
16834 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16835
e9d25b98
DJ
168362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16837
16838 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16839 is not available. Define HAVE_PTRACE_GETREGS if it is.
16840 * config.in, configure: Regenerated.
16841 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16842 * linux-i386-low.c, linux-m68k-low.c: Update to use
16843 HAVE_PTRACE_GETREGS.
16844 * linux-low.c (regsets_fetch_inferior_registers)
16845 (regsets_store_inferior_registers): Only return 0 if we processed
16846 GENERAL_REGS.
16847 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16848 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16849
a06660f7
DJ
168502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16851
16852 * inferiors.c (struct thread_info): Add gdb_id.
16853 (add_thread): Add gdb_id argument.
16854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16855 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16856 calls to add_thread.
16857 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16858 * server.c (handle_query): Use thread_to_gdb_id.
16859 (handle_v_cont, main): Use gdb_id_to_thread_id.
16860 * server.h (add_thread): Update prototype.
16861 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16862 prototypes.
16863
5a1f5858
DJ
168642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16865
16866 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16867 left-padded registers.
16868 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16869 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16870
e122f1f5
SE
168712005-07-01 Steve Ellcey <sje@cup.hp.com>
16872
16873 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16874 * configure: Regenerate.
16875 * config.in: Regenerate.
16876 * server.h (NEED_DECLARATION_STRERROR):
16877 Replace with !HAVE_DECL_STRERROR.
16878
d592fa2f
DJ
168792005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16880
16881 * linux-low.c (linux_wait, linux_send_signal): Don't test
16882 an unsigned long variable for > 0 if it could be MAX_ULONG.
16883 * server.c (myresume): Likewise.
16884 * target.c (set_desired_inferior): Likewise.
16885
ccbd4912
MK
168862005-06-13 Mark Kettenis <kettenis@gnu.org>
16887
16888 * configure.ac: Simplify and improve check for socklen_t.
16889 * configure, config.in: Regenerate.
16890
f450004a
DJ
168912005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * acconfig.h: Remove.
16894 * configure.ac: Add a test for socklen_t. Use three-argument
16895 AC_DEFINE throughout.
16896 * config.in: Regenerated using autoheader 2.59.
16897 * configure: Regenerated.
16898
16899 * gdbreplay.c (socklen_t): Provide a default.
16900 (remote_open): Use socklen_t.
16901 * remote-utils.c (socklen_t): Provide a default.
16902 (remote_open): Use socklen_t.
16903 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16904 unsigned char.
16905
16906 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16907 char for buffers.
16908 * linux-low.c (linux_read_memory, linux_write_memory)
16909 (linux_read_auxv): Likewise.
16910 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16911 (check_mem_write): Likewise.
16912 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16913 Likewise.
16914 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16915 (registers_from_string, register_data): Likewise.
16916 * server.c (handle_query, main): Likewise.
16917 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16918 (decode_M_packet): Likewise.
16919 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16920 * target.h (struct target_ops): Update read_memory, write_memory,
16921 and read_auxv.
16922 (read_inferior_memory, write_inferior_memory): Update.
16923 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16924 to unsigned char *.
16925 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16926 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16927 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16928 linux-s390-low.c, linux-sh-low.c: Update for changes in
16929 read_inferior_memory and the_low_target->breakpoint.
16930
eee84df1
DJ
169312005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16932
16933 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16934 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16935 * configure.srv: Add powerpc64-*-linux*.
16936 * linux-ppc64-low.c: New file.
16937
45b134e5
OF
169382005-05-23 Orjan Friberg <orjanf@axis.com>
16939
16940 * linux-cris-low.c: New file with support for CRIS.
16941 * linux-crisv32-low.c: Ditto for CRISv32.
16942 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16943 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16944 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16945 reg-crisv32.o, and reg-crisv32.c to make rules.
16946 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16947 recognized targets.
16948
48d93c75
UW
169492005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16950
16951 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16952 of sizeof (PTRACE_XFER_TYPE).
16953 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16954
e013ee27
OF
169552005-05-12 Orjan Friberg <orjanf@axis.com>
16956
889bf7c5 16957 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16958 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16959 pointers for hardware watchpoint support.
16960 * linux-low.h (struct linux_target_ops): Ditto.
16961 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16962 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16963 to linux_target_ops.
16964 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16965 reply packet.
16966 * server.c (main): Recognize 'Z' and 'z' packets.
16967
b0ded00b
UW
169682005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16969
16970 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16971 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16972 (the_low_target): Add new members.
16973
8643e2ad
DJ
169742005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16975
16976 * proc-service.c (ps_lgetregs): Search all_processes instead of
16977 all_threads.
16978
fc620387
DJ
169792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16980
16981 * server.c (start_inferior): Change return type to int.
16982 (attach_inferior): Change sigptr to int *.
16983 (handle_v_cont, handle_v_requests): Change signal to int *.
16984 (main): Change signal to int.
16985
169862005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16987
16988 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16989 * configure.srv: Add m32r*-*-linux*.
16990 * linux-m32r-low.c: New file.
16991
e0e76420
DJ
169922005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16993
16994 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16995
a1928bad
DJ
169962005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16997
16998 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16999 Take unsigned long arguments for PIDs.
17000 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17001 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17002 (wait_for_sigstop, linux_resume_one_process)
17003 (regsets_fetch_inferior_registers, linux_send_signal)
17004 (linux_read_auxv): Likewise. Update the types of variables holding
17005 PIDs. Update format string specifiers.
17006 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17007 * remote-utils.c (prepare_resume_reply): Likewise.
17008 * server.c (cont_thread, general_thread, step_thread)
17009 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17010 unsigned long.
17011 (handle_query): Update format specifiers.
17012 (handle_v_cont, main): Use strtoul for thread IDs.
17013 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17014 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17015 (general_thread, step_thread, thread_from_wait)
17016 (old_thread_from_wait): Update.
17017 * target.h (struct thread_resume): Use unsigned long for THREAD.
17018 (struct target_ops): Use unsigned long for arguments to attach and
17019 thread_alive.
17020
dcdb98d2
DJ
170212005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17022
17023 * acinclude.m4: Include bfd/bfd.m4 directly.
17024 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17025 <agriffis@toolchain.org>.
17026 * aclocal.m4, configure: Regenerated.
17027
bec39cab
AC
170282005-01-07 Andrew Cagney <cagney@gnu.org>
17029
17030 * configure.ac: Rename configure.in, require autoconf 2.59.
17031 * configure: Re-generate.
17032
434c4c77
DJ
170332004-12-08 Daniel Jacobowitz <dan@debian.org>
17034
17035 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17036 LIBS when finished.
17037 * aclocal.m4: Regenerated.
17038 * configure: Regenerated.
17039
db1d3e1b
AS
170402004-11-21 Andreas Schwab <schwab@suse.de>
17041
17042 * linux-m68k-low.c (m68k_num_gregs): Define.
17043 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17044 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17045 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17046 (m68k_breakpoint_at): New. Add to the_low_target.
17047
17048 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17049 srv_linux_thread_db to yes.
17050
43360365
JB
170512004-10-20 Joel Brobecker <brobecker@gnat.com>
17052
17053 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17054 (ARCH_SET_FS): Likewise.
17055 (ARCH_GET_FS): Likewise.
17056 (ARCH_GET_GS): Likewise.
17057
fd500816
DJ
170582004-10-16 Daniel Jacobowitz <dan@debian.org>
17059
17060 * linux-i386-low.c (ps_get_thread_area): New.
17061 * linux-x86-64-low.c (ps_get_thread_area): New.
17062 * linux-low.c: Include <sys/syscall.h>.
17063 (linux_kill_one_process): Don't kill the first thread here.
17064 (linux_kill): Kill the first thread here.
17065 (kill_lwp): New function.
17066 (send_sigstop, linux_send_signal): Use it.
17067 * proc-service.c: Clean up #ifdefs.
17068 (fpregset_info): Delete.
17069 (ps_lgetregs): Update and enable implementation.
17070 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17071 implementations.
17072 * remote-utils.c (struct sym_cache, symbol_cache): New.
17073 (input_interrupt): Print a clearer message.
17074 (async_io_enabled): New variable.
17075 (enable_async_io, disable_async_io): Use it. Update comments.
17076 (look_up_one_symbol): Use the symbol cache.
17077 * thread-db.c (thread_db_look_up_symbols): New function.
17078 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17079
f6de3c42
DJ
170802004-10-16 Daniel Jacobowitz <dan@debian.org>
17081
17082 * configure.in: Test for -rdynamic.
17083 * configure: Regenerated.
17084 * Makefile (INTERNAL_LDFLAGS): New.
17085 (gdbserver, gdbreplay): Use it.
17086
2c0fc042
AC
170872004-09-02 Andrew Cagney <cagney@gnu.org>
17088
17089 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17090
075b3282
DJ
170912004-03-23 Daniel Jacobowitz <drow@mvista.com>
17092
17093 * linux-low.c (linux_wait): Clear all_processes list also.
17094
fa6a77dc
DJ
170952004-03-12 Daniel Jacobowitz <drow@mvista.com>
17096
17097 * linux-low.c: Include <errno.h>. Remove extern declaration of
17098 errno.
17099
6d782a97
DJ
171002004-03-12 Daniel Jacobowitz <drow@mvista.com>
17101
17102 * gdbreplay.c, server.h, utils.c: Update copyright years.
17103
3a7fb99b
DJ
171042004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17105
17106 * server.c (main): Print child status or termination signal from
17107 variable 'signal', not 'sig'.
17108
c3e735a6
DJ
171092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17110
17111 * linux-low.c (linux_read_memory): Change return type to
17112 int. Check for and return error from ptrace().
17113 * target.c (read_inferior_memory): Change return type to int. Pass
17114 back return status from the_target->read_memory().
17115 * target.h (struct target_ops): Adapt *read_memory() prototype.
17116 Update comment.
17117 (read_inferior_memory): Adapt prototype.
17118 * server.c (main): Return an error packet if
17119 read_inferior_memory() returns an error.
17120
a59d1c82
DJ
171212004-03-04 Daniel Jacobowitz <drow@mvista.com>
17122
17123 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17124 Unify with other clean targets.
17125
dc3f8883
DJ
171262004-02-29 Daniel Jacobowitz <drow@mvista.com>
17127
17128 * server.c (handle_v_cont): Call set_desired_inferior.
17129
89a208da
DJ
171302004-02-29 Daniel Jacobowitz <drow@mvista.com>
17131
17132 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17133
62ea82f5
DJ
171342004-02-29 Daniel Jacobowitz <drow@mvista.com>
17135
17136 * linux-low.c (linux_wait): Unblock async I/O.
17137 (linux_resume): Block and enable async I/O.
17138 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17139 * server.h (block_async_io, unblock_async_io): Add prototypes.
17140
6910d122
DJ
171412004-02-29 Daniel Jacobowitz <drow@mvista.com>
17142
17143 * remote-utils.c (remote_open): Print a status notice after
17144 opening a TCP port.
17145 * server.c (attach_inferior): Print a status notice after
17146 attaching.
17147
171482004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17149
17150 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17151
c89dc5d4
DJ
171522004-02-26 Daniel Jacobowitz <drow@mvista.com>
17153
17154 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17155 error packet.
17156 * server.c, target.h: Update copyright years.
17157
4b8dad4a
RM
171582004-02-25 Roland McGrath <roland@redhat.com>
17159
17160 * target.h (struct target_ops): New member `read_auxv'.
17161 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17162 * linux-low.c (linux_read_auxv): New function.
17163 (linux_target_ops): Initialize `read_auxv' member to that.
17164
d7446758
JB
171652004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17166
17167 Committed by Jim Blandy <jimb@redhat.com>.
17168
17169 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17170 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17171 instead of GPR_SIZE to distiguish s390 and s390x targets.
17172
5544ad89
DJ
171732004-01-31 Daniel Jacobowitz <drow@mvista.com>
17174
17175 * linux-low.c: Update copyright year.
17176 (check_removed_breakpoint): Clear pending_is_breakpoint.
17177 (linux_set_resume_request, linux_queue_one_thread)
17178 (resume_status_pending_p): New functions.
17179 (linux_continue_one_thread): Use process->resume.
17180 (linux_resume): Only resume threads if there are no pending events.
17181 * linux-low.h (struct process_info): Add resume request
17182 pointer.
17183
2a68b70e
DJ
171842004-01-30 Daniel Jacobowitz <drow@mvista.com>
17185
17186 * regcache.c (new_register_cache): Clear the allocated register
17187 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17188
64386c31
DJ
171892003-10-13 Daniel Jacobowitz <drow@mvista.com>
17190
17191 * linux-low.c (linux_resume): Take a struct thread_resume *
17192 argument.
17193 (linux_wait): Update call.
17194 (resume_ptr): New static variable.
17195 (linux_continue_one_thread): Renamed from
17196 linux_continue_one_process. Use resume_ptr.
17197 (linux_resume): Use linux_continue_one_thread.
17198 * server.c (handle_v_cont, handle_v_requests): New functions.
17199 (myresume): New function.
17200 (main): Handle 'v' case.
17201 * target.h (struct thread_resume): New type.
17202 (struct target_ops): Change argument of "resume" to struct
17203 thread_resume *.
17204 (myresume): Delete macro.
17205
c938e9b0
L
172062003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17207
17208 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17209 (uninstall): Support DESTDIR.
17210
7f313d07
BC
17211Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17212
17213 * configure.srv: Add xscale*linux copy of arm*linux entry.
17214
3b2fc2ea
DJ
172152003-07-24 Daniel Jacobowitz <drow@mvista.com>
17216
17217 * linux-arm-low.c (arm_reinsert_addr): New function.
17218 (the_low_target): Add arm_reinsert_addr.
17219
1c0a559e
MK
172202003-07-08 Mark Kettenis <kettenis@gnu.org>
17221
17222 * mem-break.c: Remove whitespace at end of file.
17223
43d5792c
DJ
172242003-06-28 Daniel Jacobowitz <drow@mvista.com>
17225
17226 * configure.in: Check whether we need to prototype strerror.
17227 * server.h: Optionally prototype strerror.
17228 * gdbreplay.c (perror_with_name): Use strerror.
17229 * linux-low.c (linux_attach_lwp): Use strerror.
17230 * utils.c (perror_with_name): Use strerror.
17231 * config.in, configure: Regenerated.
17232
c8a86edf
DJ
172332003-06-28 Daniel Jacobowitz <drow@mvista.com>
17234
17235 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17236 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17237
73d37363
DJ
172382003-06-20 Daniel Jacobowitz <drow@mvista.com>
17239
17240 * Makefile.in (SFILES): Update.
17241 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17242 low-sun3.c: Remove files.
17243
6ad8ae5c
DJ
172442003-06-17 Daniel Jacobowitz <drow@mvista.com>
17245
17246 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17247 (linux_detach_one_process, linux_detach): New functions.
17248 (linux_target_ops): Add linux_detach.
17249 * server.c (main): Handle 'D' packet.
17250 * target.h (struct target_ops): Add "detach" member.
17251 (detach_inferior): Define.
17252
1581182a
MK
172532003-06-13 Mark Kettenis <kettenis@gnu.org>
17254
17255 From Kelley Cook <kelleycook@wideopenwest.com>:
17256 * configure.srv: Accept i[34567]86 variants.
17257
e5379b03
DJ
172582003-06-05 Daniel Jacobowitz <drow@mvista.com>
17259
17260 * linux-low.c (linux_wait_for_event): Correct comment typos.
17261 (linux_resume_one_process): Call check_removed_breakpoint.
17262 (linux_send_signal): New function.
17263 (linux_target_ops): Add linux_send_signal.
17264 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17265 of kill.
17266 * target.h (struct target_ops): Add send_signal.
17267
2ff29de4
JB
172682003-05-29 Jim Blandy <jimb@redhat.com>
17269
17270 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17271 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17272 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17273 away part of the register's value.
17274
254787d4
DJ
172752003-03-26 Daniel Jacobowitz <drow@mvista.com>
17276
17277 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17278 (linux_wait_for_event, linux_init_signals): Likewise.
17279
94e10508
DJ
172802003-03-17 Daniel Jacobowitz <drow@mvista.com>
17281
17282 * configure.in: Check for stdlib.h.
17283 * configure: Regenerated.
17284 * config.in: Regenerated.
17285
4c0711e0
DJ
172862003-01-04 Andreas Schwab <schwab@suse.de>
17287
17288 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17289
ef66e766
AC
172902003-01-02 Andrew Cagney <ac131313@redhat.com>
17291
17292 * Makefile.in: Remove obsolete code.
17293
a1358604
DJ
172942002-11-20 Daniel Jacobowitz <drow@mvista.com>
17295
17296 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17297 defined(PT_FPR0_HI).
17298
23ce3b1c
DJ
172992002-11-17 Stuart Hughes <seh@zee2.com>
17300
17301 * linux-arm-low.c (arm_num_regs): Increase.
17302 (arm_regmap): Include status register.
17303
173042002-11-17 Daniel Jacobowitz <drow@mvista.com>
17305
17306 * linux-low.c (register_addr): Remove incorrect -1 check.
17307
a9fa9f7d
DJ
173082002-08-29 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * linux-low.c (linux_create_inferior): Call setpgid. Return
17311 the new PID.
17312 (unstopped_p, linux_signal_pid): Remove.
17313 (linux_target_ops): Remove linux_signal_pid.
17314 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17315 global instead of target method.
17316 * target.h (struct target_ops): Remove signal_pid. Update comment
17317 for create_inferior.
17318 * server.c (signal_pid): New variable.
17319 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17320 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17321 (attach_inferior): Set signal_pid.
17322
17574093
DJ
173232002-08-23 Daniel Jacobowitz <drow@mvista.com>
17324
17325 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17326
173272002-08-20 Jim Blandy <jimb@redhat.com>
17328
17329 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17330 default for this.
17331
173322002-08-01 Andrew Cagney <cagney@redhat.com>
17333
17334 * Makefile.in: Make chill references obsolete.
17335
173362002-07-24 Kevin Buettner <kevinb@redhat.com>
17337
17338 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17339 * configure: Regenerate.
17340 * config.in: Regenerate.
17341
173422002-07-09 David O'Brien <obrien@FreeBSD.org>
17343
17344 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17345 (perror_with_name, remote_close, remote_open, expect, play): Static.
17346
173472002-07-04 Michal Ludvig <mludvig@suse.cz>
17348
4b8dad4a 17349 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17350 byte offsets instead of an array of indexes.
17351 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17352
173532002-06-13 Daniel Jacobowitz <drow@mvista.com>
17354
17355 * regcache.c: Add comment.
17356
173572002-06-11 Daniel Jacobowitz <drow@mvista.com>
17358
17359 * thread-db.c: New file.
17360 * proc-service.c: New file.
17361 * acinclude.m4: New file.
17362 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17363 proc-service.o, and thread-db.o.
17364 (linux-low.o): Add USE_THREAD_DB.
17365 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17366 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17367 * aclocal.m4: Regenerated.
17368 * config.in: Regenerated.
17369 * configure: Regenerated.
17370 * configure.in: Check for proc_service.h, sys/procfs.h,
17371 thread_db.h, and linux/elf.h headrs.
17372 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17373 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17374 Check for -lthread_db and thread support.
17375 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17376 PowerPC, and SuperH.
17377 * i387-fp.c: Constify arguments.
17378 * i387-fp.h: Likewise.
17379 * inferiors.c: (struct thread_info): Renamed from
17380 `struct inferior_info'. Remove PID member. Use generic inferior
17381 list header. All uses updated.
17382 (inferiors, signal_pid): Removed.
17383 (all_threads): New variable.
17384 (get_thread): Define.
17385 (add_inferior_to_list): New function.
17386 (for_each_inferior): New function.
17387 (change_inferior_id): New function.
17388 (add_inferior): Removed.
17389 (remove_inferior): New function.
17390 (add_thread): New function.
17391 (free_one_thread): New function.
17392 (remove_thread): New function.
17393 (clear_inferiors): Use for_each_inferior and free_one_thread.
17394 (find_inferior): New function.
17395 (find_inferior_id): New function.
17396 (inferior_target_data): Update argument type.
17397 (set_inferior_target_data): Likewise.
17398 (inferior_regcache_data): Likewise.
17399 (set_inferior_regcache_data): Likewise.
17400 * linux-low.c (linux_bp_reinsert): Remove.
17401 (all_processes, stopping_threads, using_thrads)
17402 (struct pending_signals, debug_threads, pid_of): New.
17403 (inferior_pid): Replace with macro.
17404 (struct inferior_linux_data): Remove.
17405 (get_stop_pc, add_process): New functions.
17406 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17407 Use add_process and add_thread.
17408 (linux_attach_lwp): New function, based on old linux_attach. Use
17409 add_process and add_thread. Set stop_expected for new threads.
17410 (linux_attach): New function.
17411 (linux_kill_one_process): New function.
17412 (linux_kill): Kill all LWPs.
17413 (linux_thread_alive): Use find_inferior_id.
17414 (check_removed_breakpoints, status_pending_p): New functions.
17415 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17416 Update. Use WNOHANG. Wait for cloned processes also. Update process
17417 struct for the found process.
17418 (linux_wait_for_event): New function.
17419 (linux_wait): Use it. Support LWPs.
17420 (send_sigstop, wait_for_sigstop, stop_all_processes)
17421 (linux_resume_one_process, linux_continue_one_process): New functions.
17422 (linux_resume): Support LWPs.
17423 (REGISTER_RAW_SIZE): Remove.
17424 (fetch_register): Use register_size instead. Call supply_register.
17425 (usr_store_inferior_registers): Likewise. Call collect_register.
17426 Fix recursive case.
17427 (regsets_fetch_inferior_registers): Improve error message.
17428 (regsets_store_inferior_registers): Add debugging.
17429 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17430 (unstopped_p, linux_signal_pid): New functions.
17431 (linux_target_ops): Add linux_signal_pid.
17432 (linux_init_signals): New function.
17433 (initialize_low): Call it. Initialize using_threads.
17434 * regcache.c (inferior_regcache_data): Add valid
17435 flag.
17436 (get_regcache): Fetch registers lazily. Add fetch argument
17437 and update all callers.
17438 (regcache_invalidate_one, regcache_invalidate): New
17439 functions.
17440 (new_register_cache): Renamed from create_register_cache.
17441 Return the new regcache.
17442 (free_register_cache): Change argument to a void *.
17443 (registers_to_string, registers_from_string): Call get_regcache
17444 with fetch flag set.
17445 (register_data): Make static. Pass fetch flag to get_regcache.
17446 (supply_register): Call get_regcache with fetch flag clear.
17447 (collect_register): Call get_regcache with fetch flag set.
17448 (collect_register_as_string): New function.
17449 * regcache.h: Update.
17450 * remote-utils.c (putpkt): Flush after debug output and use
17451 stderr.
17452 Handle input interrupts while waiting for an ACK.
17453 (input_interrupt): Use signal_pid method.
17454 (getpkt): Flush after debug output and use stderr.
17455 (outreg): Use collect_register_as_string.
17456 (new_thread_notify, dead_thread_notify): New functions.
17457 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17458 and general_thread.
17459 (look_up_one_symbol): Flush after debug output.
17460 * server.c (step_thread, server_waiting): New variables.
17461 (start_inferior): Don't use signal_pid. Update call to mywait.
17462 (attach_inferior): Update call to mywait.
17463 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17464 (main): Don't fetch/store registers explicitly. Use
17465 set_desired_inferior. Support proposed ``Hs'' packet. Update
17466 calls to mywait.
17467 * server.h: Update.
17468 (struct inferior_list, struct_inferior_list_entry): New.
17469 * target.c (set_desired_inferior): New.
17470 (write_inferior_memory): Constify.
17471 (mywait): New function.
17472 * target.h: Update.
17473 (struct target_ops): New signal_pid method.
17474 (mywait): Removed macro, added prototype.
17475
17476 * linux-low.h (regset_func): Removed.
17477 (regset_fill_func, regset_store_func): New.
17478 (enum regset_type): New.
17479 (struct regset_info): Add type field. Use new operation types.
17480 (struct linux_target_ops): stop_pc renamed to get_pc.
17481 Add decr_pc_after_break and breakpoint_at.
17482 (get_process, get_thread_proess, get_process_thread)
17483 (strut process_info, all_processes, linux_attach_lwp)
17484 (thread_db_init): New.
17485
17486 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17487 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17488 (the_low_target): Add new members.
17489 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17490 (i386_store_fpxregset): Constify.
17491 (target_regsets): Add new kind identifier.
17492 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17493 (i386_set_pc): Add debugging.
17494 (i386_breakpoint_at): New function.
17495 (the_low_target): Add new members.
17496 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17497 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17498 (mips_breakpoint_at): New.
17499 (the_low_target): Add new members.
17500 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17501 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17502 (the_low_target): Add new members.
17503 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17504 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17505 (the_low_target): Add new members.
17506 * linux-x86-64-low.c (target_regsets): Add new kind
17507 identifier.
17508
175092002-05-15 Daniel Jacobowitz <drow@mvista.com>
17510
17511 From Martin Pool <mbp@samba.org>:
17512 * server.c (gdbserver_usage): New function.
17513 (main): Call it.
17514
175152002-05-14 Daniel Jacobowitz <drow@mvista.com>
17516
17517 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17518 stop_at -> stop_pc.
17519
175202002-05-04 Andrew Cagney <ac131313@redhat.com>
17521
17522 * Makefile.in: Remove obsolete code.
17523
175242002-04-24 Michal Ludvig <mludvig@suse.cz>
17525
17526 * linux-low.c (regsets_fetch_inferior_registers),
17527 (regsets_store_inferior_registers): Removed cast to int from
17528 ptrace() calls.
17529 * regcache.h: Added declaration of struct inferior_info.
17530
175312002-04-20 Daniel Jacobowitz <drow@mvista.com>
17532
17533 * inferiors.c (struct inferior_info): Add regcache_data.
17534 (add_inferior): Call create_register_cache.
17535 (clear_inferiors): Call free_register_cache.
17536 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17537 * regcache.c (struct inferior_regcache_data): New.
17538 (registers): Remove.
17539 (get_regcache): New function.
17540 (create_register_cache, free_register_cache): New functions.
17541 (set_register_cache): Don't initialize the register cache here.
17542 (registers_to_string, registers_from_string, register_data): Call
17543 get_regcache.
17544 * regcache.h: Add prototypes.
17545 * server.h: Likewise.
17546
175472002-04-20 Daniel Jacobowitz <drow@mvista.com>
17548
17549 * mem-break.c: New file.
17550 * mem-break.h: New file.
17551 * Makefile.in: Add mem-break.o rule; update server.h
17552 dependencies.
17553 * inferiors.c (struct inferior_info): Add target_data
17554 member.
17555 (clear_inferiors): Free target_data member if set.
17556 (inferior_target_data, set_inferior_target_data): New functions.
17557 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17558 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17559 * linux-low.c (linux_bp_reinsert): New variable.
17560 (struct inferior_linux_data): New.
17561 (linux_create_inferior): Use set_inferior_target_data.
17562 (linux_attach): Likewise. Call add_inferior.
17563 (linux_wait_for_one_inferior): New function.
17564 (linux_wait): Call it.
17565 (linux_write_memory): Add const.
17566 (initialize_low): Call set_breakpoint_data.
17567 * linux-low.h (struct linux_target_ops): Add breakpoint
17568 handling members.
17569 * server.c (attach_inferior): Remove extra add_inferior
17570 call.
17571 * server.h: Include mem-break.h. Update inferior.c
17572 prototypes.
17573 * target.c (read_inferior_memory)
17574 (write_inferior_memory): New functions.
17575 * target.h (read_inferior_memory)
17576 (write_inferior_memory): Change macros to prototypes.
17577 (struct target_ops): Update comments. Add const to write_memory
17578 definition.
17579
175802002-04-11 Daniel Jacobowitz <drow@mvista.com>
17581
17582 * linux-low.c (usr_store_inferior_registers): Support
17583 registers which are allowed to fail to store.
17584 * linux-low.h (linux_target_ops): Likewise.
17585 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17586 (ppc_cannot_store_register): FPSCR may not be storable.
17587
175882002-04-09 Daniel Jacobowitz <drow@mvista.com>
17589
17590 * server.h: Include <string.h> if HAVE_STRING_H.
17591 * ChangeLog: Correct paths in last ChangeLog entry.
17592
175932002-04-09 Daniel Jacobowitz <drow@mvista.com>
17594
17595 * linux-low.h: Remove obsolete prototypes.
17596 (struct linux_target_ops): New.
17597 (extern the_low_target): New.
17598 * linux-low.c (num_regs, regmap): Remove declarations.
17599 (register_addr): Use the_low_target explicitly.
17600 (fetch_register): Likewise.
17601 (usr_fetch_inferior_registers): Likewise.
17602 (usr_store_inferior_registers): Likewise.
17603 * linux-arm-low.c (num_regs): Remove.
17604 (arm_num_regs): Define.
17605 (arm_regmap): Renamed from regmap, made static.
17606 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17607 made static.
17608 (arm_cannot_store_register): Renamed from cannot_store_register,
17609 made static.
17610 (the_low_target): New.
17611 * linux-i386-low.c (num_regs): Remove.
17612 (i386_num_regs): Define.
17613 (i386_regmap): Renamed from regmap, made static.
17614 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17615 made static.
17616 (i386_cannot_store_register): Renamed from cannot_store_register,
17617 made static.
17618 (the_low_target): New.
17619 * linux-ia64-low.c (num_regs): Remove.
17620 (ia64_num_regs): Define.
17621 (ia64_regmap): Renamed from regmap, made static.
17622 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17623 made static.
17624 (ia64_cannot_store_register): Renamed from cannot_store_register,
17625 made static.
17626 (the_low_target): New.
17627 * linux-m68k-low.c (num_regs): Remove.
17628 (m68k_num_regs): Define.
17629 (m68k_regmap): Renamed from regmap, made static.
17630 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17631 made static.
17632 (m68k_cannot_store_register): Renamed from cannot_store_register,
17633 made static.
17634 (the_low_target): New.
17635 * linux-mips-low.c (num_regs): Remove.
17636 (mips_num_regs): Define.
17637 (mips_regmap): Renamed from regmap, made static.
17638 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17639 made static.
17640 (mips_cannot_store_register): Renamed from cannot_store_register,
17641 made static.
17642 (the_low_target): New.
17643 * linux-ppc-low.c (num_regs): Remove.
17644 (ppc_num_regs): Define.
17645 (ppc_regmap): Renamed from regmap, made static.
17646 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17647 made static.
17648 (ppc_cannot_store_register): Renamed from cannot_store_register,
17649 made static.
17650 (the_low_target): New.
17651 * linux-s390-low.c (num_regs): Remove.
17652 (s390_num_regs): Define.
17653 (s390_regmap): Renamed from regmap, made static.
17654 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17655 made static.
17656 (s390_cannot_store_register): Renamed from cannot_store_register,
17657 made static.
17658 (the_low_target): New.
17659 * linux-sh-low.c (num_regs): Remove.
17660 (sh_num_regs): Define.
17661 (sh_regmap): Renamed from regmap, made static.
17662 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17663 made static.
17664 (sh_cannot_store_register): Renamed from cannot_store_register,
17665 made static.
17666 (the_low_target): New.
17667 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17668 (the_low_target): New.
17669
176702002-04-09 Daniel Jacobowitz <drow@mvista.com>
17671
17672 * Makefile.in: Add stamp-h target.
17673 * configure.in: Create stamp-h.
17674 * configure: Regenerated.
17675
176762002-04-09 Daniel Jacobowitz <drow@mvista.com>
17677
17678 * inferiors.c: New file.
17679 * target.c: New file.
17680 * target.h: New file.
17681 * Makefile.in: Add target.o and inferiors.o. Update
17682 dependencies.
17683 * linux-low.c (inferior_pid): New static variable,
17684 moved from server.c.
17685 (linux_create_inferior): Renamed from create_inferior.
17686 Call add_inferior. Return 0 on success instead of a PID.
17687 (linux_attach): Renamed from myattach.
17688 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17689 (linux_thread_alive): Renamed from mythread_alive.
17690 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17691 child dies.
17692 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17693 (regsets_store_inferior_registers): Correct error message.
17694 Add missing ``return 0''.
17695 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17696 (linux_store_registers): Renamed from store_inferior_registers.
17697 (linux_read_memory): Renamed from read_inferior_memory.
17698 (linux_write_memory): Renamed from write_inferior_memory.
17699 (linux_target_ops): New structure.
17700 (initialize_low): Call set_target_ops ().
17701 * remote-utils.c (unhexify): New function.
17702 (hexify): New function.
17703 (input_interrupt): Send signals to ``signal_pid''.
17704 * server.c (inferior_pid): Remove.
17705 (start_inferior): Update create_inferior call.
17706 (attach_inferior): Call add_inferior.
17707 (handle_query): New function.
17708 (main): Call handle_query for `q' packets.
17709 * server.h: Include "target.h". Remove obsolete prototypes.
17710 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17711
177122002-04-09 Daniel Jacobowitz <drow@mvista.com>
17713
17714 * Makefile.in: Add WARN_CFLAGS. Update configury
17715 dependencies.
17716 * configure.in: Check for <string.h>
17717 * configure: Regenerate.
17718 * config.in: Regenerate.
17719 * gdbreplay.c: Include needed system headers.
17720 (remote_open): Remove strchr prototype.
17721 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17722 * regcache.c (supply_register): Change buf argument to const void *.
17723 (supply_register_by_name): Likewise.
17724 (collect_register): Change buf argument to void *.
17725 (collect_register_by_name): Likewise.
17726 * regcache.h: Add missing prototypes.
17727 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17728 * server.c (handle_query): New function.
17729 (attached): New static variable, moved out of main.
17730 (main): Quiet longjmp clobber warnings.
17731 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17732 * utils.c (error): Remove NORETURN.
17733 (fatal): Likewise.
This page took 3.026932 seconds and 4 git commands to generate.